@linkdlab/funcnodes_react_flow 0.4.0 → 0.4.3

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,13 +1,4 @@
1
- import*as e from"react";import t,{memo as n,forwardRef as r,useContext as o,createContext as i,useMemo as a,useEffect as s,useCallback as l,useState as c,useRef as u,useLayoutEffect as d,createElement as f,useId as p,isValidElement as h,cloneElement as m,Children as g,Component as y,Fragment as b,useReducer as v,useImperativeHandle as w}from"react";import*as x from"react-dom";import k,{createPortal as C}from"react-dom";function E(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const S=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,o,i);return i},_=e=>e?S(e):S;function I(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A,N={exports:{}},O={},R={exports:{}},T={};var M,P,D,j={};
2
- /**
3
- * @license React
4
- * use-sync-external-store-shim.development.js
5
- *
6
- * Copyright (c) Meta Platforms, Inc. and affiliates.
7
- *
8
- * This source code is licensed under the MIT license found in the
9
- * LICENSE file in the root directory of this source tree.
10
- */function B(){return P||(P=1,"production"===process.env.NODE_ENV?R.exports=function(){if(A)return T;A=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),l=r({inst:{value:n,getSnapshot:t}}),c=l[0].inst,u=l[1];return i((function(){c.value=n,c.getSnapshot=t,s(c)&&u({inst:c})}),[e,n,t]),o((function(){return s(c)&&u({inst:c}),e((function(){s(c)&&u({inst:c})}))}),[e]),a(n),n};return T.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,T}():R.exports=(M||(M=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,i=n.useEffect,a=n.useLayoutEffect,s=n.useDebugValue,l=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,u){l||void 0===n.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var f=u();r(d,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var p=(f=o({inst:{value:d,getSnapshot:u}}))[0].inst,h=f[1];return a((function(){p.value=d,p.getSnapshot=u,e(p)&&h({inst:p})}),[t,d,u]),i((function(){return e(p)&&h({inst:p}),t((function(){e(p)&&h({inst:p})}))}),[t]),s(d),d};j.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),j)),R.exports}
1
+ import*as e from"react";import t,{memo as n,forwardRef as r,useContext as o,createContext as i,useMemo as a,useEffect as s,useCallback as l,useState as c,useRef as u,useLayoutEffect as d,createElement as f,useId as p,isValidElement as h,cloneElement as m,Children as g,Component as y,Fragment as b,useReducer as v,useImperativeHandle as w}from"react";import*as x from"react-dom";import E,{createPortal as k}from"react-dom";function C(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}))})),Object.freeze(e)}const S=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>a,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},a=t=e(r,o,i);return i},_=e=>e?S(e):S;function I(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function N(){throw new Error("setTimeout has not been defined")}function O(){throw new Error("clearTimeout has not been defined")}var R=N,T=O;function M(e){if(R===setTimeout)return setTimeout(e,0);if((R===N||!R)&&setTimeout)return R=setTimeout,setTimeout(e,0);try{return R(e,0)}catch(t){try{return R.call(null,e,0)}catch(t){return R.call(this,e,0)}}}"function"==typeof A.setTimeout&&(R=setTimeout),"function"==typeof A.clearTimeout&&(T=clearTimeout);var P,D=[],j=!1,B=-1;function L(){j&&P&&(j=!1,P.length?D=P.concat(D):B=-1,D.length&&z())}function z(){if(!j){var e=M(L);j=!0;for(var t=D.length;t;){for(P=D,D=[];++B<t;)P&&P[B].run();B=-1,t=D.length}P=null,j=!1,function(e){if(T===clearTimeout)return clearTimeout(e);if((T===O||!T)&&clearTimeout)return T=clearTimeout,clearTimeout(e);try{return T(e)}catch(t){try{return T.call(null,e)}catch(t){return T.call(this,e)}}}(e)}}function F(e,t){this.fun=e,this.array=t}F.prototype.run=function(){this.fun.apply(null,this.array)};function V(){}var G=V,W=V,H=V,X=V,Y=V,$=V,Z=V;var U=A.performance||{},J=U.now||U.mozNow||U.msNow||U.oNow||U.webkitNow||function(){return(new Date).getTime()};var K=new Date;var q,Q={nextTick:function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];D.push(new F(e,t)),1!==D.length||j||M(z)},title:"browser",browser:!0,env:{},argv:[],version:"",versions:{},on:G,addListener:W,once:H,off:X,removeListener:Y,removeAllListeners:$,emit:Z,binding:function(e){throw new Error("process.binding is not supported")},cwd:function(){return"/"},chdir:function(e){throw new Error("process.chdir is not supported")},umask:function(){return 0},hrtime:function(e){var t=.001*J.call(U),n=Math.floor(t),r=Math.floor(t%1*1e9);return e&&(n-=e[0],(r-=e[1])<0&&(n--,r+=1e9)),[n,r]},platform:"browser",release:{},config:{},uptime:function(){return(new Date-K)/1e3}},ee={exports:{}},te={},ne={exports:{}},re={};var oe,ie,ae,se={};function le(){return ie||(ie=1,"production"===Q.env.NODE_ENV?ne.exports=function(){if(q)return re;q=1;var e=t,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),l=r({inst:{value:n,getSnapshot:t}}),c=l[0].inst,u=l[1];return i((function(){c.value=n,c.getSnapshot=t,s(c)&&u({inst:c})}),[e,n,t]),o((function(){return s(c)&&u({inst:c}),e((function(){s(c)&&u({inst:c})}))}),[e]),a(n),n};return re.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:l,re}():ne.exports=(oe||(oe=1,"production"!==Q.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=t,r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,i=n.useEffect,a=n.useLayoutEffect,s=n.useDebugValue,l=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,u){l||void 0===n.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var d=u();if(!c){var f=u();r(d,f)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var p=(f=o({inst:{value:d,getSnapshot:u}}))[0].inst,h=f[1];return a((function(){p.value=d,p.getSnapshot=u,e(p)&&h({inst:p})}),[t,d,u]),i((function(){return e(p)&&h({inst:p}),t((function(){e(p)&&h({inst:p})}))}),[t]),s(d),d};se.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),se)),ne.exports}
11
2
  /**
12
3
  * @license React
13
4
  * use-sync-external-store-shim/with-selector.production.js
@@ -16,66 +7,23 @@ import*as e from"react";import t,{memo as n,forwardRef as r,useContext as o,crea
16
7
  *
17
8
  * This source code is licensed under the MIT license found in the
18
9
  * LICENSE file in the root directory of this source tree.
19
- */var L,z,F={};
20
- /**
21
- * @license React
22
- * use-sync-external-store-shim/with-selector.development.js
23
- *
24
- * Copyright (c) Meta Platforms, Inc. and affiliates.
25
- *
26
- * This source code is licensed under the MIT license found in the
27
- * LICENSE file in the root directory of this source tree.
28
- */var V=(z||(z=1,"production"===process.env.NODE_ENV?N.exports=function(){if(D)return O;D=1;var e=t,n=B(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return O.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s((function(){function e(e){if(!a){if(a=!0,o=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,c,u]);var p=o(e,d[0],d[1]);return a((function(){f.hasValue=!0,f.value=p}),[p]),l(p),p},O}():N.exports=(L||(L=1,"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,n=B(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;F.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s((function(){function e(e){if(!a){if(a=!0,o=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,c,u]);var p=o(e,d[0],d[1]);return a((function(){f.hasValue=!0,f.value=p}),[p]),l(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),F)),N.exports),G=I(V);const{useDebugValue:H}=t,{useSyncExternalStoreWithSelector:W}=G;let X=!1;const $=e=>e;const Z=e=>{"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?_(e):e,n=(e,n)=>function(e,t=$,n){"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&n&&!X&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),X=!0);const r=W(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return H(r),r}(t,e,n);return Object.assign(n,t),n},Y=e=>e?Z(e):Z;function U(e){return"[object Object]"===Object.prototype.toString.call(e)}function J(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e.constructor!==t.constructor)return!1;if(e.constructor===Object||e.constructor===Array){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){if(!r.includes(o))return!1;if(!J(e[o],t[o]))return!1}}return!(e instanceof Date&&t instanceof Date)||e.getTime()===t.getTime()}const K=(e,t)=>{let n=!1;if(!U(e))throw new Error("Target must be a plain object not"+typeof e);if(!U(t))throw new Error("Source must be a plain object not"+typeof t);const r={...e};return Object.keys(t).forEach((o=>{const i=t[o],a=e[o];if(U(i)&&U(a)){const{new_obj:e,change:t}=K(a,i);t&&(n=!0,r[o]=e)}else J(a,i)||(n=!0,r[o]=i)})),{new_obj:r,change:n}},q=(e,t)=>{let n=!1;if(!U(e))throw new Error("Target must be a plain object");if(!U(t))throw new Error("Source must be a plain object");const r={...e};return Object.keys(t).forEach((o=>{const i=t[o],a=e[o];if(void 0!==a||void 0!==i){if(void 0===a)return n=!0,void(r[o]=i);if(U(i)&&U(a)){const{new_obj:e,change:t}=q(a,i);t&&(n=!0,r[o]=e)}}})),{new_obj:r,change:n}},Q=(e,t)=>void 0===t?[e,!1]:[t,e!==t];function ee(e,t){throw new Error("Unhandled case: "+e+" with: "+JSON.stringify(t))}const te=e=>{void 0===e.io&&(e.io={});let t=e.io,n=e.io_order;if(void 0===n)if(Array.isArray(t)){n=t.map((e=>e.id));const e={};for(const n of t)e[n.id]=n;t=e}else n=Object.keys(e.io);else if(Array.isArray(t)){const e={};for(const r of t)e[r.id]=r,n.includes(r.id)||n.push(r.id);t=e}else for(const e in t)n.includes(e)||n.push(e);return{...e,io_order:n,io:t}},ne=(e,t)=>{e.properties=e.properties||{},t.pos&&(e.properties["frontend:pos"]=t.pos),t.size&&(e.properties["frontend:size"]=t.size),void 0!==t.collapsed&&(e.properties["frontend:collapsed"]=!!t.collapsed)};class re{constructor({data:e,mime:t}){this._data=e,this._mime=t}get data(){return this._data}get value(){return this._data}get mime(){return this._mime}toString(){return this._data instanceof ArrayBuffer?`DataStructure(${this._data.byteLength},${this._mime})`:this._data instanceof Blob?`DataStructure(${this._data.size},${this._mime})`:this._data instanceof String||this._data instanceof Array?`DataStructure(${this._data.length},${this._mime})`:this._data instanceof Object?`DataStructure(${Object.keys(this._data).length},${this._mime})`:`DataStructure(${this._mime})`}toJSON(){return this.toString()}dispose(){}}class oe extends re{get objectUrl(){if(this._objectUrl)return this._objectUrl;const e=this.data instanceof Blob?this.data:new Blob([this.data],{type:this.mime});return this._objectUrl=URL.createObjectURL(e),this._objectUrl}dispose(){this._objectUrl&&URL.revokeObjectURL(this._objectUrl),super.dispose()}get value(){return this.objectUrl}}const ie={x:e=>null,c:e=>new DataView(e).getInt8(0),B:e=>new DataView(e).getUint8(0),"?":e=>1===new DataView(e).getInt8(0),h:e=>new DataView(e).getInt16(0),H:e=>new DataView(e).getUint16(0),i:e=>new DataView(e).getInt32(0),I:e=>new DataView(e).getUint32(0),l:e=>new DataView(e).getInt32(0),L:e=>new DataView(e).getUint32(0),q:e=>new DataView(e).getBigInt64(0),Q:e=>new DataView(e).getBigUint64(0),n:e=>new DataView(e).getBigInt64(0),N:e=>new DataView(e).getBigUint64(0),f:e=>new DataView(e).getFloat32(0),d:e=>new DataView(e).getFloat64(0),s:e=>(new TextDecoder).decode(e),p:e=>(new TextDecoder).decode(e),P:e=>new DataView(e).getBigUint64(0)};class ae extends re{constructor({data:e,mime:t}){super({data:e,mime:t}),this._cType=t.split("application/fn.struct.")[1],this._value=ie[this._cType](e)}get value(){return this._value}toString(){return null===this._value?"null":this._value.toString()}}class se extends re{constructor({data:e,mime:t}){super({data:e,mime:t}),0===e.length?this._json=void 0:(this._json=JSON.parse((new TextDecoder).decode(e)),"<NoValue>"===this._json&&(this._json=void 0))}get value(){return this._json}static fromObject(e){const t="<NoValue>"===e?new Uint8Array(0):(new TextEncoder).encode(JSON.stringify(e));return new se({data:t,mime:"application/json"})}toString(){return JSON.stringify(this._json)}}class le extends re{constructor({data:e,mime:t}){super({data:e,mime:t}),this._value=(new TextDecoder).decode(e)}get value(){return this._value}toString(){return this._value}}const ce=({data:e,mime:t})=>e instanceof ArrayBuffer||e instanceof Uint8Array?t.startsWith("application/fn.struct.")?new ae({data:e,mime:t}):t.startsWith("application/json")?new se({data:e,mime:t}):"text"===t||t.startsWith("text/")?new le({data:e,mime:t}):new oe({data:e,mime:t}):new re({data:e,mime:t}),ue={id:"dummy",node_id:"dummy",node_name:"dummy",properties:{"frontend:size":[200,100],"frontend:pos":[NaN,NaN],"frontend:collapsed":!1},io:{},name:"dummy",in_trigger:!1,progress:{ascii:!1,elapsed:0,initial:0,n:0,prefix:"idle",unit:"it",unit_divisor:1e3,unit_scale:!1}},de={id:"dummy",name:"dummy",node:"dummy",full_id:"dummy",type:"any",value:void 0,is_input:!1,connected:!1,does_trigger:!0,fullvalue:void 0,render_options:{set_default:!0,type:"any"},hidden:!1,emit_value_set:!0,required:!1},fe=(e,t,n)=>{let r;if(void 0===e)throw new Error("nodestore is undefined");return r={_state:Y(((e,r)=>((e,t)=>{if(!t.id)throw new Error("IO must have an id but is missing for "+JSON.stringify(t));void 0===t.name&&(t.name=t.id);const{new_obj:n}=q(t,de);return"any"!==n.render_options.type&&void 0!==n.render_options.type||(n.render_options.type=n.type),((e,t)=>("<NoValue>"===t.value&&(t.value=void 0),"<NoValue>"===t.fullvalue&&(t.fullvalue=void 0),void 0===t.hidden&&(t.hidden=!1),{...t,try_get_full_value:()=>{void 0!==t.node&&void 0!==t.id&&e.worker?.get_io_full_value({nid:t.node,ioid:t.id})},set_hidden:n=>{void 0!==t.node&&void 0!==t.id&&e.worker?.update_io_options({nid:t.node,ioid:t.id,options:{hidden:n}})}}))(e,n)})(t,n))),use:()=>r._state(),getState:()=>r._state.getState(),setState:e=>{r._state.setState(e)},update:e=>{((e,t)=>{const n=e.getState(),r={},o={},i=Object.keys(t);for(const e of i)switch(e){case"name":{const[o,i]=Q(n[e],t[e]);i&&(r[e]=o);break}case"id":{const[o,i]=Q(n[e],t[e]);i&&(r[e]=o);break}case"connected":{const[o,i]=Q(n[e],t[e]);i&&(r[e]=o);break}case"does_trigger":{const[o,i]=Q(n[e],t[e]);i&&(r[e]=o);break}case"hidden":{const[o,i]=Q(n[e],t[e]);i&&(r[e]=o);break}case"full_id":{const[o,i]=Q(n[e],t[e]);i&&(r[e]=o);break}case"is_input":case"node":case"type":break;case"value":o.preview=t[e];break;case"fullvalue":o.full=t[e];break;case"render_options":{const[o,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=K(e,t);return[n,r]})(n[e],t[e]);i&&(r[e]=o);break}case"value_options":{const[o,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=K(e,t);return[n,r]})(n[e],t[e]);i&&(r[e]=o);break}case"valuepreview_type":case"emit_value_set":case"default":case"required":r[e]=t[e];break;default:try{ee(e,t[e])}catch(e){console.error(e)}}Object.keys(o).length>0&&e.updateValueStore(o),Object.keys(r).length>0&&e.setState(r)})(r,e)},valuestore:Y(((e,t)=>{let r=n.value;"<NoValue>"===r&&(r=void 0),r instanceof re||void 0===r||(r=se.fromObject(r));let o=n.fullvalue;return"<NoValue>"===o&&(o=void 0),o instanceof re||void 0===o||(o=se.fromObject(o)),{preview:r,full:o}})),updateValueStore:e=>{r.valuestore.setState((t=>(t.preview&&"function"==typeof t.preview.dispose&&t.preview.dispose(),t.full&&"function"==typeof t.full.dispose&&t.full.dispose(),void 0!==e.preview&&void 0===e.full&&(e.full=void 0,t.full=void 0),void 0===e.preview||e.preview instanceof re||(e.preview=se.fromObject(e.preview)),void 0===e.full||e.full instanceof re||(e.full=se.fromObject(e.full)),{...t,...e})))},node:e},r},pe=(e,t,n)=>{if(!n.id)throw new Error("Node must have an id");const{new_obj:r}=q(n,ue),o=((e,t,n)=>{const r=n.io_order;if(void 0===r)throw new Error("Node must have io_order");const o={...n,in_trigger:Y((()=>!1)),inputs:Object.keys(n.io).filter((e=>n.io[e].is_input)),outputs:Object.keys(n.io).filter((e=>!n.io[e].is_input)),io:Object.fromEntries(Object.entries(n.io).map((([n,r])=>[n,fe(e,t,r)]))),io_order:r,progress:Y((()=>n.progress))};return o})(e,t,r);return o},he=(e,t)=>{const n={use:()=>r._state(),getState:()=>r._state.getState(),setState:e=>{r._state.setState(e)},update:e=>{((e,t)=>{const n=e.getState(),r={},o=te(t),i=Object.keys(o);for(const e of i)switch(e){case"id":{const[t,i]=Q(n[e],o[e]);i&&(r[e]=t);break}case"node_id":{const[t,i]=Q(n[e],o[e]);i&&(r[e]=t);break}case"node_name":{const[t,i]=Q(n[e],o[e]);i&&(r[e]=t);break}case"name":{const[t,i]=Q(n[e],o[e]);i&&(r[e]=t);break}case"in_trigger":n[e].setState(!!o[e]);break;case"error":o[e]!==n[e]&&(r[e]=o[e]);break;case"render_options":{const[t,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=K(e,t);return[n,r]})(n[e],o[e]);i&&(r[e]=t);break}case"io_order":{const[t,i]=((e,t)=>void 0===t?[e,!1]:[t,!J(e,t)])(n[e],o[e]);i&&(r[e]=t);break}case"io":{const t=n[e],r=o[e];if(void 0===r)break;if(void 0===t)break;for(const e in r)void 0!==t[e]?t[e].update(r[e]):console.error("io key not found in oldvalue:",e,"allowed:",t,"for update:",o);break}case"progress":{const[t,r]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=K(e,t);return[n,r]})(n[e].getState(),o[e]);r&&n[e].setState(t);break}case"description":r[e]=o[e];break;case"properties":{const[t,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=K(e,t);return[n,r]})(n[e],o[e]);i&&(r[e]=t);break}case"status":{const[t,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=K(e,t);return[n,r]})(n[e],o[e]);i&&(r[e]=t);break}default:try{ee(e,o[e])}catch(e){console.error(e)}}Object.keys(r).length>0&&e.setState(r)})(r._state,e)}},r=n;return r._state=Y(((n,o)=>pe(r,e,te(t)))),r};function me(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let n,r=0;r<e.length;r++)""!==(n=me(e[r]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}const{useDebugValue:ge}=t,{useSyncExternalStoreWithSelector:ye}=G,be=e=>e;function ve(e,t=be,n){const r=ye(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return ge(r),r}const we=(e,t)=>{const n=_(e),r=(e,r=t)=>ve(n,e,r);return Object.assign(r,n),r};function xe(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var ke={value:()=>{}};function Ce(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new Ee(r)}function Ee(e){this._=e}function Se(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function _e(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=ke,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Ee.prototype=Ce.prototype={constructor:Ee,on:function(e,t){var n,r=this._,o=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++i<a;)if(n=(e=o[i]).type)r[n]=_e(r[n],e.name,t);else if(null==t)for(n in r)r[n]=_e(r[n],e.name,null);return this}for(;++i<a;)if((n=(e=o[i]).type)&&(n=Se(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ee(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};var Ie="http://www.w3.org/1999/xhtml",Ae={svg:"http://www.w3.org/2000/svg",xhtml:Ie,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ne(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),Ae.hasOwnProperty(t)?{space:Ae[t],local:e}:e}function Oe(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Ie&&t.documentElement.namespaceURI===Ie?t.createElement(e):t.createElementNS(n,e)}}function Re(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Te(e){var t=Ne(e);return(t.local?Re:Oe)(t)}function Me(){}function Pe(e){return null==e?Me:function(){return this.querySelector(e)}}function De(){return[]}function je(e){return null==e?De:function(){return this.querySelectorAll(e)}}function Be(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}function Le(e){return function(){return this.matches(e)}}function ze(e){return function(t){return t.matches(e)}}var Fe=Array.prototype.find;function Ve(){return this.firstElementChild}var Ge=Array.prototype.filter;function He(){return Array.from(this.children)}function We(e){return new Array(e.length)}function Xe(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function $e(e,t,n,r,o,i){for(var a,s=0,l=t.length,c=i.length;s<c;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new Xe(e,i[s]);for(;s<l;++s)(a=t[s])&&(o[s]=a)}function Ze(e,t,n,r,o,i,a){var s,l,c,u=new Map,d=t.length,f=i.length,p=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(p[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?o[s]=l:u.set(c,l));for(s=0;s<f;++s)c=a.call(e,i[s],s,i)+"",(l=u.get(c))?(r[s]=l,l.__data__=i[s],u.delete(c)):n[s]=new Xe(e,i[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(p[s])===l&&(o[s]=l)}function Ye(e){return e.__data__}function Ue(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Je(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ke(e){return function(){this.removeAttribute(e)}}function qe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Qe(e,t){return function(){this.setAttribute(e,t)}}function et(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function tt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function nt(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function rt(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ot(e){return function(){this.style.removeProperty(e)}}function it(e,t,n){return function(){this.style.setProperty(e,t,n)}}function at(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function st(e,t){return e.style.getPropertyValue(t)||rt(e).getComputedStyle(e,null).getPropertyValue(t)}function lt(e){return function(){delete this[e]}}function ct(e,t){return function(){this[e]=t}}function ut(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function dt(e){return e.trim().split(/^|\s+/)}function ft(e){return e.classList||new pt(e)}function pt(e){this._node=e,this._names=dt(e.getAttribute("class")||"")}function ht(e,t){for(var n=ft(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function mt(e,t){for(var n=ft(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function gt(e){return function(){ht(this,e)}}function yt(e){return function(){mt(this,e)}}function bt(e,t){return function(){(t.apply(this,arguments)?ht:mt)(this,e)}}function vt(){this.textContent=""}function wt(e){return function(){this.textContent=e}}function xt(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function kt(){this.innerHTML=""}function Ct(e){return function(){this.innerHTML=e}}function Et(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function St(){this.nextSibling&&this.parentNode.appendChild(this)}function _t(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function It(){return null}function At(){var e=this.parentNode;e&&e.removeChild(this)}function Nt(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ot(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Rt(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,i=t.length;r<i;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function Tt(e,t,n){return function(){var r,o=this.__on,i=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var a=0,s=o.length;a<s;++a)if((r=o[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=t);this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function Mt(e,t,n){var r=rt(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Pt(e,t){return function(){return Mt(this,e,t)}}function Dt(e,t){return function(){return Mt(this,e,t.apply(this,arguments))}}Xe.prototype={constructor:Xe,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},pt.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var jt=[null];function Bt(e,t){this._groups=e,this._parents=t}function Lt(){return new Bt([[document.documentElement]],jt)}function zt(e){return"string"==typeof e?new Bt([[document.querySelector(e)]],[document.documentElement]):new Bt([[e]],jt)}function Ft(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}Bt.prototype=Lt.prototype={constructor:Bt,select:function(e){"function"!=typeof e&&(e=Pe(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a,s=t[o],l=s.length,c=r[o]=new Array(l),u=0;u<l;++u)(i=s[u])&&(a=e.call(i,i.__data__,u,s))&&("__data__"in i&&(a.__data__=i.__data__),c[u]=a);return new Bt(r,this._parents)},selectAll:function(e){e="function"==typeof e?Be(e):je(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var a,s=t[i],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),o.push(a));return new Bt(r,o)},selectChild:function(e){return this.select(null==e?Ve:function(e){return function(){return Fe.call(this.children,e)}}("function"==typeof e?e:ze(e)))},selectChildren:function(e){return this.selectAll(null==e?He:function(e){return function(){return Ge.call(this.children,e)}}("function"==typeof e?e:ze(e)))},filter:function(e){"function"!=typeof e&&(e=Le(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],s=a.length,l=r[o]=[],c=0;c<s;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new Bt(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Ye);var n=t?Ze:$e,r=this._parents,o=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var i=o.length,a=new Array(i),s=new Array(i),l=new Array(i),c=0;c<i;++c){var u=r[c],d=o[c],f=d.length,p=Ue(e.call(u,u&&u.__data__,c,r)),h=p.length,m=s[c]=new Array(h),g=a[c]=new Array(h);n(u,d,m,g,l[c]=new Array(f),p,t);for(var y,b,v=0,w=0;v<h;++v)if(y=m[v]){for(v>=w&&(w=v+1);!(b=g[w])&&++w<h;);y._next=b||null}}return(a=new Bt(a,r))._enter=s,a._exit=l,a},enter:function(){return new Bt(this._enter||this._groups.map(We),this._parents)},exit:function(){return new Bt(this._exit||this._groups.map(We),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,i=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,a=Math.min(o,i),s=new Array(o),l=0;l<a;++l)for(var c,u=n[l],d=r[l],f=u.length,p=s[l]=new Array(f),h=0;h<f;++h)(c=u[h]||d[h])&&(p[h]=c);for(;l<o;++l)s[l]=n[l];return new Bt(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Je);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,s=n[i],l=s.length,c=o[i]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new Bt(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,i=t[n],a=0,s=i.length;a<s;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this},attr:function(e,t){var n=Ne(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?qe:Ke:"function"==typeof t?n.local?nt:tt:n.local?et:Qe)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?ot:"function"==typeof t?at:it)(e,t,null==n?"":n)):st(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?lt:"function"==typeof t?ut:ct)(e,t)):this.node()[e]},classed:function(e,t){var n=dt(e+"");if(arguments.length<2){for(var r=ft(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?bt:t?gt:yt)(n,t))},text:function(e){return arguments.length?this.each(null==e?vt:("function"==typeof e?xt:wt)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?kt:("function"==typeof e?Et:Ct)(e)):this.node().innerHTML},raise:function(){return this.each(St)},lower:function(){return this.each(_t)},append:function(e){var t="function"==typeof e?e:Te(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:Te(e),r=null==t?It:"function"==typeof t?t:Pe(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(At)},clone:function(e){return this.select(e?Ot:Nt)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,i=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),a=i.length;if(!(arguments.length<2)){for(s=t?Tt:Rt,r=0;r<a;++r)this.each(s(i[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?Dt:Pt)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],i=0,a=o.length;i<a;++i)(r=o[i])&&(yield r)}};const Vt={passive:!1},Gt={capture:!0,passive:!1};function Ht(e){e.stopImmediatePropagation()}function Wt(e){e.preventDefault(),e.stopImmediatePropagation()}function Xt(e){var t=e.document.documentElement,n=zt(e).on("dragstart.drag",Wt,Gt);"onselectstart"in t?n.on("selectstart.drag",Wt,Gt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function $t(e,t){var n=e.document.documentElement,r=zt(e).on("dragstart.drag",null);t&&(r.on("click.drag",Wt,Gt),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Zt=e=>()=>e;function Yt(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:a,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function Ut(e){return!e.ctrlKey&&!e.button}function Jt(){return this.parentNode}function Kt(e,t){return null==t?{x:e.x,y:e.y}:t}function qt(){return navigator.maxTouchPoints||"ontouchstart"in this}function Qt(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function en(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function tn(){}Yt.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var nn=.7,rn=1/nn,on="\\s*([+-]?\\d+)\\s*",an="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",sn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ln=/^#([0-9a-f]{3,8})$/,cn=new RegExp(`^rgb\\(${on},${on},${on}\\)$`),un=new RegExp(`^rgb\\(${sn},${sn},${sn}\\)$`),dn=new RegExp(`^rgba\\(${on},${on},${on},${an}\\)$`),fn=new RegExp(`^rgba\\(${sn},${sn},${sn},${an}\\)$`),pn=new RegExp(`^hsl\\(${an},${sn},${sn}\\)$`),hn=new RegExp(`^hsla\\(${an},${sn},${sn},${an}\\)$`),mn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function gn(){return this.rgb().formatHex()}function yn(){return this.rgb().formatRgb()}function bn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ln.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?vn(t):3===n?new kn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?wn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?wn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=cn.exec(e))?new kn(t[1],t[2],t[3],1):(t=un.exec(e))?new kn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=dn.exec(e))?wn(t[1],t[2],t[3],t[4]):(t=fn.exec(e))?wn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=pn.exec(e))?An(t[1],t[2]/100,t[3]/100,1):(t=hn.exec(e))?An(t[1],t[2]/100,t[3]/100,t[4]):mn.hasOwnProperty(e)?vn(mn[e]):"transparent"===e?new kn(NaN,NaN,NaN,0):null}function vn(e){return new kn(e>>16&255,e>>8&255,255&e,1)}function wn(e,t,n,r){return r<=0&&(e=t=n=NaN),new kn(e,t,n,r)}function xn(e,t,n,r){return 1===arguments.length?function(e){return e instanceof tn||(e=bn(e)),e?new kn((e=e.rgb()).r,e.g,e.b,e.opacity):new kn}(e):new kn(e,t,n,null==r?1:r)}function kn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Cn(){return`#${In(this.r)}${In(this.g)}${In(this.b)}`}function En(){const e=Sn(this.opacity);return`${1===e?"rgb(":"rgba("}${_n(this.r)}, ${_n(this.g)}, ${_n(this.b)}${1===e?")":`, ${e})`}`}function Sn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _n(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function In(e){return((e=_n(e))<16?"0":"")+e.toString(16)}function An(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new On(e,t,n,r)}function Nn(e){if(e instanceof On)return new On(e.h,e.s,e.l,e.opacity);if(e instanceof tn||(e=bn(e)),!e)return new On;if(e instanceof On)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new On(a,s,l,e.opacity)}function On(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Rn(e){return(e=(e||0)%360)<0?e+360:e}function Tn(e){return Math.max(0,Math.min(1,e||0))}function Mn(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}Qt(tn,bn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:gn,formatHex:gn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return Nn(this).formatHsl()},formatRgb:yn,toString:yn}),Qt(kn,xn,en(tn,{brighter(e){return e=null==e?rn:Math.pow(rn,e),new kn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?nn:Math.pow(nn,e),new kn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new kn(_n(this.r),_n(this.g),_n(this.b),Sn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Cn,formatHex:Cn,formatHex8:function(){return`#${In(this.r)}${In(this.g)}${In(this.b)}${In(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:En,toString:En})),Qt(On,(function(e,t,n,r){return 1===arguments.length?Nn(e):new On(e,t,n,null==r?1:r)}),en(tn,{brighter(e){return e=null==e?rn:Math.pow(rn,e),new On(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?nn:Math.pow(nn,e),new On(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new kn(Mn(e>=240?e-240:e+120,o,r),Mn(e,o,r),Mn(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new On(Rn(this.h),Tn(this.s),Tn(this.l),Sn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Sn(this.opacity);return`${1===e?"hsl(":"hsla("}${Rn(this.h)}, ${100*Tn(this.s)}%, ${100*Tn(this.l)}%${1===e?")":`, ${e})`}`}}));var Pn=e=>()=>e;function Dn(e){return 1==(e=+e)?jn:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):Pn(isNaN(t)?n:t)}}function jn(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):Pn(isNaN(e)?t:e)}var Bn=function e(t){var n=Dn(t);function r(e,t){var r=n((e=xn(e)).r,(t=xn(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=jn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function Ln(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var zn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fn=new RegExp(zn.source,"g");function Vn(e,t){var n,r,o,i=zn.lastIndex=Fn.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=zn.exec(e))&&(r=Fn.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:Ln(n,r)})),i=Fn.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}var Gn,Hn=180/Math.PI,Wn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Xn(e,t,n,r,o,i){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Hn,skewX:Math.atan(l)*Hn,scaleX:a,scaleY:s}}function $n(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,a){var s=[],l=[];return i=e(i),a=e(a),function(e,r,o,i,a,s){if(e!==o||r!==i){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:Ln(e,o)},{i:l-2,x:Ln(r,i)})}else(o||i)&&a.push("translate("+o+t+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,s,l),function(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:Ln(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,a.rotate,s,l),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:Ln(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,a.skewX,s,l),function(e,t,n,r,i,a){if(e!==n||t!==r){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:Ln(e,n)},{i:s-2,x:Ln(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,l),i=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var Zn=$n((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Wn:Xn(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),Yn=$n((function(e){return null==e?Wn:(Gn||(Gn=document.createElementNS("http://www.w3.org/2000/svg","g")),Gn.setAttribute("transform",e),(e=Gn.transform.baseVal.consolidate())?Xn((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Wn)}),", ",")",")");function Un(e){return((e=Math.exp(e))+1/e)/2}var Jn,Kn,qn=function e(t,n,r){function o(e,o){var i,a,s=e[0],l=e[1],c=e[2],u=o[0],d=o[1],f=o[2],p=u-s,h=d-l,m=p*p+h*h;if(m<1e-12)a=Math.log(f/c)/t,i=function(e){return[s+e*p,l+e*h,c*Math.exp(t*e*a)]};else{var g=Math.sqrt(m),y=(f*f-c*c+r*m)/(2*c*n*g),b=(f*f-c*c-r*m)/(2*f*n*g),v=Math.log(Math.sqrt(y*y+1)-y),w=Math.log(Math.sqrt(b*b+1)-b);a=(w-v)/t,i=function(e){var r=e*a,o=Un(v),i=c/(n*g)*(o*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(t*r+v)-function(e){return((e=Math.exp(e))-1/e)/2}(v));return[s+i*p,l+i*h,c*o/Un(t*r+v)]}}return i.duration=1e3*a*t/Math.SQRT2,i}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4),Qn=0,er=0,tr=0,nr=0,rr=0,or=0,ir="object"==typeof performance&&performance.now?performance:Date,ar="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function sr(){return rr||(ar(lr),rr=ir.now()+or)}function lr(){rr=0}function cr(){this._call=this._time=this._next=null}function ur(e,t,n){var r=new cr;return r.restart(e,t,n),r}function dr(){rr=(nr=ir.now())+or,Qn=er=0;try{!function(){sr(),++Qn;for(var e,t=Jn;t;)(e=rr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Qn}()}finally{Qn=0,function(){var e,t,n=Jn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Jn=t);Kn=e,pr(r)}(),rr=0}}function fr(){var e=ir.now(),t=e-nr;t>1e3&&(or-=t,nr=e)}function pr(e){Qn||(er&&(er=clearTimeout(er)),e-rr>24?(e<1/0&&(er=setTimeout(dr,e-ir.now()-or)),tr&&(tr=clearInterval(tr))):(tr||(nr=ir.now(),tr=setInterval(fr,1e3)),Qn=1,ar(dr)))}function hr(e,t,n){var r=new cr;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}cr.prototype=ur.prototype={constructor:cr,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?sr():+n)+(null==t?0:+t),this._next||Kn===this||(Kn?Kn._next=this:Jn=this,Kn=this),this._call=e,this._time=n,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};var mr=Ce("start","end","cancel","interrupt"),gr=[];function yr(e,t,n,r,o,i){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function i(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(i){var c,u,d,f;if(1!==n.state)return l();for(c in o)if((f=o[c]).name===n.name){if(3===f.state)return hr(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete o[c]):+c<t&&(f.state=6,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete o[c])}if(hr((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(f=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=f);r.length=u+1}}function s(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=ur(i,0,n.time)}(e,n,{name:t,index:r,group:o,on:mr,tween:gr,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function br(e,t){var n=wr(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function vr(e,t){var n=wr(e,t);if(n.state>3)throw new Error("too late; already running");return n}function wr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function xr(e,t){var n,r,o,i=e.__transition,a=!0;if(i){for(o in t=null==t?null:t+"",i)(n=i[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete e.__transition}}function kr(e,t){var n,r;return function(){var o=vr(this,e),i=o.tween;if(i!==n)for(var a=0,s=(r=n=i).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}o.tween=r}}function Cr(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=vr(this,e),a=i.tween;if(a!==r){o=(r=a).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}i.tween=o}}function Er(e,t,n){var r=e._id;return e.each((function(){var e=vr(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return wr(e,r).value[t]}}function Sr(e,t){var n;return("number"==typeof t?Ln:t instanceof bn?Bn:(n=bn(t))?(t=n,Bn):Vn)(e,t)}function _r(e){return function(){this.removeAttribute(e)}}function Ir(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ar(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function Nr(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function Or(e,t,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=t(r=a,l));this.removeAttribute(e)}}function Rr(e,t,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=t(r=a,l));this.removeAttributeNS(e.space,e.local)}}function Tr(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function Mr(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function Pr(e,t){return function(){br(this,e).delay=+t.apply(this,arguments)}}function Dr(e,t){return t=+t,function(){br(this,e).delay=t}}function jr(e,t){return function(){vr(this,e).duration=+t.apply(this,arguments)}}function Br(e,t){return t=+t,function(){vr(this,e).duration=t}}var Lr=Lt.prototype.constructor;function zr(e){return function(){this.style.removeProperty(e)}}var Fr=0;function Vr(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Gr(){return++Fr}var Hr=Lt.prototype;Vr.prototype={constructor:Vr,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=Pe(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var s,l,c=r[a],u=c.length,d=i[a]=new Array(u),f=0;f<u;++f)(s=c[f])&&(l=e.call(s,s.__data__,f,c))&&("__data__"in s&&(l.__data__=s.__data__),d[f]=l,yr(d[f],t,n,f,d,wr(s,n)));return new Vr(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=je(e));for(var r=this._groups,o=r.length,i=[],a=[],s=0;s<o;++s)for(var l,c=r[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var f,p=e.call(l,l.__data__,d,c),h=wr(l,n),m=0,g=p.length;m<g;++m)(f=p[m])&&yr(f,t,n,m,p,h);i.push(p),a.push(l)}return new Vr(i,a,t,n)},selectChild:Hr.selectChild,selectChildren:Hr.selectChildren,filter:function(e){"function"!=typeof e&&(e=Le(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],s=a.length,l=r[o]=[],c=0;c<s;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new Vr(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),a=new Array(r),s=0;s<i;++s)for(var l,c=t[s],u=n[s],d=c.length,f=a[s]=new Array(d),p=0;p<d;++p)(l=c[p]||u[p])&&(f[p]=l);for(;s<r;++s)a[s]=t[s];return new Vr(a,this._parents,this._name,this._id)},selection:function(){return new Lr(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Gr(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=wr(a,t);yr(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Vr(r,this._parents,e,n)},call:Hr.call,nodes:Hr.nodes,node:Hr.node,size:Hr.size,empty:Hr.empty,each:Hr.each,on:function(e,t){var n=this._id;return arguments.length<2?wr(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,i=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?br:vr;return function(){var a=i(this,e),s=a.on;s!==r&&(o=(r=s).copy()).on(t,n),a.on=o}}(n,e,t))},attr:function(e,t){var n=Ne(e),r="transform"===n?Yn:Sr;return this.attrTween(e,"function"==typeof t?(n.local?Rr:Or)(n,r,Er(this,"attr."+e,t)):null==t?(n.local?Ir:_r)(n):(n.local?Nr:Ar)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=Ne(e);return this.tween(n,(r.local?Tr:Mr)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?Zn:Sr;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=st(this,e),a=(this.style.removeProperty(e),st(this,e));return i===a?null:i===n&&a===r?o:o=t(n=i,r=a)}}(e,r)).on("end.style."+e,zr(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var a=st(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=st(this,e)),a===l?null:a===r&&l===o?i:(o=l,i=t(r=a,s))}}(e,r,Er(this,"style."+e,t))).each(function(e,t){var n,r,o,i,a="style."+t,s="end."+a;return function(){var l=vr(this,e),c=l.on,u=null==l.value[a]?i||(i=zr(t)):void 0;c===n&&o===u||(r=(n=c).copy()).on(s,o=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var a=st(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function i(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,i,n)),r}return i._value=t,i}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(Er(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=wr(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===e)return r.value;return null}return this.each((null==t?kr:Cr)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Pr:Dr)(t,e)):wr(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?jr:Br)(t,e)):wr(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){vr(this,e).ease=t}}(t,e)):wr(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;vr(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var s={value:a},l={value:function(){0==--o&&i()}};n.each((function(){var n=vr(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===o&&i()}))},[Symbol.iterator]:Hr[Symbol.iterator]};var Wr={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function Xr(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}Lt.prototype.interrupt=function(e){return this.each((function(){xr(this,e)}))},Lt.prototype.transition=function(e){var t,n;e instanceof Vr?(t=e._id,e=e._name):(t=Gr(),(n=Wr).time=sr(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,c=0;c<l;++c)(a=s[c])&&yr(a,e,t,c,s,n||Xr(a,t));return new Vr(r,this._parents,e,t)};var $r=e=>()=>e;function Zr(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Yr(e,t,n){this.k=e,this.x=t,this.y=n}Yr.prototype={constructor:Yr,scale:function(e){return 1===e?this:new Yr(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Yr(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Ur=new Yr(1,0,0);function Jr(e){e.stopImmediatePropagation()}function Kr(e){e.preventDefault(),e.stopImmediatePropagation()}function qr(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function Qr(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function eo(){return this.__zoom||Ur}function to(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function no(){return navigator.maxTouchPoints||"ontouchstart"in this}function ro(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function oo(){var e,t,n,r=qr,o=Qr,i=ro,a=to,s=no,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,d=qn,f=Ce("start","zoom","end"),p=0,h=10;function m(e){e.property("__zoom",eo).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",C).on("dblclick.zoom",E).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",_).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Yr(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new Yr(e.k,r,o)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function v(e,t,n,r){e.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,i=arguments,a=w(e,i).event(r),s=o.apply(e,i),l=null==n?b(s):"function"==typeof n?n.apply(e,i):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,f="function"==typeof t?t.apply(e,i):t,p=d(u.invert(l).concat(c/u.k),f.invert(l).concat(c/f.k));return function(e){if(1===e)e=f;else{var t=p(e),n=c/t[2];e=new Yr(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}}))}function w(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function k(e,...t){if(r.apply(this,arguments)){var n=w(this,t).event(e),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,a.apply(this,arguments)))),u=Ft(e);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=o.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(o.k===s)return;n.mouse=[u,o.invert(u)],xr(this),n.start()}Kr(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",i(y(g(o,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function C(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,a=w(this,t,!0).event(e),s=zt(e.view).on("mousemove.zoom",(function(e){if(Kr(e),!a.moved){var t=e.clientX-u,n=e.clientY-d;a.moved=t*t+n*n>p}a.event(e).zoom("mouse",i(y(a.that.__zoom,a.mouse[0]=Ft(e,o),a.mouse[1]),a.extent,c))}),!0).on("mouseup.zoom",(function(e){s.on("mousemove.zoom mouseup.zoom",null),$t(e.view,a.moved),Kr(e),a.event(e).end()}),!0),l=Ft(e,o),u=e.clientX,d=e.clientY;Xt(e.view),Jr(e),a.mouse=[l,this.__zoom.invert(l)],xr(this),a.start()}}function E(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=Ft(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(a),l=n.k*(e.shiftKey?.5:2),d=i(y(g(n,l),a,s),o.apply(this,t),c);Kr(e),u>0?zt(this).transition().duration(u).call(v,d,a,e):zt(this).call(m.transform,d,a,e)}}function S(n,...o){if(r.apply(this,arguments)){var i,a,s,l,c=n.touches,u=c.length,d=w(this,o,n.changedTouches.length===u).event(n);for(Jr(n),a=0;a<u;++a)l=[l=Ft(s=c[a],this),this.__zoom.invert(l),s.identifier],d.touch0?d.touch1||d.touch0[2]===l[2]||(d.touch1=l,d.taps=0):(d.touch0=l,i=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),i&&(d.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),500)),xr(this),d.start())}}function _(e,...t){if(this.__zooming){var n,r,o,a,s=w(this,t).event(e),l=e.changedTouches,u=l.length;for(Kr(e),n=0;n<u;++n)o=Ft(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=o);if(r=s.that.__zoom,s.touch1){var d=s.touch0[0],f=s.touch0[1],p=s.touch1[0],h=s.touch1[1],m=(m=p[0]-d[0])*m+(m=p[1]-d[1])*m,b=(b=h[0]-f[0])*b+(b=h[1]-f[1])*b;r=g(r,Math.sqrt(m/b)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],a=[(f[0]+h[0])/2,(f[1]+h[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],a=s.touch0[1]}s.zoom("touch",i(y(r,o,a),s.extent,c))}}function I(e,...r){if(this.__zooming){var o,i,a=w(this,r).event(e),s=e.changedTouches,l=s.length;for(Jr(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<l;++o)i=s[o],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(i=Ft(i,this),Math.hypot(t[0]-i[0],t[1]-i[1])<h)){var c=zt(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return m.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",eo),e!==o?v(e,t,n,r):o.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,n,r){m.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,r)},m.scaleTo=function(e,t,n,r){m.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,a=null==n?b(e):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(a),l="function"==typeof t?t.apply(this,arguments):t;return i(y(g(r,l),a,s),e,c)}),n,r)},m.translateBy=function(e,t,n,r){m.transform(e,(function(){return i(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,r)},m.translateTo=function(e,t,n,r,a){m.transform(e,(function(){var e=o.apply(this,arguments),a=this.__zoom,s=null==r?b(e):"function"==typeof r?r.apply(this,arguments):r;return i(Ur.translate(s[0],s[1]).scale(a.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),r,a)},x.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=zt(this.that).datum();f.call(e,this.that,new Zr(e,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:f}),t)}},m.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:$r(+e),m):a},m.filter=function(e){return arguments.length?(r="function"==typeof e?e:$r(!!e),m):r},m.touchable=function(e){return arguments.length?(s="function"==typeof e?e:$r(!!e),m):s},m.extent=function(e){return arguments.length?(o="function"==typeof e?e:$r([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):o},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(i=e,m):i},m.duration=function(e){return arguments.length?(u=+e,m):u},m.interpolate=function(e){return arguments.length?(d=e,m):d},m.on=function(){var e=f.on.apply(f,arguments);return e===f?m:e},m.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,m):Math.sqrt(p)},m.tapDistance=function(e){return arguments.length?(h=+e,m):h},m}Yr.prototype;const io=i(null),ao=io.Provider,so=()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",lo=e=>`Node type "${e}" not found. Using fallback type "default".`,co=()=>"The React Flow parent container needs a width and a height to render the graph.",uo=()=>"Only child nodes can use a parent extent.",fo=()=>"Can't create edge. An edge needs a source and a target.",po=e=>`Marker type "${e}" doesn't exist.`,ho=(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,mo=()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",go=e=>`Edge type "${e}" not found. Using fallback type "default".`,yo=e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,bo=(()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001")();function vo(e,t){const n=o(io);if(null===n)throw new Error(bo);return ve(n,e,t)}const wo=()=>{const e=o(io);if(null===e)throw new Error(bo);return a((()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy})),[e])},xo=e=>e.userSelectionActive?"none":"all";function ko({position:e,children:n,className:r,style:o,...i}){const a=vo(xo),s=`${e}`.split("-");return t.createElement("div",{className:me(["react-flow__panel",r,...s]),style:{...o,pointerEvents:a},...i},n)}function Co({proOptions:e,position:n="bottom-right"}){return e?.hideAttribution?null:t.createElement(ko,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},t.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}var Eo=n((({x:e,y:n,label:r,labelStyle:o={},labelShowBg:i=!0,labelBgStyle:a={},labelBgPadding:l=[2,4],labelBgBorderRadius:d=2,children:f,className:p,...h})=>{const m=u(null),[g,y]=c({x:0,y:0,width:0,height:0}),b=me(["react-flow__edge-textwrapper",p]);return s((()=>{if(m.current){const e=m.current.getBBox();y({x:e.x,y:e.y,width:e.width,height:e.height})}}),[r]),void 0!==r&&r?t.createElement("g",{transform:`translate(${e-g.width/2} ${n-g.height/2})`,className:b,visibility:g.width?"visible":"hidden",...h},i&&t.createElement("rect",{width:g.width+2*l[0],x:-l[0],y:-l[1],height:g.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:d,ry:d}),t.createElement("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:m,style:o},r),f):null}));const So=e=>({width:e.offsetWidth,height:e.offsetHeight}),_o=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Io=(e={x:0,y:0},t)=>({x:_o(e.x,t[0][0],t[1][0]),y:_o(e.y,t[0][1],t[1][1])}),Ao=(e,t,n)=>e<t?_o(Math.abs(e-t),1,50)/50:e>n?-_o(Math.abs(e-n),1,50)/50:0,No=(e,t)=>[20*Ao(e.x,35,t.width-35),20*Ao(e.y,35,t.height-35)],Oo=e=>e.getRootNode?.()||window?.document,Ro=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),To=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Mo=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),Po=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),Do=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},jo=e=>!isNaN(e)&&isFinite(e),Bo=Symbol.for("internals"),Lo=["Enter"," ","Escape"],zo=(e,t)=>{"development"===process.env.NODE_ENV&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)};function Fo(e){const t=(e=>"nativeEvent"in e)(e)?e.nativeEvent:e,n=t.composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable")||!!n?.closest(".nokey")}const Vo=e=>"clientX"in e,Go=(e,t)=>{const n=Vo(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},Ho=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0,Wo=({id:e,path:n,labelX:r,labelY:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h=20})=>t.createElement(t.Fragment,null,t.createElement("path",{id:e,style:d,d:n,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:p}),h&&t.createElement("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),i&&jo(r)&&jo(o)?t.createElement(Eo,{x:r,y:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u}):null);function Xo(e,t,n){return void 0===n?n:r=>{const o=t().edges.find((t=>t.id===e));o&&n(r,{...o})}}function $o({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,a=Math.abs(r-t)/2;return[i,r<t?r+a:r-a,o,a]}function Zo({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:a,targetControlY:s}){const l=.125*e+.375*o+.375*a+.125*n,c=.125*t+.375*i+.375*s+.125*r;return[l,c,Math.abs(l-e),Math.abs(c-t)]}var Yo,Uo,Jo,Ko,qo,Qo;function ei({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===Qo.Left||e===Qo.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function ti({sourceX:e,sourceY:t,sourcePosition:n=Qo.Bottom,targetX:r,targetY:o,targetPosition:i=Qo.Top}){const[a,s]=ei({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,c]=ei({pos:i,x1:r,y1:o,x2:e,y2:t}),[u,d,f,p]=Zo({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:s,targetControlX:l,targetControlY:c});return[`M${e},${t} C${a},${s} ${l},${c} ${r},${o}`,u,d,f,p]}Wo.displayName="BaseEdge",function(e){e.Strict="strict",e.Loose="loose"}(Yo||(Yo={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(Uo||(Uo={})),function(e){e.Partial="partial",e.Full="full"}(Jo||(Jo={})),function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(Ko||(Ko={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(qo||(qo={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(Qo||(Qo={}));const ni=n((({sourceX:e,sourceY:n,targetX:r,targetY:o,sourcePosition:i=Qo.Bottom,targetPosition:a=Qo.Top,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:g})=>{const[y,b,v]=ti({sourceX:e,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:a});return t.createElement(Wo,{path:y,labelX:b,labelY:v,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:g})}));ni.displayName="SimpleBezierEdge";const ri={[Qo.Left]:{x:-1,y:0},[Qo.Right]:{x:1,y:0},[Qo.Top]:{x:0,y:-1},[Qo.Bottom]:{x:0,y:1}},oi=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function ii({source:e,sourcePosition:t=Qo.Bottom,target:n,targetPosition:r=Qo.Top,center:o,offset:i}){const a=ri[t],s=ri[r],l={x:e.x+a.x*i,y:e.y+a.y*i},c={x:n.x+s.x*i,y:n.y+s.y*i},u=(({source:e,sourcePosition:t=Qo.Bottom,target:n})=>t===Qo.Left||t===Qo.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1})({source:l,sourcePosition:t,target:c}),d=0!==u.x?"x":"y",f=u[d];let p,h,m=[];const g={x:0,y:0},y={x:0,y:0},[b,v,w,x]=$o({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]==-1){p=o.x??b,h=o.y??v;const e=[{x:p,y:l.y},{x:p,y:c.y}],t=[{x:l.x,y:h},{x:c.x,y:h}];m=a[d]===f?"x"===d?e:t:"x"===d?t:e}else{const o=[{x:l.x,y:c.y}],u=[{x:c.x,y:l.y}];if(m="x"===d?a.x===f?u:o:a.y===f?o:u,t===r){const t=Math.abs(e[d]-n[d]);if(t<=i){const r=Math.min(i-1,i-t);a[d]===f?g[d]=(l[d]>e[d]?-1:1)*r:y[d]=(c[d]>n[d]?-1:1)*r}}if(t!==r){const e="x"===d?"y":"x",t=a[d]===s[e],n=l[e]>c[e],r=l[e]<c[e];(1===a[d]&&(!t&&n||t&&r)||1!==a[d]&&(!t&&r||t&&n))&&(m="x"===d?o:u)}const b={x:l.x+g.x,y:l.y+g.y},v={x:c.x+y.x,y:c.y+y.y};Math.max(Math.abs(b.x-m[0].x),Math.abs(v.x-m[0].x))>=Math.max(Math.abs(b.y-m[0].y),Math.abs(v.y-m[0].y))?(p=(b.x+v.x)/2,h=m[0].y):(p=m[0].x,h=(b.y+v.y)/2)}return[[e,{x:l.x+g.x,y:l.y+g.y},...m,{x:c.x+y.x,y:c.y+y.y},n],p,h,w,x]}function ai({sourceX:e,sourceY:t,sourcePosition:n=Qo.Bottom,targetX:r,targetY:o,targetPosition:i=Qo.Top,borderRadius:a=5,centerX:s,centerY:l,offset:c=20}){const[u,d,f,p,h]=ii({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:s,y:l},offset:c}),m=u.reduce(((e,t,n)=>{let r="";return r=n>0&&n<u.length-1?function(e,t,n,r){const o=Math.min(oi(e,t)/2,oi(t,n)/2,r),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a)return`L ${i+o*(e.x<n.x?-1:1)},${a}Q ${i},${a} ${i},${a+o*(e.y<n.y?1:-1)}`;const s=e.x<n.x?1:-1;return`L ${i},${a+o*(e.y<n.y?-1:1)}Q ${i},${a} ${i+o*s},${a}`}(u[n-1],t,u[n+1],a):`${0===n?"M":"L"}${t.x} ${t.y}`,e+=r}),"");return[m,d,f,p,h]}const si=n((({sourceX:e,sourceY:n,targetX:r,targetY:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,sourcePosition:f=Qo.Bottom,targetPosition:p=Qo.Top,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[b,v,w]=ai({sourceX:e,sourceY:n,sourcePosition:f,targetX:r,targetY:o,targetPosition:p,borderRadius:g?.borderRadius,offset:g?.offset});return t.createElement(Wo,{path:b,labelX:v,labelY:w,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:m,interactionWidth:y})}));si.displayName="SmoothStepEdge";const li=n((e=>t.createElement(si,{...e,pathOptions:a((()=>({borderRadius:0,offset:e.pathOptions?.offset})),[e.pathOptions?.offset])})));li.displayName="StepEdge";const ci=n((({sourceX:e,sourceY:n,targetX:r,targetY:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h})=>{const[m,g,y]=function({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,a,s]=$o({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,a,s]}({sourceX:e,sourceY:n,targetX:r,targetY:o});return t.createElement(Wo,{path:m,labelX:g,labelY:y,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h})}));function ui(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function di({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case Qo.Left:return[t-ui(t-r,i),n];case Qo.Right:return[t+ui(r-t,i),n];case Qo.Top:return[t,n-ui(n-o,i)];case Qo.Bottom:return[t,n+ui(o-n,i)]}}function fi({sourceX:e,sourceY:t,sourcePosition:n=Qo.Bottom,targetX:r,targetY:o,targetPosition:i=Qo.Top,curvature:a=.25}){const[s,l]=di({pos:n,x1:e,y1:t,x2:r,y2:o,c:a}),[c,u]=di({pos:i,x1:r,y1:o,x2:e,y2:t,c:a}),[d,f,p,h]=Zo({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${s},${l} ${c},${u} ${r},${o}`,d,f,p,h]}ci.displayName="StraightEdge";const pi=n((({sourceX:e,sourceY:n,targetX:r,targetY:o,sourcePosition:i=Qo.Bottom,targetPosition:a=Qo.Top,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[b,v,w]=fi({sourceX:e,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:a,curvature:g?.curvature});return t.createElement(Wo,{path:b,labelX:v,labelY:w,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:y})}));pi.displayName="BezierEdge";const hi=i(null),mi=hi.Provider;hi.Consumer;const gi=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,yi=(e,t)=>{if(void 0===e)return"";if("string"==typeof e)return e;return`${t?`${t}__`:""}${Object.keys(e).sort().map((t=>`${t}=${e[t]}`)).join("&")}`},bi=({x:e,y:t},[n,r,o],i,[a,s])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l},vi=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),wi=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},xi=(e,t=[0,0])=>{if(0===e.length)return{x:0,y:0,width:0,height:0};const n=e.reduce(((e,n)=>{const{x:r,y:o}=wi(n,t).positionAbsolute;return Ro(e,To({x:r,y:o,width:n.width||0,height:n.height||0}))}),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Mo(n)},ki=(e,t,[n,r,o]=[0,0,1],i=!1,a=!1,s=[0,0])=>{const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},c=[];return e.forEach((e=>{const{width:t,height:n,selectable:r=!0,hidden:o=!1}=e;if(a&&!r||o)return!1;const{positionAbsolute:u}=wi(e,s),d={x:u.x,y:u.y,width:t||0,height:n||0},f=Do(l,d);(void 0===t||void 0===n||null===t||null===n||i&&f>0||f>=(t||0)*(n||0)||e.dragging)&&c.push(e)})),c},Ci=(e,t)=>{const n=e.map((e=>e.id));return t.filter((e=>n.includes(e.source)||n.includes(e.target)))},Ei=(e,t,n,r,o,i=.1)=>{const a=t/(e.width*(1+i)),s=n/(e.height*(1+i)),l=Math.min(a,s),c=_o(l,r,o);return{x:t/2-(e.x+e.width/2)*c,y:n/2-(e.y+e.height/2)*c,zoom:c}},Si=(e,t=0)=>e.transition().duration(t);function _i(e,t,n,r){return(t[n]||[]).reduce(((t,o)=>(`${e.id}-${o.id}-${n}`!==r&&t.push({id:o.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+o.x+o.width/2,y:(e.positionAbsolute?.y??0)+o.y+o.height/2}),t)),[])}const Ii={source:null,target:null,sourceHandle:null,targetHandle:null},Ai=()=>({handleDomNode:null,isValid:!1,connection:Ii,endHandle:null});function Ni(e,t,n,r,o,i,a){const s="target"===o,l=a.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),c={...Ai(),handleDomNode:l};if(l){const e=Oi(void 0,l),o=l.getAttribute("data-nodeid"),a=l.getAttribute("data-handleid"),u=l.classList.contains("connectable"),d=l.classList.contains("connectableend"),f={source:s?o:n,sourceHandle:s?a:r,target:s?n:o,targetHandle:s?r:a};c.connection=f;u&&d&&(t===Yo.Strict?s&&"source"===e||!s&&"target"===e:o!==n||a!==r)&&(c.endHandle={nodeId:o,handleId:a,type:e},c.isValid=i(f))}return c}function Oi(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Ri(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function Ti(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function Mi({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:a,isValidConnection:s,edgeUpdaterType:l,onReconnectEnd:c}){const u=Oo(e.target),{connectionMode:d,domNode:f,autoPanOnConnect:p,connectionRadius:h,onConnectStart:m,panBy:g,getNodes:y,cancelConnection:b}=i();let v,w=0;const{x:x,y:k}=Go(e),C=u?.elementFromPoint(x,k),E=Oi(l,C),S=f?.getBoundingClientRect();if(!S||!E)return;let _,I=Go(e,S),A=!1,N=null,O=!1,R=null;const T=function({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce(((e,o)=>{if(o[Bo]){const{handleBounds:i}=o[Bo];let a=[],s=[];i&&(a=_i(o,i,"source",`${t}-${n}-${r}`),s=_i(o,i,"target",`${t}-${n}-${r}`)),e.push(...a,...s)}return e}),[])}({nodes:y(),nodeId:n,handleId:t,handleType:E}),M=()=>{if(!p)return;const[e,t]=No(I,S);g({x:e,y:t}),w=requestAnimationFrame(M)};function P(e){const{transform:r}=i();I=Go(e,S);const{handle:l,validHandleResult:c}=function(e,t,n,r,o,i){const{x:a,y:s}=Go(e),l=t.elementsFromPoint(a,s).find((e=>e.classList.contains("react-flow__handle")));if(l){const e=l.getAttribute("data-nodeid");if(e){const t=Oi(void 0,l),r=l.getAttribute("data-handleid"),a=i({nodeId:e,id:r,type:t});if(a){const i=o.find((n=>n.nodeId===e&&n.type===t&&n.id===r));return{handle:{id:r,type:t,nodeId:e,x:i?.x||n.x,y:i?.y||n.y},validHandleResult:a}}}}let c=[],u=1/0;if(o.forEach((e=>{const t=Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2);if(t<=r){const n=i(e);t<=u&&(t<u?c=[{handle:e,validHandleResult:n}]:t===u&&c.push({handle:e,validHandleResult:n}),u=t)}})),!c.length)return{handle:null,validHandleResult:Ai()};if(1===c.length)return c[0];const d=c.some((({validHandleResult:e})=>e.isValid)),f=c.some((({handle:e})=>"target"===e.type));return c.find((({handle:e,validHandleResult:t})=>f?"target"===e.type:!d||t.isValid))||c[0]}(e,u,bi(I,r,!1,[1,1]),h,T,(e=>Ni(e,d,n,t,o?"target":"source",s,u)));if(v=l,A||(M(),A=!0),R=c.handleDomNode,N=c.connection,O=c.isValid,a({connectionPosition:v&&O?vi({x:v.x,y:v.y},r):I,connectionStatus:Ti(!!v,O),connectionEndHandle:c.endHandle}),!v&&!O&&!R)return Ri(_);N.source!==N.target&&R&&(Ri(_),_=R,R.classList.add("connecting","react-flow__handle-connecting"),R.classList.toggle("valid",O),R.classList.toggle("react-flow__handle-valid",O))}function D(e){(v||R)&&N&&O&&r?.(N),i().onConnectEnd?.(e),l&&c?.(e),Ri(_),b(),cancelAnimationFrame(w),A=!1,O=!1,N=null,R=null,u.removeEventListener("mousemove",P),u.removeEventListener("mouseup",D),u.removeEventListener("touchmove",P),u.removeEventListener("touchend",D)}a({connectionPosition:I,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:E,connectionStartHandle:{nodeId:n,handleId:t,type:E},connectionEndHandle:null}),m?.(e,{nodeId:n,handleId:t,handleType:E}),u.addEventListener("mousemove",P),u.addEventListener("mouseup",D),u.addEventListener("touchmove",P),u.addEventListener("touchend",D)}const Pi=()=>!0,Di=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),ji=r((({type:e="source",position:n=Qo.Top,isValidConnection:r,isConnectable:i=!0,isConnectableStart:a=!0,isConnectableEnd:s=!0,id:l,onConnect:c,children:u,className:d,onMouseDown:f,onTouchStart:p,...h},m)=>{const g=l||null,y="target"===e,b=wo(),v=o(hi),{connectOnClick:w,noPanClassName:x}=vo(Di,xe),{connecting:k,clickConnecting:C}=vo(((e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:i,connectionClickStartHandle:a}=r;return{connecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n||i?.nodeId===e&&i?.handleId===t&&i?.type===n,clickConnecting:a?.nodeId===e&&a?.handleId===t&&a?.type===n}})(v,g,e),xe);v||b.getState().onError?.("010",mo());const E=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=b.getState(),o={...t,...e};if(r){const{edges:e,setEdges:t}=b.getState();t(((e,t)=>{if(!e.source||!e.target)return zo("006",fo()),t;let n;return n=(e=>"id"in e&&"source"in e&&"target"in e)(e)?{...e}:{...e,id:gi(e)},((e,t)=>t.some((t=>!(t.source!==e.source||t.target!==e.target||t.sourceHandle!==e.sourceHandle&&(t.sourceHandle||e.sourceHandle)||t.targetHandle!==e.targetHandle&&(t.targetHandle||e.targetHandle)))))(n,t)?t:t.concat(n)})(o,e))}n?.(o),c?.(o)},S=e=>{if(!v)return;const t=Vo(e);a&&(t&&0===e.button||!t)&&Mi({event:e,handleId:g,nodeId:v,onConnect:E,isTarget:y,getState:b.getState,setState:b.setState,isValidConnection:r||b.getState().isValidConnection||Pi}),t?f?.(e):p?.(e)};return t.createElement("div",{"data-handleid":g,"data-nodeid":v,"data-handlepos":n,"data-id":`${v}-${g}-${e}`,className:me(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,d,{source:!y,target:y,connectable:i,connectablestart:a,connectableend:s,connecting:C,connectionindicator:i&&(a&&!k||s&&k)}]),onMouseDown:S,onTouchStart:S,onClick:w?t=>{const{onClickConnectStart:n,onClickConnectEnd:o,connectionClickStartHandle:i,connectionMode:s,isValidConnection:l}=b.getState();if(!v||!i&&!a)return;if(!i)return n?.(t,{nodeId:v,handleId:g,handleType:e}),void b.setState({connectionClickStartHandle:{nodeId:v,type:e,handleId:g}});const c=Oo(t.target),u=r||l||Pi,{connection:d,isValid:f}=Ni({nodeId:v,id:g,type:e},s,i.nodeId,i.handleId||null,i.type,u,c);f&&E(d),o?.(t),b.setState({connectionClickStartHandle:null})}:void 0,ref:m,...h},u)}));ji.displayName="Handle";var Bi=n(ji);const Li=({data:e,isConnectable:n,targetPosition:r=Qo.Top,sourcePosition:o=Qo.Bottom})=>t.createElement(t.Fragment,null,t.createElement(Bi,{type:"target",position:r,isConnectable:n}),e?.label,t.createElement(Bi,{type:"source",position:o,isConnectable:n}));Li.displayName="DefaultNode";var zi=n(Li);const Fi=({data:e,isConnectable:n,sourcePosition:r=Qo.Bottom})=>t.createElement(t.Fragment,null,e?.label,t.createElement(Bi,{type:"source",position:r,isConnectable:n}));Fi.displayName="InputNode";var Vi=n(Fi);const Gi=({data:e,isConnectable:n,targetPosition:r=Qo.Top})=>t.createElement(t.Fragment,null,t.createElement(Bi,{type:"target",position:r,isConnectable:n}),e?.label);Gi.displayName="OutputNode";var Hi=n(Gi);const Wi=()=>null;Wi.displayName="GroupNode";const Xi=e=>({selectedNodes:e.getNodes().filter((e=>e.selected)),selectedEdges:e.edges.filter((e=>e.selected)).map((e=>({...e})))}),$i=e=>e.id;function Zi(e,t){return xe(e.selectedNodes.map($i),t.selectedNodes.map($i))&&xe(e.selectedEdges.map($i),t.selectedEdges.map($i))}const Yi=n((({onSelectionChange:e})=>{const t=wo(),{selectedNodes:n,selectedEdges:r}=vo(Xi,Zi);return s((()=>{const o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChange.forEach((e=>e(o)))}),[n,r,e]),null}));Yi.displayName="SelectionListener";const Ui=e=>!!e.onSelectionChange;function Ji({onSelectionChange:e}){const n=vo(Ui);return e||n?t.createElement(Yi,{onSelectionChange:e}):null}const Ki=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function qi(e,t){s((()=>{void 0!==e&&t(e)}),[e])}function Qi(e,t,n){s((()=>{void 0!==t&&n({[e]:t})}),[t])}const ea=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:a,onClickConnectStart:l,onClickConnectEnd:c,nodesDraggable:u,nodesConnectable:d,nodesFocusable:f,edgesFocusable:p,edgesUpdatable:h,elevateNodesOnSelect:m,minZoom:g,maxZoom:y,nodeExtent:b,onNodesChange:v,onEdgesChange:w,elementsSelectable:x,connectionMode:k,snapGrid:C,snapToGrid:E,translateExtent:S,connectOnClick:_,defaultEdgeOptions:I,fitView:A,fitViewOptions:N,onNodesDelete:O,onEdgesDelete:R,onNodeDrag:T,onNodeDragStart:M,onNodeDragStop:P,onSelectionDrag:D,onSelectionDragStart:j,onSelectionDragStop:B,noPanClassName:L,nodeOrigin:z,rfId:F,autoPanOnConnect:V,autoPanOnNodeDrag:G,onError:H,connectionRadius:W,isValidConnection:X,nodeDragThreshold:$})=>{const{setNodes:Z,setEdges:Y,setDefaultNodesAndEdges:U,setMinZoom:J,setMaxZoom:K,setTranslateExtent:q,setNodeExtent:Q,reset:ee}=vo(Ki,xe),te=wo();return s((()=>{const e=r?.map((e=>({...e,...I})));return U(n,e),()=>{ee()}}),[]),Qi("defaultEdgeOptions",I,te.setState),Qi("connectionMode",k,te.setState),Qi("onConnect",o,te.setState),Qi("onConnectStart",i,te.setState),Qi("onConnectEnd",a,te.setState),Qi("onClickConnectStart",l,te.setState),Qi("onClickConnectEnd",c,te.setState),Qi("nodesDraggable",u,te.setState),Qi("nodesConnectable",d,te.setState),Qi("nodesFocusable",f,te.setState),Qi("edgesFocusable",p,te.setState),Qi("edgesUpdatable",h,te.setState),Qi("elementsSelectable",x,te.setState),Qi("elevateNodesOnSelect",m,te.setState),Qi("snapToGrid",E,te.setState),Qi("snapGrid",C,te.setState),Qi("onNodesChange",v,te.setState),Qi("onEdgesChange",w,te.setState),Qi("connectOnClick",_,te.setState),Qi("fitViewOnInit",A,te.setState),Qi("fitViewOnInitOptions",N,te.setState),Qi("onNodesDelete",O,te.setState),Qi("onEdgesDelete",R,te.setState),Qi("onNodeDrag",T,te.setState),Qi("onNodeDragStart",M,te.setState),Qi("onNodeDragStop",P,te.setState),Qi("onSelectionDrag",D,te.setState),Qi("onSelectionDragStart",j,te.setState),Qi("onSelectionDragStop",B,te.setState),Qi("noPanClassName",L,te.setState),Qi("nodeOrigin",z,te.setState),Qi("rfId",F,te.setState),Qi("autoPanOnConnect",V,te.setState),Qi("autoPanOnNodeDrag",G,te.setState),Qi("onError",H,te.setState),Qi("connectionRadius",W,te.setState),Qi("isValidConnection",X,te.setState),Qi("nodeDragThreshold",$,te.setState),qi(e,Z),qi(t,Y),qi(g,J),qi(y,K),qi(S,q),qi(b,Q),null},ta={display:"none"},na={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},ra="react-flow__node-desc",oa="react-flow__edge-desc",ia=e=>e.ariaLiveMessage;function aa({rfId:e}){const n=vo(ia);return t.createElement("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:na},n)}function sa({rfId:e,disableKeyboardA11y:n}){return t.createElement(t.Fragment,null,t.createElement("div",{id:`${ra}-${e}`,style:ta},"Press enter or space to select a node.",!n&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),t.createElement("div",{id:`${oa}-${e}`,style:ta},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!n&&t.createElement(aa,{rfId:e}))}var la=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=c(!1),o=u(!1),i=u(new Set([])),[l,d]=a((()=>{if(null!==e){const t=(Array.isArray(e)?e:[e]).filter((e=>"string"==typeof e)).map((e=>e.split("+"))),n=t.reduce(((e,t)=>e.concat(...t)),[]);return[t,n]}return[[],[]]}),[e]);return s((()=>{const n="undefined"!=typeof document?document:null,a=t?.target||n;if(null!==e){const e=e=>{o.current=e.ctrlKey||e.metaKey||e.shiftKey;if((!o.current||o.current&&!t.actInsideInputWithModifier)&&Fo(e))return!1;const n=ua(e.code,d);i.current.add(e[n]),ca(l,i.current,!1)&&(e.preventDefault(),r(!0))},n=e=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&Fo(e))return!1;const n=ua(e.code,d);ca(l,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(e[n]),"Meta"===e.key&&i.current.clear(),o.current=!1},s=()=>{i.current.clear(),r(!1)};return a?.addEventListener("keydown",e),a?.addEventListener("keyup",n),window.addEventListener("blur",s),()=>{a?.removeEventListener("keydown",e),a?.removeEventListener("keyup",n),window.removeEventListener("blur",s)}}}),[e,r]),n};function ca(e,t,n){return e.filter((e=>n||e.length===t.size)).some((e=>e.every((e=>t.has(e)))))}function ua(e,t){return t.includes(e)?"code":"key"}function da(e,t,n,r){const o=e.parentNode||e.parentId;if(!o)return n;const i=t.get(o),a=wi(i,r);return da(i,t,{x:(n.x??0)+a.x,y:(n.y??0)+a.y,z:(i[Bo]?.z??0)>(n.z??0)?i[Bo]?.z??0:n.z??0},r)}function fa(e,t,n){e.forEach((r=>{const o=r.parentNode||r.parentId;if(o&&!e.has(o))throw new Error(`Parent node ${o} not found`);if(o||n?.[r.id]){const{x:o,y:i,z:a}=da(r,e,{...r.position,z:r[Bo]?.z??0},t);r.positionAbsolute={x:o,y:i},r[Bo].z=a,n?.[r.id]&&(r[Bo].isParent=!0)}}))}function pa(e,t,n,r){const o=new Map,i={},a=r?1e3:0;return e.forEach((e=>{const n=(jo(e.zIndex)?e.zIndex:0)+(e.selected?a:0),r=t.get(e.id),s={...e,positionAbsolute:{x:e.position.x,y:e.position.y}},l=e.parentNode||e.parentId;l&&(i[l]=!0);const c=r?.type&&r?.type!==e.type;Object.defineProperty(s,Bo,{enumerable:!1,value:{handleBounds:c?void 0:r?.[Bo]?.handleBounds,z:n}}),o.set(e.id,s)})),fa(o,n,i),o}function ha(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:a,d3Zoom:s,d3Selection:l,fitViewOnInitDone:c,fitViewOnInit:u,nodeOrigin:d}=e(),f=t.initial&&!c&&u;if(s&&l&&(f||!t.initial)){const e=n().filter((e=>{const n=t.includeHiddenNodes?e.width&&e.height:!e.hidden;return t.nodes?.length?n&&t.nodes.some((t=>t.id===e.id)):n})),c=e.every((e=>e.width&&e.height));if(e.length>0&&c){const n=xi(e,d),{x:c,y:u,zoom:f}=Ei(n,r,o,t.minZoom??i,t.maxZoom??a,t.padding??.1),p=Ur.translate(c,u).scale(f);return"number"==typeof t.duration&&t.duration>0?s.transform(Si(l,t.duration),p):s.transform(l,p),!0}}return!1}function ma(e,t){return e.forEach((e=>{const n=t.get(e.id);n&&t.set(n.id,{...n,[Bo]:n[Bo],selected:e.selected})})),new Map(t)}function ga(e,t){return t.map((t=>{const n=e.find((e=>e.id===t.id));return n&&(t.selected=n.selected),t}))}function ya({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:a,onEdgesChange:s,hasDefaultNodes:l,hasDefaultEdges:c}=n();e?.length&&(l&&r({nodeInternals:ma(e,o)}),a?.(e)),t?.length&&(c&&r({edges:ga(t,i)}),s?.(t))}const ba=()=>{},va={zoomIn:ba,zoomOut:ba,zoomTo:ba,getZoom:()=>1,setViewport:ba,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:ba,fitBounds:ba,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},wa=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection});function xa(){const e=(()=>{const e=wo(),{d3Zoom:t,d3Selection:n}=vo(wa,xe),r=a((()=>n&&t?{zoomIn:e=>t.scaleBy(Si(n,e?.duration),1.2),zoomOut:e=>t.scaleBy(Si(n,e?.duration),1/1.2),zoomTo:(e,r)=>t.scaleTo(Si(n,r?.duration),e),getZoom:()=>e.getState().transform[2],setViewport:(r,o)=>{const[i,a,s]=e.getState().transform,l=Ur.translate(r.x??i,r.y??a).scale(r.zoom??s);t.transform(Si(n,o?.duration),l)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>ha(e.getState,t),setCenter:(r,o,i)=>{const{width:a,height:s,maxZoom:l}=e.getState(),c=void 0!==i?.zoom?i.zoom:l,u=a/2-r*c,d=s/2-o*c,f=Ur.translate(u,d).scale(c);t.transform(Si(n,i?.duration),f)},fitBounds:(r,o)=>{const{width:i,height:a,minZoom:s,maxZoom:l}=e.getState(),{x:c,y:u,zoom:d}=Ei(r,i,a,s,l,o?.padding??.1),f=Ur.translate(c,u).scale(d);t.transform(Si(n,o?.duration),f)},project:t=>{const{transform:n,snapToGrid:r,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),bi(t,n,r,o)},screenToFlowPosition:t=>{const{transform:n,snapToGrid:r,snapGrid:o,domNode:i}=e.getState();if(!i)return t;const{x:a,y:s}=i.getBoundingClientRect(),l={x:t.x-a,y:t.y-s};return bi(l,n,r,o)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),a=vi(t,n);return{x:a.x+o,y:a.y+i}},viewportInitialized:!0}:va),[t,n]);return r})(),t=wo(),n=l((()=>t.getState().getNodes().map((e=>({...e})))),[]),r=l((e=>t.getState().nodeInternals.get(e)),[]),o=l((()=>{const{edges:e=[]}=t.getState();return e.map((e=>({...e})))}),[]),i=l((e=>{const{edges:n=[]}=t.getState();return n.find((t=>t.id===e))}),[]),s=l((e=>{const{getNodes:n,setNodes:r,hasDefaultNodes:o,onNodesChange:i}=t.getState(),a=n(),s="function"==typeof e?e(a):e;if(o)r(s);else if(i){const e=0===s.length?a.map((e=>({type:"remove",id:e.id}))):s.map((e=>({item:e,type:"reset"})));i(e)}}),[]),c=l((e=>{const{edges:n=[],setEdges:r,hasDefaultEdges:o,onEdgesChange:i}=t.getState(),a="function"==typeof e?e(n):e;if(o)r(a);else if(i){i(0===a.length?n.map((e=>({type:"remove",id:e.id}))):a.map((e=>({item:e,type:"reset"}))))}}),[]),u=l((e=>{const n=Array.isArray(e)?e:[e],{getNodes:r,setNodes:o,hasDefaultNodes:i,onNodesChange:a}=t.getState();if(i){o([...r(),...n])}else if(a){const e=n.map((e=>({item:e,type:"add"})));a(e)}}),[]),d=l((e=>{const n=Array.isArray(e)?e:[e],{edges:r=[],setEdges:o,hasDefaultEdges:i,onEdgesChange:a}=t.getState();if(i)o([...r,...n]);else if(a){a(n.map((e=>({item:e,type:"add"}))))}}),[]),f=l((()=>{const{getNodes:e,edges:n=[],transform:r}=t.getState(),[o,i,a]=r;return{nodes:e().map((e=>({...e}))),edges:n.map((e=>({...e}))),viewport:{x:o,y:i,zoom:a}}}),[]),p=l((({nodes:e,edges:n})=>{const{nodeInternals:r,getNodes:o,edges:i,hasDefaultNodes:a,hasDefaultEdges:s,onNodesDelete:l,onEdgesDelete:c,onNodesChange:u,onEdgesChange:d}=t.getState(),f=(e||[]).map((e=>e.id)),p=(n||[]).map((e=>e.id)),h=o().reduce(((e,t)=>{const n=t.parentNode||t.parentId,r=!f.includes(t.id)&&n&&e.find((e=>e.id===n));return("boolean"!=typeof t.deletable||t.deletable)&&(f.includes(t.id)||r)&&e.push(t),e}),[]),m=i.filter((e=>"boolean"!=typeof e.deletable||e.deletable)),g=m.filter((e=>p.includes(e.id)));if(h||g){const e=Ci(h,m),n=[...g,...e],o=n.reduce(((e,t)=>(e.includes(t.id)||e.push(t.id),e)),[]);if((s||a)&&(s&&t.setState({edges:i.filter((e=>!o.includes(e.id)))}),a&&(h.forEach((e=>{r.delete(e.id)})),t.setState({nodeInternals:new Map(r)}))),o.length>0&&(c?.(n),d&&d(o.map((e=>({id:e,type:"remove"}))))),h.length>0&&(l?.(h),u)){u(h.map((e=>({id:e.id,type:"remove"}))))}}}),[]),h=l((e=>{const n=jo((r=e).width)&&jo(r.height)&&jo(r.x)&&jo(r.y);var r;const o=n?null:t.getState().nodeInternals.get(e.id);if(!n&&!o)return[null,null,n];return[n?e:Po(o),o,n]}),[]),m=l(((e,n=!0,r)=>{const[o,i,a]=h(e);return o?(r||t.getState().getNodes()).filter((e=>{if(!(a||e.id!==i.id&&e.positionAbsolute))return!1;const t=Po(e),r=Do(t,o);return n&&r>0||r>=o.width*o.height})):[]}),[]),g=l(((e,t,n=!0)=>{const[r]=h(e);if(!r)return!1;const o=Do(r,t);return n&&o>0||o>=r.width*r.height}),[]);return a((()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:s,setEdges:c,addNodes:u,addEdges:d,toObject:f,deleteElements:p,getIntersectingNodes:m,isNodeIntersecting:g})),[e,n,r,o,i,s,c,u,d,f,p,m,g])}const ka={actInsideInputWithModifier:!1};const Ca={position:"absolute",width:"100%",height:"100%",top:0,left:0},Ea=e=>({x:e.x,y:e.y,zoom:e.k}),Sa=(e,t)=>e.target.closest(`.${t}`),_a=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),Ia=e=>{const t=e.ctrlKey&&Ho()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t},Aa=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),Na=({onMove:e,onMoveStart:n,onMoveEnd:r,onPaneContextMenu:o,zoomOnScroll:i=!0,zoomOnPinch:a=!0,panOnScroll:l=!1,panOnScrollSpeed:c=.5,panOnScrollMode:d=Uo.Free,zoomOnDoubleClick:f=!0,elementsSelectable:p,panOnDrag:h=!0,defaultViewport:m,translateExtent:g,minZoom:y,maxZoom:b,zoomActivationKeyCode:v,preventScrolling:w=!0,children:x,noWheelClassName:k,noPanClassName:C})=>{const E=u(),S=wo(),_=u(!1),I=u(!1),A=u(null),N=u({x:0,y:0,zoom:0}),{d3Zoom:O,d3Selection:R,d3ZoomHandler:T,userSelectionActive:M}=vo(Aa,xe),P=la(v),D=u(0),j=u(!1),B=u();return function(e){const t=wo();s((()=>{let n;const r=()=>{if(!e.current)return;const n=So(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004",co()),t.setState({width:n.width||500,height:n.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver((()=>r())),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}}),[])}(A),s((()=>{if(A.current){const e=A.current.getBoundingClientRect(),t=oo().scaleExtent([y,b]).translateExtent(g),n=zt(A.current).call(t),r=Ur.translate(m.x,m.y).scale(_o(m.zoom,y,b)),o=[[0,0],[e.width,e.height]],i=t.constrain()(r,o,g);t.transform(n,i),t.wheelDelta(Ia),S.setState({d3Zoom:t,d3Selection:n,d3ZoomHandler:n.on("wheel.zoom"),transform:[i.x,i.y,i.k],domNode:A.current.closest(".react-flow")})}}),[]),s((()=>{R&&O&&(!l||P||M?void 0!==T&&R.on("wheel.zoom",(function(e,t){if(!w&&"wheel"===e.type&&!e.ctrlKey||Sa(e,k))return null;e.preventDefault(),T.call(this,e,t)}),{passive:!1}):R.on("wheel.zoom",(t=>{if(Sa(t,k))return!1;t.preventDefault(),t.stopImmediatePropagation();const o=R.property("__zoom").k||1;if(t.ctrlKey&&a){const e=Ft(t),n=Ia(t),r=o*Math.pow(2,n);return void O.scaleTo(R,r,e,t)}const i=1===t.deltaMode?20:1;let s=d===Uo.Vertical?0:t.deltaX*i,l=d===Uo.Horizontal?0:t.deltaY*i;!Ho()&&t.shiftKey&&d!==Uo.Vertical&&(s=t.deltaY*i,l=0),O.translateBy(R,-s/o*c,-l/o*c,{internal:!0});const u=Ea(R.property("__zoom")),{onViewportChangeStart:f,onViewportChange:p,onViewportChangeEnd:h}=S.getState();clearTimeout(B.current),j.current||(j.current=!0,n?.(t,u),f?.(u)),j.current&&(e?.(t,u),p?.(u),B.current=setTimeout((()=>{r?.(t,u),h?.(u),j.current=!1}),150))}),{passive:!1}))}),[M,l,d,R,O,T,P,a,w,k,n,e,r]),s((()=>{O&&O.on("start",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;D.current=e.sourceEvent?.button;const{onViewportChangeStart:t}=S.getState(),r=Ea(e.transform);_.current=!0,N.current=r,"mousedown"===e.sourceEvent?.type&&S.setState({paneDragging:!0}),t?.(r),n?.(e.sourceEvent,r)}))}),[O,n]),s((()=>{O&&(M&&!_.current?O.on("zoom",null):M||O.on("zoom",(t=>{const{onViewportChange:n}=S.getState();if(S.setState({transform:[t.transform.x,t.transform.y,t.transform.k]}),I.current=!(!o||!_a(h,D.current??0)),(e||n)&&!t.sourceEvent?.internal){const r=Ea(t.transform);n?.(r),e?.(t.sourceEvent,r)}})))}),[M,O,e,h,o]),s((()=>{O&&O.on("end",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;const{onViewportChangeEnd:t}=S.getState();if(_.current=!1,S.setState({paneDragging:!1}),o&&_a(h,D.current??0)&&!I.current&&o(e.sourceEvent),I.current=!1,(r||t)&&(n=N.current,i=e.transform,n.x!==i.x||n.y!==i.y||n.zoom!==i.k)){const n=Ea(e.transform);N.current=n,clearTimeout(E.current),E.current=setTimeout((()=>{t?.(n),r?.(e.sourceEvent,n)}),l?150:0)}var n,i}))}),[O,l,h,r,o]),s((()=>{O&&O.filter((e=>{const t=P||i,n=a&&e.ctrlKey;if((!0===h||Array.isArray(h)&&h.includes(1))&&1===e.button&&"mousedown"===e.type&&(Sa(e,"react-flow__node")||Sa(e,"react-flow__edge")))return!0;if(!(h||t||l||f||a))return!1;if(M)return!1;if(!f&&"dblclick"===e.type)return!1;if(Sa(e,k)&&"wheel"===e.type)return!1;if(Sa(e,C)&&("wheel"!==e.type||l&&"wheel"===e.type&&!P))return!1;if(!a&&e.ctrlKey&&"wheel"===e.type)return!1;if(!t&&!l&&!n&&"wheel"===e.type)return!1;if(!h&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(Array.isArray(h)&&!h.includes(e.button)&&"mousedown"===e.type)return!1;const r=Array.isArray(h)&&h.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||"wheel"===e.type)&&r}))}),[M,O,i,a,l,f,h,p,P]),t.createElement("div",{className:"react-flow__renderer",ref:A,style:Ca},x)},Oa=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function Ra(){const{userSelectionActive:e,userSelectionRect:n}=vo(Oa,xe);return e&&n?t.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}function Ta(e,t){const n=t.parentNode||t.parentId,r=e.find((e=>e.id===n));if(r){const e=t.position.x+t.width-r.width,n=t.position.y+t.height-r.height;if(e>0||n>0||t.position.x<0||t.position.y<0){if(r.style={...r.style}||{},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,e>0&&(r.style.width+=e),n>0&&(r.style.height+=n),t.position.x<0){const e=Math.abs(t.position.x);r.position.x=r.position.x-e,r.style.width+=e,t.position.x=0}if(t.position.y<0){const e=Math.abs(t.position.y);r.position.y=r.position.y-e,r.style.height+=e,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function Ma(e,t){if(e.some((e=>"reset"===e.type)))return e.filter((e=>"reset"===e.type)).map((e=>e.item));const n=e.filter((e=>"add"===e.type)).map((e=>e.item));return t.reduce(((t,n)=>{const r=e.filter((e=>e.id===n.id));if(0===r.length)return t.push(n),t;const o={...n};for(const e of r)if(e)switch(e.type){case"select":o.selected=e.selected;break;case"position":void 0!==e.position&&(o.position=e.position),void 0!==e.positionAbsolute&&(o.positionAbsolute=e.positionAbsolute),void 0!==e.dragging&&(o.dragging=e.dragging),o.expandParent&&Ta(t,o);break;case"dimensions":void 0!==e.dimensions&&(o.width=e.dimensions.width,o.height=e.dimensions.height),void 0!==e.updateStyle&&(o.style={...o.style||{},...e.dimensions}),"boolean"==typeof e.resizing&&(o.resizing=e.resizing),o.expandParent&&Ta(t,o);break;case"remove":return t}return t.push(o),t}),n)}function Pa(e,t){return Ma(e,t)}function Da(e,t){return Ma(e,t)}const ja=(e,t)=>({id:e,type:"select",selected:t});function Ba(e,t){return e.reduce(((e,n)=>{const r=t.includes(n.id);return!n.selected&&r?(n.selected=!0,e.push(ja(n.id,!0))):n.selected&&!r&&(n.selected=!1,e.push(ja(n.id,!1))),e}),[])}const La=(e,t)=>n=>{n.target===t.current&&e?.(n)},za=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),Fa=n((({isSelecting:e,selectionMode:n=Jo.Full,panOnDrag:r,onSelectionStart:o,onSelectionEnd:i,onPaneClick:a,onPaneContextMenu:s,onPaneScroll:l,onPaneMouseEnter:c,onPaneMouseMove:d,onPaneMouseLeave:f,children:p})=>{const h=u(null),m=wo(),g=u(0),y=u(0),b=u(),{userSelectionActive:v,elementsSelectable:w,dragging:x}=vo(za,xe),k=()=>{m.setState({userSelectionActive:!1,userSelectionRect:null}),g.current=0,y.current=0},C=e=>{a?.(e),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},E=l?e=>l(e):void 0,S=w&&(e||v);return t.createElement("div",{className:me(["react-flow__pane",{dragging:x,selection:e}]),onClick:S?void 0:La(C,h),onContextMenu:La((e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():s?.(e)}),h),onWheel:La(E,h),onMouseEnter:S?void 0:c,onMouseDown:S?t=>{const{resetSelectedElements:n,domNode:r}=m.getState();if(b.current=r?.getBoundingClientRect(),!w||!e||0!==t.button||t.target!==h.current||!b.current)return;const{x:i,y:a}=Go(t,b.current);n(),m.setState({userSelectionRect:{width:0,height:0,startX:i,startY:a,x:i,y:a}}),o?.(t)}:void 0,onMouseMove:S?t=>{const{userSelectionRect:r,nodeInternals:o,edges:i,transform:a,onNodesChange:s,onEdgesChange:l,nodeOrigin:c,getNodes:u}=m.getState();if(!e||!b.current||!r)return;m.setState({userSelectionActive:!0,nodesSelectionActive:!1});const d=Go(t,b.current),f=r.startX??0,p=r.startY??0,h={...r,x:d.x<f?d.x:f,y:d.y<p?d.y:p,width:Math.abs(d.x-f),height:Math.abs(d.y-p)},v=u(),w=ki(o,h,a,n===Jo.Partial,!0,c),x=Ci(w,i).map((e=>e.id)),k=w.map((e=>e.id));if(g.current!==k.length){g.current=k.length;const e=Ba(v,k);e.length&&s?.(e)}if(y.current!==x.length){y.current=x.length;const e=Ba(i,x);e.length&&l?.(e)}m.setState({userSelectionRect:h})}:d,onMouseUp:S?e=>{if(0!==e.button)return;const{userSelectionRect:t}=m.getState();!v&&t&&e.target===h.current&&C?.(e),m.setState({nodesSelectionActive:g.current>0}),k(),i?.(e)}:void 0,onMouseLeave:S?e=>{v&&(m.setState({nodesSelectionActive:g.current>0}),i?.(e)),k()}:f,ref:h,style:Ca},p,t.createElement(Ra,null))}));function Va(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return!!r&&(!!r.selected||Va(r,t))}function Ga(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function Ha(e,t,n,r){return Array.from(e.values()).filter((n=>(n.selected||n.id===r)&&(!n.parentNode||n.parentId||!Va(n,e))&&(n.draggable||t&&void 0===n.draggable))).map((e=>({id:e.id,position:e.position||{x:0,y:0},positionAbsolute:e.positionAbsolute||{x:0,y:0},distance:{x:n.x-(e.positionAbsolute?.x??0),y:n.y-(e.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:e.extent,parentNode:e.parentNode||e.parentId,parentId:e.parentNode||e.parentId,width:e.width,height:e.height,expandParent:e.expandParent})))}function Wa(e,t,n,r,o=[0,0],i){const a=function(e,t){return t&&"parent"!==t?[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]:t}(e,e.extent||r);let s=a;const l=e.parentNode||e.parentId;if("parent"!==e.extent||e.expandParent){if(e.extent&&l&&"parent"!==e.extent){const t=n.get(l),{x:r,y:i}=wi(t,o).positionAbsolute;s=[[e.extent[0][0]+r,e.extent[0][1]+i],[e.extent[1][0]+r,e.extent[1][1]+i]]}}else if(l&&e.width&&e.height){const t=n.get(l),{x:r,y:i}=wi(t,o).positionAbsolute;s=t&&jo(r)&&jo(i)&&jo(t.width)&&jo(t.height)?[[r+e.width*o[0],i+e.height*o[1]],[r+t.width-e.width+e.width*o[0],i+t.height-e.height+e.height*o[1]]]:s}else i?.("005",uo()),s=a;let c={x:0,y:0};if(l){const e=n.get(l);c=wi(e,o).positionAbsolute}const u=s&&"parent"!==s?Io(t,s):t;return{position:{x:u.x-c.x,y:u.y-c.y},positionAbsolute:u}}function Xa({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map((e=>({...n.get(e.id),position:e.position,positionAbsolute:e.positionAbsolute})));return[e?r.find((t=>t.id===e)):r[0],r]}Fa.displayName="Pane";const $a=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),a=t.getBoundingClientRect(),s=a.width*r[0],l=a.height*r[1];return i.map((e=>{const t=e.getBoundingClientRect();return{id:e.getAttribute("data-handleid"),position:e.getAttribute("data-handlepos"),x:(t.left-a.left-s)/n,y:(t.top-a.top-l)/n,...So(e)}}))};function Za(e,t,n){return void 0===n?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function Ya({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:a,nodeInternals:s,onError:l}=t.getState(),c=s.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&a)&&(i({nodes:[c],edges:[]}),requestAnimationFrame((()=>r?.current?.blur()))):o([e])):l?.("012",yo(e))}function Ua(e){return(t,n,r)=>e?.(t,r)}function Ja({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:a}){const d=wo(),[f,p]=c(!1),h=u([]),m=u({x:null,y:null}),g=u(0),y=u(null),b=u({x:0,y:0}),v=u(null),w=u(!1),x=u(!1),k=u(!1),C=function(){const e=wo(),t=l((({sourceEvent:t})=>{const{transform:n,snapGrid:r,snapToGrid:o}=e.getState(),i=t.touches?t.touches[0].clientX:t.clientX,a=t.touches?t.touches[0].clientY:t.clientY,s={x:(i-n[0])/n[2],y:(a-n[1])/n[2]};return{xSnapped:o?r[0]*Math.round(s.x/r[0]):s.x,ySnapped:o?r[1]*Math.round(s.y/r[1]):s.y,...s}}),[]);return t}();return s((()=>{if(e?.current){const s=zt(e.current),l=({x:e,y:t})=>{const{nodeInternals:n,onNodeDrag:r,onSelectionDrag:i,updateNodePositions:a,nodeExtent:s,snapGrid:l,snapToGrid:c,nodeOrigin:u,onError:f}=d.getState();m.current={x:e,y:t};let g=!1,y={x:0,y:0,x2:0,y2:0};if(h.current.length>1&&s){const e=xi(h.current,u);y=To(e)}if(h.current=h.current.map((r=>{const o={x:e-r.distance.x,y:t-r.distance.y};c&&(o.x=l[0]*Math.round(o.x/l[0]),o.y=l[1]*Math.round(o.y/l[1]));const i=[[s[0][0],s[0][1]],[s[1][0],s[1][1]]];h.current.length>1&&s&&!r.extent&&(i[0][0]=r.positionAbsolute.x-y.x+s[0][0],i[1][0]=r.positionAbsolute.x+(r.width??0)-y.x2+s[1][0],i[0][1]=r.positionAbsolute.y-y.y+s[0][1],i[1][1]=r.positionAbsolute.y+(r.height??0)-y.y2+s[1][1]);const a=Wa(r,o,n,i,u,f);return g=g||r.position.x!==a.position.x||r.position.y!==a.position.y,r.position=a.position,r.positionAbsolute=a.positionAbsolute,r})),!g)return;a(h.current,!0,!0),p(!0);const b=o?r:Ua(i);if(b&&v.current){const[e,t]=Xa({nodeId:o,dragItems:h.current,nodeInternals:n});b(v.current,e,t)}},c=()=>{if(!y.current)return;const[e,t]=No(b.current,y.current);if(0!==e||0!==t){const{transform:n,panBy:r}=d.getState();m.current.x=(m.current.x??0)-e/n[2],m.current.y=(m.current.y??0)-t/n[2],r({x:e,y:t})&&l(m.current)}g.current=requestAnimationFrame(c)},u=t=>{const{nodeInternals:n,multiSelectionActive:r,nodesDraggable:s,unselectNodesAndEdges:l,onNodeDragStart:c,onSelectionDragStart:u}=d.getState();x.current=!0;const f=o?c:Ua(u);a&&i||r||!o||n.get(o)?.selected||l(),o&&i&&a&&Ya({id:o,store:d,nodeRef:e});const p=C(t);if(m.current=p,h.current=Ha(n,s,p,o),f&&h.current){const[e,r]=Xa({nodeId:o,dragItems:h.current,nodeInternals:n});f(t.sourceEvent,e,r)}};if(!t){const t=function(){var e,t,n,r,o=Ut,i=Jt,a=Kt,s=qt,l={},c=Ce("start","drag","end"),u=0,d=0;function f(e){e.on("mousedown.drag",p).filter(s).on("touchstart.drag",g).on("touchmove.drag",y,Vt).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(a,s){if(!r&&o.call(this,a,s)){var l=v(this,i.call(this,a,s),a,s,"mouse");l&&(zt(a.view).on("mousemove.drag",h,Gt).on("mouseup.drag",m,Gt),Xt(a.view),Ht(a),n=!1,e=a.clientX,t=a.clientY,l("start",a))}}function h(r){if(Wt(r),!n){var o=r.clientX-e,i=r.clientY-t;n=o*o+i*i>d}l.mouse("drag",r)}function m(e){zt(e.view).on("mousemove.drag mouseup.drag",null),$t(e.view,n),Wt(e),l.mouse("end",e)}function g(e,t){if(o.call(this,e,t)){var n,r,a=e.changedTouches,s=i.call(this,e,t),l=a.length;for(n=0;n<l;++n)(r=v(this,s,e,t,a[n].identifier,a[n]))&&(Ht(e),r("start",e,a[n]))}}function y(e){var t,n,r=e.changedTouches,o=r.length;for(t=0;t<o;++t)(n=l[r[t].identifier])&&(Wt(e),n("drag",e,r[t]))}function b(e){var t,n,o=e.changedTouches,i=o.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(n=l[o[t].identifier])&&(Ht(e),n("end",e,o[t]))}function v(e,t,n,r,o,i){var s,d,p,h=c.copy(),m=Ft(i||n,t);if(null!=(p=a.call(e,new Yt("beforestart",{sourceEvent:n,target:f,identifier:o,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:h}),r)))return s=p.x-m[0]||0,d=p.y-m[1]||0,function n(i,a,c){var g,y=m;switch(i){case"start":l[o]=n,g=u++;break;case"end":delete l[o],--u;case"drag":m=Ft(c||a,t),g=u}h.call(i,e,new Yt(i,{sourceEvent:a,subject:p,target:f,identifier:o,active:g,x:m[0]+s,y:m[1]+d,dx:m[0]-y[0],dy:m[1]-y[1],dispatch:h}),r)}}return f.filter=function(e){return arguments.length?(o="function"==typeof e?e:Zt(!!e),f):o},f.container=function(e){return arguments.length?(i="function"==typeof e?e:Zt(e),f):i},f.subject=function(e){return arguments.length?(a="function"==typeof e?e:Zt(e),f):a},f.touchable=function(e){return arguments.length?(s="function"==typeof e?e:Zt(!!e),f):s},f.on=function(){var e=c.on.apply(c,arguments);return e===c?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}().on("start",(e=>{const{domNode:t,nodeDragThreshold:n}=d.getState();0===n&&u(e),k.current=!1;const r=C(e);m.current=r,y.current=t?.getBoundingClientRect()||null,b.current=Go(e.sourceEvent,y.current)})).on("drag",(e=>{const t=C(e),{autoPanOnNodeDrag:n,nodeDragThreshold:r}=d.getState();if("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1&&(k.current=!0),!k.current){if(!w.current&&x.current&&n&&(w.current=!0,c()),!x.current){const n=t.xSnapped-(m?.current?.x??0),o=t.ySnapped-(m?.current?.y??0);Math.sqrt(n*n+o*o)>r&&u(e)}(m.current.x!==t.xSnapped||m.current.y!==t.ySnapped)&&h.current&&x.current&&(v.current=e.sourceEvent,b.current=Go(e.sourceEvent,y.current),l(t))}})).on("end",(e=>{if(x.current&&!k.current&&(p(!1),w.current=!1,x.current=!1,cancelAnimationFrame(g.current),h.current)){const{updateNodePositions:t,nodeInternals:n,onNodeDragStop:r,onSelectionDragStop:i}=d.getState(),a=o?r:Ua(i);if(t(h.current,!1,!1),a){const[t,r]=Xa({nodeId:o,dragItems:h.current,nodeInternals:n});a(e.sourceEvent,t,r)}}})).filter((t=>{const o=t.target;return!t.button&&(!n||!Ga(o,`.${n}`,e))&&(!r||Ga(o,r,e))}));return s.call(t),()=>{s.on(".drag",null)}}s.on(".drag",null)}}),[e,t,n,r,i,d,o,a,C]),f}function Ka(){const e=wo(),t=l((t=>{const{nodeInternals:n,nodeExtent:r,updateNodePositions:o,getNodes:i,snapToGrid:a,snapGrid:s,onError:l,nodesDraggable:c}=e.getState(),u=i().filter((e=>e.selected&&(e.draggable||c&&void 0===e.draggable))),d=a?s[0]:5,f=a?s[1]:5,p=t.isShiftPressed?4:1,h=t.x*d*p,m=t.y*f*p,g=u.map((e=>{if(e.positionAbsolute){const t={x:e.positionAbsolute.x+h,y:e.positionAbsolute.y+m};a&&(t.x=s[0]*Math.round(t.x/s[0]),t.y=s[1]*Math.round(t.y/s[1]));const{positionAbsolute:o,position:i}=Wa(e,t,n,r,void 0,l);e.position=i,e.positionAbsolute=o}return e}));o(g,!0,!1)}),[]);return t}const qa={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Qa=e=>{const r=({id:n,type:r,data:o,xPos:i,yPos:a,xPosOrigin:l,yPosOrigin:c,selected:d,onClick:f,onMouseEnter:p,onMouseMove:h,onMouseLeave:m,onContextMenu:g,onDoubleClick:y,style:b,className:v,isDraggable:w,isSelectable:x,isConnectable:k,isFocusable:C,selectNodesOnDrag:E,sourcePosition:S,targetPosition:_,hidden:I,resizeObserver:A,dragHandle:N,zIndex:O,isParent:R,noDragClassName:T,noPanClassName:M,initialized:P,disableKeyboardA11y:D,ariaLabel:j,rfId:B,hasHandleBounds:L})=>{const z=wo(),F=u(null),V=u(null),G=u(S),H=u(_),W=u(r),X=x||w||f||p||h||m,$=Ka(),Z=Za(n,z.getState,p),Y=Za(n,z.getState,h),U=Za(n,z.getState,m),J=Za(n,z.getState,g),K=Za(n,z.getState,y);s((()=>()=>{V.current&&(A?.unobserve(V.current),V.current=null)}),[]),s((()=>{if(F.current&&!I){const e=F.current;P&&L&&V.current===e||(V.current&&A?.unobserve(V.current),A?.observe(e),V.current=e)}}),[I,P,L]),s((()=>{const e=W.current!==r,t=G.current!==S,o=H.current!==_;F.current&&(e||t||o)&&(e&&(W.current=r),t&&(G.current=S),o&&(H.current=_),z.getState().updateNodeDimensions([{id:n,nodeElement:F.current,forceUpdate:!0}]))}),[n,r,S,_]);const q=Ja({nodeRef:F,disabled:I||!w,noDragClassName:T,handleSelector:N,nodeId:n,isSelectable:x,selectNodesOnDrag:E});return I?null:t.createElement("div",{className:me(["react-flow__node",`react-flow__node-${r}`,{[M]:w},v,{selected:d,selectable:x,parent:R,dragging:q}]),ref:F,style:{zIndex:O,transform:`translate(${l}px,${c}px)`,pointerEvents:X?"all":"none",visibility:P?"visible":"hidden",...b},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:Z,onMouseMove:Y,onMouseLeave:U,onContextMenu:J,onClick:e=>{const{nodeDragThreshold:t}=z.getState();if(x&&(!E||!w||t>0)&&Ya({id:n,store:z,nodeRef:F}),f){const t=z.getState().nodeInternals.get(n);t&&f(e,{...t})}},onDoubleClick:K,onKeyDown:C?e=>{if(!Fo(e)&&!D)if(Lo.includes(e.key)&&x){const t="Escape"===e.key;Ya({id:n,store:z,unselect:t,nodeRef:F})}else w&&d&&Object.prototype.hasOwnProperty.call(qa,e.key)&&(z.setState({ariaLiveMessage:`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~a}`}),$({x:qa[e.key].x,y:qa[e.key].y,isShiftPressed:e.shiftKey}))}:void 0,tabIndex:C?0:void 0,role:C?"button":void 0,"aria-describedby":D?void 0:`${ra}-${B}`,"aria-label":j},t.createElement(mi,{value:n},t.createElement(e,{id:n,data:o,type:r,xPos:i,yPos:a,selected:d,isConnectable:k,sourcePosition:S,targetPosition:_,dragging:q,dragHandle:N,zIndex:O})))};return r.displayName="NodeWrapper",n(r)};const es=e=>{const t=e.getNodes().filter((e=>e.selected));return{...xi(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};var ts=n((function({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:r}){const o=wo(),{width:i,height:a,x:l,y:c,transformString:d,userSelectionActive:f}=vo(es,xe),p=Ka(),h=u(null);if(s((()=>{r||h.current?.focus({preventScroll:!0})}),[r]),Ja({nodeRef:h}),f||!i||!a)return null;const m=e?t=>{const n=o.getState().getNodes().filter((e=>e.selected));e(t,n)}:void 0;return t.createElement("div",{className:me(["react-flow__nodesselection","react-flow__container",n]),style:{transform:d}},t.createElement("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:r?void 0:-1,onKeyDown:r?void 0:e=>{Object.prototype.hasOwnProperty.call(qa,e.key)&&p({x:qa[e.key].x,y:qa[e.key].y,isShiftPressed:e.shiftKey})},style:{width:i,height:a,top:c,left:l}}))}));const ns=e=>e.nodesSelectionActive,rs=({children:e,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,deleteKeyCode:c,onMove:u,onMoveStart:d,onMoveEnd:f,selectionKeyCode:p,selectionOnDrag:h,selectionMode:m,onSelectionStart:g,onSelectionEnd:y,multiSelectionKeyCode:b,panActivationKeyCode:v,zoomActivationKeyCode:w,elementsSelectable:x,zoomOnScroll:k,zoomOnPinch:C,panOnScroll:E,panOnScrollSpeed:S,panOnScrollMode:_,zoomOnDoubleClick:I,panOnDrag:A,defaultViewport:N,translateExtent:O,minZoom:R,maxZoom:T,preventScrolling:M,onSelectionContextMenu:P,noWheelClassName:D,noPanClassName:j,disableKeyboardA11y:B})=>{const L=vo(ns),z=la(p),F=la(v),V=F||A,G=F||E,H=z||h&&!0!==V;return(({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=wo(),{deleteElements:r}=xa(),o=la(e,ka),i=la(t);s((()=>{if(o){const{edges:e,getNodes:t}=n.getState(),o=t().filter((e=>e.selected)),i=e.filter((e=>e.selected));r({nodes:o,edges:i}),n.setState({nodesSelectionActive:!1})}}),[o]),s((()=>{n.setState({multiSelectionActive:i})}),[i])})({deleteKeyCode:c,multiSelectionKeyCode:b}),t.createElement(Na,{onMove:u,onMoveStart:d,onMoveEnd:f,onPaneContextMenu:a,elementsSelectable:x,zoomOnScroll:k,zoomOnPinch:C,panOnScroll:G,panOnScrollSpeed:S,panOnScrollMode:_,zoomOnDoubleClick:I,panOnDrag:!z&&V,defaultViewport:N,translateExtent:O,minZoom:R,maxZoom:T,zoomActivationKeyCode:w,preventScrolling:M,noWheelClassName:D,noPanClassName:j},t.createElement(Fa,{onSelectionStart:g,onSelectionEnd:y,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:V,isSelecting:!!H,selectionMode:m},e,L&&t.createElement(ts,{onSelectionContextMenu:P,noPanClassName:j,disableKeyboardA11y:B})))};rs.displayName="FlowRenderer";var os=n(rs);function is(e){return{...{input:Qa(e.input||Vi),default:Qa(e.default||zi),output:Qa(e.output||Hi),group:Qa(e.group||Wi)},...Object.keys(e).filter((e=>!["input","default","output","group"].includes(e))).reduce(((t,n)=>(t[n]=Qa(e[n]||zi),t)),{})}}const as=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),ss=e=>{const{nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,updateNodeDimensions:c,onError:d}=vo(as,xe),f=function(e){const t=vo(l((t=>e?ki(t.nodeInternals,{x:0,y:0,width:t.width,height:t.height},t.transform,!0):t.getNodes()),[e]));return t}(e.onlyRenderVisibleElements),p=u(),h=a((()=>{if("undefined"==typeof ResizeObserver)return null;const e=new ResizeObserver((e=>{const t=e.map((e=>({id:e.target.getAttribute("data-id"),nodeElement:e.target,forceUpdate:!0})));c(t)}));return p.current=e,e}),[]);return s((()=>()=>{p?.current?.disconnect()}),[]),t.createElement("div",{className:"react-flow__nodes",style:Ca},f.map((a=>{let s=a.type||"default";e.nodeTypes[s]||(d?.("003",lo(s)),s="default");const l=e.nodeTypes[s]||e.nodeTypes.default,c=!!(a.draggable||n&&void 0===a.draggable),u=!!(a.selectable||i&&void 0===a.selectable),f=!!(a.connectable||r&&void 0===a.connectable),p=!!(a.focusable||o&&void 0===a.focusable),m=e.nodeExtent?Io(a.positionAbsolute,e.nodeExtent):a.positionAbsolute,g=m?.x??0,y=m?.y??0,b=(({x:e,y:t,width:n,height:r,origin:o})=>n&&r?o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]}:{x:e,y:t})({x:g,y:y,width:a.width??0,height:a.height??0,origin:e.nodeOrigin});return t.createElement(l,{key:a.id,id:a.id,className:a.className,style:a.style,type:s,data:a.data,sourcePosition:a.sourcePosition||Qo.Bottom,targetPosition:a.targetPosition||Qo.Top,hidden:a.hidden,xPos:g,yPos:y,xPosOrigin:b.x,yPosOrigin:b.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!a.selected,isDraggable:c,isSelectable:u,isConnectable:f,isFocusable:p,resizeObserver:h,dragHandle:a.dragHandle,zIndex:a[Bo]?.z??0,isParent:!!a[Bo]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!a.width&&!!a.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:a.ariaLabel,hasHandleBounds:!!a[Bo]?.handleBounds})})))};ss.displayName="NodeRenderer";var ls=n(ss);const cs=(e,t,n)=>n===Qo.Left?e-t:n===Qo.Right?e+t:e,us=(e,t,n)=>n===Qo.Top?e-t:n===Qo.Bottom?e+t:e,ds="react-flow__edgeupdater",fs=({position:e,centerX:n,centerY:r,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:s,type:l})=>t.createElement("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:s,className:me([ds,`${ds}-${l}`]),cx:cs(n,o,e),cy:us(r,o,e),r:o,stroke:"transparent",fill:"transparent"}),ps=()=>!0;var hs=e=>{const r=({id:n,className:r,type:o,data:i,onClick:s,onEdgeDoubleClick:l,selected:d,animated:f,label:p,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:b,style:v,source:w,target:x,sourceX:k,sourceY:C,targetX:E,targetY:S,sourcePosition:_,targetPosition:I,elementsSelectable:A,hidden:N,sourceHandleId:O,targetHandleId:R,onContextMenu:T,onMouseEnter:M,onMouseMove:P,onMouseLeave:D,reconnectRadius:j,onReconnect:B,onReconnectStart:L,onReconnectEnd:z,markerEnd:F,markerStart:V,rfId:G,ariaLabel:H,isFocusable:W,isReconnectable:X,pathOptions:$,interactionWidth:Z,disableKeyboardA11y:Y})=>{const U=u(null),[J,K]=c(!1),[q,Q]=c(!1),ee=wo(),te=a((()=>`url('#${yi(V,G)}')`),[V,G]),ne=a((()=>`url('#${yi(F,G)}')`),[F,G]);if(N)return null;const re=Xo(n,ee.getState,l),oe=Xo(n,ee.getState,T),ie=Xo(n,ee.getState,M),ae=Xo(n,ee.getState,P),se=Xo(n,ee.getState,D),le=(e,t)=>{if(0!==e.button)return;const{edges:r,isValidConnection:o}=ee.getState(),i=t?x:w,a=(t?R:O)||null,s=t?"target":"source",l=o||ps,c=t,u=r.find((e=>e.id===n));Q(!0),L?.(e,u,s);Mi({event:e,handleId:a,nodeId:i,onConnect:e=>B?.(u,e),isTarget:c,getState:ee.getState,setState:ee.setState,isValidConnection:l,edgeUpdaterType:s,onReconnectEnd:e=>{Q(!1),z?.(e,u,s)}})},ce=()=>K(!0),ue=()=>K(!1),de=!A&&!s;return t.createElement("g",{className:me(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:d,animated:f,inactive:de,updating:J}]),onClick:e=>{const{edges:t,addSelectedEdges:r,unselectNodesAndEdges:o,multiSelectionActive:i}=ee.getState(),a=t.find((e=>e.id===n));a&&(A&&(ee.setState({nodesSelectionActive:!1}),a.selected&&i?(o({nodes:[],edges:[a]}),U.current?.blur()):r([n])),s&&s(e,a))},onDoubleClick:re,onContextMenu:oe,onMouseEnter:ie,onMouseMove:ae,onMouseLeave:se,onKeyDown:W?e=>{if(!Y&&Lo.includes(e.key)&&A){const{unselectNodesAndEdges:t,addSelectedEdges:r,edges:o}=ee.getState();"Escape"===e.key?(U.current?.blur(),t({edges:[o.find((e=>e.id===n))]})):r([n])}}:void 0,tabIndex:W?0:void 0,role:W?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":null===H?void 0:H||`Edge from ${w} to ${x}`,"aria-describedby":W?`${oa}-${G}`:void 0,ref:U},!q&&t.createElement(e,{id:n,source:w,target:x,selected:d,animated:f,label:p,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:b,data:i,style:v,sourceX:k,sourceY:C,targetX:E,targetY:S,sourcePosition:_,targetPosition:I,sourceHandleId:O,targetHandleId:R,markerStart:te,markerEnd:ne,pathOptions:$,interactionWidth:Z}),X&&t.createElement(t.Fragment,null,("source"===X||!0===X)&&t.createElement(fs,{position:_,centerX:k,centerY:C,radius:j,onMouseDown:e=>le(e,!0),onMouseEnter:ce,onMouseOut:ue,type:"source"}),("target"===X||!0===X)&&t.createElement(fs,{position:I,centerX:E,centerY:S,radius:j,onMouseDown:e=>le(e,!1),onMouseEnter:ce,onMouseOut:ue,type:"target"})))};return r.displayName="EdgeWrapper",n(r)};function ms(e){return{...{default:hs(e.default||pi),straight:hs(e.bezier||ci),step:hs(e.step||li),smoothstep:hs(e.step||si),simplebezier:hs(e.simplebezier||ni)},...Object.keys(e).filter((e=>!["default","bezier"].includes(e))).reduce(((t,n)=>(t[n]=hs(e[n]||pi),t)),{})}}function gs(e,t,n=null){const r=(n?.x||0)+t.x,o=(n?.y||0)+t.y,i=n?.width||t.width,a=n?.height||t.height;switch(e){case Qo.Top:return{x:r+i/2,y:o};case Qo.Right:return{x:r+i,y:o+a/2};case Qo.Bottom:return{x:r+i/2,y:o+a};case Qo.Left:return{x:r,y:o+a/2}}}function ys(e,t){return e?1!==e.length&&t?t&&e.find((e=>e.id===t))||null:e[0]:null}function bs(e){const t=e?.[Bo]?.handleBounds||null,n=t&&e?.width&&e?.height&&void 0!==e?.positionAbsolute?.x&&void 0!==e?.positionAbsolute?.y;return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}const vs=[{level:0,isMaxLevel:!0,edges:[]}];function ws(e,t,n){const r=vo(l((n=>e?n.edges.filter((e=>{const r=t.get(e.source),o=t.get(e.target);return r?.width&&r?.height&&o?.width&&o?.height&&function({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:i,width:a,height:s,transform:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+i)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=To({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:s/l[2]}),d=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),f=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(d*f)>0}({sourcePos:r.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:r.width,sourceHeight:r.height,targetWidth:o.width,targetHeight:o.height,width:n.width,height:n.height,transform:n.transform})})):n.edges),[e,t]));return function(e,t,n=!1){let r=-1;const o=e.reduce(((e,o)=>{const i=jo(o.zIndex);let a=i?o.zIndex:0;if(n){const e=t.get(o.target),n=t.get(o.source),r=o.selected||e?.selected||n?.selected,s=Math.max(n?.[Bo]?.z||0,e?.[Bo]?.z||0,1e3);a=(i?o.zIndex:0)+(r?s:0)}return e[a]?e[a].push(o):e[a]=[o],r=a>r?a:r,e}),{}),i=Object.entries(o).map((([e,t])=>{const n=+e;return{edges:t,level:n,isMaxLevel:n===r}}));return 0===i.length?vs:i}(r,t,n)}const xs={[qo.Arrow]:({color:e="none",strokeWidth:n=1})=>t.createElement("polyline",{style:{stroke:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),[qo.ArrowClosed]:({color:e="none",strokeWidth:n=1})=>t.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})};const ks=({id:e,type:n,color:r,width:o=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const u=function(e){const t=wo();return a((()=>Object.prototype.hasOwnProperty.call(xs,e)?xs[e]:(t.getState().onError?.("009",po(e)),null)),[e])}(n);return u?t.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0"},t.createElement(u,{color:r,strokeWidth:l})):null},Cs=({defaultColor:e,rfId:n})=>{const r=vo(l((({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce(((n,o)=>([o.markerStart,o.markerEnd].forEach((o=>{if(o&&"object"==typeof o){const i=yi(o,t);r.includes(i)||(n.push({id:i,color:o.color||e,...o}),r.push(i))}})),n)),[]).sort(((e,t)=>e.id.localeCompare(t.id)))})({defaultColor:e,rfId:n}),[e,n]),((e,t)=>!(e.length!==t.length||e.some(((e,n)=>e.id!==t[n].id)))));return t.createElement("defs",null,r.map((e=>t.createElement(ks,{id:e.id,key:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient}))))};Cs.displayName="MarkerDefinitions";var Es=n(Cs);const Ss=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),_s=({defaultMarkerColor:e,onlyRenderVisibleElements:n,elevateEdgesOnSelect:r,rfId:o,edgeTypes:i,noPanClassName:a,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,children:y,disableKeyboardA11y:b})=>{const{edgesFocusable:v,edgesUpdatable:w,elementsSelectable:x,width:k,height:C,connectionMode:E,nodeInternals:S,onError:_}=vo(Ss,xe),I=ws(n,S,r);return k?t.createElement(t.Fragment,null,I.map((({level:n,edges:r,isMaxLevel:y})=>t.createElement("svg",{key:n,style:{zIndex:n},width:k,height:C,className:"react-flow__edges react-flow__container"},y&&t.createElement(Es,{defaultColor:e,rfId:o}),t.createElement("g",null,r.map((e=>{const[n,r,y]=bs(S.get(e.source)),[k,C,I]=bs(S.get(e.target));if(!y||!I)return null;let A=e.type||"default";i[A]||(_?.("011",go(A)),A="default");const N=i[A]||i.default,O=E===Yo.Strict?C.target:(C.target??[]).concat(C.source??[]),R=ys(r.source,e.sourceHandle),T=ys(O,e.targetHandle),M=R?.position||Qo.Bottom,P=T?.position||Qo.Top,D=!!(e.focusable||v&&void 0===e.focusable),j=e.reconnectable||e.updatable,B=void 0!==p&&(j||w&&void 0===j);if(!R||!T)return _?.("008",ho(R,e)),null;const{sourceX:L,sourceY:z,targetX:F,targetY:V}=((e,t,n,r,o,i)=>{const a=gs(n,e,t),s=gs(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}})(n,R,M,k,T,P);return t.createElement(N,{key:e.id,id:e.id,className:me([e.className,a]),type:A,data:e.data,selected:!!e.selected,animated:!!e.animated,hidden:!!e.hidden,label:e.label,labelStyle:e.labelStyle,labelShowBg:e.labelShowBg,labelBgStyle:e.labelBgStyle,labelBgPadding:e.labelBgPadding,labelBgBorderRadius:e.labelBgBorderRadius,style:e.style,source:e.source,target:e.target,sourceHandleId:e.sourceHandle,targetHandleId:e.targetHandle,markerEnd:e.markerEnd,markerStart:e.markerStart,sourceX:L,sourceY:z,targetX:F,targetY:V,sourcePosition:M,targetPosition:P,elementsSelectable:x,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,rfId:o,ariaLabel:e.ariaLabel,isFocusable:D,isReconnectable:B,pathOptions:"pathOptions"in e?e.pathOptions:void 0,interactionWidth:e.interactionWidth,disableKeyboardA11y:b})})))))),y):null};_s.displayName="EdgeRenderer";var Is=n(_s);const As=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Ns({children:e}){const n=vo(As);return t.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:n}},e)}const Os={[Qo.Left]:Qo.Right,[Qo.Right]:Qo.Left,[Qo.Top]:Qo.Bottom,[Qo.Bottom]:Qo.Top},Rs=({nodeId:e,handleType:n,style:r,type:o=Ko.Bezier,CustomComponent:i,connectionStatus:a})=>{const{fromNode:s,handleId:c,toX:u,toY:d,connectionMode:f}=vo(l((t=>({fromNode:t.nodeInternals.get(e),handleId:t.connectionHandleId,toX:(t.connectionPosition.x-t.transform[0])/t.transform[2],toY:(t.connectionPosition.y-t.transform[1])/t.transform[2],connectionMode:t.connectionMode})),[e]),xe),p=s?.[Bo]?.handleBounds;let h=p?.[n];if(f===Yo.Loose&&(h=h||p?.["source"===n?"target":"source"]),!s||!h)return null;const m=c?h.find((e=>e.id===c)):h[0],g=m?m.x+m.width/2:(s.width??0)/2,y=m?m.y+m.height/2:s.height??0,b=(s.positionAbsolute?.x??0)+g,v=(s.positionAbsolute?.y??0)+y,w=m?.position,x=w?Os[w]:null;if(!w||!x)return null;if(i)return t.createElement(i,{connectionLineType:o,connectionLineStyle:r,fromNode:s,fromHandle:m,fromX:b,fromY:v,toX:u,toY:d,fromPosition:w,toPosition:x,connectionStatus:a});let k="";const C={sourceX:b,sourceY:v,sourcePosition:w,targetX:u,targetY:d,targetPosition:x};return o===Ko.Bezier?[k]=fi(C):o===Ko.Step?[k]=ai({...C,borderRadius:0}):o===Ko.SmoothStep?[k]=ai(C):o===Ko.SimpleBezier?[k]=ti(C):k=`M${b},${v} ${u},${d}`,t.createElement("path",{d:k,fill:"none",className:"react-flow__connection-path",style:r})};Rs.displayName="ConnectionLine";const Ts=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function Ms({containerStyle:e,style:n,type:r,component:o}){const{nodeId:i,handleType:a,nodesConnectable:s,width:l,height:c,connectionStatus:u}=vo(Ts,xe);return!!(i&&a&&l&&s)?t.createElement("svg",{style:e,width:l,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},t.createElement("g",{className:me(["react-flow__connection",u])},t.createElement(Rs,{nodeId:i,handleType:a,style:n,type:r,CustomComponent:o,connectionStatus:u}))):null}function Ps(e,t){const n=u(null),r=wo();return a((()=>{if("development"===process.env.NODE_ENV){const t=Object.keys(e);xe(n.current,t)&&r.getState().onError?.("002",so()),n.current=t}return t(e)}),[e])}const Ds=({nodeTypes:e,edgeTypes:n,onMove:r,onMoveStart:o,onMoveEnd:i,onInit:a,onNodeClick:l,onEdgeClick:c,onNodeDoubleClick:d,onEdgeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:g,onSelectionContextMenu:y,onSelectionStart:b,onSelectionEnd:v,connectionLineType:w,connectionLineStyle:x,connectionLineComponent:k,connectionLineContainerStyle:C,selectionKeyCode:E,selectionOnDrag:S,selectionMode:_,multiSelectionKeyCode:I,panActivationKeyCode:A,zoomActivationKeyCode:N,deleteKeyCode:O,onlyRenderVisibleElements:R,elementsSelectable:T,selectNodesOnDrag:M,defaultViewport:P,translateExtent:D,minZoom:j,maxZoom:B,preventScrolling:L,defaultMarkerColor:z,zoomOnScroll:F,zoomOnPinch:V,panOnScroll:G,panOnScrollSpeed:H,panOnScrollMode:W,zoomOnDoubleClick:X,panOnDrag:$,onPaneClick:Z,onPaneMouseEnter:Y,onPaneMouseMove:U,onPaneMouseLeave:J,onPaneScroll:K,onPaneContextMenu:q,onEdgeContextMenu:Q,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,onReconnect:re,onReconnectStart:oe,onReconnectEnd:ie,reconnectRadius:ae,noDragClassName:se,noWheelClassName:le,noPanClassName:ce,elevateEdgesOnSelect:ue,disableKeyboardA11y:de,nodeOrigin:fe,nodeExtent:pe,rfId:he})=>{const me=Ps(e,is),ge=Ps(n,ms);return function(e){const t=xa(),n=u(!1);s((()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout((()=>e(t)),1),n.current=!0)}),[e,t.viewportInitialized])}(a),t.createElement(os,{onPaneClick:Z,onPaneMouseEnter:Y,onPaneMouseMove:U,onPaneMouseLeave:J,onPaneContextMenu:q,onPaneScroll:K,deleteKeyCode:O,selectionKeyCode:E,selectionOnDrag:S,selectionMode:_,onSelectionStart:b,onSelectionEnd:v,multiSelectionKeyCode:I,panActivationKeyCode:A,zoomActivationKeyCode:N,elementsSelectable:T,onMove:r,onMoveStart:o,onMoveEnd:i,zoomOnScroll:F,zoomOnPinch:V,zoomOnDoubleClick:X,panOnScroll:G,panOnScrollSpeed:H,panOnScrollMode:W,panOnDrag:$,defaultViewport:P,translateExtent:D,minZoom:j,maxZoom:B,onSelectionContextMenu:y,preventScrolling:L,noDragClassName:se,noWheelClassName:le,noPanClassName:ce,disableKeyboardA11y:de},t.createElement(Ns,null,t.createElement(Is,{edgeTypes:ge,onEdgeClick:c,onEdgeDoubleClick:f,onlyRenderVisibleElements:R,onEdgeContextMenu:Q,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,onReconnect:re,onReconnectStart:oe,onReconnectEnd:ie,reconnectRadius:ae,defaultMarkerColor:z,noPanClassName:ce,elevateEdgesOnSelect:!!ue,disableKeyboardA11y:de,rfId:he},t.createElement(Ms,{style:x,type:w,component:k,containerStyle:C})),t.createElement("div",{className:"react-flow__edgelabel-renderer"}),t.createElement(ls,{nodeTypes:me,onNodeClick:l,onNodeDoubleClick:d,onNodeMouseEnter:p,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:g,selectNodesOnDrag:M,onlyRenderVisibleElements:R,noPanClassName:ce,noDragClassName:se,disableKeyboardA11y:de,nodeOrigin:fe,nodeExtent:pe,rfId:he})))};Ds.displayName="GraphView";var js=n(Ds);const Bs=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Ls={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:Bs,nodeExtent:Bs,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Yo.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:zo,isValidConnection:void 0},zs=()=>((e,t)=>e?we(e,t):we)(((e,t)=>({...Ls,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:pa(n,r,o,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map((e=>({...r,...e})))})},setDefaultNodesAndEdges:(n,r)=>{const o=void 0!==n,i=void 0!==r,a=o?pa(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:i?r:[],hasDefaultNodes:o,hasDefaultEdges:i})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:i,fitViewOnInitDone:a,fitViewOnInitOptions:s,domNode:l,nodeOrigin:c}=t(),u=l?.querySelector(".react-flow__viewport");if(!u)return;const d=window.getComputedStyle(u),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=n.reduce(((e,t)=>{const n=o.get(t.id);if(n?.hidden)o.set(n.id,{...n,[Bo]:{...n[Bo],handleBounds:void 0}});else if(n){const r=So(t.nodeElement);!(!r.width||!r.height||n.width===r.width&&n.height===r.height&&!t.forceUpdate)&&(o.set(n.id,{...n,[Bo]:{...n[Bo],handleBounds:{source:$a(".source",t.nodeElement,f,c),target:$a(".target",t.nodeElement,f,c)}},...r}),e.push({id:n.id,type:"dimensions",dimensions:r}))}return e}),[]);fa(o,c);const h=a||i&&!a&&ha(t,{initial:!0,...s});e({nodeInternals:new Map(o),fitViewOnInitDone:h}),p?.length>0&&r?.(p)},updateNodePositions:(e,n=!0,r=!1)=>{const{triggerNodeChanges:o}=t(),i=e.map((e=>{const t={id:e.id,type:"position",dragging:r};return n&&(t.positionAbsolute=e.positionAbsolute,t.position=e.position),t}));o(i)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:i,nodeOrigin:a,getNodes:s,elevateNodesOnSelect:l}=t();if(n?.length){if(i){const t=pa(Pa(n,s()),o,a,l);e({nodeInternals:t})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map((e=>ja(e,!0))):(a=Ba(i(),n),s=Ba(o,[])),ya({changedNodes:a,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map((e=>ja(e,!0))):(a=Ba(o,n),s=Ba(i(),[])),ya({changedNodes:s,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),a=r||o;ya({changedNodes:(n||i()).map((e=>(e.selected=!1,ja(e.id,!1)))),changedEdges:a.map((e=>ja(e.id,!1))),get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r?.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r?.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t();ya({changedNodes:r().filter((e=>e.selected)).map((e=>ja(e.id,!1))),changedEdges:n.filter((e=>e.selected)).map((e=>ja(e.id,!1))),get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach((e=>{e.positionAbsolute=Io(e.position,n)})),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:e=>{const{transform:n,width:r,height:o,d3Zoom:i,d3Selection:a,translateExtent:s}=t();if(!i||!a||!e.x&&!e.y)return!1;const l=Ur.translate(n[0]+e.x,n[1]+e.y).scale(n[2]),c=[[0,0],[r,o]],u=i?.constrain()(l,c,s);i.transform(a,u);return n[0]!==u.x||n[1]!==u.y||n[2]!==u.k},cancelConnection:()=>e({connectionNodeId:Ls.connectionNodeId,connectionHandleId:Ls.connectionHandleId,connectionHandleType:Ls.connectionHandleType,connectionStatus:Ls.connectionStatus,connectionStartHandle:Ls.connectionStartHandle,connectionEndHandle:Ls.connectionEndHandle}),reset:()=>e({...Ls})})),Object.is),Fs=({children:e})=>{const n=u(null);return n.current||(n.current=zs()),t.createElement(ao,{value:n.current},e)};Fs.displayName="ReactFlowProvider";const Vs=({children:e})=>o(io)?t.createElement(t.Fragment,null,e):t.createElement(Fs,null,e);Vs.displayName="ReactFlowWrapper";const Gs={input:Vi,default:zi,output:Hi,group:Wi},Hs={default:pi,straight:ci,step:li,smoothstep:si,simplebezier:ni},Ws=[0,0],Xs=[15,15],$s={x:0,y:0,zoom:1},Zs={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Ys=r((({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,className:i,nodeTypes:a=Gs,edgeTypes:s=Hs,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:b,onNodeMouseEnter:v,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:k,onNodeDoubleClick:C,onNodeDragStart:E,onNodeDrag:S,onNodeDragStop:_,onNodesDelete:I,onEdgesDelete:A,onSelectionChange:N,onSelectionDragStart:O,onSelectionDrag:R,onSelectionDragStop:T,onSelectionContextMenu:M,onSelectionStart:P,onSelectionEnd:D,connectionMode:j=Yo.Strict,connectionLineType:B=Ko.Bezier,connectionLineStyle:L,connectionLineComponent:z,connectionLineContainerStyle:F,deleteKeyCode:V="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:H=!1,selectionMode:W=Jo.Full,panActivationKeyCode:X="Space",multiSelectionKeyCode:$=(Ho()?"Meta":"Control"),zoomActivationKeyCode:Z=(Ho()?"Meta":"Control"),snapToGrid:Y=!1,snapGrid:U=Xs,onlyRenderVisibleElements:J=!1,selectNodesOnDrag:K=!0,nodesDraggable:q,nodesConnectable:Q,nodesFocusable:ee,nodeOrigin:te=Ws,edgesFocusable:ne,edgesUpdatable:re,elementsSelectable:oe,defaultViewport:ie=$s,minZoom:ae=.5,maxZoom:se=2,translateExtent:le=Bs,preventScrolling:ce=!0,nodeExtent:ue,defaultMarkerColor:de="#b1b1b7",zoomOnScroll:fe=!0,zoomOnPinch:pe=!0,panOnScroll:he=!1,panOnScrollSpeed:ge=.5,panOnScrollMode:ye=Uo.Free,zoomOnDoubleClick:be=!0,panOnDrag:ve=!0,onPaneClick:we,onPaneMouseEnter:xe,onPaneMouseMove:ke,onPaneMouseLeave:Ce,onPaneScroll:Ee,onPaneContextMenu:Se,children:_e,onEdgeContextMenu:Ie,onEdgeDoubleClick:Ae,onEdgeMouseEnter:Ne,onEdgeMouseMove:Oe,onEdgeMouseLeave:Re,onEdgeUpdate:Te,onEdgeUpdateStart:Me,onEdgeUpdateEnd:Pe,onReconnect:De,onReconnectStart:je,onReconnectEnd:Be,reconnectRadius:Le=10,edgeUpdaterRadius:ze=10,onNodesChange:Fe,onEdgesChange:Ve,noDragClassName:Ge="nodrag",noWheelClassName:He="nowheel",noPanClassName:We="nopan",fitView:Xe=!1,fitViewOptions:$e,connectOnClick:Ze=!0,attributionPosition:Ye,proOptions:Ue,defaultEdgeOptions:Je,elevateNodesOnSelect:Ke=!0,elevateEdgesOnSelect:qe=!1,disableKeyboardA11y:Qe=!1,autoPanOnConnect:et=!0,autoPanOnNodeDrag:tt=!0,connectionRadius:nt=20,isValidConnection:rt,onError:ot,style:it,id:at,nodeDragThreshold:st,...lt},ct)=>{const ut=at||"1";return t.createElement("div",{...lt,style:{...it,...Zs},ref:ct,className:me(["react-flow",i]),"data-testid":"rf__wrapper",id:at},t.createElement(Vs,null,t.createElement(js,{onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:k,onNodeDoubleClick:C,nodeTypes:a,edgeTypes:s,connectionLineType:B,connectionLineStyle:L,connectionLineComponent:z,connectionLineContainerStyle:F,selectionKeyCode:G,selectionOnDrag:H,selectionMode:W,deleteKeyCode:V,multiSelectionKeyCode:$,panActivationKeyCode:X,zoomActivationKeyCode:Z,onlyRenderVisibleElements:J,selectNodesOnDrag:K,defaultViewport:ie,translateExtent:le,minZoom:ae,maxZoom:se,preventScrolling:ce,zoomOnScroll:fe,zoomOnPinch:pe,zoomOnDoubleClick:be,panOnScroll:he,panOnScrollSpeed:ge,panOnScrollMode:ye,panOnDrag:ve,onPaneClick:we,onPaneMouseEnter:xe,onPaneMouseMove:ke,onPaneMouseLeave:Ce,onPaneScroll:Ee,onPaneContextMenu:Se,onSelectionContextMenu:M,onSelectionStart:P,onSelectionEnd:D,onEdgeContextMenu:Ie,onEdgeDoubleClick:Ae,onEdgeMouseEnter:Ne,onEdgeMouseMove:Oe,onEdgeMouseLeave:Re,onReconnect:De??Te,onReconnectStart:je??Me,onReconnectEnd:Be??Pe,reconnectRadius:Le??ze,defaultMarkerColor:de,noDragClassName:Ge,noWheelClassName:He,noPanClassName:We,elevateEdgesOnSelect:qe,rfId:ut,disableKeyboardA11y:Qe,nodeOrigin:te,nodeExtent:ue}),t.createElement(ea,{nodes:e,edges:n,defaultNodes:r,defaultEdges:o,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:b,nodesDraggable:q,nodesConnectable:Q,nodesFocusable:ee,edgesFocusable:ne,edgesUpdatable:re,elementsSelectable:oe,elevateNodesOnSelect:Ke,minZoom:ae,maxZoom:se,nodeExtent:ue,onNodesChange:Fe,onEdgesChange:Ve,snapToGrid:Y,snapGrid:U,connectionMode:j,translateExtent:le,connectOnClick:Ze,defaultEdgeOptions:Je,fitView:Xe,fitViewOptions:$e,onNodesDelete:I,onEdgesDelete:A,onNodeDragStart:E,onNodeDrag:S,onNodeDragStop:_,onSelectionDrag:R,onSelectionDragStart:O,onSelectionDragStop:T,noPanClassName:We,nodeOrigin:te,rfId:ut,autoPanOnConnect:et,autoPanOnNodeDrag:tt,onError:ot,connectionRadius:nt,isValidConnection:rt,nodeDragThreshold:st}),t.createElement(Ji,{onSelectionChange:N}),_e,t.createElement(Co,{proOptions:Ue,position:Ye}),t.createElement(sa,{rfId:ut,disableKeyboardA11y:Qe})))}));Ys.displayName="ReactFlow";const Us=e=>e.getNodes();const Js=e=>e.edges;const Ks=({id:e,x:n,y:r,width:o,height:i,style:a,color:s,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,onClick:p,selected:h})=>{const{background:m,backgroundColor:g}=a||{},y=s||m||g;return t.createElement("rect",{className:me(["react-flow__minimap-node",{selected:h},u]),x:n,y:r,rx:d,ry:d,width:o,height:i,fill:y,stroke:l,strokeWidth:c,shapeRendering:f,onClick:p?t=>p(t,e):void 0})};Ks.displayName="MiniMapNode";var qs=n(Ks);const Qs=e=>e.nodeOrigin,el=e=>e.getNodes().filter((e=>!e.hidden&&e.width&&e.height)),tl=e=>e instanceof Function?e:()=>e;var nl=n((function({nodeStrokeColor:e="transparent",nodeColor:n="#e2e2e2",nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:i=2,nodeComponent:a=qs,onClick:s}){const l=vo(el,xe),c=vo(Qs),u=tl(n),d=tl(e),f=tl(r),p="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return t.createElement(t.Fragment,null,l.map((e=>{const{x:n,y:r}=wi(e,c).positionAbsolute;return t.createElement(a,{key:e.id,x:n,y:r,width:e.width,height:e.height,style:e.style,selected:e.selected,className:f(e),color:u(e),borderRadius:o,strokeColor:d(e),strokeWidth:i,shapeRendering:p,onClick:s,id:e.id})})))}));const rl=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?(r=xi(t,e.nodeOrigin),o=n,Mo(Ro(To(r),To(o)))):n,rfId:e.rfId};var r,o};function ol({style:e,className:n,nodeStrokeColor:r="transparent",nodeColor:o="#e2e2e2",nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l=2,nodeComponent:c,maskColor:d="rgb(240, 240, 240, 0.6)",maskStrokeColor:f="none",maskStrokeWidth:p=1,position:h="bottom-right",onClick:m,onNodeClick:g,pannable:y=!1,zoomable:b=!1,ariaLabel:v="React Flow mini map",inversePan:w=!1,zoomStep:x=10,offsetScale:k=5}){const C=wo(),E=u(null),{boundingRect:S,viewBB:_,rfId:I}=vo(rl,xe),A=e?.width??200,N=e?.height??150,O=S.width/A,R=S.height/N,T=Math.max(O,R),M=T*A,P=T*N,D=k*T,j=S.x-(M-S.width)/2-D,B=S.y-(P-S.height)/2-D,L=M+2*D,z=P+2*D,F=`react-flow__minimap-desc-${I}`,V=u(0);V.current=T,s((()=>{if(E.current){const e=zt(E.current),t=e=>{const{transform:t,d3Selection:n,d3Zoom:r}=C.getState();if("wheel"!==e.sourceEvent.type||!n||!r)return;const o=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*x,i=t[2]*Math.pow(2,o);r.scaleTo(n,i)},n=e=>{const{transform:t,d3Selection:n,d3Zoom:r,translateExtent:o,width:i,height:a}=C.getState();if("mousemove"!==e.sourceEvent.type||!n||!r)return;const s=V.current*Math.max(1,t[2])*(w?-1:1),l={x:t[0]-e.sourceEvent.movementX*s,y:t[1]-e.sourceEvent.movementY*s},c=[[0,0],[i,a]],u=Ur.translate(l.x,l.y).scale(t[2]),d=r.constrain()(u,c,o);r.transform(n,d)},r=oo().on("zoom",y?n:null).on("zoom.wheel",b?t:null);return e.call(r),()=>{e.on("zoom",null)}}}),[y,b,w,x]);const G=m?e=>{const t=Ft(e);m(e,{x:t[0],y:t[1]})}:void 0,H=g?(e,t)=>{const n=C.getState().nodeInternals.get(t);g(e,n)}:void 0;return t.createElement(ko,{position:h,style:e,className:me(["react-flow__minimap",n]),"data-testid":"rf__minimap"},t.createElement("svg",{width:A,height:N,viewBox:`${j} ${B} ${L} ${z}`,role:"img","aria-labelledby":F,ref:E,onClick:G},v&&t.createElement("title",{id:F},v),t.createElement(nl,{onClick:H,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:c}),t.createElement("path",{className:"react-flow__minimap-mask",d:`M${j-D},${B-D}h${L+2*D}v${z+2*D}h${-L-2*D}z\n M${_.x},${_.y}h${_.width}v${_.height}h${-_.width}z`,fill:d,fillRule:"evenodd",stroke:f,strokeWidth:p,pointerEvents:"none"})))}ol.displayName="MiniMap";var il,al=n(ol);function sl({color:e,dimensions:n,lineWidth:r}){return t.createElement("path",{stroke:e,strokeWidth:r,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`})}function ll({color:e,radius:n}){return t.createElement("circle",{cx:n,cy:n,r:n,fill:e})}!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}(il||(il={}));const cl={[il.Dots]:"#91919a",[il.Lines]:"#eee",[il.Cross]:"#e2e2e2"},ul={[il.Dots]:1,[il.Lines]:1,[il.Cross]:6},dl=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function fl({id:e,variant:n=il.Dots,gap:r=20,size:o,lineWidth:i=1,offset:a=2,color:s,style:l,className:c}){const d=u(null),{transform:f,patternId:p}=vo(dl,xe),h=s||cl[n],m=o||ul[n],g=n===il.Dots,y=n===il.Cross,b=Array.isArray(r)?r:[r,r],v=[b[0]*f[2]||1,b[1]*f[2]||1],w=m*f[2],x=y?[w,w]:v,k=g?[w/a,w/a]:[x[0]/a,x[1]/a];return t.createElement("svg",{className:me(["react-flow__background",c]),style:{...l,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:d,"data-testid":"rf__background"},t.createElement("pattern",{id:p+e,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`},g?t.createElement(ll,{color:h,radius:w/a}):t.createElement(sl,{dimensions:x,color:h,lineWidth:i})),t.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${p+e})`}))}fl.displayName="Background";var pl=n(fl);const hl=({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r})=>[`${e}:${t}`,`${n}:${r}`].sort().join("--");function ml(e){console.error("Unhandled case: "+e)}class gl{constructor(e){this.iostore=e}get connected(){return this.iostore.getState().connected}set connected(e){this.iostore.setState({connected:e})}get does_trigger(){return this.iostore.getState().does_trigger}set does_trigger(e){this.iostore.setState({does_trigger:e})}get full_id(){return this.iostore.getState().full_id}set full_id(e){this.iostore.setState({full_id:e})}get id(){return this.iostore.getState().id}set id(e){this.iostore.setState({id:e})}get is_input(){return this.iostore.getState().is_input}set is_input(e){this.iostore.setState({is_input:e})}get name(){return this.iostore.getState().name}set name(e){this.iostore.setState({name:e})}get node(){return this.iostore.getState().node}set node(e){this.iostore.setState({node:e})}get type(){return this.iostore.getState().type}set type(e){this.iostore.setState({type:e})}get value(){return this.iostore.valuestore.getState().preview}set value(e){this.iostore.updateValueStore({preview:e})}get fullvalue(){return this.iostore.valuestore.getState().full}set fullvalue(e){this.iostore.updateValueStore({full:e})}get render_options(){return this.iostore.getState().render_options}set render_options(e){this.iostore.setState({render_options:e})}get hidden(){return this.iostore.getState().hidden}set hidden(e){this.iostore.setState({hidden:e})}get try_get_full_value(){return this.iostore.getState().try_get_full_value}get set_hidden(){return this.iostore.getState().set_hidden}}const yl=e=>t=>{const{iostore:n,...r}=t,o=new gl(n);return e({...r,io:o})},bl=e=>{const t=e.v?Number(e.v):0;if(t>1)throw new Error("Plugin version is too new");if(1===t)return e;const n=(e=>{const t=e.v?Number(e.v):0;if(t>0)throw new Error("Plugin version is too new");return e})(e);return{...n,renderpluginfactory:e=>{const t=n.renderpluginfactory?.(e)||{},r=n.RendererPlugin||{},o=Object.keys({...r,...t}),i={};for(const e of o)switch(e){case"input_renderers":const t={};for(const[e,n]of Object.entries(r.input_renderers||{}))void 0!==n&&(t[e]=yl(n));i.input_renderers=t;break;case"output_renderers":const n={};for(const[e,t]of Object.entries(r.output_renderers||{}))void 0!==t&&(n[e]=yl(t));i.output_renderers=n;break;case"handle_preview_renderers":const o={};for(const[e,t]of Object.entries(r.handle_preview_renderers||{}))void 0!==t&&(o[e]=yl(t));i.handle_preview_renderers=o;break;case"data_overlay_renderers":const a={};for(const[e,t]of Object.entries(r.data_overlay_renderers||{}))void 0!==t&&(a[e]=yl(t));i.data_overlay_renderers=a;break;case"data_preview_renderers":const s={};for(const[e,t]of Object.entries(r.data_preview_renderers||{}))void 0!==t&&(s[e]=yl(t));i.data_preview_renderers=s;break;case"data_view_renderers":const l={};for(const[e,t]of Object.entries(r.data_view_renderers||{}))void 0!==t&&(l[e]=yl(t));i.data_view_renderers=l;break;default:ml(e)}return i},v:1}},vl=0,wl=10,xl=20,kl=30,Cl=wl,El=e=>"string"==typeof e?e:e===vl?"DEBUG":e===wl?"INFO":e===xl?"WARN":e===kl?"ERROR":"UNKNOWN";class Sl{constructor(e,t=wl){this.name=e,this.level=(e=>{if("number"==typeof e)return e;const t=e.toLowerCase();if("debug"===t)return vl;if("info"===t)return wl;if("warn"===t||"warning"===t)return xl;if("error"===t)return kl;throw new Error(`Unknown log level: ${e}`)})(t),this._level_name=El(t)}set_level(e){this.level=e,this._level_name=El(e)}_fomat_message(e,...t){return`[${this.name}] ${this._level_name}: ${e} ${t.map((e=>JSON.stringify(e,function(){const e=[];return function(t,n){if("object"!=typeof n||null===n)return n;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(n)?"[Circular]":(e.push(n),n)}}()))).join(" ")}`}debug(e,...t){this.level<=vl&&console.debug(this._fomat_message(e,...t))}info(e,...t){this.level<=wl&&console.info(this._fomat_message(e,...t))}warn(e,...t){this.level<=xl&&console.warn(this._fomat_message(e,...t))}error(e,...t){this.level<=kl&&console.error(this._fomat_message(e,...t))}}const _l=(e,t)=>{const n=e.getState();if(((e,t)=>{const n=e.properties||{};n["frontend:size"]||(n["frontend:size"]=[200,100]);const r=n["frontend:pos"];if(!r||2!==r.length||isNaN(r[0])||null===r[0]||isNaN(r[1])||null===r[1])if(t&&t.rf_instance&&null!==t.reactflowRef){const e=t.reactflowRef.getBoundingClientRect(),r=e.left+e.width/2,o=e.top+e.height/2,i=t.rf_instance.screenToFlowPosition({x:r,y:o});n["frontend:pos"]=[i.x-n["frontend:size"][0]/2,i.y-n["frontend:size"][0]/2]}else n["frontend:pos"]=[0,0];n["frontend:collapsed"]||(n["frontend:collapsed"]=!1),e.properties=n})(n,t),void 0===n.id)throw new Error("Node must have an id");const r={nodestore:e};return{position:{x:n.properties["frontend:pos"][0],y:n.properties["frontend:pos"][1]},data:r,type:"default",...n}},Il=e=>{const t={...e},n=e=>{switch(e.type){case"add":(e=>{const t=r.getState();if(e.from_remote){let n=o.get_node(e.node.id,!1);if(!n)try{n=he(a,e.node),o.nodesstates.set(e.node.id,n)}catch(e){return void a.logger.error(`Failed to create node store ${e}`)}const i=n.getState();a.logger.info("Add node",i.id,i.name);const s=[...t.nodes,_l(n,a)];r.setState({nodes:s});for(const t in e.node.io){const n=e.node.io[t].id;void 0!==n&&a.worker?.get_io_value({nid:e.node.id,ioid:n})}setTimeout((()=>{a.worker?.call_hooks("node_added",{node:i.id})}),0)}})(e);break;case"update":(e=>{if(e.node.in_trigger&&(e.node.error=void 0),e.from_remote){const t=o.get_node(e.id,!1);if(!t)return void console.error("Node not found to update",e.id);t.update(e.node)}else a.worker&&a.worker.locally_update_node(e)})(e);break;case"delete":(e=>{a.logger.info("Deleting node",e.id),e.from_remote?r.getState().onNodesChange([{type:"remove",id:e.id}]):a.worker?.remove_node(e.id)})(e);break;case"error":(e=>{a.logger.error("Error",e),n({type:"update",id:e.id,node:{in_trigger:!1,error:e.error},from_remote:!0})})(e);break;case"trigger":(e=>{e.from_remote?n({type:"update",id:e.id,node:{in_trigger:!0,error:void 0},from_remote:!0}):a.worker?.trigger_node(e.id)})(e);break;default:a.logger.error("Unknown node action",e)}},r=(({on_node_change:e,on_edge_change:t,on_connect:n})=>{const r=e||(e=>{}),o=n||(e=>{}),i=Y(((e,t)=>({nodes:[],edges:[],onNodesChange:n=>{e({nodes:Pa(n,t().nodes)}),r(n)},onEdgesChange:n=>{e({edges:Da(n,t().edges)})},onConnect:e=>{null!=e.source&&null!=e.target&&o(e)}})));return i})({on_node_change:e=>{for(const t of e)switch(t.type){case"position":t.position&&n({type:"update",id:t.id,node:{properties:{"frontend:pos":[t.position.x,t.position.y]}},from_remote:!1});break;case"dimensions":t.dimensions&&n({type:"update",id:t.id,node:{properties:{"frontend:size":[t.dimensions.width,t.dimensions.height]}},from_remote:!1})}},on_edge_change:e=>{},on_connect:e=>{null!==e.source&&null!==e.target&&null!==e.sourceHandle&&null!==e.targetHandle&&a.worker&&a.worker.add_edge({src_nid:e.source,src_ioid:e.sourceHandle,trg_nid:e.target,trg_ioid:e.targetHandle,replace:!0})}}),o=(({})=>{const e=new Map;return{nodesstates:e,get_node:(t,n=!0)=>{const r=e.get(t);if(!r&&n){const n=e.keys();throw new Error(`Node ${t} not found, available nodes: ${Array.from(n)}`)}return r}}})({}),i={libstate:Y(((e,t)=>({lib:{shelves:[]},external_worker:[],set:t=>e((e=>({...e,...t}))),get_lib:()=>t().lib,get_external_worker:()=>t().external_worker})))},a={local_settings:Y(((e,t)=>({view_settings:{},update_view_settings:e=>{const t=a.local_settings.getState().view_settings,{new_obj:n,change:r}=K(t,e);r&&a.local_settings.setState((e=>({...e,view_settings:n})))}}))),local_state:Y(((e,t)=>({selected_nodes:[],selected_edges:[],funcnodescontainerRef:null}))),options:t,lib:i,workermanager:void 0,workers:Y(((e,t)=>({}))),workerstate:Y(((e,t)=>({is_open:!1}))),render_options:Y(((e,t)=>({}))),progress_state:Y(((e,t)=>({message:"please select worker",status:"info",progress:0,blocking:!1}))),update_render_options:e=>{const t=a.render_options.getState(),{new_obj:n,change:r}=K(t,e);r&&a.render_options.setState(n)},worker:void 0,_unsubscribeFromWorker:void 0,set_worker:e=>{e!==a.worker&&(a._unsubscribeFromWorker&&(a._unsubscribeFromWorker(),a._unsubscribeFromWorker=void 0),e&&(a._unsubscribeFromWorker=e.state.subscribe((e=>{a.workerstate.setState(e)})),a.workerstate.setState(e.state.getState())),a.worker=e,e?.set_zustand(a))},nodespace:o,useReactFlowStore:r,on_node_action:n,on_edge_action:e=>{const t=r.getState();switch(e.type){case"add":if(e.from_remote){const n=t.edges,o=hl(e);if(n.some((e=>e.id===o)))return;const i={id:o,source:e.src_nid,target:e.trg_nid,sourceHandle:e.src_ioid,targetHandle:e.trg_ioid,className:"funcnodes-edge animated"};a.logger.info("Adding edge",i),r.setState({edges:[...n,i]}),a.worker?.get_remote_node_state(e.src_nid),a.worker?.get_remote_node_state(e.trg_nid)}break;case"delete":if(e.from_remote){const n=t.edges,o=hl(e);a.logger.info("Deleting edge",o);const i=n.filter((e=>e.id!==o));r.setState({edges:i}),a.worker?.get_remote_node_state(e.src_nid),a.worker?.get_remote_node_state(e.trg_nid)}break;default:a.logger.error("Unknown edge action",e)}},reactflowRef:null,clear_all:()=>{a.worker?.disconnect(),a.set_worker(void 0),a.workermanager?.setWorker(void 0),a.lib.libstate.getState().set({lib:{shelves:[]},external_worker:[]}),a.nodespace.nodesstates.clear(),a.useReactFlowStore.setState({nodes:[],edges:[]}),a.auto_progress()},center_node:e=>{if(!a.rf_instance)return;e=Array.isArray(e)?e:[e];const t=a.useReactFlowStore.getState().nodes.filter((t=>e.includes(t.id)));t.length>0&&a.rf_instance?.fitView({padding:.2,nodes:t})},center_all:()=>{console.log("center all",a.rf_instance),a.rf_instance?.fitView({padding:.2})},set_progress:e=>{if(""===e.message)return a.auto_progress();const t=a.progress_state.getState(),{new_obj:n,change:r}=K(t,e);r&&a.progress_state.setState(n)},auto_progress:()=>void 0===a.workermanager||a.workermanager.open?void 0===a.worker?a.set_progress({progress:0,message:"please select worker",status:"error",blocking:!1}):a.worker.is_open?void a.set_progress({progress:1,message:"running",status:"info",blocking:!1}):a.set_progress({progress:0,message:"connecting to worker",status:"info",blocking:!0}):a.set_progress({progress:0,message:"connecting to worker manager",status:"error",blocking:!1}),plugins:Y(((e,t)=>({}))),add_plugin:(e,t)=>{if(void 0===t)return;const n=(e=>bl(e))(t);a.plugins.setState((t=>({...t,[e]:n})))},dev_settings:{debug:!0},logger:new Sl("fn",Cl)};return a};function Al(e,t){return function(){return e.apply(t,arguments)}}const{toString:Nl}=Object.prototype,{getPrototypeOf:Ol}=Object,Rl=(e=>t=>{const n=Nl.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Tl=e=>(e=e.toLowerCase(),t=>Rl(t)===e),Ml=e=>t=>typeof t===e,{isArray:Pl}=Array,Dl=Ml("undefined");const jl=Tl("ArrayBuffer");const Bl=Ml("string"),Ll=Ml("function"),zl=Ml("number"),Fl=e=>null!==e&&"object"==typeof e,Vl=e=>{if("object"!==Rl(e))return!1;const t=Ol(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},Gl=Tl("Date"),Hl=Tl("File"),Wl=Tl("Blob"),Xl=Tl("FileList"),$l=Tl("URLSearchParams"),[Zl,Yl,Ul,Jl]=["ReadableStream","Request","Response","Headers"].map(Tl);function Kl(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),Pl(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function ql(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Ql="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,ec=e=>!Dl(e)&&e!==Ql;const tc=(nc="undefined"!=typeof Uint8Array&&Ol(Uint8Array),e=>nc&&e instanceof nc);var nc;const rc=Tl("HTMLFormElement"),oc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),ic=Tl("RegExp"),ac=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Kl(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)},sc="abcdefghijklmnopqrstuvwxyz",lc="0123456789",cc={DIGIT:lc,ALPHA:sc,ALPHA_DIGIT:sc+sc.toUpperCase()+lc};const uc=Tl("AsyncFunction"),dc=(fc="function"==typeof setImmediate,pc=Ll(Ql.postMessage),fc?setImmediate:pc?((e,t)=>(Ql.addEventListener("message",(({source:n,data:r})=>{n===Ql&&r===e&&t.length&&t.shift()()}),!1),n=>{t.push(n),Ql.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var fc,pc;const hc="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Ql):"undefined"!=typeof process&&process.nextTick||dc;var mc={isArray:Pl,isArrayBuffer:jl,isBuffer:function(e){return null!==e&&!Dl(e)&&null!==e.constructor&&!Dl(e.constructor)&&Ll(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Ll(e.append)&&("formdata"===(t=Rl(e))||"object"===t&&Ll(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&jl(e.buffer),t},isString:Bl,isNumber:zl,isBoolean:e=>!0===e||!1===e,isObject:Fl,isPlainObject:Vl,isReadableStream:Zl,isRequest:Yl,isResponse:Ul,isHeaders:Jl,isUndefined:Dl,isDate:Gl,isFile:Hl,isBlob:Wl,isRegExp:ic,isFunction:Ll,isStream:e=>Fl(e)&&Ll(e.pipe),isURLSearchParams:$l,isTypedArray:tc,isFileList:Xl,forEach:Kl,merge:function e(){const{caseless:t}=ec(this)&&this||{},n={},r=(r,o)=>{const i=t&&ql(n,o)||o;Vl(n[i])&&Vl(r)?n[i]=e(n[i],r):Vl(r)?n[i]=e({},r):Pl(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&Kl(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(Kl(t,((t,r)=>{n&&Ll(t)?e[r]=Al(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&Ol(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:Rl,kindOfTest:Tl,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(Pl(e))return e;let t=e.length;if(!zl(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:rc,hasOwnProperty:oc,hasOwnProp:oc,reduceDescriptors:ac,freezeMethods:e=>{ac(e,((t,n)=>{if(Ll(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];Ll(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return Pl(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:ql,global:Ql,isContextDefined:ec,ALPHABET:cc,generateString:(e=16,t=cc.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&Ll(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(Fl(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=Pl(e)?[]:{};return Kl(e,((e,t)=>{const i=n(e,r+1);!Dl(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:uc,isThenable:e=>e&&(Fl(e)||Ll(e))&&Ll(e.then)&&Ll(e.catch),setImmediate:dc,asap:hc};function gc(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}mc.inherits(gc,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:mc.toJSONObject(this.config),code:this.code,status:this.status}}});const yc=gc.prototype,bc={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{bc[e]={value:e}})),Object.defineProperties(gc,bc),Object.defineProperty(yc,"isAxiosError",{value:!0}),gc.from=(e,t,n,r,o,i)=>{const a=Object.create(yc);return mc.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),gc.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function vc(e){return mc.isPlainObject(e)||mc.isArray(e)}function wc(e){return mc.endsWith(e,"[]")?e.slice(0,-2):e}function xc(e,t,n){return e?e.concat(t).map((function(e,t){return e=wc(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const kc=mc.toFlatObject(mc,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Cc(e,t,n){if(!mc.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=mc.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!mc.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&mc.isSpecCompliantForm(t);if(!mc.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(mc.isDate(e))return e.toISOString();if(!s&&mc.isBlob(e))throw new gc("Blob is not supported. Use a Buffer instead.");return mc.isArrayBuffer(e)||mc.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(mc.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(mc.isArray(e)&&function(e){return mc.isArray(e)&&!e.some(vc)}(e)||(mc.isFileList(e)||mc.endsWith(n,"[]"))&&(s=mc.toArray(e)))return n=wc(n),s.forEach((function(e,r){!mc.isUndefined(e)&&null!==e&&t.append(!0===a?xc([n],r,i):null===a?n:n+"[]",l(e))})),!1;return!!vc(e)||(t.append(xc(o,n,i),l(e)),!1)}const u=[],d=Object.assign(kc,{defaultVisitor:c,convertValue:l,isVisitable:vc});if(!mc.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!mc.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),mc.forEach(n,(function(n,i){!0===(!(mc.isUndefined(n)||null===n)&&o.call(t,n,mc.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t}function Ec(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Sc(e,t){this._pairs=[],e&&Cc(e,this,t)}const _c=Sc.prototype;function Ic(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ac(e,t,n){if(!t)return e;const r=n&&n.encode||Ic;mc.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):mc.isURLSearchParams(t)?t.toString():new Sc(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}_c.append=function(e,t){this._pairs.push([e,t])},_c.toString=function(e){const t=e?function(t){return e.call(this,t,Ec)}:Ec;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class Nc{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){mc.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var Oc={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rc={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Sc,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Tc="undefined"!=typeof window&&"undefined"!=typeof document,Mc="object"==typeof navigator&&navigator||void 0,Pc=Tc&&(!Mc||["ReactNative","NativeScript","NS"].indexOf(Mc.product)<0),Dc="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,jc=Tc&&window.location.href||"http://localhost";var Bc={...Object.freeze({__proto__:null,hasBrowserEnv:Tc,hasStandardBrowserEnv:Pc,hasStandardBrowserWebWorkerEnv:Dc,navigator:Mc,origin:jc}),...Rc};function Lc(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&mc.isArray(r)?r.length:i,s)return mc.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&mc.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&mc.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(mc.isFormData(e)&&mc.isFunction(e.entries)){const n={};return mc.forEachEntry(e,((e,r)=>{t(function(e){return mc.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const zc={transitional:Oc,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=mc.isObject(e);o&&mc.isHTMLForm(e)&&(e=new FormData(e));if(mc.isFormData(e))return r?JSON.stringify(Lc(e)):e;if(mc.isArrayBuffer(e)||mc.isBuffer(e)||mc.isStream(e)||mc.isFile(e)||mc.isBlob(e)||mc.isReadableStream(e))return e;if(mc.isArrayBufferView(e))return e.buffer;if(mc.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Cc(e,new Bc.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return Bc.isNode&&mc.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=mc.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Cc(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(mc.isString(e))try{return(t||JSON.parse)(e),mc.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||zc.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(mc.isResponse(e)||mc.isReadableStream(e))return e;if(e&&mc.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw gc.from(e,gc.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bc.classes.FormData,Blob:Bc.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};mc.forEach(["delete","get","head","post","put","patch"],(e=>{zc.headers[e]={}}));const Fc=mc.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Vc=Symbol("internals");function Gc(e){return e&&String(e).trim().toLowerCase()}function Hc(e){return!1===e||null==e?e:mc.isArray(e)?e.map(Hc):String(e)}function Wc(e,t,n,r,o){return mc.isFunction(r)?r.call(this,t,n):(o&&(t=n),mc.isString(t)?mc.isString(r)?-1!==t.indexOf(r):mc.isRegExp(r)?r.test(t):void 0:void 0)}let Xc=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Gc(t);if(!o)throw new Error("header name must be a non-empty string");const i=mc.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=Hc(e))}const i=(e,t)=>mc.forEach(e,((e,n)=>o(e,n,t)));if(mc.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(mc.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&Fc[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(mc.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=Gc(e)){const n=mc.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(mc.isFunction(t))return t.call(this,e,n);if(mc.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Gc(e)){const n=mc.findKey(this,e);return!(!n||void 0===this[n]||t&&!Wc(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Gc(e)){const o=mc.findKey(n,e);!o||t&&!Wc(0,n[o],o,t)||(delete n[o],r=!0)}}return mc.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Wc(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return mc.forEach(this,((r,o)=>{const i=mc.findKey(n,o);if(i)return t[i]=Hc(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=Hc(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return mc.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&mc.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[Vc]=this[Vc]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Gc(e);t[r]||(!function(e,t){const n=mc.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return mc.isArray(e)?e.forEach(r):r(e),this}};function $c(e,t){const n=this||zc,r=t||n,o=Xc.from(r.headers);let i=r.data;return mc.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function Zc(e){return!(!e||!e.__CANCEL__)}function Yc(e,t,n){gc.call(this,null==e?"canceled":e,gc.ERR_CANCELED,t,n),this.name="CanceledError"}function Uc(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new gc("Request failed with status code "+n.status,[gc.ERR_BAD_REQUEST,gc.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}Xc.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),mc.reduceDescriptors(Xc.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),mc.freezeMethods(Xc),mc.inherits(Yc,gc,{__CANCEL__:!0});const Jc=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),i-s)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},Kc=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},qc=e=>(...t)=>mc.asap((()=>e(...t)));var Qc=Bc.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Bc.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Bc.origin),Bc.navigator&&/(msie|trident)/i.test(Bc.navigator.userAgent)):()=>!0,eu=Bc.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];mc.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),mc.isString(r)&&a.push("path="+r),mc.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function tu(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const nu=e=>e instanceof Xc?{...e}:e;function ru(e,t){t=t||{};const n={};function r(e,t,n,r){return mc.isPlainObject(e)&&mc.isPlainObject(t)?mc.merge.call({caseless:r},e,t):mc.isPlainObject(t)?mc.merge({},t):mc.isArray(t)?t.slice():t}function o(e,t,n,o){return mc.isUndefined(t)?mc.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!mc.isUndefined(t))return r(void 0,t)}function a(e,t){return mc.isUndefined(t)?mc.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(nu(e),nu(t),0,!0)};return mc.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=l[r]||o,a=i(e[r],t[r],r);mc.isUndefined(a)&&i!==s||(n[r]=a)})),n}var ou=e=>{const t=ru({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=Xc.from(s),t.url=Ac(tu(t.baseURL,t.url),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),mc.isFormData(r))if(Bc.hasStandardBrowserEnv||Bc.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(Bc.hasStandardBrowserEnv&&(o&&mc.isFunction(o)&&(o=o(t)),o||!1!==o&&Qc(t.url))){const e=i&&a&&eu.read(a);e&&s.set(i,e)}return t};var iu="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=ou(e);let o=r.data;const i=Xc.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=Xc.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Uc((function(e){t(e),h()}),(function(e){n(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new gc("Request aborted",gc.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new gc("Network Error",gc.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Oc;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new gc(t,o.clarifyTimeoutError?gc.ETIMEDOUT:gc.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&mc.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),mc.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=Jc(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=Jc(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new Yc(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===Bc.protocols.indexOf(y)?n(new gc("Unsupported protocol "+y+":",gc.ERR_BAD_REQUEST,e)):m.send(o||null)}))};const au=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof gc?t:new Yc(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new gc(`timeout ${t} of ms exceeded`,gc.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>mc.asap(a),s}},su=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},lu=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},cu=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of lu(e))yield*su(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},uu="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,du=uu&&"function"==typeof ReadableStream,fu=uu&&("function"==typeof TextEncoder?(pu=new TextEncoder,e=>pu.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var pu;const hu=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},mu=du&&hu((()=>{let e=!1;const t=new Request(Bc.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),gu=du&&hu((()=>mc.isReadableStream(new Response("").body))),yu={stream:gu&&(e=>e.body)};var bu;uu&&(bu=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!yu[e]&&(yu[e]=mc.isFunction(bu[e])?t=>t[e]():(t,n)=>{throw new gc(`Response type '${e}' is not supported`,gc.ERR_NOT_SUPPORT,n)})})));const vu=async(e,t)=>{const n=mc.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(mc.isBlob(e))return e.size;if(mc.isSpecCompliantForm(e)){const t=new Request(Bc.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return mc.isArrayBufferView(e)||mc.isArrayBuffer(e)?e.byteLength:(mc.isURLSearchParams(e)&&(e+=""),mc.isString(e)?(await fu(e)).byteLength:void 0)})(t):n};var wu=uu&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=ou(e);c=c?(c+"").toLowerCase():"text";let p,h=au([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&mu&&"get"!==n&&"head"!==n&&0!==(g=await vu(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(mc.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=Kc(g,Jc(qc(l)));r=cu(n.body,65536,e,t)}}mc.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(p);const a=gu&&("stream"===c||"response"===c);if(gu&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=mc.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&Kc(t,Jc(qc(s),!0))||[];i=new Response(cu(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let y=await yu[mc.findKey(yu,c)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,n)=>{Uc(t,n,{data:y,headers:Xc.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new gc("Network Error",gc.ERR_NETWORK,e,p),{cause:t.cause||t});throw gc.from(t,t&&t.code,e,p)}});const xu={http:null,xhr:iu,fetch:wu};mc.forEach(xu,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const ku=e=>`- ${e}`,Cu=e=>mc.isFunction(e)||null===e||!1===e;var Eu=e=>{e=mc.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Cu(n)&&(r=xu[(t=String(n)).toLowerCase()],void 0===r))throw new gc(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new gc("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(ku).join("\n"):" "+ku(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Su(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yc(null,e)}function _u(e){Su(e),e.headers=Xc.from(e.headers),e.data=$c.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Eu(e.adapter||zc.adapter)(e).then((function(t){return Su(e),t.data=$c.call(e,e.transformResponse,t),t.headers=Xc.from(t.headers),t}),(function(t){return Zc(t)||(Su(e),t&&t.response&&(t.response.data=$c.call(e,e.transformResponse,t.response),t.response.headers=Xc.from(t.response.headers))),Promise.reject(t)}))}const Iu="1.7.9",Au={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Au[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Nu={};Au.transitional=function(e,t,n){function r(e,t){return"[Axios v1.7.9] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new gc(r(o," has been removed"+(t?" in "+t:"")),gc.ERR_DEPRECATED);return t&&!Nu[o]&&(Nu[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Au.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Ou={assertOptions:function(e,t,n){if("object"!=typeof e)throw new gc("options must be an object",gc.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new gc("option "+i+" must be "+n,gc.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new gc("Unknown option "+i,gc.ERR_BAD_OPTION)}},validators:Au};const Ru=Ou.validators;let Tu=class{constructor(e){this.defaults=e,this.interceptors={request:new Nc,response:new Nc}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ru(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Ou.assertOptions(n,{silentJSONParsing:Ru.transitional(Ru.boolean),forcedJSONParsing:Ru.transitional(Ru.boolean),clarifyTimeoutError:Ru.transitional(Ru.boolean)},!1),null!=r&&(mc.isFunction(r)?t.paramsSerializer={serialize:r}:Ou.assertOptions(r,{encode:Ru.function,serialize:Ru.function},!0)),Ou.assertOptions(t,{baseUrl:Ru.spelling("baseURL"),withXsrfToken:Ru.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&mc.merge(o.common,o[t.method]);o&&mc.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Xc.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[_u.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=_u.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Ac(tu((e=ru(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}};mc.forEach(["delete","get","head","options"],(function(e){Tu.prototype[e]=function(t,n){return this.request(ru(n||{},{method:e,url:t,data:(n||{}).data}))}})),mc.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(ru(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Tu.prototype[e]=t(),Tu.prototype[e+"Form"]=t(!0)}));const Mu={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Mu).forEach((([e,t])=>{Mu[t]=e}));const Pu=function e(t){const n=new Tu(t),r=Al(Tu.prototype.request,n);return mc.extend(r,Tu.prototype,n,{allOwnKeys:!0}),mc.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ru(t,n))},r}(zc);Pu.Axios=Tu,Pu.CanceledError=Yc,Pu.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new Yc(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}},Pu.isCancel=Zc,Pu.VERSION=Iu,Pu.toFormData=Cc,Pu.AxiosError=gc,Pu.Cancel=Pu.CanceledError,Pu.all=function(e){return Promise.all(e)},Pu.spread=function(e){return function(t){return e.apply(null,t)}},Pu.isAxiosError=function(e){return mc.isObject(e)&&!0===e.isAxiosError},Pu.mergeConfig=ru,Pu.AxiosHeaders=Xc,Pu.formToJSON=e=>Lc(mc.isHTMLForm(e)?new FormData(e):e),Pu.getAdapter=Eu,Pu.HttpStatusCode=Mu,Pu.default=Pu;const{Axios:Du,AxiosError:ju,CanceledError:Bu,isCancel:Lu,CancelToken:zu,VERSION:Fu,all:Vu,Cancel:Gu,isAxiosError:Hu,spread:Wu,toFormData:Xu,AxiosHeaders:$u,HttpStatusCode:Zu,formToJSON:Yu,getAdapter:Uu,mergeConfig:Ju}=Pu;let Ku;const qu=new Uint8Array(16);function Qu(){if(!Ku&&(Ku="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ku))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ku(qu)}const ed=[];for(let e=0;e<256;++e)ed.push((e+256).toString(16).slice(1));var td={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function nd(e,t,n){if(td.randomUUID&&!e)return td.randomUUID();const r=(e=e||{}).random||(e.rng||Qu)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return ed[e[t+0]]+ed[e[t+1]]+ed[e[t+2]]+ed[e[t+3]]+"-"+ed[e[t+4]]+ed[e[t+5]]+"-"+ed[e[t+6]]+ed[e[t+7]]+"-"+ed[e[t+8]]+ed[e[t+9]]+"-"+ed[e[t+10]]+ed[e[t+11]]+ed[e[t+12]]+ed[e[t+13]]+ed[e[t+14]]+ed[e[t+15]]}(r)}class rd{constructor(e){this._hooks=new Map,this._ns_event_intercepts=new Map,this._unique_cmd_outs={},this.uuid=e.uuid,this.on_error=e.on_error||(e=>{this._zustand?.logger.error(e)}),this.messagePromises=new Map,this._local_nodeupdates=new Map,this._nodeupdatetimer=setTimeout((()=>{this.sync_local_node_updates()}),5e3),this.state=Y(((e,t)=>({is_open:!1}))),e.zustand&&this.set_zustand(e.zustand),e.on_sync_complete?this.on_sync_complete=e.on_sync_complete:this.on_sync_complete=async()=>{},this._responsive=!1,this._last_pong=Date.now()-36e5,setInterval((()=>{this.is_open&&this.send({type:"ping"})}),1e3),setInterval((()=>{Date.now()-this._last_pong>5e3?this._responsive=!1:this._responsive=!0}),5e3)}_receive_pong(){this._last_pong=Date.now(),this._responsive=!0}set_zustand(e){e!==this._zustand&&(this._zustand=e,e.set_worker(this),this._zustand.auto_progress(),this.stepwise_fullsync())}add_hook(e,t){const n=this._hooks.get(e)||[];n.push(t),this._hooks.set(e,n);return()=>{const n=this._hooks.get(e)||[],r=n.indexOf(t);r>=0&&n.splice(r,1)}}async call_hooks(e,t){const n=[];for(const r of this._hooks.get(e)||[]){const e=r({worker:this,data:t});e instanceof Promise&&n.push(e)}await Promise.all(n)}add_ns_event_intercept(e,t){const n=this._ns_event_intercepts.get(e)||[];n.push(t),this._ns_event_intercepts.set(e,n);return()=>{const n=this._ns_event_intercepts.get(e)||[],r=n.indexOf(t);r>=0&&n.splice(r,1)}}async intercept_ns_event(e){let t=e;for(const n of this._ns_event_intercepts.get(e.event)||[])t=await n(t);return t}get is_open(){return this.state.getState().is_open}set is_open(e){this.state.setState({is_open:e})}async stepwise_fullsync(){this._zustand&&this.is_open&&(await this.sync_lib(),await this.sync_external_worker(),await this.sync_funcnodes_plugins(),await this.sync_nodespace(),await this.sync_view_state(),await this.on_sync_complete(this))}async sync_lib(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_library",wait_for_response:!0,retries:2,unique:!0});this._zustand.lib.libstate.getState().set({lib:e})}async sync_external_worker(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_worker_dependencies",wait_for_response:!0,unique:!0});this._zustand.lib.libstate.getState().set({external_worker:e})}async sync_funcnodes_plugins(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_plugin_keys",wait_for_response:!0,unique:!0,kwargs:{type:"react"}});for(const t of e){const e=await this._send_cmd({cmd:"get_plugin",wait_for_response:!0,kwargs:{key:t,type:"react"},unique:!0});if(e.js)for(const t of e.js){const e=document.createElement("script");e.text=atob(t),document.body.appendChild(e)}if(e.css)for(const t of e.css){const e=document.createElement("style");e.innerHTML=atob(t),document.head.appendChild(e)}if(void 0!==e.module){const n=atob(e.module),r=n.length,o=new Uint8Array(r);for(let e=0;e<r;e++)o[e]=n.charCodeAt(e);const i=new Blob([o],{type:"application/javascript"}),a=URL.createObjectURL(i),s=await import(a);URL.revokeObjectURL(a),this._zustand.add_plugin(t,s.default)}}}async sync_view_state(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"view_state",wait_for_response:!0,unique:!0});e.renderoptions&&this._zustand.update_render_options(e.renderoptions);const t=e.nodes;if(t)for(const e in t){const n={};ne(n,t[e]),this._zustand.on_node_action({type:"update",node:n,id:e,from_remote:!0})}}async sync_nodespace(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_nodes",kwargs:{with_frontend:!0},wait_for_response:!0,unique:!0});for(const t of e)this._receive_node_added(t);const t=await this._send_cmd({cmd:"get_edges",wait_for_response:!0,unique:!0});for(const e of t)this._receive_edge_added(...e)}async fullsync(){if(!this._zustand)return;if(!this.is_open)return;let e;for(;;)try{e=await this._send_cmd({cmd:"full_state",unique:!0});break}catch(e){this._zustand.logger.error("Error in fullsync",e)}this._zustand.logger.debug("Full state",e),this._zustand.lib.libstate.getState().set({lib:e.backend.lib,external_worker:e.worker_dependencies}),e.view.renderoptions&&this._zustand.update_render_options(e.view.renderoptions);const t=e.view.nodes;for(const n of e.backend.nodes){const e=t[n.id];void 0!==e&&ne(n,e),this._receive_node_added(n)}for(const t of e.backend.edges)this._receive_edge_added(...t)}async _receive_edge_added(e,t,n,r){this._zustand&&this._zustand.on_edge_action({type:"add",from_remote:!0,src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r})}async trigger_node(e){await this._send_cmd({cmd:"trigger_node",kwargs:{nid:e},wait_for_response:!1})}async add_node(e){const t=await this._send_cmd({cmd:"add_node",kwargs:{id:e}});this._receive_node_added(t)}async remove_node(e){await this._send_cmd({cmd:"remove_node",kwargs:{id:e}})}async _receive_node_added(e){this._zustand&&this._zustand.on_node_action({type:"add",node:e,id:e.id,from_remote:!0})}add_edge({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r,replace:o=!1}){return this._send_cmd({cmd:"add_edge",kwargs:{src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r,replace:o}})}remove_edge({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r}){return this._send_cmd({cmd:"remove_edge",kwargs:{src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r}})}async add_external_worker({module:e,cls_module:t,cls_name:n}){return await this._send_cmd({cmd:"add_external_worker",kwargs:{module:e,cls_module:t,cls_name:n}})}sync_local_node_updates(){clearTimeout(this._nodeupdatetimer),this._local_nodeupdates.forEach((async(e,t)=>{const n=await this._send_cmd({cmd:"update_node",kwargs:{nid:t,data:e},wait_for_response:!0});this._zustand&&this._zustand.on_node_action({type:"update",node:n,id:t,from_remote:!0})})),this._local_nodeupdates.clear(),this._nodeupdatetimer=setTimeout((()=>{this.sync_local_node_updates()}),200)}locally_update_node(e){const t=this._local_nodeupdates.get(e.id);if(t){const{new_obj:n,change:r}=K(t,e.node);r&&this._local_nodeupdates.set(e.id,n)}else this._local_nodeupdates.set(e.id,e.node);e.immediate&&this.sync_local_node_updates()}async get_remote_node_state(e){const t=await this._send_cmd({cmd:"get_node_state",kwargs:{nid:e},wait_for_response:!0});this._zustand&&this._zustand.on_node_action({type:"update",node:t,id:t.id,from_remote:!0})}set_io_value({nid:e,ioid:t,value:n,set_default:r=!1}){return this._send_cmd({cmd:"set_io_value",kwargs:{nid:e,ioid:t,value:n,set_default:r},wait_for_response:!0})}clear(){return this._send_cmd({cmd:"clear",unique:!0})}save(){return this._send_cmd({cmd:"save",wait_for_response:!0,unique:!0})}load(e){return this._send_cmd({cmd:"load_data",kwargs:{data:e},wait_for_response:!0}).then((()=>{this.stepwise_fullsync()}))}async get_io_value({nid:e,ioid:t}){const n=await this._send_cmd({cmd:"get_io_value",kwargs:{nid:e,ioid:t},wait_for_response:!0});return this._zustand?(this._zustand.on_node_action({type:"update",node:{io:{[t]:{value:n}}},id:e,from_remote:!0}),n):n}async get_ios_values({nid:e}){const t=await this._send_cmd({cmd:"get_ios_values",kwargs:{nid:e},wait_for_response:!0});if(!this._zustand)return t;const n={};for(const e in t)n[e]={value:t[e]};return this._zustand.on_node_action({type:"update",node:{io:n},id:e,from_remote:!0}),t}async get_runstate(){return await this._send_cmd({cmd:"get_runstate",wait_for_response:!0,unique:!0})}async _send_cmd({cmd:e,kwargs:t,as_bytes:n=!1,wait_for_response:r=!0,response_timeout:o=5e3,retries:i=2,unique:a=!1}){const s={type:"cmd",as_bytes:n,cmd:e,kwargs:t||{}};if(await new Promise((async e=>{if(this._responsive)return e();const t=setInterval((()=>{this._responsive&&(clearInterval(t),e())}),100)})),r){if(a&&void 0!==this._unique_cmd_outs[s.cmd])return this._unique_cmd_outs[s.cmd];i<0&&(i=0);const t=async()=>{let t;for(;i>=0;){const n=s.id||nd();s.id=n;const r=new Promise(((t,r)=>{const i=setTimeout((()=>{r("Timeout@wait_for_response for "+e)}),o);this.messagePromises.set(n,{resolve:e=>{clearTimeout(i),t(e),this.messagePromises.delete(n)},reject:e=>{clearTimeout(i),r(e),this.messagePromises.delete(n)}})}));await this.send(s);try{t=await r;break}catch(e){if(0===i)throw delete this._unique_cmd_outs[s.cmd],e;i-=1;continue}}return delete this._unique_cmd_outs[s.cmd],t},n=t();return a&&(this._unique_cmd_outs[s.cmd]=n),n}return this.send(s)}async send(e){throw new Error("async send(data: any) not implemented")}async upload_file({files:e,onProgressCallback:t,root:n}){throw new Error("upload_file not implemented ")}async handle_large_message_hint({}){throw new Error("async handle_large_message_hint({}: LargeMessageHint) not implemented ")}async receive_workerevent({event:e,data:t}){switch(e){case"worker_error":if(!this._zustand)return;return this._zustand.logger.error(t.error);case"update_worker_dependencies":if(!this._zustand)return;return this._zustand.lib.libstate.getState().set({external_worker:t.worker_dependencies});case"lib_update":return void await this.sync_lib();case"fullsync":return void await this.stepwise_fullsync();case"external_worker_update":return await this.sync_lib(),void await this.sync_external_worker();case"starting":return void this.call_hooks("starting");case"stopping":return void this.call_hooks("stopping");default:console.warn("Unhandled worker event",e,t)}}async receive_nodespace_event(e){const{event:t,data:n}=await this.intercept_ns_event(e);switch(t){case"after_set_value":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,io:{[n.io]:{value:n.result}}},id:n.node,from_remote:!0});case"after_update_value_options":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,io:{[n.io]:{value_options:n.result}}},id:n.node,from_remote:!0});case"triggerstart":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!0},id:n.node,from_remote:!0});case"triggerdone":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!1},id:n.node,from_remote:!0});case"triggerfast":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!0},id:n.node,from_remote:!0}),void setTimeout((()=>{this._zustand&&this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!1},id:n.node,from_remote:!0})}),50);case"node_trigger_error":if(!this._zustand)return;return this._zustand.on_node_action({type:"error",errortype:"trigger",error:n.error,id:n.node,tb:n.tb,from_remote:!0});case"node_removed":if(!this._zustand)return;return this._zustand.on_node_action({type:"delete",id:n.node,from_remote:!0}),void this.call_hooks("node_removed",{node:n.node});case"node_added":return void this._receive_node_added(n.node);case"after_disconnect":case"after_unforward":if(!n.result)return;if(!Array.isArray(n.result))return;if(4!==n.result.length)return;if(!this._zustand)return;return this._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:n.result[0],src_ioid:n.result[1],trg_nid:n.result[2],trg_ioid:n.result[3]});case"after_connect":case"after_forward":if(!n.result)return;if(!Array.isArray(n.result))return;if(4!==n.result.length)return;return this._receive_edge_added(...n.result);case"after_add_shelf":case"after_remove_shelf":if(!n.result)return;if(!this._zustand)return;return this._zustand.lib.libstate.getState().set({lib:n.result});case"progress":if(!this._zustand)return;if(n.node)return this._zustand.on_node_action({type:"update",node:{id:n.node,progress:n.info},id:n.node,from_remote:!0});console.warn("Unhandled nodepsace event",t,n);break;default:console.warn("Unhandled nodepsace event",t,n)}}async add_lib(e,t){return await this._send_cmd({cmd:"add_package_dependency",kwargs:{name:e,version:t},wait_for_response:!1})}async remove_lib(e){return await this._send_cmd({cmd:"remove_package_dependency",kwargs:{name:e},wait_for_response:!1})}async receive(e){let t;switch(this._last_pong=Date.now(),this._responsive=!0,e.type){case"pong":return void this._receive_pong();case"nsevent":return await this.receive_nodespace_event(e);case"result":if(t=e.id&&this.messagePromises.get(e.id),t)return t.resolve(e.result);break;case"error":if(this.on_error(e.tb+"\n"+e.error),t=e.id&&this.messagePromises.get(e.id),t)return t.reject(e.error);break;case"progress":if(!this._zustand)return;this._zustand.set_progress(e);break;case"workerevent":return await this.receive_workerevent(e);case"large_message":return await this.handle_large_message_hint(e);default:console.warn("Unhandled message",e)}}async recieve_bytes(e,t){const{type:n}=e;if("io_value"===n){if(!this._zustand)return;const{node:n,io:r,preview:o,mime:i}=e,a=o?"value":"fullvalue";n&&r||console.error("Invalid io_value message",e);const s=ce({data:t,mime:i||"application/octet-stream"});this._zustand.on_node_action({type:"update",node:{id:n,io:{[r]:{[a]:s}}},id:n,from_remote:!0})}else if("result"==n){const n=e.id&&this.messagePromises.get(e.id);n&&n.resolve({bytes:t,header:e})}else console.warn("Unhandled bytes message",e)}disconnect(){}onclose(){this.is_open=!1,this._zustand&&this._zustand.auto_progress()}async reconnect(){}async stop(){await this._send_cmd({cmd:"stop_worker",wait_for_response:!1});const e=this.onclose.bind(this);this.onclose=()=>{e(),this._zustand&&(this._zustand.worker===this&&this._zustand.clear_all(),this.onclose=e)}}async get_io_full_value({nid:e,ioid:t}){const n=await this._send_cmd({cmd:"get_io_full_value",kwargs:{nid:e,ioid:t},wait_for_response:!0,as_bytes:!0});if(!this._zustand)return n;if(!this._zustand)return;const{header:r,bytes:o}=n,{mime:i}=r,a=ce({data:o,mime:i||"application/octet-stream"});return this._zustand.on_node_action({type:"update",node:{id:e,io:{[t]:{fullvalue:a}}},id:e,from_remote:!0}),n}async update_io_options({nid:e,ioid:t,options:n}){const r=await this._send_cmd({cmd:"update_io_options",kwargs:{nid:e,ioid:t,...n},wait_for_response:!0});if(!this._zustand)return r;this._zustand.on_node_action({type:"update",node:{io:{[t]:{...n}}},id:e,from_remote:!0})}async get_node_status(e){return await this._send_cmd({cmd:"get_node_state",kwargs:{nid:e},wait_for_response:!0})}async get_available_modules(){return await this._send_cmd({cmd:"get_available_modules",wait_for_response:!0,unique:!0})}async update_external_worker(e,t,n){return await this._send_cmd({cmd:"update_external_worker",kwargs:{worker_id:e,class_id:t,...n},wait_for_response:!0})}async remove_external_worker(e,t){return await this._send_cmd({cmd:"remove_external_worker",kwargs:{worker_id:e,class_id:t},wait_for_response:!0})}async export({withFiles:e=!1}){return await this._send_cmd({cmd:"export_worker",wait_for_response:!0,kwargs:{with_files:e}})}async update_from_export(e){const t=this.add_hook("node_added",(async({})=>{this._zustand?.center_all()}));try{const t=await this._send_cmd({cmd:"update_from_export",kwargs:{data:e},wait_for_response:!0,response_timeout:6e5,unique:!0});return await new Promise((e=>{setTimeout((()=>{e()}),1e3)})),await this.stepwise_fullsync(),t}finally{t()}}}class od extends rd{constructor(e){super(e),this._websocket=null,this.reconnectAttempts=0,this.maxReconnectAttempts=999,this.initialTimeout=200,this.maxTimeout=5e3,this._reconnect=!0,this.CHUNK_TIMEOUT=1e4,this.blobChunks={},this._url=e.url,new Promise((e=>{this.connect(),e(null)})),this._zustand&&this._zustand.auto_progress();setInterval((()=>{const e=Date.now();for(const t in this.blobChunks)e-this.blobChunks[t].timestamp>this.CHUNK_TIMEOUT&&delete this.blobChunks[t]}),5e3)}connect(){this._zustand?.logger.info("Connecting to websocket"),this.is_open=!1,this._websocket=new WebSocket(this._url),this._websocket.onopen=()=>{this.onopen()},this._websocket.onclose=()=>{this.onclose()},this._websocket.onerror=()=>{this.on_ws_error()},this._websocket.onmessage=e=>{"string"==typeof e.data?this.onmessage(e.data):e.data instanceof Blob&&this.onbytes(e.data)}}calculateReconnectTimeout(){return Math.min(this.initialTimeout*Math.pow(2,this.reconnectAttempts),this.maxTimeout)}auto_reconnect(){if(this.reconnectAttempts<this.maxReconnectAttempts){let e=this.calculateReconnectTimeout();this._zustand?.logger.info(`Attempting to reconnect in ${e} ms`),setTimeout((()=>{this._websocket&&this._websocket.readyState===WebSocket.OPEN||(this.reconnectAttempts++,this.connect())}),e)}else this._zustand?.logger.warn("Maximum reconnect attempts reached. Giving up.")}async onmessage(e){try{const t=JSON.parse(e);this._zustand?.logger.debug(`Recieved data of length: ${e.length} and data"`,t),await this.receive(t)}catch(t){return void console.error("Websocketworker: onmessage JSON.parse error",t,e)}}async onbytes(e){try{const t=await e.arrayBuffer(),n=new Uint8Array(t),r=new TextDecoder("utf-8").decode(n),o=r.indexOf("\r\n\r\n");if(-1===o)return void console.error("Header terminator not found for:\n",r);const i=r.substring(0,o+4),a=n.slice(o+4),s=i.split(";"),l={};if(s.forEach((e=>{const[t,n]=e.split("=");l[t.trim()]=n.trim()})),!l.chunk||!l.msgid)return void console.error("Header missing required fields chunk or msgid",l);const[c,u]=l.chunk.split("/"),d=l.msgid;if("1"===c&&"1"===u)return this.recieve_bytes(l,a);if(this.blobChunks[d]||(this.blobChunks[d]={chunks:Array.from({length:parseInt(u)},(()=>null)),timestamp:Date.now()}),this.blobChunks[d].chunks.length!==parseInt(u))return void console.error("Total chunks mismatch");if(this.blobChunks[d].chunks[parseInt(c)-1]=n,this.blobChunks[d].chunks.every((e=>null!==e))){const e=new Uint8Array(this.blobChunks[d].chunks.reduce(((e,t)=>e.concat(Array.from(t))),[]));this.recieve_bytes(l,e),delete this.blobChunks[d]}console.log("Header: ",l)}catch(t){return void console.error("Websocketworker: onbytes error",t,e)}}get http_protocol(){return this.secure_url?"https":"http"}get secure_url(){return this._url.startsWith("wss")}get url_wo_protocol(){return this._url.substring(this.secure_url?6:5)}get http_url(){var e=this.http_protocol+"://"+this.url_wo_protocol;return"/"!==e[e.length-1]&&(e+="/"),e}get_io_subscription_url({node_id:e,io_id:t,stream:n}){let r=this.http_url+`node/${e}/io/${t}/value`;return n&&(r+="/stream"),r}async upload_file({files:e,onProgressCallback:t,root:n}){const r=`${this.http_url}upload/`,o=new FormData,i=Array.isArray(e)?e:Array.from(e);for(const e of i){const t=e.webkitRelativePath||e.name,r=n?`${n}/${t}`:t;o.append("file",e,r)}try{return(await Pu.post(r,o,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:e=>{t&&t(e.loaded,e.total)}})).data.file}catch(e){throw new Error("Failed to upload file")}}async handle_large_message_hint({msg_id:e}){const t=this.http_url+"message/"+e,n=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}}),r=await n.json();this.receive(r)}onopen(){this._zustand?.logger.info("Websocket opened"),this.is_open=!0,this._zustand&&this._zustand.auto_progress(),this.reconnectAttempts=0,this.stepwise_fullsync()}onclose(){this._zustand?.logger.info("Websocket closed"),super.onclose(),this._reconnect&&(this._zustand?.logger.info("Websocket closed,reconnecting"),this.auto_reconnect())}on_ws_error(){this._zustand?.logger.warn("Websocket error"),this._websocket?this._websocket.close():this.auto_reconnect()}async send_large_message(e){const t=`${this.http_url}message/`;await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e})}async send(e){if(!this._websocket||this._websocket.readyState!==WebSocket.OPEN)return void this._zustand?.logger.warn("Websocket not connected");const t=JSON.stringify(e);if(new Blob([t]).size>1e6)return this._zustand?.logger.info("Data too large, sending via http"),await this.send_large_message(t);this._zustand?.logger.debug("Sending data",e),this._websocket.send(t)}async stop(){await super.stop(),this._reconnect=!1}close(){this._websocket&&this._websocket.close()}disconnect(){super.disconnect(),this._reconnect=!1,this.close()}async reconnect(){await super.reconnect(),this._reconnect=!0,!this._websocket||(this._zustand?.logger.info("Reconnecting"),this._websocket.readyState!==WebSocket.OPEN&&this._websocket.readyState!==WebSocket.CONNECTING||(this._websocket.readyState===WebSocket.CONNECTING&&await new Promise(((e,t)=>{if(null===this._websocket)return;let n=setTimeout((()=>{t("Timeout@reconnect")}),2e3);this._websocket.addEventListener("open",(()=>{clearTimeout(n),e(null)}),{once:!0}),this._websocket.readyState===WebSocket.OPEN&&(clearTimeout(n),e(null))})),this._websocket.readyState!==WebSocket.OPEN))?this.connect():this.stepwise_fullsync()}}class id{constructor(e,t){this.ws=null,this.reconnectAttempts=0,this.maxReconnectAttempts=999,this.initialTimeout=200,this.maxTimeout=2e3,this.wsuri=e,this.zustand=t,this.workers={},this.on_setWorker=e=>{this.zustand.set_worker(e)},this.connect()}get open(){return this.ws?.readyState===WebSocket.OPEN}connect(){this.zustand.set_progress({progress:0,message:"connecting to worker manager",status:"info",blocking:!0}),this.zustand.logger.info("Connecting to websocket:",this.wsuri),this.ws=new WebSocket(this.wsuri),this.ws.onopen=()=>{this.onopen()},this.ws.onclose=()=>{this.onclose()},this.ws.onerror=()=>{this.on_ws_error()},this.ws.onmessage=e=>{"string"==typeof e.data?this.onmessage(e.data):console.error("WorkerManager: onmessage event.data is not a string",typeof e.data)},this.connectionTimeout=setTimeout((()=>{this.ws?.readyState!==WebSocket.OPEN&&this.on_ws_error()}),5e3)}on_ws_error(){console.warn("Websocket error"),this.ws?this.ws.close():this.reconnect()}onopen(){this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=void 0),this.zustand.auto_progress(),this.ws&&this.ws.send("worker_status");const e=window.localStorage.getItem("funcnodes__active_worker");e&&this.set_active(e)}onmessage(e){try{let t=JSON.parse(e);if("worker_status"===t.type){const e={};for(let n of t.active)n.active=!0,e[n.uuid]=n;for(let n of t.inactive)n.active=!1,e[n.uuid]=n;return void this.zustand.workers.setState(e)}if("set_worker"===t.type){if("WSWorker"===t.data.type){let e="ws"+(t.data.ssl?"s":"")+"://"+t.data.host+":"+t.data.port;this.setWorker(this.workers[t.data.uuid]||new od({url:e,zustand:this.zustand,uuid:t.data.uuid,on_sync_complete:this.zustand.options.on_sync_complete}))}else this.zustand.logger.error("WorkerManager: unknown worker type",t);return}if("progress"===t.type)return void this.zustand.set_progress(t);this.zustand.logger.error("WorkerManager: unknown message",t)}catch(t){return void console.error("WorkerManager: onmessage JSON.parse error",t,e)}}setWorker(e){for(let t in this.workers)t!==e?.uuid&&this.workers[t].disconnect();void 0!==e&&(this.workers[e.uuid]=e,e.reconnect()),window.localStorage.setItem("funcnodes__active_worker",e?.uuid||""),void 0!==this.zustand.worker&&this.zustand.clear_all(),this.zustand.set_worker(e),this.on_setWorker(e)}async restart_worker(e){this.ws?.send(JSON.stringify({type:"restart_worker",workerid:e}))}calculateReconnectTimeout(){return Math.min(this.initialTimeout*Math.pow(2,this.reconnectAttempts),this.maxTimeout)}reconnect(){if(this.reconnectAttempts<this.maxReconnectAttempts){let e=this.calculateReconnectTimeout();this.zustand.logger.info(`Attempting to reconnect in ${e} ms`),setTimeout((()=>{this.ws&&this.ws.readyState===WebSocket.OPEN||(this.reconnectAttempts++,this.connect())}),e)}else this.zustand.logger.warn("Maximum reconnect attempts reached. Giving up.")}onclose(){this.zustand.logger.warn("WorkerManager: onclose"),this.reconnect()}set_active(e){this.ws&&this.ws.send(JSON.stringify({type:"set_active",workerid:e}))}new_worker({name:e,reference:t,copyLib:n,copyNS:r}){e||(e=void 0),n||(n=!1),r||(r=!1),t||(t=void 0,n=!1,r=!1),this.ws&&this.ws.send(JSON.stringify({type:"new_worker",kwargs:{name:e,reference:t,copyLib:n,copyNS:r}}))}}function ad(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function sd(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function ld(...e){return t=>{let n=!1;const r=e.map((e=>{const r=sd(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():sd(e[t],null)}}}}function cd(...t){return e.useCallback(ld(...t),t)}var ud,dd={exports:{}},fd={};var pd,hd,md={};
29
- /**
30
- * @license React
31
- * react-jsx-runtime.development.js
32
- *
33
- * Copyright (c) Meta Platforms, Inc. and affiliates.
34
- *
35
- * This source code is licensed under the MIT license found in the
36
- * LICENSE file in the root directory of this source tree.
37
- */function gd(){return pd||(pd=1,"production"!==process.env.NODE_ENV&&function(){function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===j?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case E:return"Fragment";case C:return"Portal";case _:return"Profiler";case S:return"StrictMode";case O:return"Suspense";case R:return"SuspenseList"}if("object"==typeof t)switch("number"==typeof t.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case A:return(t.displayName||"Context")+".Provider";case I:return(t._context.displayName||"Context")+".Consumer";case N:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case T:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case M:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(e){t=!0}if(t){var r=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function o(){}function i(e){if(void 0===H)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);H=t&&t[1]||"",W=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+H+e+W}function a(e,t){if(!e||$)return"";var n=Z.get(e);if(void 0!==n)return n;$=!0,n=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var r;r=B.H,B.H=null,function(){if(0===G){h=console.log,m=console.info,g=console.warn,y=console.error,b=console.group,v=console.groupCollapsed,w=console.groupEnd;var e={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}();try{var a={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch((function(){}))}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=a.DetermineComponentFrameRoot(),c=l[0],u=l[1];if(c&&u){var d=c.split("\n"),f=u.split("\n");for(l=s=0;s<d.length&&!d[s].includes("DetermineComponentFrameRoot");)s++;for(;l<f.length&&!f[l].includes("DetermineComponentFrameRoot");)l++;if(s===d.length||l===f.length)for(s=d.length-1,l=f.length-1;1<=s&&0<=l&&d[s]!==f[l];)l--;for(;1<=s&&0<=l;s--,l--)if(d[s]!==f[l]){if(1!==s||1!==l)do{if(s--,0>--l||d[s]!==f[l]){var p="\n"+d[s].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),"function"==typeof e&&Z.set(e,p),p}}while(1<=s&&0<=l);break}}}finally{$=!1,B.H=r,function(){if(0==--G){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},e,{value:h}),info:z({},e,{value:m}),warn:z({},e,{value:g}),error:z({},e,{value:y}),group:z({},e,{value:b}),groupCollapsed:z({},e,{value:v}),groupEnd:z({},e,{value:w})})}0>G&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=n}return d=(d=e?e.displayName||e.name:"")?i(d):"","function"==typeof e&&Z.set(e,d),d}function s(e){if(null==e)return"";if("function"==typeof e){var t=e.prototype;return a(e,!(!t||!t.isReactComponent))}if("string"==typeof e)return i(e);switch(e){case O:return i("Suspense");case R:return i("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case N:return e=a(e.render,!1);case T:return s(e.type);case M:t=e._payload,e=e._init;try{return s(e(t))}catch(e){}}return""}function l(){var e=B.A;return null===e?null:e.getOwner()}function c(){var t=e(this.type);return U[t]||(U[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(t=this.props.ref)?t:null}function u(t,n,o,i,a,s){if("string"==typeof t||"function"==typeof t||t===E||t===_||t===S||t===O||t===R||t===P||"object"==typeof t&&null!==t&&(t.$$typeof===M||t.$$typeof===T||t.$$typeof===A||t.$$typeof===I||t.$$typeof===N||t.$$typeof===F||void 0!==t.getModuleId)){var u=n.children;if(void 0!==u)if(i)if(V(u)){for(i=0;i<u.length;i++)d(u[i],t);Object.freeze&&Object.freeze(u)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(u,t)}else u="",(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),null===t?i="null":V(t)?i="array":void 0!==t&&t.$$typeof===k?(i="<"+(e(t.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):i=typeof t,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",i,u);if(L.call(n,"key")){u=e(t);var f=Object.keys(n).filter((function(e){return"key"!==e}));i=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",J[u+i]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,u,f,u),J[u+i]=!0)}if(u=null,void 0!==o&&(r(o),u=""+o),function(e){if(L.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),u=""+n.key),"key"in n)for(var p in o={},n)"key"!==p&&(o[p]=n[p]);else o=n;return u&&function(e,t){function n(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,"function"==typeof t?t.displayName||t.name||"Unknown":t),function(e,t,n,r,o,i){return n=i.ref,e={$$typeof:k,type:e,key:t,props:i,_owner:o},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:c}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(t,u,s,0,l(),o)}function d(e,t){if("object"==typeof e&&e&&e.$$typeof!==Y)if(V(e))for(var n=0;n<e.length;n++){var r=e[n];f(r)&&p(r,t)}else if(f(e))e._store&&(e._store.validated=1);else if(null===e||"object"!=typeof e?n=null:n="function"==typeof(n=D&&e[D]||e["@@iterator"])?n:null,"function"==typeof n&&n!==e.entries&&(n=n.call(e))!==e)for(;!(e=n.next()).done;)f(e.value)&&p(e.value,t)}function f(e){return"object"==typeof e&&null!==e&&e.$$typeof===k}function p(t,n){if(t._store&&!t._store.validated&&null==t.key&&(t._store.validated=1,n=function(t){var n="",r=l();return r&&(r=e(r.type))&&(n="\n\nCheck the render method of `"+r+"`."),n||(t=e(t))&&(n="\n\nCheck the top-level render call using <"+t+">."),n}(n),!K[n])){K[n]=!0;var r="";t&&null!=t._owner&&t._owner!==l()&&(r=null,"number"==typeof t._owner.tag?r=e(t._owner.type):"string"==typeof t._owner.name&&(r=t._owner.name),r=" It was passed a child from "+r+".");var o=B.getCurrentStack;B.getCurrentStack=function(){var e=s(t.type);return o&&(e+=o()||""),e},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',n,r),B.getCurrentStack=o}}var h,m,g,y,b,v,w,x=t,k=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),A=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),D=Symbol.iterator,j=Symbol.for("react.client.reference"),B=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,z=Object.assign,F=Symbol.for("react.client.reference"),V=Array.isArray,G=0;o.__reactDisabledLog=!0;var H,W,X,$=!1,Z=new("function"==typeof WeakMap?WeakMap:Map),Y=Symbol.for("react.client.reference"),U={},J={},K={};md.Fragment=E,md.jsx=function(e,t,n,r,o){return u(e,t,n,!1,0,o)},md.jsxs=function(e,t,n,r,o){return u(e,t,n,!0,0,o)}}()),md}var yd=(hd||(hd=1,"production"===process.env.NODE_ENV?dd.exports=function(){if(ud)return fd;ud=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:o,ref:void 0!==n?n:null,props:r}}return fd.Fragment=t,fd.jsx=n,fd.jsxs=n,fd}():dd.exports=gd()),dd.exports);function bd(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=r?.[t]||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo((()=>s),Object.values(s));return yd.jsx(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},vd(o,...n)]}function vd(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}var wd=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},xd=e["useId".toString()]||(()=>{}),kd=0;function Cd(t){const[n,r]=e.useState(xd());return wd((()=>{r((e=>e??String(kd++)))}),[t]),t||(n?`radix-${n}`:"")}function Ed(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>n.current?.(...e)),[])}function Sd({prop:t,defaultProp:n,onChange:r=()=>{}}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),a=Ed(n);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:o,l=Ed(r);return[s,e.useCallback((e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[a,t,i,l])]}var _d=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Nd);if(a){const t=a.props.children,r=i.map((n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return yd.jsx(Id,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return yd.jsx(Id,{...o,ref:n,children:r})}));_d.displayName="Slot";var Id=e.forwardRef(((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?ld(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null}));Id.displayName="SlotClone";var Ad=({children:e})=>yd.jsx(yd.Fragment,{children:e});function Nd(t){return e.isValidElement(t)&&t.type===Ad}var Od=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((e,t)=>{const{asChild:r,...o}=e,i=r?_d:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),yd.jsx(i,{...o,ref:t})}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function Rd(e,t){e&&x.flushSync((()=>e.dispatchEvent(t)))}var Td,Md="dismissableLayer.update",Pd="dismissableLayer.pointerDownOutside",Dd="dismissableLayer.focusOutside",jd=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Bd=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,u=e.useContext(jd),[d,f]=e.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=e.useState({}),m=cd(n,(e=>f(e))),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),v=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=b,k=function(t,n=globalThis?.document){const r=Ed(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){Fd(Pd,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));x&&!n&&(i?.(e),s?.(e),e.defaultPrevented||l?.())}),p),C=function(t,n=globalThis?.document){const r=Ed(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){Fd(Dd,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),s?.(e),e.defaultPrevented||l?.())}),p);return function(t,n=globalThis?.document){const r=Ed(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{v===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),p),e.useEffect((()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Td=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),zd(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Td)}}),[d,p,r,u]),e.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),zd())}),[d,u]),e.useEffect((()=>{const e=()=>h({});return document.addEventListener(Md,e),()=>document.removeEventListener(Md,e)}),[]),yd.jsx(Od.div,{...c,ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:ad(t.onFocusCapture,C.onFocusCapture),onBlurCapture:ad(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ad(t.onPointerDownCapture,k.onPointerDownCapture)})}));Bd.displayName="DismissableLayer";var Ld=e.forwardRef(((t,n)=>{const r=e.useContext(jd),o=e.useRef(null),i=cd(n,o);return e.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),yd.jsx(Od.div,{...t,ref:i})}));function zd(){const e=new CustomEvent(Md);document.dispatchEvent(e)}function Fd(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Rd(o,i):o.dispatchEvent(i)}Ld.displayName="DismissableLayerBranch";var Vd="focusScope.autoFocusOnMount",Gd="focusScope.autoFocusOnUnmount",Hd={bubbles:!1,cancelable:!0},Wd=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),u=Ed(i),d=Ed(a),f=e.useRef(null),p=cd(n,(e=>c(e))),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:Yd(f.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||Yd(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&Yd(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,h.paused]),e.useEffect((()=>{if(l){Ud.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(Vd,Hd);l.addEventListener(Vd,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Yd(r,{select:t}),document.activeElement!==n)return}((e=Xd(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&Yd(l))}return()=>{l.removeEventListener(Vd,u),setTimeout((()=>{const e=new CustomEvent(Gd,Hd);l.addEventListener(Gd,d),l.dispatchEvent(e),e.defaultPrevented||Yd(t??document.body,{select:!0}),l.removeEventListener(Gd,d),Ud.remove(h)}),0)}}var e}),[l,u,d,h]);const m=e.useCallback((e=>{if(!r&&!o)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=Xd(e),n=$d(t,e),r=$d(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&Yd(i,{select:!0})):(e.preventDefault(),r&&Yd(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,h.paused]);return yd.jsx(Od.div,{tabIndex:-1,...s,ref:p,onKeyDown:m})}));function Xd(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function $d(e,t){for(const n of e)if(!Zd(n,{upTo:t}))return n}function Zd(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function Yd(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}Wd.displayName="FocusScope";var Ud=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Jd(e,t),e.unshift(t)},remove(t){e=Jd(e,t),e[0]?.resume()}}}();function Jd(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Kd=e.forwardRef(((t,n)=>{const{container:r,...o}=t,[i,a]=e.useState(!1);wd((()=>a(!0)),[]);const s=r||i&&globalThis?.document?.body;return s?k.createPortal(yd.jsx(Od.div,{...o,ref:n}),s):null}));Kd.displayName="Portal";var qd=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer(((e,t)=>n[e][t]??e),t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=Qd(o.current);a.current="mounted"===l?e:"none"}),[l]),wd((()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=Qd(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),wd((()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=Qd(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)}))}},s=e=>{e.target===n&&(a.current=Qd(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")}),[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=cd(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function Qd(e){return e?.animationName||"none"}qd.displayName="Presence";var ef=0;function tf(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??nf()),document.body.insertAdjacentElement("beforeend",e[1]??nf()),ef++,()=>{1===ef&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),ef--}}),[])}function nf(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var rf=function(){return rf=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},rf.apply(this,arguments)};function of(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function af(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var sf="right-scroll-bar-position",lf="width-before-scroll-bar";function cf(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var uf="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,df=new WeakMap;function ff(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach((function(e){return cf(e,t)}))},(o=c((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade);return uf((function(){var t=df.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach((function(e){r.has(e)||cf(e,null)})),r.forEach((function(e){n.has(e)||cf(e,o)}))}df.set(i,e)}),[e]),i}function pf(e){return e}var hf=function(t){var n=t.sideCar,r=of(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,rf({},r))};hf.isSideCarExport=!0;var mf=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=pf);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=rf({async:!0,ssr:!1},e),t}(),gf=function(){},yf=e.forwardRef((function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:gf,onWheelCapture:gf,onTouchMoveCapture:gf}),i=o[0],a=o[1],s=t.forwardProps,l=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,h=t.noIsolation,m=t.inert,g=t.allowPinchZoom,y=t.as,b=void 0===y?"div":y,v=t.gapMode,w=of(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,k=ff([r,n]),C=rf(rf({},w),i);return e.createElement(e.Fragment,null,d&&e.createElement(x,{sideCar:mf,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:v}),s?e.cloneElement(e.Children.only(l),rf(rf({},C),{ref:k})):e.createElement(b,rf({},C,{className:c,ref:k}),l))}));yf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},yf.classNames={fullWidth:lf,zeroRight:sf};function bf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var vf=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=bf())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wf=function(){var t,n=(t=vf(),function(n,r){e.useEffect((function(){return t.add(n),function(){t.remove()}}),[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},xf={left:0,top:0,right:0,gap:0},kf=function(e){return parseInt(e||"",10)||0},Cf=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return xf;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[kf(n),kf(r),kf(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ef=wf(),Sf="data-scroll-locked",_f=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Sf,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(sf," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(lf," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(sf," .").concat(sf," {\n right: 0 ").concat(r,";\n }\n \n .").concat(lf," .").concat(lf," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Sf,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},If=function(){var e=parseInt(document.body.getAttribute(Sf)||"0",10);return isFinite(e)?e:0},Af=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(Sf,(If()+1).toString()),function(){var e=If()-1;e<=0?document.body.removeAttribute(Sf):document.body.setAttribute(Sf,e.toString())}}),[]);var a=e.useMemo((function(){return Cf(i)}),[i]);return e.createElement(Ef,{styles:_f(a,!n,i,r?"":"!important")})},Nf=!1;if("undefined"!=typeof window)try{var Of=Object.defineProperty({},"passive",{get:function(){return Nf=!0,!0}});window.addEventListener("test",Of,Of),window.removeEventListener("test",Of,Of)}catch(e){Nf=!1}var Rf=!!Nf&&{passive:!1},Tf=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Mf=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Pf(e,r)){var o=Df(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Pf=function(e,t){return"v"===e?function(e){return Tf(e,"overflowY")}(t):function(e){return Tf(e,"overflowX")}(t)},Df=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},jf=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bf=function(e){return[e.deltaX,e.deltaY]},Lf=function(e){return e&&"current"in e?e.current:e},zf=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ff=0,Vf=[];function Gf(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Hf,Wf=(Hf=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),i=e.useState(Ff++)[0],a=e.useState(wf)[0],s=e.useRef(t);e.useEffect((function(){s.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=af([t.lockRef.current],(t.shards||[]).map(Lf),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=jf(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Mf(d,u);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=Mf(d,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,s=t.contains(a),l=!1,c=i>0,u=0,d=0;do{var f=Df(e,a),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&Pf(e,a)&&(u+=h,d+=p),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(p,t,e,"h"===p?l:c)}),[]),c=e.useCallback((function(e){var t=e;if(Vf.length&&Vf[Vf.length-1]===a){var r="deltaY"in t?Bf(t):jf(t),o=n.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(s.current.shards||[]).map(Lf).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?l(t,i[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o,shadowParent:Gf(r)};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),d=e.useCallback((function(e){r.current=jf(e),o.current=void 0}),[]),f=e.useCallback((function(e){u(e.type,Bf(e),e.target,l(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,jf(e),e.target,l(e,t.lockRef.current))}),[]);e.useEffect((function(){return Vf.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Rf),document.addEventListener("touchmove",c,Rf),document.addEventListener("touchstart",d,Rf),function(){Vf=Vf.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Rf),document.removeEventListener("touchmove",c,Rf),document.removeEventListener("touchstart",d,Rf)}}),[]);var h=t.removeScrollBar,m=t.inert;return e.createElement(e.Fragment,null,m?e.createElement(a,{styles:zf(i)}):null,h?e.createElement(Af,{gapMode:t.gapMode}):null)},mf.useMedium(Hf),hf),Xf=e.forwardRef((function(t,n){return e.createElement(yf,rf({},t,{ref:n,sideCar:Wf}))}));Xf.classNames=yf.classNames;var $f=new WeakMap,Zf=new WeakMap,Yf={},Uf=0,Jf=function(e){return e&&(e.host||Jf(e.parentNode))},Kf=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=Jf(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);Yf[n]||(Yf[n]=new WeakMap);var i=Yf[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=($f.get(e)||0)+1,c=(i.get(e)||0)+1;$f.set(e,l),i.set(e,c),a.push(e),1===l&&o&&Zf.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),s.clear(),Uf++,function(){a.forEach((function(e){var t=$f.get(e)-1,o=i.get(e)-1;$f.set(e,t),i.set(e,o),t||(Zf.has(e)||e.removeAttribute(r),Zf.delete(e)),o||e.removeAttribute(n)})),--Uf||($f=new WeakMap,$f=new WeakMap,Zf=new WeakMap,Yf={})}},qf=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Kf(r,o,n,"aria-hidden")):function(){return null}},Qf="Dialog",[ep,tp]=bd(Qf),[np,rp]=ep(Qf),op=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u=!1,d]=Sd({prop:o,defaultProp:i,onChange:a});return yd.jsx(np,{scope:n,triggerRef:l,contentRef:c,contentId:Cd(),titleId:Cd(),descriptionId:Cd(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s,children:r})};op.displayName=Qf;var ip="DialogTrigger",ap=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=rp(ip,n),i=cd(t,o.triggerRef);return yd.jsx(Od.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Sp(o.open),...r,ref:i,onClick:ad(e.onClick,o.onOpenToggle)})}));ap.displayName=ip;var sp="DialogPortal",[lp,cp]=ep(sp,{forceMount:void 0}),up=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=rp(sp,n);return yd.jsx(lp,{scope:n,forceMount:r,children:e.Children.map(o,(e=>yd.jsx(qd,{present:r||a.open,children:yd.jsx(Kd,{asChild:!0,container:i,children:e})})))})};up.displayName=sp;var dp="DialogOverlay",fp=e.forwardRef(((e,t)=>{const n=cp(dp,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=rp(dp,e.__scopeDialog);return i.modal?yd.jsx(qd,{present:r||i.open,children:yd.jsx(pp,{...o,ref:t})}):null}));fp.displayName=dp;var pp=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=rp(dp,n);return yd.jsx(Xf,{as:_d,allowPinchZoom:!0,shards:[o.contentRef],children:yd.jsx(Od.div,{"data-state":Sp(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),hp="DialogContent",mp=e.forwardRef(((e,t)=>{const n=cp(hp,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=rp(hp,e.__scopeDialog);return yd.jsx(qd,{present:r||i.open,children:i.modal?yd.jsx(gp,{...o,ref:t}):yd.jsx(yp,{...o,ref:t})})}));mp.displayName=hp;var gp=e.forwardRef(((t,n)=>{const r=rp(hp,t.__scopeDialog),o=e.useRef(null),i=cd(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return qf(e)}),[]),yd.jsx(bp,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ad(t.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:ad(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:ad(t.onFocusOutside,(e=>e.preventDefault()))})})),yp=e.forwardRef(((t,n)=>{const r=rp(hp,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return yd.jsx(bp,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),bp=e.forwardRef(((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=rp(hp,r),c=e.useRef(null),u=cd(n,c);return tf(),yd.jsxs(yd.Fragment,{children:[yd.jsx(Wd,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:yd.jsx(Bd,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Sp(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),yd.jsxs(yd.Fragment,{children:[yd.jsx(Np,{titleId:l.titleId}),yd.jsx(Op,{contentRef:c,descriptionId:l.descriptionId})]})]})})),vp="DialogTitle",wp=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=rp(vp,n);return yd.jsx(Od.h2,{id:o.titleId,...r,ref:t})}));wp.displayName=vp;var xp="DialogDescription",kp=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=rp(xp,n);return yd.jsx(Od.p,{id:o.descriptionId,...r,ref:t})}));kp.displayName=xp;var Cp="DialogClose",Ep=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=rp(Cp,n);return yd.jsx(Od.button,{type:"button",...r,ref:t,onClick:ad(e.onClick,(()=>o.onOpenChange(!1)))})}));function Sp(e){return e?"open":"closed"}Ep.displayName=Cp;var _p="DialogTitleWarning",[Ip,Ap]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo((()=>o),Object.values(o));return yd.jsx(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(_p,{contentName:hp,titleName:vp,docsSlug:"dialog"}),Np=({titleId:t})=>{const n=Ap(_p),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect((()=>{if(t){document.getElementById(t)||console.error(r)}}),[r,t]),null},Op=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ap("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(r)}}),[r,t,n]),null},Rp=op,Tp=ap,Mp=up,Pp=fp,Dp=mp,jp=wp,Bp=kp,Lp=Ep;
10
+ */var ce,ue,de={};var fe=(ue||(ue=1,"production"===Q.env.NODE_ENV?ee.exports=function(){if(ae)return te;ae=1;var e=t,n=le(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return te.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s((function(){function e(e){if(!a){if(a=!0,o=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,c,u]);var p=o(e,d[0],d[1]);return a((function(){f.hasValue=!0,f.value=p}),[p]),l(p),p},te}():ee.exports=(ce||(ce=1,"production"!==Q.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=t,n=le(),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;de.useSyncExternalStoreWithSelector=function(e,t,n,c,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=s((function(){function e(e){if(!a){if(a=!0,o=e,e=c(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=c(e);return void 0!==u&&u(t,n)?(o=e,t):(o=e,i=n)}var o,i,a=!1,s=void 0===n?null:n;return[function(){return e(t())},null===s?void 0:function(){return e(s())}]}),[t,n,c,u]);var p=o(e,d[0],d[1]);return a((function(){f.hasValue=!0,f.value=p}),[p]),l(p),p},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),de)),ee.exports),pe=I(fe);const{useDebugValue:he}=t,{useSyncExternalStoreWithSelector:me}=pe;let ge=!1;const ye=e=>e;const be=e=>{"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?_(e):e,n=(e,n)=>function(e,t=ye,n){"production"!==(import.meta.env?import.meta.env.MODE:void 0)&&n&&!ge&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),ge=!0);const r=me(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return he(r),r}(t,e,n);return Object.assign(n,t),n},ve=e=>e?be(e):be;function we(e){return"[object Object]"===Object.prototype.toString.call(e)}function xe(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e.constructor!==t.constructor)return!1;if(e.constructor===Object||e.constructor===Array){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const o of n){if(!r.includes(o))return!1;if(!xe(e[o],t[o]))return!1}}return!(e instanceof Date&&t instanceof Date)||e.getTime()===t.getTime()}const Ee=(e,t)=>{let n=!1;if(!we(e))throw new Error("Target must be a plain object not"+typeof e);if(!we(t))throw new Error("Source must be a plain object not"+typeof t);const r={...e};return Object.keys(t).forEach((o=>{const i=t[o],a=e[o];if(we(i)&&we(a)){const{new_obj:e,change:t}=Ee(a,i);t&&(n=!0,r[o]=e)}else xe(a,i)||(n=!0,r[o]=i)})),{new_obj:r,change:n}},ke=(e,t)=>{let n=!1;if(!we(e))throw new Error("Target must be a plain object");if(!we(t))throw new Error("Source must be a plain object");const r={...e};return Object.keys(t).forEach((o=>{const i=t[o],a=e[o];if(void 0!==a||void 0!==i){if(void 0===a)return n=!0,void(r[o]=i);if(we(i)&&we(a)){const{new_obj:e,change:t}=ke(a,i);t&&(n=!0,r[o]=e)}}})),{new_obj:r,change:n}},Ce=(e,t)=>void 0===t?[e,!1]:[t,e!==t];function Se(e,t){throw new Error("Unhandled case: "+e+" with: "+JSON.stringify(t))}const _e=e=>{void 0===e.io&&(e.io={});let t=e.io,n=e.io_order;if(void 0===n)if(Array.isArray(t)){n=t.map((e=>e.id));const e={};for(const n of t)e[n.id]=n;t=e}else n=Object.keys(e.io);else if(Array.isArray(t)){const e={};for(const r of t)e[r.id]=r,n.includes(r.id)||n.push(r.id);t=e}else for(const e in t)n.includes(e)||n.push(e);return{...e,io_order:n,io:t}},Ie=(e,t)=>{e.properties=e.properties||{},t.pos&&(e.properties["frontend:pos"]=t.pos),t.size&&(e.properties["frontend:size"]=t.size),void 0!==t.collapsed&&(e.properties["frontend:collapsed"]=!!t.collapsed)};class Ae{constructor({data:e,mime:t}){this._data=e,this._mime=t}get data(){return this._data}get value(){return this._data}get mime(){return this._mime}toString(){return this._data instanceof ArrayBuffer?`DataStructure(${this._data.byteLength},${this._mime})`:this._data instanceof Blob?`DataStructure(${this._data.size},${this._mime})`:this._data instanceof String||this._data instanceof Array?`DataStructure(${this._data.length},${this._mime})`:this._data instanceof Object?`DataStructure(${Object.keys(this._data).length},${this._mime})`:`DataStructure(${this._mime})`}toJSON(){return this.toString()}dispose(){}}class Ne extends Ae{get objectUrl(){if(this._objectUrl)return this._objectUrl;const e=this.data instanceof Blob?this.data:new Blob([this.data],{type:this.mime});return this._objectUrl=URL.createObjectURL(e),this._objectUrl}dispose(){this._objectUrl&&URL.revokeObjectURL(this._objectUrl),super.dispose()}get value(){return this.objectUrl}}const Oe=e=>e.buffer?e.buffer:e,Re={x:(e,t)=>null,c:(e,t)=>new DataView(Oe(e)).getInt8(0),B:(e,t)=>new DataView(Oe(e)).getUint8(0),"?":(e,t)=>1===new DataView(Oe(e)).getInt8(0),h:(e,t)=>new DataView(Oe(e)).getInt16(0,t),H:(e,t)=>new DataView(Oe(e)).getUint16(0,t),i:(e,t)=>new DataView(Oe(e)).getInt32(0,t),I:(e,t)=>new DataView(Oe(e)).getUint32(0,t),l:(e,t)=>new DataView(Oe(e)).getInt32(0,t),L:(e,t)=>new DataView(Oe(e)).getUint32(0,t),q:(e,t)=>Number(new DataView(Oe(e)).getBigInt64(0,t)),Q:(e,t)=>Number(new DataView(Oe(e)).getBigUint64(0,t)),n:(e,t)=>Number(new DataView(Oe(e)).getBigInt64(0,t)),N:(e,t)=>Number(new DataView(Oe(e)).getBigUint64(0,t)),f:(e,t)=>new DataView(Oe(e)).getFloat32(0,t),d:(e,t)=>new DataView(Oe(e)).getFloat64(0,t),s:(e,t)=>(new TextDecoder).decode(Oe(e)),p:(e,t)=>(new TextDecoder).decode(Oe(e)),P:(e,t)=>Number(new DataView(Oe(e)).getBigUint64(0,t))};class Te extends Ae{constructor({data:e,mime:t}){super({data:e,mime:t}),this._cType=t.split("application/fn.struct.")[1],this._value=null,this.parse_value()}parse_value(){let e=!0,t=this._cType;return t.startsWith("<")&&(e=!0,t=t.slice(1)),t.startsWith(">")&&(e=!1,t=t.slice(1)),t.startsWith("!")&&(e=!1,t=t.slice(1)),t.startsWith("@")&&(e=!1,t=t.slice(1)),t.startsWith("=")&&(e=!1,t=t.slice(1)),this._value=Re[t](this.data,e),this._value}get value(){return this._value}toString(){return null===this._value?"null":this._value.toString()}}class Me extends Ae{constructor({data:e,mime:t}){super({data:e,mime:t}),0===e.length?this._json=void 0:(this._json=JSON.parse((new TextDecoder).decode(Oe(e))),"<NoValue>"===this._json&&(this._json=void 0))}get value(){return this._json}static fromObject(e){const t="<NoValue>"===e?new Uint8Array(0):(new TextEncoder).encode(JSON.stringify(e));return new Me({data:t,mime:"application/json"})}toString(){return JSON.stringify(this._json)}}class Pe extends Ae{constructor({data:e,mime:t}){super({data:e,mime:t}),this._value=(new TextDecoder).decode(Oe(e))}get value(){return this._value}toString(){return this._value}}const De=({data:e,mime:t})=>e instanceof ArrayBuffer||e instanceof Uint8Array?t.startsWith("application/fn.struct.")?new Te({data:e,mime:t}):t.startsWith("application/json")?new Me({data:e,mime:t}):"text"===t||t.startsWith("text/")?new Pe({data:e,mime:t}):new Ne({data:e,mime:t}):new Ae({data:e,mime:t}),je={id:"dummy",node_id:"dummy",node_name:"dummy",properties:{"frontend:size":[200,100],"frontend:pos":[NaN,NaN],"frontend:collapsed":!1},io:{},name:"dummy",in_trigger:!1,progress:{ascii:!1,elapsed:0,initial:0,n:0,prefix:"idle",unit:"it",unit_divisor:1e3,unit_scale:!1}},Be={id:"dummy",name:"dummy",node:"dummy",full_id:"dummy",type:"any",value:void 0,is_input:!1,connected:!1,does_trigger:!0,fullvalue:void 0,render_options:{set_default:!0,type:"any"},hidden:!1,emit_value_set:!0,required:!1},Le=(e,t,n)=>{let r;if(void 0===e)throw new Error("nodestore is undefined");return r={_state:ve(((e,r)=>((e,t)=>{if(!t.id)throw new Error("IO must have an id but is missing for "+JSON.stringify(t));void 0===t.name&&(t.name=t.id);const{new_obj:n}=ke(t,Be);return"any"!==n.render_options.type&&void 0!==n.render_options.type||(n.render_options.type=n.type),((e,t)=>("<NoValue>"===t.value&&(t.value=void 0),"<NoValue>"===t.fullvalue&&(t.fullvalue=void 0),void 0===t.hidden&&(t.hidden=!1),{...t,try_get_full_value:()=>{void 0!==t.node&&void 0!==t.id&&e.worker?.get_io_full_value({nid:t.node,ioid:t.id})},set_hidden:n=>{void 0!==t.node&&void 0!==t.id&&e.worker?.update_io_options({nid:t.node,ioid:t.id,options:{hidden:n}})}}))(e,n)})(t,n))),use:()=>r._state(),getState:()=>r._state.getState(),setState:e=>{r._state.setState(e)},update:e=>{((e,t)=>{const n=e.getState(),r={},o={},i=Object.keys(t);for(const e of i)switch(e){case"name":{const[o,i]=Ce(n[e],t[e]);i&&(r[e]=o);break}case"id":{const[o,i]=Ce(n[e],t[e]);i&&(r[e]=o);break}case"connected":{const[o,i]=Ce(n[e],t[e]);i&&(r[e]=o);break}case"does_trigger":{const[o,i]=Ce(n[e],t[e]);i&&(r[e]=o);break}case"hidden":{const[o,i]=Ce(n[e],t[e]);i&&(r[e]=o);break}case"full_id":{const[o,i]=Ce(n[e],t[e]);i&&(r[e]=o);break}case"is_input":case"node":case"type":break;case"value":o.preview=t[e];break;case"fullvalue":o.full=t[e];break;case"render_options":{const[o,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=Ee(e,t);return[n,r]})(n[e],t[e]);i&&(r[e]=o);break}case"value_options":{const[o,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=Ee(e,t);return[n,r]})(n[e],t[e]);i&&(r[e]=o);break}case"valuepreview_type":case"emit_value_set":case"default":case"required":r[e]=t[e];break;default:try{Se(e,t[e])}catch(e){console.error(e)}}Object.keys(o).length>0&&e.updateValueStore(o),Object.keys(r).length>0&&e.setState(r)})(r,e)},valuestore:ve(((e,t)=>{let r=n.value;"<NoValue>"===r&&(r=void 0),r instanceof Ae||void 0===r||(r=Me.fromObject(r));let o=n.fullvalue;return"<NoValue>"===o&&(o=void 0),o instanceof Ae||void 0===o||(o=Me.fromObject(o)),{preview:r,full:o}})),updateValueStore:e=>{r.valuestore.setState((t=>(t.preview&&"function"==typeof t.preview.dispose&&t.preview.dispose(),t.full&&"function"==typeof t.full.dispose&&t.full.dispose(),void 0!==e.preview&&void 0===e.full&&(e.full=void 0,t.full=void 0),void 0===e.preview||e.preview instanceof Ae||(e.preview=Me.fromObject(e.preview)),void 0===e.full||e.full instanceof Ae||(e.full=Me.fromObject(e.full)),{...t,...e})))},node:e},r},ze=(e,t,n)=>{if(!n.id)throw new Error("Node must have an id");const{new_obj:r}=ke(n,je),o=((e,t,n)=>{const r=n.io_order;if(void 0===r)throw new Error("Node must have io_order");const o={...n,in_trigger:ve((()=>!1)),inputs:Object.keys(n.io).filter((e=>n.io[e].is_input)),outputs:Object.keys(n.io).filter((e=>!n.io[e].is_input)),io:Object.fromEntries(Object.entries(n.io).map((([n,r])=>[n,Le(e,t,r)]))),io_order:r,progress:ve((()=>n.progress))};return o})(e,t,r);return o},Fe=(e,t)=>{const n={use:()=>r._state(),getState:()=>r._state.getState(),setState:e=>{r._state.setState(e)},update:e=>{((e,t)=>{const n=e.getState(),r={},o=_e(t),i=Object.keys(o);for(const e of i)switch(e){case"id":{const[t,i]=Ce(n[e],o[e]);i&&(r[e]=t);break}case"node_id":{const[t,i]=Ce(n[e],o[e]);i&&(r[e]=t);break}case"node_name":{const[t,i]=Ce(n[e],o[e]);i&&(r[e]=t);break}case"name":{const[t,i]=Ce(n[e],o[e]);i&&(r[e]=t);break}case"in_trigger":n[e].setState(!!o[e]);break;case"error":o[e]!==n[e]&&(r[e]=o[e]);break;case"render_options":{const[t,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=Ee(e,t);return[n,r]})(n[e],o[e]);i&&(r[e]=t);break}case"io_order":{const[t,i]=((e,t)=>void 0===t?[e,!1]:[t,!xe(e,t)])(n[e],o[e]);i&&(r[e]=t);break}case"io":{const t=n[e],r=o[e];if(void 0===r)break;if(void 0===t)break;for(const e in r)void 0!==t[e]?t[e].update(r[e]):console.error("io key not found in oldvalue:",e,"allowed:",t,"for update:",o);break}case"progress":{const[t,r]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=Ee(e,t);return[n,r]})(n[e].getState(),o[e]);r&&n[e].setState(t);break}case"description":r[e]=o[e];break;case"properties":{const[t,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=Ee(e,t);return[n,r]})(n[e],o[e]);i&&(r[e]=t);break}case"status":{const[t,i]=((e,t)=>{if(void 0===t)return[e,!1];if(void 0===e)return[t,void 0!==t];const{new_obj:n,change:r}=Ee(e,t);return[n,r]})(n[e],o[e]);i&&(r[e]=t);break}default:try{Se(e,o[e])}catch(e){console.error(e)}}Object.keys(r).length>0&&e.setState(r)})(r._state,e)}},r=n;return r._state=ve(((n,o)=>ze(r,e,_e(t)))),r};function Ve(e){if("string"==typeof e||"number"==typeof e)return""+e;let t="";if(Array.isArray(e))for(let n,r=0;r<e.length;r++)""!==(n=Ve(e[r]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}const{useDebugValue:Ge}=t,{useSyncExternalStoreWithSelector:We}=pe,He=e=>e;function Xe(e,t=He,n){const r=We(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ge(r),r}const Ye=(e,t)=>{const n=_(e),r=(e,r=t)=>Xe(n,e,r);return Object.assign(r,n),r};function $e(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var Ze={value:()=>{}};function Ue(){for(var e,t=0,n=arguments.length,r={};t<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new Je(r)}function Je(e){this._=e}function Ke(e,t){for(var n,r=0,o=e.length;r<o;++r)if((n=e[r]).name===t)return n.value}function qe(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Ze,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Je.prototype=Ue.prototype={constructor:Je,on:function(e,t){var n,r=this._,o=function(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}}))}(e+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++i<a;)if(n=(e=o[i]).type)r[n]=qe(r[n],e.name,t);else if(null==t)for(n in r)r[n]=qe(r[n],e.name,null);return this}for(;++i<a;)if((n=(e=o[i]).type)&&(n=Ke(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Je(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};var Qe="http://www.w3.org/1999/xhtml",et={svg:"http://www.w3.org/2000/svg",xhtml:Qe,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function tt(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),et.hasOwnProperty(t)?{space:et[t],local:e}:e}function nt(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Qe&&t.documentElement.namespaceURI===Qe?t.createElement(e):t.createElementNS(n,e)}}function rt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ot(e){var t=tt(e);return(t.local?rt:nt)(t)}function it(){}function at(e){return null==e?it:function(){return this.querySelector(e)}}function st(){return[]}function lt(e){return null==e?st:function(){return this.querySelectorAll(e)}}function ct(e){return function(){return function(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}(e.apply(this,arguments))}}function ut(e){return function(){return this.matches(e)}}function dt(e){return function(t){return t.matches(e)}}var ft=Array.prototype.find;function pt(){return this.firstElementChild}var ht=Array.prototype.filter;function mt(){return Array.from(this.children)}function gt(e){return new Array(e.length)}function yt(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function bt(e,t,n,r,o,i){for(var a,s=0,l=t.length,c=i.length;s<c;++s)(a=t[s])?(a.__data__=i[s],r[s]=a):n[s]=new yt(e,i[s]);for(;s<l;++s)(a=t[s])&&(o[s]=a)}function vt(e,t,n,r,o,i,a){var s,l,c,u=new Map,d=t.length,f=i.length,p=new Array(d);for(s=0;s<d;++s)(l=t[s])&&(p[s]=c=a.call(l,l.__data__,s,t)+"",u.has(c)?o[s]=l:u.set(c,l));for(s=0;s<f;++s)c=a.call(e,i[s],s,i)+"",(l=u.get(c))?(r[s]=l,l.__data__=i[s],u.delete(c)):n[s]=new yt(e,i[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(p[s])===l&&(o[s]=l)}function wt(e){return e.__data__}function xt(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Et(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function kt(e){return function(){this.removeAttribute(e)}}function Ct(e){return function(){this.removeAttributeNS(e.space,e.local)}}function St(e,t){return function(){this.setAttribute(e,t)}}function _t(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function It(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function At(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Nt(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ot(e){return function(){this.style.removeProperty(e)}}function Rt(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Tt(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Mt(e,t){return e.style.getPropertyValue(t)||Nt(e).getComputedStyle(e,null).getPropertyValue(t)}function Pt(e){return function(){delete this[e]}}function Dt(e,t){return function(){this[e]=t}}function jt(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function Bt(e){return e.trim().split(/^|\s+/)}function Lt(e){return e.classList||new zt(e)}function zt(e){this._node=e,this._names=Bt(e.getAttribute("class")||"")}function Ft(e,t){for(var n=Lt(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Vt(e,t){for(var n=Lt(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Gt(e){return function(){Ft(this,e)}}function Wt(e){return function(){Vt(this,e)}}function Ht(e,t){return function(){(t.apply(this,arguments)?Ft:Vt)(this,e)}}function Xt(){this.textContent=""}function Yt(e){return function(){this.textContent=e}}function $t(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Zt(){this.innerHTML=""}function Ut(e){return function(){this.innerHTML=e}}function Jt(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function Kt(){this.nextSibling&&this.parentNode.appendChild(this)}function qt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qt(){return null}function en(){var e=this.parentNode;e&&e.removeChild(this)}function tn(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function nn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function rn(e){return function(){var t=this.__on;if(t){for(var n,r=0,o=-1,i=t.length;r<i;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function on(e,t,n){return function(){var r,o=this.__on,i=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var a=0,s=o.length;a<s;++a)if((r=o[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=t);this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function an(e,t,n){var r=Nt(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function sn(e,t){return function(){return an(this,e,t)}}function ln(e,t){return function(){return an(this,e,t.apply(this,arguments))}}yt.prototype={constructor:yt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},zt.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var cn=[null];function un(e,t){this._groups=e,this._parents=t}function dn(){return new un([[document.documentElement]],cn)}function fn(e){return"string"==typeof e?new un([[document.querySelector(e)]],[document.documentElement]):new un([[e]],cn)}function pn(e,t){if(e=function(e){let t;for(;t=e.sourceEvent;)e=t;return e}(e),void 0===t&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}un.prototype=dn.prototype={constructor:un,select:function(e){"function"!=typeof e&&(e=at(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a,s=t[o],l=s.length,c=r[o]=new Array(l),u=0;u<l;++u)(i=s[u])&&(a=e.call(i,i.__data__,u,s))&&("__data__"in i&&(a.__data__=i.__data__),c[u]=a);return new un(r,this._parents)},selectAll:function(e){e="function"==typeof e?ct(e):lt(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var a,s=t[i],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(e.call(a,a.__data__,c,s)),o.push(a));return new un(r,o)},selectChild:function(e){return this.select(null==e?pt:function(e){return function(){return ft.call(this.children,e)}}("function"==typeof e?e:dt(e)))},selectChildren:function(e){return this.selectAll(null==e?mt:function(e){return function(){return ht.call(this.children,e)}}("function"==typeof e?e:dt(e)))},filter:function(e){"function"!=typeof e&&(e=ut(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],s=a.length,l=r[o]=[],c=0;c<s;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new un(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,wt);var n=t?vt:bt,r=this._parents,o=this._groups;"function"!=typeof e&&(e=function(e){return function(){return e}}(e));for(var i=o.length,a=new Array(i),s=new Array(i),l=new Array(i),c=0;c<i;++c){var u=r[c],d=o[c],f=d.length,p=xt(e.call(u,u&&u.__data__,c,r)),h=p.length,m=s[c]=new Array(h),g=a[c]=new Array(h);n(u,d,m,g,l[c]=new Array(f),p,t);for(var y,b,v=0,w=0;v<h;++v)if(y=m[v]){for(v>=w&&(w=v+1);!(b=g[w])&&++w<h;);y._next=b||null}}return(a=new un(a,r))._enter=s,a._exit=l,a},enter:function(){return new un(this._enter||this._groups.map(gt),this._parents)},exit:function(){return new un(this._exit||this._groups.map(gt),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,i=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,a=Math.min(o,i),s=new Array(o),l=0;l<a;++l)for(var c,u=n[l],d=r[l],f=u.length,p=s[l]=new Array(f),h=0;h<f;++h)(c=u[h]||d[h])&&(p[h]=c);for(;l<o;++l)s[l]=n[l];return new un(s,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=Et);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,s=n[i],l=s.length,c=o[i]=new Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(t)}return new un(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,i=t[n],a=0,s=i.length;a<s;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this},attr:function(e,t){var n=tt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?Ct:kt:"function"==typeof t?n.local?At:It:n.local?_t:St)(n,t))},style:function(e,t,n){return arguments.length>1?this.each((null==t?Ot:"function"==typeof t?Tt:Rt)(e,t,null==n?"":n)):Mt(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?Pt:"function"==typeof t?jt:Dt)(e,t)):this.node()[e]},classed:function(e,t){var n=Bt(e+"");if(arguments.length<2){for(var r=Lt(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?Ht:t?Gt:Wt)(n,t))},text:function(e){return arguments.length?this.each(null==e?Xt:("function"==typeof e?$t:Yt)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Zt:("function"==typeof e?Jt:Ut)(e)):this.node().innerHTML},raise:function(){return this.each(Kt)},lower:function(){return this.each(qt)},append:function(e){var t="function"==typeof e?e:ot(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:ot(e),r=null==t?Qt:"function"==typeof t?t:at(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(en)},clone:function(e){return this.select(e?nn:tn)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,i=function(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),a=i.length;if(!(arguments.length<2)){for(s=t?on:rn,r=0;r<a;++r)this.each(s(i[r],t,n));return this}var s=this.node().__on;if(s)for(var l,c=0,u=s.length;c<u;++c)for(r=0,l=s[c];r<a;++r)if((o=i[r]).type===l.type&&o.name===l.name)return l.value},dispatch:function(e,t){return this.each(("function"==typeof t?ln:sn)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],i=0,a=o.length;i<a;++i)(r=o[i])&&(yield r)}};const hn={passive:!1},mn={capture:!0,passive:!1};function gn(e){e.stopImmediatePropagation()}function yn(e){e.preventDefault(),e.stopImmediatePropagation()}function bn(e){var t=e.document.documentElement,n=fn(e).on("dragstart.drag",yn,mn);"onselectstart"in t?n.on("selectstart.drag",yn,mn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function vn(e,t){var n=e.document.documentElement,r=fn(e).on("dragstart.drag",null);t&&(r.on("click.drag",yn,mn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var wn=e=>()=>e;function xn(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:i,x:a,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function En(e){return!e.ctrlKey&&!e.button}function kn(){return this.parentNode}function Cn(e,t){return null==t?{x:e.x,y:e.y}:t}function Sn(){return navigator.maxTouchPoints||"ontouchstart"in this}function _n(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function In(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function An(){}xn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};var Nn=.7,On=1/Nn,Rn="\\s*([+-]?\\d+)\\s*",Tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pn=/^#([0-9a-f]{3,8})$/,Dn=new RegExp(`^rgb\\(${Rn},${Rn},${Rn}\\)$`),jn=new RegExp(`^rgb\\(${Mn},${Mn},${Mn}\\)$`),Bn=new RegExp(`^rgba\\(${Rn},${Rn},${Rn},${Tn}\\)$`),Ln=new RegExp(`^rgba\\(${Mn},${Mn},${Mn},${Tn}\\)$`),zn=new RegExp(`^hsl\\(${Tn},${Mn},${Mn}\\)$`),Fn=new RegExp(`^hsla\\(${Tn},${Mn},${Mn},${Tn}\\)$`),Vn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Gn(){return this.rgb().formatHex()}function Wn(){return this.rgb().formatRgb()}function Hn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Pn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?Xn(t):3===n?new Zn(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Yn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Yn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=Dn.exec(e))?new Zn(t[1],t[2],t[3],1):(t=jn.exec(e))?new Zn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Bn.exec(e))?Yn(t[1],t[2],t[3],t[4]):(t=Ln.exec(e))?Yn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=zn.exec(e))?er(t[1],t[2]/100,t[3]/100,1):(t=Fn.exec(e))?er(t[1],t[2]/100,t[3]/100,t[4]):Vn.hasOwnProperty(e)?Xn(Vn[e]):"transparent"===e?new Zn(NaN,NaN,NaN,0):null}function Xn(e){return new Zn(e>>16&255,e>>8&255,255&e,1)}function Yn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Zn(e,t,n,r)}function $n(e,t,n,r){return 1===arguments.length?function(e){return e instanceof An||(e=Hn(e)),e?new Zn((e=e.rgb()).r,e.g,e.b,e.opacity):new Zn}(e):new Zn(e,t,n,null==r?1:r)}function Zn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Un(){return`#${Qn(this.r)}${Qn(this.g)}${Qn(this.b)}`}function Jn(){const e=Kn(this.opacity);return`${1===e?"rgb(":"rgba("}${qn(this.r)}, ${qn(this.g)}, ${qn(this.b)}${1===e?")":`, ${e})`}`}function Kn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Qn(e){return((e=qn(e))<16?"0":"")+e.toString(16)}function er(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new nr(e,t,n,r)}function tr(e){if(e instanceof nr)return new nr(e.h,e.s,e.l,e.opacity);if(e instanceof An||(e=Hn(e)),!e)return new nr;if(e instanceof nr)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=NaN,s=i-o,l=(i+o)/2;return s?(a=t===i?(n-r)/s+6*(n<r):n===i?(r-t)/s+2:(t-n)/s+4,s/=l<.5?i+o:2-i-o,a*=60):s=l>0&&l<1?0:a,new nr(a,s,l,e.opacity)}function nr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function rr(e){return(e=(e||0)%360)<0?e+360:e}function or(e){return Math.max(0,Math.min(1,e||0))}function ir(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}_n(An,Hn,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Gn,formatHex:Gn,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return tr(this).formatHsl()},formatRgb:Wn,toString:Wn}),_n(Zn,$n,In(An,{brighter(e){return e=null==e?On:Math.pow(On,e),new Zn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?Nn:Math.pow(Nn,e),new Zn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Zn(qn(this.r),qn(this.g),qn(this.b),Kn(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Un,formatHex:Un,formatHex8:function(){return`#${Qn(this.r)}${Qn(this.g)}${Qn(this.b)}${Qn(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Jn,toString:Jn})),_n(nr,(function(e,t,n,r){return 1===arguments.length?tr(e):new nr(e,t,n,null==r?1:r)}),In(An,{brighter(e){return e=null==e?On:Math.pow(On,e),new nr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?Nn:Math.pow(Nn,e),new nr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Zn(ir(e>=240?e-240:e+120,o,r),ir(e,o,r),ir(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new nr(rr(this.h),or(this.s),or(this.l),Kn(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Kn(this.opacity);return`${1===e?"hsl(":"hsla("}${rr(this.h)}, ${100*or(this.s)}%, ${100*or(this.l)}%${1===e?")":`, ${e})`}`}}));var ar=e=>()=>e;function sr(e){return 1==(e=+e)?lr:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):ar(isNaN(t)?n:t)}}function lr(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):ar(isNaN(e)?t:e)}var cr=function e(t){var n=sr(t);function r(e,t){var r=n((e=$n(e)).r,(t=$n(t)).r),o=n(e.g,t.g),i=n(e.b,t.b),a=lr(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=o(t),e.b=i(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function ur(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var dr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fr=new RegExp(dr.source,"g");function pr(e,t){var n,r,o,i=dr.lastIndex=fr.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=dr.exec(e))&&(r=fr.exec(t));)(o=r.index)>i&&(o=t.slice(i,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:ur(n,r)})),i=fr.lastIndex;return i<t.length&&(o=t.slice(i),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?function(e){return function(t){return e(t)+""}}(l[0].x):function(e){return function(){return e}}(t):(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}var hr,mr=180/Math.PI,gr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yr(e,t,n,r,o,i){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*mr,skewX:Math.atan(l)*mr,scaleX:a,scaleY:s}}function br(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,a){var s=[],l=[];return i=e(i),a=e(a),function(e,r,o,i,a,s){if(e!==o||r!==i){var l=a.push("translate(",null,t,null,n);s.push({i:l-4,x:ur(e,o)},{i:l-2,x:ur(r,i)})}else(o||i)&&a.push("translate("+o+t+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,s,l),function(e,t,n,i){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:ur(e,t)})):t&&n.push(o(n)+"rotate("+t+r)}(i.rotate,a.rotate,s,l),function(e,t,n,i){e!==t?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:ur(e,t)}):t&&n.push(o(n)+"skewX("+t+r)}(i.skewX,a.skewX,s,l),function(e,t,n,r,i,a){if(e!==n||t!==r){var s=i.push(o(i)+"scale(",null,",",null,")");a.push({i:s-4,x:ur(e,n)},{i:s-2,x:ur(t,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,s,l),i=a=null,function(e){for(var t,n=-1,r=l.length;++n<r;)s[(t=l[n]).i]=t.x(e);return s.join("")}}}var vr=br((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?gr:yr(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),wr=br((function(e){return null==e?gr:(hr||(hr=document.createElementNS("http://www.w3.org/2000/svg","g")),hr.setAttribute("transform",e),(e=hr.transform.baseVal.consolidate())?yr((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):gr)}),", ",")",")");function xr(e){return((e=Math.exp(e))+1/e)/2}var Er,kr,Cr=function e(t,n,r){function o(e,o){var i,a,s=e[0],l=e[1],c=e[2],u=o[0],d=o[1],f=o[2],p=u-s,h=d-l,m=p*p+h*h;if(m<1e-12)a=Math.log(f/c)/t,i=function(e){return[s+e*p,l+e*h,c*Math.exp(t*e*a)]};else{var g=Math.sqrt(m),y=(f*f-c*c+r*m)/(2*c*n*g),b=(f*f-c*c-r*m)/(2*f*n*g),v=Math.log(Math.sqrt(y*y+1)-y),w=Math.log(Math.sqrt(b*b+1)-b);a=(w-v)/t,i=function(e){var r=e*a,o=xr(v),i=c/(n*g)*(o*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(t*r+v)-function(e){return((e=Math.exp(e))-1/e)/2}(v));return[s+i*p,l+i*h,c*o/xr(t*r+v)]}}return i.duration=1e3*a*t/Math.SQRT2,i}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4),Sr=0,_r=0,Ir=0,Ar=0,Nr=0,Or=0,Rr="object"==typeof performance&&performance.now?performance:Date,Tr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Mr(){return Nr||(Tr(Pr),Nr=Rr.now()+Or)}function Pr(){Nr=0}function Dr(){this._call=this._time=this._next=null}function jr(e,t,n){var r=new Dr;return r.restart(e,t,n),r}function Br(){Nr=(Ar=Rr.now())+Or,Sr=_r=0;try{!function(){Mr(),++Sr;for(var e,t=Er;t;)(e=Nr-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Sr}()}finally{Sr=0,function(){var e,t,n=Er,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Er=t);kr=e,zr(r)}(),Nr=0}}function Lr(){var e=Rr.now(),t=e-Ar;t>1e3&&(Or-=t,Ar=e)}function zr(e){Sr||(_r&&(_r=clearTimeout(_r)),e-Nr>24?(e<1/0&&(_r=setTimeout(Br,e-Rr.now()-Or)),Ir&&(Ir=clearInterval(Ir))):(Ir||(Ar=Rr.now(),Ir=setInterval(Lr,1e3)),Sr=1,Tr(Br)))}function Fr(e,t,n){var r=new Dr;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Dr.prototype=jr.prototype={constructor:Dr,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?Mr():+n)+(null==t?0:+t),this._next||kr===this||(kr?kr._next=this:Er=this,kr=this),this._call=e,this._time=n,zr()},stop:function(){this._call&&(this._call=null,this._time=1/0,zr())}};var Vr=Ue("start","end","cancel","interrupt"),Gr=[];function Wr(e,t,n,r,o,i){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,o=e.__transition;function i(e){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(i){var c,u,d,f;if(1!==n.state)return l();for(c in o)if((f=o[c]).name===n.name){if(3===f.state)return Fr(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete o[c]):+c<t&&(f.state=6,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete o[c])}if(Fr((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(i))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(d=n.tween.length),c=0,u=-1;c<d;++c)(f=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++u]=f);r.length=u+1}}function s(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=jr(i,0,n.time)}(e,n,{name:t,index:r,group:o,on:Vr,tween:Gr,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function Hr(e,t){var n=Yr(e,t);if(n.state>0)throw new Error("too late; already scheduled");return n}function Xr(e,t){var n=Yr(e,t);if(n.state>3)throw new Error("too late; already running");return n}function Yr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function $r(e,t){var n,r,o,i=e.__transition,a=!0;if(i){for(o in t=null==t?null:t+"",i)(n=i[o]).name===t?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete i[o]):a=!1;a&&delete e.__transition}}function Zr(e,t){var n,r;return function(){var o=Xr(this,e),i=o.tween;if(i!==n)for(var a=0,s=(r=n=i).length;a<s;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}o.tween=r}}function Ur(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=Xr(this,e),a=i.tween;if(a!==r){o=(r=a).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}i.tween=o}}function Jr(e,t,n){var r=e._id;return e.each((function(){var e=Xr(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return Yr(e,r).value[t]}}function Kr(e,t){var n;return("number"==typeof t?ur:t instanceof Hn?cr:(n=Hn(t))?(t=n,cr):pr)(e,t)}function qr(e){return function(){this.removeAttribute(e)}}function Qr(e){return function(){this.removeAttributeNS(e.space,e.local)}}function eo(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function to(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function no(e,t,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttribute(e))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=t(r=a,l));this.removeAttribute(e)}}function ro(e,t,n){var r,o,i;return function(){var a,s,l=n(this);if(null!=l)return(a=this.getAttributeNS(e.space,e.local))===(s=l+"")?null:a===r&&s===o?i:(o=s,i=t(r=a,l));this.removeAttributeNS(e.space,e.local)}}function oo(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}(e,o)),n}return o._value=t,o}function io(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&function(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}(e,o)),n}return o._value=t,o}function ao(e,t){return function(){Hr(this,e).delay=+t.apply(this,arguments)}}function so(e,t){return t=+t,function(){Hr(this,e).delay=t}}function lo(e,t){return function(){Xr(this,e).duration=+t.apply(this,arguments)}}function co(e,t){return t=+t,function(){Xr(this,e).duration=t}}var uo=dn.prototype.constructor;function fo(e){return function(){this.style.removeProperty(e)}}var po=0;function ho(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function mo(){return++po}var go=dn.prototype;ho.prototype={constructor:ho,select:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=at(e));for(var r=this._groups,o=r.length,i=new Array(o),a=0;a<o;++a)for(var s,l,c=r[a],u=c.length,d=i[a]=new Array(u),f=0;f<u;++f)(s=c[f])&&(l=e.call(s,s.__data__,f,c))&&("__data__"in s&&(l.__data__=s.__data__),d[f]=l,Wr(d[f],t,n,f,d,Yr(s,n)));return new ho(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=lt(e));for(var r=this._groups,o=r.length,i=[],a=[],s=0;s<o;++s)for(var l,c=r[s],u=c.length,d=0;d<u;++d)if(l=c[d]){for(var f,p=e.call(l,l.__data__,d,c),h=Yr(l,n),m=0,g=p.length;m<g;++m)(f=p[m])&&Wr(f,t,n,m,p,h);i.push(p),a.push(l)}return new ho(i,a,t,n)},selectChild:go.selectChild,selectChildren:go.selectChildren,filter:function(e){"function"!=typeof e&&(e=ut(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],s=a.length,l=r[o]=[],c=0;c<s;++c)(i=a[c])&&e.call(i,i.__data__,c,a)&&l.push(i);return new ho(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),a=new Array(r),s=0;s<i;++s)for(var l,c=t[s],u=n[s],d=c.length,f=a[s]=new Array(d),p=0;p<d;++p)(l=c[p]||u[p])&&(f[p]=l);for(;s<r;++s)a[s]=t[s];return new ho(a,this._parents,this._name,this._id)},selection:function(){return new uo(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=mo(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=Yr(a,t);Wr(a,e,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ho(r,this._parents,e,n)},call:go.call,nodes:go.nodes,node:go.node,size:go.size,empty:go.empty,each:go.each,on:function(e,t){var n=this._id;return arguments.length<2?Yr(this.node(),n).on.on(e):this.each(function(e,t,n){var r,o,i=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?Hr:Xr;return function(){var a=i(this,e),s=a.on;s!==r&&(o=(r=s).copy()).on(t,n),a.on=o}}(n,e,t))},attr:function(e,t){var n=tt(e),r="transform"===n?wr:Kr;return this.attrTween(e,"function"==typeof t?(n.local?ro:no)(n,r,Jr(this,"attr."+e,t)):null==t?(n.local?Qr:qr)(n):(n.local?to:eo)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=tt(e);return this.tween(n,(r.local?oo:io)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?vr:Kr;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=Mt(this,e),a=(this.style.removeProperty(e),Mt(this,e));return i===a?null:i===n&&a===r?o:o=t(n=i,r=a)}}(e,r)).on("end.style."+e,fo(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var a=Mt(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=Mt(this,e)),a===l?null:a===r&&l===o?i:(o=l,i=t(r=a,s))}}(e,r,Jr(this,"style."+e,t))).each(function(e,t){var n,r,o,i,a="style."+t,s="end."+a;return function(){var l=Xr(this,e),c=l.on,u=null==l.value[a]?i||(i=fo(t)):void 0;c===n&&o===u||(r=(n=c).copy()).on(s,o=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var a=Mt(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,o;function i(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,i,n)),r}return i._value=t,i}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(Jr(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=Yr(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===e)return r.value;return null}return this.each((null==t?Zr:Ur)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?ao:so)(t,e)):Yr(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?lo:co)(t,e)):Yr(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(function(e,t){if("function"!=typeof t)throw new Error;return function(){Xr(this,e).ease=t}}(t,e)):Yr(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;Xr(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var s={value:a},l={value:function(){0==--o&&i()}};n.each((function(){var n=Xr(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t})),0===o&&i()}))},[Symbol.iterator]:go[Symbol.iterator]};var yo={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function bo(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}dn.prototype.interrupt=function(e){return this.each((function(){$r(this,e)}))},dn.prototype.transition=function(e){var t,n;e instanceof ho?(t=e._id,e=e._name):(t=mo(),(n=yo).time=Mr(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,s=r[i],l=s.length,c=0;c<l;++c)(a=s[c])&&Wr(a,e,t,c,s,n||bo(a,t));return new ho(r,this._parents,e,t)};var vo=e=>()=>e;function wo(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function xo(e,t,n){this.k=e,this.x=t,this.y=n}xo.prototype={constructor:xo,scale:function(e){return 1===e?this:new xo(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new xo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Eo=new xo(1,0,0);function ko(e){e.stopImmediatePropagation()}function Co(e){e.preventDefault(),e.stopImmediatePropagation()}function So(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function _o(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function Io(){return this.__zoom||Eo}function Ao(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function No(){return navigator.maxTouchPoints||"ontouchstart"in this}function Oo(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function Ro(){var e,t,n,r=So,o=_o,i=Oo,a=Ao,s=No,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,d=Cr,f=Ue("start","zoom","end"),p=0,h=10;function m(e){e.property("__zoom",Io).on("wheel.zoom",E,{passive:!1}).on("mousedown.zoom",k).on("dblclick.zoom",C).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",_).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new xo(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,o=t[1]-n[1]*e.k;return r===e.x&&o===e.y?e:new xo(e.k,r,o)}function b(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function v(e,t,n,r){e.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,i=arguments,a=w(e,i).event(r),s=o.apply(e,i),l=null==n?b(s):"function"==typeof n?n.apply(e,i):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,f="function"==typeof t?t.apply(e,i):t,p=d(u.invert(l).concat(c/u.k),f.invert(l).concat(c/f.k));return function(e){if(1===e)e=f;else{var t=p(e),n=c/t[2];e=new xo(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}}))}function w(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=o.apply(e,t),this.taps=0}function E(e,...t){if(r.apply(this,arguments)){var n=w(this,t).event(e),o=this.__zoom,s=Math.max(l[0],Math.min(l[1],o.k*Math.pow(2,a.apply(this,arguments)))),u=pn(e);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=o.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(o.k===s)return;n.mouse=[u,o.invert(u)],$r(this),n.start()}Co(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),150),n.zoom("mouse",i(y(g(o,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function k(e,...t){if(!n&&r.apply(this,arguments)){var o=e.currentTarget,a=w(this,t,!0).event(e),s=fn(e.view).on("mousemove.zoom",(function(e){if(Co(e),!a.moved){var t=e.clientX-u,n=e.clientY-d;a.moved=t*t+n*n>p}a.event(e).zoom("mouse",i(y(a.that.__zoom,a.mouse[0]=pn(e,o),a.mouse[1]),a.extent,c))}),!0).on("mouseup.zoom",(function(e){s.on("mousemove.zoom mouseup.zoom",null),vn(e.view,a.moved),Co(e),a.event(e).end()}),!0),l=pn(e,o),u=e.clientX,d=e.clientY;bn(e.view),ko(e),a.mouse=[l,this.__zoom.invert(l)],$r(this),a.start()}}function C(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=pn(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(a),l=n.k*(e.shiftKey?.5:2),d=i(y(g(n,l),a,s),o.apply(this,t),c);Co(e),u>0?fn(this).transition().duration(u).call(v,d,a,e):fn(this).call(m.transform,d,a,e)}}function S(n,...o){if(r.apply(this,arguments)){var i,a,s,l,c=n.touches,u=c.length,d=w(this,o,n.changedTouches.length===u).event(n);for(ko(n),a=0;a<u;++a)l=[l=pn(s=c[a],this),this.__zoom.invert(l),s.identifier],d.touch0?d.touch1||d.touch0[2]===l[2]||(d.touch1=l,d.taps=0):(d.touch0=l,i=!0,d.taps=1+!!e);e&&(e=clearTimeout(e)),i&&(d.taps<2&&(t=l[0],e=setTimeout((function(){e=null}),500)),$r(this),d.start())}}function _(e,...t){if(this.__zooming){var n,r,o,a,s=w(this,t).event(e),l=e.changedTouches,u=l.length;for(Co(e),n=0;n<u;++n)o=pn(r=l[n],this),s.touch0&&s.touch0[2]===r.identifier?s.touch0[0]=o:s.touch1&&s.touch1[2]===r.identifier&&(s.touch1[0]=o);if(r=s.that.__zoom,s.touch1){var d=s.touch0[0],f=s.touch0[1],p=s.touch1[0],h=s.touch1[1],m=(m=p[0]-d[0])*m+(m=p[1]-d[1])*m,b=(b=h[0]-f[0])*b+(b=h[1]-f[1])*b;r=g(r,Math.sqrt(m/b)),o=[(d[0]+p[0])/2,(d[1]+p[1])/2],a=[(f[0]+h[0])/2,(f[1]+h[1])/2]}else{if(!s.touch0)return;o=s.touch0[0],a=s.touch0[1]}s.zoom("touch",i(y(r,o,a),s.extent,c))}}function I(e,...r){if(this.__zooming){var o,i,a=w(this,r).event(e),s=e.changedTouches,l=s.length;for(ko(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<l;++o)i=s[o],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(i=pn(i,this),Math.hypot(t[0]-i[0],t[1]-i[1])<h)){var c=fn(this).on("dblclick.zoom");c&&c.apply(this,arguments)}}}return m.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",Io),e!==o?v(e,t,n,r):o.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},m.scaleBy=function(e,t,n,r){m.scaleTo(e,(function(){return this.__zoom.k*("function"==typeof t?t.apply(this,arguments):t)}),n,r)},m.scaleTo=function(e,t,n,r){m.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,a=null==n?b(e):"function"==typeof n?n.apply(this,arguments):n,s=r.invert(a),l="function"==typeof t?t.apply(this,arguments):t;return i(y(g(r,l),a,s),e,c)}),n,r)},m.translateBy=function(e,t,n,r){m.transform(e,(function(){return i(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),c)}),null,r)},m.translateTo=function(e,t,n,r,a){m.transform(e,(function(){var e=o.apply(this,arguments),a=this.__zoom,s=null==r?b(e):"function"==typeof r?r.apply(this,arguments):r;return i(Eo.translate(s[0],s[1]).scale(a.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,c)}),r,a)},x.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=fn(this.that).datum();f.call(e,this.that,new wo(e,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:f}),t)}},m.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:vo(+e),m):a},m.filter=function(e){return arguments.length?(r="function"==typeof e?e:vo(!!e),m):r},m.touchable=function(e){return arguments.length?(s="function"==typeof e?e:vo(!!e),m):s},m.extent=function(e){return arguments.length?(o="function"==typeof e?e:vo([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),m):o},m.scaleExtent=function(e){return arguments.length?(l[0]=+e[0],l[1]=+e[1],m):[l[0],l[1]]},m.translateExtent=function(e){return arguments.length?(c[0][0]=+e[0][0],c[1][0]=+e[1][0],c[0][1]=+e[0][1],c[1][1]=+e[1][1],m):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},m.constrain=function(e){return arguments.length?(i=e,m):i},m.duration=function(e){return arguments.length?(u=+e,m):u},m.interpolate=function(e){return arguments.length?(d=e,m):d},m.on=function(){var e=f.on.apply(f,arguments);return e===f?m:e},m.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,m):Math.sqrt(p)},m.tapDistance=function(e){return arguments.length?(h=+e,m):h},m}xo.prototype;const To=i(null),Mo=To.Provider,Po=()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",Do=e=>`Node type "${e}" not found. Using fallback type "default".`,jo=()=>"The React Flow parent container needs a width and a height to render the graph.",Bo=()=>"Only child nodes can use a parent extent.",Lo=()=>"Can't create edge. An edge needs a source and a target.",zo=e=>`Marker type "${e}" doesn't exist.`,Fo=(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,Vo=()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",Go=e=>`Edge type "${e}" not found. Using fallback type "default".`,Wo=e=>`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,Ho=(()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001")();function Xo(e,t){const n=o(To);if(null===n)throw new Error(Ho);return Xe(n,e,t)}const Yo=()=>{const e=o(To);if(null===e)throw new Error(Ho);return a((()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy})),[e])},$o=e=>e.userSelectionActive?"none":"all";function Zo({position:e,children:n,className:r,style:o,...i}){const a=Xo($o),s=`${e}`.split("-");return t.createElement("div",{className:Ve(["react-flow__panel",r,...s]),style:{...o,pointerEvents:a},...i},n)}function Uo({proOptions:e,position:n="bottom-right"}){return e?.hideAttribution?null:t.createElement(Zo,{position:n,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},t.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}var Jo=n((({x:e,y:n,label:r,labelStyle:o={},labelShowBg:i=!0,labelBgStyle:a={},labelBgPadding:l=[2,4],labelBgBorderRadius:d=2,children:f,className:p,...h})=>{const m=u(null),[g,y]=c({x:0,y:0,width:0,height:0}),b=Ve(["react-flow__edge-textwrapper",p]);return s((()=>{if(m.current){const e=m.current.getBBox();y({x:e.x,y:e.y,width:e.width,height:e.height})}}),[r]),void 0!==r&&r?t.createElement("g",{transform:`translate(${e-g.width/2} ${n-g.height/2})`,className:b,visibility:g.width?"visible":"hidden",...h},i&&t.createElement("rect",{width:g.width+2*l[0],x:-l[0],y:-l[1],height:g.height+2*l[1],className:"react-flow__edge-textbg",style:a,rx:d,ry:d}),t.createElement("text",{className:"react-flow__edge-text",y:g.height/2,dy:"0.3em",ref:m,style:o},r),f):null}));const Ko=e=>({width:e.offsetWidth,height:e.offsetHeight}),qo=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),Qo=(e={x:0,y:0},t)=>({x:qo(e.x,t[0][0],t[1][0]),y:qo(e.y,t[0][1],t[1][1])}),ei=(e,t,n)=>e<t?qo(Math.abs(e-t),1,50)/50:e>n?-qo(Math.abs(e-n),1,50)/50:0,ti=(e,t)=>[20*ei(e.x,35,t.width-35),20*ei(e.y,35,t.height-35)],ni=e=>e.getRootNode?.()||window?.document,ri=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),oi=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),ii=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),ai=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),si=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},li=e=>!isNaN(e)&&isFinite(e),ci=Symbol.for("internals"),ui=["Enter"," ","Escape"],di=(e,t)=>{"development"===process.env.NODE_ENV&&console.warn(`[React Flow]: ${t} Help: https://reactflow.dev/error#${e}`)};function fi(e){const t=(e=>"nativeEvent"in e)(e)?e.nativeEvent:e,n=t.composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable")||!!n?.closest(".nokey")}const pi=e=>"clientX"in e,hi=(e,t)=>{const n=pi(e),r=n?e.clientX:e.touches?.[0].clientX,o=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:o-(t?.top??0)}},mi=()=>"undefined"!=typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0,gi=({id:e,path:n,labelX:r,labelY:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h=20})=>t.createElement(t.Fragment,null,t.createElement("path",{id:e,style:d,d:n,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:p}),h&&t.createElement("path",{d:n,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),i&&li(r)&&li(o)?t.createElement(Jo,{x:r,y:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u}):null);function yi(e,t,n){return void 0===n?n:r=>{const o=t().edges.find((t=>t.id===e));o&&n(r,{...o})}}function bi({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,i=n<e?n+o:n-o,a=Math.abs(r-t)/2;return[i,r<t?r+a:r-a,o,a]}function vi({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:i,targetControlX:a,targetControlY:s}){const l=.125*e+.375*o+.375*a+.125*n,c=.125*t+.375*i+.375*s+.125*r;return[l,c,Math.abs(l-e),Math.abs(c-t)]}var wi,xi,Ei,ki,Ci,Si;function _i({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===Si.Left||e===Si.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function Ii({sourceX:e,sourceY:t,sourcePosition:n=Si.Bottom,targetX:r,targetY:o,targetPosition:i=Si.Top}){const[a,s]=_i({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,c]=_i({pos:i,x1:r,y1:o,x2:e,y2:t}),[u,d,f,p]=vi({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:a,sourceControlY:s,targetControlX:l,targetControlY:c});return[`M${e},${t} C${a},${s} ${l},${c} ${r},${o}`,u,d,f,p]}gi.displayName="BaseEdge",function(e){e.Strict="strict",e.Loose="loose"}(wi||(wi={})),function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"}(xi||(xi={})),function(e){e.Partial="partial",e.Full="full"}(Ei||(Ei={})),function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"}(ki||(ki={})),function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"}(Ci||(Ci={})),function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"}(Si||(Si={}));const Ai=n((({sourceX:e,sourceY:n,targetX:r,targetY:o,sourcePosition:i=Si.Bottom,targetPosition:a=Si.Top,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:g})=>{const[y,b,v]=Ii({sourceX:e,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:a});return t.createElement(gi,{path:y,labelX:b,labelY:v,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:g})}));Ai.displayName="SimpleBezierEdge";const Ni={[Si.Left]:{x:-1,y:0},[Si.Right]:{x:1,y:0},[Si.Top]:{x:0,y:-1},[Si.Bottom]:{x:0,y:1}},Oi=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Ri({source:e,sourcePosition:t=Si.Bottom,target:n,targetPosition:r=Si.Top,center:o,offset:i}){const a=Ni[t],s=Ni[r],l={x:e.x+a.x*i,y:e.y+a.y*i},c={x:n.x+s.x*i,y:n.y+s.y*i},u=(({source:e,sourcePosition:t=Si.Bottom,target:n})=>t===Si.Left||t===Si.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1})({source:l,sourcePosition:t,target:c}),d=0!==u.x?"x":"y",f=u[d];let p,h,m=[];const g={x:0,y:0},y={x:0,y:0},[b,v,w,x]=bi({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]==-1){p=o.x??b,h=o.y??v;const e=[{x:p,y:l.y},{x:p,y:c.y}],t=[{x:l.x,y:h},{x:c.x,y:h}];m=a[d]===f?"x"===d?e:t:"x"===d?t:e}else{const o=[{x:l.x,y:c.y}],u=[{x:c.x,y:l.y}];if(m="x"===d?a.x===f?u:o:a.y===f?o:u,t===r){const t=Math.abs(e[d]-n[d]);if(t<=i){const r=Math.min(i-1,i-t);a[d]===f?g[d]=(l[d]>e[d]?-1:1)*r:y[d]=(c[d]>n[d]?-1:1)*r}}if(t!==r){const e="x"===d?"y":"x",t=a[d]===s[e],n=l[e]>c[e],r=l[e]<c[e];(1===a[d]&&(!t&&n||t&&r)||1!==a[d]&&(!t&&r||t&&n))&&(m="x"===d?o:u)}const b={x:l.x+g.x,y:l.y+g.y},v={x:c.x+y.x,y:c.y+y.y};Math.max(Math.abs(b.x-m[0].x),Math.abs(v.x-m[0].x))>=Math.max(Math.abs(b.y-m[0].y),Math.abs(v.y-m[0].y))?(p=(b.x+v.x)/2,h=m[0].y):(p=m[0].x,h=(b.y+v.y)/2)}return[[e,{x:l.x+g.x,y:l.y+g.y},...m,{x:c.x+y.x,y:c.y+y.y},n],p,h,w,x]}function Ti({sourceX:e,sourceY:t,sourcePosition:n=Si.Bottom,targetX:r,targetY:o,targetPosition:i=Si.Top,borderRadius:a=5,centerX:s,centerY:l,offset:c=20}){const[u,d,f,p,h]=Ri({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:i,center:{x:s,y:l},offset:c}),m=u.reduce(((e,t,n)=>{let r="";return r=n>0&&n<u.length-1?function(e,t,n,r){const o=Math.min(Oi(e,t)/2,Oi(t,n)/2,r),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a)return`L ${i+o*(e.x<n.x?-1:1)},${a}Q ${i},${a} ${i},${a+o*(e.y<n.y?1:-1)}`;const s=e.x<n.x?1:-1;return`L ${i},${a+o*(e.y<n.y?-1:1)}Q ${i},${a} ${i+o*s},${a}`}(u[n-1],t,u[n+1],a):`${0===n?"M":"L"}${t.x} ${t.y}`,e+=r}),"");return[m,d,f,p,h]}const Mi=n((({sourceX:e,sourceY:n,targetX:r,targetY:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,sourcePosition:f=Si.Bottom,targetPosition:p=Si.Top,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[b,v,w]=Ti({sourceX:e,sourceY:n,sourcePosition:f,targetX:r,targetY:o,targetPosition:p,borderRadius:g?.borderRadius,offset:g?.offset});return t.createElement(gi,{path:b,labelX:v,labelY:w,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:h,markerStart:m,interactionWidth:y})}));Mi.displayName="SmoothStepEdge";const Pi=n((e=>t.createElement(Mi,{...e,pathOptions:a((()=>({borderRadius:0,offset:e.pathOptions?.offset})),[e.pathOptions?.offset])})));Pi.displayName="StepEdge";const Di=n((({sourceX:e,sourceY:n,targetX:r,targetY:o,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h})=>{const[m,g,y]=function({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,i,a,s]=bi({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,i,a,s]}({sourceX:e,sourceY:n,targetX:r,targetY:o});return t.createElement(gi,{path:m,labelX:g,labelY:y,label:i,labelStyle:a,labelShowBg:s,labelBgStyle:l,labelBgPadding:c,labelBgBorderRadius:u,style:d,markerEnd:f,markerStart:p,interactionWidth:h})}));function ji(e,t){return e>=0?.5*e:25*t*Math.sqrt(-e)}function Bi({pos:e,x1:t,y1:n,x2:r,y2:o,c:i}){switch(e){case Si.Left:return[t-ji(t-r,i),n];case Si.Right:return[t+ji(r-t,i),n];case Si.Top:return[t,n-ji(n-o,i)];case Si.Bottom:return[t,n+ji(o-n,i)]}}function Li({sourceX:e,sourceY:t,sourcePosition:n=Si.Bottom,targetX:r,targetY:o,targetPosition:i=Si.Top,curvature:a=.25}){const[s,l]=Bi({pos:n,x1:e,y1:t,x2:r,y2:o,c:a}),[c,u]=Bi({pos:i,x1:r,y1:o,x2:e,y2:t,c:a}),[d,f,p,h]=vi({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${e},${t} C${s},${l} ${c},${u} ${r},${o}`,d,f,p,h]}Di.displayName="StraightEdge";const zi=n((({sourceX:e,sourceY:n,targetX:r,targetY:o,sourcePosition:i=Si.Bottom,targetPosition:a=Si.Top,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,pathOptions:g,interactionWidth:y})=>{const[b,v,w]=Li({sourceX:e,sourceY:n,sourcePosition:i,targetX:r,targetY:o,targetPosition:a,curvature:g?.curvature});return t.createElement(gi,{path:b,labelX:v,labelY:w,label:s,labelStyle:l,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:f,style:p,markerEnd:h,markerStart:m,interactionWidth:y})}));zi.displayName="BezierEdge";const Fi=i(null),Vi=Fi.Provider;Fi.Consumer;const Gi=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,Wi=(e,t)=>{if(void 0===e)return"";if("string"==typeof e)return e;return`${t?`${t}__`:""}${Object.keys(e).sort().map((t=>`${t}=${e[t]}`)).join("&")}`},Hi=({x:e,y:t},[n,r,o],i,[a,s])=>{const l={x:(e-n)/o,y:(t-r)/o};return i?{x:a*Math.round(l.x/a),y:s*Math.round(l.y/s)}:l},Xi=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),Yi=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return{...o,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o}},$i=(e,t=[0,0])=>{if(0===e.length)return{x:0,y:0,width:0,height:0};const n=e.reduce(((e,n)=>{const{x:r,y:o}=Yi(n,t).positionAbsolute;return ri(e,oi({x:r,y:o,width:n.width||0,height:n.height||0}))}),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ii(n)},Zi=(e,t,[n,r,o]=[0,0,1],i=!1,a=!1,s=[0,0])=>{const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},c=[];return e.forEach((e=>{const{width:t,height:n,selectable:r=!0,hidden:o=!1}=e;if(a&&!r||o)return!1;const{positionAbsolute:u}=Yi(e,s),d={x:u.x,y:u.y,width:t||0,height:n||0},f=si(l,d);(void 0===t||void 0===n||null===t||null===n||i&&f>0||f>=(t||0)*(n||0)||e.dragging)&&c.push(e)})),c},Ui=(e,t)=>{const n=e.map((e=>e.id));return t.filter((e=>n.includes(e.source)||n.includes(e.target)))},Ji=(e,t,n,r,o,i=.1)=>{const a=t/(e.width*(1+i)),s=n/(e.height*(1+i)),l=Math.min(a,s),c=qo(l,r,o);return{x:t/2-(e.x+e.width/2)*c,y:n/2-(e.y+e.height/2)*c,zoom:c}},Ki=(e,t=0)=>e.transition().duration(t);function qi(e,t,n,r){return(t[n]||[]).reduce(((t,o)=>(`${e.id}-${o.id}-${n}`!==r&&t.push({id:o.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+o.x+o.width/2,y:(e.positionAbsolute?.y??0)+o.y+o.height/2}),t)),[])}const Qi={source:null,target:null,sourceHandle:null,targetHandle:null},ea=()=>({handleDomNode:null,isValid:!1,connection:Qi,endHandle:null});function ta(e,t,n,r,o,i,a){const s="target"===o,l=a.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),c={...ea(),handleDomNode:l};if(l){const e=na(void 0,l),o=l.getAttribute("data-nodeid"),a=l.getAttribute("data-handleid"),u=l.classList.contains("connectable"),d=l.classList.contains("connectableend"),f={source:s?o:n,sourceHandle:s?a:r,target:s?n:o,targetHandle:s?r:a};c.connection=f;u&&d&&(t===wi.Strict?s&&"source"===e||!s&&"target"===e:o!==n||a!==r)&&(c.endHandle={nodeId:o,handleId:a,type:e},c.isValid=i(f))}return c}function na(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function ra(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function oa(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function ia({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:i,setState:a,isValidConnection:s,edgeUpdaterType:l,onReconnectEnd:c}){const u=ni(e.target),{connectionMode:d,domNode:f,autoPanOnConnect:p,connectionRadius:h,onConnectStart:m,panBy:g,getNodes:y,cancelConnection:b}=i();let v,w=0;const{x:x,y:E}=hi(e),k=u?.elementFromPoint(x,E),C=na(l,k),S=f?.getBoundingClientRect();if(!S||!C)return;let _,I=hi(e,S),A=!1,N=null,O=!1,R=null;const T=function({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce(((e,o)=>{if(o[ci]){const{handleBounds:i}=o[ci];let a=[],s=[];i&&(a=qi(o,i,"source",`${t}-${n}-${r}`),s=qi(o,i,"target",`${t}-${n}-${r}`)),e.push(...a,...s)}return e}),[])}({nodes:y(),nodeId:n,handleId:t,handleType:C}),M=()=>{if(!p)return;const[e,t]=ti(I,S);g({x:e,y:t}),w=requestAnimationFrame(M)};function P(e){const{transform:r}=i();I=hi(e,S);const{handle:l,validHandleResult:c}=function(e,t,n,r,o,i){const{x:a,y:s}=hi(e),l=t.elementsFromPoint(a,s).find((e=>e.classList.contains("react-flow__handle")));if(l){const e=l.getAttribute("data-nodeid");if(e){const t=na(void 0,l),r=l.getAttribute("data-handleid"),a=i({nodeId:e,id:r,type:t});if(a){const i=o.find((n=>n.nodeId===e&&n.type===t&&n.id===r));return{handle:{id:r,type:t,nodeId:e,x:i?.x||n.x,y:i?.y||n.y},validHandleResult:a}}}}let c=[],u=1/0;if(o.forEach((e=>{const t=Math.sqrt((e.x-n.x)**2+(e.y-n.y)**2);if(t<=r){const n=i(e);t<=u&&(t<u?c=[{handle:e,validHandleResult:n}]:t===u&&c.push({handle:e,validHandleResult:n}),u=t)}})),!c.length)return{handle:null,validHandleResult:ea()};if(1===c.length)return c[0];const d=c.some((({validHandleResult:e})=>e.isValid)),f=c.some((({handle:e})=>"target"===e.type));return c.find((({handle:e,validHandleResult:t})=>f?"target"===e.type:!d||t.isValid))||c[0]}(e,u,Hi(I,r,!1,[1,1]),h,T,(e=>ta(e,d,n,t,o?"target":"source",s,u)));if(v=l,A||(M(),A=!0),R=c.handleDomNode,N=c.connection,O=c.isValid,a({connectionPosition:v&&O?Xi({x:v.x,y:v.y},r):I,connectionStatus:oa(!!v,O),connectionEndHandle:c.endHandle}),!v&&!O&&!R)return ra(_);N.source!==N.target&&R&&(ra(_),_=R,R.classList.add("connecting","react-flow__handle-connecting"),R.classList.toggle("valid",O),R.classList.toggle("react-flow__handle-valid",O))}function D(e){(v||R)&&N&&O&&r?.(N),i().onConnectEnd?.(e),l&&c?.(e),ra(_),b(),cancelAnimationFrame(w),A=!1,O=!1,N=null,R=null,u.removeEventListener("mousemove",P),u.removeEventListener("mouseup",D),u.removeEventListener("touchmove",P),u.removeEventListener("touchend",D)}a({connectionPosition:I,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:C,connectionStartHandle:{nodeId:n,handleId:t,type:C},connectionEndHandle:null}),m?.(e,{nodeId:n,handleId:t,handleType:C}),u.addEventListener("mousemove",P),u.addEventListener("mouseup",D),u.addEventListener("touchmove",P),u.addEventListener("touchend",D)}const aa=()=>!0,sa=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),la=r((({type:e="source",position:n=Si.Top,isValidConnection:r,isConnectable:i=!0,isConnectableStart:a=!0,isConnectableEnd:s=!0,id:l,onConnect:c,children:u,className:d,onMouseDown:f,onTouchStart:p,...h},m)=>{const g=l||null,y="target"===e,b=Yo(),v=o(Fi),{connectOnClick:w,noPanClassName:x}=Xo(sa,$e),{connecting:E,clickConnecting:k}=Xo(((e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:i,connectionClickStartHandle:a}=r;return{connecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n||i?.nodeId===e&&i?.handleId===t&&i?.type===n,clickConnecting:a?.nodeId===e&&a?.handleId===t&&a?.type===n}})(v,g,e),$e);v||b.getState().onError?.("010",Vo());const C=e=>{const{defaultEdgeOptions:t,onConnect:n,hasDefaultEdges:r}=b.getState(),o={...t,...e};if(r){const{edges:e,setEdges:t}=b.getState();t(((e,t)=>{if(!e.source||!e.target)return di("006",Lo()),t;let n;return n=(e=>"id"in e&&"source"in e&&"target"in e)(e)?{...e}:{...e,id:Gi(e)},((e,t)=>t.some((t=>!(t.source!==e.source||t.target!==e.target||t.sourceHandle!==e.sourceHandle&&(t.sourceHandle||e.sourceHandle)||t.targetHandle!==e.targetHandle&&(t.targetHandle||e.targetHandle)))))(n,t)?t:t.concat(n)})(o,e))}n?.(o),c?.(o)},S=e=>{if(!v)return;const t=pi(e);a&&(t&&0===e.button||!t)&&ia({event:e,handleId:g,nodeId:v,onConnect:C,isTarget:y,getState:b.getState,setState:b.setState,isValidConnection:r||b.getState().isValidConnection||aa}),t?f?.(e):p?.(e)};return t.createElement("div",{"data-handleid":g,"data-nodeid":v,"data-handlepos":n,"data-id":`${v}-${g}-${e}`,className:Ve(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,d,{source:!y,target:y,connectable:i,connectablestart:a,connectableend:s,connecting:k,connectionindicator:i&&(a&&!E||s&&E)}]),onMouseDown:S,onTouchStart:S,onClick:w?t=>{const{onClickConnectStart:n,onClickConnectEnd:o,connectionClickStartHandle:i,connectionMode:s,isValidConnection:l}=b.getState();if(!v||!i&&!a)return;if(!i)return n?.(t,{nodeId:v,handleId:g,handleType:e}),void b.setState({connectionClickStartHandle:{nodeId:v,type:e,handleId:g}});const c=ni(t.target),u=r||l||aa,{connection:d,isValid:f}=ta({nodeId:v,id:g,type:e},s,i.nodeId,i.handleId||null,i.type,u,c);f&&C(d),o?.(t),b.setState({connectionClickStartHandle:null})}:void 0,ref:m,...h},u)}));la.displayName="Handle";var ca=n(la);const ua=({data:e,isConnectable:n,targetPosition:r=Si.Top,sourcePosition:o=Si.Bottom})=>t.createElement(t.Fragment,null,t.createElement(ca,{type:"target",position:r,isConnectable:n}),e?.label,t.createElement(ca,{type:"source",position:o,isConnectable:n}));ua.displayName="DefaultNode";var da=n(ua);const fa=({data:e,isConnectable:n,sourcePosition:r=Si.Bottom})=>t.createElement(t.Fragment,null,e?.label,t.createElement(ca,{type:"source",position:r,isConnectable:n}));fa.displayName="InputNode";var pa=n(fa);const ha=({data:e,isConnectable:n,targetPosition:r=Si.Top})=>t.createElement(t.Fragment,null,t.createElement(ca,{type:"target",position:r,isConnectable:n}),e?.label);ha.displayName="OutputNode";var ma=n(ha);const ga=()=>null;ga.displayName="GroupNode";const ya=e=>({selectedNodes:e.getNodes().filter((e=>e.selected)),selectedEdges:e.edges.filter((e=>e.selected)).map((e=>({...e})))}),ba=e=>e.id;function va(e,t){return $e(e.selectedNodes.map(ba),t.selectedNodes.map(ba))&&$e(e.selectedEdges.map(ba),t.selectedEdges.map(ba))}const wa=n((({onSelectionChange:e})=>{const t=Yo(),{selectedNodes:n,selectedEdges:r}=Xo(ya,va);return s((()=>{const o={nodes:n,edges:r};e?.(o),t.getState().onSelectionChange.forEach((e=>e(o)))}),[n,r,e]),null}));wa.displayName="SelectionListener";const xa=e=>!!e.onSelectionChange;function Ea({onSelectionChange:e}){const n=Xo(xa);return e||n?t.createElement(wa,{onSelectionChange:e}):null}const ka=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Ca(e,t){s((()=>{void 0!==e&&t(e)}),[e])}function Sa(e,t,n){s((()=>{void 0!==t&&n({[e]:t})}),[t])}const _a=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:i,onConnectEnd:a,onClickConnectStart:l,onClickConnectEnd:c,nodesDraggable:u,nodesConnectable:d,nodesFocusable:f,edgesFocusable:p,edgesUpdatable:h,elevateNodesOnSelect:m,minZoom:g,maxZoom:y,nodeExtent:b,onNodesChange:v,onEdgesChange:w,elementsSelectable:x,connectionMode:E,snapGrid:k,snapToGrid:C,translateExtent:S,connectOnClick:_,defaultEdgeOptions:I,fitView:A,fitViewOptions:N,onNodesDelete:O,onEdgesDelete:R,onNodeDrag:T,onNodeDragStart:M,onNodeDragStop:P,onSelectionDrag:D,onSelectionDragStart:j,onSelectionDragStop:B,noPanClassName:L,nodeOrigin:z,rfId:F,autoPanOnConnect:V,autoPanOnNodeDrag:G,onError:W,connectionRadius:H,isValidConnection:X,nodeDragThreshold:Y})=>{const{setNodes:$,setEdges:Z,setDefaultNodesAndEdges:U,setMinZoom:J,setMaxZoom:K,setTranslateExtent:q,setNodeExtent:Q,reset:ee}=Xo(ka,$e),te=Yo();return s((()=>{const e=r?.map((e=>({...e,...I})));return U(n,e),()=>{ee()}}),[]),Sa("defaultEdgeOptions",I,te.setState),Sa("connectionMode",E,te.setState),Sa("onConnect",o,te.setState),Sa("onConnectStart",i,te.setState),Sa("onConnectEnd",a,te.setState),Sa("onClickConnectStart",l,te.setState),Sa("onClickConnectEnd",c,te.setState),Sa("nodesDraggable",u,te.setState),Sa("nodesConnectable",d,te.setState),Sa("nodesFocusable",f,te.setState),Sa("edgesFocusable",p,te.setState),Sa("edgesUpdatable",h,te.setState),Sa("elementsSelectable",x,te.setState),Sa("elevateNodesOnSelect",m,te.setState),Sa("snapToGrid",C,te.setState),Sa("snapGrid",k,te.setState),Sa("onNodesChange",v,te.setState),Sa("onEdgesChange",w,te.setState),Sa("connectOnClick",_,te.setState),Sa("fitViewOnInit",A,te.setState),Sa("fitViewOnInitOptions",N,te.setState),Sa("onNodesDelete",O,te.setState),Sa("onEdgesDelete",R,te.setState),Sa("onNodeDrag",T,te.setState),Sa("onNodeDragStart",M,te.setState),Sa("onNodeDragStop",P,te.setState),Sa("onSelectionDrag",D,te.setState),Sa("onSelectionDragStart",j,te.setState),Sa("onSelectionDragStop",B,te.setState),Sa("noPanClassName",L,te.setState),Sa("nodeOrigin",z,te.setState),Sa("rfId",F,te.setState),Sa("autoPanOnConnect",V,te.setState),Sa("autoPanOnNodeDrag",G,te.setState),Sa("onError",W,te.setState),Sa("connectionRadius",H,te.setState),Sa("isValidConnection",X,te.setState),Sa("nodeDragThreshold",Y,te.setState),Ca(e,$),Ca(t,Z),Ca(g,J),Ca(y,K),Ca(S,q),Ca(b,Q),null},Ia={display:"none"},Aa={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Na="react-flow__node-desc",Oa="react-flow__edge-desc",Ra=e=>e.ariaLiveMessage;function Ta({rfId:e}){const n=Xo(Ra);return t.createElement("div",{id:`react-flow__aria-live-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Aa},n)}function Ma({rfId:e,disableKeyboardA11y:n}){return t.createElement(t.Fragment,null,t.createElement("div",{id:`${Na}-${e}`,style:Ia},"Press enter or space to select a node.",!n&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),t.createElement("div",{id:`${Oa}-${e}`,style:Ia},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!n&&t.createElement(Ta,{rfId:e}))}var Pa=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=c(!1),o=u(!1),i=u(new Set([])),[l,d]=a((()=>{if(null!==e){const t=(Array.isArray(e)?e:[e]).filter((e=>"string"==typeof e)).map((e=>e.split("+"))),n=t.reduce(((e,t)=>e.concat(...t)),[]);return[t,n]}return[[],[]]}),[e]);return s((()=>{const n="undefined"!=typeof document?document:null,a=t?.target||n;if(null!==e){const e=e=>{o.current=e.ctrlKey||e.metaKey||e.shiftKey;if((!o.current||o.current&&!t.actInsideInputWithModifier)&&fi(e))return!1;const n=ja(e.code,d);i.current.add(e[n]),Da(l,i.current,!1)&&(e.preventDefault(),r(!0))},n=e=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&fi(e))return!1;const n=ja(e.code,d);Da(l,i.current,!0)?(r(!1),i.current.clear()):i.current.delete(e[n]),"Meta"===e.key&&i.current.clear(),o.current=!1},s=()=>{i.current.clear(),r(!1)};return a?.addEventListener("keydown",e),a?.addEventListener("keyup",n),window.addEventListener("blur",s),()=>{a?.removeEventListener("keydown",e),a?.removeEventListener("keyup",n),window.removeEventListener("blur",s)}}}),[e,r]),n};function Da(e,t,n){return e.filter((e=>n||e.length===t.size)).some((e=>e.every((e=>t.has(e)))))}function ja(e,t){return t.includes(e)?"code":"key"}function Ba(e,t,n,r){const o=e.parentNode||e.parentId;if(!o)return n;const i=t.get(o),a=Yi(i,r);return Ba(i,t,{x:(n.x??0)+a.x,y:(n.y??0)+a.y,z:(i[ci]?.z??0)>(n.z??0)?i[ci]?.z??0:n.z??0},r)}function La(e,t,n){e.forEach((r=>{const o=r.parentNode||r.parentId;if(o&&!e.has(o))throw new Error(`Parent node ${o} not found`);if(o||n?.[r.id]){const{x:o,y:i,z:a}=Ba(r,e,{...r.position,z:r[ci]?.z??0},t);r.positionAbsolute={x:o,y:i},r[ci].z=a,n?.[r.id]&&(r[ci].isParent=!0)}}))}function za(e,t,n,r){const o=new Map,i={},a=r?1e3:0;return e.forEach((e=>{const n=(li(e.zIndex)?e.zIndex:0)+(e.selected?a:0),r=t.get(e.id),s={...e,positionAbsolute:{x:e.position.x,y:e.position.y}},l=e.parentNode||e.parentId;l&&(i[l]=!0);const c=r?.type&&r?.type!==e.type;Object.defineProperty(s,ci,{enumerable:!1,value:{handleBounds:c?void 0:r?.[ci]?.handleBounds,z:n}}),o.set(e.id,s)})),La(o,n,i),o}function Fa(e,t={}){const{getNodes:n,width:r,height:o,minZoom:i,maxZoom:a,d3Zoom:s,d3Selection:l,fitViewOnInitDone:c,fitViewOnInit:u,nodeOrigin:d}=e(),f=t.initial&&!c&&u;if(s&&l&&(f||!t.initial)){const e=n().filter((e=>{const n=t.includeHiddenNodes?e.width&&e.height:!e.hidden;return t.nodes?.length?n&&t.nodes.some((t=>t.id===e.id)):n})),c=e.every((e=>e.width&&e.height));if(e.length>0&&c){const n=$i(e,d),{x:c,y:u,zoom:f}=Ji(n,r,o,t.minZoom??i,t.maxZoom??a,t.padding??.1),p=Eo.translate(c,u).scale(f);return"number"==typeof t.duration&&t.duration>0?s.transform(Ki(l,t.duration),p):s.transform(l,p),!0}}return!1}function Va(e,t){return e.forEach((e=>{const n=t.get(e.id);n&&t.set(n.id,{...n,[ci]:n[ci],selected:e.selected})})),new Map(t)}function Ga(e,t){return t.map((t=>{const n=e.find((e=>e.id===t.id));return n&&(t.selected=n.selected),t}))}function Wa({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:i,onNodesChange:a,onEdgesChange:s,hasDefaultNodes:l,hasDefaultEdges:c}=n();e?.length&&(l&&r({nodeInternals:Va(e,o)}),a?.(e)),t?.length&&(c&&r({edges:Ga(t,i)}),s?.(t))}const Ha=()=>{},Xa={zoomIn:Ha,zoomOut:Ha,zoomTo:Ha,getZoom:()=>1,setViewport:Ha,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Ha,fitBounds:Ha,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},Ya=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection});function $a(){const e=(()=>{const e=Yo(),{d3Zoom:t,d3Selection:n}=Xo(Ya,$e),r=a((()=>n&&t?{zoomIn:e=>t.scaleBy(Ki(n,e?.duration),1.2),zoomOut:e=>t.scaleBy(Ki(n,e?.duration),1/1.2),zoomTo:(e,r)=>t.scaleTo(Ki(n,r?.duration),e),getZoom:()=>e.getState().transform[2],setViewport:(r,o)=>{const[i,a,s]=e.getState().transform,l=Eo.translate(r.x??i,r.y??a).scale(r.zoom??s);t.transform(Ki(n,o?.duration),l)},getViewport:()=>{const[t,n,r]=e.getState().transform;return{x:t,y:n,zoom:r}},fitView:t=>Fa(e.getState,t),setCenter:(r,o,i)=>{const{width:a,height:s,maxZoom:l}=e.getState(),c=void 0!==i?.zoom?i.zoom:l,u=a/2-r*c,d=s/2-o*c,f=Eo.translate(u,d).scale(c);t.transform(Ki(n,i?.duration),f)},fitBounds:(r,o)=>{const{width:i,height:a,minZoom:s,maxZoom:l}=e.getState(),{x:c,y:u,zoom:d}=Ji(r,i,a,s,l,o?.padding??.1),f=Eo.translate(c,u).scale(d);t.transform(Ki(n,o?.duration),f)},project:t=>{const{transform:n,snapToGrid:r,snapGrid:o}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Hi(t,n,r,o)},screenToFlowPosition:t=>{const{transform:n,snapToGrid:r,snapGrid:o,domNode:i}=e.getState();if(!i)return t;const{x:a,y:s}=i.getBoundingClientRect(),l={x:t.x-a,y:t.y-s};return Hi(l,n,r,o)},flowToScreenPosition:t=>{const{transform:n,domNode:r}=e.getState();if(!r)return t;const{x:o,y:i}=r.getBoundingClientRect(),a=Xi(t,n);return{x:a.x+o,y:a.y+i}},viewportInitialized:!0}:Xa),[t,n]);return r})(),t=Yo(),n=l((()=>t.getState().getNodes().map((e=>({...e})))),[]),r=l((e=>t.getState().nodeInternals.get(e)),[]),o=l((()=>{const{edges:e=[]}=t.getState();return e.map((e=>({...e})))}),[]),i=l((e=>{const{edges:n=[]}=t.getState();return n.find((t=>t.id===e))}),[]),s=l((e=>{const{getNodes:n,setNodes:r,hasDefaultNodes:o,onNodesChange:i}=t.getState(),a=n(),s="function"==typeof e?e(a):e;if(o)r(s);else if(i){const e=0===s.length?a.map((e=>({type:"remove",id:e.id}))):s.map((e=>({item:e,type:"reset"})));i(e)}}),[]),c=l((e=>{const{edges:n=[],setEdges:r,hasDefaultEdges:o,onEdgesChange:i}=t.getState(),a="function"==typeof e?e(n):e;if(o)r(a);else if(i){i(0===a.length?n.map((e=>({type:"remove",id:e.id}))):a.map((e=>({item:e,type:"reset"}))))}}),[]),u=l((e=>{const n=Array.isArray(e)?e:[e],{getNodes:r,setNodes:o,hasDefaultNodes:i,onNodesChange:a}=t.getState();if(i){o([...r(),...n])}else if(a){const e=n.map((e=>({item:e,type:"add"})));a(e)}}),[]),d=l((e=>{const n=Array.isArray(e)?e:[e],{edges:r=[],setEdges:o,hasDefaultEdges:i,onEdgesChange:a}=t.getState();if(i)o([...r,...n]);else if(a){a(n.map((e=>({item:e,type:"add"}))))}}),[]),f=l((()=>{const{getNodes:e,edges:n=[],transform:r}=t.getState(),[o,i,a]=r;return{nodes:e().map((e=>({...e}))),edges:n.map((e=>({...e}))),viewport:{x:o,y:i,zoom:a}}}),[]),p=l((({nodes:e,edges:n})=>{const{nodeInternals:r,getNodes:o,edges:i,hasDefaultNodes:a,hasDefaultEdges:s,onNodesDelete:l,onEdgesDelete:c,onNodesChange:u,onEdgesChange:d}=t.getState(),f=(e||[]).map((e=>e.id)),p=(n||[]).map((e=>e.id)),h=o().reduce(((e,t)=>{const n=t.parentNode||t.parentId,r=!f.includes(t.id)&&n&&e.find((e=>e.id===n));return("boolean"!=typeof t.deletable||t.deletable)&&(f.includes(t.id)||r)&&e.push(t),e}),[]),m=i.filter((e=>"boolean"!=typeof e.deletable||e.deletable)),g=m.filter((e=>p.includes(e.id)));if(h||g){const e=Ui(h,m),n=[...g,...e],o=n.reduce(((e,t)=>(e.includes(t.id)||e.push(t.id),e)),[]);if((s||a)&&(s&&t.setState({edges:i.filter((e=>!o.includes(e.id)))}),a&&(h.forEach((e=>{r.delete(e.id)})),t.setState({nodeInternals:new Map(r)}))),o.length>0&&(c?.(n),d&&d(o.map((e=>({id:e,type:"remove"}))))),h.length>0&&(l?.(h),u)){u(h.map((e=>({id:e.id,type:"remove"}))))}}}),[]),h=l((e=>{const n=li((r=e).width)&&li(r.height)&&li(r.x)&&li(r.y);var r;const o=n?null:t.getState().nodeInternals.get(e.id);if(!n&&!o)return[null,null,n];return[n?e:ai(o),o,n]}),[]),m=l(((e,n=!0,r)=>{const[o,i,a]=h(e);return o?(r||t.getState().getNodes()).filter((e=>{if(!(a||e.id!==i.id&&e.positionAbsolute))return!1;const t=ai(e),r=si(t,o);return n&&r>0||r>=o.width*o.height})):[]}),[]),g=l(((e,t,n=!0)=>{const[r]=h(e);if(!r)return!1;const o=si(r,t);return n&&o>0||o>=r.width*r.height}),[]);return a((()=>({...e,getNodes:n,getNode:r,getEdges:o,getEdge:i,setNodes:s,setEdges:c,addNodes:u,addEdges:d,toObject:f,deleteElements:p,getIntersectingNodes:m,isNodeIntersecting:g})),[e,n,r,o,i,s,c,u,d,f,p,m,g])}const Za={actInsideInputWithModifier:!1};const Ua={position:"absolute",width:"100%",height:"100%",top:0,left:0},Ja=e=>({x:e.x,y:e.y,zoom:e.k}),Ka=(e,t)=>e.target.closest(`.${t}`),qa=(e,t)=>2===t&&Array.isArray(e)&&e.includes(2),Qa=e=>{const t=e.ctrlKey&&mi()?10:1;return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*t},es=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),ts=({onMove:e,onMoveStart:n,onMoveEnd:r,onPaneContextMenu:o,zoomOnScroll:i=!0,zoomOnPinch:a=!0,panOnScroll:l=!1,panOnScrollSpeed:c=.5,panOnScrollMode:d=xi.Free,zoomOnDoubleClick:f=!0,elementsSelectable:p,panOnDrag:h=!0,defaultViewport:m,translateExtent:g,minZoom:y,maxZoom:b,zoomActivationKeyCode:v,preventScrolling:w=!0,children:x,noWheelClassName:E,noPanClassName:k})=>{const C=u(),S=Yo(),_=u(!1),I=u(!1),A=u(null),N=u({x:0,y:0,zoom:0}),{d3Zoom:O,d3Selection:R,d3ZoomHandler:T,userSelectionActive:M}=Xo(es,$e),P=Pa(v),D=u(0),j=u(!1),B=u();return function(e){const t=Yo();s((()=>{let n;const r=()=>{if(!e.current)return;const n=Ko(e.current);0!==n.height&&0!==n.width||t.getState().onError?.("004",jo()),t.setState({width:n.width||500,height:n.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver((()=>r())),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}}),[])}(A),s((()=>{if(A.current){const e=A.current.getBoundingClientRect(),t=Ro().scaleExtent([y,b]).translateExtent(g),n=fn(A.current).call(t),r=Eo.translate(m.x,m.y).scale(qo(m.zoom,y,b)),o=[[0,0],[e.width,e.height]],i=t.constrain()(r,o,g);t.transform(n,i),t.wheelDelta(Qa),S.setState({d3Zoom:t,d3Selection:n,d3ZoomHandler:n.on("wheel.zoom"),transform:[i.x,i.y,i.k],domNode:A.current.closest(".react-flow")})}}),[]),s((()=>{R&&O&&(!l||P||M?void 0!==T&&R.on("wheel.zoom",(function(e,t){if(!w&&"wheel"===e.type&&!e.ctrlKey||Ka(e,E))return null;e.preventDefault(),T.call(this,e,t)}),{passive:!1}):R.on("wheel.zoom",(t=>{if(Ka(t,E))return!1;t.preventDefault(),t.stopImmediatePropagation();const o=R.property("__zoom").k||1;if(t.ctrlKey&&a){const e=pn(t),n=Qa(t),r=o*Math.pow(2,n);return void O.scaleTo(R,r,e,t)}const i=1===t.deltaMode?20:1;let s=d===xi.Vertical?0:t.deltaX*i,l=d===xi.Horizontal?0:t.deltaY*i;!mi()&&t.shiftKey&&d!==xi.Vertical&&(s=t.deltaY*i,l=0),O.translateBy(R,-s/o*c,-l/o*c,{internal:!0});const u=Ja(R.property("__zoom")),{onViewportChangeStart:f,onViewportChange:p,onViewportChangeEnd:h}=S.getState();clearTimeout(B.current),j.current||(j.current=!0,n?.(t,u),f?.(u)),j.current&&(e?.(t,u),p?.(u),B.current=setTimeout((()=>{r?.(t,u),h?.(u),j.current=!1}),150))}),{passive:!1}))}),[M,l,d,R,O,T,P,a,w,E,n,e,r]),s((()=>{O&&O.on("start",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;D.current=e.sourceEvent?.button;const{onViewportChangeStart:t}=S.getState(),r=Ja(e.transform);_.current=!0,N.current=r,"mousedown"===e.sourceEvent?.type&&S.setState({paneDragging:!0}),t?.(r),n?.(e.sourceEvent,r)}))}),[O,n]),s((()=>{O&&(M&&!_.current?O.on("zoom",null):M||O.on("zoom",(t=>{const{onViewportChange:n}=S.getState();if(S.setState({transform:[t.transform.x,t.transform.y,t.transform.k]}),I.current=!(!o||!qa(h,D.current??0)),(e||n)&&!t.sourceEvent?.internal){const r=Ja(t.transform);n?.(r),e?.(t.sourceEvent,r)}})))}),[M,O,e,h,o]),s((()=>{O&&O.on("end",(e=>{if(!e.sourceEvent||e.sourceEvent.internal)return null;const{onViewportChangeEnd:t}=S.getState();if(_.current=!1,S.setState({paneDragging:!1}),o&&qa(h,D.current??0)&&!I.current&&o(e.sourceEvent),I.current=!1,(r||t)&&(n=N.current,i=e.transform,n.x!==i.x||n.y!==i.y||n.zoom!==i.k)){const n=Ja(e.transform);N.current=n,clearTimeout(C.current),C.current=setTimeout((()=>{t?.(n),r?.(e.sourceEvent,n)}),l?150:0)}var n,i}))}),[O,l,h,r,o]),s((()=>{O&&O.filter((e=>{const t=P||i,n=a&&e.ctrlKey;if((!0===h||Array.isArray(h)&&h.includes(1))&&1===e.button&&"mousedown"===e.type&&(Ka(e,"react-flow__node")||Ka(e,"react-flow__edge")))return!0;if(!(h||t||l||f||a))return!1;if(M)return!1;if(!f&&"dblclick"===e.type)return!1;if(Ka(e,E)&&"wheel"===e.type)return!1;if(Ka(e,k)&&("wheel"!==e.type||l&&"wheel"===e.type&&!P))return!1;if(!a&&e.ctrlKey&&"wheel"===e.type)return!1;if(!t&&!l&&!n&&"wheel"===e.type)return!1;if(!h&&("mousedown"===e.type||"touchstart"===e.type))return!1;if(Array.isArray(h)&&!h.includes(e.button)&&"mousedown"===e.type)return!1;const r=Array.isArray(h)&&h.includes(e.button)||!e.button||e.button<=1;return(!e.ctrlKey||"wheel"===e.type)&&r}))}),[M,O,i,a,l,f,h,p,P]),t.createElement("div",{className:"react-flow__renderer",ref:A,style:Ua},x)},ns=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function rs(){const{userSelectionActive:e,userSelectionRect:n}=Xo(ns,$e);return e&&n?t.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:n.width,height:n.height,transform:`translate(${n.x}px, ${n.y}px)`}}):null}function os(e,t){const n=t.parentNode||t.parentId,r=e.find((e=>e.id===n));if(r){const e=t.position.x+t.width-r.width,n=t.position.y+t.height-r.height;if(e>0||n>0||t.position.x<0||t.position.y<0){if(r.style={...r.style}||{},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,e>0&&(r.style.width+=e),n>0&&(r.style.height+=n),t.position.x<0){const e=Math.abs(t.position.x);r.position.x=r.position.x-e,r.style.width+=e,t.position.x=0}if(t.position.y<0){const e=Math.abs(t.position.y);r.position.y=r.position.y-e,r.style.height+=e,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function is(e,t){if(e.some((e=>"reset"===e.type)))return e.filter((e=>"reset"===e.type)).map((e=>e.item));const n=e.filter((e=>"add"===e.type)).map((e=>e.item));return t.reduce(((t,n)=>{const r=e.filter((e=>e.id===n.id));if(0===r.length)return t.push(n),t;const o={...n};for(const e of r)if(e)switch(e.type){case"select":o.selected=e.selected;break;case"position":void 0!==e.position&&(o.position=e.position),void 0!==e.positionAbsolute&&(o.positionAbsolute=e.positionAbsolute),void 0!==e.dragging&&(o.dragging=e.dragging),o.expandParent&&os(t,o);break;case"dimensions":void 0!==e.dimensions&&(o.width=e.dimensions.width,o.height=e.dimensions.height),void 0!==e.updateStyle&&(o.style={...o.style||{},...e.dimensions}),"boolean"==typeof e.resizing&&(o.resizing=e.resizing),o.expandParent&&os(t,o);break;case"remove":return t}return t.push(o),t}),n)}function as(e,t){return is(e,t)}function ss(e,t){return is(e,t)}const ls=(e,t)=>({id:e,type:"select",selected:t});function cs(e,t){return e.reduce(((e,n)=>{const r=t.includes(n.id);return!n.selected&&r?(n.selected=!0,e.push(ls(n.id,!0))):n.selected&&!r&&(n.selected=!1,e.push(ls(n.id,!1))),e}),[])}const us=(e,t)=>n=>{n.target===t.current&&e?.(n)},ds=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),fs=n((({isSelecting:e,selectionMode:n=Ei.Full,panOnDrag:r,onSelectionStart:o,onSelectionEnd:i,onPaneClick:a,onPaneContextMenu:s,onPaneScroll:l,onPaneMouseEnter:c,onPaneMouseMove:d,onPaneMouseLeave:f,children:p})=>{const h=u(null),m=Yo(),g=u(0),y=u(0),b=u(),{userSelectionActive:v,elementsSelectable:w,dragging:x}=Xo(ds,$e),E=()=>{m.setState({userSelectionActive:!1,userSelectionRect:null}),g.current=0,y.current=0},k=e=>{a?.(e),m.getState().resetSelectedElements(),m.setState({nodesSelectionActive:!1})},C=l?e=>l(e):void 0,S=w&&(e||v);return t.createElement("div",{className:Ve(["react-flow__pane",{dragging:x,selection:e}]),onClick:S?void 0:us(k,h),onContextMenu:us((e=>{Array.isArray(r)&&r?.includes(2)?e.preventDefault():s?.(e)}),h),onWheel:us(C,h),onMouseEnter:S?void 0:c,onMouseDown:S?t=>{const{resetSelectedElements:n,domNode:r}=m.getState();if(b.current=r?.getBoundingClientRect(),!w||!e||0!==t.button||t.target!==h.current||!b.current)return;const{x:i,y:a}=hi(t,b.current);n(),m.setState({userSelectionRect:{width:0,height:0,startX:i,startY:a,x:i,y:a}}),o?.(t)}:void 0,onMouseMove:S?t=>{const{userSelectionRect:r,nodeInternals:o,edges:i,transform:a,onNodesChange:s,onEdgesChange:l,nodeOrigin:c,getNodes:u}=m.getState();if(!e||!b.current||!r)return;m.setState({userSelectionActive:!0,nodesSelectionActive:!1});const d=hi(t,b.current),f=r.startX??0,p=r.startY??0,h={...r,x:d.x<f?d.x:f,y:d.y<p?d.y:p,width:Math.abs(d.x-f),height:Math.abs(d.y-p)},v=u(),w=Zi(o,h,a,n===Ei.Partial,!0,c),x=Ui(w,i).map((e=>e.id)),E=w.map((e=>e.id));if(g.current!==E.length){g.current=E.length;const e=cs(v,E);e.length&&s?.(e)}if(y.current!==x.length){y.current=x.length;const e=cs(i,x);e.length&&l?.(e)}m.setState({userSelectionRect:h})}:d,onMouseUp:S?e=>{if(0!==e.button)return;const{userSelectionRect:t}=m.getState();!v&&t&&e.target===h.current&&k?.(e),m.setState({nodesSelectionActive:g.current>0}),E(),i?.(e)}:void 0,onMouseLeave:S?e=>{v&&(m.setState({nodesSelectionActive:g.current>0}),i?.(e)),E()}:f,ref:h,style:Ua},p,t.createElement(rs,null))}));function ps(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return!!r&&(!!r.selected||ps(r,t))}function hs(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function ms(e,t,n,r){return Array.from(e.values()).filter((n=>(n.selected||n.id===r)&&(!n.parentNode||n.parentId||!ps(n,e))&&(n.draggable||t&&void 0===n.draggable))).map((e=>({id:e.id,position:e.position||{x:0,y:0},positionAbsolute:e.positionAbsolute||{x:0,y:0},distance:{x:n.x-(e.positionAbsolute?.x??0),y:n.y-(e.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:e.extent,parentNode:e.parentNode||e.parentId,parentId:e.parentNode||e.parentId,width:e.width,height:e.height,expandParent:e.expandParent})))}function gs(e,t,n,r,o=[0,0],i){const a=function(e,t){return t&&"parent"!==t?[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]:t}(e,e.extent||r);let s=a;const l=e.parentNode||e.parentId;if("parent"!==e.extent||e.expandParent){if(e.extent&&l&&"parent"!==e.extent){const t=n.get(l),{x:r,y:i}=Yi(t,o).positionAbsolute;s=[[e.extent[0][0]+r,e.extent[0][1]+i],[e.extent[1][0]+r,e.extent[1][1]+i]]}}else if(l&&e.width&&e.height){const t=n.get(l),{x:r,y:i}=Yi(t,o).positionAbsolute;s=t&&li(r)&&li(i)&&li(t.width)&&li(t.height)?[[r+e.width*o[0],i+e.height*o[1]],[r+t.width-e.width+e.width*o[0],i+t.height-e.height+e.height*o[1]]]:s}else i?.("005",Bo()),s=a;let c={x:0,y:0};if(l){const e=n.get(l);c=Yi(e,o).positionAbsolute}const u=s&&"parent"!==s?Qo(t,s):t;return{position:{x:u.x-c.x,y:u.y-c.y},positionAbsolute:u}}function ys({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map((e=>({...n.get(e.id),position:e.position,positionAbsolute:e.positionAbsolute})));return[e?r.find((t=>t.id===e)):r[0],r]}fs.displayName="Pane";const bs=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const i=Array.from(o),a=t.getBoundingClientRect(),s=a.width*r[0],l=a.height*r[1];return i.map((e=>{const t=e.getBoundingClientRect();return{id:e.getAttribute("data-handleid"),position:e.getAttribute("data-handlepos"),x:(t.left-a.left-s)/n,y:(t.top-a.top-l)/n,...Ko(e)}}))};function vs(e,t,n){return void 0===n?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,{...o})}}function ws({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:i,multiSelectionActive:a,nodeInternals:s,onError:l}=t.getState(),c=s.get(e);c?(t.setState({nodesSelectionActive:!1}),c.selected?(n||c.selected&&a)&&(i({nodes:[c],edges:[]}),requestAnimationFrame((()=>r?.current?.blur()))):o([e])):l?.("012",Wo(e))}function xs(e){return(t,n,r)=>e?.(t,r)}function Es({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:i,selectNodesOnDrag:a}){const d=Yo(),[f,p]=c(!1),h=u([]),m=u({x:null,y:null}),g=u(0),y=u(null),b=u({x:0,y:0}),v=u(null),w=u(!1),x=u(!1),E=u(!1),k=function(){const e=Yo(),t=l((({sourceEvent:t})=>{const{transform:n,snapGrid:r,snapToGrid:o}=e.getState(),i=t.touches?t.touches[0].clientX:t.clientX,a=t.touches?t.touches[0].clientY:t.clientY,s={x:(i-n[0])/n[2],y:(a-n[1])/n[2]};return{xSnapped:o?r[0]*Math.round(s.x/r[0]):s.x,ySnapped:o?r[1]*Math.round(s.y/r[1]):s.y,...s}}),[]);return t}();return s((()=>{if(e?.current){const s=fn(e.current),l=({x:e,y:t})=>{const{nodeInternals:n,onNodeDrag:r,onSelectionDrag:i,updateNodePositions:a,nodeExtent:s,snapGrid:l,snapToGrid:c,nodeOrigin:u,onError:f}=d.getState();m.current={x:e,y:t};let g=!1,y={x:0,y:0,x2:0,y2:0};if(h.current.length>1&&s){const e=$i(h.current,u);y=oi(e)}if(h.current=h.current.map((r=>{const o={x:e-r.distance.x,y:t-r.distance.y};c&&(o.x=l[0]*Math.round(o.x/l[0]),o.y=l[1]*Math.round(o.y/l[1]));const i=[[s[0][0],s[0][1]],[s[1][0],s[1][1]]];h.current.length>1&&s&&!r.extent&&(i[0][0]=r.positionAbsolute.x-y.x+s[0][0],i[1][0]=r.positionAbsolute.x+(r.width??0)-y.x2+s[1][0],i[0][1]=r.positionAbsolute.y-y.y+s[0][1],i[1][1]=r.positionAbsolute.y+(r.height??0)-y.y2+s[1][1]);const a=gs(r,o,n,i,u,f);return g=g||r.position.x!==a.position.x||r.position.y!==a.position.y,r.position=a.position,r.positionAbsolute=a.positionAbsolute,r})),!g)return;a(h.current,!0,!0),p(!0);const b=o?r:xs(i);if(b&&v.current){const[e,t]=ys({nodeId:o,dragItems:h.current,nodeInternals:n});b(v.current,e,t)}},c=()=>{if(!y.current)return;const[e,t]=ti(b.current,y.current);if(0!==e||0!==t){const{transform:n,panBy:r}=d.getState();m.current.x=(m.current.x??0)-e/n[2],m.current.y=(m.current.y??0)-t/n[2],r({x:e,y:t})&&l(m.current)}g.current=requestAnimationFrame(c)},u=t=>{const{nodeInternals:n,multiSelectionActive:r,nodesDraggable:s,unselectNodesAndEdges:l,onNodeDragStart:c,onSelectionDragStart:u}=d.getState();x.current=!0;const f=o?c:xs(u);a&&i||r||!o||n.get(o)?.selected||l(),o&&i&&a&&ws({id:o,store:d,nodeRef:e});const p=k(t);if(m.current=p,h.current=ms(n,s,p,o),f&&h.current){const[e,r]=ys({nodeId:o,dragItems:h.current,nodeInternals:n});f(t.sourceEvent,e,r)}};if(!t){const t=function(){var e,t,n,r,o=En,i=kn,a=Cn,s=Sn,l={},c=Ue("start","drag","end"),u=0,d=0;function f(e){e.on("mousedown.drag",p).filter(s).on("touchstart.drag",g).on("touchmove.drag",y,hn).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(a,s){if(!r&&o.call(this,a,s)){var l=v(this,i.call(this,a,s),a,s,"mouse");l&&(fn(a.view).on("mousemove.drag",h,mn).on("mouseup.drag",m,mn),bn(a.view),gn(a),n=!1,e=a.clientX,t=a.clientY,l("start",a))}}function h(r){if(yn(r),!n){var o=r.clientX-e,i=r.clientY-t;n=o*o+i*i>d}l.mouse("drag",r)}function m(e){fn(e.view).on("mousemove.drag mouseup.drag",null),vn(e.view,n),yn(e),l.mouse("end",e)}function g(e,t){if(o.call(this,e,t)){var n,r,a=e.changedTouches,s=i.call(this,e,t),l=a.length;for(n=0;n<l;++n)(r=v(this,s,e,t,a[n].identifier,a[n]))&&(gn(e),r("start",e,a[n]))}}function y(e){var t,n,r=e.changedTouches,o=r.length;for(t=0;t<o;++t)(n=l[r[t].identifier])&&(yn(e),n("drag",e,r[t]))}function b(e){var t,n,o=e.changedTouches,i=o.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(n=l[o[t].identifier])&&(gn(e),n("end",e,o[t]))}function v(e,t,n,r,o,i){var s,d,p,h=c.copy(),m=pn(i||n,t);if(null!=(p=a.call(e,new xn("beforestart",{sourceEvent:n,target:f,identifier:o,active:u,x:m[0],y:m[1],dx:0,dy:0,dispatch:h}),r)))return s=p.x-m[0]||0,d=p.y-m[1]||0,function n(i,a,c){var g,y=m;switch(i){case"start":l[o]=n,g=u++;break;case"end":delete l[o],--u;case"drag":m=pn(c||a,t),g=u}h.call(i,e,new xn(i,{sourceEvent:a,subject:p,target:f,identifier:o,active:g,x:m[0]+s,y:m[1]+d,dx:m[0]-y[0],dy:m[1]-y[1],dispatch:h}),r)}}return f.filter=function(e){return arguments.length?(o="function"==typeof e?e:wn(!!e),f):o},f.container=function(e){return arguments.length?(i="function"==typeof e?e:wn(e),f):i},f.subject=function(e){return arguments.length?(a="function"==typeof e?e:wn(e),f):a},f.touchable=function(e){return arguments.length?(s="function"==typeof e?e:wn(!!e),f):s},f.on=function(){var e=c.on.apply(c,arguments);return e===c?f:e},f.clickDistance=function(e){return arguments.length?(d=(e=+e)*e,f):Math.sqrt(d)},f}().on("start",(e=>{const{domNode:t,nodeDragThreshold:n}=d.getState();0===n&&u(e),E.current=!1;const r=k(e);m.current=r,y.current=t?.getBoundingClientRect()||null,b.current=hi(e.sourceEvent,y.current)})).on("drag",(e=>{const t=k(e),{autoPanOnNodeDrag:n,nodeDragThreshold:r}=d.getState();if("touchmove"===e.sourceEvent.type&&e.sourceEvent.touches.length>1&&(E.current=!0),!E.current){if(!w.current&&x.current&&n&&(w.current=!0,c()),!x.current){const n=t.xSnapped-(m?.current?.x??0),o=t.ySnapped-(m?.current?.y??0);Math.sqrt(n*n+o*o)>r&&u(e)}(m.current.x!==t.xSnapped||m.current.y!==t.ySnapped)&&h.current&&x.current&&(v.current=e.sourceEvent,b.current=hi(e.sourceEvent,y.current),l(t))}})).on("end",(e=>{if(x.current&&!E.current&&(p(!1),w.current=!1,x.current=!1,cancelAnimationFrame(g.current),h.current)){const{updateNodePositions:t,nodeInternals:n,onNodeDragStop:r,onSelectionDragStop:i}=d.getState(),a=o?r:xs(i);if(t(h.current,!1,!1),a){const[t,r]=ys({nodeId:o,dragItems:h.current,nodeInternals:n});a(e.sourceEvent,t,r)}}})).filter((t=>{const o=t.target;return!t.button&&(!n||!hs(o,`.${n}`,e))&&(!r||hs(o,r,e))}));return s.call(t),()=>{s.on(".drag",null)}}s.on(".drag",null)}}),[e,t,n,r,i,d,o,a,k]),f}function ks(){const e=Yo(),t=l((t=>{const{nodeInternals:n,nodeExtent:r,updateNodePositions:o,getNodes:i,snapToGrid:a,snapGrid:s,onError:l,nodesDraggable:c}=e.getState(),u=i().filter((e=>e.selected&&(e.draggable||c&&void 0===e.draggable))),d=a?s[0]:5,f=a?s[1]:5,p=t.isShiftPressed?4:1,h=t.x*d*p,m=t.y*f*p,g=u.map((e=>{if(e.positionAbsolute){const t={x:e.positionAbsolute.x+h,y:e.positionAbsolute.y+m};a&&(t.x=s[0]*Math.round(t.x/s[0]),t.y=s[1]*Math.round(t.y/s[1]));const{positionAbsolute:o,position:i}=gs(e,t,n,r,void 0,l);e.position=i,e.positionAbsolute=o}return e}));o(g,!0,!1)}),[]);return t}const Cs={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var Ss=e=>{const r=({id:n,type:r,data:o,xPos:i,yPos:a,xPosOrigin:l,yPosOrigin:c,selected:d,onClick:f,onMouseEnter:p,onMouseMove:h,onMouseLeave:m,onContextMenu:g,onDoubleClick:y,style:b,className:v,isDraggable:w,isSelectable:x,isConnectable:E,isFocusable:k,selectNodesOnDrag:C,sourcePosition:S,targetPosition:_,hidden:I,resizeObserver:A,dragHandle:N,zIndex:O,isParent:R,noDragClassName:T,noPanClassName:M,initialized:P,disableKeyboardA11y:D,ariaLabel:j,rfId:B,hasHandleBounds:L})=>{const z=Yo(),F=u(null),V=u(null),G=u(S),W=u(_),H=u(r),X=x||w||f||p||h||m,Y=ks(),$=vs(n,z.getState,p),Z=vs(n,z.getState,h),U=vs(n,z.getState,m),J=vs(n,z.getState,g),K=vs(n,z.getState,y);s((()=>()=>{V.current&&(A?.unobserve(V.current),V.current=null)}),[]),s((()=>{if(F.current&&!I){const e=F.current;P&&L&&V.current===e||(V.current&&A?.unobserve(V.current),A?.observe(e),V.current=e)}}),[I,P,L]),s((()=>{const e=H.current!==r,t=G.current!==S,o=W.current!==_;F.current&&(e||t||o)&&(e&&(H.current=r),t&&(G.current=S),o&&(W.current=_),z.getState().updateNodeDimensions([{id:n,nodeElement:F.current,forceUpdate:!0}]))}),[n,r,S,_]);const q=Es({nodeRef:F,disabled:I||!w,noDragClassName:T,handleSelector:N,nodeId:n,isSelectable:x,selectNodesOnDrag:C});return I?null:t.createElement("div",{className:Ve(["react-flow__node",`react-flow__node-${r}`,{[M]:w},v,{selected:d,selectable:x,parent:R,dragging:q}]),ref:F,style:{zIndex:O,transform:`translate(${l}px,${c}px)`,pointerEvents:X?"all":"none",visibility:P?"visible":"hidden",...b},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:$,onMouseMove:Z,onMouseLeave:U,onContextMenu:J,onClick:e=>{const{nodeDragThreshold:t}=z.getState();if(x&&(!C||!w||t>0)&&ws({id:n,store:z,nodeRef:F}),f){const t=z.getState().nodeInternals.get(n);t&&f(e,{...t})}},onDoubleClick:K,onKeyDown:k?e=>{if(!fi(e)&&!D)if(ui.includes(e.key)&&x){const t="Escape"===e.key;ws({id:n,store:z,unselect:t,nodeRef:F})}else w&&d&&Object.prototype.hasOwnProperty.call(Cs,e.key)&&(z.setState({ariaLiveMessage:`Moved selected node ${e.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~a}`}),Y({x:Cs[e.key].x,y:Cs[e.key].y,isShiftPressed:e.shiftKey}))}:void 0,tabIndex:k?0:void 0,role:k?"button":void 0,"aria-describedby":D?void 0:`${Na}-${B}`,"aria-label":j},t.createElement(Vi,{value:n},t.createElement(e,{id:n,data:o,type:r,xPos:i,yPos:a,selected:d,isConnectable:E,sourcePosition:S,targetPosition:_,dragging:q,dragHandle:N,zIndex:O})))};return r.displayName="NodeWrapper",n(r)};const _s=e=>{const t=e.getNodes().filter((e=>e.selected));return{...$i(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};var Is=n((function({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:r}){const o=Yo(),{width:i,height:a,x:l,y:c,transformString:d,userSelectionActive:f}=Xo(_s,$e),p=ks(),h=u(null);if(s((()=>{r||h.current?.focus({preventScroll:!0})}),[r]),Es({nodeRef:h}),f||!i||!a)return null;const m=e?t=>{const n=o.getState().getNodes().filter((e=>e.selected));e(t,n)}:void 0;return t.createElement("div",{className:Ve(["react-flow__nodesselection","react-flow__container",n]),style:{transform:d}},t.createElement("div",{ref:h,className:"react-flow__nodesselection-rect",onContextMenu:m,tabIndex:r?void 0:-1,onKeyDown:r?void 0:e=>{Object.prototype.hasOwnProperty.call(Cs,e.key)&&p({x:Cs[e.key].x,y:Cs[e.key].y,isShiftPressed:e.shiftKey})},style:{width:i,height:a,top:c,left:l}}))}));const As=e=>e.nodesSelectionActive,Ns=({children:e,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,deleteKeyCode:c,onMove:u,onMoveStart:d,onMoveEnd:f,selectionKeyCode:p,selectionOnDrag:h,selectionMode:m,onSelectionStart:g,onSelectionEnd:y,multiSelectionKeyCode:b,panActivationKeyCode:v,zoomActivationKeyCode:w,elementsSelectable:x,zoomOnScroll:E,zoomOnPinch:k,panOnScroll:C,panOnScrollSpeed:S,panOnScrollMode:_,zoomOnDoubleClick:I,panOnDrag:A,defaultViewport:N,translateExtent:O,minZoom:R,maxZoom:T,preventScrolling:M,onSelectionContextMenu:P,noWheelClassName:D,noPanClassName:j,disableKeyboardA11y:B})=>{const L=Xo(As),z=Pa(p),F=Pa(v),V=F||A,G=F||C,W=z||h&&!0!==V;return(({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=Yo(),{deleteElements:r}=$a(),o=Pa(e,Za),i=Pa(t);s((()=>{if(o){const{edges:e,getNodes:t}=n.getState(),o=t().filter((e=>e.selected)),i=e.filter((e=>e.selected));r({nodes:o,edges:i}),n.setState({nodesSelectionActive:!1})}}),[o]),s((()=>{n.setState({multiSelectionActive:i})}),[i])})({deleteKeyCode:c,multiSelectionKeyCode:b}),t.createElement(ts,{onMove:u,onMoveStart:d,onMoveEnd:f,onPaneContextMenu:a,elementsSelectable:x,zoomOnScroll:E,zoomOnPinch:k,panOnScroll:G,panOnScrollSpeed:S,panOnScrollMode:_,zoomOnDoubleClick:I,panOnDrag:!z&&V,defaultViewport:N,translateExtent:O,minZoom:R,maxZoom:T,zoomActivationKeyCode:w,preventScrolling:M,noWheelClassName:D,noPanClassName:j},t.createElement(fs,{onSelectionStart:g,onSelectionEnd:y,onPaneClick:n,onPaneMouseEnter:r,onPaneMouseMove:o,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:l,panOnDrag:V,isSelecting:!!W,selectionMode:m},e,L&&t.createElement(Is,{onSelectionContextMenu:P,noPanClassName:j,disableKeyboardA11y:B})))};Ns.displayName="FlowRenderer";var Os=n(Ns);function Rs(e){return{...{input:Ss(e.input||pa),default:Ss(e.default||da),output:Ss(e.output||ma),group:Ss(e.group||ga)},...Object.keys(e).filter((e=>!["input","default","output","group"].includes(e))).reduce(((t,n)=>(t[n]=Ss(e[n]||da),t)),{})}}const Ts=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),Ms=e=>{const{nodesDraggable:n,nodesConnectable:r,nodesFocusable:o,elementsSelectable:i,updateNodeDimensions:c,onError:d}=Xo(Ts,$e),f=function(e){const t=Xo(l((t=>e?Zi(t.nodeInternals,{x:0,y:0,width:t.width,height:t.height},t.transform,!0):t.getNodes()),[e]));return t}(e.onlyRenderVisibleElements),p=u(),h=a((()=>{if("undefined"==typeof ResizeObserver)return null;const e=new ResizeObserver((e=>{const t=e.map((e=>({id:e.target.getAttribute("data-id"),nodeElement:e.target,forceUpdate:!0})));c(t)}));return p.current=e,e}),[]);return s((()=>()=>{p?.current?.disconnect()}),[]),t.createElement("div",{className:"react-flow__nodes",style:Ua},f.map((a=>{let s=a.type||"default";e.nodeTypes[s]||(d?.("003",Do(s)),s="default");const l=e.nodeTypes[s]||e.nodeTypes.default,c=!!(a.draggable||n&&void 0===a.draggable),u=!!(a.selectable||i&&void 0===a.selectable),f=!!(a.connectable||r&&void 0===a.connectable),p=!!(a.focusable||o&&void 0===a.focusable),m=e.nodeExtent?Qo(a.positionAbsolute,e.nodeExtent):a.positionAbsolute,g=m?.x??0,y=m?.y??0,b=(({x:e,y:t,width:n,height:r,origin:o})=>n&&r?o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]}:{x:e,y:t})({x:g,y:y,width:a.width??0,height:a.height??0,origin:e.nodeOrigin});return t.createElement(l,{key:a.id,id:a.id,className:a.className,style:a.style,type:s,data:a.data,sourcePosition:a.sourcePosition||Si.Bottom,targetPosition:a.targetPosition||Si.Top,hidden:a.hidden,xPos:g,yPos:y,xPosOrigin:b.x,yPosOrigin:b.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!a.selected,isDraggable:c,isSelectable:u,isConnectable:f,isFocusable:p,resizeObserver:h,dragHandle:a.dragHandle,zIndex:a[ci]?.z??0,isParent:!!a[ci]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!a.width&&!!a.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:a.ariaLabel,hasHandleBounds:!!a[ci]?.handleBounds})})))};Ms.displayName="NodeRenderer";var Ps=n(Ms);const Ds=(e,t,n)=>n===Si.Left?e-t:n===Si.Right?e+t:e,js=(e,t,n)=>n===Si.Top?e-t:n===Si.Bottom?e+t:e,Bs="react-flow__edgeupdater",Ls=({position:e,centerX:n,centerY:r,radius:o=10,onMouseDown:i,onMouseEnter:a,onMouseOut:s,type:l})=>t.createElement("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:s,className:Ve([Bs,`${Bs}-${l}`]),cx:Ds(n,o,e),cy:js(r,o,e),r:o,stroke:"transparent",fill:"transparent"}),zs=()=>!0;var Fs=e=>{const r=({id:n,className:r,type:o,data:i,onClick:s,onEdgeDoubleClick:l,selected:d,animated:f,label:p,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:b,style:v,source:w,target:x,sourceX:E,sourceY:k,targetX:C,targetY:S,sourcePosition:_,targetPosition:I,elementsSelectable:A,hidden:N,sourceHandleId:O,targetHandleId:R,onContextMenu:T,onMouseEnter:M,onMouseMove:P,onMouseLeave:D,reconnectRadius:j,onReconnect:B,onReconnectStart:L,onReconnectEnd:z,markerEnd:F,markerStart:V,rfId:G,ariaLabel:W,isFocusable:H,isReconnectable:X,pathOptions:Y,interactionWidth:$,disableKeyboardA11y:Z})=>{const U=u(null),[J,K]=c(!1),[q,Q]=c(!1),ee=Yo(),te=a((()=>`url('#${Wi(V,G)}')`),[V,G]),ne=a((()=>`url('#${Wi(F,G)}')`),[F,G]);if(N)return null;const re=yi(n,ee.getState,l),oe=yi(n,ee.getState,T),ie=yi(n,ee.getState,M),ae=yi(n,ee.getState,P),se=yi(n,ee.getState,D),le=(e,t)=>{if(0!==e.button)return;const{edges:r,isValidConnection:o}=ee.getState(),i=t?x:w,a=(t?R:O)||null,s=t?"target":"source",l=o||zs,c=t,u=r.find((e=>e.id===n));Q(!0),L?.(e,u,s);ia({event:e,handleId:a,nodeId:i,onConnect:e=>B?.(u,e),isTarget:c,getState:ee.getState,setState:ee.setState,isValidConnection:l,edgeUpdaterType:s,onReconnectEnd:e=>{Q(!1),z?.(e,u,s)}})},ce=()=>K(!0),ue=()=>K(!1),de=!A&&!s;return t.createElement("g",{className:Ve(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:d,animated:f,inactive:de,updating:J}]),onClick:e=>{const{edges:t,addSelectedEdges:r,unselectNodesAndEdges:o,multiSelectionActive:i}=ee.getState(),a=t.find((e=>e.id===n));a&&(A&&(ee.setState({nodesSelectionActive:!1}),a.selected&&i?(o({nodes:[],edges:[a]}),U.current?.blur()):r([n])),s&&s(e,a))},onDoubleClick:re,onContextMenu:oe,onMouseEnter:ie,onMouseMove:ae,onMouseLeave:se,onKeyDown:H?e=>{if(!Z&&ui.includes(e.key)&&A){const{unselectNodesAndEdges:t,addSelectedEdges:r,edges:o}=ee.getState();"Escape"===e.key?(U.current?.blur(),t({edges:[o.find((e=>e.id===n))]})):r([n])}}:void 0,tabIndex:H?0:void 0,role:H?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":null===W?void 0:W||`Edge from ${w} to ${x}`,"aria-describedby":H?`${Oa}-${G}`:void 0,ref:U},!q&&t.createElement(e,{id:n,source:w,target:x,selected:d,animated:f,label:p,labelStyle:h,labelShowBg:m,labelBgStyle:g,labelBgPadding:y,labelBgBorderRadius:b,data:i,style:v,sourceX:E,sourceY:k,targetX:C,targetY:S,sourcePosition:_,targetPosition:I,sourceHandleId:O,targetHandleId:R,markerStart:te,markerEnd:ne,pathOptions:Y,interactionWidth:$}),X&&t.createElement(t.Fragment,null,("source"===X||!0===X)&&t.createElement(Ls,{position:_,centerX:E,centerY:k,radius:j,onMouseDown:e=>le(e,!0),onMouseEnter:ce,onMouseOut:ue,type:"source"}),("target"===X||!0===X)&&t.createElement(Ls,{position:I,centerX:C,centerY:S,radius:j,onMouseDown:e=>le(e,!1),onMouseEnter:ce,onMouseOut:ue,type:"target"})))};return r.displayName="EdgeWrapper",n(r)};function Vs(e){return{...{default:Fs(e.default||zi),straight:Fs(e.bezier||Di),step:Fs(e.step||Pi),smoothstep:Fs(e.step||Mi),simplebezier:Fs(e.simplebezier||Ai)},...Object.keys(e).filter((e=>!["default","bezier"].includes(e))).reduce(((t,n)=>(t[n]=Fs(e[n]||zi),t)),{})}}function Gs(e,t,n=null){const r=(n?.x||0)+t.x,o=(n?.y||0)+t.y,i=n?.width||t.width,a=n?.height||t.height;switch(e){case Si.Top:return{x:r+i/2,y:o};case Si.Right:return{x:r+i,y:o+a/2};case Si.Bottom:return{x:r+i/2,y:o+a};case Si.Left:return{x:r,y:o+a/2}}}function Ws(e,t){return e?1!==e.length&&t?t&&e.find((e=>e.id===t))||null:e[0]:null}function Hs(e){const t=e?.[ci]?.handleBounds||null,n=t&&e?.width&&e?.height&&void 0!==e?.positionAbsolute?.x&&void 0!==e?.positionAbsolute?.y;return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}const Xs=[{level:0,isMaxLevel:!0,edges:[]}];function Ys(e,t,n){const r=Xo(l((n=>e?n.edges.filter((e=>{const r=t.get(e.source),o=t.get(e.target);return r?.width&&r?.height&&o?.width&&o?.height&&function({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:i,width:a,height:s,transform:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+i)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=oi({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:a/l[2],height:s/l[2]}),d=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),f=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(d*f)>0}({sourcePos:r.positionAbsolute||{x:0,y:0},targetPos:o.positionAbsolute||{x:0,y:0},sourceWidth:r.width,sourceHeight:r.height,targetWidth:o.width,targetHeight:o.height,width:n.width,height:n.height,transform:n.transform})})):n.edges),[e,t]));return function(e,t,n=!1){let r=-1;const o=e.reduce(((e,o)=>{const i=li(o.zIndex);let a=i?o.zIndex:0;if(n){const e=t.get(o.target),n=t.get(o.source),r=o.selected||e?.selected||n?.selected,s=Math.max(n?.[ci]?.z||0,e?.[ci]?.z||0,1e3);a=(i?o.zIndex:0)+(r?s:0)}return e[a]?e[a].push(o):e[a]=[o],r=a>r?a:r,e}),{}),i=Object.entries(o).map((([e,t])=>{const n=+e;return{edges:t,level:n,isMaxLevel:n===r}}));return 0===i.length?Xs:i}(r,t,n)}const $s={[Ci.Arrow]:({color:e="none",strokeWidth:n=1})=>t.createElement("polyline",{style:{stroke:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),[Ci.ArrowClosed]:({color:e="none",strokeWidth:n=1})=>t.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:n},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})};const Zs=({id:e,type:n,color:r,width:o=12.5,height:i=12.5,markerUnits:s="strokeWidth",strokeWidth:l,orient:c="auto-start-reverse"})=>{const u=function(e){const t=Yo();return a((()=>Object.prototype.hasOwnProperty.call($s,e)?$s[e]:(t.getState().onError?.("009",zo(e)),null)),[e])}(n);return u?t.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${o}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0"},t.createElement(u,{color:r,strokeWidth:l})):null},Us=({defaultColor:e,rfId:n})=>{const r=Xo(l((({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce(((n,o)=>([o.markerStart,o.markerEnd].forEach((o=>{if(o&&"object"==typeof o){const i=Wi(o,t);r.includes(i)||(n.push({id:i,color:o.color||e,...o}),r.push(i))}})),n)),[]).sort(((e,t)=>e.id.localeCompare(t.id)))})({defaultColor:e,rfId:n}),[e,n]),((e,t)=>!(e.length!==t.length||e.some(((e,n)=>e.id!==t[n].id)))));return t.createElement("defs",null,r.map((e=>t.createElement(Zs,{id:e.id,key:e.id,type:e.type,color:e.color,width:e.width,height:e.height,markerUnits:e.markerUnits,strokeWidth:e.strokeWidth,orient:e.orient}))))};Us.displayName="MarkerDefinitions";var Js=n(Us);const Ks=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),qs=({defaultMarkerColor:e,onlyRenderVisibleElements:n,elevateEdgesOnSelect:r,rfId:o,edgeTypes:i,noPanClassName:a,onEdgeContextMenu:s,onEdgeMouseEnter:l,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:d,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,children:y,disableKeyboardA11y:b})=>{const{edgesFocusable:v,edgesUpdatable:w,elementsSelectable:x,width:E,height:k,connectionMode:C,nodeInternals:S,onError:_}=Xo(Ks,$e),I=Ys(n,S,r);return E?t.createElement(t.Fragment,null,I.map((({level:n,edges:r,isMaxLevel:y})=>t.createElement("svg",{key:n,style:{zIndex:n},width:E,height:k,className:"react-flow__edges react-flow__container"},y&&t.createElement(Js,{defaultColor:e,rfId:o}),t.createElement("g",null,r.map((e=>{const[n,r,y]=Hs(S.get(e.source)),[E,k,I]=Hs(S.get(e.target));if(!y||!I)return null;let A=e.type||"default";i[A]||(_?.("011",Go(A)),A="default");const N=i[A]||i.default,O=C===wi.Strict?k.target:(k.target??[]).concat(k.source??[]),R=Ws(r.source,e.sourceHandle),T=Ws(O,e.targetHandle),M=R?.position||Si.Bottom,P=T?.position||Si.Top,D=!!(e.focusable||v&&void 0===e.focusable),j=e.reconnectable||e.updatable,B=void 0!==p&&(j||w&&void 0===j);if(!R||!T)return _?.("008",Fo(R,e)),null;const{sourceX:L,sourceY:z,targetX:F,targetY:V}=((e,t,n,r,o,i)=>{const a=Gs(n,e,t),s=Gs(i,r,o);return{sourceX:a.x,sourceY:a.y,targetX:s.x,targetY:s.y}})(n,R,M,E,T,P);return t.createElement(N,{key:e.id,id:e.id,className:Ve([e.className,a]),type:A,data:e.data,selected:!!e.selected,animated:!!e.animated,hidden:!!e.hidden,label:e.label,labelStyle:e.labelStyle,labelShowBg:e.labelShowBg,labelBgStyle:e.labelBgStyle,labelBgPadding:e.labelBgPadding,labelBgBorderRadius:e.labelBgBorderRadius,style:e.style,source:e.source,target:e.target,sourceHandleId:e.sourceHandle,targetHandleId:e.targetHandle,markerEnd:e.markerEnd,markerStart:e.markerStart,sourceX:L,sourceY:z,targetX:F,targetY:V,sourcePosition:M,targetPosition:P,elementsSelectable:x,onContextMenu:s,onMouseEnter:l,onMouseMove:c,onMouseLeave:u,onClick:d,onEdgeDoubleClick:f,onReconnect:p,onReconnectStart:h,onReconnectEnd:m,reconnectRadius:g,rfId:o,ariaLabel:e.ariaLabel,isFocusable:D,isReconnectable:B,pathOptions:"pathOptions"in e?e.pathOptions:void 0,interactionWidth:e.interactionWidth,disableKeyboardA11y:b})})))))),y):null};qs.displayName="EdgeRenderer";var Qs=n(qs);const el=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function tl({children:e}){const n=Xo(el);return t.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:n}},e)}const nl={[Si.Left]:Si.Right,[Si.Right]:Si.Left,[Si.Top]:Si.Bottom,[Si.Bottom]:Si.Top},rl=({nodeId:e,handleType:n,style:r,type:o=ki.Bezier,CustomComponent:i,connectionStatus:a})=>{const{fromNode:s,handleId:c,toX:u,toY:d,connectionMode:f}=Xo(l((t=>({fromNode:t.nodeInternals.get(e),handleId:t.connectionHandleId,toX:(t.connectionPosition.x-t.transform[0])/t.transform[2],toY:(t.connectionPosition.y-t.transform[1])/t.transform[2],connectionMode:t.connectionMode})),[e]),$e),p=s?.[ci]?.handleBounds;let h=p?.[n];if(f===wi.Loose&&(h=h||p?.["source"===n?"target":"source"]),!s||!h)return null;const m=c?h.find((e=>e.id===c)):h[0],g=m?m.x+m.width/2:(s.width??0)/2,y=m?m.y+m.height/2:s.height??0,b=(s.positionAbsolute?.x??0)+g,v=(s.positionAbsolute?.y??0)+y,w=m?.position,x=w?nl[w]:null;if(!w||!x)return null;if(i)return t.createElement(i,{connectionLineType:o,connectionLineStyle:r,fromNode:s,fromHandle:m,fromX:b,fromY:v,toX:u,toY:d,fromPosition:w,toPosition:x,connectionStatus:a});let E="";const k={sourceX:b,sourceY:v,sourcePosition:w,targetX:u,targetY:d,targetPosition:x};return o===ki.Bezier?[E]=Li(k):o===ki.Step?[E]=Ti({...k,borderRadius:0}):o===ki.SmoothStep?[E]=Ti(k):o===ki.SimpleBezier?[E]=Ii(k):E=`M${b},${v} ${u},${d}`,t.createElement("path",{d:E,fill:"none",className:"react-flow__connection-path",style:r})};rl.displayName="ConnectionLine";const ol=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function il({containerStyle:e,style:n,type:r,component:o}){const{nodeId:i,handleType:a,nodesConnectable:s,width:l,height:c,connectionStatus:u}=Xo(ol,$e);return!!(i&&a&&l&&s)?t.createElement("svg",{style:e,width:l,height:c,className:"react-flow__edges react-flow__connectionline react-flow__container"},t.createElement("g",{className:Ve(["react-flow__connection",u])},t.createElement(rl,{nodeId:i,handleType:a,style:n,type:r,CustomComponent:o,connectionStatus:u}))):null}function al(e,t){const n=u(null),r=Yo();return a((()=>{if("development"===process.env.NODE_ENV){const t=Object.keys(e);$e(n.current,t)&&r.getState().onError?.("002",Po()),n.current=t}return t(e)}),[e])}const sl=({nodeTypes:e,edgeTypes:n,onMove:r,onMoveStart:o,onMoveEnd:i,onInit:a,onNodeClick:l,onEdgeClick:c,onNodeDoubleClick:d,onEdgeDoubleClick:f,onNodeMouseEnter:p,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:g,onSelectionContextMenu:y,onSelectionStart:b,onSelectionEnd:v,connectionLineType:w,connectionLineStyle:x,connectionLineComponent:E,connectionLineContainerStyle:k,selectionKeyCode:C,selectionOnDrag:S,selectionMode:_,multiSelectionKeyCode:I,panActivationKeyCode:A,zoomActivationKeyCode:N,deleteKeyCode:O,onlyRenderVisibleElements:R,elementsSelectable:T,selectNodesOnDrag:M,defaultViewport:P,translateExtent:D,minZoom:j,maxZoom:B,preventScrolling:L,defaultMarkerColor:z,zoomOnScroll:F,zoomOnPinch:V,panOnScroll:G,panOnScrollSpeed:W,panOnScrollMode:H,zoomOnDoubleClick:X,panOnDrag:Y,onPaneClick:$,onPaneMouseEnter:Z,onPaneMouseMove:U,onPaneMouseLeave:J,onPaneScroll:K,onPaneContextMenu:q,onEdgeContextMenu:Q,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,onReconnect:re,onReconnectStart:oe,onReconnectEnd:ie,reconnectRadius:ae,noDragClassName:se,noWheelClassName:le,noPanClassName:ce,elevateEdgesOnSelect:ue,disableKeyboardA11y:de,nodeOrigin:fe,nodeExtent:pe,rfId:he})=>{const me=al(e,Rs),ge=al(n,Vs);return function(e){const t=$a(),n=u(!1);s((()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout((()=>e(t)),1),n.current=!0)}),[e,t.viewportInitialized])}(a),t.createElement(Os,{onPaneClick:$,onPaneMouseEnter:Z,onPaneMouseMove:U,onPaneMouseLeave:J,onPaneContextMenu:q,onPaneScroll:K,deleteKeyCode:O,selectionKeyCode:C,selectionOnDrag:S,selectionMode:_,onSelectionStart:b,onSelectionEnd:v,multiSelectionKeyCode:I,panActivationKeyCode:A,zoomActivationKeyCode:N,elementsSelectable:T,onMove:r,onMoveStart:o,onMoveEnd:i,zoomOnScroll:F,zoomOnPinch:V,zoomOnDoubleClick:X,panOnScroll:G,panOnScrollSpeed:W,panOnScrollMode:H,panOnDrag:Y,defaultViewport:P,translateExtent:D,minZoom:j,maxZoom:B,onSelectionContextMenu:y,preventScrolling:L,noDragClassName:se,noWheelClassName:le,noPanClassName:ce,disableKeyboardA11y:de},t.createElement(tl,null,t.createElement(Qs,{edgeTypes:ge,onEdgeClick:c,onEdgeDoubleClick:f,onlyRenderVisibleElements:R,onEdgeContextMenu:Q,onEdgeMouseEnter:ee,onEdgeMouseMove:te,onEdgeMouseLeave:ne,onReconnect:re,onReconnectStart:oe,onReconnectEnd:ie,reconnectRadius:ae,defaultMarkerColor:z,noPanClassName:ce,elevateEdgesOnSelect:!!ue,disableKeyboardA11y:de,rfId:he},t.createElement(il,{style:x,type:w,component:E,containerStyle:k})),t.createElement("div",{className:"react-flow__edgelabel-renderer"}),t.createElement(Ps,{nodeTypes:me,onNodeClick:l,onNodeDoubleClick:d,onNodeMouseEnter:p,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:g,selectNodesOnDrag:M,onlyRenderVisibleElements:R,noPanClassName:ce,noDragClassName:se,disableKeyboardA11y:de,nodeOrigin:fe,nodeExtent:pe,rfId:he})))};sl.displayName="GraphView";var ll=n(sl);const cl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ul={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:cl,nodeExtent:cl,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:wi.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:di,isValidConnection:void 0},dl=()=>((e,t)=>e?Ye(e,t):Ye)(((e,t)=>({...ul,setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:i}=t();e({nodeInternals:za(n,r,o,i)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map((e=>({...r,...e})))})},setDefaultNodesAndEdges:(n,r)=>{const o=void 0!==n,i=void 0!==r,a=o?za(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:a,edges:i?r:[],hasDefaultNodes:o,hasDefaultEdges:i})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:i,fitViewOnInitDone:a,fitViewOnInitOptions:s,domNode:l,nodeOrigin:c}=t(),u=l?.querySelector(".react-flow__viewport");if(!u)return;const d=window.getComputedStyle(u),{m22:f}=new window.DOMMatrixReadOnly(d.transform),p=n.reduce(((e,t)=>{const n=o.get(t.id);if(n?.hidden)o.set(n.id,{...n,[ci]:{...n[ci],handleBounds:void 0}});else if(n){const r=Ko(t.nodeElement);!(!r.width||!r.height||n.width===r.width&&n.height===r.height&&!t.forceUpdate)&&(o.set(n.id,{...n,[ci]:{...n[ci],handleBounds:{source:bs(".source",t.nodeElement,f,c),target:bs(".target",t.nodeElement,f,c)}},...r}),e.push({id:n.id,type:"dimensions",dimensions:r}))}return e}),[]);La(o,c);const h=a||i&&!a&&Fa(t,{initial:!0,...s});e({nodeInternals:new Map(o),fitViewOnInitDone:h}),p?.length>0&&r?.(p)},updateNodePositions:(e,n=!0,r=!1)=>{const{triggerNodeChanges:o}=t(),i=e.map((e=>{const t={id:e.id,type:"position",dragging:r};return n&&(t.positionAbsolute=e.positionAbsolute,t.position=e.position),t}));o(i)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:i,nodeOrigin:a,getNodes:s,elevateNodesOnSelect:l}=t();if(n?.length){if(i){const t=za(as(n,s()),o,a,l);e({nodeInternals:t})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map((e=>ls(e,!0))):(a=cs(i(),n),s=cs(o,[])),Wa({changedNodes:a,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:i}=t();let a,s=null;r?a=n.map((e=>ls(e,!0))):(a=cs(o,n),s=cs(i(),[])),Wa({changedNodes:s,changedEdges:a,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:i}=t(),a=r||o;Wa({changedNodes:(n||i()).map((e=>(e.selected=!1,ls(e.id,!1)))),changedEdges:a.map((e=>ls(e.id,!1))),get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r?.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r?.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t();Wa({changedNodes:r().filter((e=>e.selected)).map((e=>ls(e.id,!1))),changedEdges:n.filter((e=>e.selected)).map((e=>ls(e.id,!1))),get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach((e=>{e.positionAbsolute=Qo(e.position,n)})),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:e=>{const{transform:n,width:r,height:o,d3Zoom:i,d3Selection:a,translateExtent:s}=t();if(!i||!a||!e.x&&!e.y)return!1;const l=Eo.translate(n[0]+e.x,n[1]+e.y).scale(n[2]),c=[[0,0],[r,o]],u=i?.constrain()(l,c,s);i.transform(a,u);return n[0]!==u.x||n[1]!==u.y||n[2]!==u.k},cancelConnection:()=>e({connectionNodeId:ul.connectionNodeId,connectionHandleId:ul.connectionHandleId,connectionHandleType:ul.connectionHandleType,connectionStatus:ul.connectionStatus,connectionStartHandle:ul.connectionStartHandle,connectionEndHandle:ul.connectionEndHandle}),reset:()=>e({...ul})})),Object.is),fl=({children:e})=>{const n=u(null);return n.current||(n.current=dl()),t.createElement(Mo,{value:n.current},e)};fl.displayName="ReactFlowProvider";const pl=({children:e})=>o(To)?t.createElement(t.Fragment,null,e):t.createElement(fl,null,e);pl.displayName="ReactFlowWrapper";const hl={input:pa,default:da,output:ma,group:ga},ml={default:zi,straight:Di,step:Pi,smoothstep:Mi,simplebezier:Ai},gl=[0,0],yl=[15,15],bl={x:0,y:0,zoom:1},vl={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},wl=r((({nodes:e,edges:n,defaultNodes:r,defaultEdges:o,className:i,nodeTypes:a=hl,edgeTypes:s=ml,onNodeClick:l,onEdgeClick:c,onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:b,onNodeMouseEnter:v,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:E,onNodeDoubleClick:k,onNodeDragStart:C,onNodeDrag:S,onNodeDragStop:_,onNodesDelete:I,onEdgesDelete:A,onSelectionChange:N,onSelectionDragStart:O,onSelectionDrag:R,onSelectionDragStop:T,onSelectionContextMenu:M,onSelectionStart:P,onSelectionEnd:D,connectionMode:j=wi.Strict,connectionLineType:B=ki.Bezier,connectionLineStyle:L,connectionLineComponent:z,connectionLineContainerStyle:F,deleteKeyCode:V="Backspace",selectionKeyCode:G="Shift",selectionOnDrag:W=!1,selectionMode:H=Ei.Full,panActivationKeyCode:X="Space",multiSelectionKeyCode:Y=(mi()?"Meta":"Control"),zoomActivationKeyCode:$=(mi()?"Meta":"Control"),snapToGrid:Z=!1,snapGrid:U=yl,onlyRenderVisibleElements:J=!1,selectNodesOnDrag:K=!0,nodesDraggable:q,nodesConnectable:Q,nodesFocusable:ee,nodeOrigin:te=gl,edgesFocusable:ne,edgesUpdatable:re,elementsSelectable:oe,defaultViewport:ie=bl,minZoom:ae=.5,maxZoom:se=2,translateExtent:le=cl,preventScrolling:ce=!0,nodeExtent:ue,defaultMarkerColor:de="#b1b1b7",zoomOnScroll:fe=!0,zoomOnPinch:pe=!0,panOnScroll:he=!1,panOnScrollSpeed:me=.5,panOnScrollMode:ge=xi.Free,zoomOnDoubleClick:ye=!0,panOnDrag:be=!0,onPaneClick:ve,onPaneMouseEnter:we,onPaneMouseMove:xe,onPaneMouseLeave:Ee,onPaneScroll:ke,onPaneContextMenu:Ce,children:Se,onEdgeContextMenu:_e,onEdgeDoubleClick:Ie,onEdgeMouseEnter:Ae,onEdgeMouseMove:Ne,onEdgeMouseLeave:Oe,onEdgeUpdate:Re,onEdgeUpdateStart:Te,onEdgeUpdateEnd:Me,onReconnect:Pe,onReconnectStart:De,onReconnectEnd:je,reconnectRadius:Be=10,edgeUpdaterRadius:Le=10,onNodesChange:ze,onEdgesChange:Fe,noDragClassName:Ge="nodrag",noWheelClassName:We="nowheel",noPanClassName:He="nopan",fitView:Xe=!1,fitViewOptions:Ye,connectOnClick:$e=!0,attributionPosition:Ze,proOptions:Ue,defaultEdgeOptions:Je,elevateNodesOnSelect:Ke=!0,elevateEdgesOnSelect:qe=!1,disableKeyboardA11y:Qe=!1,autoPanOnConnect:et=!0,autoPanOnNodeDrag:tt=!0,connectionRadius:nt=20,isValidConnection:rt,onError:ot,style:it,id:at,nodeDragThreshold:st,...lt},ct)=>{const ut=at||"1";return t.createElement("div",{...lt,style:{...it,...vl},ref:ct,className:Ve(["react-flow",i]),"data-testid":"rf__wrapper",id:at},t.createElement(pl,null,t.createElement(ll,{onInit:u,onMove:d,onMoveStart:f,onMoveEnd:p,onNodeClick:l,onEdgeClick:c,onNodeMouseEnter:v,onNodeMouseMove:w,onNodeMouseLeave:x,onNodeContextMenu:E,onNodeDoubleClick:k,nodeTypes:a,edgeTypes:s,connectionLineType:B,connectionLineStyle:L,connectionLineComponent:z,connectionLineContainerStyle:F,selectionKeyCode:G,selectionOnDrag:W,selectionMode:H,deleteKeyCode:V,multiSelectionKeyCode:Y,panActivationKeyCode:X,zoomActivationKeyCode:$,onlyRenderVisibleElements:J,selectNodesOnDrag:K,defaultViewport:ie,translateExtent:le,minZoom:ae,maxZoom:se,preventScrolling:ce,zoomOnScroll:fe,zoomOnPinch:pe,zoomOnDoubleClick:ye,panOnScroll:he,panOnScrollSpeed:me,panOnScrollMode:ge,panOnDrag:be,onPaneClick:ve,onPaneMouseEnter:we,onPaneMouseMove:xe,onPaneMouseLeave:Ee,onPaneScroll:ke,onPaneContextMenu:Ce,onSelectionContextMenu:M,onSelectionStart:P,onSelectionEnd:D,onEdgeContextMenu:_e,onEdgeDoubleClick:Ie,onEdgeMouseEnter:Ae,onEdgeMouseMove:Ne,onEdgeMouseLeave:Oe,onReconnect:Pe??Re,onReconnectStart:De??Te,onReconnectEnd:je??Me,reconnectRadius:Be??Le,defaultMarkerColor:de,noDragClassName:Ge,noWheelClassName:We,noPanClassName:He,elevateEdgesOnSelect:qe,rfId:ut,disableKeyboardA11y:Qe,nodeOrigin:te,nodeExtent:ue}),t.createElement(_a,{nodes:e,edges:n,defaultNodes:r,defaultEdges:o,onConnect:h,onConnectStart:m,onConnectEnd:g,onClickConnectStart:y,onClickConnectEnd:b,nodesDraggable:q,nodesConnectable:Q,nodesFocusable:ee,edgesFocusable:ne,edgesUpdatable:re,elementsSelectable:oe,elevateNodesOnSelect:Ke,minZoom:ae,maxZoom:se,nodeExtent:ue,onNodesChange:ze,onEdgesChange:Fe,snapToGrid:Z,snapGrid:U,connectionMode:j,translateExtent:le,connectOnClick:$e,defaultEdgeOptions:Je,fitView:Xe,fitViewOptions:Ye,onNodesDelete:I,onEdgesDelete:A,onNodeDragStart:C,onNodeDrag:S,onNodeDragStop:_,onSelectionDrag:R,onSelectionDragStart:O,onSelectionDragStop:T,noPanClassName:He,nodeOrigin:te,rfId:ut,autoPanOnConnect:et,autoPanOnNodeDrag:tt,onError:ot,connectionRadius:nt,isValidConnection:rt,nodeDragThreshold:st}),t.createElement(Ea,{onSelectionChange:N}),Se,t.createElement(Uo,{proOptions:Ue,position:Ze}),t.createElement(Ma,{rfId:ut,disableKeyboardA11y:Qe})))}));wl.displayName="ReactFlow";const xl=e=>e.getNodes();const El=e=>e.edges;const kl=({id:e,x:n,y:r,width:o,height:i,style:a,color:s,strokeColor:l,strokeWidth:c,className:u,borderRadius:d,shapeRendering:f,onClick:p,selected:h})=>{const{background:m,backgroundColor:g}=a||{},y=s||m||g;return t.createElement("rect",{className:Ve(["react-flow__minimap-node",{selected:h},u]),x:n,y:r,rx:d,ry:d,width:o,height:i,fill:y,stroke:l,strokeWidth:c,shapeRendering:f,onClick:p?t=>p(t,e):void 0})};kl.displayName="MiniMapNode";var Cl=n(kl);const Sl=e=>e.nodeOrigin,_l=e=>e.getNodes().filter((e=>!e.hidden&&e.width&&e.height)),Il=e=>e instanceof Function?e:()=>e;var Al=n((function({nodeStrokeColor:e="transparent",nodeColor:n="#e2e2e2",nodeClassName:r="",nodeBorderRadius:o=5,nodeStrokeWidth:i=2,nodeComponent:a=Cl,onClick:s}){const l=Xo(_l,$e),c=Xo(Sl),u=Il(n),d=Il(e),f=Il(r),p="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return t.createElement(t.Fragment,null,l.map((e=>{const{x:n,y:r}=Yi(e,c).positionAbsolute;return t.createElement(a,{key:e.id,x:n,y:r,width:e.width,height:e.height,style:e.style,selected:e.selected,className:f(e),color:u(e),borderRadius:o,strokeColor:d(e),strokeWidth:i,shapeRendering:p,onClick:s,id:e.id})})))}));const Nl=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?(r=$i(t,e.nodeOrigin),o=n,ii(ri(oi(r),oi(o)))):n,rfId:e.rfId};var r,o};function Ol({style:e,className:n,nodeStrokeColor:r="transparent",nodeColor:o="#e2e2e2",nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:l=2,nodeComponent:c,maskColor:d="rgb(240, 240, 240, 0.6)",maskStrokeColor:f="none",maskStrokeWidth:p=1,position:h="bottom-right",onClick:m,onNodeClick:g,pannable:y=!1,zoomable:b=!1,ariaLabel:v="React Flow mini map",inversePan:w=!1,zoomStep:x=10,offsetScale:E=5}){const k=Yo(),C=u(null),{boundingRect:S,viewBB:_,rfId:I}=Xo(Nl,$e),A=e?.width??200,N=e?.height??150,O=S.width/A,R=S.height/N,T=Math.max(O,R),M=T*A,P=T*N,D=E*T,j=S.x-(M-S.width)/2-D,B=S.y-(P-S.height)/2-D,L=M+2*D,z=P+2*D,F=`react-flow__minimap-desc-${I}`,V=u(0);V.current=T,s((()=>{if(C.current){const e=fn(C.current),t=e=>{const{transform:t,d3Selection:n,d3Zoom:r}=k.getState();if("wheel"!==e.sourceEvent.type||!n||!r)return;const o=-e.sourceEvent.deltaY*(1===e.sourceEvent.deltaMode?.05:e.sourceEvent.deltaMode?1:.002)*x,i=t[2]*Math.pow(2,o);r.scaleTo(n,i)},n=e=>{const{transform:t,d3Selection:n,d3Zoom:r,translateExtent:o,width:i,height:a}=k.getState();if("mousemove"!==e.sourceEvent.type||!n||!r)return;const s=V.current*Math.max(1,t[2])*(w?-1:1),l={x:t[0]-e.sourceEvent.movementX*s,y:t[1]-e.sourceEvent.movementY*s},c=[[0,0],[i,a]],u=Eo.translate(l.x,l.y).scale(t[2]),d=r.constrain()(u,c,o);r.transform(n,d)},r=Ro().on("zoom",y?n:null).on("zoom.wheel",b?t:null);return e.call(r),()=>{e.on("zoom",null)}}}),[y,b,w,x]);const G=m?e=>{const t=pn(e);m(e,{x:t[0],y:t[1]})}:void 0,W=g?(e,t)=>{const n=k.getState().nodeInternals.get(t);g(e,n)}:void 0;return t.createElement(Zo,{position:h,style:e,className:Ve(["react-flow__minimap",n]),"data-testid":"rf__minimap"},t.createElement("svg",{width:A,height:N,viewBox:`${j} ${B} ${L} ${z}`,role:"img","aria-labelledby":F,ref:C,onClick:G},v&&t.createElement("title",{id:F},v),t.createElement(Al,{onClick:W,nodeColor:o,nodeStrokeColor:r,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:l,nodeComponent:c}),t.createElement("path",{className:"react-flow__minimap-mask",d:`M${j-D},${B-D}h${L+2*D}v${z+2*D}h${-L-2*D}z\n M${_.x},${_.y}h${_.width}v${_.height}h${-_.width}z`,fill:d,fillRule:"evenodd",stroke:f,strokeWidth:p,pointerEvents:"none"})))}Ol.displayName="MiniMap";var Rl,Tl=n(Ol);function Ml({color:e,dimensions:n,lineWidth:r}){return t.createElement("path",{stroke:e,strokeWidth:r,d:`M${n[0]/2} 0 V${n[1]} M0 ${n[1]/2} H${n[0]}`})}function Pl({color:e,radius:n}){return t.createElement("circle",{cx:n,cy:n,r:n,fill:e})}!function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"}(Rl||(Rl={}));const Dl={[Rl.Dots]:"#91919a",[Rl.Lines]:"#eee",[Rl.Cross]:"#e2e2e2"},jl={[Rl.Dots]:1,[Rl.Lines]:1,[Rl.Cross]:6},Bl=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Ll({id:e,variant:n=Rl.Dots,gap:r=20,size:o,lineWidth:i=1,offset:a=2,color:s,style:l,className:c}){const d=u(null),{transform:f,patternId:p}=Xo(Bl,$e),h=s||Dl[n],m=o||jl[n],g=n===Rl.Dots,y=n===Rl.Cross,b=Array.isArray(r)?r:[r,r],v=[b[0]*f[2]||1,b[1]*f[2]||1],w=m*f[2],x=y?[w,w]:v,E=g?[w/a,w/a]:[x[0]/a,x[1]/a];return t.createElement("svg",{className:Ve(["react-flow__background",c]),style:{...l,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:d,"data-testid":"rf__background"},t.createElement("pattern",{id:p+e,x:f[0]%v[0],y:f[1]%v[1],width:v[0],height:v[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${E[0]},-${E[1]})`},g?t.createElement(Pl,{color:h,radius:w/a}):t.createElement(Ml,{dimensions:x,color:h,lineWidth:i})),t.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${p+e})`}))}Ll.displayName="Background";var zl=n(Ll);const Fl=({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r})=>[`${e}:${t}`,`${n}:${r}`].sort().join("--");function Vl(e){console.error("Unhandled case: "+e)}class Gl{constructor(e){this.iostore=e}get connected(){return this.iostore.getState().connected}set connected(e){this.iostore.setState({connected:e})}get does_trigger(){return this.iostore.getState().does_trigger}set does_trigger(e){this.iostore.setState({does_trigger:e})}get full_id(){return this.iostore.getState().full_id}set full_id(e){this.iostore.setState({full_id:e})}get id(){return this.iostore.getState().id}set id(e){this.iostore.setState({id:e})}get is_input(){return this.iostore.getState().is_input}set is_input(e){this.iostore.setState({is_input:e})}get name(){return this.iostore.getState().name}set name(e){this.iostore.setState({name:e})}get node(){return this.iostore.getState().node}set node(e){this.iostore.setState({node:e})}get type(){return this.iostore.getState().type}set type(e){this.iostore.setState({type:e})}get value(){return this.iostore.valuestore.getState().preview}set value(e){this.iostore.updateValueStore({preview:e})}get fullvalue(){return this.iostore.valuestore.getState().full}set fullvalue(e){this.iostore.updateValueStore({full:e})}get render_options(){return this.iostore.getState().render_options}set render_options(e){this.iostore.setState({render_options:e})}get hidden(){return this.iostore.getState().hidden}set hidden(e){this.iostore.setState({hidden:e})}get try_get_full_value(){return this.iostore.getState().try_get_full_value}get set_hidden(){return this.iostore.getState().set_hidden}}const Wl=e=>t=>{const{iostore:n,...r}=t,o=new Gl(n);return e({...r,io:o})},Hl=e=>{const t=e.v?Number(e.v):0;if(t>1)throw new Error("Plugin version is too new");if(1===t)return e;const n=(e=>{const t=e.v?Number(e.v):0;if(t>0)throw new Error("Plugin version is too new");return e})(e);return{...n,renderpluginfactory:e=>{const t=n.renderpluginfactory?.(e)||{},r=n.RendererPlugin||{},o=Object.keys({...r,...t}),i={};for(const e of o)switch(e){case"input_renderers":const t={};for(const[e,n]of Object.entries(r.input_renderers||{}))void 0!==n&&(t[e]=Wl(n));i.input_renderers=t;break;case"output_renderers":const n={};for(const[e,t]of Object.entries(r.output_renderers||{}))void 0!==t&&(n[e]=Wl(t));i.output_renderers=n;break;case"handle_preview_renderers":const o={};for(const[e,t]of Object.entries(r.handle_preview_renderers||{}))void 0!==t&&(o[e]=Wl(t));i.handle_preview_renderers=o;break;case"data_overlay_renderers":const a={};for(const[e,t]of Object.entries(r.data_overlay_renderers||{}))void 0!==t&&(a[e]=Wl(t));i.data_overlay_renderers=a;break;case"data_preview_renderers":const s={};for(const[e,t]of Object.entries(r.data_preview_renderers||{}))void 0!==t&&(s[e]=Wl(t));i.data_preview_renderers=s;break;case"data_view_renderers":const l={};for(const[e,t]of Object.entries(r.data_view_renderers||{}))void 0!==t&&(l[e]=Wl(t));i.data_view_renderers=l;break;default:Vl(e)}return i},v:1}},Xl=0,Yl=10,$l=20,Zl=30,Ul=Yl,Jl=e=>"string"==typeof e?e:e===Xl?"DEBUG":e===Yl?"INFO":e===$l?"WARN":e===Zl?"ERROR":"UNKNOWN";class Kl{constructor(e,t=Yl){this.name=e,this.level=(e=>{if("number"==typeof e)return e;const t=e.toLowerCase();if("debug"===t)return Xl;if("info"===t)return Yl;if("warn"===t||"warning"===t)return $l;if("error"===t)return Zl;throw new Error(`Unknown log level: ${e}`)})(t),this._level_name=Jl(t)}set_level(e){this.level=e,this._level_name=Jl(e)}_fomat_message(e,...t){return`[${this.name}] ${this._level_name}: ${e} ${t.map((e=>JSON.stringify(e,function(){const e=[];return function(t,n){if("object"!=typeof n||null===n)return n;for(;e.length>0&&e.at(-1)!==this;)e.pop();return e.includes(n)?"[Circular]":(e.push(n),n)}}()))).join(" ")}`}debug(e,...t){this.level<=Xl&&console.debug(this._fomat_message(e,...t))}info(e,...t){this.level<=Yl&&console.info(this._fomat_message(e,...t))}warn(e,...t){this.level<=$l&&console.warn(this._fomat_message(e,...t))}error(e,...t){this.level<=Zl&&console.error(this._fomat_message(e,...t))}}const ql=(e,t)=>{const n=e.getState();if(((e,t)=>{const n=e.properties||{};n["frontend:size"]||(n["frontend:size"]=[200,100]);const r=n["frontend:pos"];if(!r||2!==r.length||isNaN(r[0])||null===r[0]||isNaN(r[1])||null===r[1])if(t&&t.rf_instance&&null!==t.reactflowRef){const e=t.reactflowRef.getBoundingClientRect(),r=e.left+e.width/2,o=e.top+e.height/2,i=t.rf_instance.screenToFlowPosition({x:r,y:o});n["frontend:pos"]=[i.x-n["frontend:size"][0]/2,i.y-n["frontend:size"][0]/2]}else n["frontend:pos"]=[0,0];n["frontend:collapsed"]||(n["frontend:collapsed"]=!1),e.properties=n})(n,t),void 0===n.id)throw new Error("Node must have an id");const r={nodestore:e};return{position:{x:n.properties["frontend:pos"][0],y:n.properties["frontend:pos"][1]},data:r,type:"default",...n}},Ql=e=>{const t={...e},n=e=>{switch(e.type){case"add":(e=>{const t=r.getState();if(e.from_remote){let n=o.get_node(e.node.id,!1);if(!n)try{n=Fe(a,e.node),o.nodesstates.set(e.node.id,n)}catch(e){return void a.logger.error(`Failed to create node store ${e}`)}const i=n.getState();a.logger.info("Add node",i.id,i.name);const s=[...t.nodes,ql(n,a)];r.setState({nodes:s});for(const t in e.node.io){const n=e.node.io[t].id;void 0!==n&&a.worker?.get_io_value({nid:e.node.id,ioid:n})}setTimeout((()=>{a.worker?.call_hooks("node_added",{node:i.id})}),0)}})(e);break;case"update":(e=>{if(e.node.in_trigger&&(e.node.error=void 0),e.from_remote){const t=o.get_node(e.id,!1);if(!t)return void console.error("Node not found to update",e.id);t.update(e.node)}else a.worker&&a.worker.locally_update_node(e)})(e);break;case"delete":(e=>{a.logger.info("Deleting node",e.id),e.from_remote?r.getState().onNodesChange([{type:"remove",id:e.id}]):a.worker?.remove_node(e.id)})(e);break;case"error":(e=>{a.logger.error("Error",e),n({type:"update",id:e.id,node:{in_trigger:!1,error:e.error},from_remote:!0})})(e);break;case"trigger":(e=>{e.from_remote?n({type:"update",id:e.id,node:{in_trigger:!0,error:void 0},from_remote:!0}):a.worker?.trigger_node(e.id)})(e);break;default:a.logger.error("Unknown node action",e)}},r=(({on_node_change:e,on_edge_change:t,on_connect:n})=>{const r=e||(e=>{}),o=n||(e=>{}),i=ve(((e,t)=>({nodes:[],edges:[],onNodesChange:n=>{e({nodes:as(n,t().nodes)}),r(n)},onEdgesChange:n=>{e({edges:ss(n,t().edges)})},onConnect:e=>{null!=e.source&&null!=e.target&&o(e)}})));return i})({on_node_change:e=>{for(const t of e)switch(t.type){case"position":t.position&&n({type:"update",id:t.id,node:{properties:{"frontend:pos":[t.position.x,t.position.y]}},from_remote:!1});break;case"dimensions":t.dimensions&&n({type:"update",id:t.id,node:{properties:{"frontend:size":[t.dimensions.width,t.dimensions.height]}},from_remote:!1})}},on_edge_change:e=>{},on_connect:e=>{null!==e.source&&null!==e.target&&null!==e.sourceHandle&&null!==e.targetHandle&&a.worker&&a.worker.add_edge({src_nid:e.source,src_ioid:e.sourceHandle,trg_nid:e.target,trg_ioid:e.targetHandle,replace:!0})}}),o=(({})=>{const e=new Map;return{nodesstates:e,get_node:(t,n=!0)=>{const r=e.get(t);if(!r&&n){const n=e.keys();throw new Error(`Node ${t} not found, available nodes: ${Array.from(n)}`)}return r}}})({}),i={libstate:ve(((e,t)=>({lib:{shelves:[]},external_worker:[],set:t=>e((e=>({...e,...t}))),get_lib:()=>t().lib,get_external_worker:()=>t().external_worker})))},a={local_settings:ve(((e,t)=>({view_settings:{},update_view_settings:e=>{const t=a.local_settings.getState().view_settings,{new_obj:n,change:r}=Ee(t,e);r&&a.local_settings.setState((e=>({...e,view_settings:n})))}}))),local_state:ve(((e,t)=>({selected_nodes:[],selected_edges:[],funcnodescontainerRef:null}))),options:t,lib:i,workermanager:void 0,workers:ve(((e,t)=>({}))),workerstate:ve(((e,t)=>({is_open:!1}))),render_options:ve(((e,t)=>({}))),progress_state:ve(((e,t)=>({message:"please select worker",status:"info",progress:0,blocking:!1}))),update_render_options:e=>{const t=a.render_options.getState(),{new_obj:n,change:r}=Ee(t,e);r&&a.render_options.setState(n)},worker:void 0,_unsubscribeFromWorker:void 0,set_worker:e=>{e!==a.worker&&(a._unsubscribeFromWorker&&(a._unsubscribeFromWorker(),a._unsubscribeFromWorker=void 0),e&&(a._unsubscribeFromWorker=e.state.subscribe((e=>{a.workerstate.setState(e)})),a.workerstate.setState(e.state.getState())),a.worker=e,e?.set_zustand(a))},nodespace:o,useReactFlowStore:r,on_node_action:n,on_edge_action:e=>{const t=r.getState();switch(e.type){case"add":if(e.from_remote){const n=t.edges,o=Fl(e);if(n.some((e=>e.id===o)))return;const i={id:o,source:e.src_nid,target:e.trg_nid,sourceHandle:e.src_ioid,targetHandle:e.trg_ioid,className:"funcnodes-edge animated"};a.logger.info("Adding edge",i),r.setState({edges:[...n,i]}),a.worker?.get_remote_node_state(e.src_nid),a.worker?.get_remote_node_state(e.trg_nid)}break;case"delete":if(e.from_remote){const n=t.edges,o=Fl(e);a.logger.info("Deleting edge",o);const i=n.filter((e=>e.id!==o));r.setState({edges:i}),a.worker?.get_remote_node_state(e.src_nid),a.worker?.get_remote_node_state(e.trg_nid)}break;default:a.logger.error("Unknown edge action",e)}},reactflowRef:null,clear_all:()=>{a.worker?.disconnect(),a.set_worker(void 0),a.workermanager?.setWorker(void 0),a.lib.libstate.getState().set({lib:{shelves:[]},external_worker:[]}),a.nodespace.nodesstates.clear(),a.useReactFlowStore.setState({nodes:[],edges:[]}),a.auto_progress()},center_node:e=>{if(!a.rf_instance)return;e=Array.isArray(e)?e:[e];const t=a.useReactFlowStore.getState().nodes.filter((t=>e.includes(t.id)));t.length>0&&a.rf_instance?.fitView({padding:.2,nodes:t})},center_all:()=>{console.log("center all",a.rf_instance),a.rf_instance?.fitView({padding:.2})},set_progress:e=>{if(""===e.message)return a.auto_progress();const t=a.progress_state.getState(),{new_obj:n,change:r}=Ee(t,e);r&&a.progress_state.setState(n)},auto_progress:()=>void 0===a.workermanager||a.workermanager.open?void 0===a.worker?a.set_progress({progress:0,message:"please select worker",status:"error",blocking:!1}):a.worker.is_open?void a.set_progress({progress:1,message:"running",status:"info",blocking:!1}):a.set_progress({progress:0,message:"connecting to worker",status:"info",blocking:!0}):a.set_progress({progress:0,message:"connecting to worker manager",status:"error",blocking:!1}),plugins:ve(((e,t)=>({}))),add_plugin:(e,t)=>{if(void 0===t)return;const n=(e=>Hl(e))(t);a.plugins.setState((t=>({...t,[e]:n})))},dev_settings:{debug:!0},logger:new Kl("fn",Ul)};return a};function ec(e,t){return function(){return e.apply(t,arguments)}}const{toString:tc}=Object.prototype,{getPrototypeOf:nc}=Object,rc=(e=>t=>{const n=tc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),oc=e=>(e=e.toLowerCase(),t=>rc(t)===e),ic=e=>t=>typeof t===e,{isArray:ac}=Array,sc=ic("undefined");const lc=oc("ArrayBuffer");const cc=ic("string"),uc=ic("function"),dc=ic("number"),fc=e=>null!==e&&"object"==typeof e,pc=e=>{if("object"!==rc(e))return!1;const t=nc(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},hc=oc("Date"),mc=oc("File"),gc=oc("Blob"),yc=oc("FileList"),bc=oc("URLSearchParams"),[vc,wc,xc,Ec]=["ReadableStream","Request","Response","Headers"].map(oc);function kc(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),ac(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function Cc(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Sc="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:A,_c=e=>!sc(e)&&e!==Sc;const Ic=(Ac="undefined"!=typeof Uint8Array&&nc(Uint8Array),e=>Ac&&e instanceof Ac);var Ac;const Nc=oc("HTMLFormElement"),Oc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Rc=oc("RegExp"),Tc=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};kc(n,((n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)})),Object.defineProperties(e,r)};const Mc=oc("AsyncFunction"),Pc=(Dc="function"==typeof setImmediate,jc=uc(Sc.postMessage),Dc?setImmediate:jc?((e,t)=>(Sc.addEventListener("message",(({source:n,data:r})=>{n===Sc&&r===e&&t.length&&t.shift()()}),!1),n=>{t.push(n),Sc.postMessage(e,"*")}))(`axios@${Math.random()}`,[]):e=>setTimeout(e));var Dc,jc;const Bc="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Sc):Q.nextTick||Pc;var Lc={isArray:ac,isArrayBuffer:lc,isBuffer:function(e){return null!==e&&!sc(e)&&null!==e.constructor&&!sc(e.constructor)&&uc(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||uc(e.append)&&("formdata"===(t=rc(e))||"object"===t&&uc(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&lc(e.buffer),t},isString:cc,isNumber:dc,isBoolean:e=>!0===e||!1===e,isObject:fc,isPlainObject:pc,isReadableStream:vc,isRequest:wc,isResponse:xc,isHeaders:Ec,isUndefined:sc,isDate:hc,isFile:mc,isBlob:gc,isRegExp:Rc,isFunction:uc,isStream:e=>fc(e)&&uc(e.pipe),isURLSearchParams:bc,isTypedArray:Ic,isFileList:yc,forEach:kc,merge:function e(){const{caseless:t}=_c(this)&&this||{},n={},r=(r,o)=>{const i=t&&Cc(n,o)||o;pc(n[i])&&pc(r)?n[i]=e(n[i],r):pc(r)?n[i]=e({},r):ac(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&kc(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(kc(t,((t,r)=>{n&&uc(t)?e[r]=ec(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==n&&nc(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:rc,kindOfTest:oc,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(ac(e))return e;let t=e.length;if(!dc(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:Nc,hasOwnProperty:Oc,hasOwnProp:Oc,reduceDescriptors:Tc,freezeMethods:e=>{Tc(e,((t,n)=>{if(uc(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];uc(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return ac(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:Cc,global:Sc,isContextDefined:_c,isSpecCompliantForm:function(e){return!!(e&&uc(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(fc(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=ac(e)?[]:{};return kc(e,((e,t)=>{const i=n(e,r+1);!sc(i)&&(o[t]=i)})),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:Mc,isThenable:e=>e&&(fc(e)||uc(e))&&uc(e.then)&&uc(e.catch),setImmediate:Pc,asap:Bc},zc=[],Fc=[],Vc="undefined"!=typeof Uint8Array?Uint8Array:Array,Gc=!1;function Wc(){Gc=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)zc[t]=e[t],Fc[e.charCodeAt(t)]=t;Fc["-".charCodeAt(0)]=62,Fc["_".charCodeAt(0)]=63}function Hc(e,t,n){for(var r,o,i=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(zc[(o=r)>>18&63]+zc[o>>12&63]+zc[o>>6&63]+zc[63&o]);return i.join("")}function Xc(e){var t;Gc||Wc();for(var n=e.length,r=n%3,o="",i=[],a=16383,s=0,l=n-r;s<l;s+=a)i.push(Hc(e,s,s+a>l?l:s+a));return 1===r?(t=e[n-1],o+=zc[t>>2],o+=zc[t<<4&63],o+="=="):2===r&&(t=(e[n-2]<<8)+e[n-1],o+=zc[t>>10],o+=zc[t>>4&63],o+=zc[t<<2&63],o+="="),i.push(o),i.join("")}function Yc(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?o-1:0,f=n?-1:1,p=e[t+d];for(d+=f,i=p&(1<<-u)-1,p>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),i-=c}return(p?-1:1)*a*Math.pow(2,i-r)}function $c(e,t,n,r,o,i){var a,s,l,c=8*i-o-1,u=(1<<c)-1,d=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+p]=255&s,p+=h,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+p]=255&a,p+=h,a/=256,c-=8);e[n+p-h]|=128*m}var Zc={}.toString,Uc=Array.isArray||function(e){return"[object Array]"==Zc.call(e)};function Jc(){return qc.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Kc(e,t){if(Jc()<t)throw new RangeError("Invalid typed array length");return qc.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=qc.prototype:(null===e&&(e=new qc(t)),e.length=t),e}function qc(e,t,n){if(!(qc.TYPED_ARRAY_SUPPORT||this instanceof qc))return new qc(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return tu(this,e)}return Qc(this,e,t,n)}function Qc(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);qc.TYPED_ARRAY_SUPPORT?(e=t).__proto__=qc.prototype:e=nu(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!qc.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|iu(t,n);e=Kc(e,r);var o=e.write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(ou(t)){var n=0|ru(t.length);return 0===(e=Kc(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?Kc(e,0):nu(e,t);if("Buffer"===t.type&&Uc(t.data))return nu(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function eu(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function tu(e,t){if(eu(t),e=Kc(e,t<0?0:0|ru(t)),!qc.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function nu(e,t){var n=t.length<0?0:0|ru(t.length);e=Kc(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function ru(e){if(e>=Jc())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Jc().toString(16)+" bytes");return 0|e}function ou(e){return!(null==e||!e._isBuffer)}function iu(e,t){if(ou(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Tu(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Mu(e).length;default:if(r)return Tu(e).length;t=(""+t).toLowerCase(),r=!0}}function au(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return xu(this,t,n);case"utf8":case"utf-8":return yu(this,t,n);case"ascii":return vu(this,t,n);case"latin1":case"binary":return wu(this,t,n);case"base64":return gu(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Eu(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function su(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function lu(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=qc.from(t,r)),ou(t))return 0===t.length?-1:cu(e,t,n,r,o);if("number"==typeof t)return t&=255,qc.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):cu(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function cu(e,t,n,r,o){var i,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var d=!0,f=0;f<l;f++)if(c(e,i+f)!==c(t,f)){d=!1;break}if(d)return i}return-1}function uu(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function du(e,t,n,r){return Pu(Tu(t,e.length-n),e,n,r)}function fu(e,t,n,r){return Pu(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function pu(e,t,n,r){return fu(e,t,n,r)}function hu(e,t,n,r){return Pu(Mu(t),e,n,r)}function mu(e,t,n,r){return Pu(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function gu(e,t,n){return 0===t&&n===e.length?Xc(e):Xc(e.slice(t,n))}function yu(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,l,c=e[o],u=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(l=(15&c)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=d}return function(e){var t=e.length;if(t<=bu)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=bu));return n}(r)}qc.TYPED_ARRAY_SUPPORT=void 0===A.TYPED_ARRAY_SUPPORT||A.TYPED_ARRAY_SUPPORT,Jc(),qc.poolSize=8192,qc._augment=function(e){return e.__proto__=qc.prototype,e},qc.from=function(e,t,n){return Qc(null,e,t,n)},qc.TYPED_ARRAY_SUPPORT&&(qc.prototype.__proto__=Uint8Array.prototype,qc.__proto__=Uint8Array),qc.alloc=function(e,t,n){return function(e,t,n,r){return eu(t),t<=0?Kc(e,t):void 0!==n?"string"==typeof r?Kc(e,t).fill(n,r):Kc(e,t).fill(n):Kc(e,t)}(null,e,t,n)},qc.allocUnsafe=function(e){return tu(null,e)},qc.allocUnsafeSlow=function(e){return tu(null,e)},qc.isBuffer=function(e){return null!=e&&(!!e._isBuffer||Du(e)||function(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&Du(e.slice(0,0))}(e))},qc.compare=function(e,t){if(!ou(e)||!ou(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},qc.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},qc.concat=function(e,t){if(!Uc(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return qc.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=qc.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(!ou(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o),o+=i.length}return r},qc.byteLength=iu,qc.prototype._isBuffer=!0,qc.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)su(this,t,t+1);return this},qc.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)su(this,t,t+3),su(this,t+1,t+2);return this},qc.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)su(this,t,t+7),su(this,t+1,t+6),su(this,t+2,t+5),su(this,t+3,t+4);return this},qc.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?yu(this,0,e):au.apply(this,arguments)},qc.prototype.equals=function(e){if(!ou(e))throw new TypeError("Argument must be a Buffer");return this===e||0===qc.compare(this,e)},qc.prototype.inspect=function(){var e="";return this.length>0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),"<Buffer "+e+">"},qc.prototype.compare=function(e,t,n,r,o){if(!ou(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),l=this.slice(r,o),c=e.slice(t,n),u=0;u<s;++u)if(l[u]!==c[u]){i=l[u],a=c[u];break}return i<a?-1:a<i?1:0},qc.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},qc.prototype.indexOf=function(e,t,n){return lu(this,e,t,n,!0)},qc.prototype.lastIndexOf=function(e,t,n){return lu(this,e,t,n,!1)},qc.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return uu(this,e,t,n);case"utf8":case"utf-8":return du(this,e,t,n);case"ascii":return fu(this,e,t,n);case"latin1":case"binary":return pu(this,e,t,n);case"base64":return hu(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return mu(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},qc.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var bu=4096;function vu(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function wu(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function xu(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=Ru(e[i]);return o}function Eu(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function ku(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function Cu(e,t,n,r,o,i){if(!ou(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function Su(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o<i;++o)e[n+o]=(t&255<<8*(r?o:1-o))>>>8*(r?o:1-o)}function _u(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o<i;++o)e[n+o]=t>>>8*(r?o:3-o)&255}function Iu(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Au(e,t,n,r,o){return o||Iu(e,0,n,4),$c(e,t,n,r,23,4),n+4}function Nu(e,t,n,r,o){return o||Iu(e,0,n,8),$c(e,t,n,r,52,8),n+8}qc.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),qc.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=qc.prototype;else{var o=t-e;n=new qc(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},qc.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||ku(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},qc.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||ku(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},qc.prototype.readUInt8=function(e,t){return t||ku(e,1,this.length),this[e]},qc.prototype.readUInt16LE=function(e,t){return t||ku(e,2,this.length),this[e]|this[e+1]<<8},qc.prototype.readUInt16BE=function(e,t){return t||ku(e,2,this.length),this[e]<<8|this[e+1]},qc.prototype.readUInt32LE=function(e,t){return t||ku(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},qc.prototype.readUInt32BE=function(e,t){return t||ku(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},qc.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||ku(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},qc.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||ku(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},qc.prototype.readInt8=function(e,t){return t||ku(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},qc.prototype.readInt16LE=function(e,t){t||ku(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},qc.prototype.readInt16BE=function(e,t){t||ku(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},qc.prototype.readInt32LE=function(e,t){return t||ku(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},qc.prototype.readInt32BE=function(e,t){return t||ku(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},qc.prototype.readFloatLE=function(e,t){return t||ku(e,4,this.length),Yc(this,e,!0,23,4)},qc.prototype.readFloatBE=function(e,t){return t||ku(e,4,this.length),Yc(this,e,!1,23,4)},qc.prototype.readDoubleLE=function(e,t){return t||ku(e,8,this.length),Yc(this,e,!0,52,8)},qc.prototype.readDoubleBE=function(e,t){return t||ku(e,8,this.length),Yc(this,e,!1,52,8)},qc.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Cu(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},qc.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||Cu(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},qc.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,1,255,0),qc.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},qc.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,2,65535,0),qc.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Su(this,e,t,!0),t+2},qc.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,2,65535,0),qc.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Su(this,e,t,!1),t+2},qc.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,4,4294967295,0),qc.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):_u(this,e,t,!0),t+4},qc.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,4,4294967295,0),qc.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):_u(this,e,t,!1),t+4},qc.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);Cu(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+n},qc.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);Cu(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a|0)-s&255;return t+n},qc.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,1,127,-128),qc.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},qc.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,2,32767,-32768),qc.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):Su(this,e,t,!0),t+2},qc.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,2,32767,-32768),qc.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):Su(this,e,t,!1),t+2},qc.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,4,2147483647,-2147483648),qc.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):_u(this,e,t,!0),t+4},qc.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||Cu(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),qc.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):_u(this,e,t,!1),t+4},qc.prototype.writeFloatLE=function(e,t,n){return Au(this,e,t,!0,n)},qc.prototype.writeFloatBE=function(e,t,n){return Au(this,e,t,!1,n)},qc.prototype.writeDoubleLE=function(e,t,n){return Nu(this,e,t,!0,n)},qc.prototype.writeDoubleBE=function(e,t,n){return Nu(this,e,t,!1,n)},qc.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o,i=r-n;if(this===e&&n<t&&t<r)for(o=i-1;o>=0;--o)e[o+t]=this[o+n];else if(i<1e3||!qc.TYPED_ARRAY_SUPPORT)for(o=0;o<i;++o)e[o+t]=this[o+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+i),t);return i},qc.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var o=e.charCodeAt(0);o<256&&(e=o)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!qc.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=ou(e)?e:Tu(new qc(e,r).toString()),s=a.length;for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var Ou=/[^+\/0-9A-Za-z-_]/g;function Ru(e){return e<16?"0"+e.toString(16):e.toString(16)}function Tu(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Mu(e){return function(e){var t,n,r,o,i,a;Gc||Wc();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");i="="===e[s-2]?2:"="===e[s-1]?1:0,a=new Vc(3*s/4-i),r=i>0?s-4:s;var l=0;for(t=0,n=0;t<r;t+=4,n+=3)o=Fc[e.charCodeAt(t)]<<18|Fc[e.charCodeAt(t+1)]<<12|Fc[e.charCodeAt(t+2)]<<6|Fc[e.charCodeAt(t+3)],a[l++]=o>>16&255,a[l++]=o>>8&255,a[l++]=255&o;return 2===i?(o=Fc[e.charCodeAt(t)]<<2|Fc[e.charCodeAt(t+1)]>>4,a[l++]=255&o):1===i&&(o=Fc[e.charCodeAt(t)]<<10|Fc[e.charCodeAt(t+1)]<<4|Fc[e.charCodeAt(t+2)]>>2,a[l++]=o>>8&255,a[l++]=255&o),a}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(Ou,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Pu(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function Du(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function ju(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status?o.status:null)}Lc.inherits(ju,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Lc.toJSONObject(this.config),code:this.code,status:this.status}}});const Bu=ju.prototype,Lu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{Lu[e]={value:e}})),Object.defineProperties(ju,Lu),Object.defineProperty(Bu,"isAxiosError",{value:!0}),ju.from=(e,t,n,r,o,i)=>{const a=Object.create(Bu);return Lc.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),ju.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function zu(e){return Lc.isPlainObject(e)||Lc.isArray(e)}function Fu(e){return Lc.endsWith(e,"[]")?e.slice(0,-2):e}function Vu(e,t,n){return e?e.concat(t).map((function(e,t){return e=Fu(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const Gu=Lc.toFlatObject(Lc,{},null,(function(e){return/^is[A-Z]/.test(e)}));function Wu(e,t,n){if(!Lc.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=Lc.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!Lc.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,i=n.dots,a=n.indexes,s=(n.Blob||"undefined"!=typeof Blob&&Blob)&&Lc.isSpecCompliantForm(t);if(!Lc.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(Lc.isDate(e))return e.toISOString();if(!s&&Lc.isBlob(e))throw new ju("Blob is not supported. Use a Buffer instead.");return Lc.isArrayBuffer(e)||Lc.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):qc.from(e):e}function c(e,n,o){let s=e;if(e&&!o&&"object"==typeof e)if(Lc.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(Lc.isArray(e)&&function(e){return Lc.isArray(e)&&!e.some(zu)}(e)||(Lc.isFileList(e)||Lc.endsWith(n,"[]"))&&(s=Lc.toArray(e)))return n=Fu(n),s.forEach((function(e,r){!Lc.isUndefined(e)&&null!==e&&t.append(!0===a?Vu([n],r,i):null===a?n:n+"[]",l(e))})),!1;return!!zu(e)||(t.append(Vu(o,n,i),l(e)),!1)}const u=[],d=Object.assign(Gu,{defaultVisitor:c,convertValue:l,isVisitable:zu});if(!Lc.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!Lc.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),Lc.forEach(n,(function(n,i){!0===(!(Lc.isUndefined(n)||null===n)&&o.call(t,n,Lc.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])})),u.pop()}}(e),t}function Hu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Xu(e,t){this._pairs=[],e&&Wu(e,this,t)}const Yu=Xu.prototype;function $u(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Zu(e,t,n){if(!t)return e;const r=n&&n.encode||$u;Lc.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let i;if(i=o?o(t,n):Lc.isURLSearchParams(t)?t.toString():new Xu(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Yu.append=function(e,t){this._pairs.push([e,t])},Yu.toString=function(e){const t=e?function(t){return e.call(this,t,Hu)}:Hu;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};class Uu{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Lc.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}var Ju={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Ku={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Xu,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const qu="undefined"!=typeof window&&"undefined"!=typeof document,Qu="object"==typeof navigator&&navigator||void 0,ed=qu&&(!Qu||["ReactNative","NativeScript","NS"].indexOf(Qu.product)<0),td="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,nd=qu&&window.location.href||"http://localhost";var rd={...Object.freeze({__proto__:null,hasBrowserEnv:qu,hasStandardBrowserEnv:ed,hasStandardBrowserWebWorkerEnv:td,navigator:Qu,origin:nd}),...Ku};function od(e){function t(e,n,r,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&Lc.isArray(r)?r.length:i,s)return Lc.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!a;r[i]&&Lc.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&Lc.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!a}if(Lc.isFormData(e)&&Lc.isFunction(e.entries)){const n={};return Lc.forEachEntry(e,((e,r)=>{t(function(e){return Lc.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const id={transitional:Ju,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=Lc.isObject(e);o&&Lc.isHTMLForm(e)&&(e=new FormData(e));if(Lc.isFormData(e))return r?JSON.stringify(od(e)):e;if(Lc.isArrayBuffer(e)||Lc.isBuffer(e)||Lc.isStream(e)||Lc.isFile(e)||Lc.isBlob(e)||Lc.isReadableStream(e))return e;if(Lc.isArrayBufferView(e))return e.buffer;if(Lc.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Wu(e,new rd.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return rd.isNode&&Lc.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=Lc.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Wu(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(Lc.isString(e))try{return(t||JSON.parse)(e),Lc.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||id.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(Lc.isResponse(e)||Lc.isReadableStream(e))return e;if(e&&Lc.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw ju.from(e,ju.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rd.classes.FormData,Blob:rd.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Lc.forEach(["delete","get","head","post","put","patch"],(e=>{id.headers[e]={}}));const ad=Lc.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const sd=Symbol("internals");function ld(e){return e&&String(e).trim().toLowerCase()}function cd(e){return!1===e||null==e?e:Lc.isArray(e)?e.map(cd):String(e)}function ud(e,t,n,r,o){return Lc.isFunction(r)?r.call(this,t,n):(o&&(t=n),Lc.isString(t)?Lc.isString(r)?-1!==t.indexOf(r):Lc.isRegExp(r)?r.test(t):void 0:void 0)}let dd=class{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ld(t);if(!o)throw new Error("header name must be a non-empty string");const i=Lc.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=cd(e))}const i=(e,t)=>Lc.forEach(e,((e,n)=>o(e,n,t)));if(Lc.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Lc.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ad[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t);else if(Lc.isHeaders(e))for(const[t,r]of e.entries())o(r,t,n);else null!=e&&o(t,e,n);return this}get(e,t){if(e=ld(e)){const n=Lc.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(Lc.isFunction(t))return t.call(this,e,n);if(Lc.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ld(e)){const n=Lc.findKey(this,e);return!(!n||void 0===this[n]||t&&!ud(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ld(e)){const o=Lc.findKey(n,e);!o||t&&!ud(0,n[o],o,t)||(delete n[o],r=!0)}}return Lc.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!ud(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return Lc.forEach(this,((r,o)=>{const i=Lc.findKey(n,o);if(i)return t[i]=cd(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=cd(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Lc.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Lc.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[sd]=this[sd]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ld(e);t[r]||(!function(e,t){const n=Lc.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return Lc.isArray(e)?e.forEach(r):r(e),this}};function fd(e,t){const n=this||id,r=t||n,o=dd.from(r.headers);let i=r.data;return Lc.forEach(e,(function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function pd(e){return!(!e||!e.__CANCEL__)}function hd(e,t,n){ju.call(this,null==e?"canceled":e,ju.ERR_CANCELED,t,n),this.name="CanceledError"}function md(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ju("Request failed with status code "+n.status,[ju.ERR_BAD_REQUEST,ju.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}dd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Lc.reduceDescriptors(dd.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),Lc.freezeMethods(dd),Lc.inherits(hd,ju,{__CANCEL__:!0});const gd=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const l=Date.now(),c=r[a];o||(o=l),n[i]=s,r[i]=l;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return function(e,t){let n,r,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e.apply(null,t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(n=e,r||(r=setTimeout((()=>{r=null,a(n)}),i-s)))},()=>n&&a(n)]}((n=>{const i=n.loaded,a=n.lengthComputable?n.total:void 0,s=i-r,l=o(s);r=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:l||void 0,estimated:l&&a&&i<=a?(a-i)/l:void 0,event:n,lengthComputable:null!=a,[t?"download":"upload"]:!0})}),n)},yd=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},bd=e=>(...t)=>Lc.asap((()=>e(...t)));var vd=rd.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rd.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rd.origin),rd.navigator&&/(msie|trident)/i.test(rd.navigator.userAgent)):()=>!0,wd=rd.hasStandardBrowserEnv?{write(e,t,n,r,o,i){const a=[e+"="+encodeURIComponent(t)];Lc.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Lc.isString(r)&&a.push("path="+r),Lc.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function xd(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const Ed=e=>e instanceof dd?{...e}:e;function kd(e,t){t=t||{};const n={};function r(e,t,n,r){return Lc.isPlainObject(e)&&Lc.isPlainObject(t)?Lc.merge.call({caseless:r},e,t):Lc.isPlainObject(t)?Lc.merge({},t):Lc.isArray(t)?t.slice():t}function o(e,t,n,o){return Lc.isUndefined(t)?Lc.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!Lc.isUndefined(t))return r(void 0,t)}function a(e,t){return Lc.isUndefined(t)?Lc.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,o,i){return i in t?r(n,o):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,n)=>o(Ed(e),Ed(t),0,!0)};return Lc.forEach(Object.keys(Object.assign({},e,t)),(function(r){const i=l[r]||o,a=i(e[r],t[r],r);Lc.isUndefined(a)&&i!==s||(n[r]=a)})),n}var Cd=e=>{const t=kd({},e);let n,{data:r,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:l}=t;if(t.headers=s=dd.from(s),t.url=Zu(xd(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&s.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),Lc.isFormData(r))if(rd.hasStandardBrowserEnv||rd.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(!1!==(n=s.getContentType())){const[e,...t]=n?n.split(";").map((e=>e.trim())).filter(Boolean):[];s.setContentType([e||"multipart/form-data",...t].join("; "))}if(rd.hasStandardBrowserEnv&&(o&&Lc.isFunction(o)&&(o=o(t)),o||!1!==o&&vd(t.url))){const e=i&&a&&wd.read(a);e&&s.set(i,e)}return t};var Sd="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){const r=Cd(e);let o=r.data;const i=dd.from(r.headers).normalize();let a,s,l,c,u,{responseType:d,onUploadProgress:f,onDownloadProgress:p}=r;function h(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(a),r.signal&&r.signal.removeEventListener("abort",a)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=dd.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());md((function(e){t(e),h()}),(function(e){n(e),h()}),{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new ju("Request aborted",ju.ECONNABORTED,e,m)),m=null)},m.onerror=function(){n(new ju("Network Error",ju.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Ju;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ju(t,o.clarifyTimeoutError?ju.ETIMEDOUT:ju.ECONNABORTED,e,m)),m=null},void 0===o&&i.setContentType(null),"setRequestHeader"in m&&Lc.forEach(i.toJSON(),(function(e,t){m.setRequestHeader(t,e)})),Lc.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),p&&([l,u]=gd(p,!0),m.addEventListener("progress",l)),f&&m.upload&&([s,c]=gd(f),m.upload.addEventListener("progress",s),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(a=t=>{m&&(n(!t||t.type?new hd(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(a),r.signal&&(r.signal.aborted?a():r.signal.addEventListener("abort",a)));const y=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);y&&-1===rd.protocols.indexOf(y)?n(new ju("Unsupported protocol "+y+":",ju.ERR_BAD_REQUEST,e)):m.send(o||null)}))};const _d=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,a();const t=e instanceof Error?e:this.reason;r.abort(t instanceof ju?t:new hd(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null,o(new ju(`timeout ${t} of ms exceeded`,ju.ETIMEDOUT))}),t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)})),e=null)};e.forEach((e=>e.addEventListener("abort",o)));const{signal:s}=r;return s.unsubscribe=()=>Lc.asap(a),s}},Id=function*(e,t){let n=e.byteLength;if(n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Ad=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Nd=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Ad(e))yield*Id(n,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return s(),void e.close();let i=r.byteLength;if(n){let e=a+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},Od="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Rd=Od&&"function"==typeof ReadableStream,Td=Od&&("function"==typeof TextEncoder?(Md=new TextEncoder,e=>Md.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Md;const Pd=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Dd=Rd&&Pd((()=>{let e=!1;const t=new Request(rd.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),jd=Rd&&Pd((()=>Lc.isReadableStream(new Response("").body))),Bd={stream:jd&&(e=>e.body)};var Ld;Od&&(Ld=new Response,["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!Bd[e]&&(Bd[e]=Lc.isFunction(Ld[e])?t=>t[e]():(t,n)=>{throw new ju(`Response type '${e}' is not supported`,ju.ERR_NOT_SUPPORT,n)})})));const zd=async(e,t)=>{const n=Lc.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Lc.isBlob(e))return e.size;if(Lc.isSpecCompliantForm(e)){const t=new Request(rd.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Lc.isArrayBufferView(e)||Lc.isArrayBuffer(e)?e.byteLength:(Lc.isURLSearchParams(e)&&(e+=""),Lc.isString(e)?(await Td(e)).byteLength:void 0)})(t):n};var Fd=Od&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:d="same-origin",fetchOptions:f}=Cd(e);c=c?(c+"").toLowerCase():"text";let p,h=_d([o,i&&i.toAbortSignal()],a);const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let g;try{if(l&&Dd&&"get"!==n&&"head"!==n&&0!==(g=await zd(u,r))){let e,n=new Request(t,{method:"POST",body:r,duplex:"half"});if(Lc.isFormData(r)&&(e=n.headers.get("content-type"))&&u.setContentType(e),n.body){const[e,t]=yd(g,gd(bd(l)));r=Nd(n.body,65536,e,t)}}Lc.isString(d)||(d=d?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...f,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:o?d:void 0});let i=await fetch(p);const a=jd&&("stream"===c||"response"===c);if(jd&&(s||a&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=Lc.toFiniteNumber(i.headers.get("content-length")),[n,r]=s&&yd(t,gd(bd(s),!0))||[];i=new Response(Nd(i.body,65536,n,(()=>{r&&r(),m&&m()})),e)}c=c||"text";let y=await Bd[Lc.findKey(Bd,c)||"text"](i,e);return!a&&m&&m(),await new Promise(((t,n)=>{md(t,n,{data:y,headers:dd.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(t){if(m&&m(),t&&"TypeError"===t.name&&/fetch/i.test(t.message))throw Object.assign(new ju("Network Error",ju.ERR_NETWORK,e,p),{cause:t.cause||t});throw ju.from(t,t&&t.code,e,p)}});const Vd={http:null,xhr:Sd,fetch:Fd};Lc.forEach(Vd,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Gd=e=>`- ${e}`,Wd=e=>Lc.isFunction(e)||null===e||!1===e;var Hd=e=>{e=Lc.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let i=0;i<t;i++){let t;if(n=e[i],r=n,!Wd(n)&&(r=Vd[(t=String(n)).toLowerCase()],void 0===r))throw new ju(`Unknown adapter '${t}'`);if(r)break;o[t||"#"+i]=r}if(!r){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new ju("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Gd).join("\n"):" "+Gd(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function Xd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new hd(null,e)}function Yd(e){Xd(e),e.headers=dd.from(e.headers),e.data=fd.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Hd(e.adapter||id.adapter)(e).then((function(t){return Xd(e),t.data=fd.call(e,e.transformResponse,t),t.headers=dd.from(t.headers),t}),(function(t){return pd(t)||(Xd(e),t&&t.response&&(t.response.data=fd.call(e,e.transformResponse,t.response),t.response.headers=dd.from(t.response.headers))),Promise.reject(t)}))}const $d="1.8.4",Zd={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Zd[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Ud={};Zd.transitional=function(e,t,n){function r(e,t){return"[Axios v1.8.4] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new ju(r(o," has been removed"+(t?" in "+t:"")),ju.ERR_DEPRECATED);return t&&!Ud[o]&&(Ud[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Zd.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var Jd={assertOptions:function(e,t,n){if("object"!=typeof e)throw new ju("options must be an object",ju.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],a=t[i];if(a){const t=e[i],n=void 0===t||a(t,i,e);if(!0!==n)throw new ju("option "+i+" must be "+n,ju.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new ju("Unknown option "+i,ju.ERR_BAD_OPTION)}},validators:Zd};const Kd=Jd.validators;let qd=class{constructor(e){this.defaults=e,this.interceptors={request:new Uu,response:new Uu}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=kd(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Jd.assertOptions(n,{silentJSONParsing:Kd.transitional(Kd.boolean),forcedJSONParsing:Kd.transitional(Kd.boolean),clarifyTimeoutError:Kd.transitional(Kd.boolean)},!1),null!=r&&(Lc.isFunction(r)?t.paramsSerializer={serialize:r}:Jd.assertOptions(r,{encode:Kd.function,serialize:Kd.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Jd.assertOptions(t,{baseUrl:Kd.spelling("baseURL"),withXsrfToken:Kd.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Lc.merge(o.common,o[t.method]);o&&Lc.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=dd.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!s){const e=[Yd.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=Yd.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return Zu(xd((e=kd(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};Lc.forEach(["delete","get","head","options"],(function(e){qd.prototype[e]=function(t,n){return this.request(kd(n||{},{method:e,url:t,data:(n||{}).data}))}})),Lc.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(kd(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}qd.prototype[e]=t(),qd.prototype[e+"Form"]=t(!0)}));const Qd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qd).forEach((([e,t])=>{Qd[t]=e}));const ef=function e(t){const n=new qd(t),r=ec(qd.prototype.request,n);return Lc.extend(r,qd.prototype,n,{allOwnKeys:!0}),Lc.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(kd(t,n))},r}(id);ef.Axios=qd,ef.CanceledError=hd,ef.CancelToken=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new hd(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}},ef.isCancel=pd,ef.VERSION=$d,ef.toFormData=Wu,ef.AxiosError=ju,ef.Cancel=ef.CanceledError,ef.all=function(e){return Promise.all(e)},ef.spread=function(e){return function(t){return e.apply(null,t)}},ef.isAxiosError=function(e){return Lc.isObject(e)&&!0===e.isAxiosError},ef.mergeConfig=kd,ef.AxiosHeaders=dd,ef.formToJSON=e=>od(Lc.isHTMLForm(e)?new FormData(e):e),ef.getAdapter=Hd,ef.HttpStatusCode=Qd,ef.default=ef;const{Axios:tf,AxiosError:nf,CanceledError:rf,isCancel:of,CancelToken:af,VERSION:sf,all:lf,Cancel:cf,isAxiosError:uf,spread:df,toFormData:ff,AxiosHeaders:pf,HttpStatusCode:hf,formToJSON:mf,getAdapter:gf,mergeConfig:yf}=ef;let bf;const vf=new Uint8Array(16);function wf(){if(!bf&&(bf="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!bf))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bf(vf)}const xf=[];for(let e=0;e<256;++e)xf.push((e+256).toString(16).slice(1));var Ef={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function kf(e,t,n){if(Ef.randomUUID&&!e)return Ef.randomUUID();const r=(e=e||{}).random||(e.rng||wf)();return r[6]=15&r[6]|64,r[8]=63&r[8]|128,function(e,t=0){return xf[e[t+0]]+xf[e[t+1]]+xf[e[t+2]]+xf[e[t+3]]+"-"+xf[e[t+4]]+xf[e[t+5]]+"-"+xf[e[t+6]]+xf[e[t+7]]+"-"+xf[e[t+8]]+xf[e[t+9]]+"-"+xf[e[t+10]]+xf[e[t+11]]+xf[e[t+12]]+xf[e[t+13]]+xf[e[t+14]]+xf[e[t+15]]}(r)}class Cf{constructor(e){this.CHUNK_TIMEOUT=1e4,this.PONGDELAY=2e3,this.blobChunks={},this._hooks=new Map,this._ns_event_intercepts=new Map,this._unique_cmd_outs={},this.uuid=e.uuid,this.on_error=e.on_error||(e=>{this._zustand?.logger.error(e)}),this.messagePromises=new Map,this._local_nodeupdates=new Map,this._nodeupdatetimer=setTimeout((()=>{this.sync_local_node_updates()}),5e3),this.state=ve(((e,t)=>({is_open:!1}))),e.zustand&&this.set_zustand(e.zustand),e.on_sync_complete?this.on_sync_complete=e.on_sync_complete:this.on_sync_complete=async()=>{},this._responsive=!1,this._last_pong=Date.now()-100*this.PONGDELAY,setInterval((()=>{this.is_open&&this.send({type:"ping"})}),this.PONGDELAY),setInterval((()=>{Date.now()-this._last_pong>3*this.PONGDELAY?this._responsive=!1:this._responsive=!0}),2*this.PONGDELAY);setInterval((()=>{const e=Date.now();for(const t in this.blobChunks)e-this.blobChunks[t].timestamp>this.CHUNK_TIMEOUT&&delete this.blobChunks[t]}),this.CHUNK_TIMEOUT/2)}_receive_pong(){this._last_pong=Date.now(),this._responsive=!0}set_zustand(e){e!==this._zustand&&(this._zustand=e,e.set_worker(this),this._zustand.auto_progress(),this.stepwise_fullsync())}add_hook(e,t){const n=this._hooks.get(e)||[];n.push(t),this._hooks.set(e,n);return()=>{const n=this._hooks.get(e)||[],r=n.indexOf(t);r>=0&&n.splice(r,1)}}async call_hooks(e,t){const n=[];for(const r of this._hooks.get(e)||[]){const e=r({worker:this,data:t});e instanceof Promise&&n.push(e)}await Promise.all(n)}add_ns_event_intercept(e,t){const n=this._ns_event_intercepts.get(e)||[];n.push(t),this._ns_event_intercepts.set(e,n);return()=>{const n=this._ns_event_intercepts.get(e)||[],r=n.indexOf(t);r>=0&&n.splice(r,1)}}async intercept_ns_event(e){let t=e;for(const n of this._ns_event_intercepts.get(e.event)||[])t=await n(t);return t}get is_open(){return this.state.getState().is_open}set is_open(e){this.state.setState({is_open:e})}async stepwise_fullsync(){this._zustand&&this.is_open&&(await this.sync_lib(),await this.sync_external_worker(),await this.sync_funcnodes_plugins(),await this.sync_nodespace(),await this.sync_view_state(),await this.on_sync_complete(this))}async sync_lib(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_library",wait_for_response:!0,retries:2,unique:!0});this._zustand.lib.libstate.getState().set({lib:e})}async sync_external_worker(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_worker_dependencies",wait_for_response:!0,unique:!0});this._zustand.lib.libstate.getState().set({external_worker:e})}async sync_funcnodes_plugins(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_plugin_keys",wait_for_response:!0,unique:!0,kwargs:{type:"react"}});for(const t of e){const e=await this._send_cmd({cmd:"get_plugin",wait_for_response:!0,kwargs:{key:t,type:"react"},unique:!0});if(e.js)for(const t of e.js){const e=document.createElement("script");e.text=atob(t),document.body.appendChild(e)}if(e.css)for(const t of e.css){const e=document.createElement("style");e.innerHTML=atob(t),document.head.appendChild(e)}if(void 0!==e.module){const n=atob(e.module),r=n.length,o=new Uint8Array(r);for(let e=0;e<r;e++)o[e]=n.charCodeAt(e);const i=new Blob([o],{type:"application/javascript"}),a=URL.createObjectURL(i),s=await import(a);URL.revokeObjectURL(a),this._zustand.add_plugin(t,s.default)}}}async sync_view_state(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"view_state",wait_for_response:!0,unique:!0});e.renderoptions&&this._zustand.update_render_options(e.renderoptions);const t=e.nodes;if(t)for(const e in t){const n={};Ie(n,t[e]),this._zustand.on_node_action({type:"update",node:n,id:e,from_remote:!0})}}async sync_nodespace(){if(!this._zustand)return;if(!this.is_open)return;const e=await this._send_cmd({cmd:"get_nodes",kwargs:{with_frontend:!0},wait_for_response:!0,unique:!0});for(const t of e)this._receive_node_added(t);const t=await this._send_cmd({cmd:"get_edges",wait_for_response:!0,unique:!0});for(const e of t)this._receive_edge_added(...e)}async fullsync(){if(!this._zustand)return;if(!this.is_open)return;let e;for(;;)try{e=await this._send_cmd({cmd:"full_state",unique:!0});break}catch(e){this._zustand.logger.error("Error in fullsync",e)}this._zustand.logger.debug("Full state",e),this._zustand.lib.libstate.getState().set({lib:e.backend.lib,external_worker:e.worker_dependencies}),e.view.renderoptions&&this._zustand.update_render_options(e.view.renderoptions);const t=e.view.nodes;for(const n of e.backend.nodes){const e=t[n.id];void 0!==e&&Ie(n,e),this._receive_node_added(n)}for(const t of e.backend.edges)this._receive_edge_added(...t)}async _receive_edge_added(e,t,n,r){this._zustand&&this._zustand.on_edge_action({type:"add",from_remote:!0,src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r})}async trigger_node(e){await this._send_cmd({cmd:"trigger_node",kwargs:{nid:e},wait_for_response:!1})}async add_node(e){const t=await this._send_cmd({cmd:"add_node",kwargs:{id:e}});this._receive_node_added(t)}async remove_node(e){await this._send_cmd({cmd:"remove_node",kwargs:{id:e}})}async _receive_node_added(e){this._zustand&&this._zustand.on_node_action({type:"add",node:e,id:e.id,from_remote:!0})}add_edge({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r,replace:o=!1}){return this._send_cmd({cmd:"add_edge",kwargs:{src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r,replace:o}})}remove_edge({src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r}){return this._send_cmd({cmd:"remove_edge",kwargs:{src_nid:e,src_ioid:t,trg_nid:n,trg_ioid:r}})}async add_external_worker({module:e,cls_module:t,cls_name:n}){return await this._send_cmd({cmd:"add_external_worker",kwargs:{module:e,cls_module:t,cls_name:n}})}sync_local_node_updates(){clearTimeout(this._nodeupdatetimer),this._local_nodeupdates.forEach((async(e,t)=>{const n=await this._send_cmd({cmd:"update_node",kwargs:{nid:t,data:e},wait_for_response:!0});this._zustand&&this._zustand.on_node_action({type:"update",node:n,id:t,from_remote:!0})})),this._local_nodeupdates.clear(),this._nodeupdatetimer=setTimeout((()=>{this.sync_local_node_updates()}),200)}locally_update_node(e){const t=this._local_nodeupdates.get(e.id);if(t){const{new_obj:n,change:r}=Ee(t,e.node);r&&this._local_nodeupdates.set(e.id,n)}else this._local_nodeupdates.set(e.id,e.node);e.immediate&&this.sync_local_node_updates()}async get_remote_node_state(e){const t=await this._send_cmd({cmd:"get_node_state",kwargs:{nid:e},wait_for_response:!0});this._zustand&&this._zustand.on_node_action({type:"update",node:t,id:t.id,from_remote:!0})}set_io_value({nid:e,ioid:t,value:n,set_default:r=!1}){return this._send_cmd({cmd:"set_io_value",kwargs:{nid:e,ioid:t,value:n,set_default:r},wait_for_response:!0})}clear(){return this._send_cmd({cmd:"clear",unique:!0})}save(){return this._send_cmd({cmd:"save",wait_for_response:!0,unique:!0})}load(e){return this._send_cmd({cmd:"load_data",kwargs:{data:e},wait_for_response:!0}).then((()=>{this.stepwise_fullsync()}))}async get_io_value({nid:e,ioid:t}){const n=await this._send_cmd({cmd:"get_io_value",kwargs:{nid:e,ioid:t},wait_for_response:!0});return this._zustand?(this._zustand.on_node_action({type:"update",node:{io:{[t]:{value:n}}},id:e,from_remote:!0}),n):n}async get_ios_values({nid:e}){const t=await this._send_cmd({cmd:"get_ios_values",kwargs:{nid:e},wait_for_response:!0});if(!this._zustand)return t;const n={};for(const e in t)n[e]={value:t[e]};return this._zustand.on_node_action({type:"update",node:{io:n},id:e,from_remote:!0}),t}async get_runstate(){return await this._send_cmd({cmd:"get_runstate",wait_for_response:!0,unique:!0})}async _send_cmd({cmd:e,kwargs:t,as_bytes:n=!1,wait_for_response:r=!0,response_timeout:o=5e3,retries:i=2,unique:a=!1}){const s={type:"cmd",as_bytes:n,cmd:e,kwargs:t||{}};if(await new Promise((async e=>{if(this._responsive)return e();const t=setInterval((()=>{this._responsive&&(clearInterval(t),e())}),100)})),r){if(a&&void 0!==this._unique_cmd_outs[s.cmd])return this._unique_cmd_outs[s.cmd];i<0&&(i=0);const t=async()=>{let t;for(;i>=0;){const n=s.id||kf();s.id=n;const r=new Promise(((t,r)=>{const i=setTimeout((()=>{r("Timeout@wait_for_response for "+e)}),o);this.messagePromises.set(n,{resolve:e=>{clearTimeout(i),t(e),this.messagePromises.delete(n)},reject:e=>{clearTimeout(i),r(e),this.messagePromises.delete(n)}})}));await this.send(s);try{t=await r;break}catch(e){if(0===i)throw delete this._unique_cmd_outs[s.cmd],e;i-=1;continue}}return delete this._unique_cmd_outs[s.cmd],t},n=t();return a&&(this._unique_cmd_outs[s.cmd]=n),n}return this.send(s)}async send(e){throw new Error("async send(data: any) not implemented")}async upload_file({files:e,onProgressCallback:t,root:n}){throw new Error("upload_file not implemented ")}async handle_large_message_hint({}){throw new Error("async handle_large_message_hint({}: LargeMessageHint) not implemented ")}async receive_workerevent({event:e,data:t}){switch(e){case"worker_error":if(!this._zustand)return;return this._zustand.logger.error(t.error);case"update_worker_dependencies":if(!this._zustand)return;return this._zustand.lib.libstate.getState().set({external_worker:t.worker_dependencies});case"lib_update":return void await this.sync_lib();case"fullsync":return void await this.stepwise_fullsync();case"external_worker_update":return await this.sync_lib(),void await this.sync_external_worker();case"starting":return void this.call_hooks("starting");case"stopping":return void this.call_hooks("stopping");default:console.warn("Unhandled worker event",e,t)}}async receive_nodespace_event(e){const{event:t,data:n}=await this.intercept_ns_event(e);switch(t){case"after_set_value":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,io:{[n.io]:{value:n.result}}},id:n.node,from_remote:!0});case"after_update_value_options":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,io:{[n.io]:{value_options:n.result}}},id:n.node,from_remote:!0});case"triggerstart":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!0},id:n.node,from_remote:!0});case"triggerdone":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!1},id:n.node,from_remote:!0});case"triggerfast":if(!this._zustand)return;return this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!0},id:n.node,from_remote:!0}),void setTimeout((()=>{this._zustand&&this._zustand.on_node_action({type:"update",node:{id:n.node,in_trigger:!1},id:n.node,from_remote:!0})}),50);case"node_trigger_error":if(!this._zustand)return;return this._zustand.on_node_action({type:"error",errortype:"trigger",error:n.error,id:n.node,tb:n.tb,from_remote:!0});case"node_removed":if(!this._zustand)return;return this._zustand.on_node_action({type:"delete",id:n.node,from_remote:!0}),void this.call_hooks("node_removed",{node:n.node});case"node_added":return void this._receive_node_added(n.node);case"after_disconnect":case"after_unforward":if(!n.result)return;if(!Array.isArray(n.result))return;if(4!==n.result.length)return;if(!this._zustand)return;return this._zustand.on_edge_action({type:"delete",from_remote:!0,src_nid:n.result[0],src_ioid:n.result[1],trg_nid:n.result[2],trg_ioid:n.result[3]});case"after_connect":case"after_forward":if(!n.result)return;if(!Array.isArray(n.result))return;if(4!==n.result.length)return;return this._receive_edge_added(...n.result);case"after_add_shelf":case"after_remove_shelf":if(!n.result)return;if(!this._zustand)return;return this._zustand.lib.libstate.getState().set({lib:n.result});case"progress":if(!this._zustand)return;if(n.node)return this._zustand.on_node_action({type:"update",node:{id:n.node,progress:n.info},id:n.node,from_remote:!0});console.warn("Unhandled nodepsace event",t,n);break;default:console.warn("Unhandled nodepsace event",t,n)}}async add_lib(e,t){return await this._send_cmd({cmd:"add_package_dependency",kwargs:{name:e,version:t},wait_for_response:!1})}async remove_lib(e){return await this._send_cmd({cmd:"remove_package_dependency",kwargs:{name:e},wait_for_response:!1})}async receive(e){let t;switch(this._last_pong=Date.now(),this._responsive=!0,e.type){case"pong":return void this._receive_pong();case"nsevent":return await this.receive_nodespace_event(e);case"result":if(t=e.id&&this.messagePromises.get(e.id),t)return t.resolve(e.result);break;case"error":if(this.on_error(e.tb+"\n"+e.error),t=e.id&&this.messagePromises.get(e.id),t)return t.reject(e.error);break;case"progress":if(!this._zustand)return;this._zustand.set_progress(e);break;case"workerevent":return await this.receive_workerevent(e);case"large_message":return await this.handle_large_message_hint(e);default:console.warn("Unhandled message",e)}}async onbytes(e){try{const t=new TextDecoder("utf-8").decode(e),n=t.indexOf("\r\n\r\n");if(-1===n)return void console.error("Header terminator not found for:\n",t);const r=t.substring(0,n+4),o=e.slice(n+4),i=r.split(";"),a={};if(i.forEach((e=>{const[t,n]=e.split("=");a[t.trim()]=n.trim()})),!a.chunk||!a.msgid)return void console.error("Header missing required fields chunk or msgid",a);const[s,l]=a.chunk.split("/"),c=a.msgid;if("1"===s&&"1"===l)return this.recieve_bytes(a,o);if(this.blobChunks[c]||(this.blobChunks[c]={chunks:Array.from({length:parseInt(l)},(()=>null)),timestamp:Date.now()}),this.blobChunks[c].chunks.length!==parseInt(l))return void console.error("Total chunks mismatch");if(this.blobChunks[c].chunks[parseInt(s)-1]=e,this.blobChunks[c].chunks.every((e=>null!==e))){const e=new Uint8Array(this.blobChunks[c].chunks.reduce(((e,t)=>e.concat(Array.from(t))),[]));this.recieve_bytes(a,e),delete this.blobChunks[c]}}catch(t){return void console.error("Websocketworker: onbytes error",t,e)}}async recieve_bytes(e,t){const{type:n}=e;if("io_value"===n){if(!this._zustand)return;const{node:n,io:r,preview:o,mime:i}=e,a=o?"value":"fullvalue";n&&r||console.error("Invalid io_value message",e);const s=De({data:t,mime:i||"application/octet-stream"});this._zustand.on_node_action({type:"update",node:{id:n,io:{[r]:{[a]:s}}},id:n,from_remote:!0})}else if("result"==n){const n=e.id&&this.messagePromises.get(e.id);n&&n.resolve({bytes:t,header:e})}else console.warn("Unhandled bytes message",e)}disconnect(){}onclose(){this.is_open=!1,this._zustand&&this._zustand.auto_progress()}async reconnect(){}async stop(){await this._send_cmd({cmd:"stop_worker",wait_for_response:!1});const e=this.onclose.bind(this);this.onclose=()=>{e(),this._zustand&&(this._zustand.worker===this&&this._zustand.clear_all(),this.onclose=e)}}async get_io_full_value({nid:e,ioid:t}){const n=await this._send_cmd({cmd:"get_io_full_value",kwargs:{nid:e,ioid:t},wait_for_response:!0,as_bytes:!0});if(!this._zustand)return n;if(!this._zustand)return;const{header:r,bytes:o}=n,{mime:i}=r,a=De({data:o,mime:i||"application/octet-stream"});return this._zustand.on_node_action({type:"update",node:{id:e,io:{[t]:{fullvalue:a}}},id:e,from_remote:!0}),n}async update_io_options({nid:e,ioid:t,options:n}){const r=await this._send_cmd({cmd:"update_io_options",kwargs:{nid:e,ioid:t,...n},wait_for_response:!0});if(!this._zustand)return r;this._zustand.on_node_action({type:"update",node:{io:{[t]:{...n}}},id:e,from_remote:!0})}async get_node_status(e){return await this._send_cmd({cmd:"get_node_state",kwargs:{nid:e},wait_for_response:!0})}async get_available_modules(){return await this._send_cmd({cmd:"get_available_modules",wait_for_response:!0,unique:!0})}async update_external_worker(e,t,n){return await this._send_cmd({cmd:"update_external_worker",kwargs:{worker_id:e,class_id:t,...n},wait_for_response:!0})}async remove_external_worker(e,t){return await this._send_cmd({cmd:"remove_external_worker",kwargs:{worker_id:e,class_id:t},wait_for_response:!0})}async export({withFiles:e=!1}){return await this._send_cmd({cmd:"export_worker",wait_for_response:!0,kwargs:{with_files:e}})}async update_from_export(e){const t=this.add_hook("node_added",(async({})=>{this._zustand?.center_all()}));try{const t=await this._send_cmd({cmd:"update_from_export",kwargs:{data:e},wait_for_response:!0,response_timeout:6e5,unique:!0});return await new Promise((e=>{setTimeout((()=>{e()}),1e3)})),await this.stepwise_fullsync(),t}finally{t()}}}class Sf extends Cf{constructor(e){super(e),this._websocket=null,this.reconnectAttempts=0,this.maxReconnectAttempts=999,this.initialTimeout=200,this.maxTimeout=5e3,this._reconnect=!0,this._url=e.url,new Promise((e=>{this.connect(),e(null)})),this._zustand&&this._zustand.auto_progress()}connect(){this._zustand?.logger.info("Connecting to websocket"),this.is_open=!1,this._websocket=new WebSocket(this._url),this._websocket.onopen=()=>{this.onopen()},this._websocket.onclose=()=>{this.onclose()},this._websocket.onerror=()=>{this.on_ws_error()},this._websocket.onmessage=e=>{"string"==typeof e.data?this.onmessage(e.data):e.data instanceof Blob&&e.data.arrayBuffer().then((e=>{const t=new Uint8Array(e);this.onbytes(t)}))}}calculateReconnectTimeout(){return Math.min(this.initialTimeout*Math.pow(2,this.reconnectAttempts),this.maxTimeout)}auto_reconnect(){if(this.reconnectAttempts<this.maxReconnectAttempts){let e=this.calculateReconnectTimeout();this._zustand?.logger.info(`Attempting to reconnect in ${e} ms`),setTimeout((()=>{this._websocket&&this._websocket.readyState===WebSocket.OPEN||(this.reconnectAttempts++,this.connect())}),e)}else this._zustand?.logger.warn("Maximum reconnect attempts reached. Giving up.")}async onmessage(e){try{const t=JSON.parse(e);this._zustand?.logger.debug(`Recieved data of length: ${e.length} and data"`,t),await this.receive(t)}catch(t){return void console.error("Websocketworker: onmessage JSON.parse error",t,e)}}get http_protocol(){return this.secure_url?"https":"http"}get secure_url(){return this._url.startsWith("wss")}get url_wo_protocol(){return this._url.substring(this.secure_url?6:5)}get http_url(){var e=this.http_protocol+"://"+this.url_wo_protocol;return"/"!==e[e.length-1]&&(e+="/"),e}get_io_subscription_url({node_id:e,io_id:t,stream:n}){let r=this.http_url+`node/${e}/io/${t}/value`;return n&&(r+="/stream"),r}async upload_file({files:e,onProgressCallback:t,root:n}){const r=`${this.http_url}upload/`,o=new FormData,i=Array.isArray(e)?e:Array.from(e);for(const e of i){const t=e.webkitRelativePath||e.name,r=n?`${n}/${t}`:t;o.append("file",e,r)}try{return(await ef.post(r,o,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:e=>{t&&t(e.loaded,e.total)}})).data.file}catch(e){throw new Error("Failed to upload file")}}async handle_large_message_hint({msg_id:e}){const t=this.http_url+"message/"+e,n=await fetch(t,{method:"GET",headers:{"Content-Type":"application/json","Access-Control-Allow-Origin":"*"}}),r=await n.json();this.receive(r)}onopen(){this._zustand?.logger.info("Websocket opened"),this.is_open=!0,this._zustand&&this._zustand.auto_progress(),this.reconnectAttempts=0,this.stepwise_fullsync()}onclose(){this._zustand?.logger.info("Websocket closed"),super.onclose(),this._reconnect&&(this._zustand?.logger.info("Websocket closed,reconnecting"),this.auto_reconnect())}on_ws_error(){this._zustand?.logger.warn("Websocket error"),this._websocket?this._websocket.close():this.auto_reconnect()}async send_large_message(e){const t=`${this.http_url}message/`;await fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e})}async send(e){if(!this._websocket||this._websocket.readyState!==WebSocket.OPEN)return void this._zustand?.logger.warn("Websocket not connected");const t=JSON.stringify(e);if(new Blob([t]).size>1e6)return this._zustand?.logger.info("Data too large, sending via http"),await this.send_large_message(t);this._zustand?.logger.debug("Sending data",e),this._websocket.send(t)}async stop(){await super.stop(),this._reconnect=!1}close(){this._websocket&&this._websocket.close()}disconnect(){super.disconnect(),this._reconnect=!1,this.close()}async reconnect(){await super.reconnect(),this._reconnect=!0,!this._websocket||(this._zustand?.logger.info("Reconnecting"),this._websocket.readyState!==WebSocket.OPEN&&this._websocket.readyState!==WebSocket.CONNECTING||(this._websocket.readyState===WebSocket.CONNECTING&&await new Promise(((e,t)=>{if(null===this._websocket)return;let n=setTimeout((()=>{t("Timeout@reconnect")}),2e3);this._websocket.addEventListener("open",(()=>{clearTimeout(n),e(null)}),{once:!0}),this._websocket.readyState===WebSocket.OPEN&&(clearTimeout(n),e(null))})),this._websocket.readyState!==WebSocket.OPEN))?this.connect():this.stepwise_fullsync()}}class _f{constructor(e,t){this.ws=null,this.reconnectAttempts=0,this.maxReconnectAttempts=999,this.initialTimeout=200,this.maxTimeout=2e3,this.wsuri=e,this.zustand=t,this.workers={},this.on_setWorker=e=>{this.zustand.set_worker(e)},this.connect()}get open(){return this.ws?.readyState===WebSocket.OPEN}connect(){this.zustand.set_progress({progress:0,message:"connecting to worker manager",status:"info",blocking:!0}),this.zustand.logger.info("Connecting to websocket:",this.wsuri),this.ws=new WebSocket(this.wsuri),this.ws.onopen=()=>{this.onopen()},this.ws.onclose=()=>{this.onclose()},this.ws.onerror=()=>{this.on_ws_error()},this.ws.onmessage=e=>{"string"==typeof e.data?this.onmessage(e.data):console.error("WorkerManager: onmessage event.data is not a string",typeof e.data)},this.connectionTimeout=setTimeout((()=>{this.ws?.readyState!==WebSocket.OPEN&&this.on_ws_error()}),5e3)}on_ws_error(){console.warn("Websocket error"),this.ws?this.ws.close():this.reconnect()}onopen(){this.connectionTimeout&&(clearTimeout(this.connectionTimeout),this.connectionTimeout=void 0),this.zustand.auto_progress(),this.ws&&this.ws.send("worker_status");const e=window.localStorage.getItem("funcnodes__active_worker");e&&this.set_active(e)}onmessage(e){try{let t=JSON.parse(e);if("worker_status"===t.type){const e={};for(let n of t.active)n.active=!0,e[n.uuid]=n;for(let n of t.inactive)n.active=!1,e[n.uuid]=n;return void this.zustand.workers.setState(e)}if("set_worker"===t.type){if("WSWorker"===t.data.type){let e="ws"+(t.data.ssl?"s":"")+"://"+t.data.host+":"+t.data.port;this.setWorker(this.workers[t.data.uuid]||new Sf({url:e,zustand:this.zustand,uuid:t.data.uuid,on_sync_complete:this.zustand.options.on_sync_complete}))}else this.zustand.logger.error("WorkerManager: unknown worker type",t);return}if("progress"===t.type)return void this.zustand.set_progress(t);this.zustand.logger.error("WorkerManager: unknown message",t)}catch(t){return void console.error("WorkerManager: onmessage JSON.parse error",t,e)}}setWorker(e){for(let t in this.workers)t!==e?.uuid&&this.workers[t].disconnect();void 0!==e&&(this.workers[e.uuid]=e,e.reconnect()),window.localStorage.setItem("funcnodes__active_worker",e?.uuid||""),void 0!==this.zustand.worker&&this.zustand.clear_all(),this.zustand.set_worker(e),this.on_setWorker(e)}async restart_worker(e){this.ws?.send(JSON.stringify({type:"restart_worker",workerid:e}))}calculateReconnectTimeout(){return Math.min(this.initialTimeout*Math.pow(2,this.reconnectAttempts),this.maxTimeout)}reconnect(){if(this.reconnectAttempts<this.maxReconnectAttempts){let e=this.calculateReconnectTimeout();this.zustand.logger.info(`Attempting to reconnect in ${e} ms`),setTimeout((()=>{this.ws&&this.ws.readyState===WebSocket.OPEN||(this.reconnectAttempts++,this.connect())}),e)}else this.zustand.logger.warn("Maximum reconnect attempts reached. Giving up.")}onclose(){this.zustand.logger.warn("WorkerManager: onclose"),this.reconnect()}set_active(e){this.ws&&this.ws.send(JSON.stringify({type:"set_active",workerid:e}))}new_worker({name:e,reference:t,copyLib:n,copyNS:r}){e||(e=void 0),n||(n=!1),r||(r=!1),t||(t=void 0,n=!1,r=!1),this.ws&&this.ws.send(JSON.stringify({type:"new_worker",kwargs:{name:e,reference:t,copyLib:n,copyNS:r}}))}}function If(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function Af(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function Nf(...e){return t=>{let n=!1;const r=e.map((e=>{const r=Af(e,t);return n||"function"!=typeof r||(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():Af(e[t],null)}}}}function Of(...t){return e.useCallback(Nf(...t),t)}var Rf,Tf={exports:{}},Mf={};var Pf,Df,jf={};function Bf(){return Pf||(Pf=1,"production"!==Q.env.NODE_ENV&&function(){function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===j?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case C:return"Fragment";case k:return"Portal";case _:return"Profiler";case S:return"StrictMode";case O:return"Suspense";case R:return"SuspenseList"}if("object"==typeof t)switch("number"==typeof t.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case A:return(t.displayName||"Context")+".Provider";case I:return(t._context.displayName||"Context")+".Consumer";case N:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case T:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case M:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(e){t=!0}if(t){var r=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function o(){}function i(e){if(void 0===W)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);W=t&&t[1]||"",H=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+W+e+H}function a(e,t){if(!e||Y)return"";var n=$.get(e);if(void 0!==n)return n;Y=!0,n=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var r;r=B.H,B.H=null,function(){if(0===G){h=console.log,m=console.info,g=console.warn,y=console.error,b=console.group,v=console.groupCollapsed,w=console.groupEnd;var e={configurable:!0,enumerable:!0,value:o,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}G++}();try{var a={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&"function"==typeof n.catch&&n.catch((function(){}))}}catch(e){if(e&&r&&"string"==typeof e.stack)return[e.stack,r.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=a.DetermineComponentFrameRoot(),c=l[0],u=l[1];if(c&&u){var d=c.split("\n"),f=u.split("\n");for(l=s=0;s<d.length&&!d[s].includes("DetermineComponentFrameRoot");)s++;for(;l<f.length&&!f[l].includes("DetermineComponentFrameRoot");)l++;if(s===d.length||l===f.length)for(s=d.length-1,l=f.length-1;1<=s&&0<=l&&d[s]!==f[l];)l--;for(;1<=s&&0<=l;s--,l--)if(d[s]!==f[l]){if(1!==s||1!==l)do{if(s--,0>--l||d[s]!==f[l]){var p="\n"+d[s].replace(" at new "," at ");return e.displayName&&p.includes("<anonymous>")&&(p=p.replace("<anonymous>",e.displayName)),"function"==typeof e&&$.set(e,p),p}}while(1<=s&&0<=l);break}}}finally{Y=!1,B.H=r,function(){if(0==--G){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:z({},e,{value:h}),info:z({},e,{value:m}),warn:z({},e,{value:g}),error:z({},e,{value:y}),group:z({},e,{value:b}),groupCollapsed:z({},e,{value:v}),groupEnd:z({},e,{value:w})})}0>G&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=n}return d=(d=e?e.displayName||e.name:"")?i(d):"","function"==typeof e&&$.set(e,d),d}function s(e){if(null==e)return"";if("function"==typeof e){var t=e.prototype;return a(e,!(!t||!t.isReactComponent))}if("string"==typeof e)return i(e);switch(e){case O:return i("Suspense");case R:return i("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case N:return e=a(e.render,!1);case T:return s(e.type);case M:t=e._payload,e=e._init;try{return s(e(t))}catch(e){}}return""}function l(){var e=B.A;return null===e?null:e.getOwner()}function c(){var t=e(this.type);return U[t]||(U[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(t=this.props.ref)?t:null}function u(t,n,o,i,a,s){if("string"==typeof t||"function"==typeof t||t===C||t===_||t===S||t===O||t===R||t===P||"object"==typeof t&&null!==t&&(t.$$typeof===M||t.$$typeof===T||t.$$typeof===A||t.$$typeof===I||t.$$typeof===N||t.$$typeof===F||void 0!==t.getModuleId)){var u=n.children;if(void 0!==u)if(i)if(V(u)){for(i=0;i<u.length;i++)d(u[i],t);Object.freeze&&Object.freeze(u)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else d(u,t)}else u="",(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),null===t?i="null":V(t)?i="array":void 0!==t&&t.$$typeof===E?(i="<"+(e(t.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):i=typeof t,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",i,u);if(L.call(n,"key")){u=e(t);var f=Object.keys(n).filter((function(e){return"key"!==e}));i=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",J[u+i]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,u,f,u),J[u+i]=!0)}if(u=null,void 0!==o&&(r(o),u=""+o),function(e){if(L.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),u=""+n.key),"key"in n)for(var p in o={},n)"key"!==p&&(o[p]=n[p]);else o=n;return u&&function(e,t){function n(){X||(X=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,"function"==typeof t?t.displayName||t.name||"Unknown":t),function(e,t,n,r,o,i){return n=i.ref,e={$$typeof:E,type:e,key:t,props:i,_owner:o},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:c}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(t,u,s,0,l(),o)}function d(e,t){if("object"==typeof e&&e&&e.$$typeof!==Z)if(V(e))for(var n=0;n<e.length;n++){var r=e[n];f(r)&&p(r,t)}else if(f(e))e._store&&(e._store.validated=1);else if(null===e||"object"!=typeof e?n=null:n="function"==typeof(n=D&&e[D]||e["@@iterator"])?n:null,"function"==typeof n&&n!==e.entries&&(n=n.call(e))!==e)for(;!(e=n.next()).done;)f(e.value)&&p(e.value,t)}function f(e){return"object"==typeof e&&null!==e&&e.$$typeof===E}function p(t,n){if(t._store&&!t._store.validated&&null==t.key&&(t._store.validated=1,n=function(t){var n="",r=l();return r&&(r=e(r.type))&&(n="\n\nCheck the render method of `"+r+"`."),n||(t=e(t))&&(n="\n\nCheck the top-level render call using <"+t+">."),n}(n),!K[n])){K[n]=!0;var r="";t&&null!=t._owner&&t._owner!==l()&&(r=null,"number"==typeof t._owner.tag?r=e(t._owner.type):"string"==typeof t._owner.name&&(r=t._owner.name),r=" It was passed a child from "+r+".");var o=B.getCurrentStack;B.getCurrentStack=function(){var e=s(t.type);return o&&(e+=o()||""),e},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',n,r),B.getCurrentStack=o}}var h,m,g,y,b,v,w,x=t,E=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),A=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),P=Symbol.for("react.offscreen"),D=Symbol.iterator,j=Symbol.for("react.client.reference"),B=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=Object.prototype.hasOwnProperty,z=Object.assign,F=Symbol.for("react.client.reference"),V=Array.isArray,G=0;o.__reactDisabledLog=!0;var W,H,X,Y=!1,$=new("function"==typeof WeakMap?WeakMap:Map),Z=Symbol.for("react.client.reference"),U={},J={},K={};jf.Fragment=C,jf.jsx=function(e,t,n,r,o){return u(e,t,n,!1,0,o)},jf.jsxs=function(e,t,n,r,o){return u(e,t,n,!0,0,o)}}()),jf}var Lf=(Df||(Df=1,"production"===Q.env.NODE_ENV?Tf.exports=function(){if(Rf)return Mf;Rf=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:o,ref:void 0!==n?n:null,props:r}}return Mf.Fragment=t,Mf.jsx=n,Mf.jsxs=n,Mf}():Tf.exports=Bf()),Tf.exports);function zf(t,n=[]){let r=[];const o=()=>{const n=r.map((t=>e.createContext(t)));return function(r){const o=r?.[t]||n;return e.useMemo((()=>({[`__scope${t}`]:{...r,[t]:o}})),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,l=r?.[t]?.[a]||i,c=e.useMemo((()=>s),Object.values(s));return Lf.jsx(l.Provider,{value:c,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const l=s?.[t]?.[a]||i,c=e.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},Ff(o,...n)]}function Ff(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(t){const o=r.reduce(((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]})),{});return e.useMemo((()=>({[`__scope${n.scopeName}`]:o})),[o])}};return r.scopeName=n.scopeName,r}var Vf=Boolean(globalThis?.document)?e.useLayoutEffect:()=>{},Gf=e["useId".toString()]||(()=>{}),Wf=0;function Hf(t){const[n,r]=e.useState(Gf());return Vf((()=>{r((e=>e??String(Wf++)))}),[t]),t||(n?`radix-${n}`:"")}function Xf(t){const n=e.useRef(t);return e.useEffect((()=>{n.current=t})),e.useMemo((()=>(...e)=>n.current?.(...e)),[])}function Yf({prop:t,defaultProp:n,onChange:r=()=>{}}){const[o,i]=function({defaultProp:t,onChange:n}){const r=e.useState(t),[o]=r,i=e.useRef(o),a=Xf(n);return e.useEffect((()=>{i.current!==o&&(a(o),i.current=o)}),[o,i,a]),r}({defaultProp:n,onChange:r}),a=void 0!==t,s=a?t:o,l=Xf(r);return[s,e.useCallback((e=>{if(a){const n="function"==typeof e?e(t):e;n!==t&&l(n)}else i(e)}),[a,t,i,l])]}var $f=e.forwardRef(((t,n)=>{const{children:r,...o}=t,i=e.Children.toArray(r),a=i.find(Jf);if(a){const t=a.props.children,r=i.map((n=>n===a?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n));return Lf.jsx(Zf,{...o,ref:n,children:e.isValidElement(t)?e.cloneElement(t,void 0,r):null})}return Lf.jsx(Zf,{...o,ref:n,children:r})}));$f.displayName="Slot";var Zf=e.forwardRef(((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?Nf(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null}));Zf.displayName="SlotClone";var Uf=({children:e})=>Lf.jsx(Lf.Fragment,{children:e});function Jf(t){return e.isValidElement(t)&&t.type===Uf}var Kf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((t,n)=>{const r=e.forwardRef(((e,t)=>{const{asChild:r,...o}=e,i=r?$f:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),Lf.jsx(i,{...o,ref:t})}));return r.displayName=`Primitive.${n}`,{...t,[n]:r}}),{});function qf(e,t){e&&x.flushSync((()=>e.dispatchEvent(t)))}var Qf,ep="dismissableLayer.update",tp="dismissableLayer.pointerDownOutside",np="dismissableLayer.focusOutside",rp=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),op=e.forwardRef(((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...c}=t,u=e.useContext(rp),[d,f]=e.useState(null),p=d?.ownerDocument??globalThis?.document,[,h]=e.useState({}),m=Of(n,(e=>f(e))),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(y),v=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,x=v>=b,E=function(t,n=globalThis?.document){const r=Xf(t),o=e.useRef(!1),i=e.useRef((()=>{}));return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){let t=function(){sp(tp,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout((()=>{n.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}}),[n,r]),{onPointerDownCapture:()=>o.current=!0}}((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));x&&!n&&(i?.(e),s?.(e),e.defaultPrevented||l?.())}),p),k=function(t,n=globalThis?.document){const r=Xf(t),o=e.useRef(!1);return e.useEffect((()=>{const e=e=>{if(e.target&&!o.current){sp(np,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)}),[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(a?.(e),s?.(e),e.defaultPrevented||l?.())}),p);return function(t,n=globalThis?.document){const r=Xf(t);e.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})}),[r,n])}((e=>{v===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&l&&(e.preventDefault(),l()))}),p),e.useEffect((()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(Qf=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ap(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=Qf)}}),[d,p,r,u]),e.useEffect((()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ap())}),[d,u]),e.useEffect((()=>{const e=()=>h({});return document.addEventListener(ep,e),()=>document.removeEventListener(ep,e)}),[]),Lf.jsx(Kf.div,{...c,ref:m,style:{pointerEvents:w?x?"auto":"none":void 0,...t.style},onFocusCapture:If(t.onFocusCapture,k.onFocusCapture),onBlurCapture:If(t.onBlurCapture,k.onBlurCapture),onPointerDownCapture:If(t.onPointerDownCapture,E.onPointerDownCapture)})}));op.displayName="DismissableLayer";var ip=e.forwardRef(((t,n)=>{const r=e.useContext(rp),o=e.useRef(null),i=Of(n,o);return e.useEffect((()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),Lf.jsx(Kf.div,{...t,ref:i})}));function ap(){const e=new CustomEvent(ep);document.dispatchEvent(e)}function sp(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?qf(o,i):o.dispatchEvent(i)}ip.displayName="DismissableLayerBranch";var lp="focusScope.autoFocusOnMount",cp="focusScope.autoFocusOnUnmount",up={bubbles:!1,cancelable:!0},dp=e.forwardRef(((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[l,c]=e.useState(null),u=Xf(i),d=Xf(a),f=e.useRef(null),p=Of(n,(e=>c(e))),h=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect((()=>{if(o){let e=function(e){if(h.paused||!l)return;const t=e.target;l.contains(t)?f.current=t:mp(f.current,{select:!0})},t=function(e){if(h.paused||!l)return;const t=e.relatedTarget;null!==t&&(l.contains(t)||mp(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&mp(l)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return l&&r.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[o,l,h.paused]),e.useEffect((()=>{if(l){gp.add(h);const t=document.activeElement;if(!l.contains(t)){const n=new CustomEvent(lp,up);l.addEventListener(lp,u),l.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mp(r,{select:t}),document.activeElement!==n)return}((e=fp(l),e.filter((e=>"A"!==e.tagName))),{select:!0}),document.activeElement===t&&mp(l))}return()=>{l.removeEventListener(lp,u),setTimeout((()=>{const e=new CustomEvent(cp,up);l.addEventListener(cp,d),l.dispatchEvent(e),e.defaultPrevented||mp(t??document.body,{select:!0}),l.removeEventListener(cp,d),gp.remove(h)}),0)}}var e}),[l,u,d,h]);const m=e.useCallback((e=>{if(!r&&!o)return;if(h.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=fp(e),n=pp(t,e),r=pp(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&mp(i,{select:!0})):(e.preventDefault(),r&&mp(o,{select:!0})):n===t&&e.preventDefault()}}),[r,o,h.paused]);return Lf.jsx(Kf.div,{tabIndex:-1,...s,ref:p,onKeyDown:m})}));function fp(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pp(e,t){for(const n of e)if(!hp(n,{upTo:t}))return n}function hp(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function mp(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}dp.displayName="FocusScope";var gp=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=yp(e,t),e.unshift(t)},remove(t){e=yp(e,t),e[0]?.resume()}}}();function yp(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var bp=e.forwardRef(((t,n)=>{const{container:r,...o}=t,[i,a]=e.useState(!1);Vf((()=>a(!0)),[]);const s=r||i&&globalThis?.document?.body;return s?E.createPortal(Lf.jsx(Kf.div,{...o,ref:n}),s):null}));bp.displayName="Portal";var vp=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef({}),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[l,c]=function(t,n){return e.useReducer(((e,t)=>n[e][t]??e),t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect((()=>{const e=wp(o.current);a.current="mounted"===l?e:"none"}),[l]),Vf((()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=wp(e);if(t)c("MOUNT");else if("none"===o||"none"===e?.display)c("UNMOUNT");else{c(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}}),[t,c]),Vf((()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=wp(o.current).includes(r.animationName);if(r.target===n&&a&&(c("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout((()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)}))}},s=e=>{e.target===n&&(a.current=wp(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}c("ANIMATION_END")}),[n,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:e.useCallback((e=>{e&&(o.current=getComputedStyle(e)),r(e)}),[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=Of(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function wp(e){return e?.animationName||"none"}vp.displayName="Presence";var xp=0;function Ep(){e.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??kp()),document.body.insertAdjacentElement("beforeend",e[1]??kp()),xp++,()=>{1===xp&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),xp--}}),[])}function kp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Cp=function(){return Cp=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Cp.apply(this,arguments)};function Sp(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function _p(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;var Ip="right-scroll-bar-position",Ap="width-before-scroll-bar";function Np(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Op="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,Rp=new WeakMap;function Tp(e,t){var n,r,o,i=(n=null,r=function(t){return e.forEach((function(e){return Np(e,t)}))},(o=c((function(){return{value:n,callback:r,facade:{get current(){return o.value},set current(e){var t=o.value;t!==e&&(o.value=e,o.callback(e,t))}}}}))[0]).callback=r,o.facade);return Op((function(){var t=Rp.get(i);if(t){var n=new Set(t),r=new Set(e),o=i.current;n.forEach((function(e){r.has(e)||Np(e,null)})),r.forEach((function(e){n.has(e)||Np(e,o)}))}Rp.set(i,e)}),[e]),i}function Mp(e){return e}var Pp=function(t){var n=t.sideCar,r=Sp(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,Cp({},r))};Pp.isSideCarExport=!0;var Dp=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Mp);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}};return o}(null);return t.options=Cp({async:!0,ssr:!1},e),t}(),jp=function(){},Bp=e.forwardRef((function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:jp,onWheelCapture:jp,onTouchMoveCapture:jp}),i=o[0],a=o[1],s=t.forwardProps,l=t.children,c=t.className,u=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,h=t.noIsolation,m=t.inert,g=t.allowPinchZoom,y=t.as,b=void 0===y?"div":y,v=t.gapMode,w=Sp(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,E=Tp([r,n]),k=Cp(Cp({},w),i);return e.createElement(e.Fragment,null,d&&e.createElement(x,{sideCar:Dp,removeScrollBar:u,shards:f,noIsolation:h,inert:m,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:v}),s?e.cloneElement(e.Children.only(l),Cp(Cp({},k),{ref:E})):e.createElement(b,Cp({},k,{className:c,ref:E}),l))}));Bp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Bp.classNames={fullWidth:Ap,zeroRight:Ip};function Lp(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var zp=function(){var e=0,t=null;return{add:function(n){var r;0==e&&(t=Lp())&&(!function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}(t,n),r=t,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Fp=function(){var t,n=(t=zp(),function(n,r){e.useEffect((function(){return t.add(n),function(){t.remove()}}),[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Vp={left:0,top:0,right:0,gap:0},Gp=function(e){return parseInt(e||"",10)||0},Wp=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Vp;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Gp(n),Gp(r),Gp(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Hp=Fp(),Xp="data-scroll-locked",Yp=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Xp,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Ip," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Ap," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(Ip," .").concat(Ip," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Ap," .").concat(Ap," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Xp,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},$p=function(){var e=parseInt(document.body.getAttribute(Xp)||"0",10);return isFinite(e)?e:0},Zp=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect((function(){return document.body.setAttribute(Xp,($p()+1).toString()),function(){var e=$p()-1;e<=0?document.body.removeAttribute(Xp):document.body.setAttribute(Xp,e.toString())}}),[]);var a=e.useMemo((function(){return Wp(i)}),[i]);return e.createElement(Hp,{styles:Yp(a,!n,i,r?"":"!important")})},Up=!1;if("undefined"!=typeof window)try{var Jp=Object.defineProperty({},"passive",{get:function(){return Up=!0,!0}});window.addEventListener("test",Jp,Jp),window.removeEventListener("test",Jp,Jp)}catch(e){Up=!1}var Kp=!!Up&&{passive:!1},qp=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Qp=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),eh(e,r)){var o=th(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},eh=function(e,t){return"v"===e?function(e){return qp(e,"overflowY")}(t):function(e){return qp(e,"overflowX")}(t)},th=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},nh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rh=function(e){return[e.deltaX,e.deltaY]},oh=function(e){return e&&"current"in e?e.current:e},ih=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ah=0,sh=[];function lh(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var ch,uh=(ch=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),i=e.useState(ah++)[0],a=e.useState(Fp)[0],s=e.useRef(t);e.useEffect((function(){s.current=t}),[t]),e.useEffect((function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=_p([t.lockRef.current],(t.shards||[]).map(oh),!0).filter(Boolean);return e.forEach((function(e){return e.classList.add("allow-interactivity-".concat(i))})),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(i))}))}}}),[t.inert,t.lockRef.current,t.shards]);var l=e.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=nh(e),a=r.current,l="deltaX"in e?e.deltaX:a[0]-i[0],c="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(l)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Qp(d,u);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=Qp(d,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(l||c)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,s=t.contains(a),l=!1,c=i>0,u=0,d=0;do{var f=th(e,a),p=f[0],h=f[1]-f[2]-o*p;(p||h)&&eh(e,a)&&(u+=h,d+=p),a=a instanceof ShadowRoot?a.host:a.parentNode}while(!s&&a!==document.body||s&&(t.contains(a)||t===a));return(c&&Math.abs(u)<1||!c&&Math.abs(d)<1)&&(l=!0),l}(p,t,e,"h"===p?l:c)}),[]),c=e.useCallback((function(e){var t=e;if(sh.length&&sh[sh.length-1]===a){var r="deltaY"in t?rh(t):nh(t),o=n.current.filter((function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)}))[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(s.current.shards||[]).map(oh).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?l(t,i[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}}),[]),u=e.useCallback((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o,shadowParent:lh(r)};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),d=e.useCallback((function(e){r.current=nh(e),o.current=void 0}),[]),f=e.useCallback((function(e){u(e.type,rh(e),e.target,l(e,t.lockRef.current))}),[]),p=e.useCallback((function(e){u(e.type,nh(e),e.target,l(e,t.lockRef.current))}),[]);e.useEffect((function(){return sh.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Kp),document.addEventListener("touchmove",c,Kp),document.addEventListener("touchstart",d,Kp),function(){sh=sh.filter((function(e){return e!==a})),document.removeEventListener("wheel",c,Kp),document.removeEventListener("touchmove",c,Kp),document.removeEventListener("touchstart",d,Kp)}}),[]);var h=t.removeScrollBar,m=t.inert;return e.createElement(e.Fragment,null,m?e.createElement(a,{styles:ih(i)}):null,h?e.createElement(Zp,{gapMode:t.gapMode}):null)},Dp.useMedium(ch),Pp),dh=e.forwardRef((function(t,n){return e.createElement(Bp,Cp({},t,{ref:n,sideCar:uh}))}));dh.classNames=Bp.classNames;var fh=new WeakMap,ph=new WeakMap,hh={},mh=0,gh=function(e){return e&&(e.host||gh(e.parentNode))},yh=function(e,t,n,r){var o=function(e,t){return t.map((function(t){if(e.contains(t))return t;var n=gh(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);hh[n]||(hh[n]=new WeakMap);var i=hh[n],a=[],s=new Set,l=new Set(o),c=function(e){e&&!s.has(e)&&(s.add(e),c(e.parentNode))};o.forEach(c);var u=function(e){e&&!l.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,l=(fh.get(e)||0)+1,c=(i.get(e)||0)+1;fh.set(e,l),i.set(e,c),a.push(e),1===l&&o&&ph.set(e,!0),1===c&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return u(t),s.clear(),mh++,function(){a.forEach((function(e){var t=fh.get(e)-1,o=i.get(e)-1;fh.set(e,t),i.set(e,o),t||(ph.has(e)||e.removeAttribute(r),ph.delete(e)),o||e.removeAttribute(n)})),--mh||(fh=new WeakMap,fh=new WeakMap,ph=new WeakMap,hh={})}},bh=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),yh(r,o,n,"aria-hidden")):function(){return null}},vh="Dialog",[wh,xh]=zf(vh),[Eh,kh]=wh(vh),Ch=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,l=e.useRef(null),c=e.useRef(null),[u=!1,d]=Yf({prop:o,defaultProp:i,onChange:a});return Lf.jsx(Eh,{scope:n,triggerRef:l,contentRef:c,contentId:Hf(),titleId:Hf(),descriptionId:Hf(),open:u,onOpenChange:d,onOpenToggle:e.useCallback((()=>d((e=>!e))),[d]),modal:s,children:r})};Ch.displayName=vh;var Sh="DialogTrigger",_h=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=kh(Sh,n),i=Of(t,o.triggerRef);return Lf.jsx(Kf.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xh(o.open),...r,ref:i,onClick:If(e.onClick,o.onOpenToggle)})}));_h.displayName=Sh;var Ih="DialogPortal",[Ah,Nh]=wh(Ih,{forceMount:void 0}),Oh=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=kh(Ih,n);return Lf.jsx(Ah,{scope:n,forceMount:r,children:e.Children.map(o,(e=>Lf.jsx(vp,{present:r||a.open,children:Lf.jsx(bp,{asChild:!0,container:i,children:e})})))})};Oh.displayName=Ih;var Rh="DialogOverlay",Th=e.forwardRef(((e,t)=>{const n=Nh(Rh,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=kh(Rh,e.__scopeDialog);return i.modal?Lf.jsx(vp,{present:r||i.open,children:Lf.jsx(Mh,{...o,ref:t})}):null}));Th.displayName=Rh;var Mh=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=kh(Rh,n);return Lf.jsx(dh,{as:$f,allowPinchZoom:!0,shards:[o.contentRef],children:Lf.jsx(Kf.div,{"data-state":Xh(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),Ph="DialogContent",Dh=e.forwardRef(((e,t)=>{const n=Nh(Ph,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=kh(Ph,e.__scopeDialog);return Lf.jsx(vp,{present:r||i.open,children:i.modal?Lf.jsx(jh,{...o,ref:t}):Lf.jsx(Bh,{...o,ref:t})})}));Dh.displayName=Ph;var jh=e.forwardRef(((t,n)=>{const r=kh(Ph,t.__scopeDialog),o=e.useRef(null),i=Of(n,r.contentRef,o);return e.useEffect((()=>{const e=o.current;if(e)return bh(e)}),[]),Lf.jsx(Lh,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:If(t.onCloseAutoFocus,(e=>{e.preventDefault(),r.triggerRef.current?.focus()})),onPointerDownOutside:If(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:If(t.onFocusOutside,(e=>e.preventDefault()))})})),Bh=e.forwardRef(((t,n)=>{const r=kh(Ph,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return Lf.jsx(Lh,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),Lh=e.forwardRef(((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,l=kh(Ph,r),c=e.useRef(null),u=Of(n,c);return Ep(),Lf.jsxs(Lf.Fragment,{children:[Lf.jsx(dp,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:Lf.jsx(op,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Xh(l.open),...s,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),Lf.jsxs(Lf.Fragment,{children:[Lf.jsx(Uh,{titleId:l.titleId}),Lf.jsx(Jh,{contentRef:c,descriptionId:l.descriptionId})]})]})})),zh="DialogTitle",Fh=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=kh(zh,n);return Lf.jsx(Kf.h2,{id:o.titleId,...r,ref:t})}));Fh.displayName=zh;var Vh="DialogDescription",Gh=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=kh(Vh,n);return Lf.jsx(Kf.p,{id:o.descriptionId,...r,ref:t})}));Gh.displayName=Vh;var Wh="DialogClose",Hh=e.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=kh(Wh,n);return Lf.jsx(Kf.button,{type:"button",...r,ref:t,onClick:If(e.onClick,(()=>o.onOpenChange(!1)))})}));function Xh(e){return e?"open":"closed"}Hh.displayName=Wh;var Yh="DialogTitleWarning",[$h,Zh]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo((()=>o),Object.values(o));return Lf.jsx(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(Yh,{contentName:Ph,titleName:zh,docsSlug:"dialog"}),Uh=({titleId:t})=>{const n=Zh(Yh),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect((()=>{if(t){document.getElementById(t)||console.error(r)}}),[r,t]),null},Jh=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Zh("DialogDescriptionWarning").contentName}}.`;return e.useEffect((()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)||console.warn(r)}}),[r,t,n]),null},Kh=Ch,qh=_h,Qh=Oh,em=Th,tm=Dh,nm=Fh,rm=Gh,om=Hh;
38
11
  /*!
39
12
  * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
40
13
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
41
14
  * Copyright 2024 Fonticons, Inc.
42
15
  */
43
- function zp(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Vp(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Fp(Object(n),!0).forEach((function(t){zp(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fp(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Gp=()=>{};let Hp={},Wp={},Xp=null,$p={mark:Gp,measure:Gp};try{"undefined"!=typeof window&&(Hp=window),"undefined"!=typeof document&&(Wp=document),"undefined"!=typeof MutationObserver&&(Xp=MutationObserver),"undefined"!=typeof performance&&($p=performance)}catch(e){}const{userAgent:Zp=""}=Hp.navigator||{},Yp=Hp,Up=Wp,Jp=Xp,Kp=$p;Yp.document;const qp=!!Up.documentElement&&!!Up.head&&"function"==typeof Up.addEventListener&&"function"==typeof Up.createElement,Qp=~Zp.indexOf("MSIE")||~Zp.indexOf("Trident/");var eh={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},th=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],nh="classic",rh="duotone",oh=[nh,rh,"sharp","sharp-duotone"],ih=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),ah=["fak","fa-kit","fakd","fa-kit-duotone"],sh={fak:"kit","fa-kit":"kit"},lh={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},ch=["fak","fakd"],uh={kit:"fak"},dh={"kit-duotone":"fakd"},fh={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},ph=["fak","fa-kit","fakd","fa-kit-duotone"],hh={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},mh=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],gh=[1,2,3,4,5,6,7,8,9,10],yh=gh.concat([11,12,13,14,15,16,17,18,19,20]),bh=[...Object.keys({classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]}),"solid","regular","light","thin","duotone","brands","2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",fh.GROUP,fh.SWAP_OPACITY,fh.PRIMARY,fh.SECONDARY].concat(gh.map((e=>"".concat(e,"x")))).concat(yh.map((e=>"w-".concat(e))));const vh="___FONT_AWESOME___",wh=16,xh="svg-inline--fa",kh="data-fa-i2svg",Ch="data-fa-pseudo-element",Eh="data-prefix",Sh="data-icon",_h="fontawesome-i2svg",Ih=["HTML","HEAD","STYLE","SCRIPT"],Ah=(()=>{try{return"production"===process.env.NODE_ENV}catch(e){return!1}})();function Nh(e){return new Proxy(e,{get:(e,t)=>t in e?e[t]:e[nh]})}const Oh=Vp({},eh);Oh[nh]=Vp(Vp(Vp(Vp({},{"fa-duotone":"duotone"}),eh[nh]),sh),lh);const Rh=Nh(Oh),Th=Vp({},{classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}});Th[nh]=Vp(Vp(Vp(Vp({},{duotone:"fad"}),Th[nh]),uh),dh);const Mh=Nh(Th),Ph=Vp({},hh);Ph[nh]=Vp(Vp({},Ph[nh]),{fak:"fa-kit"});const Dh=Nh(Ph),jh=Vp({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}});jh[nh]=Vp(Vp({},jh[nh]),{"fa-kit":"fak"}),Nh(jh);const Bh=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,Lh="fa-layers-text",zh=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i;Nh(Vp({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}}));const Fh=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],Vh={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},Gh=["kit",...bh],Hh=Yp.FontAwesomeConfig||{};if(Up&&"function"==typeof Up.querySelector){[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((e=>{let[t,n]=e;const r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=Up.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(t));null!=r&&(Hh[n]=r)}))}const Wh={styleDefault:"solid",familyDefault:nh,cssPrefix:"fa",replacementClass:xh,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};Hh.familyPrefix&&(Hh.cssPrefix=Hh.familyPrefix);const Xh=Vp(Vp({},Wh),Hh);Xh.autoReplaceSvg||(Xh.observeMutations=!1);const $h={};Object.keys(Wh).forEach((e=>{Object.defineProperty($h,e,{enumerable:!0,set:function(t){Xh[e]=t,Zh.forEach((e=>e($h)))},get:function(){return Xh[e]}})})),Object.defineProperty($h,"familyPrefix",{enumerable:!0,set:function(e){Xh.cssPrefix=e,Zh.forEach((e=>e($h)))},get:function(){return Xh.cssPrefix}}),Yp.FontAwesomeConfig=$h;const Zh=[];const Yh=wh,Uh={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function Jh(){let e=12,t="";for(;e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function Kh(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function qh(e){return e.classList?Kh(e.classList):(e.getAttribute("class")||"").split(" ").filter((e=>e))}function Qh(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function em(e){return Object.keys(e||{}).reduce(((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";")),"")}function tm(e){return e.size!==Uh.size||e.x!==Uh.x||e.y!==Uh.y||e.rotate!==Uh.rotate||e.flipX||e.flipY}function nm(){const e="fa",t=xh,n=$h.cssPrefix,r=$h.replacementClass;let o=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 6 Sharp Duotone";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n animation-delay: -1ms;\n animation-duration: 1ms;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}';if(n!==e||r!==t){const i=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");o=o.replace(i,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return o}let rm=!1;function om(){$h.autoAddCss&&!rm&&(!function(e){if(!e||!qp)return;const t=Up.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;const n=Up.head.childNodes;let r=null;for(let e=n.length-1;e>-1;e--){const t=n[e],o=(t.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=t)}Up.head.insertBefore(t,r)}(nm()),rm=!0)}var im={mixout:()=>({dom:{css:nm,insertCss:om}}),hooks:()=>({beforeDOMElementCreation(){om()},beforeI2svg(){om()}})};const am=Yp||{};am[vh]||(am[vh]={}),am[vh].styles||(am[vh].styles={}),am[vh].hooks||(am[vh].hooks={}),am[vh].shims||(am[vh].shims=[]);var sm=am[vh];const lm=[],cm=function(){Up.removeEventListener("DOMContentLoaded",cm),um=1,lm.map((e=>e()))};let um=!1;function dm(e){const{tag:t,attributes:n={},children:r=[]}=e;return"string"==typeof e?Qh(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(((t,n)=>t+"".concat(n,'="').concat(Qh(e[n]),'" ')),"").trim()}(n),">").concat(r.map(dm).join(""),"</").concat(t,">")}function fm(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}qp&&(um=(Up.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Up.readyState),um||Up.addEventListener("DOMContentLoaded",cm));var pm=function(e,t,n,r){var o,i,a,s=Object.keys(e),l=s.length,c=t;for(void 0===n?(o=1,a=e[s[0]]):(o=0,a=n);o<l;o++)a=c(a,e[i=s[o]],i,e);return a};function hm(e){const t=function(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),n--)}else t.push(o)}return t}(e);return 1===t.length?t[0].toString(16):null}function mm(e){return Object.keys(e).reduce(((t,n)=>{const r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t}),{})}function gm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{skipHooks:r=!1}=n,o=mm(t);"function"!=typeof sm.hooks.addPack||r?sm.styles[e]=Vp(Vp({},sm.styles[e]||{}),o):sm.hooks.addPack(e,mm(t)),"fas"===e&&gm("fa",t)}const{styles:ym,shims:bm}=sm,vm=Object.keys(Dh),wm=vm.reduce(((e,t)=>(e[t]=Object.keys(Dh[t]),e)),{});let xm=null,km={},Cm={},Em={},Sm={},_m={};function Im(e,t){const n=t.split("-"),r=n[0],o=n.slice(1).join("-");return r!==e||""===o||function(e){return~Gh.indexOf(e)}(o)?null:o}const Am=()=>{const e=e=>pm(ym,((t,n,r)=>(t[r]=pm(n,e,{}),t)),{});km=e(((e,t,n)=>{if(t[3]&&(e[t[3]]=n),t[2]){t[2].filter((e=>"number"==typeof e)).forEach((t=>{e[t.toString(16)]=n}))}return e})),Cm=e(((e,t,n)=>{if(e[n]=n,t[2]){t[2].filter((e=>"string"==typeof e)).forEach((t=>{e[t]=n}))}return e})),_m=e(((e,t,n)=>{const r=t[2];return e[n]=n,r.forEach((t=>{e[t]=n})),e}));const t="far"in ym||$h.autoFetchSvg,n=pm(bm,((e,n)=>{const r=n[0];let o=n[1];const i=n[2];return"far"!==o||t||(o="fas"),"string"==typeof r&&(e.names[r]={prefix:o,iconName:i}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:o,iconName:i}),e}),{names:{},unicodes:{}});Em=n.names,Sm=n.unicodes,xm=Pm($h.styleDefault,{family:$h.familyDefault})};var Nm;function Om(e,t){return(km[e]||{})[t]}function Rm(e,t){return(_m[e]||{})[t]}function Tm(e){return Em[e]||{prefix:null,iconName:null}}function Mm(){return xm}Nm=e=>{xm=Pm(e.styleDefault,{family:$h.familyDefault})},Zh.push(Nm),Am();function Pm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{family:n=nh}=t,r=Rh[n][e];if(n===rh&&!e)return"fad";const o=Mh[n][e]||Mh[n][r],i=e in sm.styles?e:null;return o||i||null}function Dm(e){return e.sort().filter(((e,t,n)=>n.indexOf(e)===t))}function jm(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{skipLookups:n=!1}=t;let r=null;const o=mh.concat(ph),i=Dm(e.filter((e=>o.includes(e)))),a=Dm(e.filter((e=>!mh.includes(e)))),s=i.filter((e=>(r=e,!th.includes(e)))),[l=null]=s,c=function(e){let t=nh;const n=vm.reduce(((e,t)=>(e[t]="".concat($h.cssPrefix,"-").concat(t),e)),{});return oh.forEach((r=>{(e.includes(n[r])||e.some((e=>wm[r].includes(e))))&&(t=r)})),t}(i),u=Vp(Vp({},function(e){let t=[],n=null;return e.forEach((e=>{const r=Im($h.cssPrefix,e);r?n=r:e&&t.push(e)})),{iconName:n,rest:t}}(a)),{},{prefix:Pm(l,{family:c})});return Vp(Vp(Vp({},u),function(e){const{values:t,family:n,canonical:r,givenPrefix:o="",styles:i={},config:a={}}=e,s=n===rh,l=t.includes("fa-duotone")||t.includes("fad"),c="duotone"===a.familyDefault,u="fad"===r.prefix||"fa-duotone"===r.prefix;!s&&(l||c||u)&&(r.prefix="fad");(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab");if(!r.prefix&&Bm.includes(n)){if(Object.keys(i).find((e=>Lm.includes(e)))||a.autoFetchSvg){const e=ih.get(n).defaultShortPrefixId;r.prefix=e,r.iconName=Rm(r.prefix,r.iconName)||r.iconName}}"fa"!==r.prefix&&"fa"!==o||(r.prefix=Mm()||"fas");return r}({values:e,family:c,styles:ym,config:$h,canonical:u,givenPrefix:r})),function(e,t,n){let{prefix:r,iconName:o}=n;if(e||!r||!o)return{prefix:r,iconName:o};const i="fa"===t?Tm(o):{},a=Rm(r,o);o=i.iconName||a||o,r=i.prefix||r,"far"!==r||ym.far||!ym.fas||$h.autoFetchSvg||(r="fas");return{prefix:r,iconName:o}}(n,r,u))}const Bm=oh.filter((e=>e!==nh||e!==rh)),Lm=Object.keys(hh).filter((e=>e!==nh)).map((e=>Object.keys(hh[e]))).flat();let zm=[],Fm={};const Vm={},Gm=Object.keys(Vm);function Hm(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return(Fm[e]||[]).forEach((e=>{t=e.apply(null,[t,...r])})),t}function Wm(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(Fm[e]||[]).forEach((e=>{e.apply(null,n)}))}function Xm(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return Vm[e]?Vm[e].apply(null,t):void 0}function $m(e){"fa"===e.prefix&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||Mm();if(t)return t=Rm(n,t)||t,fm(Zm.definitions,n,t)||fm(sm.styles,n,t)}const Zm=new class{constructor(){this.definitions={}}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(this._pullDefinitions,{});Object.keys(r).forEach((e=>{this.definitions[e]=Vp(Vp({},this.definitions[e]||{}),r[e]),gm(e,r[e]);const t=Dh[nh][e];t&&gm(t,r[e]),Am()}))}reset(){this.definitions={}}_pullDefinitions(e,t){const n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map((t=>{const{prefix:r,iconName:o,icon:i}=n[t],a=i[2];e[r]||(e[r]={}),a.length>0&&a.forEach((t=>{"string"==typeof t&&(e[r][t]=i)})),e[r][o]=i})),e}},Ym={i2svg:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return qp?(Wm("beforeI2svg",e),Xm("pseudoElements2svg",e),Xm("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:t}=e;var n;!1===$h.autoReplaceSvg&&($h.autoReplaceSvg=!0),$h.observeMutations=!0,n=()=>{Km({autoReplaceSvgRoot:t}),Wm("watch",e)},qp&&(um?setTimeout(n,0):lm.push(n))}},Um={icon:e=>{if(null===e)return null;if("object"==typeof e&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Rm(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){const t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=Pm(e[0]);return{prefix:n,iconName:Rm(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat($h.cssPrefix,"-"))>-1||e.match(Bh))){const t=jm(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||Mm(),iconName:Rm(t.prefix,t.iconName)||t.iconName}}if("string"==typeof e){const t=Mm();return{prefix:t,iconName:Rm(t,e)||e}}}},Jm={noAuto:()=>{$h.autoReplaceSvg=!1,$h.observeMutations=!1,Wm("noAuto")},config:$h,dom:Ym,parse:Um,library:Zm,findIconDefinition:$m,toHtml:dm},Km=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:t=Up}=e;(Object.keys(sm.styles).length>0||$h.autoFetchSvg)&&qp&&$h.autoReplaceSvg&&Jm.dom.i2svg({node:t})};function qm(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map((e=>dm(e)))}}),Object.defineProperty(e,"node",{get:function(){if(!qp)return;const t=Up.createElement("div");return t.innerHTML=e.html,t.children}}),e}function Qm(e){const{icons:{main:t,mask:n},prefix:r,iconName:o,transform:i,symbol:a,title:s,maskId:l,titleId:c,extra:u,watchable:d=!1}=e,{width:f,height:p}=n.found?n:t,h=ch.includes(r),m=[$h.replacementClass,o?"".concat($h.cssPrefix,"-").concat(o):""].filter((e=>-1===u.classes.indexOf(e))).filter((e=>""!==e||!!e)).concat(u.classes).join(" ");let g={children:[],attributes:Vp(Vp({},u.attributes),{},{"data-prefix":r,"data-icon":o,class:m,role:u.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(f," ").concat(p)})};const y=h&&!~u.classes.indexOf("fa-fw")?{width:"".concat(f/p*16*.0625,"em")}:{};d&&(g.attributes[kh]=""),s&&(g.children.push({tag:"title",attributes:{id:g.attributes["aria-labelledby"]||"title-".concat(c||Jh())},children:[s]}),delete g.attributes.title);const b=Vp(Vp({},g),{},{prefix:r,iconName:o,main:t,mask:n,maskId:l,transform:i,symbol:a,styles:Vp(Vp({},y),u.styles)}),{children:v,attributes:w}=n.found&&t.found?Xm("generateAbstractMask",b)||{children:[],attributes:{}}:Xm("generateAbstractIcon",b)||{children:[],attributes:{}};return b.children=v,b.attributes=w,a?function(e){let{prefix:t,iconName:n,children:r,attributes:o,symbol:i}=e;const a=!0===i?"".concat(t,"-").concat($h.cssPrefix,"-").concat(n):i;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:Vp(Vp({},o),{},{id:a}),children:r}]}]}(b):function(e){let{children:t,main:n,mask:r,attributes:o,styles:i,transform:a}=e;if(tm(a)&&n.found&&!r.found){const{width:e,height:t}=n,r={x:e/t/2,y:.5};o.style=em(Vp(Vp({},i),{},{"transform-origin":"".concat(r.x+a.x/16,"em ").concat(r.y+a.y/16,"em")}))}return[{tag:"svg",attributes:o,children:t}]}(b)}function eg(e){const{content:t,width:n,height:r,transform:o,title:i,extra:a,watchable:s=!1}=e,l=Vp(Vp(Vp({},a.attributes),i?{title:i}:{}),{},{class:a.classes.join(" ")});s&&(l[kh]="");const c=Vp({},a.styles);tm(o)&&(c.transform=function(e){let{transform:t,width:n=wh,height:r=wh,startCentered:o=!1}=e,i="";return i+=o&&Qp?"translate(".concat(t.x/Yh-n/2,"em, ").concat(t.y/Yh-r/2,"em) "):o?"translate(calc(-50% + ".concat(t.x/Yh,"em), calc(-50% + ").concat(t.y/Yh,"em)) "):"translate(".concat(t.x/Yh,"em, ").concat(t.y/Yh,"em) "),i+="scale(".concat(t.size/Yh*(t.flipX?-1:1),", ").concat(t.size/Yh*(t.flipY?-1:1),") "),i+="rotate(".concat(t.rotate,"deg) "),i}({transform:o,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);const u=em(c);u.length>0&&(l.style=u);const d=[];return d.push({tag:"span",attributes:l,children:[t]}),i&&d.push({tag:"span",attributes:{class:"sr-only"},children:[i]}),d}const{styles:tg}=sm;function ng(e){const t=e[0],n=e[1],[r]=e.slice(4);let o=null;return o=Array.isArray(r)?{tag:"g",attributes:{class:"".concat($h.cssPrefix,"-").concat(Vh.GROUP)},children:[{tag:"path",attributes:{class:"".concat($h.cssPrefix,"-").concat(Vh.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat($h.cssPrefix,"-").concat(Vh.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:t,height:n,icon:o}}const rg={found:!1,width:512,height:512};function og(e,t){let n=t;return"fa"===t&&null!==$h.styleDefault&&(t=Mm()),new Promise(((r,o)=>{if("fa"===n){const n=Tm(e)||{};e=n.iconName||e,t=n.prefix||t}if(e&&t&&tg[t]&&tg[t][e]){return r(ng(tg[t][e]))}!function(e,t){Ah||$h.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),r(Vp(Vp({},rg),{},{icon:$h.showMissingIcons&&e&&Xm("missingIconAbstract")||{}}))}))}const ig=()=>{},ag=$h.measurePerformance&&Kp&&Kp.mark&&Kp.measure?Kp:{mark:ig,measure:ig},sg='FA "6.7.2"',lg=e=>{ag.mark("".concat(sg," ").concat(e," ends")),ag.measure("".concat(sg," ").concat(e),"".concat(sg," ").concat(e," begins"),"".concat(sg," ").concat(e," ends"))};var cg=e=>(ag.mark("".concat(sg," ").concat(e," begins")),()=>lg(e));const ug=()=>{};function dg(e){return"string"==typeof(e.getAttribute?e.getAttribute(kh):null)}function fg(e){return Up.createElementNS("http://www.w3.org/2000/svg",e)}function pg(e){return Up.createElement(e)}function hg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{ceFn:n=("svg"===e.tag?fg:pg)}=t;if("string"==typeof e)return Up.createTextNode(e);const r=n(e.tag);Object.keys(e.attributes||[]).forEach((function(t){r.setAttribute(t,e.attributes[t])}));return(e.children||[]).forEach((function(e){r.appendChild(hg(e,{ceFn:n}))})),r}const mg={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach((e=>{t.parentNode.insertBefore(hg(e),t)})),null===t.getAttribute(kh)&&$h.keepOriginalSource){let e=Up.createComment(function(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}(t));t.parentNode.replaceChild(e,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~qh(t).indexOf($h.replacementClass))return mg.replace(e);const r=new RegExp("".concat($h.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){const e=n[0].attributes.class.split(" ").reduce(((e,t)=>(t===$h.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e)),{toNode:[],toSvg:[]});n[0].attributes.class=e.toSvg.join(" "),0===e.toNode.length?t.removeAttribute("class"):t.setAttribute("class",e.toNode.join(" "))}const o=n.map((e=>dm(e))).join("\n");t.setAttribute(kh,""),t.innerHTML=o}};function gg(e){e()}function yg(e,t){const n="function"==typeof t?t:ug;if(0===e.length)n();else{let t=gg;"async"===$h.mutateApproach&&(t=Yp.requestAnimationFrame||gg),t((()=>{const t=!0===$h.autoReplaceSvg?mg.replace:mg[$h.autoReplaceSvg]||mg.replace,r=cg("mutate");e.map(t),r(),n()}))}}let bg=!1;function vg(){bg=!0}function wg(){bg=!1}let xg=null;function kg(e){if(!Jp)return;if(!$h.observeMutations)return;const{treeCallback:t=ug,nodeCallback:n=ug,pseudoElementsCallback:r=ug,observeMutationsRoot:o=Up}=e;xg=new Jp((e=>{if(bg)return;const o=Mm();Kh(e).forEach((e=>{if("childList"===e.type&&e.addedNodes.length>0&&!dg(e.addedNodes[0])&&($h.searchPseudoElements&&r(e.target),t(e.target)),"attributes"===e.type&&e.target.parentNode&&$h.searchPseudoElements&&r(e.target.parentNode),"attributes"===e.type&&dg(e.target)&&~Fh.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){const t=e.getAttribute?e.getAttribute(Eh):null,n=e.getAttribute?e.getAttribute(Sh):null;return t&&n}(e.target)){const{prefix:t,iconName:n}=jm(qh(e.target));e.target.setAttribute(Eh,t||o),n&&e.target.setAttribute(Sh,n)}else(function(e){return e&&e.classList&&e.classList.contains&&e.classList.contains($h.replacementClass)})(e.target)&&n(e.target)}))})),qp&&xg.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function Cg(e){const t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=void 0!==e.innerText?e.innerText.trim():"";let o=jm(qh(e));return o.prefix||(o.prefix=Mm()),t&&n&&(o.prefix=t,o.iconName=n),o.iconName&&o.prefix||(o.prefix&&r.length>0&&(o.iconName=function(e,t){return(Cm[e]||{})[t]}(o.prefix,e.innerText)||Om(o.prefix,hm(e.innerText))),!o.iconName&&$h.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(o.iconName=e.firstChild.data)),o}function Eg(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0};const{iconName:n,prefix:r,rest:o}=Cg(e),i=function(e){const t=Kh(e.attributes).reduce(((e,t)=>("class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e)),{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return $h.autoA11y&&(n?t["aria-labelledby"]="".concat($h.replacementClass,"-title-").concat(r||Jh()):(t["aria-hidden"]="true",t.focusable="false")),t}(e),a=Hm("parseNodeAttributes",{},e);let s=t.styleParser?function(e){const t=e.getAttribute("style");let n=[];return t&&(n=t.split(";").reduce(((e,t)=>{const n=t.split(":"),r=n[0],o=n.slice(1);return r&&o.length>0&&(e[r]=o.join(":").trim()),e}),{})),n}(e):[];return Vp({iconName:n,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:r,transform:Uh,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:s,attributes:i}},a)}const{styles:Sg}=sm;function _g(e){const t="nest"===$h.autoReplaceSvg?Eg(e,{styleParser:!1}):Eg(e);return~t.extra.classes.indexOf(Lh)?Xm("generateLayersText",e,t):Xm("generateSvgReplacementMutation",e,t)}function Ig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!qp)return Promise.resolve();const n=Up.documentElement.classList,r=e=>n.add("".concat(_h,"-").concat(e)),o=e=>n.remove("".concat(_h,"-").concat(e)),i=$h.autoFetchSvg?[...ah,...mh]:th.concat(Object.keys(Sg));i.includes("fa")||i.push("fa");const a=[".".concat(Lh,":not([").concat(kh,"])")].concat(i.map((e=>".".concat(e,":not([").concat(kh,"])")))).join(", ");if(0===a.length)return Promise.resolve();let s=[];try{s=Kh(e.querySelectorAll(a))}catch(e){}if(!(s.length>0))return Promise.resolve();r("pending"),o("complete");const l=cg("onTree"),c=s.reduce(((e,t)=>{try{const n=_g(t);n&&e.push(n)}catch(e){Ah||"MissingIcon"===e.name&&console.error(e)}return e}),[]);return new Promise(((e,n)=>{Promise.all(c).then((n=>{yg(n,(()=>{r("active"),r("complete"),o("pending"),"function"==typeof t&&t(),l(),e()}))})).catch((e=>{l(),n(e)}))}))}function Ag(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;_g(e).then((e=>{e&&yg([e],t)}))}function Ng(e){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(t||{}).icon?t:$m(t||{});let{mask:o}=n;return o&&(o=(o||{}).icon?o:$m(o||{})),e(r,Vp(Vp({},n),{},{mask:o}))}}const Og=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:n=Uh,symbol:r=!1,mask:o=null,maskId:i=null,title:a=null,titleId:s=null,classes:l=[],attributes:c={},styles:u={}}=t;if(!e)return;const{prefix:d,iconName:f,icon:p}=e;return qm(Vp({type:"icon"},e),(()=>(Wm("beforeDOMElementCreation",{iconDefinition:e,params:t}),$h.autoA11y&&(a?c["aria-labelledby"]="".concat($h.replacementClass,"-title-").concat(s||Jh()):(c["aria-hidden"]="true",c.focusable="false")),Qm({icons:{main:ng(p),mask:o?ng(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:f,transform:Vp(Vp({},Uh),n),symbol:r,title:a,maskId:i,titleId:s,extra:{attributes:c,styles:u,classes:l}}))))};var Rg={mixout:()=>({icon:Ng(Og)}),hooks:()=>({mutationObserverCallbacks:e=>(e.treeCallback=Ig,e.nodeCallback=Ag,e)}),provides(e){e.i2svg=function(e){const{node:t=Up,callback:n=()=>{}}=e;return Ig(t,n)},e.generateSvgReplacementMutation=function(e,t){const{iconName:n,title:r,titleId:o,prefix:i,transform:a,symbol:s,mask:l,maskId:c,extra:u}=t;return new Promise(((t,d)=>{Promise.all([og(n,i),l.iconName?og(l.iconName,l.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then((l=>{let[d,f]=l;t([e,Qm({icons:{main:d,mask:f},prefix:i,iconName:n,transform:a,symbol:s,maskId:c,title:r,titleId:o,extra:u,watchable:!0})])})).catch(d)}))},e.generateAbstractIcon=function(e){let{children:t,attributes:n,main:r,transform:o,styles:i}=e;const a=em(i);let s;return a.length>0&&(n.style=a),tm(o)&&(s=Xm("generateAbstractTransformGrouping",{main:r,transform:o,containerWidth:r.width,iconWidth:r.width})),t.push(s||r.icon),{children:t,attributes:n}}}},Tg={mixout:()=>({layer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{classes:n=[]}=t;return qm({type:"layer"},(()=>{Wm("beforeDOMElementCreation",{assembler:e,params:t});let r=[];return e((e=>{Array.isArray(e)?e.map((e=>{r=r.concat(e.abstract)})):r=r.concat(e.abstract)})),[{tag:"span",attributes:{class:["".concat($h.cssPrefix,"-layers"),...n].join(" ")},children:r}]}))}})},Mg={mixout:()=>({counter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{title:n=null,classes:r=[],attributes:o={},styles:i={}}=t;return qm({type:"counter",content:e},(()=>(Wm("beforeDOMElementCreation",{content:e,params:t}),function(e){const{content:t,title:n,extra:r}=e,o=Vp(Vp(Vp({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),i=em(r.styles);i.length>0&&(o.style=i);const a=[];return a.push({tag:"span",attributes:o,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}({content:e.toString(),title:n,extra:{attributes:o,styles:i,classes:["".concat($h.cssPrefix,"-layers-counter"),...r]}}))))}})},Pg={mixout:()=>({text(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:n=Uh,title:r=null,classes:o=[],attributes:i={},styles:a={}}=t;return qm({type:"text",content:e},(()=>(Wm("beforeDOMElementCreation",{content:e,params:t}),eg({content:e,transform:Vp(Vp({},Uh),n),title:r,extra:{attributes:i,styles:a,classes:["".concat($h.cssPrefix,"-layers-text"),...o]}}))))}}),provides(e){e.generateLayersText=function(e,t){const{title:n,transform:r,extra:o}=t;let i=null,a=null;if(Qp){const t=parseInt(getComputedStyle(e).fontSize,10),n=e.getBoundingClientRect();i=n.width/t,a=n.height/t}return $h.autoA11y&&!n&&(o.attributes["aria-hidden"]="true"),Promise.resolve([e,eg({content:e.innerHTML,width:i,height:a,transform:r,title:n,extra:o,watchable:!0})])}}};const Dg=new RegExp('"',"ug"),jg=[1105920,1112319],Bg=Vp(Vp(Vp(Vp({},{FontAwesome:{normal:"fas",400:"fas"}}),{"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}}),{"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}}),{"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}}),Lg=Object.keys(Bg).reduce(((e,t)=>(e[t.toLowerCase()]=Bg[t],e)),{}),zg=Object.keys(Lg).reduce(((e,t)=>{const n=Lg[t];return e[t]=n[900]||[...Object.entries(n)][0][1],e}),{});function Fg(e,t){const n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(((r,o)=>{if(null!==e.getAttribute(n))return r();const i=Kh(e.children).filter((e=>e.getAttribute(Ch)===t))[0],a=Yp.getComputedStyle(e,t),s=a.getPropertyValue("font-family"),l=s.match(zh),c=a.getPropertyValue("font-weight"),u=a.getPropertyValue("content");if(i&&!l)return e.removeChild(i),r();if(l&&"none"!==u&&""!==u){const u=a.getPropertyValue("content");let d=function(e,t){const n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),o=isNaN(r)?"normal":r;return(Lg[n]||{})[o]||zg[n]}(s,c);const{value:f,isSecondary:p}=function(e){const t=e.replace(Dg,""),n=function(e,t){const n=e.length;let r,o=e.charCodeAt(t);return o>=55296&&o<=56319&&n>t+1&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?1024*(o-55296)+r-56320+65536:o}(t,0),r=n>=jg[0]&&n<=jg[1],o=2===t.length&&t[0]===t[1];return{value:hm(o?t[0]:t),isSecondary:r||o}}(u),h=l[0].startsWith("FontAwesome");let m=Om(d,f),g=m;if(h){const e=function(e){const t=Sm[e],n=Om("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}(f);e.iconName&&e.prefix&&(m=e.iconName,d=e.prefix)}if(!m||p||i&&i.getAttribute(Eh)===d&&i.getAttribute(Sh)===g)r();else{e.setAttribute(n,g),i&&e.removeChild(i);const a={iconName:null,title:null,titleId:null,prefix:null,transform:Uh,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},{extra:s}=a;s.attributes[Ch]=t,og(m,d).then((o=>{const i=Qm(Vp(Vp({},a),{},{icons:{main:o,mask:{prefix:null,iconName:null,rest:[]}},prefix:d,iconName:g,extra:s,watchable:!0})),l=Up.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(l,e.firstChild):e.appendChild(l),l.outerHTML=i.map((e=>dm(e))).join("\n"),e.removeAttribute(n),r()})).catch(o)}}else r()}))}function Vg(e){return Promise.all([Fg(e,"::before"),Fg(e,"::after")])}function Gg(e){return!(e.parentNode===document.head||~Ih.indexOf(e.tagName.toUpperCase())||e.getAttribute(Ch)||e.parentNode&&"svg"===e.parentNode.tagName)}function Hg(e){if(qp)return new Promise(((t,n)=>{const r=Kh(e.querySelectorAll("*")).filter(Gg).map(Vg),o=cg("searchPseudoElements");vg(),Promise.all(r).then((()=>{o(),wg(),t()})).catch((()=>{o(),wg(),n()}))}))}var Wg={hooks:()=>({mutationObserverCallbacks:e=>(e.pseudoElementsCallback=Hg,e)}),provides(e){e.pseudoElements2svg=function(e){const{node:t=Up}=e;$h.searchPseudoElements&&Hg(t)}}};let Xg=!1;var $g={mixout:()=>({dom:{unwatch(){vg(),Xg=!0}}}),hooks:()=>({bootstrap(){kg(Hm("mutationObserverCallbacks",{}))},noAuto(){xg&&xg.disconnect()},watch(e){const{observeMutationsRoot:t}=e;Xg?wg():kg(Hm("mutationObserverCallbacks",{observeMutationsRoot:t}))}})};const Zg=e=>e.toLowerCase().split(" ").reduce(((e,t)=>{const n=t.toLowerCase().split("-"),r=n[0];let o=n.slice(1).join("-");if(r&&"h"===o)return e.flipX=!0,e;if(r&&"v"===o)return e.flipY=!0,e;if(o=parseFloat(o),isNaN(o))return e;switch(r){case"grow":e.size=e.size+o;break;case"shrink":e.size=e.size-o;break;case"left":e.x=e.x-o;break;case"right":e.x=e.x+o;break;case"up":e.y=e.y-o;break;case"down":e.y=e.y+o;break;case"rotate":e.rotate=e.rotate+o}return e}),{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0});var Yg={mixout:()=>({parse:{transform:e=>Zg(e)}}),hooks:()=>({parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-transform");return n&&(e.transform=Zg(n)),e}}),provides(e){e.generateAbstractTransformGrouping=function(e){let{main:t,transform:n,containerWidth:r,iconWidth:o}=e;const i={transform:"translate(".concat(r/2," 256)")},a="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={outer:i,inner:{transform:"".concat(a," ").concat(s," ").concat(l)},path:{transform:"translate(".concat(o/2*-1," -256)")}};return{tag:"g",attributes:Vp({},c.outer),children:[{tag:"g",attributes:Vp({},c.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:Vp(Vp({},t.icon.attributes),c.path)}]}]}}}};const Ug={x:0,y:0,width:"100%",height:"100%"};function Jg(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}var Kg={hooks:()=>({parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-mask"),r=n?jm(n.split(" ").map((e=>e.trim()))):{prefix:null,iconName:null,rest:[]};return r.prefix||(r.prefix=Mm()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}),provides(e){e.generateAbstractMask=function(e){let{children:t,attributes:n,main:r,mask:o,maskId:i,transform:a}=e;const{width:s,icon:l}=r,{width:c,icon:u}=o,d=function(e){let{transform:t,containerWidth:n,iconWidth:r}=e;const o={transform:"translate(".concat(n/2," 256)")},i="translate(".concat(32*t.x,", ").concat(32*t.y,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)");return{outer:o,inner:{transform:"".concat(i," ").concat(a," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}({transform:a,containerWidth:c,iconWidth:s}),f={tag:"rect",attributes:Vp(Vp({},Ug),{},{fill:"white"})},p=l.children?{children:l.children.map(Jg)}:{},h={tag:"g",attributes:Vp({},d.inner),children:[Jg(Vp({tag:l.tag,attributes:Vp(Vp({},l.attributes),d.path)},p))]},m={tag:"g",attributes:Vp({},d.outer),children:[h]},g="mask-".concat(i||Jh()),y="clip-".concat(i||Jh()),b={tag:"mask",attributes:Vp(Vp({},Ug),{},{id:g,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,m]},v={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:(w=u,"g"===w.tag?w.children:[w])},b]};var w;return t.push(v,{tag:"rect",attributes:Vp({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(g,")")},Ug)}),{children:t,attributes:n}}}},qg={provides(e){let t=!1;Yp.matchMedia&&(t=Yp.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){const e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:Vp(Vp({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});const o=Vp(Vp({},r),{},{attributeName:"opacity"}),i={tag:"circle",attributes:Vp(Vp({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||i.children.push({tag:"animate",attributes:Vp(Vp({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:Vp(Vp({},o),{},{values:"1;0;1;1;0;1;"})}),e.push(i),e.push({tag:"path",attributes:Vp(Vp({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:Vp(Vp({},o),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:Vp(Vp({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:Vp(Vp({},o),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}},Qg={hooks:()=>({parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-symbol"),r=null!==n&&(""===n||n);return e.symbol=r,e}})};!function(e,t){let{mixoutsTo:n}=t;zm=e,Fm={},Object.keys(Vm).forEach((e=>{-1===Gm.indexOf(e)&&delete Vm[e]})),zm.forEach((e=>{const t=e.mixout?e.mixout():{};if(Object.keys(t).forEach((e=>{"function"==typeof t[e]&&(n[e]=t[e]),"object"==typeof t[e]&&Object.keys(t[e]).forEach((r=>{n[e]||(n[e]={}),n[e][r]=t[e][r]}))})),e.hooks){const t=e.hooks();Object.keys(t).forEach((e=>{Fm[e]||(Fm[e]=[]),Fm[e].push(t[e])}))}e.provides&&e.provides(Vm)}))}([im,Rg,Tg,Mg,Pg,Wg,$g,Yg,Kg,qg,Qg],{mixoutsTo:Jm});const ey=Jm.config,ty=Jm.parse,ny=Jm.icon;var ry,oy={exports:{}},iy={exports:{}},ay={};var sy,ly,cy,uy,dy,fy,py,hy,my,gy,yy,by,vy,wy,xy,ky={};
44
- /** @license React v16.13.1
45
- * react-is.development.js
46
- *
47
- * Copyright (c) Facebook, Inc. and its affiliates.
48
- *
49
- * This source code is licensed under the MIT license found in the
50
- * LICENSE file in the root directory of this source tree.
51
- */function Cy(){return ly||(ly=1,"production"===process.env.NODE_ENV?iy.exports=function(){if(ry)return ay;ry=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case h:case p:case a:return e;default:return f}}case n:return f}}}function w(e){return v(e)===c}return ay.AsyncMode=l,ay.ConcurrentMode=c,ay.ContextConsumer=s,ay.ContextProvider=a,ay.Element=t,ay.ForwardRef=u,ay.Fragment=r,ay.Lazy=h,ay.Memo=p,ay.Portal=n,ay.Profiler=i,ay.StrictMode=o,ay.Suspense=d,ay.isAsyncMode=function(e){return w(e)||v(e)===l},ay.isConcurrentMode=w,ay.isContextConsumer=function(e){return v(e)===s},ay.isContextProvider=function(e){return v(e)===a},ay.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ay.isForwardRef=function(e){return v(e)===u},ay.isFragment=function(e){return v(e)===r},ay.isLazy=function(e){return v(e)===h},ay.isMemo=function(e){return v(e)===p},ay.isPortal=function(e){return v(e)===n},ay.isProfiler=function(e){return v(e)===i},ay.isStrictMode=function(e){return v(e)===o},ay.isSuspense=function(e){return v(e)===d},ay.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},ay.typeOf=v,ay}():iy.exports=(sy||(sy=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case d:return m;default:var g=m&&m.$$typeof;switch(g){case s:case u:case h:case p:case a:return g;default:return f}}case n:return f}}}var w=l,x=c,k=s,C=a,E=t,S=u,_=r,I=h,A=p,N=n,O=i,R=o,T=d,M=!1;function P(e){return v(e)===c}ky.AsyncMode=w,ky.ConcurrentMode=x,ky.ContextConsumer=k,ky.ContextProvider=C,ky.Element=E,ky.ForwardRef=S,ky.Fragment=_,ky.Lazy=I,ky.Memo=A,ky.Portal=N,ky.Profiler=O,ky.StrictMode=R,ky.Suspense=T,ky.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||v(e)===l},ky.isConcurrentMode=P,ky.isContextConsumer=function(e){return v(e)===s},ky.isContextProvider=function(e){return v(e)===a},ky.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ky.isForwardRef=function(e){return v(e)===u},ky.isFragment=function(e){return v(e)===r},ky.isLazy=function(e){return v(e)===h},ky.isMemo=function(e){return v(e)===p},ky.isPortal=function(e){return v(e)===n},ky.isProfiler=function(e){return v(e)===i},ky.isStrictMode=function(e){return v(e)===o},ky.isSuspense=function(e){return v(e)===d},ky.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},ky.typeOf=v}()),ky)),iy.exports}
16
+ function im(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function am(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sm(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?am(Object(n),!0).forEach((function(t){im(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):am(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const lm=()=>{};let cm={},um={},dm=null,fm={mark:lm,measure:lm};try{"undefined"!=typeof window&&(cm=window),"undefined"!=typeof document&&(um=document),"undefined"!=typeof MutationObserver&&(dm=MutationObserver),"undefined"!=typeof performance&&(fm=performance)}catch(e){}const{userAgent:pm=""}=cm.navigator||{},hm=cm,mm=um,gm=dm,ym=fm;hm.document;const bm=!!mm.documentElement&&!!mm.head&&"function"==typeof mm.addEventListener&&"function"==typeof mm.createElement,vm=~pm.indexOf("MSIE")||~pm.indexOf("Trident/");var wm={classic:{fa:"solid",fas:"solid","fa-solid":"solid",far:"regular","fa-regular":"regular",fal:"light","fa-light":"light",fat:"thin","fa-thin":"thin",fab:"brands","fa-brands":"brands"},duotone:{fa:"solid",fad:"solid","fa-solid":"solid","fa-duotone":"solid",fadr:"regular","fa-regular":"regular",fadl:"light","fa-light":"light",fadt:"thin","fa-thin":"thin"},sharp:{fa:"solid",fass:"solid","fa-solid":"solid",fasr:"regular","fa-regular":"regular",fasl:"light","fa-light":"light",fast:"thin","fa-thin":"thin"},"sharp-duotone":{fa:"solid",fasds:"solid","fa-solid":"solid",fasdr:"regular","fa-regular":"regular",fasdl:"light","fa-light":"light",fasdt:"thin","fa-thin":"thin"}},xm=["fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone"],Em="classic",km="duotone",Cm=[Em,km,"sharp","sharp-duotone"],Sm=new Map([["classic",{defaultShortPrefixId:"fas",defaultStyleId:"solid",styleIds:["solid","regular","light","thin","brands"],futureStyleIds:[],defaultFontWeight:900}],["sharp",{defaultShortPrefixId:"fass",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["duotone",{defaultShortPrefixId:"fad",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}],["sharp-duotone",{defaultShortPrefixId:"fasds",defaultStyleId:"solid",styleIds:["solid","regular","light","thin"],futureStyleIds:[],defaultFontWeight:900}]]),_m=["fak","fa-kit","fakd","fa-kit-duotone"],Im={fak:"kit","fa-kit":"kit"},Am={fakd:"kit-duotone","fa-kit-duotone":"kit-duotone"},Nm=["fak","fakd"],Om={kit:"fak"},Rm={"kit-duotone":"fakd"},Tm={GROUP:"duotone-group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},Mm=["fak","fa-kit","fakd","fa-kit-duotone"],Pm={classic:{fab:"fa-brands",fad:"fa-duotone",fal:"fa-light",far:"fa-regular",fas:"fa-solid",fat:"fa-thin"},duotone:{fadr:"fa-regular",fadl:"fa-light",fadt:"fa-thin"},sharp:{fass:"fa-solid",fasr:"fa-regular",fasl:"fa-light",fast:"fa-thin"},"sharp-duotone":{fasds:"fa-solid",fasdr:"fa-regular",fasdl:"fa-light",fasdt:"fa-thin"}},Dm=["fa","fas","far","fal","fat","fad","fadr","fadl","fadt","fab","fass","fasr","fasl","fast","fasds","fasdr","fasdl","fasdt","fa-classic","fa-duotone","fa-sharp","fa-sharp-duotone","fa-solid","fa-regular","fa-light","fa-thin","fa-duotone","fa-brands"],jm=[1,2,3,4,5,6,7,8,9,10],Bm=jm.concat([11,12,13,14,15,16,17,18,19,20]),Lm=[...Object.keys({classic:["fas","far","fal","fat","fad"],duotone:["fadr","fadl","fadt"],sharp:["fass","fasr","fasl","fast"],"sharp-duotone":["fasds","fasdr","fasdl","fasdt"]}),"solid","regular","light","thin","duotone","brands","2xs","xs","sm","lg","xl","2xl","beat","border","fade","beat-fade","bounce","flip-both","flip-horizontal","flip-vertical","flip","fw","inverse","layers-counter","layers-text","layers","li","pull-left","pull-right","pulse","rotate-180","rotate-270","rotate-90","rotate-by","shake","spin-pulse","spin-reverse","spin","stack-1x","stack-2x","stack","ul",Tm.GROUP,Tm.SWAP_OPACITY,Tm.PRIMARY,Tm.SECONDARY].concat(jm.map((e=>"".concat(e,"x")))).concat(Bm.map((e=>"w-".concat(e))));const zm="___FONT_AWESOME___",Fm=16,Vm="svg-inline--fa",Gm="data-fa-i2svg",Wm="data-fa-pseudo-element",Hm="data-prefix",Xm="data-icon",Ym="fontawesome-i2svg",$m=["HTML","HEAD","STYLE","SCRIPT"],Zm=(()=>{try{return"production"===process.env.NODE_ENV}catch(e){return!1}})();function Um(e){return new Proxy(e,{get:(e,t)=>t in e?e[t]:e[Em]})}const Jm=sm({},wm);Jm[Em]=sm(sm(sm(sm({},{"fa-duotone":"duotone"}),wm[Em]),Im),Am);const Km=Um(Jm),qm=sm({},{classic:{solid:"fas",regular:"far",light:"fal",thin:"fat",brands:"fab"},duotone:{solid:"fad",regular:"fadr",light:"fadl",thin:"fadt"},sharp:{solid:"fass",regular:"fasr",light:"fasl",thin:"fast"},"sharp-duotone":{solid:"fasds",regular:"fasdr",light:"fasdl",thin:"fasdt"}});qm[Em]=sm(sm(sm(sm({},{duotone:"fad"}),qm[Em]),Om),Rm);const Qm=Um(qm),eg=sm({},Pm);eg[Em]=sm(sm({},eg[Em]),{fak:"fa-kit"});const tg=Um(eg),ng=sm({},{classic:{"fa-brands":"fab","fa-duotone":"fad","fa-light":"fal","fa-regular":"far","fa-solid":"fas","fa-thin":"fat"},duotone:{"fa-regular":"fadr","fa-light":"fadl","fa-thin":"fadt"},sharp:{"fa-solid":"fass","fa-regular":"fasr","fa-light":"fasl","fa-thin":"fast"},"sharp-duotone":{"fa-solid":"fasds","fa-regular":"fasdr","fa-light":"fasdl","fa-thin":"fasdt"}});ng[Em]=sm(sm({},ng[Em]),{"fa-kit":"fak"}),Um(ng);const rg=/fa(s|r|l|t|d|dr|dl|dt|b|k|kd|ss|sr|sl|st|sds|sdr|sdl|sdt)?[\-\ ]/,og="fa-layers-text",ig=/Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp Duotone|Sharp|Kit)?.*/i;Um(sm({},{classic:{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},duotone:{900:"fad",400:"fadr",300:"fadl",100:"fadt"},sharp:{900:"fass",400:"fasr",300:"fasl",100:"fast"},"sharp-duotone":{900:"fasds",400:"fasdr",300:"fasdl",100:"fasdt"}}));const ag=["class","data-prefix","data-icon","data-fa-transform","data-fa-mask"],sg={GROUP:"duotone-group",PRIMARY:"primary",SECONDARY:"secondary"},lg=["kit",...Lm],cg=hm.FontAwesomeConfig||{};if(mm&&"function"==typeof mm.querySelector){[["data-family-prefix","familyPrefix"],["data-css-prefix","cssPrefix"],["data-family-default","familyDefault"],["data-style-default","styleDefault"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]].forEach((e=>{let[t,n]=e;const r=function(e){return""===e||"false"!==e&&("true"===e||e)}(function(e){var t=mm.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}(t));null!=r&&(cg[n]=r)}))}const ug={styleDefault:"solid",familyDefault:Em,cssPrefix:"fa",replacementClass:Vm,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0};cg.familyPrefix&&(cg.cssPrefix=cg.familyPrefix);const dg=sm(sm({},ug),cg);dg.autoReplaceSvg||(dg.observeMutations=!1);const fg={};Object.keys(ug).forEach((e=>{Object.defineProperty(fg,e,{enumerable:!0,set:function(t){dg[e]=t,pg.forEach((e=>e(fg)))},get:function(){return dg[e]}})})),Object.defineProperty(fg,"familyPrefix",{enumerable:!0,set:function(e){dg.cssPrefix=e,pg.forEach((e=>e(fg)))},get:function(){return dg.cssPrefix}}),hm.FontAwesomeConfig=fg;const pg=[];const hg=Fm,mg={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function gg(){let e=12,t="";for(;e-- >0;)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[62*Math.random()|0];return t}function yg(e){const t=[];for(let n=(e||[]).length>>>0;n--;)t[n]=e[n];return t}function bg(e){return e.classList?yg(e.classList):(e.getAttribute("class")||"").split(" ").filter((e=>e))}function vg(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function wg(e){return Object.keys(e||{}).reduce(((t,n)=>t+"".concat(n,": ").concat(e[n].trim(),";")),"")}function xg(e){return e.size!==mg.size||e.x!==mg.x||e.y!==mg.y||e.rotate!==mg.rotate||e.flipX||e.flipY}function Eg(){const e="fa",t=Vm,n=fg.cssPrefix,r=fg.replacementClass;let o=':root, :host {\n --fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free";\n --fa-font-regular: normal 400 1em/1 "Font Awesome 6 Free";\n --fa-font-light: normal 300 1em/1 "Font Awesome 6 Pro";\n --fa-font-thin: normal 100 1em/1 "Font Awesome 6 Pro";\n --fa-font-duotone: normal 900 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-regular: normal 400 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-light: normal 300 1em/1 "Font Awesome 6 Duotone";\n --fa-font-duotone-thin: normal 100 1em/1 "Font Awesome 6 Duotone";\n --fa-font-brands: normal 400 1em/1 "Font Awesome 6 Brands";\n --fa-font-sharp-solid: normal 900 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-regular: normal 400 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-light: normal 300 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-thin: normal 100 1em/1 "Font Awesome 6 Sharp";\n --fa-font-sharp-duotone-solid: normal 900 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-regular: normal 400 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-light: normal 300 1em/1 "Font Awesome 6 Sharp Duotone";\n --fa-font-sharp-duotone-thin: normal 100 1em/1 "Font Awesome 6 Sharp Duotone";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-width, 1.25em);\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n transform-origin: center center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-counter-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n transform: scale(var(--fa-layers-scale, 0.25));\n transform-origin: top left;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(-1 * var(--fa-li-width, 2em));\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n animation-name: fa-beat;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n animation-name: fa-bounce;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n animation-name: fa-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n animation-name: fa-beat-fade;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n animation-name: fa-flip;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n animation-name: fa-shake;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n animation-name: fa-spin;\n animation-delay: var(--fa-animation-delay, 0s);\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 2s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n animation-name: fa-spin;\n animation-direction: var(--fa-animation-direction, normal);\n animation-duration: var(--fa-animation-duration, 1s);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n animation-delay: -1ms;\n animation-duration: 1ms;\n animation-iteration-count: 1;\n transition-delay: 0s;\n transition-duration: 0s;\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n transform: scale(1);\n }\n 45% {\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-bounce {\n 0% {\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-flip {\n 50% {\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-shake {\n 0% {\n transform: rotate(-15deg);\n }\n 4% {\n transform: rotate(15deg);\n }\n 8%, 24% {\n transform: rotate(-18deg);\n }\n 12%, 28% {\n transform: rotate(18deg);\n }\n 16% {\n transform: rotate(-22deg);\n }\n 20% {\n transform: rotate(22deg);\n }\n 32% {\n transform: rotate(-12deg);\n }\n 36% {\n transform: rotate(12deg);\n }\n 40%, 100% {\n transform: rotate(0deg);\n }\n}\n@keyframes fa-spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n transform: rotate(var(--fa-rotate-angle, 0));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n z-index: var(--fa-stack-z-index, auto);\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}';if(n!==e||r!==t){const i=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");o=o.replace(i,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return o}let kg=!1;function Cg(){fg.autoAddCss&&!kg&&(!function(e){if(!e||!bm)return;const t=mm.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;const n=mm.head.childNodes;let r=null;for(let e=n.length-1;e>-1;e--){const t=n[e],o=(t.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(o)>-1&&(r=t)}mm.head.insertBefore(t,r)}(Eg()),kg=!0)}var Sg={mixout:()=>({dom:{css:Eg,insertCss:Cg}}),hooks:()=>({beforeDOMElementCreation(){Cg()},beforeI2svg(){Cg()}})};const _g=hm||{};_g[zm]||(_g[zm]={}),_g[zm].styles||(_g[zm].styles={}),_g[zm].hooks||(_g[zm].hooks={}),_g[zm].shims||(_g[zm].shims=[]);var Ig=_g[zm];const Ag=[],Ng=function(){mm.removeEventListener("DOMContentLoaded",Ng),Og=1,Ag.map((e=>e()))};let Og=!1;function Rg(e){const{tag:t,attributes:n={},children:r=[]}=e;return"string"==typeof e?vg(e):"<".concat(t," ").concat(function(e){return Object.keys(e||{}).reduce(((t,n)=>t+"".concat(n,'="').concat(vg(e[n]),'" ')),"").trim()}(n),">").concat(r.map(Rg).join(""),"</").concat(t,">")}function Tg(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}bm&&(Og=(mm.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(mm.readyState),Og||mm.addEventListener("DOMContentLoaded",Ng));var Mg=function(e,t,n,r){var o,i,a,s=Object.keys(e),l=s.length,c=t;for(void 0===n?(o=1,a=e[s[0]]):(o=0,a=n);o<l;o++)a=c(a,e[i=s[o]],i,e);return a};function Pg(e){const t=function(e){const t=[];let n=0;const r=e.length;for(;n<r;){const o=e.charCodeAt(n++);if(o>=55296&&o<=56319&&n<r){const r=e.charCodeAt(n++);56320==(64512&r)?t.push(((1023&o)<<10)+(1023&r)+65536):(t.push(o),n--)}else t.push(o)}return t}(e);return 1===t.length?t[0].toString(16):null}function Dg(e){return Object.keys(e).reduce(((t,n)=>{const r=e[n];return!!r.icon?t[r.iconName]=r.icon:t[n]=r,t}),{})}function jg(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{skipHooks:r=!1}=n,o=Dg(t);"function"!=typeof Ig.hooks.addPack||r?Ig.styles[e]=sm(sm({},Ig.styles[e]||{}),o):Ig.hooks.addPack(e,Dg(t)),"fas"===e&&jg("fa",t)}const{styles:Bg,shims:Lg}=Ig,zg=Object.keys(tg),Fg=zg.reduce(((e,t)=>(e[t]=Object.keys(tg[t]),e)),{});let Vg=null,Gg={},Wg={},Hg={},Xg={},Yg={};function $g(e,t){const n=t.split("-"),r=n[0],o=n.slice(1).join("-");return r!==e||""===o||function(e){return~lg.indexOf(e)}(o)?null:o}const Zg=()=>{const e=e=>Mg(Bg,((t,n,r)=>(t[r]=Mg(n,e,{}),t)),{});Gg=e(((e,t,n)=>{if(t[3]&&(e[t[3]]=n),t[2]){t[2].filter((e=>"number"==typeof e)).forEach((t=>{e[t.toString(16)]=n}))}return e})),Wg=e(((e,t,n)=>{if(e[n]=n,t[2]){t[2].filter((e=>"string"==typeof e)).forEach((t=>{e[t]=n}))}return e})),Yg=e(((e,t,n)=>{const r=t[2];return e[n]=n,r.forEach((t=>{e[t]=n})),e}));const t="far"in Bg||fg.autoFetchSvg,n=Mg(Lg,((e,n)=>{const r=n[0];let o=n[1];const i=n[2];return"far"!==o||t||(o="fas"),"string"==typeof r&&(e.names[r]={prefix:o,iconName:i}),"number"==typeof r&&(e.unicodes[r.toString(16)]={prefix:o,iconName:i}),e}),{names:{},unicodes:{}});Hg=n.names,Xg=n.unicodes,Vg=ey(fg.styleDefault,{family:fg.familyDefault})};var Ug;function Jg(e,t){return(Gg[e]||{})[t]}function Kg(e,t){return(Yg[e]||{})[t]}function qg(e){return Hg[e]||{prefix:null,iconName:null}}function Qg(){return Vg}Ug=e=>{Vg=ey(e.styleDefault,{family:fg.familyDefault})},pg.push(Ug),Zg();function ey(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{family:n=Em}=t,r=Km[n][e];if(n===km&&!e)return"fad";const o=Qm[n][e]||Qm[n][r],i=e in Ig.styles?e:null;return o||i||null}function ty(e){return e.sort().filter(((e,t,n)=>n.indexOf(e)===t))}function ny(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{skipLookups:n=!1}=t;let r=null;const o=Dm.concat(Mm),i=ty(e.filter((e=>o.includes(e)))),a=ty(e.filter((e=>!Dm.includes(e)))),s=i.filter((e=>(r=e,!xm.includes(e)))),[l=null]=s,c=function(e){let t=Em;const n=zg.reduce(((e,t)=>(e[t]="".concat(fg.cssPrefix,"-").concat(t),e)),{});return Cm.forEach((r=>{(e.includes(n[r])||e.some((e=>Fg[r].includes(e))))&&(t=r)})),t}(i),u=sm(sm({},function(e){let t=[],n=null;return e.forEach((e=>{const r=$g(fg.cssPrefix,e);r?n=r:e&&t.push(e)})),{iconName:n,rest:t}}(a)),{},{prefix:ey(l,{family:c})});return sm(sm(sm({},u),function(e){const{values:t,family:n,canonical:r,givenPrefix:o="",styles:i={},config:a={}}=e,s=n===km,l=t.includes("fa-duotone")||t.includes("fad"),c="duotone"===a.familyDefault,u="fad"===r.prefix||"fa-duotone"===r.prefix;!s&&(l||c||u)&&(r.prefix="fad");(t.includes("fa-brands")||t.includes("fab"))&&(r.prefix="fab");if(!r.prefix&&ry.includes(n)){if(Object.keys(i).find((e=>oy.includes(e)))||a.autoFetchSvg){const e=Sm.get(n).defaultShortPrefixId;r.prefix=e,r.iconName=Kg(r.prefix,r.iconName)||r.iconName}}"fa"!==r.prefix&&"fa"!==o||(r.prefix=Qg()||"fas");return r}({values:e,family:c,styles:Bg,config:fg,canonical:u,givenPrefix:r})),function(e,t,n){let{prefix:r,iconName:o}=n;if(e||!r||!o)return{prefix:r,iconName:o};const i="fa"===t?qg(o):{},a=Kg(r,o);o=i.iconName||a||o,r=i.prefix||r,"far"!==r||Bg.far||!Bg.fas||fg.autoFetchSvg||(r="fas");return{prefix:r,iconName:o}}(n,r,u))}const ry=Cm.filter((e=>e!==Em||e!==km)),oy=Object.keys(Pm).filter((e=>e!==Em)).map((e=>Object.keys(Pm[e]))).flat();let iy=[],ay={};const sy={},ly=Object.keys(sy);function cy(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return(ay[e]||[]).forEach((e=>{t=e.apply(null,[t,...r])})),t}function uy(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(ay[e]||[]).forEach((e=>{e.apply(null,n)}))}function dy(){const e=arguments[0],t=Array.prototype.slice.call(arguments,1);return sy[e]?sy[e].apply(null,t):void 0}function fy(e){"fa"===e.prefix&&(e.prefix="fas");let{iconName:t}=e;const n=e.prefix||Qg();if(t)return t=Kg(n,t)||t,Tg(py.definitions,n,t)||Tg(Ig.styles,n,t)}const py=new class{constructor(){this.definitions={}}add(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce(this._pullDefinitions,{});Object.keys(r).forEach((e=>{this.definitions[e]=sm(sm({},this.definitions[e]||{}),r[e]),jg(e,r[e]);const t=tg[Em][e];t&&jg(t,r[e]),Zg()}))}reset(){this.definitions={}}_pullDefinitions(e,t){const n=t.prefix&&t.iconName&&t.icon?{0:t}:t;return Object.keys(n).map((t=>{const{prefix:r,iconName:o,icon:i}=n[t],a=i[2];e[r]||(e[r]={}),a.length>0&&a.forEach((t=>{"string"==typeof t&&(e[r][t]=i)})),e[r][o]=i})),e}},hy={i2svg:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return bm?(uy("beforeI2svg",e),dy("pseudoElements2svg",e),dy("i2svg",e)):Promise.reject(new Error("Operation requires a DOM of some kind."))},watch:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:t}=e;var n;!1===fg.autoReplaceSvg&&(fg.autoReplaceSvg=!0),fg.observeMutations=!0,n=()=>{yy({autoReplaceSvgRoot:t}),uy("watch",e)},bm&&(Og?setTimeout(n,0):Ag.push(n))}},my={icon:e=>{if(null===e)return null;if("object"==typeof e&&e.prefix&&e.iconName)return{prefix:e.prefix,iconName:Kg(e.prefix,e.iconName)||e.iconName};if(Array.isArray(e)&&2===e.length){const t=0===e[1].indexOf("fa-")?e[1].slice(3):e[1],n=ey(e[0]);return{prefix:n,iconName:Kg(n,t)||t}}if("string"==typeof e&&(e.indexOf("".concat(fg.cssPrefix,"-"))>-1||e.match(rg))){const t=ny(e.split(" "),{skipLookups:!0});return{prefix:t.prefix||Qg(),iconName:Kg(t.prefix,t.iconName)||t.iconName}}if("string"==typeof e){const t=Qg();return{prefix:t,iconName:Kg(t,e)||e}}}},gy={noAuto:()=>{fg.autoReplaceSvg=!1,fg.observeMutations=!1,uy("noAuto")},config:fg,dom:hy,parse:my,library:py,findIconDefinition:fy,toHtml:Rg},yy=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{autoReplaceSvgRoot:t=mm}=e;(Object.keys(Ig.styles).length>0||fg.autoFetchSvg)&&bm&&fg.autoReplaceSvg&&gy.dom.i2svg({node:t})};function by(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map((e=>Rg(e)))}}),Object.defineProperty(e,"node",{get:function(){if(!bm)return;const t=mm.createElement("div");return t.innerHTML=e.html,t.children}}),e}function vy(e){const{icons:{main:t,mask:n},prefix:r,iconName:o,transform:i,symbol:a,title:s,maskId:l,titleId:c,extra:u,watchable:d=!1}=e,{width:f,height:p}=n.found?n:t,h=Nm.includes(r),m=[fg.replacementClass,o?"".concat(fg.cssPrefix,"-").concat(o):""].filter((e=>-1===u.classes.indexOf(e))).filter((e=>""!==e||!!e)).concat(u.classes).join(" ");let g={children:[],attributes:sm(sm({},u.attributes),{},{"data-prefix":r,"data-icon":o,class:m,role:u.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(f," ").concat(p)})};const y=h&&!~u.classes.indexOf("fa-fw")?{width:"".concat(f/p*16*.0625,"em")}:{};d&&(g.attributes[Gm]=""),s&&(g.children.push({tag:"title",attributes:{id:g.attributes["aria-labelledby"]||"title-".concat(c||gg())},children:[s]}),delete g.attributes.title);const b=sm(sm({},g),{},{prefix:r,iconName:o,main:t,mask:n,maskId:l,transform:i,symbol:a,styles:sm(sm({},y),u.styles)}),{children:v,attributes:w}=n.found&&t.found?dy("generateAbstractMask",b)||{children:[],attributes:{}}:dy("generateAbstractIcon",b)||{children:[],attributes:{}};return b.children=v,b.attributes=w,a?function(e){let{prefix:t,iconName:n,children:r,attributes:o,symbol:i}=e;const a=!0===i?"".concat(t,"-").concat(fg.cssPrefix,"-").concat(n):i;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:sm(sm({},o),{},{id:a}),children:r}]}]}(b):function(e){let{children:t,main:n,mask:r,attributes:o,styles:i,transform:a}=e;if(xg(a)&&n.found&&!r.found){const{width:e,height:t}=n,r={x:e/t/2,y:.5};o.style=wg(sm(sm({},i),{},{"transform-origin":"".concat(r.x+a.x/16,"em ").concat(r.y+a.y/16,"em")}))}return[{tag:"svg",attributes:o,children:t}]}(b)}function wy(e){const{content:t,width:n,height:r,transform:o,title:i,extra:a,watchable:s=!1}=e,l=sm(sm(sm({},a.attributes),i?{title:i}:{}),{},{class:a.classes.join(" ")});s&&(l[Gm]="");const c=sm({},a.styles);xg(o)&&(c.transform=function(e){let{transform:t,width:n=Fm,height:r=Fm,startCentered:o=!1}=e,i="";return i+=o&&vm?"translate(".concat(t.x/hg-n/2,"em, ").concat(t.y/hg-r/2,"em) "):o?"translate(calc(-50% + ".concat(t.x/hg,"em), calc(-50% + ").concat(t.y/hg,"em)) "):"translate(".concat(t.x/hg,"em, ").concat(t.y/hg,"em) "),i+="scale(".concat(t.size/hg*(t.flipX?-1:1),", ").concat(t.size/hg*(t.flipY?-1:1),") "),i+="rotate(".concat(t.rotate,"deg) "),i}({transform:o,startCentered:!0,width:n,height:r}),c["-webkit-transform"]=c.transform);const u=wg(c);u.length>0&&(l.style=u);const d=[];return d.push({tag:"span",attributes:l,children:[t]}),i&&d.push({tag:"span",attributes:{class:"sr-only"},children:[i]}),d}const{styles:xy}=Ig;function Ey(e){const t=e[0],n=e[1],[r]=e.slice(4);let o=null;return o=Array.isArray(r)?{tag:"g",attributes:{class:"".concat(fg.cssPrefix,"-").concat(sg.GROUP)},children:[{tag:"path",attributes:{class:"".concat(fg.cssPrefix,"-").concat(sg.SECONDARY),fill:"currentColor",d:r[0]}},{tag:"path",attributes:{class:"".concat(fg.cssPrefix,"-").concat(sg.PRIMARY),fill:"currentColor",d:r[1]}}]}:{tag:"path",attributes:{fill:"currentColor",d:r}},{found:!0,width:t,height:n,icon:o}}const ky={found:!1,width:512,height:512};function Cy(e,t){let n=t;return"fa"===t&&null!==fg.styleDefault&&(t=Qg()),new Promise(((r,o)=>{if("fa"===n){const n=qg(e)||{};e=n.iconName||e,t=n.prefix||t}if(e&&t&&xy[t]&&xy[t][e]){return r(Ey(xy[t][e]))}!function(e,t){Zm||fg.showMissingIcons||!e||console.error('Icon with name "'.concat(e,'" and prefix "').concat(t,'" is missing.'))}(e,t),r(sm(sm({},ky),{},{icon:fg.showMissingIcons&&e&&dy("missingIconAbstract")||{}}))}))}const Sy=()=>{},_y=fg.measurePerformance&&ym&&ym.mark&&ym.measure?ym:{mark:Sy,measure:Sy},Iy='FA "6.7.2"',Ay=e=>{_y.mark("".concat(Iy," ").concat(e," ends")),_y.measure("".concat(Iy," ").concat(e),"".concat(Iy," ").concat(e," begins"),"".concat(Iy," ").concat(e," ends"))};var Ny=e=>(_y.mark("".concat(Iy," ").concat(e," begins")),()=>Ay(e));const Oy=()=>{};function Ry(e){return"string"==typeof(e.getAttribute?e.getAttribute(Gm):null)}function Ty(e){return mm.createElementNS("http://www.w3.org/2000/svg",e)}function My(e){return mm.createElement(e)}function Py(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{ceFn:n=("svg"===e.tag?Ty:My)}=t;if("string"==typeof e)return mm.createTextNode(e);const r=n(e.tag);Object.keys(e.attributes||[]).forEach((function(t){r.setAttribute(t,e.attributes[t])}));return(e.children||[]).forEach((function(e){r.appendChild(Py(e,{ceFn:n}))})),r}const Dy={replace:function(e){const t=e[0];if(t.parentNode)if(e[1].forEach((e=>{t.parentNode.insertBefore(Py(e),t)})),null===t.getAttribute(Gm)&&fg.keepOriginalSource){let e=mm.createComment(function(e){let t=" ".concat(e.outerHTML," ");return t="".concat(t,"Font Awesome fontawesome.com "),t}(t));t.parentNode.replaceChild(e,t)}else t.remove()},nest:function(e){const t=e[0],n=e[1];if(~bg(t).indexOf(fg.replacementClass))return Dy.replace(e);const r=new RegExp("".concat(fg.cssPrefix,"-.*"));if(delete n[0].attributes.id,n[0].attributes.class){const e=n[0].attributes.class.split(" ").reduce(((e,t)=>(t===fg.replacementClass||t.match(r)?e.toSvg.push(t):e.toNode.push(t),e)),{toNode:[],toSvg:[]});n[0].attributes.class=e.toSvg.join(" "),0===e.toNode.length?t.removeAttribute("class"):t.setAttribute("class",e.toNode.join(" "))}const o=n.map((e=>Rg(e))).join("\n");t.setAttribute(Gm,""),t.innerHTML=o}};function jy(e){e()}function By(e,t){const n="function"==typeof t?t:Oy;if(0===e.length)n();else{let t=jy;"async"===fg.mutateApproach&&(t=hm.requestAnimationFrame||jy),t((()=>{const t=!0===fg.autoReplaceSvg?Dy.replace:Dy[fg.autoReplaceSvg]||Dy.replace,r=Ny("mutate");e.map(t),r(),n()}))}}let Ly=!1;function zy(){Ly=!0}function Fy(){Ly=!1}let Vy=null;function Gy(e){if(!gm)return;if(!fg.observeMutations)return;const{treeCallback:t=Oy,nodeCallback:n=Oy,pseudoElementsCallback:r=Oy,observeMutationsRoot:o=mm}=e;Vy=new gm((e=>{if(Ly)return;const o=Qg();yg(e).forEach((e=>{if("childList"===e.type&&e.addedNodes.length>0&&!Ry(e.addedNodes[0])&&(fg.searchPseudoElements&&r(e.target),t(e.target)),"attributes"===e.type&&e.target.parentNode&&fg.searchPseudoElements&&r(e.target.parentNode),"attributes"===e.type&&Ry(e.target)&&~ag.indexOf(e.attributeName))if("class"===e.attributeName&&function(e){const t=e.getAttribute?e.getAttribute(Hm):null,n=e.getAttribute?e.getAttribute(Xm):null;return t&&n}(e.target)){const{prefix:t,iconName:n}=ny(bg(e.target));e.target.setAttribute(Hm,t||o),n&&e.target.setAttribute(Xm,n)}else(function(e){return e&&e.classList&&e.classList.contains&&e.classList.contains(fg.replacementClass)})(e.target)&&n(e.target)}))})),bm&&Vy.observe(o,{childList:!0,attributes:!0,characterData:!0,subtree:!0})}function Wy(e){const t=e.getAttribute("data-prefix"),n=e.getAttribute("data-icon"),r=void 0!==e.innerText?e.innerText.trim():"";let o=ny(bg(e));return o.prefix||(o.prefix=Qg()),t&&n&&(o.prefix=t,o.iconName=n),o.iconName&&o.prefix||(o.prefix&&r.length>0&&(o.iconName=function(e,t){return(Wg[e]||{})[t]}(o.prefix,e.innerText)||Jg(o.prefix,Pg(e.innerText))),!o.iconName&&fg.autoFetchSvg&&e.firstChild&&e.firstChild.nodeType===Node.TEXT_NODE&&(o.iconName=e.firstChild.data)),o}function Hy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{styleParser:!0};const{iconName:n,prefix:r,rest:o}=Wy(e),i=function(e){const t=yg(e.attributes).reduce(((e,t)=>("class"!==e.name&&"style"!==e.name&&(e[t.name]=t.value),e)),{}),n=e.getAttribute("title"),r=e.getAttribute("data-fa-title-id");return fg.autoA11y&&(n?t["aria-labelledby"]="".concat(fg.replacementClass,"-title-").concat(r||gg()):(t["aria-hidden"]="true",t.focusable="false")),t}(e),a=cy("parseNodeAttributes",{},e);let s=t.styleParser?function(e){const t=e.getAttribute("style");let n=[];return t&&(n=t.split(";").reduce(((e,t)=>{const n=t.split(":"),r=n[0],o=n.slice(1);return r&&o.length>0&&(e[r]=o.join(":").trim()),e}),{})),n}(e):[];return sm({iconName:n,title:e.getAttribute("title"),titleId:e.getAttribute("data-fa-title-id"),prefix:r,transform:mg,mask:{iconName:null,prefix:null,rest:[]},maskId:null,symbol:!1,extra:{classes:o,styles:s,attributes:i}},a)}const{styles:Xy}=Ig;function Yy(e){const t="nest"===fg.autoReplaceSvg?Hy(e,{styleParser:!1}):Hy(e);return~t.extra.classes.indexOf(og)?dy("generateLayersText",e,t):dy("generateSvgReplacementMutation",e,t)}function $y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!bm)return Promise.resolve();const n=mm.documentElement.classList,r=e=>n.add("".concat(Ym,"-").concat(e)),o=e=>n.remove("".concat(Ym,"-").concat(e)),i=fg.autoFetchSvg?[..._m,...Dm]:xm.concat(Object.keys(Xy));i.includes("fa")||i.push("fa");const a=[".".concat(og,":not([").concat(Gm,"])")].concat(i.map((e=>".".concat(e,":not([").concat(Gm,"])")))).join(", ");if(0===a.length)return Promise.resolve();let s=[];try{s=yg(e.querySelectorAll(a))}catch(e){}if(!(s.length>0))return Promise.resolve();r("pending"),o("complete");const l=Ny("onTree"),c=s.reduce(((e,t)=>{try{const n=Yy(t);n&&e.push(n)}catch(e){Zm||"MissingIcon"===e.name&&console.error(e)}return e}),[]);return new Promise(((e,n)=>{Promise.all(c).then((n=>{By(n,(()=>{r("active"),r("complete"),o("pending"),"function"==typeof t&&t(),l(),e()}))})).catch((e=>{l(),n(e)}))}))}function Zy(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Yy(e).then((e=>{e&&By([e],t)}))}function Uy(e){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=(t||{}).icon?t:fy(t||{});let{mask:o}=n;return o&&(o=(o||{}).icon?o:fy(o||{})),e(r,sm(sm({},n),{},{mask:o}))}}const Jy=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:n=mg,symbol:r=!1,mask:o=null,maskId:i=null,title:a=null,titleId:s=null,classes:l=[],attributes:c={},styles:u={}}=t;if(!e)return;const{prefix:d,iconName:f,icon:p}=e;return by(sm({type:"icon"},e),(()=>(uy("beforeDOMElementCreation",{iconDefinition:e,params:t}),fg.autoA11y&&(a?c["aria-labelledby"]="".concat(fg.replacementClass,"-title-").concat(s||gg()):(c["aria-hidden"]="true",c.focusable="false")),vy({icons:{main:Ey(p),mask:o?Ey(o.icon):{found:!1,width:null,height:null,icon:{}}},prefix:d,iconName:f,transform:sm(sm({},mg),n),symbol:r,title:a,maskId:i,titleId:s,extra:{attributes:c,styles:u,classes:l}}))))};var Ky={mixout:()=>({icon:Uy(Jy)}),hooks:()=>({mutationObserverCallbacks:e=>(e.treeCallback=$y,e.nodeCallback=Zy,e)}),provides(e){e.i2svg=function(e){const{node:t=mm,callback:n=()=>{}}=e;return $y(t,n)},e.generateSvgReplacementMutation=function(e,t){const{iconName:n,title:r,titleId:o,prefix:i,transform:a,symbol:s,mask:l,maskId:c,extra:u}=t;return new Promise(((t,d)=>{Promise.all([Cy(n,i),l.iconName?Cy(l.iconName,l.prefix):Promise.resolve({found:!1,width:512,height:512,icon:{}})]).then((l=>{let[d,f]=l;t([e,vy({icons:{main:d,mask:f},prefix:i,iconName:n,transform:a,symbol:s,maskId:c,title:r,titleId:o,extra:u,watchable:!0})])})).catch(d)}))},e.generateAbstractIcon=function(e){let{children:t,attributes:n,main:r,transform:o,styles:i}=e;const a=wg(i);let s;return a.length>0&&(n.style=a),xg(o)&&(s=dy("generateAbstractTransformGrouping",{main:r,transform:o,containerWidth:r.width,iconWidth:r.width})),t.push(s||r.icon),{children:t,attributes:n}}}},qy={mixout:()=>({layer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{classes:n=[]}=t;return by({type:"layer"},(()=>{uy("beforeDOMElementCreation",{assembler:e,params:t});let r=[];return e((e=>{Array.isArray(e)?e.map((e=>{r=r.concat(e.abstract)})):r=r.concat(e.abstract)})),[{tag:"span",attributes:{class:["".concat(fg.cssPrefix,"-layers"),...n].join(" ")},children:r}]}))}})},Qy={mixout:()=>({counter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{title:n=null,classes:r=[],attributes:o={},styles:i={}}=t;return by({type:"counter",content:e},(()=>(uy("beforeDOMElementCreation",{content:e,params:t}),function(e){const{content:t,title:n,extra:r}=e,o=sm(sm(sm({},r.attributes),n?{title:n}:{}),{},{class:r.classes.join(" ")}),i=wg(r.styles);i.length>0&&(o.style=i);const a=[];return a.push({tag:"span",attributes:o,children:[t]}),n&&a.push({tag:"span",attributes:{class:"sr-only"},children:[n]}),a}({content:e.toString(),title:n,extra:{attributes:o,styles:i,classes:["".concat(fg.cssPrefix,"-layers-counter"),...r]}}))))}})},eb={mixout:()=>({text(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{transform:n=mg,title:r=null,classes:o=[],attributes:i={},styles:a={}}=t;return by({type:"text",content:e},(()=>(uy("beforeDOMElementCreation",{content:e,params:t}),wy({content:e,transform:sm(sm({},mg),n),title:r,extra:{attributes:i,styles:a,classes:["".concat(fg.cssPrefix,"-layers-text"),...o]}}))))}}),provides(e){e.generateLayersText=function(e,t){const{title:n,transform:r,extra:o}=t;let i=null,a=null;if(vm){const t=parseInt(getComputedStyle(e).fontSize,10),n=e.getBoundingClientRect();i=n.width/t,a=n.height/t}return fg.autoA11y&&!n&&(o.attributes["aria-hidden"]="true"),Promise.resolve([e,wy({content:e.innerHTML,width:i,height:a,transform:r,title:n,extra:o,watchable:!0})])}}};const tb=new RegExp('"',"ug"),nb=[1105920,1112319],rb=sm(sm(sm(sm({},{FontAwesome:{normal:"fas",400:"fas"}}),{"Font Awesome 6 Free":{900:"fas",400:"far"},"Font Awesome 6 Pro":{900:"fas",400:"far",normal:"far",300:"fal",100:"fat"},"Font Awesome 6 Brands":{400:"fab",normal:"fab"},"Font Awesome 6 Duotone":{900:"fad",400:"fadr",normal:"fadr",300:"fadl",100:"fadt"},"Font Awesome 6 Sharp":{900:"fass",400:"fasr",normal:"fasr",300:"fasl",100:"fast"},"Font Awesome 6 Sharp Duotone":{900:"fasds",400:"fasdr",normal:"fasdr",300:"fasdl",100:"fasdt"}}),{"Font Awesome 5 Free":{900:"fas",400:"far"},"Font Awesome 5 Pro":{900:"fas",400:"far",normal:"far",300:"fal"},"Font Awesome 5 Brands":{400:"fab",normal:"fab"},"Font Awesome 5 Duotone":{900:"fad"}}),{"Font Awesome Kit":{400:"fak",normal:"fak"},"Font Awesome Kit Duotone":{400:"fakd",normal:"fakd"}}),ob=Object.keys(rb).reduce(((e,t)=>(e[t.toLowerCase()]=rb[t],e)),{}),ib=Object.keys(ob).reduce(((e,t)=>{const n=ob[t];return e[t]=n[900]||[...Object.entries(n)][0][1],e}),{});function ab(e,t){const n="".concat("data-fa-pseudo-element-pending").concat(t.replace(":","-"));return new Promise(((r,o)=>{if(null!==e.getAttribute(n))return r();const i=yg(e.children).filter((e=>e.getAttribute(Wm)===t))[0],a=hm.getComputedStyle(e,t),s=a.getPropertyValue("font-family"),l=s.match(ig),c=a.getPropertyValue("font-weight"),u=a.getPropertyValue("content");if(i&&!l)return e.removeChild(i),r();if(l&&"none"!==u&&""!==u){const u=a.getPropertyValue("content");let d=function(e,t){const n=e.replace(/^['"]|['"]$/g,"").toLowerCase(),r=parseInt(t),o=isNaN(r)?"normal":r;return(ob[n]||{})[o]||ib[n]}(s,c);const{value:f,isSecondary:p}=function(e){const t=e.replace(tb,""),n=function(e,t){const n=e.length;let r,o=e.charCodeAt(t);return o>=55296&&o<=56319&&n>t+1&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?1024*(o-55296)+r-56320+65536:o}(t,0),r=n>=nb[0]&&n<=nb[1],o=2===t.length&&t[0]===t[1];return{value:Pg(o?t[0]:t),isSecondary:r||o}}(u),h=l[0].startsWith("FontAwesome");let m=Jg(d,f),g=m;if(h){const e=function(e){const t=Xg[e],n=Jg("fas",e);return t||(n?{prefix:"fas",iconName:n}:null)||{prefix:null,iconName:null}}(f);e.iconName&&e.prefix&&(m=e.iconName,d=e.prefix)}if(!m||p||i&&i.getAttribute(Hm)===d&&i.getAttribute(Xm)===g)r();else{e.setAttribute(n,g),i&&e.removeChild(i);const a={iconName:null,title:null,titleId:null,prefix:null,transform:mg,symbol:!1,mask:{iconName:null,prefix:null,rest:[]},maskId:null,extra:{classes:[],styles:{},attributes:{}}},{extra:s}=a;s.attributes[Wm]=t,Cy(m,d).then((o=>{const i=vy(sm(sm({},a),{},{icons:{main:o,mask:{prefix:null,iconName:null,rest:[]}},prefix:d,iconName:g,extra:s,watchable:!0})),l=mm.createElementNS("http://www.w3.org/2000/svg","svg");"::before"===t?e.insertBefore(l,e.firstChild):e.appendChild(l),l.outerHTML=i.map((e=>Rg(e))).join("\n"),e.removeAttribute(n),r()})).catch(o)}}else r()}))}function sb(e){return Promise.all([ab(e,"::before"),ab(e,"::after")])}function lb(e){return!(e.parentNode===document.head||~$m.indexOf(e.tagName.toUpperCase())||e.getAttribute(Wm)||e.parentNode&&"svg"===e.parentNode.tagName)}function cb(e){if(bm)return new Promise(((t,n)=>{const r=yg(e.querySelectorAll("*")).filter(lb).map(sb),o=Ny("searchPseudoElements");zy(),Promise.all(r).then((()=>{o(),Fy(),t()})).catch((()=>{o(),Fy(),n()}))}))}var ub={hooks:()=>({mutationObserverCallbacks:e=>(e.pseudoElementsCallback=cb,e)}),provides(e){e.pseudoElements2svg=function(e){const{node:t=mm}=e;fg.searchPseudoElements&&cb(t)}}};let db=!1;var fb={mixout:()=>({dom:{unwatch(){zy(),db=!0}}}),hooks:()=>({bootstrap(){Gy(cy("mutationObserverCallbacks",{}))},noAuto(){Vy&&Vy.disconnect()},watch(e){const{observeMutationsRoot:t}=e;db?Fy():Gy(cy("mutationObserverCallbacks",{observeMutationsRoot:t}))}})};const pb=e=>e.toLowerCase().split(" ").reduce(((e,t)=>{const n=t.toLowerCase().split("-"),r=n[0];let o=n.slice(1).join("-");if(r&&"h"===o)return e.flipX=!0,e;if(r&&"v"===o)return e.flipY=!0,e;if(o=parseFloat(o),isNaN(o))return e;switch(r){case"grow":e.size=e.size+o;break;case"shrink":e.size=e.size-o;break;case"left":e.x=e.x-o;break;case"right":e.x=e.x+o;break;case"up":e.y=e.y-o;break;case"down":e.y=e.y+o;break;case"rotate":e.rotate=e.rotate+o}return e}),{size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0});var hb={mixout:()=>({parse:{transform:e=>pb(e)}}),hooks:()=>({parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-transform");return n&&(e.transform=pb(n)),e}}),provides(e){e.generateAbstractTransformGrouping=function(e){let{main:t,transform:n,containerWidth:r,iconWidth:o}=e;const i={transform:"translate(".concat(r/2," 256)")},a="translate(".concat(32*n.x,", ").concat(32*n.y,") "),s="scale(".concat(n.size/16*(n.flipX?-1:1),", ").concat(n.size/16*(n.flipY?-1:1),") "),l="rotate(".concat(n.rotate," 0 0)"),c={outer:i,inner:{transform:"".concat(a," ").concat(s," ").concat(l)},path:{transform:"translate(".concat(o/2*-1," -256)")}};return{tag:"g",attributes:sm({},c.outer),children:[{tag:"g",attributes:sm({},c.inner),children:[{tag:t.icon.tag,children:t.icon.children,attributes:sm(sm({},t.icon.attributes),c.path)}]}]}}}};const mb={x:0,y:0,width:"100%",height:"100%"};function gb(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}var yb={hooks:()=>({parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-mask"),r=n?ny(n.split(" ").map((e=>e.trim()))):{prefix:null,iconName:null,rest:[]};return r.prefix||(r.prefix=Qg()),e.mask=r,e.maskId=t.getAttribute("data-fa-mask-id"),e}}),provides(e){e.generateAbstractMask=function(e){let{children:t,attributes:n,main:r,mask:o,maskId:i,transform:a}=e;const{width:s,icon:l}=r,{width:c,icon:u}=o,d=function(e){let{transform:t,containerWidth:n,iconWidth:r}=e;const o={transform:"translate(".concat(n/2," 256)")},i="translate(".concat(32*t.x,", ").concat(32*t.y,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)");return{outer:o,inner:{transform:"".concat(i," ").concat(a," ").concat(s)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}({transform:a,containerWidth:c,iconWidth:s}),f={tag:"rect",attributes:sm(sm({},mb),{},{fill:"white"})},p=l.children?{children:l.children.map(gb)}:{},h={tag:"g",attributes:sm({},d.inner),children:[gb(sm({tag:l.tag,attributes:sm(sm({},l.attributes),d.path)},p))]},m={tag:"g",attributes:sm({},d.outer),children:[h]},g="mask-".concat(i||gg()),y="clip-".concat(i||gg()),b={tag:"mask",attributes:sm(sm({},mb),{},{id:g,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,m]},v={tag:"defs",children:[{tag:"clipPath",attributes:{id:y},children:(w=u,"g"===w.tag?w.children:[w])},b]};var w;return t.push(v,{tag:"rect",attributes:sm({fill:"currentColor","clip-path":"url(#".concat(y,")"),mask:"url(#".concat(g,")")},mb)}),{children:t,attributes:n}}}},bb={provides(e){let t=!1;hm.matchMedia&&(t=hm.matchMedia("(prefers-reduced-motion: reduce)").matches),e.missingIconAbstract=function(){const e=[],n={fill:"currentColor"},r={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};e.push({tag:"path",attributes:sm(sm({},n),{},{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})});const o=sm(sm({},r),{},{attributeName:"opacity"}),i={tag:"circle",attributes:sm(sm({},n),{},{cx:"256",cy:"364",r:"28"}),children:[]};return t||i.children.push({tag:"animate",attributes:sm(sm({},r),{},{attributeName:"r",values:"28;14;28;28;14;28;"})},{tag:"animate",attributes:sm(sm({},o),{},{values:"1;0;1;1;0;1;"})}),e.push(i),e.push({tag:"path",attributes:sm(sm({},n),{},{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),children:t?[]:[{tag:"animate",attributes:sm(sm({},o),{},{values:"1;0;0;0;0;1;"})}]}),t||e.push({tag:"path",attributes:sm(sm({},n),{},{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),children:[{tag:"animate",attributes:sm(sm({},o),{},{values:"0;0;1;1;0;0;"})}]}),{tag:"g",attributes:{class:"missing"},children:e}}}},vb={hooks:()=>({parseNodeAttributes(e,t){const n=t.getAttribute("data-fa-symbol"),r=null!==n&&(""===n||n);return e.symbol=r,e}})};!function(e,t){let{mixoutsTo:n}=t;iy=e,ay={},Object.keys(sy).forEach((e=>{-1===ly.indexOf(e)&&delete sy[e]})),iy.forEach((e=>{const t=e.mixout?e.mixout():{};if(Object.keys(t).forEach((e=>{"function"==typeof t[e]&&(n[e]=t[e]),"object"==typeof t[e]&&Object.keys(t[e]).forEach((r=>{n[e]||(n[e]={}),n[e][r]=t[e][r]}))})),e.hooks){const t=e.hooks();Object.keys(t).forEach((e=>{ay[e]||(ay[e]=[]),ay[e].push(t[e])}))}e.provides&&e.provides(sy)}))}([Sg,Ky,qy,Qy,eb,ub,fb,hb,yb,bb,vb],{mixoutsTo:gy});const wb=gy.config,xb=gy.parse,Eb=gy.icon;var kb,Cb={exports:{}},Sb={exports:{}},_b={};var Ib,Ab,Nb,Ob,Rb,Tb,Mb,Pb,Db,jb,Bb,Lb,zb,Fb,Vb,Gb={};function Wb(){return Ab||(Ab=1,"production"===Q.env.NODE_ENV?Sb.exports=function(){if(kb)return _b;kb=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case h:case p:case a:return e;default:return f}}case n:return f}}}function w(e){return v(e)===c}return _b.AsyncMode=l,_b.ConcurrentMode=c,_b.ContextConsumer=s,_b.ContextProvider=a,_b.Element=t,_b.ForwardRef=u,_b.Fragment=r,_b.Lazy=h,_b.Memo=p,_b.Portal=n,_b.Profiler=i,_b.StrictMode=o,_b.Suspense=d,_b.isAsyncMode=function(e){return w(e)||v(e)===l},_b.isConcurrentMode=w,_b.isContextConsumer=function(e){return v(e)===s},_b.isContextProvider=function(e){return v(e)===a},_b.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},_b.isForwardRef=function(e){return v(e)===u},_b.isFragment=function(e){return v(e)===r},_b.isLazy=function(e){return v(e)===h},_b.isMemo=function(e){return v(e)===p},_b.isPortal=function(e){return v(e)===n},_b.isProfiler=function(e){return v(e)===i},_b.isStrictMode=function(e){return v(e)===o},_b.isSuspense=function(e){return v(e)===d},_b.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},_b.typeOf=v,_b}():Sb.exports=(Ib||(Ib=1,"production"!==Q.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var f=e.$$typeof;switch(f){case t:var m=e.type;switch(m){case l:case c:case r:case i:case o:case d:return m;default:var g=m&&m.$$typeof;switch(g){case s:case u:case h:case p:case a:return g;default:return f}}case n:return f}}}var w=l,x=c,E=s,k=a,C=t,S=u,_=r,I=h,A=p,N=n,O=i,R=o,T=d,M=!1;function P(e){return v(e)===c}Gb.AsyncMode=w,Gb.ConcurrentMode=x,Gb.ContextConsumer=E,Gb.ContextProvider=k,Gb.Element=C,Gb.ForwardRef=S,Gb.Fragment=_,Gb.Lazy=I,Gb.Memo=A,Gb.Portal=N,Gb.Profiler=O,Gb.StrictMode=R,Gb.Suspense=T,Gb.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),P(e)||v(e)===l},Gb.isConcurrentMode=P,Gb.isContextConsumer=function(e){return v(e)===s},Gb.isContextProvider=function(e){return v(e)===a},Gb.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Gb.isForwardRef=function(e){return v(e)===u},Gb.isFragment=function(e){return v(e)===r},Gb.isLazy=function(e){return v(e)===h},Gb.isMemo=function(e){return v(e)===p},Gb.isPortal=function(e){return v(e)===n},Gb.isProfiler=function(e){return v(e)===i},Gb.isStrictMode=function(e){return v(e)===o},Gb.isSuspense=function(e){return v(e)===d},Gb.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===p||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===b||e.$$typeof===m)},Gb.typeOf=v}()),Gb)),Sb.exports}
52
17
  /*
53
18
  object-assign
54
19
  (c) Sindre Sorhus
55
20
  @license MIT
56
- */function Ey(){if(uy)return cy;uy=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return cy=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var c in i=Object(arguments[l]))t.call(i,c)&&(s[c]=i[c]);if(e){a=e(i);for(var u=0;u<a.length;u++)n.call(i,a[u])&&(s[a[u]]=i[a[u]])}}return s},cy}function Sy(){if(fy)return dy;fy=1;return dy="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function _y(){return hy?py:(hy=1,py=Function.call.bind(Object.prototype.hasOwnProperty))}function Iy(){if(gy)return my;gy=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Sy(),n={},r=_y();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,s,l){if("production"!==process.env.NODE_ENV)for(var c in o)if(r(o,c)){var u;try{if("function"!=typeof o[c]){var d=Error((s||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](i,c,s,a,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((s||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var f=l?l():"";e("Failed "+a+" type: "+u.message+(null!=f?f:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(n={})},my=o}function Ay(){if(by)return yy;by=1;var e=Cy(),t=Ey(),n=Sy(),r=_y(),o=Iy(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),yy=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var u="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:h(a),arrayOf:function(e){return h((function(t,r,o,i,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new p("Invalid "+i+" `"+a+"` of type `"+b(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,o,i,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:h((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:h((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new p("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||u;return new p("Invalid "+o+" `"+i+"` of type `"+(((s=t[n]).constructor&&s.constructor.name?s.constructor.name:u)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var s;return null}))},node:h((function(e,t,n,r,o){return y(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,a,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new p("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,i,a,s+"."+u,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return h((function(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(f(a,e[s]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===v(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(o)+" at index "+t+"."),a}return h((function(t,o,i,a,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,i,a,s,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType)}return new p("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,r,o,i,a){var s=t[r],l=b(s);if("object"!==l)return new p("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(o,i,a,c,v(u));var d=u(s,c,o,i,a+"."+c,n);if(d)return d}return null}))},exact:function(e){return h((function(o,i,a,s,l){var c=o[i],u=b(c);if("object"!==u)return new p("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var d=t({},o[i],e);for(var f in d){var h=e[f];if(r(e,f)&&"function"!=typeof h)return g(a,s,l,f,v(h));if(!h)return new p("Invalid "+s+" `"+l+"` key `"+f+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=h(c,f,a,s,l+"."+f,n);if(m)return m}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,s,c,d,f,h){if(c=c||u,f=f||s,h!==n){if(l){var m=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 m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+s;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==a[s]?o?null===a[s]?new p("The "+d+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+d+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,s,c,d,f)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function m(e){return h((function(t,n,r,o,i,a){var s=t[n];return b(s)!==e?new p("Invalid "+o+" `"+i+"` of type `"+v(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function y(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(y);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!y(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!y(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},yy}function Ny(){if(wy)return vy;wy=1;var e=Sy();function t(){}function n(){}return n.resetWarningCache=t,vy=function(){function r(t,n,r,o,i,a){if(a!==e){var s=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 s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},vy}function Oy(){if(xy)return oy.exports;if(xy=1,"production"!==process.env.NODE_ENV){var e=Cy();oy.exports=Ay()(e.isElement,true)}else oy.exports=Ny()();return oy.exports}var Ry=Oy(),Ty=I(Ry);function My(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Py(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?My(Object(n),!0).forEach((function(t){jy(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):My(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Dy(e){return Dy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dy(e)}function jy(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function By(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function Ly(e){return function(e){if(Array.isArray(e))return zy(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return zy(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return zy(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zy(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fy(e){return t=e,(t-=0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1);var t}var Vy=["style"];var Gy=!1;try{Gy="production"===process.env.NODE_ENV}catch(e){}function Hy(e){return e&&"object"===Dy(e)&&e.prefix&&e.iconName&&e.icon?e:ty.icon?ty.icon(e):null===e?null:e&&"object"===Dy(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function Wy(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?jy({},e,t):{}}var Xy={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},$y=t.forwardRef((function(e,t){var n=Py(Py({},Xy),e),r=n.icon,o=n.mask,i=n.symbol,a=n.className,s=n.title,l=n.titleId,c=n.maskId,u=Hy(r),d=Wy("classes",[].concat(Ly(function(e){var t,n=e.beat,r=e.fade,o=e.beatFade,i=e.bounce,a=e.shake,s=e.flash,l=e.spin,c=e.spinPulse,u=e.spinReverse,d=e.pulse,f=e.fixedWidth,p=e.inverse,h=e.border,m=e.listItem,g=e.flip,y=e.size,b=e.rotation,v=e.pull,w=(jy(t={"fa-beat":n,"fa-fade":r,"fa-beat-fade":o,"fa-bounce":i,"fa-shake":a,"fa-flash":s,"fa-spin":l,"fa-spin-reverse":u,"fa-spin-pulse":c,"fa-pulse":d,"fa-fw":f,"fa-inverse":p,"fa-border":h,"fa-li":m,"fa-flip":!0===g,"fa-flip-horizontal":"horizontal"===g||"both"===g,"fa-flip-vertical":"vertical"===g||"both"===g},"fa-".concat(y),null!=y),jy(t,"fa-rotate-".concat(b),null!=b&&0!==b),jy(t,"fa-pull-".concat(v),null!=v),jy(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(w).map((function(e){return w[e]?e:null})).filter((function(e){return e}))}(n)),Ly((a||"").split(" ")))),f=Wy("transform","string"==typeof n.transform?ty.transform(n.transform):n.transform),p=Wy("mask",Hy(o)),h=ny(u,Py(Py(Py(Py({},d),f),p),{},{symbol:i,title:s,titleId:l,maskId:c}));if(!h)return function(){var e;!Gy&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",u),null;var m=h.abstract,g={ref:t};return Object.keys(n).forEach((function(e){Xy.hasOwnProperty(e)||(g[e]=n[e])})),Zy(m[0],g)}));$y.displayName="FontAwesomeIcon",$y.propTypes={beat:Ty.bool,border:Ty.bool,beatFade:Ty.bool,bounce:Ty.bool,className:Ty.string,fade:Ty.bool,flash:Ty.bool,mask:Ty.oneOfType([Ty.object,Ty.array,Ty.string]),maskId:Ty.string,fixedWidth:Ty.bool,inverse:Ty.bool,flip:Ty.oneOf([!0,!1,"horizontal","vertical","both"]),icon:Ty.oneOfType([Ty.object,Ty.array,Ty.string]),listItem:Ty.bool,pull:Ty.oneOf(["right","left"]),pulse:Ty.bool,rotation:Ty.oneOf([0,90,180,270]),shake:Ty.bool,size:Ty.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:Ty.bool,spinPulse:Ty.bool,spinReverse:Ty.bool,symbol:Ty.oneOfType([Ty.bool,Ty.string]),title:Ty.string,titleId:Ty.string,transform:Ty.oneOfType([Ty.string,Ty.object]),swapOpacity:Ty.bool};var Zy=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var o=(n.children||[]).map((function(n){return e(t,n)})),i=Object.keys(n.attributes||{}).reduce((function(e,t){var r=n.attributes[t];switch(t){case"class":e.attrs.className=r,delete n.attributes.class;break;case"style":e.attrs.style=function(e){return e.split(";").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var n,r=t.indexOf(":"),o=Fy(t.slice(0,r)),i=t.slice(r+1).trim();return o.startsWith("webkit")?e[(n=o,n.charAt(0).toUpperCase()+n.slice(1))]=i:e[o]=i,e}),{})}(r);break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[Fy(t)]=r}return e}),{attrs:{}}),a=r.style,s=void 0===a?{}:a,l=By(r,Vy);return i.attrs.style=Py(Py({},i.attrs.style),s),t.apply(void 0,[n.tag,Py(Py({},i.attrs),l)].concat(Ly(o)))}.bind(null,t.createElement);
21
+ */function Hb(){if(Ob)return Nb;Ob=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;return Nb=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(r,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(r),l=1;l<arguments.length;l++){for(var c in i=Object(arguments[l]))t.call(i,c)&&(s[c]=i[c]);if(e){a=e(i);for(var u=0;u<a.length;u++)n.call(i,a[u])&&(s[a[u]]=i[a[u]])}}return s},Nb}function Xb(){if(Tb)return Rb;Tb=1;return Rb="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function Yb(){return Pb?Mb:(Pb=1,Mb=Function.call.bind(Object.prototype.hasOwnProperty))}function $b(){if(jb)return Db;jb=1;var e=function(){};if("production"!==Q.env.NODE_ENV){var t=Xb(),n={},r=Yb();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,s,l){if("production"!==Q.env.NODE_ENV)for(var c in o)if(r(o,c)){var u;try{if("function"!=typeof o[c]){var d=Error((s||"React class")+": "+a+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=o[c](i,c,s,a,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((s||"React class")+": type specification of "+a+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var f=l?l():"";e("Failed "+a+" type: "+u.message+(null!=f?f:""))}}}return o.resetWarningCache=function(){"production"!==Q.env.NODE_ENV&&(n={})},Db=o}function Zb(){if(Lb)return Bb;Lb=1;var e=Wb(),t=Hb(),n=Xb(),r=Yb(),o=$b(),i=function(){};function a(){return null}return"production"!==Q.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),Bb=function(s,l){var c="function"==typeof Symbol&&Symbol.iterator;var u="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:h(a),arrayOf:function(e){return h((function(t,r,o,i,a){if("function"!=typeof e)return new p("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[r];if(!Array.isArray(s))return new p("Invalid "+i+" `"+a+"` of type `"+b(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var c=e(s,l,o,i,a+"["+l+"]",n);if(c instanceof Error)return c}return null}))},element:h((function(e,t,n,r,o){var i=e[t];return s(i)?null:new p("Invalid "+r+" `"+o+"` of type `"+b(i)+"` supplied to `"+n+"`, expected a single ReactElement.")})),elementType:h((function(t,n,r,o,i){var a=t[n];return e.isValidElementType(a)?null:new p("Invalid "+o+" `"+i+"` of type `"+b(a)+"` supplied to `"+r+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||u;return new p("Invalid "+o+" `"+i+"` of type `"+(((s=t[n]).constructor&&s.constructor.name?s.constructor.name:u)+"` supplied to `")+r+"`, expected instance of `"+a+"`.")}var s;return null}))},node:h((function(e,t,n,r,o){return y(e[t])?null:new p("Invalid "+r+" `"+o+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,a,s){if("function"!=typeof e)return new p("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],c=b(l);if("object"!==c)return new p("Invalid "+a+" `"+s+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var u in l)if(r(l,u)){var d=e(l,u,i,a,s+"."+u,n);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==Q.env.NODE_ENV&&i(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),a;return h((function(t,n,r,o,i){for(var a=t[n],s=0;s<e.length;s++)if(f(a,e[s]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===v(t)?String(t):t}));return new p("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+r+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==Q.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+w(o)+" at index "+t+"."),a}return h((function(t,o,i,a,s){for(var l=[],c=0;c<e.length;c++){var u=(0,e[c])(t,o,i,a,s,n);if(null==u)return null;u.data&&r(u.data,"expectedType")&&l.push(u.data.expectedType)}return new p("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,r,o,i,a){var s=t[r],l=b(s);if("object"!==l)return new p("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return g(o,i,a,c,v(u));var d=u(s,c,o,i,a+"."+c,n);if(d)return d}return null}))},exact:function(e){return h((function(o,i,a,s,l){var c=o[i],u=b(c);if("object"!==u)return new p("Invalid "+s+" `"+l+"` of type `"+u+"` supplied to `"+a+"`, expected `object`.");var d=t({},o[i],e);for(var f in d){var h=e[f];if(r(e,f)&&"function"!=typeof h)return g(a,s,l,f,v(h));if(!h)return new p("Invalid "+s+" `"+l+"` key `"+f+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=h(c,f,a,s,l+"."+f,n);if(m)return m}return null}))}};function f(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function p(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==Q.env.NODE_ENV)var t={},r=0;function o(o,a,s,c,d,f,h){if(c=c||u,f=f||s,h!==n){if(l){var m=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 m.name="Invariant Violation",m}if("production"!==Q.env.NODE_ENV&&"undefined"!=typeof console){var g=c+":"+s;!t[g]&&r<3&&(i("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[g]=!0,r++)}}return null==a[s]?o?null===a[s]?new p("The "+d+" `"+f+"` is marked as required in `"+c+"`, but its value is `null`."):new p("The "+d+" `"+f+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,s,c,d,f)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function m(e){return h((function(t,n,r,o,i,a){var s=t[n];return b(s)!==e?new p("Invalid "+o+" `"+i+"` of type `"+v(s)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function g(e,t,n,r,o){return new p((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function y(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(y);if(null===e||s(e))return!0;var t=function(e){var t=e&&(c&&e[c]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var n,r=t.call(e);if(t!==e.entries){for(;!(n=r.next()).done;)if(!y(n.value))return!1}else for(;!(n=r.next()).done;){var o=n.value;if(o&&!y(o[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function w(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return p.prototype=Error.prototype,d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Bb}function Ub(){if(Fb)return zb;Fb=1;var e=Xb();function t(){}function n(){}return n.resetWarningCache=t,zb=function(){function r(t,n,r,o,i,a){if(a!==e){var s=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 s.name="Invariant Violation",s}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},zb}function Jb(){if(Vb)return Cb.exports;if(Vb=1,"production"!==Q.env.NODE_ENV){var e=Wb();Cb.exports=Zb()(e.isElement,true)}else Cb.exports=Ub()();return Cb.exports}var Kb=Jb(),qb=I(Kb);function Qb(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ev(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qb(Object(n),!0).forEach((function(t){nv(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qb(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function tv(e){return tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tv(e)}function nv(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rv(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function ov(e){return function(e){if(Array.isArray(e))return iv(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return iv(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return iv(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function iv(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function av(e){return t=e,(t-=0)==t?e:(e=e.replace(/[\-_\s]+(.)?/g,(function(e,t){return t?t.toUpperCase():""}))).substr(0,1).toLowerCase()+e.substr(1);var t}var sv=["style"];var lv=!1;try{lv="production"===Q.env.NODE_ENV}catch(e){}function cv(e){return e&&"object"===tv(e)&&e.prefix&&e.iconName&&e.icon?e:xb.icon?xb.icon(e):null===e?null:e&&"object"===tv(e)&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function uv(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?nv({},e,t):{}}var dv={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1},fv=t.forwardRef((function(e,t){var n=ev(ev({},dv),e),r=n.icon,o=n.mask,i=n.symbol,a=n.className,s=n.title,l=n.titleId,c=n.maskId,u=cv(r),d=uv("classes",[].concat(ov(function(e){var t,n=e.beat,r=e.fade,o=e.beatFade,i=e.bounce,a=e.shake,s=e.flash,l=e.spin,c=e.spinPulse,u=e.spinReverse,d=e.pulse,f=e.fixedWidth,p=e.inverse,h=e.border,m=e.listItem,g=e.flip,y=e.size,b=e.rotation,v=e.pull,w=(nv(t={"fa-beat":n,"fa-fade":r,"fa-beat-fade":o,"fa-bounce":i,"fa-shake":a,"fa-flash":s,"fa-spin":l,"fa-spin-reverse":u,"fa-spin-pulse":c,"fa-pulse":d,"fa-fw":f,"fa-inverse":p,"fa-border":h,"fa-li":m,"fa-flip":!0===g,"fa-flip-horizontal":"horizontal"===g||"both"===g,"fa-flip-vertical":"vertical"===g||"both"===g},"fa-".concat(y),null!=y),nv(t,"fa-rotate-".concat(b),null!=b&&0!==b),nv(t,"fa-pull-".concat(v),null!=v),nv(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(w).map((function(e){return w[e]?e:null})).filter((function(e){return e}))}(n)),ov((a||"").split(" ")))),f=uv("transform","string"==typeof n.transform?xb.transform(n.transform):n.transform),p=uv("mask",cv(o)),h=Eb(u,ev(ev(ev(ev({},d),f),p),{},{symbol:i,title:s,titleId:l,maskId:c}));if(!h)return function(){var e;!lv&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",u),null;var m=h.abstract,g={ref:t};return Object.keys(n).forEach((function(e){dv.hasOwnProperty(e)||(g[e]=n[e])})),pv(m[0],g)}));fv.displayName="FontAwesomeIcon",fv.propTypes={beat:qb.bool,border:qb.bool,beatFade:qb.bool,bounce:qb.bool,className:qb.string,fade:qb.bool,flash:qb.bool,mask:qb.oneOfType([qb.object,qb.array,qb.string]),maskId:qb.string,fixedWidth:qb.bool,inverse:qb.bool,flip:qb.oneOf([!0,!1,"horizontal","vertical","both"]),icon:qb.oneOfType([qb.object,qb.array,qb.string]),listItem:qb.bool,pull:qb.oneOf(["right","left"]),pulse:qb.bool,rotation:qb.oneOf([0,90,180,270]),shake:qb.bool,size:qb.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:qb.bool,spinPulse:qb.bool,spinReverse:qb.bool,symbol:qb.oneOfType([qb.bool,qb.string]),title:qb.string,titleId:qb.string,transform:qb.oneOfType([qb.string,qb.object]),swapOpacity:qb.bool};var pv=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var o=(n.children||[]).map((function(n){return e(t,n)})),i=Object.keys(n.attributes||{}).reduce((function(e,t){var r=n.attributes[t];switch(t){case"class":e.attrs.className=r,delete n.attributes.class;break;case"style":e.attrs.style=function(e){return e.split(";").map((function(e){return e.trim()})).filter((function(e){return e})).reduce((function(e,t){var n,r=t.indexOf(":"),o=av(t.slice(0,r)),i=t.slice(r+1).trim();return o.startsWith("webkit")?e[(n=o,n.charAt(0).toUpperCase()+n.slice(1))]=i:e[o]=i,e}),{})}(r);break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[av(t)]=r}return e}),{attrs:{}}),a=r.style,s=void 0===a?{}:a,l=rv(r,sv);return i.attrs.style=ev(ev({},i.attrs.style),s),t.apply(void 0,[n.tag,ev(ev({},i.attrs),l)].concat(ov(o)))}.bind(null,t.createElement);
57
22
  /*!
58
23
  * Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com
59
24
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
60
25
  * Copyright 2024 Fonticons, Inc.
61
- */const Yy={prefix:"fas",iconName:"down-left-and-up-right-to-center",icon:[512,512,["compress-alt"],"f422","M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39L73 505c-9.4 9.4-24.6 9.4-33.9 0L7 473c-9.4-9.4-9.4-24.6 0-33.9l87-87L55 313c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8z"]},Uy={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},Jy={prefix:"fas",iconName:"compress",icon:[448,512,[],"f066","M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0z"]},Ky={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"]},qy={prefix:"fas",iconName:"chevron-up",icon:[512,512,[],"f077","M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},Qy={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},eb={prefix:"fas",iconName:"lock-open",icon:[576,512,[],"f3c1","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z"]},tb={prefix:"fas",iconName:"network-wired",icon:[640,512,[],"f6ff","M256 64l128 0 0 64-128 0 0-64zM240 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l48 0 0 32L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 256 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-256 0 0-32 48 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48L240 0zM96 448l0-64 128 0 0 64L96 448zm320-64l128 0 0 64-128 0 0-64z"]},nb={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},rb={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},ob={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"]},ib={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},ab={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},sb={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},lb={prefix:"fas",iconName:"up-right-and-down-left-from-center",icon:[512,512,["expand-alt"],"f424","M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z"]};ey.autoAddCss=!1;const cb=t=>{const{style:n,...r}=t;return e.createElement("span",{style:{marginLeft:"5px",...n}},e.createElement($y,{...r}))},ub=t=>e.createElement(cb,{...t,icon:Uy}),db=t=>e.createElement(cb,{...t,icon:sb}),fb=t=>e.createElement(cb,{...t,icon:ab}),pb=t=>e.createElement(cb,{...t,icon:ob}),hb=t=>e.createElement(cb,{...t,icon:Jy}),mb=t=>e.createElement(cb,{...t,icon:Yy}),gb=t=>e.createElement(cb,{...t,icon:lb}),yb=t=>e.createElement(cb,{...t,icon:rb}),bb=t=>e.createElement(cb,{...t,icon:qy}),vb=bb,wb=t=>e.createElement(cb,{...t,icon:ib}),xb=t=>e.createElement(cb,{...t,icon:eb}),kb=t=>e.createElement(cb,{...t,icon:Ky}),Cb=t=>e.createElement(cb,{...t,icon:tb}),Eb=t=>e.createElement(cb,{...t,icon:Qy}),Sb=t=>e.createElement(cb,{...t,icon:nb}),_b=({trigger:t,title:n,description:r,children:o,closebutton:i=!0,onOpenChange:a,buttons:s=[],open:l,setOpen:c,modal:u=!0})=>{const d=e.useContext(AG).local_state((e=>e.funcnodescontainerRef)),f=e.createElement(Dp,{asChild:!0},e.createElement("div",{className:"dialogconent funcnodescontainer"},n&&e.createElement(jp,{className:"dialogtitle"},n),e.createElement(Bp,{className:"dialogdescription"},r),e.createElement("div",{className:"dialogchildren"},o),e.createElement("div",{style:{display:"flex",marginTop:25,justifyContent:"flex-end"}},(s||[]).map(((t,n)=>e.createElement(Lp,{asChild:!0,key:n},e.createElement("button",{className:"dialogsendbutton",onClick:t.onClick},t.text))))),i&&e.createElement(Lp,{asChild:!0},e.createElement("button",{className:"dialogclosebutton","aria-label":"Close"},e.createElement(wb,null)))));return e.createElement(Rp,{open:l,onOpenChange:e=>{c&&c(e),a&&a(e)},modal:u},t&&e.createElement(Tp,{asChild:!0},t),e.createElement(Mp,{container:d},e.createElement(Pp,{className:"dialogoverlay funcnodescontainer"}),f))};function Ib(e){const n=e+"CollectionProvider",[r,o]=bd(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:n,children:r}=e,o=t.useRef(null),a=t.useRef(new Map).current;return yd.jsx(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const l=e+"CollectionSlot",c=t.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=cd(t,a(l,n).collectionRef);return yd.jsx(_d,{ref:o,children:r})}));c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=t.forwardRef(((e,n)=>{const{scope:r,children:o,...i}=e,s=t.useRef(null),l=cd(n,s),c=a(u,r);return t.useEffect((()=>(c.itemMap.set(s,{ref:s,...i}),()=>{c.itemMap.delete(s)}))),yd.jsx(_d,{[d]:"",ref:l,children:o})}));return f.displayName=u,[{Provider:s,Slot:c,ItemSlot:f},function(n){const r=a(e+"CollectionConsumer",n);return t.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},o]}var Ab=e.createContext(void 0);function Nb(t){const n=e.useContext(Ab);return t||n||"ltr"}const Ob=["top","right","bottom","left"],Rb=Math.min,Tb=Math.max,Mb=Math.round,Pb=Math.floor,Db=e=>({x:e,y:e}),jb={left:"right",right:"left",bottom:"top",top:"bottom"},Bb={start:"end",end:"start"};function Lb(e,t,n){return Tb(e,Rb(t,n))}function zb(e,t){return"function"==typeof e?e(t):e}function Fb(e){return e.split("-")[0]}function Vb(e){return e.split("-")[1]}function Gb(e){return"x"===e?"y":"x"}function Hb(e){return"y"===e?"height":"width"}function Wb(e){return["top","bottom"].includes(Fb(e))?"y":"x"}function Xb(e){return Gb(Wb(e))}function $b(e){return e.replace(/start|end/g,(e=>Bb[e]))}function Zb(e){return e.replace(/left|right|bottom|top/g,(e=>jb[e]))}function Yb(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Ub(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Jb(e,t,n){let{reference:r,floating:o}=e;const i=Wb(t),a=Xb(t),s=Hb(a),l=Fb(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Vb(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function Kb(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=zb(t,e),h=Yb(p),m=s[f?"floating"===d?"reference":"floating":d],g=Ub(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=Ub(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+h.top)/v.y,bottom:(w.bottom-g.bottom+h.bottom)/v.y,left:(g.left-w.left+h.left)/v.x,right:(w.right-g.right+h.right)/v.x}}function qb(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Qb(e){return Ob.some((t=>e[t]>=0))}function ev(){return"undefined"!=typeof window}function tv(e){return ov(e)?(e.nodeName||"").toLowerCase():"#document"}function nv(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function rv(e){var t;return null==(t=(ov(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ov(e){return!!ev()&&(e instanceof Node||e instanceof nv(e).Node)}function iv(e){return!!ev()&&(e instanceof Element||e instanceof nv(e).Element)}function av(e){return!!ev()&&(e instanceof HTMLElement||e instanceof nv(e).HTMLElement)}function sv(e){return!(!ev()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof nv(e).ShadowRoot)}function lv(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=hv(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function cv(e){return["table","td","th"].includes(tv(e))}function uv(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function dv(e){const t=fv(),n=iv(e)?hv(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function fv(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function pv(e){return["html","body","#document"].includes(tv(e))}function hv(e){return nv(e).getComputedStyle(e)}function mv(e){return iv(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gv(e){if("html"===tv(e))return e;const t=e.assignedSlot||e.parentNode||sv(e)&&e.host||rv(e);return sv(t)?t.host:t}function yv(e){const t=gv(e);return pv(t)?e.ownerDocument?e.ownerDocument.body:e.body:av(t)&&lv(t)?t:yv(t)}function bv(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=yv(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=nv(o);if(i){const e=vv(a);return t.concat(a,a.visualViewport||[],lv(o)?o:[],e&&n?bv(e):[])}return t.concat(o,bv(o,[],n))}function vv(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function wv(e){const t=hv(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=av(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Mb(n)!==i||Mb(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function xv(e){return iv(e)?e:e.contextElement}function kv(e){const t=xv(e);if(!av(t))return Db(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=wv(t);let a=(i?Mb(n.width):n.width)/r,s=(i?Mb(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Cv=Db(0);function Ev(e){const t=nv(e);return fv()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Cv}function Sv(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=xv(e);let a=Db(1);t&&(r?iv(r)&&(a=kv(r)):a=kv(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==nv(e))&&t}(i,n,r)?Ev(i):Db(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=nv(i),t=r&&iv(r)?nv(r):r;let n=e,o=vv(n);for(;o&&r&&t!==n;){const e=kv(o),t=o.getBoundingClientRect(),r=hv(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=nv(o),o=vv(n)}}return Ub({width:u,height:d,x:l,y:c})}function _v(e,t){const n=mv(e).scrollLeft;return t?t.left+n:Sv(rv(e)).left+n}function Iv(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:_v(e,r)),y:r.top+t.scrollTop}}function Av(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=nv(e),r=rv(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=fv();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=rv(e),n=mv(e),r=e.ownerDocument.body,o=Tb(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Tb(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+_v(e);const s=-n.scrollTop;return"rtl"===hv(r).direction&&(a+=Tb(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(rv(e));else if(iv(t))r=function(e,t){const n=Sv(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=av(e)?kv(e):Db(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Ev(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Ub(r)}function Nv(e,t){const n=gv(e);return!(n===t||!iv(n)||pv(n))&&("fixed"===hv(n).position||Nv(n,t))}function Ov(e,t,n){const r=av(t),o=rv(t),i="fixed"===n,a=Sv(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Db(0);if(r||!r&&!i)if(("body"!==tv(t)||lv(o))&&(s=mv(t)),r){const e=Sv(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=_v(o));const c=!o||r||i?Db(0):Iv(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Rv(e){return"static"===hv(e).position}function Tv(e,t){if(!av(e)||"fixed"===hv(e).position)return null;if(t)return t(e);let n=e.offsetParent;return rv(e)===n&&(n=n.ownerDocument.body),n}function Mv(e,t){const n=nv(e);if(uv(e))return n;if(!av(e)){let t=gv(e);for(;t&&!pv(t);){if(iv(t)&&!Rv(t))return t;t=gv(t)}return n}let r=Tv(e,t);for(;r&&cv(r)&&Rv(r);)r=Tv(r,t);return r&&pv(r)&&Rv(r)&&!dv(r)?n:r||function(e){let t=gv(e);for(;av(t)&&!pv(t);){if(dv(t))return t;if(uv(t))return null;t=gv(t)}return null}(e)||n}const Pv={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=rv(r),s=!!t&&uv(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Db(1);const u=Db(0),d=av(r);if((d||!d&&!i)&&(("body"!==tv(r)||lv(a))&&(l=mv(r)),av(r))){const e=Sv(r);c=kv(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?Db(0):Iv(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:rv,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?uv(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=bv(e,[],!1).filter((e=>iv(e)&&"body"!==tv(e))),o=null;const i="fixed"===hv(e).position;let a=i?gv(e):e;for(;iv(a)&&!pv(a);){const t=hv(a),n=dv(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||lv(a)&&!n&&Nv(e,a))?r=r.filter((e=>e!==a)):o=t,a=gv(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=Av(t,n,o);return e.top=Tb(r.top,e.top),e.right=Rb(r.right,e.right),e.bottom=Rb(r.bottom,e.bottom),e.left=Tb(r.left,e.left),e}),Av(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Mv,getElementRects:async function(e){const t=this.getOffsetParent||Mv,n=this.getDimensions,r=await n(e.floating);return{reference:Ov(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=wv(e);return{width:t,height:n}},getScale:kv,isElement:iv,isRTL:function(e){return"rtl"===hv(e).direction}};function Dv(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jv(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=xv(e),u=o||i?[...c?bv(c):[],...bv(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=rv(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-Pb(d)+"px "+-Pb(o.clientWidth-(u+f))+"px "+-Pb(o.clientHeight-(d+p))+"px "+-Pb(u)+"px",threshold:Tb(0,Rb(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||Dv(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?Sv(e):null;return l&&function t(){const r=Sv(e);m&&!Dv(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const Bv=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Fb(n),s=Vb(n),l="y"===Wb(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=zb(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},Lv=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=zb(e,t),c={x:n,y:r},u=await Kb(t,l),d=Wb(Fb(o)),f=Gb(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=Lb(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=Lb(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},zv=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=zb(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=Fb(o),b=Wb(s),v=Fb(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(v||!m?[Zb(s)]:function(e){const t=Zb(e);return[$b(e),t,$b(t)]}(s)),k="none"!==h;!f&&k&&x.push(...function(e,t,n,r){const o=Vb(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(Fb(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map($b)))),i}(s,m,h,w));const C=[s,...x],E=await Kb(t,g),S=[];let _=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&S.push(E[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Vb(e),o=Xb(e),i=Hb(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Zb(a)),[a,Zb(a)]}(o,a,w);S.push(E[e[0]],E[e[1]])}if(_=[..._,{placement:o,overflows:S}],!S.every((e=>e<=0))){var I,A;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=C[e];if(t)return{data:{index:e,overflows:_},reset:{placement:t}};let n=null==(A=_.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var N;const e=null==(N=_.filter((e=>{if(k){const t=Wb(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Fv=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=zb(e,t),u=await Kb(t,c),d=Fb(o),f=Vb(o),p="y"===Wb(o),{width:h,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,w=Rb(m-u[g],b),x=Rb(h-u[y],v),k=!t.middlewareData.shift;let C=w,E=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(E=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(C=b),k&&!f){const e=Tb(u.left,0),t=Tb(u.right,0),n=Tb(u.top,0),r=Tb(u.bottom,0);p?E=h-2*(0!==e||0!==t?e+t:Tb(u.left,u.right)):C=m-2*(0!==n||0!==r?n+r:Tb(u.top,u.bottom))}await l({...t,availableWidth:E,availableHeight:C});const S=await a.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},Vv=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=zb(e,t);switch(r){case"referenceHidden":{const e=qb(await Kb(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Qb(e)}}}case"escaped":{const e=qb(await Kb(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Qb(e)}}}default:return{}}}}},Gv=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=zb(e,t)||{};if(null==c)return{};const d=Yb(u),f={x:n,y:r},p=Xb(o),h=Hb(p),m=await a.getDimensions(c),g="y"===p,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],k=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let C=k?k[v]:0;C&&await(null==a.isElement?void 0:a.isElement(k))||(C=s.floating[v]||i.floating[h]);const E=w/2-x/2,S=C/2-m[h]/2-1,_=Rb(d[y],S),I=Rb(d[b],S),A=_,N=C-m[h]-I,O=C/2-m[h]/2+E,R=Lb(A,O,N),T=!l.arrow&&null!=Vb(o)&&O!==R&&i.reference[h]/2-(O<A?_:I)-m[h]/2<0,M=T?O<A?O-A:O-N:0;return{[p]:f[p]+M,data:{[p]:R,centerOffset:O-R-M,...T&&{alignmentOffset:M}},reset:T}}}),Hv=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=zb(e,t),u={x:n,y:r},d=Wb(o),f=Gb(d);let p=u[f],h=u[d];const m=zb(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,b;const e="y"===f?"width":"height",t=["top","left"].includes(Fb(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Wv=(e,t,n)=>{const r=new Map,o={platform:Pv,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Jb(c,r,l),f=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y:y,data:b,reset:v}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,p={...p,[i]:{...p[i],...b}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(c=!0===v.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:u,y:d}=Jb(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Xv="undefined"!=typeof document?d:s;function $v(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!$v(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!$v(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Zv(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yv(e,t){const n=Zv(e);return Math.round(t*n)/n}function Uv(t){const n=e.useRef(t);return Xv((()=>{n.current=t})),n}const Jv=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Gv({element:n.current,padding:r}).fn(t):{}:n?Gv({element:n,padding:r}).fn(t):{};var o}}),Kv=(e,t)=>({...Bv(e),options:[e,t]}),qv=(e,t)=>({...Lv(e),options:[e,t]}),Qv=(e,t)=>({...Hv(e),options:[e,t]}),ew=(e,t)=>({...zv(e),options:[e,t]}),tw=(e,t)=>({...Fv(e),options:[e,t]}),nw=(e,t)=>({...Vv(e),options:[e,t]}),rw=(e,t)=>({...Jv(e),options:[e,t]});var ow=e.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return yd.jsx(Od.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:yd.jsx("polygon",{points:"0,0 30,0 15,10"})})}));ow.displayName="Arrow";var iw=ow;function aw(t){const[n,r]=e.useState(void 0);return wd((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}var sw="Popper",[lw,cw]=bd(sw),[uw,dw]=lw(sw),fw=t=>{const{__scopePopper:n,children:r}=t,[o,i]=e.useState(null);return yd.jsx(uw,{scope:n,anchor:o,onAnchorChange:i,children:r})};fw.displayName=sw;var pw="PopperAnchor",hw=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...i}=t,a=dw(pw,r),s=e.useRef(null),l=cd(n,s);return e.useEffect((()=>{a.onAnchorChange(o?.current||s.current)})),o?null:yd.jsx(Od.div,{...i,ref:l})}));hw.displayName=pw;var mw="PopperContent",[gw,yw]=lw(mw),bw=e.forwardRef(((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:m,...g}=t,y=dw(mw,r),[b,v]=e.useState(null),w=cd(n,(e=>v(e))),[k,C]=e.useState(null),E=aw(k),S=E?.width??0,_=E?.height??0,I=o+("center"!==a?"-"+a:""),A="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(u)?u:[u],O=N.length>0,R={padding:A,boundary:N.filter(kw),altBoundary:O},{refs:T,floatingStyles:M,placement:P,isPositioned:D,middlewareData:j}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,h]=e.useState(o);$v(p,o)||h(o);const[m,g]=e.useState(null),[y,b]=e.useState(null),v=e.useCallback((e=>{e!==E.current&&(E.current=e,g(e))}),[]),w=e.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),k=a||m,C=s||y,E=e.useRef(null),S=e.useRef(null),_=e.useRef(d),I=null!=c,A=Uv(c),N=Uv(i),O=Uv(u),R=e.useCallback((()=>{if(!E.current||!S.current)return;const e={placement:n,strategy:r,middleware:p};N.current&&(e.platform=N.current),Wv(E.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};T.current&&!$v(_.current,t)&&(_.current=t,x.flushSync((()=>{f(t)})))}))}),[p,n,r,N,O]);Xv((()=>{!1===u&&_.current.isPositioned&&(_.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const T=e.useRef(!1);Xv((()=>(T.current=!0,()=>{T.current=!1})),[]),Xv((()=>{if(k&&(E.current=k),C&&(S.current=C),k&&C){if(A.current)return A.current(k,C,R);R()}}),[k,C,R,A,I]);const M=e.useMemo((()=>({reference:E,floating:S,setReference:v,setFloating:w})),[v,w]),P=e.useMemo((()=>({reference:k,floating:C})),[k,C]),D=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!P.floating)return e;const t=Yv(P.floating,d.x),n=Yv(P.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Zv(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,l,P.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:R,refs:M,elements:P,floatingStyles:D})),[d,R,M,P,D])}({strategy:"fixed",placement:I,whileElementsMounted:(...e)=>jv(...e,{animationFrame:"always"===h}),elements:{reference:y.anchor},middleware:[Kv({mainAxis:i+_,alignmentAxis:s}),c&&qv({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?Qv():void 0,...R}),c&&ew({...R}),tw({...R,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),k&&rw({element:k,padding:l}),Cw({arrowWidth:S,arrowHeight:_}),p&&nw({strategy:"referenceHidden",...R})]}),[B,L]=Ew(P),z=Ed(m);wd((()=>{D&&z?.()}),[D,z]);const F=j.arrow?.x,V=j.arrow?.y,G=0!==j.arrow?.centerOffset,[H,W]=e.useState();return wd((()=>{b&&W(window.getComputedStyle(b).zIndex)}),[b]),yd.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:yd.jsx(gw,{scope:r,placedSide:B,onArrowChange:C,arrowX:F,arrowY:V,shouldHideArrow:G,children:yd.jsx(Od.div,{"data-side":B,"data-align":L,...g,ref:w,style:{...g.style,animation:D?void 0:"none"}})})})}));bw.displayName=mw;var vw="PopperArrow",ww={top:"bottom",right:"left",bottom:"top",left:"right"},xw=e.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=yw(vw,n),i=ww[o.placedSide];return yd.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:yd.jsx(iw,{...r,ref:t,style:{...r.style,display:"block"}})})}));function kw(e){return null!==e}xw.displayName=vw;var Cw=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=Ew(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+s/2;let p="",h="";return"bottom"===l?(p=i?u:`${d}px`,h=-s+"px"):"top"===l?(p=i?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",h=i?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}});function Ew(e){const[t,n="center"]=e.split("-");return[t,n]}var Sw=fw,_w=hw,Iw=bw,Aw=xw,Nw="rovingFocusGroup.onEntryFocus",Ow={bubbles:!1,cancelable:!0},Rw="RovingFocusGroup",[Tw,Mw,Pw]=Ib(Rw),[Dw,jw]=bd(Rw,[Pw]),[Bw,Lw]=Dw(Rw),zw=e.forwardRef(((e,t)=>yd.jsx(Tw.Provider,{scope:e.__scopeRovingFocusGroup,children:yd.jsx(Tw.Slot,{scope:e.__scopeRovingFocusGroup,children:yd.jsx(Fw,{...e,ref:t})})})));zw.displayName=Rw;var Fw=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,p=e.useRef(null),h=cd(n,p),m=Nb(a),[g=null,y]=Sd({prop:s,defaultProp:l,onChange:c}),[b,v]=e.useState(!1),w=Ed(u),x=Mw(r),k=e.useRef(!1),[C,E]=e.useState(0);return e.useEffect((()=>{const e=p.current;if(e)return e.addEventListener(Nw,w),()=>e.removeEventListener(Nw,w)}),[w]),yd.jsx(Bw,{scope:r,orientation:o,dir:m,loop:i,currentTabStopId:g,onItemFocus:e.useCallback((e=>y(e)),[y]),onItemShiftTab:e.useCallback((()=>v(!0)),[]),onFocusableItemAdd:e.useCallback((()=>E((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>E((e=>e-1))),[]),children:yd.jsx(Od.div,{tabIndex:b||0===C?-1:0,"data-orientation":o,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:ad(t.onMouseDown,(()=>{k.current=!0})),onFocus:ad(t.onFocus,(e=>{const t=!k.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(Nw,Ow);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));Ww([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}k.current=!1})),onBlur:ad(t.onBlur,(()=>v(!1)))})})})),Vw="RovingFocusGroupItem",Gw=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:a,...s}=t,l=Cd(),c=a||l,u=Lw(Vw,r),d=u.currentTabStopId===c,f=Mw(r),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return e.useEffect((()=>{if(o)return p(),()=>h()}),[o,p,h]),yd.jsx(Tw.ItemSlot,{scope:r,id:c,focusable:o,active:i,children:yd.jsx(Od.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:n,onMouseDown:ad(t.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:ad(t.onFocus,(()=>u.onItemFocus(c))),onKeyDown:ad(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:Hw[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=u.loop?function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(n,r+1):n.slice(r+1)}setTimeout((()=>Ww(n)))}}))})})}));Gw.displayName=Vw;var Hw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ww(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var Xw=zw,$w=Gw,Zw=["Enter"," "],Yw=["ArrowUp","PageDown","End"],Uw=["ArrowDown","PageUp","Home",...Yw],Jw={ltr:[...Zw,"ArrowRight"],rtl:[...Zw,"ArrowLeft"]},Kw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},qw="Menu",[Qw,ex,tx]=Ib(qw),[nx,rx]=bd(qw,[tx,cw,jw]),ox=cw(),ix=jw(),[ax,sx]=nx(qw),[lx,cx]=nx(qw),ux=t=>{const{__scopeMenu:n,open:r=!1,children:o,dir:i,onOpenChange:a,modal:s=!0}=t,l=ox(n),[c,u]=e.useState(null),d=e.useRef(!1),f=Ed(a),p=Nb(i);return e.useEffect((()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),yd.jsx(Sw,{...l,children:yd.jsx(ax,{scope:n,open:r,onOpenChange:f,content:c,onContentChange:u,children:yd.jsx(lx,{scope:n,onClose:e.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:o})})})};ux.displayName=qw;var dx=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=ox(n);return yd.jsx(_w,{...o,...r,ref:t})}));dx.displayName="MenuAnchor";var[fx,px]=nx("MenuPortal",{forceMount:void 0}),hx="MenuContent",[mx,gx]=nx(hx),yx=e.forwardRef(((e,t)=>{const n=px(hx,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=sx(hx,e.__scopeMenu),a=cx(hx,e.__scopeMenu);return yd.jsx(Qw.Provider,{scope:e.__scopeMenu,children:yd.jsx(qd,{present:r||i.open,children:yd.jsx(Qw.Slot,{scope:e.__scopeMenu,children:a.modal?yd.jsx(bx,{...o,ref:t}):yd.jsx(vx,{...o,ref:t})})})})})),bx=e.forwardRef(((t,n)=>{const r=sx(hx,t.__scopeMenu),o=e.useRef(null),i=cd(n,o);return e.useEffect((()=>{const e=o.current;if(e)return qf(e)}),[]),yd.jsx(wx,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ad(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})})),vx=e.forwardRef(((e,t)=>{const n=sx(hx,e.__scopeMenu);return yd.jsx(wx,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),wx=e.forwardRef(((t,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,disableOutsideScroll:m,...g}=t,y=sx(hx,r),b=cx(hx,r),v=ox(r),w=ix(r),x=ex(r),[k,C]=e.useState(null),E=e.useRef(null),S=cd(n,E,y.onContentChange),_=e.useRef(0),I=e.useRef(""),A=e.useRef(0),N=e.useRef(null),O=e.useRef("right"),R=e.useRef(0),T=m?Xf:e.Fragment,M=m?{as:_d,allowPinchZoom:!0}:void 0,P=e=>{const t=I.current+e,n=x().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(e,Math.max(i,0));1===o.length&&(a=a.filter((e=>e!==n)));const s=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return s!==n?s:void 0}(n.map((e=>e.textValue)),t,o),a=n.find((e=>e.textValue===i))?.ref.current;!function e(t){I.current=t,window.clearTimeout(_.current),""!==t&&(_.current=window.setTimeout((()=>e("")),1e3))}(t),a&&setTimeout((()=>a.focus()))};e.useEffect((()=>()=>window.clearTimeout(_.current)),[]),tf();const D=e.useCallback((e=>O.current===N.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,t)}(e,N.current?.area)),[]);return yd.jsx(mx,{scope:r,searchRef:I,onItemEnter:e.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:e.useCallback((e=>{D(e)||(E.current?.focus(),C(null))}),[D]),onTriggerLeave:e.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:A,onPointerGraceIntentChange:e.useCallback((e=>{N.current=e}),[]),children:yd.jsx(T,{...M,children:yd.jsx(Wd,{asChild:!0,trapped:i,onMountAutoFocus:ad(a,(e=>{e.preventDefault(),E.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:s,children:yd.jsx(Bd,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,children:yd.jsx(Xw,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:o,currentTabStopId:k,onCurrentTabStopIdChange:C,onEntryFocus:ad(c,(e=>{b.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:yd.jsx(Iw,{role:"menu","aria-orientation":"vertical","data-state":Yx(y.open),"data-radix-menu-content":"",dir:b.dir,...v,...g,ref:S,style:{outline:"none",...g.style},onKeyDown:ad(g.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&P(e.key));const o=E.current;if(e.target!==o)return;if(!Uw.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));Yw.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)})),onBlur:ad(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(_.current),I.current="")})),onPointerMove:ad(t.onPointerMove,Kx((e=>{const t=e.target,n=R.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>R.current?"right":"left";O.current=t,R.current=e.clientX}})))})})})})})})}));yx.displayName=hx;var xx=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return yd.jsx(Od.div,{role:"group",...r,ref:t})}));xx.displayName="MenuGroup";var kx=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return yd.jsx(Od.div,{...r,ref:t})}));kx.displayName="MenuLabel";var Cx="MenuItem",Ex="menu.itemSelect",Sx=e.forwardRef(((t,n)=>{const{disabled:r=!1,onSelect:o,...i}=t,a=e.useRef(null),s=cx(Cx,t.__scopeMenu),l=gx(Cx,t.__scopeMenu),c=cd(n,a),u=e.useRef(!1);return yd.jsx(_x,{...i,ref:c,disabled:r,onClick:ad(t.onClick,(()=>{const e=a.current;if(!r&&e){const t=new CustomEvent(Ex,{bubbles:!0,cancelable:!0});e.addEventListener(Ex,(e=>o?.(e)),{once:!0}),Rd(e,t),t.defaultPrevented?u.current=!1:s.onClose()}})),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:ad(t.onPointerUp,(e=>{u.current||e.currentTarget?.click()})),onKeyDown:ad(t.onKeyDown,(e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||Zw.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));Sx.displayName=Cx;var _x=e.forwardRef(((t,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...a}=t,s=gx(Cx,r),l=ix(r),c=e.useRef(null),u=cd(n,c),[d,f]=e.useState(!1),[p,h]=e.useState("");return e.useEffect((()=>{const e=c.current;e&&h((e.textContent??"").trim())}),[a.children]),yd.jsx(Qw.ItemSlot,{scope:r,disabled:o,textValue:i??p,children:yd.jsx($w,{asChild:!0,...l,focusable:!o,children:yd.jsx(Od.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:ad(t.onPointerMove,Kx((e=>{if(o)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:ad(t.onPointerLeave,Kx((e=>s.onItemLeave(e)))),onFocus:ad(t.onFocus,(()=>f(!0))),onBlur:ad(t.onBlur,(()=>f(!1)))})})})})),Ix=e.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return yd.jsx(Dx,{scope:e.__scopeMenu,checked:n,children:yd.jsx(Sx,{role:"menuitemcheckbox","aria-checked":Ux(n)?"mixed":n,...o,ref:t,"data-state":Jx(n),onSelect:ad(o.onSelect,(()=>r?.(!!Ux(n)||!n)),{checkForDefaultPrevented:!1})})})}));Ix.displayName="MenuCheckboxItem";var Ax="MenuRadioGroup",[Nx,Ox]=nx(Ax,{value:void 0,onValueChange:()=>{}}),Rx=e.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Ed(r);return yd.jsx(Nx,{scope:e.__scopeMenu,value:n,onValueChange:i,children:yd.jsx(xx,{...o,ref:t})})}));Rx.displayName=Ax;var Tx="MenuRadioItem",Mx=e.forwardRef(((e,t)=>{const{value:n,...r}=e,o=Ox(Tx,e.__scopeMenu),i=n===o.value;return yd.jsx(Dx,{scope:e.__scopeMenu,checked:i,children:yd.jsx(Sx,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":Jx(i),onSelect:ad(r.onSelect,(()=>o.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));Mx.displayName=Tx;var Px="MenuItemIndicator",[Dx,jx]=nx(Px,{checked:!1}),Bx=e.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=jx(Px,n);return yd.jsx(qd,{present:r||Ux(i.checked)||!0===i.checked,children:yd.jsx(Od.span,{...o,ref:t,"data-state":Jx(i.checked)})})}));Bx.displayName=Px;var Lx=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return yd.jsx(Od.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));Lx.displayName="MenuSeparator";var zx=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=ox(n);return yd.jsx(Aw,{...o,...r,ref:t})}));zx.displayName="MenuArrow";var Fx="MenuSub",[Vx,Gx]=nx(Fx),Hx=t=>{const{__scopeMenu:n,children:r,open:o=!1,onOpenChange:i}=t,a=sx(Fx,n),s=ox(n),[l,c]=e.useState(null),[u,d]=e.useState(null),f=Ed(i);return e.useEffect((()=>(!1===a.open&&f(!1),()=>f(!1))),[a.open,f]),yd.jsx(Sw,{...s,children:yd.jsx(ax,{scope:n,open:o,onOpenChange:f,content:u,onContentChange:d,children:yd.jsx(Vx,{scope:n,contentId:Cd(),triggerId:Cd(),trigger:l,onTriggerChange:c,children:r})})})};Hx.displayName=Fx;var Wx="MenuSubTrigger",Xx=e.forwardRef(((t,n)=>{const r=sx(Wx,t.__scopeMenu),o=cx(Wx,t.__scopeMenu),i=Gx(Wx,t.__scopeMenu),a=gx(Wx,t.__scopeMenu),s=e.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:t.__scopeMenu},d=e.useCallback((()=>{s.current&&window.clearTimeout(s.current),s.current=null}),[]);return e.useEffect((()=>d),[d]),e.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),yd.jsx(dx,{asChild:!0,...u,children:yd.jsx(_x,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":Yx(r.open),...t,ref:ld(n,i.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:ad(t.onPointerMove,Kx((e=>{a.onItemEnter(e),e.defaultPrevented||t.disabled||r.open||s.current||(a.onPointerGraceIntentChange(null),s.current=window.setTimeout((()=>{r.onOpenChange(!0),d()}),100))}))),onPointerLeave:ad(t.onPointerLeave,Kx((e=>{d();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,i=o?-5:5,s=t[o?"left":"right"],c=t[o?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:ad(t.onKeyDown,(e=>{const n=""!==a.searchRef.current;t.disabled||n&&" "===e.key||Jw[o.dir].includes(e.key)&&(r.onOpenChange(!0),r.content?.focus(),e.preventDefault())}))})})}));Xx.displayName=Wx;var $x="MenuSubContent",Zx=e.forwardRef(((t,n)=>{const r=px(hx,t.__scopeMenu),{forceMount:o=r.forceMount,...i}=t,a=sx(hx,t.__scopeMenu),s=cx(hx,t.__scopeMenu),l=Gx($x,t.__scopeMenu),c=e.useRef(null),u=cd(n,c);return yd.jsx(Qw.Provider,{scope:t.__scopeMenu,children:yd.jsx(qd,{present:o||a.open,children:yd.jsx(Qw.Slot,{scope:t.__scopeMenu,children:yd.jsx(wx,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:ad(t.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:ad(t.onEscapeKeyDown,(e=>{s.onClose(),e.preventDefault()})),onKeyDown:ad(t.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=Kw[s.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function Yx(e){return e?"open":"closed"}function Ux(e){return"indeterminate"===e}function Jx(e){return Ux(e)?"indeterminate":e?"checked":"unchecked"}function Kx(e){return t=>"mouse"===t.pointerType?e(t):void 0}Zx.displayName=$x;var qx=ux,Qx=dx,ek=yx,tk=xx,nk=kx,rk=Sx,ok=Ix,ik=Rx,ak=Mx,sk=Bx,lk=Lx,ck=zx,uk=Hx,dk=Xx,fk=Zx,pk="DropdownMenu",[hk,mk]=bd(pk,[rx]),gk=rx(),[yk,bk]=hk(pk),vk=t=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:i,defaultOpen:a,onOpenChange:s,modal:l=!0}=t,c=gk(n),u=e.useRef(null),[d=!1,f]=Sd({prop:i,defaultProp:a,onChange:s});return yd.jsx(yk,{scope:n,triggerId:Cd(),triggerRef:u,contentId:Cd(),open:d,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:yd.jsx(qx,{...c,open:d,onOpenChange:f,dir:o,modal:l,children:r})})};vk.displayName=pk;var wk="DropdownMenuTrigger",xk=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=bk(wk,n),a=gk(n);return yd.jsx(Qx,{asChild:!0,...a,children:yd.jsx(Od.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:ld(t,i.triggerRef),onPointerDown:ad(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:ad(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));xk.displayName=wk;var kk="DropdownMenuContent",Ck=e.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=bk(kk,r),a=gk(r),s=e.useRef(!1);return yd.jsx(ek,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...o,ref:n,onCloseAutoFocus:ad(t.onCloseAutoFocus,(e=>{s.current||i.triggerRef.current?.focus(),s.current=!1,e.preventDefault()})),onInteractOutside:ad(t.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(s.current=!0)})),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));Ck.displayName=kk;var Ek=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(tk,{...o,...r,ref:t})}));Ek.displayName="DropdownMenuGroup";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(nk,{...o,...r,ref:t})})).displayName="DropdownMenuLabel";var Sk=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(rk,{...o,...r,ref:t})}));Sk.displayName="DropdownMenuItem";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(ok,{...o,...r,ref:t})})).displayName="DropdownMenuCheckboxItem";var _k=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(ik,{...o,...r,ref:t})}));_k.displayName="DropdownMenuRadioGroup";var Ik=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(ak,{...o,...r,ref:t})}));Ik.displayName="DropdownMenuRadioItem";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(sk,{...o,...r,ref:t})})).displayName="DropdownMenuItemIndicator";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(lk,{...o,...r,ref:t})})).displayName="DropdownMenuSeparator";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(ck,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var Ak=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(dk,{...o,...r,ref:t})}));Ak.displayName="DropdownMenuSubTrigger";var Nk=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=gk(n);return yd.jsx(fk,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));Nk.displayName="DropdownMenuSubContent";var Ok=vk,Rk=xk,Tk=Ck,Mk=Ek,Pk=Sk,Dk=_k,jk=Ik,Bk=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=gk(t),[s=!1,l]=Sd({prop:r,defaultProp:i,onChange:o});return yd.jsx(uk,{...a,open:s,onOpenChange:l,children:n})},Lk=Ak,zk=Nk;function Fk(e,t){return function(e,t){return new Blob([e],{type:t})}(function(e){const t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r}(e),t)}function Vk(e,t=!0){return new Promise((n=>{const r=new FileReader;r.onload=()=>{const e=r.result;t&&n(e.split(",")[1]),n(e)},r.readAsDataURL(e)}))}function Gk(e){return function(e){return new Promise((t=>{const n=document.createElement("input");n.type="file",n.accept=e,n.onchange=()=>{const e=n.files?.[0];e&&t(e)},n.click()}))}(e).then(Vk)}const Hk=!process.env.NODE_ENV||"development"===process.env.NODE_ENV,Wk={xxs:0,xs:320,s:480,m:768,l:960,xl:1280,xxl:1920},Xk=e.createContext(void 0),$k=e.forwardRef(((t,n)=>{const{className:r,children:o,...i}=t,[a,s]=e.useState("m"),[l,c]=e.useState(0),[u,d]=e.useState(0),f=e.useRef(null);e.useImperativeHandle(n,(()=>f.current),[]);const p=e.useCallback((e=>{const t=e.width,n=e.height;let r="xxs";Object.entries(Wk).forEach((([e,n])=>{t>=n&&(r=e)})),s((e=>e!==r?r:e)),c(t),d(n)}),[]);return e.useEffect((()=>{const e=f.current;if(!e)return;const t=new ResizeObserver((e=>{for(let t of e)p(t.contentRect)}));return t.observe(e),p(e.getBoundingClientRect()),()=>{t.disconnect()}}),[]),e.createElement(Xk.Provider,{value:{wKey:a,w:l,h:u}},e.createElement("div",{ref:f,className:`size-context w-${a} ${r||""}`.trim(),...i},o))})),Zk=t=>((e,t)=>e!=t&&(""==e||Wk[e]<Wk[t]))((()=>{const t=e.useContext(Xk);if(!t)throw new Error("useSizeContext must be used within a SizeContextContainerContext");return t})().wKey,t),Yk=({direction:t,className:n="",children:r,wrap:o=!1,grow:i=!1,...a})=>{let s="";"string"==typeof t?s=`direction-${t} `:"object"==typeof t&&null!==t&&Object.entries(t).forEach((([e,t])=>{s+=""===e?`direction-${t} `:`${e}-direction-${t} `}));let l="";"boolean"==typeof i?l=i?"grow ":"":"object"==typeof i&&null!==i&&Object.entries(i).forEach((([e,t])=>{l+=""===e?t?"grow ":"no-grow":t?`${e}-grow `:`${e}-no-grow`})),s+=l,o&&(s+="flex-wrap "),s=s.trim();const c=`float-container ${s} ${n}`.trim();return e.createElement("div",{className:c,...a},r)},Uk=({direction:t,expanded:n=!0,children:r,className:o,maxSize:i,expanderSize:a="40px",containerStyle:s,style:l,containerClassName:c,onExpandChange:u,...d})=>{const f={up:bb,down:yb,left:fb,right:db}[t],p={up:yb,down:bb,left:db,right:fb}[t],[h,m]=e.useState(n),g=`${t} ${h?"expanded":"collapsed"}`,y="right"===t||"left"===t?{width:h?i:a}:{height:h?i:a},b="right"===t||"left"===t?{width:h?i:0}:{height:h?i:0},v="right"===t||"left"===t?{width:a}:{height:a},w=e.createElement("div",{className:`expanding_container_content ${g} ${o||""}`.trim(),style:{...l,...b},...d},r),x=e.createElement("div",{className:`expanding_container_expander ${g}`,onClick:()=>(e=>{h!==e&&(m(e),u&&u(e))})(!h),style:v},h?e.createElement(p,null):e.createElement(f,null)),k="right"===t||"down"===t?w:x,C="left"===t||"up"===t?w:x;return e.createElement("div",{className:`expanding_container ${g} ${c||""}`,style:{...s,...y}},k,C)},Jk=({trigger:t,setOpen:n,open:r})=>{const[i,a]=c(""),s=o(AG);return s.options.useWorkerManager?e.createElement(_b,{setOpen:n,open:r,trigger:t,title:"New Worker",description:"Create a new worker"},e.createElement("div",null,"Name:",e.createElement("br",null),e.createElement("input",{className:"styledinput",onChange:e=>{a(e.currentTarget.value)},value:i})),e.createElement("div",null,i&&e.createElement("div",null,e.createElement("button",{className:"styledbtn",onClick:()=>{s.workermanager?.new_worker({name:i}),n(!1)}},"Create")))):null},Kk=({trigger:t,setOpen:n,open:r})=>{const i=o(AG),[a,s]=c(!1),l=i.workers(),u=i.worker?.uuid,d=(u?l[u]?.name:void 0)||u||"worker";return e.createElement(_b,{setOpen:n,open:r,trigger:t,title:"Export Worker",description:"Export the worker as a .fnw file"},e.createElement("div",null,e.createElement("div",null,e.createElement("input",{type:"checkbox",className:"styledcheckbox",checked:a,onChange:e=>{s(e.currentTarget.checked)}}),"Include Files"),e.createElement("button",{className:"styledbtn",onClick:async()=>{if(!i.worker)return;!function(e,t,n){const r=Fk(e,n),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,i.click(),URL.revokeObjectURL(o),i.remove()}(await i.worker.export({withFiles:a}),d+".fnw","application/zip"),n(!1)}},"Export")))},qk=()=>{const t=o(AG).progress_state();return e.createElement("div",{className:"statusbar"},e.createElement("span",{className:"statusbar-progressbar",style:{width:Math.min(100,100*t.progress)+"%"}}),e.createElement("span",{className:"statusbar-message"},t.message))},Qk=()=>{const t=o(AG),n=t.workers(),[r,i]=c(!1),[a,s]=c(!1),l=t.options.useWorkerManager&&t.workermanager&&t.workermanager.open||Hk,u=l&&Object.keys(n).length>0,d=t.worker&&t.worker.is_open,f=d&&l;return l||d?e.createElement(e.Fragment,null,e.createElement(Ok,null,e.createElement(Rk,{asChild:!0},e.createElement("button",{className:"styledbtn"},e.createElement(Yk,{direction:"row"},"Worker ",e.createElement(ub,null)))),e.createElement(Tk,{className:"headermenucontent funcnodescontainer"},e.createElement(Mk,null,u&&e.createElement(Bk,null,e.createElement(Lk,{className:"headermenuitem submenuitem"},e.createElement(Yk,{direction:"row"},"Select",e.createElement(db,null))),e.createElement(zk,{className:"headermenucontent funcnodescontainer",sideOffset:2,alignOffset:-5},e.createElement(Dk,{value:t.worker?.uuid,onValueChange:e=>{(e=>{if("__select__"!==e&&t.workers&&t.workermanager&&n[e]){if(!n[e].active&&!window.confirm("this is an inactive worker, selecting it will start it, continue?"))return;t.workermanager.set_active(e)}})(e)}},Object.keys(n).sort(((e,t)=>{if(n[e].active&&!n[t].active)return-1;if(!n[e].active&&n[t].active)return 1;const r=n[e].name||e,o=n[t].name||t;return r.localeCompare(o)})).map((r=>e.createElement(jk,{className:"headermenuitem workerselectoption"+(n[r]?.active?" active":" inactive")+" headermenuitem",key:r,value:r,disabled:r===t.worker?.uuid},n[r]?.name||r)))))),d&&e.createElement(e.Fragment,null,f&&e.createElement(Pk,{className:"headermenuitem",onClick:()=>{if(t.worker)return t.workermanager?void t.workermanager?.restart_worker(t.worker.uuid):t.logger.error("no workermanager")}},"Restart"),e.createElement(Pk,{className:"headermenuitem",onClick:()=>{t.worker&&t.worker.stop()}},"Stop"),e.createElement(Pk,{className:"headermenuitem",onClick:()=>s(!0)},"Export"),e.createElement(Pk,{className:"headermenuitem",onClick:async()=>{if(!t.worker)return;if(!window.confirm("Updateing the worker might replace the current nodespace, continue?"))return;const e=await Gk(".fnw");t.worker.update_from_export(e)}},"Update")),l&&e.createElement(e.Fragment,null,e.createElement(Pk,{className:"headermenuitem",onClick:()=>i(!0)},"New"))))),e.createElement(Jk,{open:r,setOpen:i}),e.createElement(Kk,{open:a,setOpen:s})):null},eC=()=>{const t=o(AG);return e.createElement(e.Fragment,null,e.createElement(Ok,null,e.createElement(Rk,{asChild:!0},e.createElement("button",{className:"styledbtn"},e.createElement(Yk,{direction:"row"},"Nodespace ",e.createElement(ub,null)))),e.createElement(Tk,{className:"headermenucontent funcnodescontainer"},e.createElement(Mk,null,e.createElement(Pk,{className:"headermenuitem",onClick:()=>{window.confirm("Are you sure you want to start a new flow?")&&t.worker?.clear()}},"New"),e.createElement(Pk,{className:"headermenuitem",onClick:async()=>{const e=await(t.worker?.save());if(!e)return;const n=new Blob([JSON.stringify(e)],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download="flow.json",o.click(),URL.revokeObjectURL(r),o.remove()}},"Save"),e.createElement(Pk,{className:"headermenuitem",onClick:async()=>{const e=document.createElement("input");e.type="file",e.accept=".json",e.onchange=async e=>{const n=e.target.files?.[0];if(!n)return;const r=new FileReader;r.onload=async e=>{const n=e.target?.result;if(!n)return;const r=JSON.parse(n);await(t.worker?.load(r))},r.readAsText(n)},e.click()}},"Load")))))},tC=({...t})=>{const n=o(AG),r=n.workerstate();return Object.keys(t).length>0&&n.logger.debug("headerprops",t),e.createElement(Yk,{className:"funcnodesreactflowheader",direction:"row",wrap:!0},e.createElement(Yk,{className:"headerelement m-w-6",grow:{"":!0,m:!1}},e.createElement(qk,null)),(t.showmenu||Hk)&&e.createElement(Yk,{direction:"row",wrap:!0},e.createElement("div",{className:"headerelement"},e.createElement(Qk,null)),(n.worker&&r.is_open||Hk)&&e.createElement("div",{className:"headerelement"},e.createElement(eC,null))))};const nC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oC={};function iC(e,t){return(oC.jsx?rC:nC).test(e)}const aC=/[ \t\n\f\r]/g;function sC(e){return""===e.replace(aC,"")}class lC{constructor(e,t,n){this.property=e,this.normal=t,n&&(this.space=n)}}function cC(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new lC(n,r,t)}function uC(e){return e.toLowerCase()}lC.prototype.property={},lC.prototype.normal={},lC.prototype.space=null;class dC{constructor(e,t){this.property=e,this.attribute=t}}dC.prototype.space=null,dC.prototype.boolean=!1,dC.prototype.booleanish=!1,dC.prototype.overloadedBoolean=!1,dC.prototype.number=!1,dC.prototype.commaSeparated=!1,dC.prototype.spaceSeparated=!1,dC.prototype.commaOrSpaceSeparated=!1,dC.prototype.mustUseProperty=!1,dC.prototype.defined=!1;let fC=0;const pC=wC(),hC=wC(),mC=wC(),gC=wC(),yC=wC(),bC=wC(),vC=wC();function wC(){return 2**++fC}var xC=Object.freeze({__proto__:null,boolean:pC,booleanish:hC,commaOrSpaceSeparated:vC,commaSeparated:bC,number:gC,overloadedBoolean:mC,spaceSeparated:yC});const kC=Object.keys(xC);class CC extends dC{constructor(e,t,n,r){let o=-1;if(super(e,t),EC(this,"space",r),"number"==typeof n)for(;++o<kC.length;){const e=kC[o];EC(this,kC[o],(n&xC[e])===xC[e])}}}function EC(e,t,n){n&&(e[t]=n)}CC.prototype.defined=!0;const SC={}.hasOwnProperty;function _C(e){const t={},n={};let r;for(r in e.properties)if(SC.call(e.properties,r)){const o=e.properties[r],i=new CC(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[uC(r)]=r,n[uC(i.attribute)]=r}return new lC(t,n,e.space)}const IC=_C({space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase(),properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),AC=_C({space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase(),properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function NC(e,t){return t in e?e[t]:t}function OC(e,t){return NC(e,t.toLowerCase())}const RC=_C({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:OC,properties:{xmlns:null,xmlnsXLink:null}}),TC=_C({transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase(),properties:{ariaActiveDescendant:null,ariaAtomic:hC,ariaAutoComplete:null,ariaBusy:hC,ariaChecked:hC,ariaColCount:gC,ariaColIndex:gC,ariaColSpan:gC,ariaControls:yC,ariaCurrent:null,ariaDescribedBy:yC,ariaDetails:null,ariaDisabled:hC,ariaDropEffect:yC,ariaErrorMessage:null,ariaExpanded:hC,ariaFlowTo:yC,ariaGrabbed:hC,ariaHasPopup:null,ariaHidden:hC,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yC,ariaLevel:gC,ariaLive:null,ariaModal:hC,ariaMultiLine:hC,ariaMultiSelectable:hC,ariaOrientation:null,ariaOwns:yC,ariaPlaceholder:null,ariaPosInSet:gC,ariaPressed:hC,ariaReadOnly:hC,ariaRelevant:null,ariaRequired:hC,ariaRoleDescription:yC,ariaRowCount:gC,ariaRowIndex:gC,ariaRowSpan:gC,ariaSelected:hC,ariaSetSize:gC,ariaSort:null,ariaValueMax:gC,ariaValueMin:gC,ariaValueNow:gC,ariaValueText:null,role:null}}),MC=_C({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:OC,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:bC,acceptCharset:yC,accessKey:yC,action:null,allow:null,allowFullScreen:pC,allowPaymentRequest:pC,allowUserMedia:pC,alt:null,as:null,async:pC,autoCapitalize:null,autoComplete:yC,autoFocus:pC,autoPlay:pC,blocking:yC,capture:null,charSet:null,checked:pC,cite:null,className:yC,cols:gC,colSpan:null,content:null,contentEditable:hC,controls:pC,controlsList:yC,coords:gC|bC,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pC,defer:pC,dir:null,dirName:null,disabled:pC,download:mC,draggable:hC,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pC,formTarget:null,headers:yC,height:gC,hidden:pC,high:gC,href:null,hrefLang:null,htmlFor:yC,httpEquiv:yC,id:null,imageSizes:null,imageSrcSet:null,inert:pC,inputMode:null,integrity:null,is:null,isMap:pC,itemId:null,itemProp:yC,itemRef:yC,itemScope:pC,itemType:yC,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pC,low:gC,manifest:null,max:null,maxLength:gC,media:null,method:null,min:null,minLength:gC,multiple:pC,muted:pC,name:null,nonce:null,noModule:pC,noValidate:pC,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pC,optimum:gC,pattern:null,ping:yC,placeholder:null,playsInline:pC,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pC,referrerPolicy:null,rel:yC,required:pC,reversed:pC,rows:gC,rowSpan:gC,sandbox:yC,scope:null,scoped:pC,seamless:pC,selected:pC,shadowRootClonable:pC,shadowRootDelegatesFocus:pC,shadowRootMode:null,shape:null,size:gC,sizes:null,slot:null,span:gC,spellCheck:hC,src:null,srcDoc:null,srcLang:null,srcSet:null,start:gC,step:null,style:null,tabIndex:gC,target:null,title:null,translate:null,type:null,typeMustMatch:pC,useMap:null,value:hC,width:gC,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yC,axis:null,background:null,bgColor:null,border:gC,borderColor:null,bottomMargin:gC,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pC,declare:pC,event:null,face:null,frame:null,frameBorder:null,hSpace:gC,leftMargin:gC,link:null,longDesc:null,lowSrc:null,marginHeight:gC,marginWidth:gC,noResize:pC,noHref:pC,noShade:pC,noWrap:pC,object:null,profile:null,prompt:null,rev:null,rightMargin:gC,rules:null,scheme:null,scrolling:hC,standby:null,summary:null,text:null,topMargin:gC,valueType:null,version:null,vAlign:null,vLink:null,vSpace:gC,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pC,disableRemotePlayback:pC,prefix:null,property:null,results:gC,security:null,unselectable:null}}),PC=_C({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:NC,properties:{about:vC,accentHeight:gC,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:gC,amplitude:gC,arabicForm:null,ascent:gC,attributeName:null,attributeType:null,azimuth:gC,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:gC,by:null,calcMode:null,capHeight:gC,className:yC,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:gC,diffuseConstant:gC,direction:null,display:null,dur:null,divisor:gC,dominantBaseline:null,download:pC,dx:null,dy:null,edgeMode:null,editable:null,elevation:gC,enableBackground:null,end:null,event:null,exponent:gC,externalResourcesRequired:null,fill:null,fillOpacity:gC,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:bC,g2:bC,glyphName:bC,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:gC,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:gC,horizOriginX:gC,horizOriginY:gC,id:null,ideographic:gC,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:gC,k:gC,k1:gC,k2:gC,k3:gC,k4:gC,kernelMatrix:vC,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:gC,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:gC,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:gC,overlineThickness:gC,paintOrder:null,panose1:null,path:null,pathLength:gC,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yC,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:gC,pointsAtY:gC,pointsAtZ:gC,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vC,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vC,rev:vC,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vC,requiredFeatures:vC,requiredFonts:vC,requiredFormats:vC,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:gC,specularExponent:gC,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:gC,strikethroughThickness:gC,string:null,stroke:null,strokeDashArray:vC,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:gC,strokeOpacity:gC,strokeWidth:null,style:null,surfaceScale:gC,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vC,tabIndex:gC,tableValues:null,target:null,targetX:gC,targetY:gC,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vC,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:gC,underlineThickness:gC,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:gC,values:null,vAlphabetic:gC,vMathematical:gC,vectorEffect:null,vHanging:gC,vIdeographic:gC,version:null,vertAdvY:gC,vertOriginX:gC,vertOriginY:gC,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:gC,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),DC=/^data[-\w.:]+$/i,jC=/-[a-z]/g,BC=/[A-Z]/g;function LC(e){return"-"+e.toLowerCase()}function zC(e){return e.charAt(1).toUpperCase()}const FC={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},VC=cC([AC,IC,RC,TC,MC],"html"),GC=cC([AC,IC,RC,TC,PC],"svg");var HC,WC,XC,$C={};var ZC=function(){if(XC)return $C;XC=1;var e=$C&&$C.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($C,"__esModule",{value:!0}),$C.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),i="function"==typeof n;return o.forEach((function(e){if("declaration"===e.type){var t=e.property,o=e.value;i?n(t,o,e):o&&((r=r||{})[t]=o)}})),r};var t=e(function(){if(WC)return HC;WC=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return HC=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,f=1;function p(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=f,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function b(){y(n)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return f+=2,p(n),s=s.slice(t),f+=2,e({type:"comment",comment:n})}}function x(){var t=h(),n=y(r);if(n){if(w(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,b(),function(){var e,t=[];for(v(t);e=x();)!1!==e&&(t.push(e),v(t));return t}()},HC}());return $C}(),YC=I(ZC),UC=YC.default||YC;const JC=qC("end"),KC=qC("start");function qC(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function QC(e){return e&&"object"==typeof e?"position"in e||"type"in e?tE(e.position):"start"in e||"end"in e?tE(e):"line"in e||"column"in e?eE(e):"":""}function eE(e){return nE(e&&e.line)+":"+nE(e&&e.column)}function tE(e){return eE(e&&e.start)+"-"+eE(e&&e.end)}function nE(e){return e&&"number"==typeof e?e:1}class rE extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=QC(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}rE.prototype.file="",rE.prototype.name="",rE.prototype.reason="",rE.prototype.message="",rE.prototype.stack="",rE.prototype.column=void 0,rE.prototype.line=void 0,rE.prototype.ancestors=void 0,rE.prototype.cause=void 0,rE.prototype.fatal=void 0,rE.prototype.place=void 0,rE.prototype.ruleId=void 0,rE.prototype.source=void 0;const oE={}.hasOwnProperty,iE=new Map,aE=/[A-Z]/g,sE=/-([a-z])/g,lE=new Set(["table","tbody","thead","tfoot","tr"]),cE=new Set(["td","th"]),uE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function dE(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=KC(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?GC:VC,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=fE(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function fE(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=GC,e.schema=o);e.ancestors.push(t);const i=yE(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&oE.call(t.properties,o)){const i=gE(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&cE.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=mE(e,t);lE.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&sC(t.value):sC(t));var t})));return pE(e,a,i,t),hE(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}bE(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=GC,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:yE(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else bE(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else bE(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=mE(e,t);return pE(e,a,i,t),hE(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);bE(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return hE(r,mE(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function pE(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hE(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mE(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:iE;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=fE(e,i,a);void 0!==s&&n.push(s)}return n}function gE(e,t,n){const r=function(e,t){const n=uC(t);let r=t,o=dC;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&DC.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(jC,zC);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!jC.test(e)){let n=e.replace(BC,LC);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=CC}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){const n={};try{UC(t,r)}catch(t){if(!e.ignoreInvalidStyle){const n=t,r=new rE("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=uE+"#cannot-parse-style-attribute",r}}return n;function r(e,t){let r=e;"--"!==r.slice(0,2)&&("-ms-"===r.slice(0,4)&&(r="ms-"+r.slice(4)),r=r.replace(sE,wE)),n[r]=t}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)oE.call(e,n)&&(t[vE(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?FC[r.property]||r.property:r.attribute,n]}}function yE(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=iC(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=iC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return oE.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);bE(e)}function bE(e,t){const n=new rE("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=uE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function vE(e){let t=e.replace(aE,xE);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function wE(e,t){return t.toUpperCase()}function xE(e){return"-"+e.toLowerCase()}const kE={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},CE={};function EE(e,t){return SE(e,"boolean"!=typeof CE.includeImageAlt||CE.includeImageAlt,"boolean"!=typeof CE.includeHtml||CE.includeHtml)}function SE(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return _E(e.children,t,n)}return Array.isArray(e)?_E(e,t,n):""}function _E(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=SE(e[o],t,n);return r.join("")}const IE=document.createElement("i");function AE(e){const t="&"+e+";";IE.innerHTML=t;const n=IE.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function NE(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function OE(e,t){return e.length>0?(NE(e,e.length,0,t),e):t}const RE={}.hasOwnProperty;function TE(e){const t={};let n=-1;for(;++n<e.length;)ME(t,e[n]);return t}function ME(e,t){let n;for(n in t){const r=(RE.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){RE.call(r,i)||(r[i]=[]);const e=o[i];PE(r[i],Array.isArray(e)?e:e?[e]:[])}}}function PE(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);NE(e,0,0,r)}function DE(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function jE(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const BE=UE(/[A-Za-z]/),LE=UE(/[\dA-Za-z]/),zE=UE(/[#-'*+\--9=?A-Z^-~]/);function FE(e){return null!==e&&(e<32||127===e)}const VE=UE(/\d/),GE=UE(/[\dA-Fa-f]/),HE=UE(/[!-/:-@[-`{-~]/);function WE(e){return null!==e&&e<-2}function XE(e){return null!==e&&(e<0||32===e)}function $E(e){return-2===e||-1===e||32===e}const ZE=UE(/\p{P}|\p{S}/u),YE=UE(/\s/);function UE(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function JE(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&LE(e.charCodeAt(n+1))&&LE(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function KE(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if($E(r))return e.enter(n),a(r);return t(r)};function a(r){return $E(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const qE={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),KE(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):WE(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const QE={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return NE(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(eS,u,d)(o)}function u(e){return r&&b(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(eS,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):WE(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;NE(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},eS={tokenize:function(e,t,n){return KE(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function tS(e){return null===e||XE(e)||YE(e)?1:ZE(e)?2:void 0}function nS(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const rS={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[u][1].start};oS(d,-s),oS(f,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=OE(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=OE(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=OE(l,nS(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=OE(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=OE(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,NE(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=tS(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=tS(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function oS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const iS={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return BE(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||LE(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||LE(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||FE(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):zE(t)?(e.consume(t),l):n(t)}function c(e){return LE(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||LE(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const aS={partial:!0,tokenize:function(e,t,n){return function(t){return $E(t)?KE(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||WE(e)?t(e):n(e)}}};const sS={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if($E(t))return KE(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(sS,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return $E(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const lS={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return HE(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const cS={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=LE,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=GE,c):(e.enter("characterReferenceValue"),o=7,i=VE,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==LE||AE(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const uS={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},dS={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),$E(t)?KE(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),$E(t)?KE(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||WE(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),$E(t)?KE(e,c,"whitespace")(t):c(t))}function c(n){return null===n||WE(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(uS,p,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||WE(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):$E(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),KE(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||WE(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||WE(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&$E(t)?KE(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||WE(t)?e.check(uS,p,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||WE(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const fS={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),KE(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):WE(t)?e.attempt(pS,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||WE(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},pS={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):WE(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):KE(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):WE(e)?o(e):n(e)}}};const hS={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):WE(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||WE(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class mS{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&gS(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),gS(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),gS(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);gS(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);gS(this.left,t.reverse())}}}function gS(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function yS(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new mS(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,bS(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return NE(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function bS(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)"exit"===s[f][0]&&"enter"===s[f-1][0]&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=s.slice(g[f],g[f+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const vS={resolve:function(e){return yS(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):WE(t)?e.check(wS,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},wS={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),KE(e,o,"linePrefix")};function o(o){if(null===o||WE(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function xS(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||FE(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||WE(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!XE(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||FE(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function kS(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):WE(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||WE(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!$E(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function CS(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):WE(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),KE(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||WE(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function ES(e,t){let n;return function r(o){if(WE(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if($E(o))return KE(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const SS={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return kS.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=jE(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return XE(t)?ES(e,s)(t):s(t)}function s(t){return xS(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(_S,c,c)(t)}function c(t){return $E(t)?KE(e,u,"whitespace")(t):u(t)}function u(i){return null===i||WE(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},_S={partial:!0,tokenize:function(e,t,n){return function(t){return XE(t)?ES(e,r)(t):n(t)};function r(t){return CS(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return $E(t)?KE(e,i,"whitespace")(t):i(t)}function i(e){return null===e||WE(e)?t(e):n(e)}}};const IS={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return WE(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const AS={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},NE(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||XE(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||WE(n)?(e.exit("atxHeading"),t(n)):$E(n)?KE(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||XE(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const NS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],OS=["pre","script","style","textarea"],RS={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),o=3,r.interrupt?t:P):BE(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,f):BE(i)?(e.consume(i),o=4,r.interrupt?t:P):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:P):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:_:f):n(o)}function p(t){return BE(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||XE(s)){const l=47===s,c=a.toLowerCase();return l||i||!OS.includes(c)?NS.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):_(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):_(s))}return 45===s||LE(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:_):n(o)}function g(t){return $E(t)?(e.consume(t),g):E(t)}function y(t){return 47===t?(e.consume(t),E):58===t||95===t||BE(t)?(e.consume(t),b):$E(t)?(e.consume(t),y):E(t)}function b(t){return 45===t||46===t||58===t||95===t||LE(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):$E(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):$E(t)?(e.consume(t),w):k(t)}function x(t){return t===l?(e.consume(t),l=null,C):null===t||WE(t)?n(t):(e.consume(t),x)}function k(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||XE(t)?v(t):(e.consume(t),k)}function C(e){return 47===e||62===e||$E(e)?y(e):n(e)}function E(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||WE(t)?_(t):$E(t)?(e.consume(t),S):n(t)}function _(t){return 45===t&&2===o?(e.consume(t),O):60===t&&1===o?(e.consume(t),R):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),P):93===t&&5===o?(e.consume(t),M):!WE(t)||6!==o&&7!==o?null===t||WE(t)?(e.exit("htmlFlowData"),I(t)):(e.consume(t),_):(e.exit("htmlFlowData"),e.check(TS,j,I)(t))}function I(t){return e.check(MS,A,j)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||WE(t)?I(t):(e.enter("htmlFlowData"),_(t))}function O(t){return 45===t?(e.consume(t),P):_(t)}function R(t){return 47===t?(e.consume(t),a="",T):_(t)}function T(t){if(62===t){const n=a.toLowerCase();return OS.includes(n)?(e.consume(t),D):_(t)}return BE(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):_(t)}function M(t){return 93===t?(e.consume(t),P):_(t)}function P(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),P):_(t)}function D(t){return null===t||WE(t)?(e.exit("htmlFlowData"),j(t)):(e.consume(t),D)}function j(n){return e.exit("htmlFlow"),t(n)}}},TS={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(aS,t,n)}}},MS={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(WE(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const PS={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):BE(t)?(e.consume(t),C):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):BE(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):WE(t)?(a=u,T(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?R(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):WE(t)?(a=h,T(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?R(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?R(t):WE(t)?(a=y,T(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):WE(t)?(a=b,T(t)):(e.consume(t),b)}function v(e){return 62===e?R(e):b(e)}function w(t){return BE(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||LE(t)?(e.consume(t),x):k(t)}function k(t){return WE(t)?(a=k,T(t)):$E(t)?(e.consume(t),k):R(t)}function C(t){return 45===t||LE(t)?(e.consume(t),C):47===t||62===t||XE(t)?E(t):n(t)}function E(t){return 47===t?(e.consume(t),R):58===t||95===t||BE(t)?(e.consume(t),S):WE(t)?(a=E,T(t)):$E(t)?(e.consume(t),E):R(t)}function S(t){return 45===t||46===t||58===t||95===t||LE(t)?(e.consume(t),S):_(t)}function _(t){return 61===t?(e.consume(t),I):WE(t)?(a=_,T(t)):$E(t)?(e.consume(t),_):E(t)}function I(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):WE(t)?(a=I,T(t)):$E(t)?(e.consume(t),I):(e.consume(t),N)}function A(t){return t===o?(e.consume(t),o=void 0,O):null===t?n(t):WE(t)?(a=A,T(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||XE(t)?E(t):(e.consume(t),N)}function O(e){return 47===e||62===e||XE(e)?E(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return $E(t)?KE(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),a(t)}}};const DS={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&NE(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=OE(i,e.slice(r+1,r+s+3)),i=OE(i,[["enter",u,t]]),i=OE(i,nS(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=OE(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=OE(i,e.slice(o+1)),i=OE(i,[["exit",l,t]]),NE(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(jE(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(jS,c,i?c:u)(t):91===t?e.attempt(BS,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(LS,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},jS={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return XE(t)?ES(e,o)(t):o(t)}function o(t){return 41===t?c(t):xS(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return XE(t)?ES(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?CS(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return XE(t)?ES(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},BS={tokenize:function(e,t,n){const r=this;return function(t){return kS.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(jE(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},LS={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const zS={name:"labelStartImage",resolveAll:DS.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const FS={name:"labelStartLink",resolveAll:DS.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const VS={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),KE(e,t,"linePrefix")}}};const GS={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||WE(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),$E(t)?KE(e,i,"whitespace")(t):i(t))}}};const HS={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(aS,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,KE(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!$E(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(XS,t,a)(n))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,KE(e,e.attempt(HS,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:VE(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(GS,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return VE(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(aS,r.interrupt?n:c,e.attempt(WS,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return $E(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},WS={partial:!0,tokenize:function(e,t,n){const r=this;return KE(e,(function(e){const o=r.events[r.events.length-1];return!$E(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},XS={partial:!0,tokenize:function(e,t,n){const r=this;return KE(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const $S={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),$E(t)?KE(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||WE(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const ZS={tokenize:function(e){const t=this,n=e.attempt(aS,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,KE(e,e.attempt(this.parser.constructs.flow,r,e.attempt(vS,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const YS={resolveAll:qS()},US=KS("string"),JS=KS("text");function KS(e){return{resolveAll:qS("text"===e?QS:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function qS(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function QS(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const e_={42:HS,43:HS,45:HS,48:HS,49:HS,50:HS,51:HS,52:HS,53:HS,54:HS,55:HS,56:HS,57:HS,62:sS},t_={91:SS},n_={[-2]:fS,[-1]:fS,32:fS},r_={35:AS,42:GS,45:[$S,GS],60:RS,61:$S,95:GS,96:dS,126:dS},o_={38:cS,92:lS},i_={[-5]:VS,[-4]:VS,[-3]:VS,33:zS,38:cS,42:rS,60:[iS,PS],91:FS,92:[IS,lS],93:DS,95:rS,96:hS},a_={null:[rS,YS]};var s_=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:t_,disable:{null:[]},document:e_,flow:r_,flowInitial:n_,insideSpan:a_,string:o_,text:i_});function l_(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){WE(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,b()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=OE(a,e),p(),null!==a[a.length-1])return[];return y(t,0),c.events=nS(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function p(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,p),o}function y(e){return p.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&NE(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const c_=/[\0\t\n\r]/g;const u_=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function d_(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return DE(n.slice(t?2:1),t?16:10)}return AE(n)||e}const f_={}.hasOwnProperty;function p_(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(K),blockQuote:i($),characterEscape:S,characterReference:S,codeFenced:i(Z),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Z,a),codeText:i(Y,a),codeTextData:S,data:S,codeFlowValue:S,definition:i(U),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(J),hardBreakEscape:i(q),hardBreakTrailing:i(q),htmlFlow:i(Q,a),htmlFlowData:S,htmlText:i(Q,a),htmlTextData:S,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:z,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(K),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:X,autolinkProtocol:W,blockQuote:l(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:G,characterReference:H,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:_,codeIndented:l(y),codeText:l(R),codeTextData:_,data:_,definition:l(),definitionDestinationString:w,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:_,htmlText:l(O),htmlTextData:_,image:l(M),label:D,labelText:P,lineEnding:I,link:l(T),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:F,resourceDestinationString:j,resourceTitleString:B,resource:L,setextHeading:l(E),setextHeadingLineSequence:C,setextHeadingText:k,strong:l(),thematicBreak:l()}};m_(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];f_.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||y_).call(i,void 0,e[0])}for(r.position={start:h_(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:h_(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:h_(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+QC({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||y_).call(this,e,r[0])}n.position.end=h_(e.end)}function u(){return EE(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=jE(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function E(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:h_(e.start),end:void 0},t.push(n)),this.stack.push(n)}function _(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=h_(e.end)}function I(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=h_(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),_.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(u_,d_)}(t),n.identifier=jE(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function j(){const e=this.resume();this.stack[this.stack.length-1].url=e}function B(){const e=this.resume();this.stack[this.stack.length-1].title=e}function L(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function F(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=jE(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function V(e){this.data.characterReferenceType=e.type}function G(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=DE(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=AE(t)}this.stack[this.stack.length-1].value+=r}function H(e){this.stack.pop().position.end=h_(e.end)}function W(e){_.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function X(e){_.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function $(){return{type:"blockquote",children:[]}}function Z(){return{type:"code",lang:null,meta:null,value:""}}function Y(){return{type:"inlineCode",value:""}}function U(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function q(){return{type:"break"}}function Q(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!yS(e););return e}(function(e){const t={constructs:TE([s_,...(e||{}).extensions||[]]),content:n(qE),defined:[],document:n(QE),flow:n(ZS),lazy:{},string:n(US),text:n(JS)};return t;function n(e){return function(n){return l_(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(c_.lastIndex=u,l=c_.exec(o),d=l&&void 0!==l.index?l.index:o.length,f=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===f&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),f){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function h_(e){return{line:e.line,column:e.column,offset:e.offset}}function m_(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?m_(e,r):g_(e,r)}}function g_(e,t){let n;for(n in t)if(f_.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function y_(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+QC({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+QC({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+QC({start:t.start,end:t.end})+") is still open")}function b_(e){const t=this;t.parser=function(n){return p_(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function v_(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function w_(e){const t=e.spread;return null==t?e.children.length>1:t}function x_(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(k_(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(k_(t.slice(o),o>0,!1)),i.join("")}function k_(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const C_={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=JE(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return v_(e,t);const o={src:JE(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:JE(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return v_(e,t);const o={href:JE(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:JE(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=w_(n[r])}return t}(n):w_(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=KC(t.children[1]),a=JC(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:x_(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:E_,yaml:E_,definition:E_,footnoteDefinition:E_};function E_(){}const S_="object"==typeof self?self:globalThis,__=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new S_[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new S_[i](a),o)};return r})(new Map,e)(0),I_="",{toString:A_}={},{keys:N_}=Object,O_=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=A_.call(e).slice(8,-1);switch(n){case"Array":return[1,I_];case"Object":return[2,I_];case"Date":return[3,I_];case"RegExp":return[4,I_];case"Map":return[5,I_];case"Set":return[6,I_];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},R_=([e,t])=>0===e&&("function"===t||"symbol"===t),T_=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=O_(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of N_(r))!e&&R_(O_(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[n,o]of r)(e||!R_(O_(n))&&!R_(O_(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)!e&&R_(O_(n))||t.push(i(n));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var M_="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?__(T_(e,t)):structuredClone(e):(e,t)=>__(T_(e,t));function P_(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function D_(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const j_=function(e){if(null==e)return L_;if("function"==typeof e)return B_(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=j_(e[n]);return B_(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return B_(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return B_(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function B_(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function L_(){return!0}const z_=[],F_=!0,V_=!1;function G_(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=j_(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,f=z_;if((!t||i(o,s,l[l.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[F_,e];return null==e?z_:[e]}(n(o,l)),f[0]===V_))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===V_)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function H_(e,t,n,r){let o,i,a;"function"==typeof t?(i=void 0,a=t,o=n):(i=t,a=n,o=r),G_(e,i,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)}),o)}const W_={}.hasOwnProperty,X_={};function $_(e,t){e.position&&(t.position=function(e){const t=KC(e),n=JC(e);if(t&&n)return{start:t,end:n}}(e))}function Z_(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,M_(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function Y_(e,t){const n=t.data||{},r=!("value"in t)||W_.call(n,"hProperties")||W_.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function U_(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function J_(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function K_(e,t){const n=function(e,t){const n=t||X_,r=new Map,o=new Map,i=new Map,a={...C_,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=J_(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=J_(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:Z_,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(W_.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=M_(n);return r.children=s.all(e),r}return M_(e)}return(s.options.unknownHandler||Y_)(s,e,t)},options:n,patch:$_,wrap:U_};return H_(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||P_,r=e.options.footnoteBackLabel||D_,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=JE(a.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...M_(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function q_(e,t){return e&&"run"in e?async function(n,r){const o=K_(n,{file:r,...t});await e.run(o,r)}:function(n,r){return K_(n,{file:r,...e||t})}}function Q_(e){if(e)throw e}var eI,tI;var nI=function(){if(tI)return eI;tI=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return eI=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},eI}(),rI=I(nI);function oI(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 iI(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(a&&a.then&&"function"==typeof a.then?a.then(i,o):a instanceof Error?o(a):i(a))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const aI={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');sI(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(sI(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){sI(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)sI(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){sI(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function sI(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lI={cwd:function(){return"/"}};function cI(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function uI(e){if("string"==typeof e)e=new URL(e);else if(!cI(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const dI=["history","path","basename","stem","extname","dirname"];class fI{constructor(e){let t;t=e?cI(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":lI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<dI.length;){const e=dI[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)dI.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?aI.basename(this.path):void 0}set basename(e){hI(e,"basename"),pI(e,"basename"),this.path=aI.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?aI.dirname(this.path):void 0}set dirname(e){mI(this.basename,"dirname"),this.path=aI.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?aI.extname(this.path):void 0}set extname(e){if(pI(e,"extname"),mI(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=aI.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){cI(e)&&(e=uI(e)),hI(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?aI.basename(this.path,this.extname):void 0}set stem(e){hI(e,"stem"),pI(e,"stem"),this.path=aI.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new rE(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function pI(e,t){if(e&&e.includes(aI.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+aI.sep+"`")}function hI(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function mI(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const gI=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},yI={}.hasOwnProperty;class bI extends gI{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=iI()}copy(){const e=new bI;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(rI(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(kI("data",this.frozen),this.namespace[e]=t,this):yI.call(this.namespace,e)&&this.namespace[e]||void 0:e?(kI("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=SI(e),n=this.parser||this.Parser;return wI("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),wI("process",this.parser||this.Parser),xI("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=SI(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,(function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),wI("processSync",this.parser||this.Parser),xI("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,Q_(e),t=r})),EI("processSync","process",n),t}run(e,t,n){CI(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=SI(t);r.run(e,a,(function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){Q_(e),n=t,r=!0})),EI("runSync","run",r),n}stringify(e,t){this.freeze();const n=SI(t),r=this.compiler||this.Compiler;return xI("stringify",r),CI(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(kI("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=rI(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];oI(a)&&oI(r)&&(r=rI(!0,a,r)),n[o]=[e,r,...i]}}}}const vI=(new bI).freeze();function wI(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function xI(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function kI(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function CI(e){if(!oI(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function EI(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function SI(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new fI(e)}const _I=[],II={allowDangerousHtml:!0},AI=/^(https?|ircs?|mailto|xmpp)$/i,NI=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function OI(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||_I,l=e.remarkPlugins||_I,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...II}:II,u=e.skipHtml,d=e.unwrapDisallowed,f=e.urlTransform||RI,p=vI().use(b_).use(l).use(q_,c).use(s),h=new fI;"string"==typeof r&&(h.value=r);for(const t of NI)Object.hasOwn(e,t.from)&&(t.from,t.to&&t.to,t.id);const m=p.parse(h);let g=p.runSync(m,h);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:"root"===g.type?g.children:[g]}),H_(g,(function(e,r,o){if("raw"===e.type&&o&&"number"==typeof r)return u?o.children.splice(r,1):o.children[r]={type:"text",value:e.value},r;if("element"===e.type){let t;for(t in kE)if(Object.hasOwn(kE,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=kE[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=f(String(n||""),t,e))}}if("element"===e.type){let i=t?!t.includes(e.tagName):!!a&&a.includes(e.tagName);if(!i&&n&&"number"==typeof r&&(i=!n(e,r,o)),i&&o&&"number"==typeof r)return d&&e.children?o.children.splice(r,1,...e.children):o.children.splice(r,1),r}})),dE(g,{Fragment:yd.Fragment,components:i,ignoreInvalidStyle:!0,jsx:yd.jsx,jsxs:yd.jsxs,passKeys:!0,passNode:!0})}function RI(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||AI.test(e.slice(0,t))?e:""}function TI(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function MI(e,t,n){const r=j_((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([PI(e[0]),DI(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)G_(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function PI(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function DI(e){return"function"==typeof e?e:function(){return e}}const jI="phrasing",BI=["autolink","link","image","label"];function LI(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function zI(e){this.config.enter.autolinkProtocol.call(this,e)}function FI(e){this.config.exit.autolinkProtocol.call(this,e)}function VI(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function GI(e){this.config.exit.autolinkEmail.call(this,e)}function HI(e){this.exit(e)}function WI(e){MI(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,XI],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,$I]],{ignore:["link","linkReference"]})}function XI(e,t,n,r,o){let i="";if(!ZI(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=TI(e,"(");let i=TI(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function $I(e,t,n,r){return!(!ZI(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ZI(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||YE(n)||ZE(n))&&(!t||47!==n)}function YI(){this.buffer()}function UI(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function JI(){this.buffer()}function KI(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function qI(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function QI(e){this.exit(e)}function eA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=jE(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tA(e){this.exit(e)}function nA(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function rA(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?iA:oA)));return s(),a},footnoteReference:nA},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function oA(e,t,n){return 0===t?e:iA(e,t,n)}function iA(e,t,n){return(n?"":" ")+e}nA.peek=function(){return"["};const aA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function sA(e){this.enter({type:"delete",children:[]},e)}function lA(e){this.exit(e)}function cA(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function uA(e){return e.length}function dA(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function fA(e,t,n){return">"+(n?"":" ")+e}function pA(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function hA(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&(i=n.stack,a=n.unsafe[o],pA(i,a.inConstruct,!0)&&!pA(i,a.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var i,a;return"\\\n"}function mA(e,t,n){return(n?"":" ")+e}function gA(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function yA(e){return"&#x"+e.toString(16).toUpperCase()+";"}function bA(e,t,n){const r=tS(e),o=tS(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function vA(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=bA(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=yA(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=bA(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+yA(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function wA(e){return e.value||""}function xA(e,t,n,r){const o=gA(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function kA(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function CA(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function EA(e,t){const n=EE(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function SA(e,t,n,r){const o=gA(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(EA(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function _A(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function IA(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function AA(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}cA.peek=function(){return"~"},vA.peek=function(e,t,n){return n.options.emphasis||"*"},wA.peek=function(){return"<"},xA.peek=function(){return"!"},kA.peek=function(){return"!"},CA.peek=function(){return"`"},SA.peek=function(e,t,n){return EA(e,n)?"<":"["},_A.peek=function(){return"["};const NA=j_(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function OA(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=bA(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=yA(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=bA(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+yA(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}OA.peek=function(e,t,n){return n.options.strong||"*"};const RA={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),fA);return o(),a},break:hA,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,mA);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=gA(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:vA,hardBreak:hA,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return H_(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,V_})),Boolean((!e.depth||e.depth<3)&&EE(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=yA(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:wA,image:xA,imageReference:kA,inlineCode:CA,link:SA,linkReference:_A,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):IA(n);const s=e.ordered?"."===a?")":".":function(e){const t=IA(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),AA(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||IA(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e}));return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some((function(e){return NA(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:OA,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(AA(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function TA(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function MA(e){this.exit(e),this.data.inTable=void 0}function PA(e){this.enter({type:"tableRow",children:[]},e)}function DA(e){this.exit(e)}function jA(e){this.enter({type:"tableCell",children:[]},e)}function BA(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,LA));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function LA(e,t){return"|"===t?t:e}function zA(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=RA.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=l(e,n,r),i=s([o]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||uA,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=null==(d=e[u][i])?"":String(d);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}var d;let f=-1;if("object"==typeof r&&"length"in r)for(;++f<c;)i[f]=dA(r[f]);else{const e=dA(r);for(;++f<c;)i[f]=e}f=-1;const p=[],h=[];for(;++f<c;){const e=i[f];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[f]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[f]&&(l[f]=o),h[f]=o),p[f]=a}a.splice(1,0,p),s.splice(1,0,h),u=-1;const m=[];for(;++u<a.length;){const e=a[u],t=s[u];f=-1;const r=[];for(;++f<c;){const o=e[f]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[f]-(t[f]||0),n=i[f];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||f||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!f||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&f===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function FA(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function VA(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function GA(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=RA.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),l}const HA={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},WA={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check($A,l,s)(t):null===t||XE(t)||YE(t)||45!==t&&ZE(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},XA={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check($A,t,i)(a):null===a||XE(a)||YE(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},$A={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||XE(a)||YE(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||XE(e)||YE(e)?t(e):r(e)}function i(e){return BE(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):BE(t)?(e.consume(t),a):n(t)}},partial:!0},ZA={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return LE(e)?n(e):t(e)}},partial:!0},YA={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!QA.call(r,r.previous)||rN(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(HA,e.attempt(WA,e.attempt(XA,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:QA},UA={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&eN.call(r,r.previous)&&!rN(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(BE(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||FE(t)||XE(t)||YE(t)||ZE(t)?n(t):e.attempt(WA,e.attempt(XA,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:eN},JA={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!nN(t)||!tN.call(r,r.previous)||rN(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return nN(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(ZA,c,l)(t):45===t||95===t||LE(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&BE(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:tN},KA={};let qA=48;for(;qA<123;)KA[qA]=JA,qA++,58===qA?qA=65:91===qA&&(qA=97);function QA(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||XE(e)}function eN(e){return!BE(e)}function tN(e){return!(47===e||nN(e))}function nN(e){return 43===e||45===e||46===e||95===e||LE(e)}function rN(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}KA[43]=JA,KA[45]=JA,KA[46]=JA,KA[95]=JA,KA[72]=[JA,UA],KA[104]=[JA,UA],KA[87]=[JA,YA],KA[119]=[JA,YA];const oN={tokenize:function(e,t,n){const r=this;return KE(e,(function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function iN(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=jE(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function aN(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function sN(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||XE(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(jE(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return XE(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function lN(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||XE(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=jE(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return XE(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),KE(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function cN(e,t,n){return e.check(aS,t,e.attempt(oN,t,n))}function uN(e){e.exit("gfmFootnoteDefinition")}function dN(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=tS(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=tS(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&NE(a,a.length,0,nS(s,e.slice(r+1,n),t)),NE(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),NE(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class fN{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function pN(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function hN(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:s;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):WE(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):$E(t)?KE(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||XE(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,$E(t)?KE(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):v(t)}function p(t){return $E(t)?KE(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||WE(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return $E(t)?KE(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?f(n):(null===n||WE(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||WE(n)?(e.exit("tableRow"),t(n)):$E(n)?KE(e,x,"whitespace")(n):(e.enter("data"),k(n))}function k(t){return null===t||124===t||XE(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?C:k)}function C(t){return 92===t||124===t?(e.consume(t),k):k(t)}}function mN(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const f=new fN;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(yN(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=gN(f,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=gN(f,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=gN(f,t,l,s,i,o)):0!==c[1]&&(o=gN(f,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&yN(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=pN(t.events,i))}return e}function gN(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},bN(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=bN(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=bN(t.events,n[2]),i=bN(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},bN(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function yN(e,t,n,r,o){const i=[],a=bN(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function bN(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const vN={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return XE(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return WE(r)?t(r):$E(r)?e.check({tokenize:wN},t,n)(r):n(r)}}};function wN(e,t,n){return KE(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const xN={};function kN(e){const t=e||xN,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return TE([{text:KA},{document:{91:{name:"gfmFootnoteDefinition",tokenize:lN,continuation:{tokenize:cN},exit:uN}},text:{91:{name:"gfmFootnoteCall",tokenize:sN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:iN,resolveTo:aN}}},dN(e),{flow:{null:{name:"table",tokenize:hN,resolveAll:mN}}},{text:{91:vN}}])}(t)),o.push([{transforms:[WI],enter:{literalAutolink:LI,literalAutolinkEmail:zI,literalAutolinkHttp:zI,literalAutolinkWww:zI},exit:{literalAutolink:HI,literalAutolinkEmail:GI,literalAutolinkHttp:FI,literalAutolinkWww:VI}},{enter:{gfmFootnoteCallString:YI,gfmFootnoteCall:UI,gfmFootnoteDefinitionLabelString:JI,gfmFootnoteDefinition:KI},exit:{gfmFootnoteCallString:qI,gfmFootnoteCall:QI,gfmFootnoteDefinitionLabelString:eA,gfmFootnoteDefinition:tA}},{canContainEols:["delete"],enter:{strikethrough:sA},exit:{strikethrough:lA}},{enter:{table:TA,tableData:jA,tableHeader:jA,tableRow:PA},exit:{codeText:BA,table:MA,tableData:DA,tableHeader:DA,tableRow:DA}},{exit:{taskListCheckValueChecked:FA,taskListCheckValueUnchecked:FA,paragraph:VA}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:jI,notInConstruct:BI},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:jI,notInConstruct:BI},{character:":",before:"[ps]",after:"\\/",inConstruct:jI,notInConstruct:BI}]},rA(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aA}],handlers:{delete:cA}},zA(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:GA}}]}}(t))}const CN=({item:t})=>{const n=o(AG);return e.createElement("div",{className:"libnodeentry",onClick:e=>{2===e.detail&&n.worker?.add_node(t.node_id)},title:t.description},t.node_name||t.node_id)},EN=(e,t)=>{const n=e.nodes?.some((e=>e.node_id.toLowerCase().includes(t.toLowerCase())))??!1,r=e.subshelves?.some((e=>EN(e,t)))??!1;return n||r},SN=({item:t,filter:n,parentkey:r})=>{const[o,i]=c(!1),a=t.nodes?.filter((e=>e.node_id.toLowerCase().includes(n.toLowerCase()))),s=o||n.length>0;return EN(t,n)?e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>i(!o),style:{cursor:"pointer"},title:t.description},e.createElement("div",{className:"shelftitle_text"},t.name),e.createElement("div",{className:"expandicon "+(s?"open":"close")},e.createElement(vb,null))),e.createElement("div",{className:"libnodecontainer "+(s?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},a&&e.createElement(e.Fragment,null,a.map((t=>e.createElement(CN,{key:t.node_id,item:t})))),t.subshelves&&e.createElement(e.Fragment,null,t.subshelves.map((t=>e.createElement(SN,{key:r+t.name,item:t,filter:n,parentkey:r+t.name})))))),e.createElement("hr",null)):e.createElement(e.Fragment,null)},_N=({filter:t,setFilter:n})=>e.createElement("div",{className:"libfilter"},e.createElement(Sb,{fontSize:"inherit"}),e.createElement("input",{type:"text",placeholder:"Filter",value:t,onChange:e=>{n(e.target.value)}}),t&&e.createElement(wb,{fontSize:"inherit",onClick:()=>{n("")}})),IN=[">=","==","<=","<",">"],AN=">=",NN=({availableModule:t})=>e.createElement("div",{className:"module-links"},t.homepage&&e.createElement(e.Fragment,null,e.createElement("a",{href:t.homepage,target:"_blank",rel:"noopener noreferrer"},"Homepage")),t.source&&t.homepage&&" | ",t.source&&e.createElement(e.Fragment,null,e.createElement("a",{href:t.source,target:"_blank",rel:"noopener noreferrer"},"Source"))),ON=({availableModule:t})=>{const[n,r]=c(!1),o=t.description.length>150?t.description.substring(0,150)+"...":t.description;return e.createElement("div",{className:"module-description"},e.createElement(OI,{remarkPlugins:[kN]},n?t.description.replace(/\\n/g," \n"):o.replace(/\\n/g," \n")),t.description.length>150&&e.createElement("button",{onClick:()=>r(!n),className:"toggle-description"},n?"Show less":"Show more"))},RN=({availableModule:t,on_change:n})=>{const[r,o]=c(t.version||"latest"),[i,a]=c(AN);return t.releases&&!t.releases.includes(r)&&t.releases.unshift(r),e.createElement(e.Fragment,null,e.createElement("select",{value:i,onChange:e=>{e.target.value!==i&&IN.includes(e.target.value)&&(a(e.target.value),"latest"!==r&&n(e.target.value+r))}},IN.map((t=>e.createElement("option",{key:t,value:t},t)))),e.createElement("select",{onChange:e=>{const t=e.target.value;o(t),n("latest"!==t?i+t:t)},value:r},t.releases&&t.releases.map((t=>e.createElement("option",{key:t,value:t},t)))))},TN=({availableModule:t,on_remove:n,on_update:r})=>{const[o,i]=c(AN+t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name+(t.version?` (${t.version})`:"")),e.createElement(NN,{availableModule:t}),e.createElement(ON,{availableModule:t}),e.createElement("div",null,e.createElement(RN,{availableModule:t,on_change:i}),e.createElement("button",{className:"update-button",disabled:o===t.version,onClick:()=>{r(t,o)}},"Update"),e.createElement("button",{className:"remove-button",onClick:()=>{n(t)}},"Remove")))},MN=({availableModule:t,on_add:n})=>{const[r,o]=c(AN+t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name+(t.version?` (${t.version})`:"")),e.createElement(NN,{availableModule:t}),e.createElement(ON,{availableModule:t}),e.createElement("div",null,e.createElement(RN,{availableModule:t,on_change:o}),e.createElement("button",{className:"add-button",onClick:()=>{n(t,r)}},"Add")))},PN=({availableModule:t,on_add:n})=>{const[r,o]=c(AN+t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name),e.createElement(NN,{availableModule:t}),e.createElement(ON,{availableModule:t}),e.createElement("div",null,e.createElement(RN,{availableModule:t,on_change:o}),e.createElement("button",{className:"add-button",onClick:()=>{n(t,r)}},"Add")))},DN=({children:t})=>{const[n,r]=c(""),i=o(AG),[a,s]=c(!0),[l,u]=c(!0),[d,f]=c(!0),[p,h]=c({installed:[],available:[],active:[]}),[m,g]=c(!1);if(!i.worker)return e.createElement(e.Fragment,null);const y=(e,t)=>{g(!1),void 0!==i.worker&&i.worker.add_lib(e.name,t)},b=(e,t)=>{g(!1),void 0!==i.worker&&i.worker.add_lib(e.name,t)},v=e=>{g(!1),void 0!==i.worker&&i.worker.remove_lib(e.name)},w=(e,t)=>{g(!1),void 0!==i.worker&&i.worker.add_lib(e.name,t)},x=e=>e.filter((e=>e.name.toLowerCase().includes(n.toLowerCase())||e.description.toLowerCase().includes(n.toLowerCase()))),k=x(p.available),C=x(p.installed),E=x(p.active);return e.createElement(_b,{title:"Manage Library",trigger:t,description:"Add or remove libraries to the current worker.",onOpenChange:e=>{e&&void 0!==i.worker&&i.worker.is_open&&i.worker.get_available_modules().then((e=>{h(e)}))},open:m,setOpen:g},e.createElement("input",{className:"filter-input styledinput",type:"text",placeholder:"Filter modules...",value:n,onChange:e=>r(e.target.value)}),e.createElement("div",{className:"packagelist",style:{maxHeight:"70%",overflow:"auto"}},C.length>0&&e.createElement("h3",{onClick:()=>{f(!d)}},"Installed"),d&&C.map((t=>e.createElement(MN,{key:t.name+t.source,availableModule:t,on_add:y}))),k.length>0&&e.createElement("h3",{onClick:()=>{u(!l)}},"Available"),l&&k.map((t=>e.createElement(PN,{key:t.name+t.source,availableModule:t,on_add:b}))),E.length>0&&e.createElement("h3",{onClick:()=>{s(!a)}},"Active"),a&&E.map((t=>e.createElement(TN,{key:t.name+t.source,availableModule:t,on_remove:v,on_update:w})))))},jN=({ins:t})=>{const[n,r]=c(t.name),i=o(AG);return e.createElement(e.Fragment,null,e.createElement(_b,{title:t.name,description:"Settings for"+t.name,trigger:e.createElement("div",null,"Settings"),buttons:[{text:"Save",onClick:()=>{i.worker&&(i.worker.update_external_worker(t.uuid,t.nodeclassid,{name:n}),t.name=n)},close:!0},{text:"Delete",onClick:()=>{i.worker&&i.worker.remove_external_worker(t.uuid,t.nodeclassid)},close:!0}]},e.createElement("div",null,e.createElement("div",null,e.createElement("label",{htmlFor:"name"},"Name: "),e.createElement("input",{type:"text",name:"name",value:n,onChange:e=>r(e.target.value),className:"styledinput"})))))},BN=({ins:t,lib:n,filter:r="",parentkey:o})=>{const[i,a]=c(!1),s=n?.nodes?.filter((e=>e.node_id.toLowerCase().includes(r.toLowerCase())));return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>a(!i),style:{cursor:"pointer"},title:t.name},e.createElement("div",{className:"shelftitle_text"},t.name),e.createElement("div",{className:"expandicon "+(i?"open":"close")},e.createElement(vb,null))),e.createElement("div",{className:"libnodecontainer "+(i?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},i&&e.createElement(e.Fragment,null,e.createElement("div",{className:"libnodeentry",title:t.uuid},e.createElement(jN,{ins:t})),n&&e.createElement(e.Fragment,null,s&&e.createElement(e.Fragment,null,s.map((t=>e.createElement(CN,{key:t.node_id,item:t})))),n.subshelves.map((t=>e.createElement(SN,{key:o+t.name,item:t,filter:r,parentkey:o+t.name}))))))))},LN=({item:t,mod:n,lib:r})=>{const i=o(AG),[a,s]=c(!1),l=t.name||t.module+"."+t.class_name;return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>s(!a),style:{cursor:"pointer"},title:l},e.createElement("div",{className:"shelftitle_text"},l),e.createElement("div",{className:"expandicon "+(a?"open":"close")},e.createElement(vb,null))),e.createElement("div",{className:"libnodecontainer "+(a?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},a&&e.createElement(e.Fragment,null,e.createElement("div",{className:"libnodeentry",onClick:e=>{2===e.detail&&i.worker?.add_external_worker({module:n,cls_module:t.module,cls_name:t.class_name})},title:t.name},"New Instance"),t.instances.map((t=>e.createElement(BN,{key:t.uuid,ins:t,lib:r?.subshelves.find((e=>e.name===t.uuid)),parentkey:t.uuid})))))))},zN=({externalworkermod:t,lib:n})=>{const[r,o]=c(!1),i=r;return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:t.module},e.createElement("div",{className:"shelftitle_text"},t.module),e.createElement("div",{className:"expandicon "+(i?"open":"close")},e.createElement(vb,null))),e.createElement("div",{className:"libnodecontainer "+(i?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},t.worker_classes.map((r=>e.createElement(LN,{key:r.module+r.class_name,item:r,mod:t.module,lib:n}))))),e.createElement("hr",null))},FN=()=>{const t=o(AG),n=t.lib.libstate(),r=e.useContext(AG),i=r.local_settings((e=>e.view_settings.expand_lib)),a=r.local_settings((e=>e.update_view_settings)),s=Zk("m"),[l,u]=c(""),d=t.worker?.state((e=>e.is_open))??!1;return e.createElement(Uk,{maxSize:s?"100%":"300px",direction:s?"down":"right",containerClassName:"pos-left pos-top bg1 h-12",onExpandChange:e=>{a({expand_lib:e})},expanded:void 0===i||i},e.createElement("div",{className:"libcontainer"},e.createElement("div",{className:"library"},e.createElement("div",{className:"libtitle"},"Lib"),e.createElement("hr",{className:"hr_prominent"}),e.createElement(_N,{filter:l,setFilter:u}),e.createElement("div",{className:"vscrollcontainer"},n.lib.shelves.map((t=>"_external_worker"==t.name?e.createElement(e.Fragment,null):e.createElement(SN,{key:t.name,item:t,filter:l,parentkey:t.name})))),e.createElement("hr",null),e.createElement("div",{className:"libtitle"},"External Worker"),e.createElement("hr",{className:"hr_prominent"}),e.createElement("div",{className:"vscrollcontainer"},n.external_worker?.map((t=>e.createElement(zN,{key:t.module,externalworkermod:t,lib:n.lib.shelves.find((e=>"_external_worker"===e.name))})))),e.createElement("hr",null)),e.createElement("div",{style:{paddingTop:"0.5rem"}}),d&&e.createElement("div",{className:"addlib"},e.createElement(DN,null,e.createElement("button",null,"Manage Libraries")))))};const{useRef:VN}=t;function GN(e){const t=VN();return n=>{const r=e(n);return function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}(t.current,r)?t.current:t.current=r}}var HN="Popover",[WN,XN]=bd(HN,[cw]),$N=cw(),[ZN,YN]=WN(HN),UN=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!1}=t,l=$N(n),c=e.useRef(null),[u,d]=e.useState(!1),[f=!1,p]=Sd({prop:o,defaultProp:i,onChange:a});return yd.jsx(Sw,{...l,children:yd.jsx(ZN,{scope:n,contentId:Cd(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:e.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>d(!1)),[]),modal:s,children:r})})};UN.displayName=HN;var JN="PopoverAnchor";e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,i=YN(JN,r),a=$N(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return e.useEffect((()=>(s(),()=>l())),[s,l]),yd.jsx(_w,{...a,...o,ref:n})})).displayName=JN;var KN="PopoverTrigger",qN=e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=YN(KN,n),i=$N(n),a=cd(t,o.triggerRef),s=yd.jsx(Od.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":uO(o.open),...r,ref:a,onClick:ad(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:yd.jsx(_w,{asChild:!0,...i,children:s})}));qN.displayName=KN;var QN="PopoverPortal",[eO,tO]=WN(QN,{forceMount:void 0}),nO=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=YN(QN,t);return yd.jsx(eO,{scope:t,forceMount:n,children:yd.jsx(qd,{present:n||i.open,children:yd.jsx(Kd,{asChild:!0,container:o,children:r})})})};nO.displayName=QN;var rO="PopoverContent",oO=e.forwardRef(((e,t)=>{const n=tO(rO,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=YN(rO,e.__scopePopover);return yd.jsx(qd,{present:r||i.open,children:i.modal?yd.jsx(iO,{...o,ref:t}):yd.jsx(aO,{...o,ref:t})})}));oO.displayName=rO;var iO=e.forwardRef(((t,n)=>{const r=YN(rO,t.__scopePopover),o=e.useRef(null),i=cd(n,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return qf(e)}),[]),yd.jsx(Xf,{as:_d,allowPinchZoom:!0,children:yd.jsx(sO,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ad(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:ad(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:ad(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),aO=e.forwardRef(((t,n)=>{const r=YN(rO,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return yd.jsx(sO,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),sO=e.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=YN(rO,n),p=$N(n);return tf(),yd.jsx(Wd,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:yd.jsx(Bd,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:yd.jsx(Iw,{"data-state":uO(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),lO="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=YN(lO,n);return yd.jsx(Od.button,{type:"button",...r,ref:t,onClick:ad(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=lO;var cO=e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=$N(n);return yd.jsx(Aw,{...o,...r,ref:t})}));function uO(e){return e?"open":"closed"}cO.displayName="PopoverArrow";var dO=UN,fO=qN,pO=nO,hO=oO,mO=cO;const gO={bytes:({iostore:e})=>{const{full:t,preview:n}=e.valuestore(),r=JSON.stringify(t?.value||n?.value)||"";return`Bytes(${Math.round(3*r.length/4)})`}},yO=e=>!!e&&e instanceof Date,bO=e=>!!e&&e instanceof Object&&"function"==typeof e;function vO(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function wO(e){let{field:t,value:n,data:r,lastElement:o,openBracket:i,closeBracket:a,level:l,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g}=e;const y=u(!1),[b,v,w]=function(e){const[t,n]=c(e());return[t,()=>n((e=>!e)),n]}((()=>h(l,n,t))),x=u(null);s((()=>{y.current?w(h(l,n,t)):y.current=!0}),[h]);const k=b?d.collapseIcon:d.expandIcon,C=b?"collapse JSON":"expand JSON",E=p(),S=l+1,_=r.length-1,I=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),w("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();const t="ArrowUp"===e.key?-1:1;if(!g.current)return;const n=g.current.querySelectorAll("[role=button]");let r=-1;for(let e=0;e<n.length;e++)if(0===n[e].tabIndex){r=e;break}if(r<0)return;const o=(r+t+n.length)%n.length;n[r].tabIndex=-1,n[o].tabIndex=0,n[o].focus()}},A=()=>{var e;v();const t=x.current;if(!t)return;const n=null===(e=g.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');n&&(n.tabIndex=-1),t.tabIndex=0,t.focus()};return f("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":b,"aria-selected":void 0},f("span",{className:k,onClick:A,onKeyDown:I,role:"button","aria-label":C,"aria-expanded":b,"aria-controls":b?E:void 0,ref:x,tabIndex:0===l?0:-1}),(t||""===t)&&f("span",m?{className:d.clickableLabel,onClick:A,onKeyDown:I}:{className:d.label},vO(t,d.quotesForFieldNames),":"),f("span",{className:d.punctuation},i),b?f("ul",{id:E,role:"group",className:d.childFieldsContainer},r.map(((e,t)=>f(SO,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:S,shouldExpandNode:h,clickToExpandNode:m,outerRef:g})))):f("span",{className:d.collapsedContent,onClick:A,onKeyDown:I}),f("span",{className:d.punctuation},a),!o&&f("span",{className:d.punctuation},","))}function xO(e){let{field:t,openBracket:n,closeBracket:r,lastElement:o,style:i}=e;return f("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&f("span",{className:i.label},vO(t,i.quotesForFieldNames),":"),f("span",{className:i.punctuation},n),f("span",{className:i.punctuation},r),!o&&f("span",{className:i.punctuation},","))}function kO(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:i,clickToExpandNode:a,level:s,outerRef:l}=e;return 0===Object.keys(n).length?xO({field:t,openBracket:"{",closeBracket:"}",lastElement:o,style:r}):wO({field:t,value:n,lastElement:o||!1,level:s,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:i,clickToExpandNode:a,data:Object.keys(n).map((e=>[e,n[e]])),outerRef:l})}function CO(e){let{field:t,value:n,style:r,lastElement:o,level:i,shouldExpandNode:a,clickToExpandNode:s,outerRef:l}=e;return 0===n.length?xO({field:t,openBracket:"[",closeBracket:"]",lastElement:o,style:r}):wO({field:t,value:n,lastElement:o||!1,level:i,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:s,data:n.map((e=>[void 0,e])),outerRef:l})}function EO(e){let t,{field:n,value:r,style:o,lastElement:i}=e,a=o.otherValue;var s;return null===r?(t="null",a=o.nullValue):void 0===r?(t="undefined",a=o.undefinedValue):"string"==typeof(s=r)||s instanceof String?(t=function(e,t){return t?`"${e}"`:e}(r,!o.noQuotesForStringValues),a=o.stringValue):(e=>"boolean"==typeof e||e instanceof Boolean)(r)?(t=r?"true":"false",a=o.booleanValue):(e=>"number"==typeof e||e instanceof Number)(r)?(t=r.toString(),a=o.numberValue):(e=>"bigint"==typeof e||e instanceof BigInt)(r)?(t=`${r.toString()}n`,a=o.numberValue):t=yO(r)?r.toISOString():bO(r)?"function() { }":r.toString(),f("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&f("span",{className:o.label},vO(n,o.quotesForFieldNames),":"),f("span",{className:a},t),!i&&f("span",{className:o.punctuation},","))}function SO(e){const t=e.value;return n=t,Array.isArray(n)?f(CO,Object.assign({},e)):!(e=>"object"==typeof e&&null!==e)(t)||yO(t)||bO(t)?f(EO,Object.assign({},e)):f(kO,Object.assign({},e));var n}var _O="_2bkNM",IO="_1BXBN";const AO={container:"_2IvMF _GzYRV",basicChildStyle:_O,childFieldsContainer:IO,label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},NO={container:"_11RoI _GzYRV",basicChildStyle:_O,childFieldsContainer:IO,label:"_2bSDX",clickableLabel:"_1RQEj _2bSDX _1MFti",nullValue:"_LaAZe",undefinedValue:"_GTKgm",stringValue:"_Chy1W",booleanValue:"_2vRm-",numberValue:"_2bveF",otherValue:"_1prJR",punctuation:"_gsbQL _3eOF8",collapseIcon:"_3QHg2 _f10Tu _1MFti _1LId0",expandIcon:"_17H2C _f10Tu _1MFti _1UmXx",collapsedContent:"_3fDAz _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1},OO=()=>!0,RO=e=>e<1,TO=e=>{let{data:t,style:n=AO,shouldExpandNode:r=OO,clickToExpandNode:o=!1,...i}=e;const a=u(null);return f("div",Object.assign({"aria-label":"JSON view"},i,{className:n.container,ref:a,role:"tree"}),f(SO,{value:t,style:{...AO,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:o,outerRef:a}))};function MO(e){if(null==e)return!1;if("object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype)&&function(e){for(const t in e)if(Object.hasOwn(e,t))return!1;return!0}(e)}const PO=({data:t})=>e.createElement(TO,{data:MO(t)?"":t,style:NO,shouldExpandNode:RO});function DO(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=DO(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jO(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=DO(e))&&(r&&(r+=" "),r+=t);return r}function BO(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===s?"":" ")+t(r),s=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}const LO=e.createContext();function zO(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>n.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${n} for the full message.`}function FO(e){if("string"!=typeof e)throw new Error("production"!==process.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":zO(7));return e.charAt(0).toUpperCase()+e.slice(1)}"production"!==process.env.NODE_ENV&&(LO.displayName="TableContext");var VO,GO={exports:{}},HO={};function WO(){if(VO)return HO;VO=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),p=Symbol.for("react.client.reference");function h(f){if("object"==typeof f&&null!==f){var p=f.$$typeof;switch(p){case e:switch(f=f.type){case n:case o:case r:case l:case c:return f;default:switch(f=f&&f.$$typeof){case a:case s:case d:case u:case i:return f;default:return p}}case t:return p}}}return HO.ContextConsumer=i,HO.ContextProvider=a,HO.Element=e,HO.ForwardRef=s,HO.Fragment=n,HO.Lazy=d,HO.Memo=u,HO.Portal=t,HO.Profiler=o,HO.StrictMode=r,HO.Suspense=l,HO.SuspenseList=c,HO.isContextConsumer=function(e){return h(e)===i},HO.isContextProvider=function(e){return h(e)===a},HO.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},HO.isForwardRef=function(e){return h(e)===s},HO.isFragment=function(e){return h(e)===n},HO.isLazy=function(e){return h(e)===d},HO.isMemo=function(e){return h(e)===u},HO.isPortal=function(e){return h(e)===t},HO.isProfiler=function(e){return h(e)===o},HO.isStrictMode=function(e){return h(e)===r},HO.isSuspense=function(e){return h(e)===l},HO.isSuspenseList=function(e){return h(e)===c},HO.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===l||e===c||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===s||e.$$typeof===p||void 0!==e.getModuleId)},HO.typeOf=h,HO}var XO,$O,ZO={};
62
- /**
63
- * @license React
64
- * react-is.development.js
65
- *
66
- * Copyright (c) Meta Platforms, Inc. and affiliates.
67
- *
68
- * This source code is licensed under the MIT license found in the
69
- * LICENSE file in the root directory of this source tree.
70
- */function YO(){return XO||(XO=1,"production"!==process.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case r:case i:case o:case c:case u:return e;default:switch(e=e&&e.$$typeof){case s:case l:case f:case d:case a:return e;default:return p}}case n:return p}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.for("react.client.reference");ZO.ContextConsumer=a,ZO.ContextProvider=s,ZO.Element=t,ZO.ForwardRef=l,ZO.Fragment=r,ZO.Lazy=f,ZO.Memo=d,ZO.Portal=n,ZO.Profiler=i,ZO.StrictMode=o,ZO.Suspense=c,ZO.SuspenseList=u,ZO.isContextConsumer=function(t){return e(t)===a},ZO.isContextProvider=function(t){return e(t)===s},ZO.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ZO.isForwardRef=function(t){return e(t)===l},ZO.isFragment=function(t){return e(t)===r},ZO.isLazy=function(t){return e(t)===f},ZO.isMemo=function(t){return e(t)===d},ZO.isPortal=function(t){return e(t)===n},ZO.isProfiler=function(t){return e(t)===i},ZO.isStrictMode=function(t){return e(t)===o},ZO.isSuspense=function(t){return e(t)===c},ZO.isSuspenseList=function(t){return e(t)===u},ZO.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===i||e===o||e===c||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===h||void 0!==e.getModuleId)},ZO.typeOf=e}()),ZO}function UO(){return $O||($O=1,"production"===process.env.NODE_ENV?GO.exports=WO():GO.exports=YO()),GO.exports}var JO=UO();function KO(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 qO(t){if(e.isValidElement(t)||JO.isValidElementType(t)||!KO(t))return t;const n={};return Object.keys(t).forEach((e=>{n[e]=qO(t[e])})),n}function QO(t,n,r={clone:!0}){const o=r.clone?{...t}:t;return KO(t)&&KO(n)&&Object.keys(n).forEach((i=>{e.isValidElement(n[i])||JO.isValidElementType(n[i])?o[i]=n[i]:KO(n[i])&&Object.prototype.hasOwnProperty.call(t,i)&&KO(t[i])?o[i]=QO(t[i],n[i],r):r.clone?o[i]=KO(n[i])?qO(n[i]):n[i]:o[i]=n[i]})),o}function eR(e,t){return t?QO(e,t,{clone:!1}):e}const tR="production"!==process.env.NODE_ENV?Ty.oneOfType([Ty.number,Ty.string,Ty.object,Ty.array]):{};const nR={xs:0,sm:600,md:900,lg:1200,xl:1536},rR={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${nR[e]}px)`},oR={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:nR[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function iR(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||rR;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||rR;return Object.keys(t).reduce(((o,i)=>{if(a=e.keys,"@"===(s=i)||s.startsWith("@")&&(a.some((e=>s.startsWith(`@${e}`)))||s.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if("production"!==process.env.NODE_ENV)throw new Error("production"!==process.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:zO(18,`(${t})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:oR,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||nR).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,s;return o}),{})}return n(t)}function aR(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function sR(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:aR(e,n)||r,t&&(o=t(o,r,e)),o}function lR(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=aR(e.theme,r)||{};return iR(e,i,(e=>{let r=sR(a,o,e);return e===r&&"string"==typeof e&&(r=sR(a,o,`${t}${"default"===e?"":FO(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes="production"!==process.env.NODE_ENV?{[t]:tR}:{},i.filterProps=[t],i}const cR={m:"margin",p:"padding"},uR={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},dR={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},fR=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!dR[e])return[e];e=dR[e]}const[t,n]=e.split(""),r=cR[t],o=uR[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),pR=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],hR=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],mR=[...pR,...hR];function gR(e,t,n,r){const o=aR(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`),"string"==typeof o?`calc(${e} * ${o})`:o*e):Array.isArray(o)?e=>{if("string"==typeof e)return e;const n=Math.abs(e);"production"!==process.env.NODE_ENV&&(Number.isInteger(n)?n>o.length-1&&console.error([`MUI: The value provided (${n}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${n} > ${o.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const r=o[n];return e>=0?r:"number"==typeof r?-r:`-${r}`}:"function"==typeof o?o:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function yR(e){return gR(e,"spacing",8,"spacing")}function bR(e,t){return"string"==typeof t||null==t?t:e(t)}function vR(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=bR(t,n),e)),{})}(fR(n),r);return iR(e,e[n],o)}function wR(e,t){const n=yR(e.theme);return Object.keys(e).map((r=>vR(e,t,r,n))).reduce(eR,{})}function xR(e){return wR(e,pR)}function kR(e){return wR(e,hR)}function CR(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?eR(n,t[r](e)):n),{});return n.propTypes="production"!==process.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function ER(e){return"number"!=typeof e?e:`${e}px solid`}function SR(e,t){return lR({prop:e,themeKey:"borders",transform:t})}xR.propTypes="production"!==process.env.NODE_ENV?pR.reduce(((e,t)=>(e[t]=tR,e)),{}):{},xR.filterProps=pR,kR.propTypes="production"!==process.env.NODE_ENV?hR.reduce(((e,t)=>(e[t]=tR,e)),{}):{},kR.filterProps=hR,"production"===process.env.NODE_ENV||mR.reduce(((e,t)=>(e[t]=tR,e)),{});const _R=SR("border",ER),IR=SR("borderTop",ER),AR=SR("borderRight",ER),NR=SR("borderBottom",ER),OR=SR("borderLeft",ER),RR=SR("borderColor"),TR=SR("borderTopColor"),MR=SR("borderRightColor"),PR=SR("borderBottomColor"),DR=SR("borderLeftColor"),jR=SR("outline",ER),BR=SR("outlineColor"),LR=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=gR(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:bR(t,e)});return iR(e,e.borderRadius,n)}return null};LR.propTypes="production"!==process.env.NODE_ENV?{borderRadius:tR}:{},LR.filterProps=["borderRadius"],CR(_R,IR,AR,NR,OR,RR,TR,MR,PR,DR,LR,jR,BR);const zR=e=>{if(void 0!==e.gap&&null!==e.gap){const t=gR(e.theme,"spacing",8,"gap"),n=e=>({gap:bR(t,e)});return iR(e,e.gap,n)}return null};zR.propTypes="production"!==process.env.NODE_ENV?{gap:tR}:{},zR.filterProps=["gap"];const FR=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=gR(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:bR(t,e)});return iR(e,e.columnGap,n)}return null};FR.propTypes="production"!==process.env.NODE_ENV?{columnGap:tR}:{},FR.filterProps=["columnGap"];const VR=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=gR(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:bR(t,e)});return iR(e,e.rowGap,n)}return null};VR.propTypes="production"!==process.env.NODE_ENV?{rowGap:tR}:{},VR.filterProps=["rowGap"];function GR(e,t){return"grey"===t?t:e}CR(zR,FR,VR,lR({prop:"gridColumn"}),lR({prop:"gridRow"}),lR({prop:"gridAutoFlow"}),lR({prop:"gridAutoColumns"}),lR({prop:"gridAutoRows"}),lR({prop:"gridTemplateColumns"}),lR({prop:"gridTemplateRows"}),lR({prop:"gridTemplateAreas"}),lR({prop:"gridArea"}));function HR(e){return e<=1&&0!==e?100*e+"%":e}CR(lR({prop:"color",themeKey:"palette",transform:GR}),lR({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:GR}),lR({prop:"backgroundColor",themeKey:"palette",transform:GR}));const WR=lR({prop:"width",transform:HR}),XR=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||nR[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:HR(t)}};return iR(e,e.maxWidth,t)}return null};XR.filterProps=["maxWidth"];const $R=lR({prop:"minWidth",transform:HR}),ZR=lR({prop:"height",transform:HR}),YR=lR({prop:"maxHeight",transform:HR}),UR=lR({prop:"minHeight",transform:HR});lR({prop:"size",cssProperty:"width",transform:HR}),lR({prop:"size",cssProperty:"height",transform:HR});CR(WR,XR,$R,ZR,YR,UR,lR({prop:"boxSizing"}));const JR={border:{themeKey:"borders",transform:ER},borderTop:{themeKey:"borders",transform:ER},borderRight:{themeKey:"borders",transform:ER},borderBottom:{themeKey:"borders",transform:ER},borderLeft:{themeKey:"borders",transform:ER},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:ER},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:LR},color:{themeKey:"palette",transform:GR},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:GR},backgroundColor:{themeKey:"palette",transform:GR},p:{style:kR},pt:{style:kR},pr:{style:kR},pb:{style:kR},pl:{style:kR},px:{style:kR},py:{style:kR},padding:{style:kR},paddingTop:{style:kR},paddingRight:{style:kR},paddingBottom:{style:kR},paddingLeft:{style:kR},paddingX:{style:kR},paddingY:{style:kR},paddingInline:{style:kR},paddingInlineStart:{style:kR},paddingInlineEnd:{style:kR},paddingBlock:{style:kR},paddingBlockStart:{style:kR},paddingBlockEnd:{style:kR},m:{style:xR},mt:{style:xR},mr:{style:xR},mb:{style:xR},ml:{style:xR},mx:{style:xR},my:{style:xR},margin:{style:xR},marginTop:{style:xR},marginRight:{style:xR},marginBottom:{style:xR},marginLeft:{style:xR},marginX:{style:xR},marginY:{style:xR},marginInline:{style:xR},marginInlineStart:{style:xR},marginInlineEnd:{style:xR},marginBlock:{style:xR},marginBlockStart:{style:xR},marginBlockEnd:{style:xR},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:zR},rowGap:{style:VR},columnGap:{style:FR},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:HR},maxWidth:{style:XR},minWidth:{transform:HR},height:{transform:HR},maxHeight:{transform:HR},minHeight:{transform:HR},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"}};const KR=function(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=i;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=aR(n,s)||{};if(c)return c(o);return iR(o,t,(t=>{let n=sR(u,l,t);return t===n&&"string"==typeof t&&(n=sR(u,l,`${e}${"default"===t?"":FO(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??JR;function a(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const a=function(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}(o.breakpoints),s=Object.keys(a);let l=a;return Object.keys(r).forEach((n=>{const a=function(e,t){return"function"==typeof e?e(t):e}(r[n],o);if(null!=a)if("object"==typeof a)if(i[n])l=eR(l,e(n,a,o,i));else{const e=iR({theme:o},a,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,a)?l=eR(l,e):l[n]=t({sx:a,theme:o})}else l=eR(l,e(n,a,o,i))})),function(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)}));return n.length?n.reduce(((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e}),{...t}):t}(o,function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(s,l))}return Array.isArray(r)?r.map(a):a(r)}}();function qR(){return qR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qR.apply(null,arguments)}KR.filterProps=["sx"];var QR=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=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,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||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 t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(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}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(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]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),eT="-ms-",tT="-moz-",nT="-webkit-",rT="comm",oT="rule",iT="decl",aT="@keyframes",sT=Math.abs,lT=String.fromCharCode,cT=Object.assign;function uT(e){return e.trim()}function dT(e,t,n){return e.replace(t,n)}function fT(e,t){return e.indexOf(t)}function pT(e,t){return 0|e.charCodeAt(t)}function hT(e,t,n){return e.slice(t,n)}function mT(e){return e.length}function gT(e){return e.length}function yT(e,t){return t.push(e),e}var bT=1,vT=1,wT=0,xT=0,kT=0,CT="";function ET(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:bT,column:vT,length:a,return:""}}function ST(e,t){return cT(ET("",null,null,"",null,null,0),e,{length:-e.length},t)}function _T(){return kT=xT>0?pT(CT,--xT):0,vT--,10===kT&&(vT=1,bT--),kT}function IT(){return kT=xT<wT?pT(CT,xT++):0,vT++,10===kT&&(vT=1,bT++),kT}function AT(){return pT(CT,xT)}function NT(){return xT}function OT(e,t){return hT(CT,e,t)}function RT(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 TT(e){return bT=vT=1,wT=mT(CT=e),xT=0,[]}function MT(e){return CT="",e}function PT(e){return uT(OT(xT-1,BT(91===e?e+2:40===e?e+1:e)))}function DT(e){for(;(kT=AT())&&kT<33;)IT();return RT(e)>2||RT(kT)>3?"":" "}function jT(e,t){for(;--t&&IT()&&!(kT<48||kT>102||kT>57&&kT<65||kT>70&&kT<97););return OT(e,NT()+(t<6&&32==AT()&&32==IT()))}function BT(e){for(;IT();)switch(kT){case e:return xT;case 34:case 39:34!==e&&39!==e&&BT(kT);break;case 40:41===e&&BT(e);break;case 92:IT()}return xT}function LT(e,t){for(;IT()&&e+kT!==57&&(e+kT!==84||47!==AT()););return"/*"+OT(t,xT-1)+"*"+lT(47===e?e:IT())}function zT(e){for(;!RT(AT());)IT();return OT(e,xT)}function FT(e){return MT(VT("",null,null,null,[""],e=TT(e),0,[0],e))}function VT(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,g=1,y=1,b=0,v="",w=o,x=i,k=r,C=v;g;)switch(h=b,b=IT()){case 40:if(108!=h&&58==pT(C,d-1)){-1!=fT(C+=dT(PT(b),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:C+=PT(b);break;case 9:case 10:case 13:case 32:C+=DT(h);break;case 92:C+=jT(NT()-1,7);continue;case 47:switch(AT()){case 42:case 47:yT(HT(LT(IT(),NT()),t,n),l);break;default:C+="/"}break;case 123*m:s[c++]=mT(C)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==y&&(C=dT(C,/\f/g,"")),p>0&&mT(C)-d&&yT(p>32?WT(C+";",r,n,d-1):WT(dT(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(yT(k=GT(C,t,n,c,u,o,s,v,w=[],x=[],d),i),123===b)if(0===u)VT(C,t,k,k,w,i,d,s,x);else switch(99===f&&110===pT(C,3)?100:f){case 100:case 108:case 109:case 115:VT(e,k,k,r&&yT(GT(e,k,k,0,0,o,s,v,o,w=[],d),x),o,x,d,s,r?w:x);break;default:VT(C,k,k,k,[""],x,0,s,x)}}c=u=p=0,m=y=1,v=C="",d=a;break;case 58:d=1+mT(C),p=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==_T())continue;switch(C+=lT(b),b*m){case 38:y=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(mT(C)-1)*y,y=1;break;case 64:45===AT()&&(C+=PT(IT())),f=AT(),u=d=mT(v=C+=zT(NT())),b++;break;case 45:45===h&&2==mT(C)&&(m=0)}}return i}function GT(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=0===o?i:[""],p=gT(f),h=0,m=0,g=0;h<r;++h)for(var y=0,b=hT(e,d+1,d=sT(m=a[h])),v=e;y<p;++y)(v=uT(m>0?f[y]+" "+b:dT(b,/&\f/g,f[y])))&&(l[g++]=v);return ET(e,t,n,0===o?oT:s,l,c,u)}function HT(e,t,n){return ET(e,t,n,rT,lT(kT),hT(e,2,-2),0)}function WT(e,t,n,r){return ET(e,t,n,iT,hT(e,0,r),hT(e,r+1,-1),r)}function XT(e,t){for(var n="",r=gT(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function $T(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case iT:return e.return=e.return||e.value;case rT:return"";case aT:return e.return=e.value+"{"+XT(e.children,r)+"}";case oT:e.value=e.props.join(",")}return mT(n=XT(e.children,r))?e.return=e.value+"{"+n+"}":""}function ZT(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var YT=function(e,t,n){for(var r=0,o=0;r=o,o=AT(),38===r&&12===o&&(t[n]=1),!RT(o);)IT();return OT(e,xT)},UT=function(e,t){return MT(function(e,t){var n=-1,r=44;do{switch(RT(r)){case 0:38===r&&12===AT()&&(t[n]=1),e[n]+=YT(xT-1,t,n);break;case 2:e[n]+=PT(r);break;case 4:if(44===r){e[++n]=58===AT()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=lT(r)}}while(r=IT());return e}(TT(e),t))},JT=new WeakMap,KT=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||JT.get(n))&&!r){JT.set(e,!0);for(var o=[],i=UT(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},qT=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function QT(e,t){switch(function(e,t){return 45^pT(e,0)?(((t<<2^pT(e,0))<<2^pT(e,1))<<2^pT(e,2))<<2^pT(e,3):0}(e,t)){case 5103:return nT+"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 nT+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return nT+e+tT+e+eT+e+e;case 6828:case 4268:return nT+e+eT+e+e;case 6165:return nT+e+eT+"flex-"+e+e;case 5187:return nT+e+dT(e,/(\w+).+(:[^]+)/,nT+"box-$1$2"+eT+"flex-$1$2")+e;case 5443:return nT+e+eT+"flex-item-"+dT(e,/flex-|-self/,"")+e;case 4675:return nT+e+eT+"flex-line-pack"+dT(e,/align-content|flex-|-self/,"")+e;case 5548:return nT+e+eT+dT(e,"shrink","negative")+e;case 5292:return nT+e+eT+dT(e,"basis","preferred-size")+e;case 6060:return nT+"box-"+dT(e,"-grow","")+nT+e+eT+dT(e,"grow","positive")+e;case 4554:return nT+dT(e,/([^-])(transform)/g,"$1"+nT+"$2")+e;case 6187:return dT(dT(dT(e,/(zoom-|grab)/,nT+"$1"),/(image-set)/,nT+"$1"),e,"")+e;case 5495:case 3959:return dT(e,/(image-set\([^]*)/,nT+"$1$`$1");case 4968:return dT(dT(e,/(.+:)(flex-)?(.*)/,nT+"box-pack:$3"+eT+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+nT+e+e;case 4095:case 3583:case 4068:case 2532:return dT(e,/(.+)-inline(.+)/,nT+"$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(mT(e)-1-t>6)switch(pT(e,t+1)){case 109:if(45!==pT(e,t+4))break;case 102:return dT(e,/(.+:)(.+)-([^]+)/,"$1"+nT+"$2-$3$1"+tT+(108==pT(e,t+3)?"$3":"$2-$3"))+e;case 115:return~fT(e,"stretch")?QT(dT(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==pT(e,t+1))break;case 6444:switch(pT(e,mT(e)-3-(~fT(e,"!important")&&10))){case 107:return dT(e,":",":"+nT)+e;case 101:return dT(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nT+(45===pT(e,14)?"inline-":"")+"box$3$1"+nT+"$2$3$1"+eT+"$2box$3")+e}break;case 5936:switch(pT(e,t+11)){case 114:return nT+e+eT+dT(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return nT+e+eT+dT(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return nT+e+eT+dT(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return nT+e+eT+e+e}return e}var eM,tM,nM=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case iT:e.return=QT(e.value,e.length);break;case aT:return XT([ST(e,{value:dT(e.value,"@","@"+nT)})],r);case oT:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return XT([ST(e,{props:[dT(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return XT([ST(e,{props:[dT(t,/:(plac\w+)/,":"+nT+"input-$1")]}),ST(e,{props:[dT(t,/:(plac\w+)/,":-moz-$1")]}),ST(e,{props:[dT(t,/:(plac\w+)/,eT+"input-$1")]})],r)}return""}))}}],rM=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||nM,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u=[$T,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=gT(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([KT,qT].concat(i,u));o=function(e,t,n,r){l=n,function(e){XT(FT(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new QR({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return f.sheet.hydrate(s),f};!function(){if(tM)return eM;tM=1;var e=Cy(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function i(n){return e.isMemo(n)?r:o[n.$$typeof]||t}o[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[e.Memo]=r;var a=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;eM=function e(t,r,o){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,o)}var p=s(r);l&&(p=p.concat(l(r)));for(var h=i(t),m=i(r),g=0;g<p.length;++g){var y=p[g];if(!(n[y]||o&&o[y]||m&&m[y]||h&&h[y])){var b=c(r,y);try{a(t,y,b)}catch(e){}}}}return t}}();function oM(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var iM=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},aM=function(e,t,n){iM(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var sM={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},lM=/[A-Z]|^ms/g,cM=/_EMO_([^_]+?)_([^]*?)_EMO_/g,uM=function(e){return 45===e.charCodeAt(1)},dM=function(e){return null!=e&&"boolean"!=typeof e},fM=ZT((function(e){return uM(e)?e:e.replace(lM,"-$&").toLowerCase()})),pM=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(cM,(function(e,t,n){return mM={name:t,styles:n,next:mM},t}))}return 1===sM[e]||uM(e)||"number"!=typeof t||0===t?t:t+"px"};function hM(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return mM={name:o.name,styles:o.styles,next:mM},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)mM={name:a.name,styles:a.styles,next:mM},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=hM(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":dM(s)&&(r+=fM(i)+":"+pM(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=hM(e,t,a);switch(i){case"animation":case"animationName":r+=fM(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var c=0;c<a.length;c++)dM(a[c])&&(r+=fM(i)+":"+pM(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=mM,l=n(e);return mM=s,hM(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var mM,gM=/label:\s*([^\s;{]+)\s*(;|$)/g;function yM(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";mM=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=hM(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=hM(n,t,e[a]),r)o+=i[a]}gM.lastIndex=0;for(var s,l="";null!==(s=gM.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:mM}}var bM=!!e.useInsertionEffect&&e.useInsertionEffect||function(e){return e()},vM=e.createContext("undefined"!=typeof HTMLElement?rM({key:"css"}):null);vM.Provider;var wM,xM,kM=function(e){return r((function(t,n){var r=o(vM);return e(t,r,n)}))},CM=e.createContext({}),EM={}.hasOwnProperty,SM="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",_M=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return iM(t,n,r),bM((function(){return aM(t,n,r)})),null},IM=kM((function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[SM],a=[o],s="";"string"==typeof t.className?s=oM(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=yM(a,void 0,e.useContext(CM));s+=n.key+"-"+l.name;var c={};for(var u in t)EM.call(t,u)&&"css"!==u&&u!==SM&&(c[u]=t[u]);return c.className=s,r&&(c.ref=r),e.createElement(e.Fragment,null,e.createElement(_M,{cache:n,serialized:l,isStringTag:"string"==typeof i}),e.createElement(i,c))})),AM=IM,NM=function(t,n){var r=arguments;if(null==n||!EM.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=AM,i[1]=function(e,t){var n={};for(var r in t)EM.call(t,r)&&(n[r]=t[r]);return n[SM]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)};function OM(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return yM(t)}function RM(){var e=OM.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_"}}}wM=NM||(NM={}),xM||(xM=wM.JSX||(wM.JSX={}));var TM=/^((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|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)-.*))$/,MM=ZT((function(e){return TM.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),PM=function(e){return"theme"!==e},DM=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?MM:PM},jM=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},BM=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return iM(t,n,r),bM((function(){return aM(t,n,r)})),null},LM=function t(n,r){var o,i,a=n.__emotion_real===n,s=a&&n.__emotion_base||n;void 0!==r&&(o=r.label,i=r.target);var l=jM(n,r,a),c=l||DM(s),u=!c("as");return function(){var d=arguments,f=a&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==o&&f.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var h=d.length,m=1;m<h;m++)f.push(d[m],p[m])}var g=kM((function(t,n,r){var o=u&&t.as||s,a="",d=[],p=t;if(null==t.theme){for(var h in p={},t)p[h]=t[h];p.theme=e.useContext(CM)}"string"==typeof t.className?a=oM(n.registered,d,t.className):null!=t.className&&(a=t.className+" ");var m=yM(f.concat(d),n.registered,p);a+=n.key+"-"+m.name,void 0!==i&&(a+=" "+i);var g=u&&void 0===l?DM(o):c,y={};for(var b in t)u&&"as"===b||g(b)&&(y[b]=t[b]);return y.className=a,r&&(y.ref=r),e.createElement(e.Fragment,null,e.createElement(BM,{cache:n,serialized:m,isStringTag:"string"==typeof o}),e.createElement(o,y))}));return g.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=n.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=f,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+i}}),g.withComponent=function(e,n){return t(e,qR({},r,n,{shouldForwardProp:jM(g,n,!0)})).apply(void 0,f)},g}}.bind(null);["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"].forEach((function(e){LM[e]=LM(e)}));const zM=[];function FM(e){return zM[0]=e,yM(zM)}function VM(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(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})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return{keys:a,values:i,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}const GM={borderRadius:4};function HM(e=8,t=yR({spacing:e})){if(e.mui)return e;const n=(...e)=>{"production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`));return(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}function WM(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function XM(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e;let s=QO({breakpoints:VM(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:HM(o),shape:{...GM,...i}},a);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(s),s.applyStyles=WM,s=t.reduce(((e,t)=>QO(e,t)),s),s.unstable_sxConfig={...JR,...a?.unstable_sxConfig},s.unstable_sx=function(e){return KR({sx:e,theme:this})},s}const $M=e=>e,ZM=(()=>{let e=$M;return{configure(t){e=t},generate:t=>e(t),reset(){e=$M}}})(),YM={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 UM(e,t,n="Mui"){const r=YM[t];return r?`${n}-${r}`:`${ZM.generate(e)}-${t}`}function JM(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=UM(e,t,n)})),r}function KM(e,t=""){return e.displayName||e.name||t}function qM(e,t,n){const r=KM(t);return e.displayName||(""!==r?`${n}(${r})`:n)}function QM(e){const{variants:t,...n}=e,r={variants:t,style:FM(n),isProcessed:!0};return r.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=FM(e.style))})),r}const eP=XM();function tP(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function nP(e){return e?(t,n)=>n[e]:null}function rP(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>rP(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return oP(e,n.variants,[t])}return n?.isProcessed?n.style:n}function oP(e,t,n=[]){let r;e:for(let o=0;o<t.length;o+=1){const i=t[o];if("function"==typeof i.props){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(r))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?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(i.style(r))):n.push(i.style)}return n}function iP(e,t){let n;return"production"!==process.env.NODE_ENV&&e&&(n=`${e}-${aP(t||"Root")}`),n}function aP(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function sP(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if("components"===o||"slots"===o)n[o]={...e[o],...n[o]};else if("componentsProps"===o||"slotProps"===o){const r=e[o],i=t[o];if(i)if(r){n[o]={...i};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const t=e;n[o][t]=sP(r[t],i[t])}}else n[o]=i;else n[o]=r||{}}else void 0===n[o]&&(n[o]=e[o])}return n}const lP="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function cP(e,t=0,n=1){return"production"!==process.env.NODE_ENV&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}(e,t,n)}function uP(e){if(e.type)return e;if("#"===e.charAt(0))return uP(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),"production"!==process.env.NODE_ENV&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error("production"!==process.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:zO(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error("production"!==process.env.NODE_ENV?`MUI: unsupported \`${r}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:zO(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const dP=(e,t)=>{try{return(e=>{const t=uP(e);return t.values.slice(0,3).map(((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e)).join(" ")})(e)}catch(n){return t&&"production"!==process.env.NODE_ENV&&console.warn(t),e}};function fP(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function pP(e){e=uP(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),fP({type:s,values:l})}function hP(e){let t="hsl"===(e=uP(e)).type||"hsla"===e.type?uP(pP(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 mP(e,t){const n=hP(e),r=hP(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function gP(e,t){return e=uP(e),t=cP(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,fP(e)}function yP(e,t,n){try{return gP(e,t)}catch(t){return e}}function bP(e,t){if(e=uP(e),t=cP(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return fP(e)}function vP(e,t,n){try{return bP(e,t)}catch(t){return e}}function wP(e,t){if(e=uP(e),t=cP(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return fP(e)}function xP(e,t,n){try{return wP(e,t)}catch(t){return e}}function kP(e,t,n){try{return function(e,t=.15){return hP(e)>.5?bP(e,t):wP(e,t)}(e,t)}catch(t){return e}}var CP,EP,SP=(CP=Ty.elementType,EP=function(e,t,n,r,o){const i=e[t],a=o||t;if(null==i||"undefined"==typeof window)return null;let s;return"function"!=typeof i||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(i)||(s="Did you accidentally provide a plain function component instead?"),void 0!==s?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null},"production"===process.env.NODE_ENV?()=>null:function(...e){return CP(...e)||EP(...e)});const _P=Ty.oneOfType([Ty.func,Ty.object]);function IP(t){const n=e.useRef(t);return lP((()=>{n.current=t})),e.useRef(((...e)=>(0,n.current)(...e))).current}function AP(...t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}const NP={};function OP(t,n){const r=e.useRef(NP);return r.current===NP&&(r.current=t(n)),r}const RP=[];class TP{static create(){return new TP}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 MP(){const t=OP(TP.create).current;var n;return n=t.disposeEffect,e.useEffect(n,RP),t}function PP(e){try{return e.matches(":focus-visible")}catch(e){"production"===process.env.NODE_ENV||/jsdom/.test(window.navigator.userAgent)||console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join("\n"))}return!1}function DP(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function jP(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=jO(n?.className,i,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},a={...n,...o,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}({...o,...r}),s=DP(r),l=DP(o),c=t(a),u=jO(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}const BP=e.createContext(void 0);function LP({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?sP(o.defaultProps,r):o.styleOverrides||o.variants?r:sP(o,r)}({props:t,name:n,theme:{components:e.useContext(BP)}})}"production"!==process.env.NODE_ENV&&(Ty.node,Ty.object);const zP={theme:void 0};function FP(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}const VP=(e,t,n,r=[])=>{let o=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])}))};function GP(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((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)(e,t);Object.assign(o,{[r]:l}),VP(i,e,`var(${r})`,s),VP(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach((([t,o])=>{(!l||l&&!l([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):s([...n,t],o,r))}))}(e),{css:o,vars:i,varsWithDefaults:a}}const HP={black:"#000",white:"#fff"},WP={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"},XP="#f3e5f5",$P="#ce93d8",ZP="#ba68c8",YP="#ab47bc",UP="#9c27b0",JP="#7b1fa2",KP="#e57373",qP="#ef5350",QP="#f44336",eD="#d32f2f",tD="#c62828",nD="#ffb74d",rD="#ffa726",oD="#ff9800",iD="#f57c00",aD="#e65100",sD="#e3f2fd",lD="#90caf9",cD="#42a5f5",uD="#1976d2",dD="#1565c0",fD="#4fc3f7",pD="#29b6f6",hD="#03a9f4",mD="#0288d1",gD="#01579b",yD="#81c784",bD="#66bb6a",vD="#4caf50",wD="#388e3c",xD="#2e7d32",kD="#1b5e20";function CD(){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:HP.white,default:HP.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}}}const ED=CD();function SD(){return{text:{primary:HP.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:HP.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}}}const _D=SD();function ID(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=wP(e.main,o):"dark"===t&&(e.dark=bP(e.main,i)))}function AD(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||function(e="light"){return"dark"===e?{main:lD,light:sD,dark:cD}:{main:uD,light:cD,dark:dD}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:$P,light:XP,dark:YP}:{main:UP,light:ZP,dark:JP}}(t),s=e.error||function(e="light"){return"dark"===e?{main:QP,light:KP,dark:eD}:{main:eD,light:qP,dark:tD}}(t),l=e.info||function(e="light"){return"dark"===e?{main:pD,light:fD,dark:mD}:{main:mD,light:hD,dark:gD}}(t),c=e.success||function(e="light"){return"dark"===e?{main:bD,light:yD,dark:wD}:{main:xD,light:vD,dark:kD}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:rD,light:nD,dark:iD}:{main:"#ed6c02",light:oD,dark:aD}}(t);function d(e){const t=mP(e,_D.text.primary)>=n?_D.text.primary:ED.text.primary;if("production"!==process.env.NODE_ENV){const n=mP(e,t);n<3&&console.error([`MUI: The contrast ratio of ${n}:1 for ${t} on ${e}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"))}return t}const f=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`:zO(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error("production"!==process.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from "@mui/material/colors";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });`:zO(12,t?` (${t})`:"",JSON.stringify(e.main)));return ID(e,"light",o,r),ID(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e};let p;"light"===t?p=CD():"dark"===t&&(p=SD()),"production"!==process.env.NODE_ENV&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`));return QO({common:{...HP},mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:WP,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r,...p},o)}function ND(e){const t={};return Object.entries(e).forEach((e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)})),t}const OD={textTransform:"uppercase"},RD='"Roboto", "Helvetica", "Arial", sans-serif';function TD(e,t){const{fontFamily:n=RD,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t;"production"!==process.env.NODE_ENV&&("number"!=typeof r&&console.error("MUI: `fontSize` is required to be a number."),"number"!=typeof l&&console.error("MUI: `htmlFontSize` is required to be a number."));const f=r/14,p=u||(e=>e/l*f+"rem"),h=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===RD?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,OD),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,OD),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return QO({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}function MD(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const PD=["none",MD(0,2,1,-1,0,1,1,0,0,1,3,0),MD(0,3,1,-2,0,2,2,0,0,1,5,0),MD(0,3,3,-2,0,3,4,0,0,1,8,0),MD(0,2,4,-1,0,4,5,0,0,1,10,0),MD(0,3,5,-1,0,5,8,0,0,1,14,0),MD(0,3,5,-1,0,6,10,0,0,1,18,0),MD(0,4,5,-2,0,7,10,1,0,2,16,1),MD(0,5,5,-3,0,8,10,1,0,3,14,2),MD(0,5,6,-3,0,9,12,1,0,3,16,2),MD(0,6,6,-3,0,10,14,1,0,4,18,3),MD(0,6,7,-4,0,11,15,1,0,4,20,3),MD(0,7,8,-4,0,12,17,2,0,5,22,4),MD(0,7,8,-4,0,13,19,2,0,5,24,4),MD(0,7,9,-4,0,14,21,2,0,5,26,4),MD(0,8,9,-5,0,15,22,2,0,6,28,5),MD(0,8,10,-5,0,16,24,2,0,6,30,5),MD(0,8,11,-5,0,17,26,2,0,6,32,5),MD(0,9,11,-5,0,18,28,2,0,7,34,6),MD(0,9,12,-6,0,19,29,2,0,7,36,6),MD(0,10,13,-6,0,20,31,3,0,8,38,7),MD(0,10,13,-6,0,21,33,3,0,8,40,7),MD(0,10,14,-6,0,22,35,3,0,8,42,7),MD(0,11,14,-7,0,23,36,3,0,9,44,8),MD(0,11,15,-7,0,24,38,3,0,9,46,8)],DD={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)"},jD={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function BD(e){return`${Math.round(e)}ms`}function LD(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function zD(e){const t={...DD,...e.easing},n={...jD,...e.duration};return{getAutoHeightDuration:LD,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...s}=r;if("production"!==process.env.NODE_ENV){const t=e=>"string"==typeof e,n=e=>!Number.isNaN(parseFloat(e));t(e)||Array.isArray(e)||console.error('MUI: Argument "props" must be a string or Array.'),n(o)||t(o)||console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),t(i)||console.error('MUI: Argument "easing" must be a string.'),n(a)||t(a)||console.error('MUI: Argument "delay" must be a number or a string.'),"object"!=typeof r&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join("\n")),0!==Object.keys(s).length&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(s).join(",")}].`)}return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:BD(o)} ${i} ${"string"==typeof a?a:BD(a)}`)).join(",")},...e,easing:t,duration:n}}const FD={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function VD(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let o=0;o<n.length;o++){const[i,a]=n[o];!KO(r=a)&&void 0!==r&&"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&!Array.isArray(r)||i.startsWith("unstable_")?delete t[i]:KO(a)&&(t[i]={...a},e(t[i]))}var r}(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 GD(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars)throw new Error("production"!==process.env.NODE_ENV?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name.":zO(20));const u=AD(i),d=XM(e);let f=QO(d,{mixins:(p=d.breakpoints,h=r,{toolbar:{minHeight:56,[p.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[p.up("sm")]:{minHeight:64}},...h}),palette:u,shadows:PD.slice(),typography:TD(u,s),transitions:zD(a),zIndex:{...FD}});var p,h;if(f=QO(f,c),f=t.reduce(((e,t)=>QO(e,t)),f),"production"!==process.env.NODE_ENV){const e=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],t=(t,n)=>{let r;for(r in t){const o=t[r];if(e.includes(r)&&Object.keys(o).length>0){if("production"!==process.env.NODE_ENV){const e=UM("",r);console.error([`MUI: The \`${n}\` component increases the CSS specificity of the \`${r}\` internal state.`,"You can not override it like this: ",JSON.stringify(t,null,2),"",`Instead, you need to use the '&.${e}' syntax:`,JSON.stringify({root:{[`&.${e}`]:o}},null,2),"","https://mui.com/r/state-classes-guide"].join("\n"))}t[r]={}}}};Object.keys(f.components).forEach((e=>{const n=f.components[e].styleOverrides;n&&e.startsWith("Mui")&&t(n,e)}))}return f.unstable_sxConfig={...JR,...c?.unstable_sxConfig},f.unstable_sx=function(e){return KR({sx:e,theme:this})},f.toRuntimeSource=VD,f}const HD=[...Array(25)].map(((e,t)=>{if(0===t)return"none";const n=function(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`}));function WD(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function XD(e){return"dark"===e?HD:[]}function $D(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var ZD=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(a=e.cssVarPrefix,[...[...Array(25)].map(((e,t)=>`--${a?`${a}-`:""}overlays-${t}`)),`--${a?`${a}-`:""}palette-AppBar-darkBg`,`--${a?`${a}-`:""}palette-AppBar-darkColor`]).forEach((e=>{o[e]=n[e],delete n[e]})),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}var a;return r};function YD(e,t,n){!e[t]&&n&&(e[t]=n)}function UD(e){return"string"==typeof e&&e.startsWith("hsl")?pP(e):e}function JD(e,t){`${t}Channel`in e||(e[`${t}Channel`]=dP(UD(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.`))}const KD=e=>{try{return e()}catch(e){}};function qD(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=AD(t);return{palette:i,opacity:{...WD(i.mode),...n},overlays:r||XD(i.mode),...o}}({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=GD({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...WD(o),...t?.opacity},overlays:t?.overlays||XD(o)},a}function QD(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=$D,colorSchemeSelector:s=(n.light&&n.dark?"media":void 0),rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&"light"!==u?"light":u),f=((e="mui")=>FP(e))(i),{[d]:p,light:h,dark:m,...g}=n,y={...g};let b=p;if(("dark"===d&&!("dark"in n)||"light"===d&&!("light"in n))&&(b=!0),!b)throw new Error("production"!==process.env.NODE_ENV?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:zO(21,d));const v=qD(y,b,c,d);h&&!y.light&&qD(y,h,void 0,"light"),m&&!y.dark&&qD(y,m,void 0,"dark");let w={defaultColorScheme:d,...v,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:y,font:{...ND(v.typography),...v.font},spacing:(x=c.spacing,"number"==typeof x?`${x}px`:"string"==typeof x||"function"==typeof x||Array.isArray(x)?x:"8px")};var x;Object.keys(w.colorSchemes).forEach((e=>{const t=w.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return f(e,t[r][o])};if("light"===t.mode&&(YD(t.common,"background","#fff"),YD(t.common,"onBackground","#000")),"dark"===t.mode&&(YD(t.common,"background","#000"),YD(t.common,"onBackground","#fff")),function(e,t){t.forEach((t=>{e[t]||(e[t]={})}))}(t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),"light"===t.mode){YD(t.Alert,"errorColor",vP(t.error.light,.6)),YD(t.Alert,"infoColor",vP(t.info.light,.6)),YD(t.Alert,"successColor",vP(t.success.light,.6)),YD(t.Alert,"warningColor",vP(t.warning.light,.6)),YD(t.Alert,"errorFilledBg",n("palette-error-main")),YD(t.Alert,"infoFilledBg",n("palette-info-main")),YD(t.Alert,"successFilledBg",n("palette-success-main")),YD(t.Alert,"warningFilledBg",n("palette-warning-main")),YD(t.Alert,"errorFilledColor",KD((()=>t.getContrastText(t.error.main)))),YD(t.Alert,"infoFilledColor",KD((()=>t.getContrastText(t.info.main)))),YD(t.Alert,"successFilledColor",KD((()=>t.getContrastText(t.success.main)))),YD(t.Alert,"warningFilledColor",KD((()=>t.getContrastText(t.warning.main)))),YD(t.Alert,"errorStandardBg",xP(t.error.light,.9)),YD(t.Alert,"infoStandardBg",xP(t.info.light,.9)),YD(t.Alert,"successStandardBg",xP(t.success.light,.9)),YD(t.Alert,"warningStandardBg",xP(t.warning.light,.9)),YD(t.Alert,"errorIconColor",n("palette-error-main")),YD(t.Alert,"infoIconColor",n("palette-info-main")),YD(t.Alert,"successIconColor",n("palette-success-main")),YD(t.Alert,"warningIconColor",n("palette-warning-main")),YD(t.AppBar,"defaultBg",n("palette-grey-100")),YD(t.Avatar,"defaultBg",n("palette-grey-400")),YD(t.Button,"inheritContainedBg",n("palette-grey-300")),YD(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),YD(t.Chip,"defaultBorder",n("palette-grey-400")),YD(t.Chip,"defaultAvatarColor",n("palette-grey-700")),YD(t.Chip,"defaultIconColor",n("palette-grey-700")),YD(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),YD(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),YD(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),YD(t.LinearProgress,"primaryBg",xP(t.primary.main,.62)),YD(t.LinearProgress,"secondaryBg",xP(t.secondary.main,.62)),YD(t.LinearProgress,"errorBg",xP(t.error.main,.62)),YD(t.LinearProgress,"infoBg",xP(t.info.main,.62)),YD(t.LinearProgress,"successBg",xP(t.success.main,.62)),YD(t.LinearProgress,"warningBg",xP(t.warning.main,.62)),YD(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),YD(t.Slider,"primaryTrack",xP(t.primary.main,.62)),YD(t.Slider,"secondaryTrack",xP(t.secondary.main,.62)),YD(t.Slider,"errorTrack",xP(t.error.main,.62)),YD(t.Slider,"infoTrack",xP(t.info.main,.62)),YD(t.Slider,"successTrack",xP(t.success.main,.62)),YD(t.Slider,"warningTrack",xP(t.warning.main,.62));const e=kP(t.background.default,.8);YD(t.SnackbarContent,"bg",e),YD(t.SnackbarContent,"color",KD((()=>t.getContrastText(e)))),YD(t.SpeedDialAction,"fabHoverBg",kP(t.background.paper,.15)),YD(t.StepConnector,"border",n("palette-grey-400")),YD(t.StepContent,"border",n("palette-grey-400")),YD(t.Switch,"defaultColor",n("palette-common-white")),YD(t.Switch,"defaultDisabledColor",n("palette-grey-100")),YD(t.Switch,"primaryDisabledColor",xP(t.primary.main,.62)),YD(t.Switch,"secondaryDisabledColor",xP(t.secondary.main,.62)),YD(t.Switch,"errorDisabledColor",xP(t.error.main,.62)),YD(t.Switch,"infoDisabledColor",xP(t.info.main,.62)),YD(t.Switch,"successDisabledColor",xP(t.success.main,.62)),YD(t.Switch,"warningDisabledColor",xP(t.warning.main,.62)),YD(t.TableCell,"border",xP(yP(t.divider,1),.88)),YD(t.Tooltip,"bg",yP(t.grey[700],.92))}if("dark"===t.mode){YD(t.Alert,"errorColor",xP(t.error.light,.6)),YD(t.Alert,"infoColor",xP(t.info.light,.6)),YD(t.Alert,"successColor",xP(t.success.light,.6)),YD(t.Alert,"warningColor",xP(t.warning.light,.6)),YD(t.Alert,"errorFilledBg",n("palette-error-dark")),YD(t.Alert,"infoFilledBg",n("palette-info-dark")),YD(t.Alert,"successFilledBg",n("palette-success-dark")),YD(t.Alert,"warningFilledBg",n("palette-warning-dark")),YD(t.Alert,"errorFilledColor",KD((()=>t.getContrastText(t.error.dark)))),YD(t.Alert,"infoFilledColor",KD((()=>t.getContrastText(t.info.dark)))),YD(t.Alert,"successFilledColor",KD((()=>t.getContrastText(t.success.dark)))),YD(t.Alert,"warningFilledColor",KD((()=>t.getContrastText(t.warning.dark)))),YD(t.Alert,"errorStandardBg",vP(t.error.light,.9)),YD(t.Alert,"infoStandardBg",vP(t.info.light,.9)),YD(t.Alert,"successStandardBg",vP(t.success.light,.9)),YD(t.Alert,"warningStandardBg",vP(t.warning.light,.9)),YD(t.Alert,"errorIconColor",n("palette-error-main")),YD(t.Alert,"infoIconColor",n("palette-info-main")),YD(t.Alert,"successIconColor",n("palette-success-main")),YD(t.Alert,"warningIconColor",n("palette-warning-main")),YD(t.AppBar,"defaultBg",n("palette-grey-900")),YD(t.AppBar,"darkBg",n("palette-background-paper")),YD(t.AppBar,"darkColor",n("palette-text-primary")),YD(t.Avatar,"defaultBg",n("palette-grey-600")),YD(t.Button,"inheritContainedBg",n("palette-grey-800")),YD(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),YD(t.Chip,"defaultBorder",n("palette-grey-700")),YD(t.Chip,"defaultAvatarColor",n("palette-grey-300")),YD(t.Chip,"defaultIconColor",n("palette-grey-300")),YD(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),YD(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),YD(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),YD(t.LinearProgress,"primaryBg",vP(t.primary.main,.5)),YD(t.LinearProgress,"secondaryBg",vP(t.secondary.main,.5)),YD(t.LinearProgress,"errorBg",vP(t.error.main,.5)),YD(t.LinearProgress,"infoBg",vP(t.info.main,.5)),YD(t.LinearProgress,"successBg",vP(t.success.main,.5)),YD(t.LinearProgress,"warningBg",vP(t.warning.main,.5)),YD(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),YD(t.Slider,"primaryTrack",vP(t.primary.main,.5)),YD(t.Slider,"secondaryTrack",vP(t.secondary.main,.5)),YD(t.Slider,"errorTrack",vP(t.error.main,.5)),YD(t.Slider,"infoTrack",vP(t.info.main,.5)),YD(t.Slider,"successTrack",vP(t.success.main,.5)),YD(t.Slider,"warningTrack",vP(t.warning.main,.5));const e=kP(t.background.default,.98);YD(t.SnackbarContent,"bg",e),YD(t.SnackbarContent,"color",KD((()=>t.getContrastText(e)))),YD(t.SpeedDialAction,"fabHoverBg",kP(t.background.paper,.15)),YD(t.StepConnector,"border",n("palette-grey-600")),YD(t.StepContent,"border",n("palette-grey-600")),YD(t.Switch,"defaultColor",n("palette-grey-300")),YD(t.Switch,"defaultDisabledColor",n("palette-grey-600")),YD(t.Switch,"primaryDisabledColor",vP(t.primary.main,.55)),YD(t.Switch,"secondaryDisabledColor",vP(t.secondary.main,.55)),YD(t.Switch,"errorDisabledColor",vP(t.error.main,.55)),YD(t.Switch,"infoDisabledColor",vP(t.info.main,.55)),YD(t.Switch,"successDisabledColor",vP(t.success.main,.55)),YD(t.Switch,"warningDisabledColor",vP(t.warning.main,.55)),YD(t.TableCell,"border",vP(yP(t.divider,1),.68)),YD(t.Tooltip,"bg",yP(t.grey[700],.92))}JD(t.background,"default"),JD(t.background,"paper"),JD(t.common,"background"),JD(t.common,"onBackground"),JD(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&YD(t[e],"mainChannel",dP(UD(n.main))),n.light&&YD(t[e],"lightChannel",dP(UD(n.light))),n.dark&&YD(t[e],"darkChannel",dP(UD(n.dark))),n.contrastText&&YD(t[e],"contrastTextChannel",dP(UD(n.contrastText))),"text"===e&&(JD(t[e],"primary"),JD(t[e],"secondary")),"action"===e&&(n.active&&JD(t[e],"active"),n.selected&&JD(t[e],"selected")))}))})),w=t.reduce(((e,t)=>QO(e,t)),w);const k={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:ZD(w)},{vars:C,generateThemeVars:E,generateStyleSheets:S}=function(e,t={}){const{getSelector:n=g,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=GP(l,t);let f=d;const p={},{[s]:h,...m}=i;if(Object.entries(m||{}).forEach((([e,n])=>{const{vars:r,css:o,varsWithDefaults:i}=GP(n,t);f=QO(f,i),p[e]={css:o,vars:r}})),h){const{css:e,vars:n,varsWithDefaults:r}=GP(h,t);f=QO(f,r),p[s]={css:e,vars:n}}function g(t,n){let r=o;if("class"===o&&(r=".%s"),"data"===o&&(r="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(r=`[${o}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=i[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:f,generateThemeVars:()=>{let e={...c};return Object.entries(p).forEach((([,{vars:t}])=>{e=QO(e,t)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function a(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}a(n(void 0,{...u}),u);const{[o]:s,...l}=p;if(s){const{css:e}=s,t=i[o]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};a(n(o,{...l}),l)}return Object.entries(l).forEach((([e,{css:t}])=>{const o=i[e]?.palette?.mode,s=!r&&o?{colorScheme:o,...t}:{...t};a(n(e,{...s}),s)})),t}}}(w,k);return w.vars=C,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach((([e,t])=>{w[e]=t})),w.generateThemeVars=E,w.generateStyleSheets=S,w.generateSpacing=function(){return HM(c.spacing,yR(this))},w.getColorSchemeSelector=function(e){return function(t){return"media"===e?("production"!==process.env.NODE_ENV&&"light"!==t&&"dark"!==t&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${t}'.`),`@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)} &`:"&"}}(s),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...JR,...c?.unstable_sxConfig},w.unstable_sx=function(e){return KR({sx:e,theme:this})},w.toRuntimeSource=VD,w}function ej(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:AD({...!0===n?{}:n.palette,mode:t})})}const tj=function(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=(n?void 0:{light:!0}),defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{..."boolean"!=typeof l&&l,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return GD(e,...t);let r=n;"palette"in e||c[s]&&(!0!==c[s]?r=c[s].palette:"dark"===s&&(r={mode:"dark"}));const o=GD({...e,palette:r},...t);return o.defaultColorScheme=s,o.colorSchemes=c,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==c.light&&c.light,palette:o.palette},ej(o,"dark",c.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:o.palette},ej(o,"light",c.light)),o}return n||"light"in c||"light"!==s||(c.light=!0),QD({...a,colorSchemes:c,defaultColorScheme:s,..."boolean"!=typeof r&&r},...t)}();const nj=function(e={}){const{themeId:t,defaultTheme:n=eP,rootShouldForwardProp:r=tP,slotShouldForwardProp:o=tP}=e;function i(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}(e,(e=>e.filter((e=>e!==KR))));const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=nP(aP(a)),...u}=t,d=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,f=l||!1;let p=tP;"Root"===a||"root"===a?p=r:a?p=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(p=void 0);const h=
71
- /**
72
- * @mui/styled-engine v6.4.3
73
- *
74
- * @license MIT
75
- * This source code is licensed under the MIT license found in the
76
- * LICENSE file in the root directory of this source tree.
77
- */
78
- function(e,t){const n=LM(e,t);return"production"!==process.env.NODE_ENV?(...t)=>{const r="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...t)}:n}(e,{shouldForwardProp:p,label:iP(n,a),...u}),m=e=>{if("function"==typeof e&&e.__emotion_real!==e)return function(t){return rP(t,e)};if(KO(e)){const t=QM(e);return t.variants?function(e){return rP(e,t)}:t.style}return e},g=(...t)=>{const r=[],o=t.map(m),s=[];if(r.push(i),n&&c&&s.push((function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=rP(e,r[t]);return c(e,o)})),n&&!d&&s.push((function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?oP(e,r):null})),f||s.push(KR),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(s.length).fill("");let i;i=[...t,...e,...n],i.raw=[...t,...e.raw,...n],r.unshift(i)}const l=[...r,...o,...s],u=h(...l);return e.muiName&&(u.muiName=e.muiName),"production"!==process.env.NODE_ENV&&(u.displayName=function(e,t,n){if(e)return`${e}${FO(t||"")}`;return`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return KM(e,"Component");if("object"==typeof e)switch(e.$$typeof){case JO.ForwardRef:return qM(e,e.render,"ForwardRef");case JO.Memo:return qM(e,e.type,"memo");default:return}}}(n)})`}(n,a,e)),u};return h.withConfig&&(g.withConfig=h.withConfig),g}}({themeId:"$$material",defaultTheme:tj,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e}),rj=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(zP.theme=r.theme,o=QM(e(zP)),t=o,n=r.theme),o}};function oj(e){return LP(e)}function ij(e){return UM("MuiTable",e)}"production"!==process.env.NODE_ENV&&(Ty.node,Ty.object.isRequired),JM("MuiTable",["root","stickyHeader"]);const aj=nj("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(rj((({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]})))),sj="table",lj=e.forwardRef((function(t,n){const r=oj({props:t,name:"MuiTable"}),{className:o,component:i=sj,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},d=(e=>{const{classes:t,stickyHeader:n}=e;return BO({root:["root",n&&"stickyHeader"]},ij,t)})(u),f=e.useMemo((()=>({padding:a,size:s,stickyHeader:l})),[a,s,l]);return yd.jsx(LO.Provider,{value:f,children:yd.jsx(aj,{as:i,role:i===sj?null:"table",ref:n,className:jO(d.root,o),ownerState:u,...c})})}));"production"!==process.env.NODE_ENV&&(lj.propTypes={children:Ty.node,classes:Ty.object,className:Ty.string,component:Ty.elementType,padding:Ty.oneOf(["checkbox","none","normal"]),size:Ty.oneOfType([Ty.oneOf(["medium","small"]),Ty.string]),stickyHeader:Ty.bool,sx:Ty.oneOfType([Ty.arrayOf(Ty.oneOfType([Ty.func,Ty.object,Ty.bool])),Ty.func,Ty.object])});const cj=e.createContext();function uj(e){return UM("MuiTableBody",e)}"production"!==process.env.NODE_ENV&&(cj.displayName="Tablelvl2Context"),JM("MuiTableBody",["root"]);const dj=nj("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),fj={variant:"body"},pj="tbody",hj=e.forwardRef((function(e,t){const n=oj({props:e,name:"MuiTableBody"}),{className:r,component:o=pj,...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return BO({root:["root"]},uj,t)})(a);return yd.jsx(cj.Provider,{value:fj,children:yd.jsx(dj,{className:jO(s.root,r),as:o,ref:t,role:o===pj?null:"rowgroup",ownerState:a,...i})})}));function mj(e){return UM("MuiTableCell",e)}"production"!==process.env.NODE_ENV&&(hj.propTypes={children:Ty.node,classes:Ty.object,className:Ty.string,component:Ty.elementType,sx:Ty.oneOfType([Ty.arrayOf(Ty.oneOfType([Ty.func,Ty.object,Ty.bool])),Ty.func,Ty.object])});const gj=JM("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),yj=nj("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${FO(n.size)}`],"normal"!==n.padding&&t[`padding${FO(n.padding)}`],"inherit"!==n.align&&t[`align${FO(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(rj((({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?wP(gP(e.palette.divider,1),.88):bP(gP(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${gj.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]})))),bj=e.forwardRef((function(t,n){const r=oj({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d,...f}=r,p=e.useContext(LO),h=e.useContext(cj),m=h&&"head"===h.variant;let g;g=a||(m?"th":"td");let y=l;"td"===g?y=void 0:!y&&m&&(y="col");const b=d||h&&h.variant,v={...r,align:o,component:g,padding:s||(p&&p.padding?p.padding:"normal"),size:c||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:"head"===b&&p&&p.stickyHeader,variant:b},w=(e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e;return BO({root:["root",n,a&&"stickyHeader","inherit"!==r&&`align${FO(r)}`,"normal"!==o&&`padding${FO(o)}`,`size${FO(i)}`]},mj,t)})(v);let x=null;return u&&(x="asc"===u?"ascending":"descending"),yd.jsx(yj,{as:g,ref:n,className:jO(w.root,i),"aria-sort":x,scope:y,ownerState:v,...f})}));function vj(e){return UM("MuiTableContainer",e)}"production"!==process.env.NODE_ENV&&(bj.propTypes={align:Ty.oneOf(["center","inherit","justify","left","right"]),children:Ty.node,classes:Ty.object,className:Ty.string,component:Ty.elementType,padding:Ty.oneOf(["checkbox","none","normal"]),scope:Ty.string,size:Ty.oneOfType([Ty.oneOf(["medium","small"]),Ty.string]),sortDirection:Ty.oneOf(["asc","desc",!1]),sx:Ty.oneOfType([Ty.arrayOf(Ty.oneOfType([Ty.func,Ty.object,Ty.bool])),Ty.func,Ty.object]),variant:Ty.oneOfType([Ty.oneOf(["body","footer","head"]),Ty.string])}),JM("MuiTableContainer",["root"]);const wj=nj("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),xj=e.forwardRef((function(e,t){const n=oj({props:e,name:"MuiTableContainer"}),{className:r,component:o="div",...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return BO({root:["root"]},vj,t)})(a);return yd.jsx(wj,{ref:t,as:o,className:jO(s.root,r),ownerState:a,...i})}));function kj(e){return UM("MuiTableHead",e)}"production"!==process.env.NODE_ENV&&(xj.propTypes={children:Ty.node,classes:Ty.object,className:Ty.string,component:Ty.elementType,sx:Ty.oneOfType([Ty.arrayOf(Ty.oneOfType([Ty.func,Ty.object,Ty.bool])),Ty.func,Ty.object])}),JM("MuiTableHead",["root"]);const Cj=nj("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),Ej={variant:"head"},Sj="thead",_j=e.forwardRef((function(e,t){const n=oj({props:e,name:"MuiTableHead"}),{className:r,component:o=Sj,...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return BO({root:["root"]},kj,t)})(a);return yd.jsx(cj.Provider,{value:Ej,children:yd.jsx(Cj,{as:o,className:jO(s.root,r),ref:t,role:o===Sj?null:"rowgroup",ownerState:a,...i})})}));function Ij(e){return UM("MuiTableRow",e)}"production"!==process.env.NODE_ENV&&(_j.propTypes={children:Ty.node,classes:Ty.object,className:Ty.string,component:Ty.elementType,sx:Ty.oneOfType([Ty.arrayOf(Ty.oneOfType([Ty.func,Ty.object,Ty.bool])),Ty.func,Ty.object])});const Aj=JM("MuiTableRow",["root","selected","hover","head","footer"]),Nj=nj("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(rj((({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${Aj.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Aj.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:gP(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:gP(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})))),Oj="tr",Rj=e.forwardRef((function(t,n){const r=oj({props:t,name:"MuiTableRow"}),{className:o,component:i=Oj,hover:a=!1,selected:s=!1,...l}=r,c=e.useContext(cj),u={...r,component:i,hover:a,selected:s,head:c&&"head"===c.variant,footer:c&&"footer"===c.variant},d=(e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return BO({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},Ij,t)})(u);return yd.jsx(Nj,{as:i,ref:n,className:jO(d.root,o),role:i===Oj?null:"row",ownerState:u,...l})}));"production"!==process.env.NODE_ENV&&(Rj.propTypes={children:Ty.node,classes:Ty.object,className:Ty.string,component:Ty.elementType,hover:Ty.bool,selected:Ty.bool,sx:Ty.oneOfType([Ty.arrayOf(Ty.oneOfType([Ty.func,Ty.object,Ty.bool])),Ty.func,Ty.object])});class Tj{static create(){return new Tj}static use(){const t=OP(Tj.create).current,[n,r]=e.useState(!1);return t.shouldMount=n,t.setShouldMount=r,e.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}(),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 Mj(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function Pj(e,t){return Pj=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Pj(e,t)}function Dj(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Pj(e,t)}var jj=t.createContext(null);function Bj(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lj(e,t){var n=Object.create(null);return e&&g.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&h(e)?t(e):e}(e)})),n}function zj(e,t,n){return null!=n[t]?n[t]:e.props[t]}function Fj(e,t,n){var r=Lj(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,r);return Object.keys(o).forEach((function(i){var a=o[i];if(h(a)){var s=i in t,l=i in r,c=t[i],u=h(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&h(c)&&(o[i]=m(a,{onExited:n.bind(null,a),in:c.props.in,exit:zj(a,"exit",e),enter:zj(a,"enter",e)})):o[i]=m(a,{in:!1}):o[i]=m(a,{onExited:n.bind(null,a),in:!0,exit:zj(a,"exit",e),enter:zj(a,"enter",e)})}})),o}var Vj=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},Gj=function(e){function n(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(Bj(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}Dj(n,e);var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,Lj(n.children,(function(e){return m(e,{onExited:r.bind(null,e),in:!0,appear:zj(e,"appear",n),enter:zj(e,"enter",n),exit:zj(e,"exit",n)})}))):Fj(e,o,i),firstRender:!1}},r.handleExited=function(e,t){var n=Lj(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=qR({},t.children);return delete n[e.key],{children:n}})))},r.render=function(){var e=this.props,n=e.component,r=e.childFactory,o=Mj(e,["component","childFactory"]),i=this.state.contextValue,a=Vj(this.state.children).map(r);return delete o.appear,delete o.enter,delete o.exit,null===n?t.createElement(jj.Provider,{value:i},a):t.createElement(jj.Provider,{value:i},t.createElement(n,o,a))},n}(t.Component);function Hj(t){const{className:n,classes:r,pulsate:o=!1,rippleX:i,rippleY:a,rippleSize:s,in:l,onExited:c,timeout:u}=t,[d,f]=e.useState(!1),p=jO(n,r.ripple,r.rippleVisible,o&&r.ripplePulsate),h={width:s,height:s,top:-s/2+a,left:-s/2+i},m=jO(r.child,d&&r.childLeaving,o&&r.childPulsate);return l||d||f(!0),e.useEffect((()=>{if(!l&&null!=c){const e=setTimeout(c,u);return()=>{clearTimeout(e)}}}),[c,l,u]),yd.jsx("span",{className:p,style:h,children:yd.jsx("span",{className:m})})}Gj.propTypes="production"!==process.env.NODE_ENV?{component:Ty.any,children:Ty.node,appear:Ty.bool,enter:Ty.bool,exit:Ty.bool,childFactory:Ty.func}:{},Gj.defaultProps={component:"div",childFactory:function(e){return e}},"production"!==process.env.NODE_ENV&&(Hj.propTypes={classes:Ty.object.isRequired,className:Ty.string,in:Ty.bool,onExited:Ty.func,pulsate:Ty.bool,rippleSize:Ty.number,rippleX:Ty.number,rippleY:Ty.number,timeout:Ty.number.isRequired});const Wj=JM("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Xj=RM`
26
+ */const hv={prefix:"fas",iconName:"down-left-and-up-right-to-center",icon:[512,512,["compress-alt"],"f422","M439 7c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8l-144 0c-13.3 0-24-10.7-24-24l0-144c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39L439 7zM72 272l144 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39L73 505c-9.4 9.4-24.6 9.4-33.9 0L7 473c-9.4-9.4-9.4-24.6 0-33.9l87-87L55 313c-6.9-6.9-8.9-17.2-5.2-26.2s12.5-14.8 22.2-14.8z"]},mv={prefix:"fas",iconName:"bars",icon:[448,512,["navicon"],"f0c9","M0 96C0 78.3 14.3 64 32 64l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 288c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32L32 448c-17.7 0-32-14.3-32-32s14.3-32 32-32l384 0c17.7 0 32 14.3 32 32z"]},gv={prefix:"fas",iconName:"compress",icon:[448,512,[],"f066","M160 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96zM32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM352 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 320c-17.7 0-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0z"]},yv={prefix:"fas",iconName:"lock",icon:[448,512,[128274],"f023","M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"]},bv={prefix:"fas",iconName:"chevron-up",icon:[512,512,[],"f077","M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]},vv={prefix:"fas",iconName:"circle-play",icon:[512,512,[61469,"play-circle"],"f144","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"]},wv={prefix:"fas",iconName:"lock-open",icon:[576,512,[],"f3c1","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z"]},xv={prefix:"fas",iconName:"network-wired",icon:[640,512,[],"f6ff","M256 64l128 0 0 64-128 0 0-64zM240 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l48 0 0 32L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 256 0 0 32-48 0c-26.5 0-48 21.5-48 48l0 96c0 26.5 21.5 48 48 48l160 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48l-48 0 0-32 96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-256 0 0-32 48 0c26.5 0 48-21.5 48-48l0-96c0-26.5-21.5-48-48-48L240 0zM96 448l0-64 128 0 0 64L96 448zm320-64l128 0 0 64-128 0 0-64z"]},Ev={prefix:"fas",iconName:"magnifying-glass",icon:[512,512,[128269,"search"],"f002","M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"]},kv={prefix:"fas",iconName:"chevron-down",icon:[512,512,[],"f078","M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"]},Cv={prefix:"fas",iconName:"expand",icon:[448,512,[],"f065","M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z"]},Sv={prefix:"fas",iconName:"xmark",icon:[384,512,[128473,10005,10006,10060,215,"close","multiply","remove","times"],"f00d","M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]},_v={prefix:"fas",iconName:"chevron-left",icon:[320,512,[9001],"f053","M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256 246.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"]},Iv={prefix:"fas",iconName:"chevron-right",icon:[320,512,[9002],"f054","M310.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L242.7 256 73.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"]},Av={prefix:"fas",iconName:"up-right-and-down-left-from-center",icon:[512,512,["expand-alt"],"f424","M344 0L488 0c13.3 0 24 10.7 24 24l0 144c0 9.7-5.8 18.5-14.8 22.2s-19.3 1.7-26.2-5.2l-39-39-87 87c-9.4 9.4-24.6 9.4-33.9 0l-32-32c-9.4-9.4-9.4-24.6 0-33.9l87-87L327 41c-6.9-6.9-8.9-17.2-5.2-26.2S334.3 0 344 0zM168 512L24 512c-13.3 0-24-10.7-24-24L0 344c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2l39 39 87-87c9.4-9.4 24.6-9.4 33.9 0l32 32c9.4 9.4 9.4 24.6 0 33.9l-87 87 39 39c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8z"]};wb.autoAddCss=!1;const Nv=t=>{const{style:n,...r}=t;return e.createElement("span",{style:{marginLeft:"5px",...n}},e.createElement(fv,{...r}))},Ov=t=>e.createElement(Nv,{...t,icon:mv}),Rv=t=>e.createElement(Nv,{...t,icon:Iv}),Tv=t=>e.createElement(Nv,{...t,icon:_v}),Mv=t=>e.createElement(Nv,{...t,icon:Cv}),Pv=t=>e.createElement(Nv,{...t,icon:gv}),Dv=t=>e.createElement(Nv,{...t,icon:hv}),jv=t=>e.createElement(Nv,{...t,icon:Av}),Bv=t=>e.createElement(Nv,{...t,icon:kv}),Lv=t=>e.createElement(Nv,{...t,icon:bv}),zv=Lv,Fv=t=>e.createElement(Nv,{...t,icon:Sv}),Vv=t=>e.createElement(Nv,{...t,icon:wv}),Gv=t=>e.createElement(Nv,{...t,icon:yv}),Wv=t=>e.createElement(Nv,{...t,icon:xv}),Hv=t=>e.createElement(Nv,{...t,icon:vv}),Xv=t=>e.createElement(Nv,{...t,icon:Ev}),Yv=({trigger:t,title:n,description:r,children:o,closebutton:i=!0,onOpenChange:a,buttons:s=[],open:l,setOpen:c,modal:u=!0})=>{const d=e.useContext(xW).local_state((e=>e.funcnodescontainerRef)),f=e.createElement(tm,{asChild:!0},e.createElement("div",{className:"dialogconent funcnodescontainer"},n&&e.createElement(nm,{className:"dialogtitle"},n),e.createElement(rm,{className:"dialogdescription"},r),e.createElement("div",{className:"dialogchildren"},o),e.createElement("div",{style:{display:"flex",marginTop:25,justifyContent:"flex-end"}},(s||[]).map(((t,n)=>e.createElement(om,{asChild:!0,key:n},e.createElement("button",{className:"dialogsendbutton",onClick:t.onClick},t.text))))),i&&e.createElement(om,{asChild:!0},e.createElement("button",{className:"dialogclosebutton","aria-label":"Close"},e.createElement(Fv,null)))));return e.createElement(Kh,{open:l,onOpenChange:e=>{c&&c(e),a&&a(e)},modal:u},t&&e.createElement(qh,{asChild:!0},t),e.createElement(Qh,{container:d},e.createElement(em,{className:"dialogoverlay funcnodescontainer"}),f))};function $v(e){const n=e+"CollectionProvider",[r,o]=zf(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:n,children:r}=e,o=t.useRef(null),a=t.useRef(new Map).current;return Lf.jsx(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const l=e+"CollectionSlot",c=t.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=Of(t,a(l,n).collectionRef);return Lf.jsx($f,{ref:o,children:r})}));c.displayName=l;const u=e+"CollectionItemSlot",d="data-radix-collection-item",f=t.forwardRef(((e,n)=>{const{scope:r,children:o,...i}=e,s=t.useRef(null),l=Of(n,s),c=a(u,r);return t.useEffect((()=>(c.itemMap.set(s,{ref:s,...i}),()=>{c.itemMap.delete(s)}))),Lf.jsx($f,{[d]:"",ref:l,children:o})}));return f.displayName=u,[{Provider:s,Slot:c,ItemSlot:f},function(n){const r=a(e+"CollectionConsumer",n);return t.useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(r.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[r.collectionRef,r.itemMap])},o]}var Zv=e.createContext(void 0);function Uv(t){const n=e.useContext(Zv);return t||n||"ltr"}const Jv=["top","right","bottom","left"],Kv=Math.min,qv=Math.max,Qv=Math.round,ew=Math.floor,tw=e=>({x:e,y:e}),nw={left:"right",right:"left",bottom:"top",top:"bottom"},rw={start:"end",end:"start"};function ow(e,t,n){return qv(e,Kv(t,n))}function iw(e,t){return"function"==typeof e?e(t):e}function aw(e){return e.split("-")[0]}function sw(e){return e.split("-")[1]}function lw(e){return"x"===e?"y":"x"}function cw(e){return"y"===e?"height":"width"}function uw(e){return["top","bottom"].includes(aw(e))?"y":"x"}function dw(e){return lw(uw(e))}function fw(e){return e.replace(/start|end/g,(e=>rw[e]))}function pw(e){return e.replace(/left|right|bottom|top/g,(e=>nw[e]))}function hw(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function mw(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function gw(e,t,n){let{reference:r,floating:o}=e;const i=uw(t),a=dw(t),s=cw(a),l=aw(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(sw(t)){case"start":p[a]-=f*(n&&c?-1:1);break;case"end":p[a]+=f*(n&&c?-1:1)}return p}async function yw(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=iw(t,e),h=hw(p),m=s[f?"floating"===d?"reference":"floating":d],g=mw(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),v=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},w=mw(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:b,strategy:l}):y);return{top:(g.top-w.top+h.top)/v.y,bottom:(w.bottom-g.bottom+h.bottom)/v.y,left:(g.left-w.left+h.left)/v.x,right:(w.right-g.right+h.right)/v.x}}function bw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vw(e){return Jv.some((t=>e[t]>=0))}function ww(){return"undefined"!=typeof window}function xw(e){return Cw(e)?(e.nodeName||"").toLowerCase():"#document"}function Ew(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function kw(e){var t;return null==(t=(Cw(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Cw(e){return!!ww()&&(e instanceof Node||e instanceof Ew(e).Node)}function Sw(e){return!!ww()&&(e instanceof Element||e instanceof Ew(e).Element)}function _w(e){return!!ww()&&(e instanceof HTMLElement||e instanceof Ew(e).HTMLElement)}function Iw(e){return!(!ww()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ew(e).ShadowRoot)}function Aw(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Pw(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Nw(e){return["table","td","th"].includes(xw(e))}function Ow(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Rw(e){const t=Tw(),n=Sw(e)?Pw(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Tw(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Mw(e){return["html","body","#document"].includes(xw(e))}function Pw(e){return Ew(e).getComputedStyle(e)}function Dw(e){return Sw(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jw(e){if("html"===xw(e))return e;const t=e.assignedSlot||e.parentNode||Iw(e)&&e.host||kw(e);return Iw(t)?t.host:t}function Bw(e){const t=jw(e);return Mw(t)?e.ownerDocument?e.ownerDocument.body:e.body:_w(t)&&Aw(t)?t:Bw(t)}function Lw(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Bw(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ew(o);if(i){const e=zw(a);return t.concat(a,a.visualViewport||[],Aw(o)?o:[],e&&n?Lw(e):[])}return t.concat(o,Lw(o,[],n))}function zw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Fw(e){const t=Pw(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=_w(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Qv(n)!==i||Qv(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Vw(e){return Sw(e)?e:e.contextElement}function Gw(e){const t=Vw(e);if(!_w(t))return tw(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Fw(t);let a=(i?Qv(n.width):n.width)/r,s=(i?Qv(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Ww=tw(0);function Hw(e){const t=Ew(e);return Tw()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ww}function Xw(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Vw(e);let a=tw(1);t&&(r?Sw(r)&&(a=Gw(r)):a=Gw(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ew(e))&&t}(i,n,r)?Hw(i):tw(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Ew(i),t=r&&Sw(r)?Ew(r):r;let n=e,o=zw(n);for(;o&&r&&t!==n;){const e=Gw(o),t=o.getBoundingClientRect(),r=Pw(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=a,n=Ew(o),o=zw(n)}}return mw({width:u,height:d,x:l,y:c})}function Yw(e,t){const n=Dw(e).scrollLeft;return t?t.left+n:Xw(kw(e)).left+n}function $w(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:Yw(e,r)),y:r.top+t.scrollTop}}function Zw(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ew(e),r=kw(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=Tw();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,n);else if("document"===t)r=function(e){const t=kw(e),n=Dw(e),r=e.ownerDocument.body,o=qv(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=qv(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Yw(e);const s=-n.scrollTop;return"rtl"===Pw(r).direction&&(a+=qv(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(kw(e));else if(Sw(t))r=function(e,t){const n=Xw(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=_w(e)?Gw(e):tw(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Hw(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return mw(r)}function Uw(e,t){const n=jw(e);return!(n===t||!Sw(n)||Mw(n))&&("fixed"===Pw(n).position||Uw(n,t))}function Jw(e,t,n){const r=_w(t),o=kw(t),i="fixed"===n,a=Xw(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=tw(0);if(r||!r&&!i)if(("body"!==xw(t)||Aw(o))&&(s=Dw(t)),r){const e=Xw(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Yw(o));const c=!o||r||i?tw(0):$w(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}function Kw(e){return"static"===Pw(e).position}function qw(e,t){if(!_w(e)||"fixed"===Pw(e).position)return null;if(t)return t(e);let n=e.offsetParent;return kw(e)===n&&(n=n.ownerDocument.body),n}function Qw(e,t){const n=Ew(e);if(Ow(e))return n;if(!_w(e)){let t=jw(e);for(;t&&!Mw(t);){if(Sw(t)&&!Kw(t))return t;t=jw(t)}return n}let r=qw(e,t);for(;r&&Nw(r)&&Kw(r);)r=qw(r,t);return r&&Mw(r)&&Kw(r)&&!Rw(r)?n:r||function(e){let t=jw(e);for(;_w(t)&&!Mw(t);){if(Rw(t))return t;if(Ow(t))return null;t=jw(t)}return null}(e)||n}const ex={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=kw(r),s=!!t&&Ow(t.floating);if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=tw(1);const u=tw(0),d=_w(r);if((d||!d&&!i)&&(("body"!==xw(r)||Aw(a))&&(l=Dw(r)),_w(r))){const e=Xw(r);c=Gw(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?tw(0):$w(a,l,!0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:kw,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?Ow(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Lw(e,[],!1).filter((e=>Sw(e)&&"body"!==xw(e))),o=null;const i="fixed"===Pw(e).position;let a=i?jw(e):e;for(;Sw(a)&&!Mw(a);){const t=Pw(a),n=Rw(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Aw(a)&&!n&&Uw(e,a))?r=r.filter((e=>e!==a)):o=t,a=jw(a)}return t.set(e,r),r}(t,this._c):[].concat(n),a=[...i,r],s=a[0],l=a.reduce(((e,n)=>{const r=Zw(t,n,o);return e.top=qv(r.top,e.top),e.right=Kv(r.right,e.right),e.bottom=Kv(r.bottom,e.bottom),e.left=qv(r.left,e.left),e}),Zw(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Qw,getElementRects:async function(e){const t=this.getOffsetParent||Qw,n=this.getDimensions,r=await n(e.floating);return{reference:Jw(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Fw(e);return{width:t,height:n}},getScale:Gw,isElement:Sw,isRTL:function(e){return"rtl"===Pw(e).direction}};function tx(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function nx(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Vw(e),u=o||i?[...c?Lw(c):[],...Lw(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&s?function(e,t){let n,r=null;const o=kw(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(s||t(),!f||!p)return;const h={rootMargin:-ew(d)+"px "+-ew(o.clientWidth-(u+f))+"px "+-ew(o.clientHeight-(d+p))+"px "+-ew(u)+"px",threshold:qv(0,Kv(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return a();r?a(!1,r):n=setTimeout((()=>{a(!1,1e-7)}),1e3)}1!==r||tx(c,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),i}(c,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=h)||e.observe(t)}))),n()})),c&&!l&&h.observe(c),h.observe(t));let m=l?Xw(e):null;return l&&function t(){const r=Xw(e);m&&!tx(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=h)||e.disconnect(),h=null,l&&cancelAnimationFrame(f)}}const rx=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=aw(n),s=sw(n),l="y"===uw(n),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=iw(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},ox=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=iw(e,t),c={x:n,y:r},u=await yw(t,l),d=uw(aw(o)),f=lw(d);let p=c[f],h=c[d];if(i){const e="y"===f?"bottom":"right";p=ow(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=ow(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},ix=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=iw(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=aw(o),b=uw(s),v=aw(s)===s,w=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=f||(v||!m?[pw(s)]:function(e){const t=pw(e);return[fw(e),t,fw(t)]}(s)),E="none"!==h;!f&&E&&x.push(...function(e,t,n,r){const o=sw(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}(aw(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(fw)))),i}(s,m,h,w));const k=[s,...x],C=await yw(t,g),S=[];let _=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&S.push(C[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=sw(e),o=dw(e),i=cw(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=pw(a)),[a,pw(a)]}(o,a,w);S.push(C[e[0]],C[e[1]])}if(_=[..._,{placement:o,overflows:S}],!S.every((e=>e<=0))){var I,A;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:_},reset:{placement:t}};let n=null==(A=_.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:A.placement;if(!n)switch(p){case"bestFit":{var N;const e=null==(N=_.filter((e=>{if(E){const t=uw(e.placement);return t===b||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:N[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},ax=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=iw(e,t),u=await yw(t,c),d=aw(o),f=sw(o),p="y"===uw(o),{width:h,height:m}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const b=m-u.top-u.bottom,v=h-u.left-u.right,w=Kv(m-u[g],b),x=Kv(h-u[y],v),E=!t.middlewareData.shift;let k=w,C=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=v),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(k=b),E&&!f){const e=qv(u.left,0),t=qv(u.right,0),n=qv(u.top,0),r=qv(u.bottom,0);p?C=h-2*(0!==e||0!==t?e+t:qv(u.left,u.right)):k=m-2*(0!==n||0!==r?n+r:qv(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:k});const S=await a.getDimensions(s.floating);return h!==S.width||m!==S.height?{reset:{rects:!0}}:{}}}},sx=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=iw(e,t);switch(r){case"referenceHidden":{const e=bw(await yw(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:vw(e)}}}case"escaped":{const e=bw(await yw(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:vw(e)}}}default:return{}}}}},lx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:c,padding:u=0}=iw(e,t)||{};if(null==c)return{};const d=hw(u),f={x:n,y:r},p=dw(o),h=cw(p),m=await a.getDimensions(c),g="y"===p,y=g?"top":"left",b=g?"bottom":"right",v=g?"clientHeight":"clientWidth",w=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],E=await(null==a.getOffsetParent?void 0:a.getOffsetParent(c));let k=E?E[v]:0;k&&await(null==a.isElement?void 0:a.isElement(E))||(k=s.floating[v]||i.floating[h]);const C=w/2-x/2,S=k/2-m[h]/2-1,_=Kv(d[y],S),I=Kv(d[b],S),A=_,N=k-m[h]-I,O=k/2-m[h]/2+C,R=ow(A,O,N),T=!l.arrow&&null!=sw(o)&&O!==R&&i.reference[h]/2-(O<A?_:I)-m[h]/2<0,M=T?O<A?O-A:O-N:0;return{[p]:f[p]+M,data:{[p]:R,centerOffset:O-R-M,...T&&{alignmentOffset:M}},reset:T}}}),cx=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=iw(e,t),u={x:n,y:r},d=uw(o),f=lw(d);let p=u[f],h=u[d];const m=iw(s,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,b;const e="y"===f?"width":"height",t=["top","left"].includes(aw(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(b=a.offset)?void 0:b[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},ux=(e,t,n)=>{const r=new Map,o={platform:ex,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=gw(c,r,l),f=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:i,fn:m}=s[n],{x:g,y:y,data:b,reset:v}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,p={...p,[i]:{...p[i],...b}},v&&h<=50&&(h++,"object"==typeof v&&(v.placement&&(f=v.placement),v.rects&&(c=!0===v.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):v.rects),({x:u,y:d}=gw(c,f,l))),n=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var dx="undefined"!=typeof document?d:s;function fx(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!fx(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!fx(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function px(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function hx(e,t){const n=px(e);return Math.round(t*n)/n}function mx(t){const n=e.useRef(t);return dx((()=>{n.current=t})),n}const gx=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?lx({element:n.current,padding:r}).fn(t):{}:n?lx({element:n,padding:r}).fn(t):{};var o}}),yx=(e,t)=>({...rx(e),options:[e,t]}),bx=(e,t)=>({...ox(e),options:[e,t]}),vx=(e,t)=>({...cx(e),options:[e,t]}),wx=(e,t)=>({...ix(e),options:[e,t]}),xx=(e,t)=>({...ax(e),options:[e,t]}),Ex=(e,t)=>({...sx(e),options:[e,t]}),kx=(e,t)=>({...gx(e),options:[e,t]});var Cx=e.forwardRef(((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return Lf.jsx(Kf.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:Lf.jsx("polygon",{points:"0,0 30,0 15,10"})})}));Cx.displayName="Arrow";var Sx=Cx;function _x(t){const[n,r]=e.useState(void 0);return Vf((()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver((e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})}));return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)}),[t]),n}var Ix="Popper",[Ax,Nx]=zf(Ix),[Ox,Rx]=Ax(Ix),Tx=t=>{const{__scopePopper:n,children:r}=t,[o,i]=e.useState(null);return Lf.jsx(Ox,{scope:n,anchor:o,onAnchorChange:i,children:r})};Tx.displayName=Ix;var Mx="PopperAnchor",Px=e.forwardRef(((t,n)=>{const{__scopePopper:r,virtualRef:o,...i}=t,a=Rx(Mx,r),s=e.useRef(null),l=Of(n,s);return e.useEffect((()=>{a.onAnchorChange(o?.current||s.current)})),o?null:Lf.jsx(Kf.div,{...i,ref:l})}));Px.displayName=Mx;var Dx="PopperContent",[jx,Bx]=Ax(Dx),Lx=e.forwardRef(((t,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:i=0,align:a="center",alignOffset:s=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:m,...g}=t,y=Rx(Dx,r),[b,v]=e.useState(null),w=Of(n,(e=>v(e))),[E,k]=e.useState(null),C=_x(E),S=C?.width??0,_=C?.height??0,I=o+("center"!==a?"-"+a:""),A="number"==typeof d?d:{top:0,right:0,bottom:0,left:0,...d},N=Array.isArray(u)?u:[u],O=N.length>0,R={padding:A,boundary:N.filter(Gx),altBoundary:O},{refs:T,floatingStyles:M,placement:P,isPositioned:D,middlewareData:j}=function(t){void 0===t&&(t={});const{placement:n="bottom",strategy:r="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=t,[d,f]=e.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[p,h]=e.useState(o);fx(p,o)||h(o);const[m,g]=e.useState(null),[y,b]=e.useState(null),v=e.useCallback((e=>{e!==C.current&&(C.current=e,g(e))}),[]),w=e.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),E=a||m,k=s||y,C=e.useRef(null),S=e.useRef(null),_=e.useRef(d),I=null!=c,A=mx(c),N=mx(i),O=mx(u),R=e.useCallback((()=>{if(!C.current||!S.current)return;const e={placement:n,strategy:r,middleware:p};N.current&&(e.platform=N.current),ux(C.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==O.current};T.current&&!fx(_.current,t)&&(_.current=t,x.flushSync((()=>{f(t)})))}))}),[p,n,r,N,O]);dx((()=>{!1===u&&_.current.isPositioned&&(_.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[u]);const T=e.useRef(!1);dx((()=>(T.current=!0,()=>{T.current=!1})),[]),dx((()=>{if(E&&(C.current=E),k&&(S.current=k),E&&k){if(A.current)return A.current(E,k,R);R()}}),[E,k,R,A,I]);const M=e.useMemo((()=>({reference:C,floating:S,setReference:v,setFloating:w})),[v,w]),P=e.useMemo((()=>({reference:E,floating:k})),[E,k]),D=e.useMemo((()=>{const e={position:r,left:0,top:0};if(!P.floating)return e;const t=hx(P.floating,d.x),n=hx(P.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...px(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,l,P.floating,d.x,d.y]);return e.useMemo((()=>({...d,update:R,refs:M,elements:P,floatingStyles:D})),[d,R,M,P,D])}({strategy:"fixed",placement:I,whileElementsMounted:(...e)=>nx(...e,{animationFrame:"always"===h}),elements:{reference:y.anchor},middleware:[yx({mainAxis:i+_,alignmentAxis:s}),c&&bx({mainAxis:!0,crossAxis:!1,limiter:"partial"===f?vx():void 0,...R}),c&&wx({...R}),xx({...R,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),E&&kx({element:E,padding:l}),Wx({arrowWidth:S,arrowHeight:_}),p&&Ex({strategy:"referenceHidden",...R})]}),[B,L]=Hx(P),z=Xf(m);Vf((()=>{D&&z?.()}),[D,z]);const F=j.arrow?.x,V=j.arrow?.y,G=0!==j.arrow?.centerOffset,[W,H]=e.useState();return Vf((()=>{b&&H(window.getComputedStyle(b).zIndex)}),[b]),Lf.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:Lf.jsx(jx,{scope:r,placedSide:B,onArrowChange:k,arrowX:F,arrowY:V,shouldHideArrow:G,children:Lf.jsx(Kf.div,{"data-side":B,"data-align":L,...g,ref:w,style:{...g.style,animation:D?void 0:"none"}})})})}));Lx.displayName=Dx;var zx="PopperArrow",Fx={top:"bottom",right:"left",bottom:"top",left:"right"},Vx=e.forwardRef((function(e,t){const{__scopePopper:n,...r}=e,o=Bx(zx,n),i=Fx[o.placedSide];return Lf.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:Lf.jsx(Sx,{...r,ref:t,style:{...r.style,display:"block"}})})}));function Gx(e){return null!==e}Vx.displayName=zx;var Wx=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=Hx(n),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+s/2;let p="",h="";return"bottom"===l?(p=i?u:`${d}px`,h=-s+"px"):"top"===l?(p=i?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===l?(p=-s+"px",h=i?u:`${f}px`):"left"===l&&(p=`${r.floating.width+s}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}});function Hx(e){const[t,n="center"]=e.split("-");return[t,n]}var Xx=Tx,Yx=Px,$x=Lx,Zx=Vx,Ux="rovingFocusGroup.onEntryFocus",Jx={bubbles:!1,cancelable:!0},Kx="RovingFocusGroup",[qx,Qx,eE]=$v(Kx),[tE,nE]=zf(Kx,[eE]),[rE,oE]=tE(Kx),iE=e.forwardRef(((e,t)=>Lf.jsx(qx.Provider,{scope:e.__scopeRovingFocusGroup,children:Lf.jsx(qx.Slot,{scope:e.__scopeRovingFocusGroup,children:Lf.jsx(aE,{...e,ref:t})})})));iE.displayName=Kx;var aE=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,p=e.useRef(null),h=Of(n,p),m=Uv(a),[g=null,y]=Yf({prop:s,defaultProp:l,onChange:c}),[b,v]=e.useState(!1),w=Xf(u),x=Qx(r),E=e.useRef(!1),[k,C]=e.useState(0);return e.useEffect((()=>{const e=p.current;if(e)return e.addEventListener(Ux,w),()=>e.removeEventListener(Ux,w)}),[w]),Lf.jsx(rE,{scope:r,orientation:o,dir:m,loop:i,currentTabStopId:g,onItemFocus:e.useCallback((e=>y(e)),[y]),onItemShiftTab:e.useCallback((()=>v(!0)),[]),onFocusableItemAdd:e.useCallback((()=>C((e=>e+1))),[]),onFocusableItemRemove:e.useCallback((()=>C((e=>e-1))),[]),children:Lf.jsx(Kf.div,{tabIndex:b||0===k?-1:0,"data-orientation":o,...f,ref:h,style:{outline:"none",...t.style},onMouseDown:If(t.onMouseDown,(()=>{E.current=!0})),onFocus:If(t.onFocus,(e=>{const t=!E.current;if(e.target===e.currentTarget&&t&&!b){const t=new CustomEvent(Ux,Jx);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=x().filter((e=>e.focusable));uE([e.find((e=>e.active)),e.find((e=>e.id===g)),...e].filter(Boolean).map((e=>e.ref.current)),d)}}E.current=!1})),onBlur:If(t.onBlur,(()=>v(!1)))})})})),sE="RovingFocusGroupItem",lE=e.forwardRef(((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:a,...s}=t,l=Hf(),c=a||l,u=oE(sE,r),d=u.currentTabStopId===c,f=Qx(r),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return e.useEffect((()=>{if(o)return p(),()=>h()}),[o,p,h]),Lf.jsx(qx.ItemSlot,{scope:r,id:c,focusable:o,active:i,children:Lf.jsx(Kf.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:n,onMouseDown:If(t.onMouseDown,(e=>{o?u.onItemFocus(c):e.preventDefault()})),onFocus:If(t.onFocus,(()=>u.onItemFocus(c))),onKeyDown:If(t.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void u.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:cE[r]}(e,u.orientation,u.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=u.loop?function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(n,r+1):n.slice(r+1)}setTimeout((()=>uE(n)))}}))})})}));lE.displayName=sE;var cE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function uE(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var dE=iE,fE=lE,pE=["Enter"," "],hE=["ArrowUp","PageDown","End"],mE=["ArrowDown","PageUp","Home",...hE],gE={ltr:[...pE,"ArrowRight"],rtl:[...pE,"ArrowLeft"]},yE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},bE="Menu",[vE,wE,xE]=$v(bE),[EE,kE]=zf(bE,[xE,Nx,nE]),CE=Nx(),SE=nE(),[_E,IE]=EE(bE),[AE,NE]=EE(bE),OE=t=>{const{__scopeMenu:n,open:r=!1,children:o,dir:i,onOpenChange:a,modal:s=!0}=t,l=CE(n),[c,u]=e.useState(null),d=e.useRef(!1),f=Xf(a),p=Uv(i);return e.useEffect((()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),Lf.jsx(Xx,{...l,children:Lf.jsx(_E,{scope:n,open:r,onOpenChange:f,content:c,onContentChange:u,children:Lf.jsx(AE,{scope:n,onClose:e.useCallback((()=>f(!1)),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:o})})})};OE.displayName=bE;var RE=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=CE(n);return Lf.jsx(Yx,{...o,...r,ref:t})}));RE.displayName="MenuAnchor";var[TE,ME]=EE("MenuPortal",{forceMount:void 0}),PE="MenuContent",[DE,jE]=EE(PE),BE=e.forwardRef(((e,t)=>{const n=ME(PE,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=IE(PE,e.__scopeMenu),a=NE(PE,e.__scopeMenu);return Lf.jsx(vE.Provider,{scope:e.__scopeMenu,children:Lf.jsx(vp,{present:r||i.open,children:Lf.jsx(vE.Slot,{scope:e.__scopeMenu,children:a.modal?Lf.jsx(LE,{...o,ref:t}):Lf.jsx(zE,{...o,ref:t})})})})})),LE=e.forwardRef(((t,n)=>{const r=IE(PE,t.__scopeMenu),o=e.useRef(null),i=Of(n,o);return e.useEffect((()=>{const e=o.current;if(e)return bh(e)}),[]),Lf.jsx(FE,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:If(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})})),zE=e.forwardRef(((e,t)=>{const n=IE(PE,e.__scopeMenu);return Lf.jsx(FE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})})),FE=e.forwardRef(((t,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:l,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,disableOutsideScroll:m,...g}=t,y=IE(PE,r),b=NE(PE,r),v=CE(r),w=SE(r),x=wE(r),[E,k]=e.useState(null),C=e.useRef(null),S=Of(n,C,y.onContentChange),_=e.useRef(0),I=e.useRef(""),A=e.useRef(0),N=e.useRef(null),O=e.useRef("right"),R=e.useRef(0),T=m?dh:e.Fragment,M=m?{as:$f,allowPinchZoom:!0}:void 0,P=e=>{const t=I.current+e,n=x().filter((e=>!e.disabled)),r=document.activeElement,o=n.find((e=>e.ref.current===r))?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0])),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=function(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}(e,Math.max(i,0));1===o.length&&(a=a.filter((e=>e!==n)));const s=a.find((e=>e.toLowerCase().startsWith(o.toLowerCase())));return s!==n?s:void 0}(n.map((e=>e.textValue)),t,o),a=n.find((e=>e.textValue===i))?.ref.current;!function e(t){I.current=t,window.clearTimeout(_.current),""!==t&&(_.current=window.setTimeout((()=>e("")),1e3))}(t),a&&setTimeout((()=>a.focus()))};e.useEffect((()=>()=>window.clearTimeout(_.current)),[]),Ep();const D=e.useCallback((e=>O.current===N.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,t)}(e,N.current?.area)),[]);return Lf.jsx(DE,{scope:r,searchRef:I,onItemEnter:e.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),onItemLeave:e.useCallback((e=>{D(e)||(C.current?.focus(),k(null))}),[D]),onTriggerLeave:e.useCallback((e=>{D(e)&&e.preventDefault()}),[D]),pointerGraceTimerRef:A,onPointerGraceIntentChange:e.useCallback((e=>{N.current=e}),[]),children:Lf.jsx(T,{...M,children:Lf.jsx(dp,{asChild:!0,trapped:i,onMountAutoFocus:If(a,(e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})})),onUnmountAutoFocus:s,children:Lf.jsx(op,{asChild:!0,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:h,children:Lf.jsx(dE,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:o,currentTabStopId:E,onCurrentTabStopIdChange:k,onEntryFocus:If(c,(e=>{b.isUsingKeyboardRef.current||e.preventDefault()})),preventScrollOnEntryFocus:!0,children:Lf.jsx($x,{role:"menu","aria-orientation":"vertical","data-state":hk(y.open),"data-radix-menu-content":"",dir:b.dir,...v,...g,ref:S,style:{outline:"none",...g.style},onKeyDown:If(g.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&P(e.key));const o=C.current;if(e.target!==o)return;if(!mE.includes(e.key))return;e.preventDefault();const i=x().filter((e=>!e.disabled)).map((e=>e.ref.current));hE.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)})),onBlur:If(t.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(_.current),I.current="")})),onPointerMove:If(t.onPointerMove,yk((e=>{const t=e.target,n=R.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>R.current?"right":"left";O.current=t,R.current=e.clientX}})))})})})})})})}));BE.displayName=PE;var VE=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Lf.jsx(Kf.div,{role:"group",...r,ref:t})}));VE.displayName="MenuGroup";var GE=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Lf.jsx(Kf.div,{...r,ref:t})}));GE.displayName="MenuLabel";var WE="MenuItem",HE="menu.itemSelect",XE=e.forwardRef(((t,n)=>{const{disabled:r=!1,onSelect:o,...i}=t,a=e.useRef(null),s=NE(WE,t.__scopeMenu),l=jE(WE,t.__scopeMenu),c=Of(n,a),u=e.useRef(!1);return Lf.jsx(YE,{...i,ref:c,disabled:r,onClick:If(t.onClick,(()=>{const e=a.current;if(!r&&e){const t=new CustomEvent(HE,{bubbles:!0,cancelable:!0});e.addEventListener(HE,(e=>o?.(e)),{once:!0}),qf(e,t),t.defaultPrevented?u.current=!1:s.onClose()}})),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:If(t.onPointerUp,(e=>{u.current||e.currentTarget?.click()})),onKeyDown:If(t.onKeyDown,(e=>{const t=""!==l.searchRef.current;r||t&&" "===e.key||pE.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))})}));XE.displayName=WE;var YE=e.forwardRef(((t,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...a}=t,s=jE(WE,r),l=SE(r),c=e.useRef(null),u=Of(n,c),[d,f]=e.useState(!1),[p,h]=e.useState("");return e.useEffect((()=>{const e=c.current;e&&h((e.textContent??"").trim())}),[a.children]),Lf.jsx(vE.ItemSlot,{scope:r,disabled:o,textValue:i??p,children:Lf.jsx(fE,{asChild:!0,...l,focusable:!o,children:Lf.jsx(Kf.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:If(t.onPointerMove,yk((e=>{if(o)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}}))),onPointerLeave:If(t.onPointerLeave,yk((e=>s.onItemLeave(e)))),onFocus:If(t.onFocus,(()=>f(!0))),onBlur:If(t.onBlur,(()=>f(!1)))})})})})),$E=e.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return Lf.jsx(tk,{scope:e.__scopeMenu,checked:n,children:Lf.jsx(XE,{role:"menuitemcheckbox","aria-checked":mk(n)?"mixed":n,...o,ref:t,"data-state":gk(n),onSelect:If(o.onSelect,(()=>r?.(!!mk(n)||!n)),{checkForDefaultPrevented:!1})})})}));$E.displayName="MenuCheckboxItem";var ZE="MenuRadioGroup",[UE,JE]=EE(ZE,{value:void 0,onValueChange:()=>{}}),KE=e.forwardRef(((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=Xf(r);return Lf.jsx(UE,{scope:e.__scopeMenu,value:n,onValueChange:i,children:Lf.jsx(VE,{...o,ref:t})})}));KE.displayName=ZE;var qE="MenuRadioItem",QE=e.forwardRef(((e,t)=>{const{value:n,...r}=e,o=JE(qE,e.__scopeMenu),i=n===o.value;return Lf.jsx(tk,{scope:e.__scopeMenu,checked:i,children:Lf.jsx(XE,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":gk(i),onSelect:If(r.onSelect,(()=>o.onValueChange?.(n)),{checkForDefaultPrevented:!1})})})}));QE.displayName=qE;var ek="MenuItemIndicator",[tk,nk]=EE(ek,{checked:!1}),rk=e.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=nk(ek,n);return Lf.jsx(vp,{present:r||mk(i.checked)||!0===i.checked,children:Lf.jsx(Kf.span,{...o,ref:t,"data-state":gk(i.checked)})})}));rk.displayName=ek;var ok=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return Lf.jsx(Kf.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})}));ok.displayName="MenuSeparator";var ik=e.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=CE(n);return Lf.jsx(Zx,{...o,...r,ref:t})}));ik.displayName="MenuArrow";var ak="MenuSub",[sk,lk]=EE(ak),ck=t=>{const{__scopeMenu:n,children:r,open:o=!1,onOpenChange:i}=t,a=IE(ak,n),s=CE(n),[l,c]=e.useState(null),[u,d]=e.useState(null),f=Xf(i);return e.useEffect((()=>(!1===a.open&&f(!1),()=>f(!1))),[a.open,f]),Lf.jsx(Xx,{...s,children:Lf.jsx(_E,{scope:n,open:o,onOpenChange:f,content:u,onContentChange:d,children:Lf.jsx(sk,{scope:n,contentId:Hf(),triggerId:Hf(),trigger:l,onTriggerChange:c,children:r})})})};ck.displayName=ak;var uk="MenuSubTrigger",dk=e.forwardRef(((t,n)=>{const r=IE(uk,t.__scopeMenu),o=NE(uk,t.__scopeMenu),i=lk(uk,t.__scopeMenu),a=jE(uk,t.__scopeMenu),s=e.useRef(null),{pointerGraceTimerRef:l,onPointerGraceIntentChange:c}=a,u={__scopeMenu:t.__scopeMenu},d=e.useCallback((()=>{s.current&&window.clearTimeout(s.current),s.current=null}),[]);return e.useEffect((()=>d),[d]),e.useEffect((()=>{const e=l.current;return()=>{window.clearTimeout(e),c(null)}}),[l,c]),Lf.jsx(RE,{asChild:!0,...u,children:Lf.jsx(YE,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":hk(r.open),...t,ref:Nf(n,i.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:If(t.onPointerMove,yk((e=>{a.onItemEnter(e),e.defaultPrevented||t.disabled||r.open||s.current||(a.onPointerGraceIntentChange(null),s.current=window.setTimeout((()=>{r.onOpenChange(!0),d()}),100))}))),onPointerLeave:If(t.onPointerLeave,yk((e=>{d();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,i=o?-5:5,s=t[o?"left":"right"],c=t[o?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:s,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(l.current),l.current=window.setTimeout((()=>a.onPointerGraceIntentChange(null)),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}}))),onKeyDown:If(t.onKeyDown,(e=>{const n=""!==a.searchRef.current;t.disabled||n&&" "===e.key||gE[o.dir].includes(e.key)&&(r.onOpenChange(!0),r.content?.focus(),e.preventDefault())}))})})}));dk.displayName=uk;var fk="MenuSubContent",pk=e.forwardRef(((t,n)=>{const r=ME(PE,t.__scopeMenu),{forceMount:o=r.forceMount,...i}=t,a=IE(PE,t.__scopeMenu),s=NE(PE,t.__scopeMenu),l=lk(fk,t.__scopeMenu),c=e.useRef(null),u=Of(n,c);return Lf.jsx(vE.Provider,{scope:t.__scopeMenu,children:Lf.jsx(vp,{present:o||a.open,children:Lf.jsx(vE.Slot,{scope:t.__scopeMenu,children:Lf.jsx(FE,{id:l.contentId,"aria-labelledby":l.triggerId,...i,ref:u,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:If(t.onFocusOutside,(e=>{e.target!==l.trigger&&a.onOpenChange(!1)})),onEscapeKeyDown:If(t.onEscapeKeyDown,(e=>{s.onClose(),e.preventDefault()})),onKeyDown:If(t.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=yE[s.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),l.trigger?.focus(),e.preventDefault())}))})})})})}));function hk(e){return e?"open":"closed"}function mk(e){return"indeterminate"===e}function gk(e){return mk(e)?"indeterminate":e?"checked":"unchecked"}function yk(e){return t=>"mouse"===t.pointerType?e(t):void 0}pk.displayName=fk;var bk=OE,vk=RE,wk=BE,xk=VE,Ek=GE,kk=XE,Ck=$E,Sk=KE,_k=QE,Ik=rk,Ak=ok,Nk=ik,Ok=ck,Rk=dk,Tk=pk,Mk="DropdownMenu",[Pk,Dk]=zf(Mk,[kE]),jk=kE(),[Bk,Lk]=Pk(Mk),zk=t=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:i,defaultOpen:a,onOpenChange:s,modal:l=!0}=t,c=jk(n),u=e.useRef(null),[d=!1,f]=Yf({prop:i,defaultProp:a,onChange:s});return Lf.jsx(Bk,{scope:n,triggerId:Hf(),triggerRef:u,contentId:Hf(),open:d,onOpenChange:f,onOpenToggle:e.useCallback((()=>f((e=>!e))),[f]),modal:l,children:Lf.jsx(bk,{...c,open:d,onOpenChange:f,dir:o,modal:l,children:r})})};zk.displayName=Mk;var Fk="DropdownMenuTrigger",Vk=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Lk(Fk,n),a=jk(n);return Lf.jsx(vk,{asChild:!0,...a,children:Lf.jsx(Kf.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Nf(t,i.triggerRef),onPointerDown:If(e.onPointerDown,(e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())})),onKeyDown:If(e.onKeyDown,(e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})})}));Vk.displayName=Fk;var Gk="DropdownMenuContent",Wk=e.forwardRef(((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Lk(Gk,r),a=jk(r),s=e.useRef(!1);return Lf.jsx(wk,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...o,ref:n,onCloseAutoFocus:If(t.onCloseAutoFocus,(e=>{s.current||i.triggerRef.current?.focus(),s.current=!1,e.preventDefault()})),onInteractOutside:If(t.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(s.current=!0)})),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));Wk.displayName=Gk;var Hk=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(xk,{...o,...r,ref:t})}));Hk.displayName="DropdownMenuGroup";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(Ek,{...o,...r,ref:t})})).displayName="DropdownMenuLabel";var Xk=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(kk,{...o,...r,ref:t})}));Xk.displayName="DropdownMenuItem";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(Ck,{...o,...r,ref:t})})).displayName="DropdownMenuCheckboxItem";var Yk=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(Sk,{...o,...r,ref:t})}));Yk.displayName="DropdownMenuRadioGroup";var $k=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(_k,{...o,...r,ref:t})}));$k.displayName="DropdownMenuRadioItem";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(Ik,{...o,...r,ref:t})})).displayName="DropdownMenuItemIndicator";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(Ak,{...o,...r,ref:t})})).displayName="DropdownMenuSeparator";e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(Nk,{...o,...r,ref:t})})).displayName="DropdownMenuArrow";var Zk=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(Rk,{...o,...r,ref:t})}));Zk.displayName="DropdownMenuSubTrigger";var Uk=e.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=jk(n);return Lf.jsx(Tk,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})}));Uk.displayName="DropdownMenuSubContent";var Jk=zk,Kk=Vk,qk=Wk,Qk=Hk,eC=Xk,tC=Yk,nC=$k,rC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:i}=e,a=jk(t),[s=!1,l]=Yf({prop:r,defaultProp:i,onChange:o});return Lf.jsx(Ok,{...a,open:s,onOpenChange:l,children:n})},oC=Zk,iC=Uk;function aC(e,t){return function(e,t){return new Blob([e],{type:t})}(function(e){const t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r}(e),t)}function sC(e,t=!0){return new Promise((n=>{const r=new FileReader;r.onload=()=>{const e=r.result;t&&n(e.split(",")[1]),n(e)},r.readAsDataURL(e)}))}function lC(e){return function(e){return new Promise((t=>{const n=document.createElement("input");n.type="file",n.accept=e,n.onchange=()=>{const e=n.files?.[0];e&&t(e)},n.click()}))}(e).then(sC)}const cC=!process.env.NODE_ENV||"development"===process.env.NODE_ENV,uC={xxs:0,xs:320,s:480,m:768,l:960,xl:1280,xxl:1920},dC=e.createContext(void 0),fC=e.forwardRef(((t,n)=>{const{className:r,children:o,...i}=t,[a,s]=e.useState("m"),[l,c]=e.useState(0),[u,d]=e.useState(0),f=e.useRef(null);e.useImperativeHandle(n,(()=>f.current),[]);const p=e.useCallback((e=>{const t=e.width,n=e.height;let r="xxs";Object.entries(uC).forEach((([e,n])=>{t>=n&&(r=e)})),s((e=>e!==r?r:e)),c(t),d(n)}),[]);return e.useEffect((()=>{const e=f.current;if(!e)return;const t=new ResizeObserver((e=>{for(let t of e)p(t.contentRect)}));return t.observe(e),p(e.getBoundingClientRect()),()=>{t.disconnect()}}),[]),e.createElement(dC.Provider,{value:{wKey:a,w:l,h:u}},e.createElement("div",{ref:f,className:`size-context w-${a} ${r||""}`.trim(),...i},o))})),pC=t=>((e,t)=>e!=t&&(""==e||uC[e]<uC[t]))((()=>{const t=e.useContext(dC);if(!t)throw new Error("useSizeContext must be used within a SizeContextContainerContext");return t})().wKey,t),hC=({direction:t,className:n="",children:r,wrap:o=!1,grow:i=!1,...a})=>{let s="";"string"==typeof t?s=`direction-${t} `:"object"==typeof t&&null!==t&&Object.entries(t).forEach((([e,t])=>{s+=""===e?`direction-${t} `:`${e}-direction-${t} `}));let l="";"boolean"==typeof i?l=i?"grow ":"":"object"==typeof i&&null!==i&&Object.entries(i).forEach((([e,t])=>{l+=""===e?t?"grow ":"no-grow":t?`${e}-grow `:`${e}-no-grow`})),s+=l,o&&(s+="flex-wrap "),s=s.trim();const c=`float-container ${s} ${n}`.trim();return e.createElement("div",{className:c,...a},r)},mC=({direction:t,expanded:n=!0,children:r,className:o,maxSize:i,expanderSize:a="40px",containerStyle:s,style:l,containerClassName:c,onExpandChange:u,...d})=>{const f={up:Lv,down:Bv,left:Tv,right:Rv}[t],p={up:Bv,down:Lv,left:Rv,right:Tv}[t],[h,m]=e.useState(n),g=`${t} ${h?"expanded":"collapsed"}`,y="right"===t||"left"===t?{width:h?i:a}:{height:h?i:a},b="right"===t||"left"===t?{width:h?i:0}:{height:h?i:0},v="right"===t||"left"===t?{width:a}:{height:a},w=e.createElement("div",{className:`expanding_container_content ${g} ${o||""}`.trim(),style:{...l,...b},...d},r),x=e.createElement("div",{className:`expanding_container_expander ${g}`,onClick:()=>(e=>{h!==e&&(m(e),u&&u(e))})(!h),style:v},h?e.createElement(p,null):e.createElement(f,null)),E="right"===t||"down"===t?w:x,k="left"===t||"up"===t?w:x;return e.createElement("div",{className:`expanding_container ${g} ${c||""}`,style:{...s,...y}},E,k)},gC=({trigger:t,setOpen:n,open:r})=>{const[i,a]=c(""),s=o(xW);return s.options.useWorkerManager?e.createElement(Yv,{setOpen:n,open:r,trigger:t,title:"New Worker",description:"Create a new worker"},e.createElement("div",null,"Name:",e.createElement("br",null),e.createElement("input",{className:"styledinput",onChange:e=>{a(e.currentTarget.value)},value:i})),e.createElement("div",null,i&&e.createElement("div",null,e.createElement("button",{className:"styledbtn",onClick:()=>{s.workermanager?.new_worker({name:i}),n(!1)}},"Create")))):null},yC=({trigger:t,setOpen:n,open:r})=>{const i=o(xW),[a,s]=c(!1),l=i.workers(),u=i.worker?.uuid,d=(u?l[u]?.name:void 0)||u||"worker";return e.createElement(Yv,{setOpen:n,open:r,trigger:t,title:"Export Worker",description:"Export the worker as a .fnw file"},e.createElement("div",null,e.createElement("div",null,e.createElement("input",{type:"checkbox",className:"styledcheckbox",checked:a,onChange:e=>{s(e.currentTarget.checked)}}),"Include Files"),e.createElement("button",{className:"styledbtn",onClick:async()=>{if(!i.worker)return;!function(e,t,n){const r=aC(e,n),o=URL.createObjectURL(r),i=document.createElement("a");i.href=o,i.download=t,i.click(),URL.revokeObjectURL(o),i.remove()}(await i.worker.export({withFiles:a}),d+".fnw","application/zip"),n(!1)}},"Export")))},bC=()=>{const t=o(xW).progress_state();return e.createElement("div",{className:"statusbar"},e.createElement("span",{className:"statusbar-progressbar",style:{width:Math.min(100,100*t.progress)+"%"}}),e.createElement("span",{className:"statusbar-message"},t.message))},vC=()=>{const t=o(xW),n=t.workers(),[r,i]=c(!1),[a,s]=c(!1),l=t.options.useWorkerManager&&t.workermanager&&t.workermanager.open||cC,u=l&&Object.keys(n).length>0,d=t.worker&&t.worker.is_open,f=d&&l;return l||d?e.createElement(e.Fragment,null,e.createElement(Jk,null,e.createElement(Kk,{asChild:!0},e.createElement("button",{className:"styledbtn"},e.createElement(hC,{direction:"row"},"Worker ",e.createElement(Ov,null)))),e.createElement(qk,{className:"headermenucontent funcnodescontainer"},e.createElement(Qk,null,u&&e.createElement(rC,null,e.createElement(oC,{className:"headermenuitem submenuitem"},e.createElement(hC,{direction:"row"},"Select",e.createElement(Rv,null))),e.createElement(iC,{className:"headermenucontent funcnodescontainer",sideOffset:2,alignOffset:-5},e.createElement(tC,{value:t.worker?.uuid,onValueChange:e=>{(e=>{if("__select__"!==e&&t.workers&&t.workermanager&&n[e]){if(!n[e].active&&!window.confirm("this is an inactive worker, selecting it will start it, continue?"))return;t.workermanager.set_active(e)}})(e)}},Object.keys(n).sort(((e,t)=>{if(n[e].active&&!n[t].active)return-1;if(!n[e].active&&n[t].active)return 1;const r=n[e].name||e,o=n[t].name||t;return r.localeCompare(o)})).map((r=>e.createElement(nC,{className:"headermenuitem workerselectoption"+(n[r]?.active?" active":" inactive")+" headermenuitem",key:r,value:r,disabled:r===t.worker?.uuid},n[r]?.name||r)))))),d&&e.createElement(e.Fragment,null,f&&e.createElement(eC,{className:"headermenuitem",onClick:()=>{if(t.worker)return t.workermanager?void t.workermanager?.restart_worker(t.worker.uuid):t.logger.error("no workermanager")}},"Restart"),e.createElement(eC,{className:"headermenuitem",onClick:()=>{t.worker&&t.worker.stop()}},"Stop"),e.createElement(eC,{className:"headermenuitem",onClick:()=>s(!0)},"Export"),e.createElement(eC,{className:"headermenuitem",onClick:async()=>{if(!t.worker)return;if(!window.confirm("Updateing the worker might replace the current nodespace, continue?"))return;const e=await lC(".fnw");t.worker.update_from_export(e)}},"Update")),l&&e.createElement(e.Fragment,null,e.createElement(eC,{className:"headermenuitem",onClick:()=>i(!0)},"New"))))),e.createElement(gC,{open:r,setOpen:i}),e.createElement(yC,{open:a,setOpen:s})):null},wC=()=>{const t=o(xW);return e.createElement(e.Fragment,null,e.createElement(Jk,null,e.createElement(Kk,{asChild:!0},e.createElement("button",{className:"styledbtn"},e.createElement(hC,{direction:"row"},"Nodespace ",e.createElement(Ov,null)))),e.createElement(qk,{className:"headermenucontent funcnodescontainer"},e.createElement(Qk,null,e.createElement(eC,{className:"headermenuitem",onClick:()=>{window.confirm("Are you sure you want to start a new flow?")&&t.worker?.clear()}},"New"),e.createElement(eC,{className:"headermenuitem",onClick:async()=>{const e=await(t.worker?.save());if(!e)return;const n=new Blob([JSON.stringify(e)],{type:"application/json"}),r=URL.createObjectURL(n),o=document.createElement("a");o.href=r,o.download="flow.json",o.click(),URL.revokeObjectURL(r),o.remove()}},"Save"),e.createElement(eC,{className:"headermenuitem",onClick:async()=>{const e=document.createElement("input");e.type="file",e.accept=".json",e.onchange=async e=>{const n=e.target.files?.[0];if(!n)return;const r=new FileReader;r.onload=async e=>{const n=e.target?.result;if(!n)return;const r=JSON.parse(n);await(t.worker?.load(r))},r.readAsText(n)},e.click()}},"Load")))))},xC=({...t})=>{const n=o(xW),r=n.workerstate();return Object.keys(t).length>0&&n.logger.debug("headerprops",t),e.createElement(hC,{className:"funcnodesreactflowheader",direction:"row",wrap:!0},e.createElement(hC,{className:"headerelement m-w-6",grow:{"":!0,m:!1}},e.createElement(bC,null)),(t.showmenu||cC)&&e.createElement(hC,{direction:"row",wrap:!0},e.createElement("div",{className:"headerelement"},e.createElement(vC,null)),(n.worker&&r.is_open||cC)&&e.createElement("div",{className:"headerelement"},e.createElement(wC,null))))};const EC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CC={};function SC(e,t){return(CC.jsx?kC:EC).test(e)}const _C=/[ \t\n\f\r]/g;function IC(e){return""===e.replace(_C,"")}class AC{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}}function NC(e,t){const n={},r={};for(const t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new AC(n,r,t)}function OC(e){return e.toLowerCase()}AC.prototype.normal={},AC.prototype.property={},AC.prototype.space=void 0;class RC{constructor(e,t){this.attribute=t,this.property=e}}RC.prototype.attribute="",RC.prototype.booleanish=!1,RC.prototype.boolean=!1,RC.prototype.commaOrSpaceSeparated=!1,RC.prototype.commaSeparated=!1,RC.prototype.defined=!1,RC.prototype.mustUseProperty=!1,RC.prototype.number=!1,RC.prototype.overloadedBoolean=!1,RC.prototype.property="",RC.prototype.spaceSeparated=!1,RC.prototype.space=void 0;let TC=0;const MC=FC(),PC=FC(),DC=FC(),jC=FC(),BC=FC(),LC=FC(),zC=FC();function FC(){return 2**++TC}var VC=Object.freeze({__proto__:null,boolean:MC,booleanish:PC,commaOrSpaceSeparated:zC,commaSeparated:LC,number:jC,overloadedBoolean:DC,spaceSeparated:BC});const GC=Object.keys(VC);class WC extends RC{constructor(e,t,n,r){let o=-1;if(super(e,t),HC(this,"space",r),"number"==typeof n)for(;++o<GC.length;){const e=GC[o];HC(this,GC[o],(n&VC[e])===VC[e])}}}function HC(e,t,n){n&&(e[t]=n)}function XC(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const i=new WC(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[OC(r)]=r,n[OC(i.attribute)]=r}return new AC(t,n,e.space)}WC.prototype.defined=!0;const YC=XC({properties:{ariaActiveDescendant:null,ariaAtomic:PC,ariaAutoComplete:null,ariaBusy:PC,ariaChecked:PC,ariaColCount:jC,ariaColIndex:jC,ariaColSpan:jC,ariaControls:BC,ariaCurrent:null,ariaDescribedBy:BC,ariaDetails:null,ariaDisabled:PC,ariaDropEffect:BC,ariaErrorMessage:null,ariaExpanded:PC,ariaFlowTo:BC,ariaGrabbed:PC,ariaHasPopup:null,ariaHidden:PC,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:BC,ariaLevel:jC,ariaLive:null,ariaModal:PC,ariaMultiLine:PC,ariaMultiSelectable:PC,ariaOrientation:null,ariaOwns:BC,ariaPlaceholder:null,ariaPosInSet:jC,ariaPressed:PC,ariaReadOnly:PC,ariaRelevant:null,ariaRequired:PC,ariaRoleDescription:BC,ariaRowCount:jC,ariaRowIndex:jC,ariaRowSpan:jC,ariaSelected:PC,ariaSetSize:jC,ariaSort:null,ariaValueMax:jC,ariaValueMin:jC,ariaValueNow:jC,ariaValueText:null,role:null},transform:(e,t)=>"role"===t?t:"aria-"+t.slice(4).toLowerCase()});function $C(e,t){return t in e?e[t]:t}function ZC(e,t){return $C(e,t.toLowerCase())}const UC=XC({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:LC,acceptCharset:BC,accessKey:BC,action:null,allow:null,allowFullScreen:MC,allowPaymentRequest:MC,allowUserMedia:MC,alt:null,as:null,async:MC,autoCapitalize:null,autoComplete:BC,autoFocus:MC,autoPlay:MC,blocking:BC,capture:null,charSet:null,checked:MC,cite:null,className:BC,cols:jC,colSpan:null,content:null,contentEditable:PC,controls:MC,controlsList:BC,coords:jC|LC,crossOrigin:null,data:null,dateTime:null,decoding:null,default:MC,defer:MC,dir:null,dirName:null,disabled:MC,download:DC,draggable:PC,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:MC,formTarget:null,headers:BC,height:jC,hidden:MC,high:jC,href:null,hrefLang:null,htmlFor:BC,httpEquiv:BC,id:null,imageSizes:null,imageSrcSet:null,inert:MC,inputMode:null,integrity:null,is:null,isMap:MC,itemId:null,itemProp:BC,itemRef:BC,itemScope:MC,itemType:BC,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:MC,low:jC,manifest:null,max:null,maxLength:jC,media:null,method:null,min:null,minLength:jC,multiple:MC,muted:MC,name:null,nonce:null,noModule:MC,noValidate:MC,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:MC,optimum:jC,pattern:null,ping:BC,placeholder:null,playsInline:MC,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:MC,referrerPolicy:null,rel:BC,required:MC,reversed:MC,rows:jC,rowSpan:jC,sandbox:BC,scope:null,scoped:MC,seamless:MC,selected:MC,shadowRootClonable:MC,shadowRootDelegatesFocus:MC,shadowRootMode:null,shape:null,size:jC,sizes:null,slot:null,span:jC,spellCheck:PC,src:null,srcDoc:null,srcLang:null,srcSet:null,start:jC,step:null,style:null,tabIndex:jC,target:null,title:null,translate:null,type:null,typeMustMatch:MC,useMap:null,value:PC,width:jC,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:BC,axis:null,background:null,bgColor:null,border:jC,borderColor:null,bottomMargin:jC,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:MC,declare:MC,event:null,face:null,frame:null,frameBorder:null,hSpace:jC,leftMargin:jC,link:null,longDesc:null,lowSrc:null,marginHeight:jC,marginWidth:jC,noResize:MC,noHref:MC,noShade:MC,noWrap:MC,object:null,profile:null,prompt:null,rev:null,rightMargin:jC,rules:null,scheme:null,scrolling:PC,standby:null,summary:null,text:null,topMargin:jC,valueType:null,version:null,vAlign:null,vLink:null,vSpace:jC,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:MC,disableRemotePlayback:MC,prefix:null,property:null,results:jC,security:null,unselectable:null},space:"html",transform:ZC}),JC=XC({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:zC,accentHeight:jC,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:jC,amplitude:jC,arabicForm:null,ascent:jC,attributeName:null,attributeType:null,azimuth:jC,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:jC,by:null,calcMode:null,capHeight:jC,className:BC,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:jC,diffuseConstant:jC,direction:null,display:null,dur:null,divisor:jC,dominantBaseline:null,download:MC,dx:null,dy:null,edgeMode:null,editable:null,elevation:jC,enableBackground:null,end:null,event:null,exponent:jC,externalResourcesRequired:null,fill:null,fillOpacity:jC,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:LC,g2:LC,glyphName:LC,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:jC,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:jC,horizOriginX:jC,horizOriginY:jC,id:null,ideographic:jC,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:jC,k:jC,k1:jC,k2:jC,k3:jC,k4:jC,kernelMatrix:zC,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:jC,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:jC,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:jC,overlineThickness:jC,paintOrder:null,panose1:null,path:null,pathLength:jC,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:BC,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:jC,pointsAtY:jC,pointsAtZ:jC,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zC,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zC,rev:zC,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zC,requiredFeatures:zC,requiredFonts:zC,requiredFormats:zC,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:jC,specularExponent:jC,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:jC,strikethroughThickness:jC,string:null,stroke:null,strokeDashArray:zC,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:jC,strokeOpacity:jC,strokeWidth:null,style:null,surfaceScale:jC,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zC,tabIndex:jC,tableValues:null,target:null,targetX:jC,targetY:jC,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zC,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:jC,underlineThickness:jC,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:jC,values:null,vAlphabetic:jC,vMathematical:jC,vectorEffect:null,vHanging:jC,vIdeographic:jC,version:null,vertAdvY:jC,vertOriginX:jC,vertOriginY:jC,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:jC,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$C}),KC=XC({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform:(e,t)=>"xlink:"+t.slice(5).toLowerCase()}),qC=XC({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ZC}),QC=XC({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform:(e,t)=>"xml:"+t.slice(3).toLowerCase()}),eS={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},tS=/[A-Z]/g,nS=/-[a-z]/g,rS=/^data[-\w.:]+$/i;function oS(e){return"-"+e.toLowerCase()}function iS(e){return e.charAt(1).toUpperCase()}const aS=NC([YC,UC,KC,qC,QC],"html"),sS=NC([YC,JC,KC,qC,QC],"svg");var lS,cS,uS,dS={};function fS(){if(uS)return dS;uS=1;var e=dS&&dS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dS,"__esModule",{value:!0}),dS.default=function(e,n){var r=null;if(!e||"string"!=typeof e)return r;var o=(0,t.default)(e),i="function"==typeof n;return o.forEach((function(e){if("declaration"===e.type){var t=e.property,o=e.value;i?n(t,o,e):o&&((r=r||{})[t]=o)}})),r};var t=e(function(){if(cS)return lS;cS=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,s=/^\s+|\s+$/g,l="";function c(e){return e?e.replace(s,l):l}return lS=function(s,u){if("string"!=typeof s)throw new TypeError("First argument must be a string");if(!s)return[];u=u||{};var d=1,f=1;function p(e){var n=e.match(t);n&&(d+=n.length);var r=e.lastIndexOf("\n");f=~r?e.length-r:f+e.length}function h(){var e={line:d,column:f};return function(t){return t.position=new m(e),b(),t}}function m(e){this.start=e,this.end={line:d,column:f},this.source=u.source}function g(e){var t=new Error(u.source+":"+d+":"+f+": "+e);if(t.reason=e,t.filename=u.source,t.line=d,t.column=f,t.source=s,!u.silent)throw t}function y(e){var t=e.exec(s);if(t){var n=t[0];return p(n),s=s.slice(n.length),t}}function b(){y(n)}function v(e){var t;for(e=e||[];t=w();)!1!==t&&e.push(t);return e}function w(){var e=h();if("/"==s.charAt(0)&&"*"==s.charAt(1)){for(var t=2;l!=s.charAt(t)&&("*"!=s.charAt(t)||"/"!=s.charAt(t+1));)++t;if(t+=2,l===s.charAt(t-1))return g("End of comment missing");var n=s.slice(2,t-2);return f+=2,p(n),s=s.slice(t),f+=2,e({type:"comment",comment:n})}}function x(){var t=h(),n=y(r);if(n){if(w(),!y(o))return g("property missing ':'");var s=y(i),u=t({type:"declaration",property:c(n[0].replace(e,l)),value:s?c(s[0].replace(e,l)):l});return y(a),u}}return m.prototype.content=s,b(),function(){var e,t=[];for(v(t);e=x();)!1!==e&&(t.push(e),v(t));return t}()},lS}());return dS}var pS,hS,mS,gS={};function yS(){if(pS)return gS;pS=1,Object.defineProperty(gS,"__esModule",{value:!0}),gS.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,i=function(e,t){return t.toUpperCase()},a=function(e,t){return"".concat(t,"-")};return gS.camelCase=function(s,l){return void 0===l&&(l={}),function(t){return!t||n.test(t)||e.test(t)}(s)?s:(s=s.toLowerCase(),(s=l.reactCompat?s.replace(o,a):s.replace(r,a)).replace(t,i))},gS}var bS=function(){if(mS)return hS;mS=1;var e=(hS&&hS.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(fS()),t=yS();function n(n,r){var o={};return n&&"string"==typeof n?((0,e.default)(n,(function(e,n){e&&n&&(o[(0,t.camelCase)(e,r)]=n)})),o):o}return n.default=n,hS=n}(),vS=I(bS);const wS=ES("end"),xS=ES("start");function ES(e){return function(t){const n=t&&t.position&&t.position[e]||{};if("number"==typeof n.line&&n.line>0&&"number"==typeof n.column&&n.column>0)return{line:n.line,column:n.column,offset:"number"==typeof n.offset&&n.offset>-1?n.offset:void 0}}}function kS(e){return e&&"object"==typeof e?"position"in e||"type"in e?SS(e.position):"start"in e||"end"in e?SS(e):"line"in e||"column"in e?CS(e):"":""}function CS(e){return _S(e&&e.line)+":"+_S(e&&e.column)}function SS(e){return CS(e&&e.start)+"-"+CS(e&&e.end)}function _S(e){return e&&"number"==typeof e?e:1}class IS extends Error{constructor(e,t,n){super(),"string"==typeof t&&(n=t,t=void 0);let r="",o={},i=!1;if(t&&(o="line"in t&&"column"in t||"start"in t&&"end"in t?{place:t}:"type"in t?{ancestors:[t],place:t.position}:{...t}),"string"==typeof e?r=e:!o.cause&&e&&(i=!0,r=e.message,o.cause=e),!o.ruleId&&!o.source&&"string"==typeof n){const e=n.indexOf(":");-1===e?o.ruleId=n:(o.source=n.slice(0,e),o.ruleId=n.slice(e+1))}if(!o.place&&o.ancestors&&o.ancestors){const e=o.ancestors[o.ancestors.length-1];e&&(o.place=e.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=r,this.line=a?a.line:void 0,this.name=kS(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=i&&o.cause&&"string"==typeof o.cause.stack?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}IS.prototype.file="",IS.prototype.name="",IS.prototype.reason="",IS.prototype.message="",IS.prototype.stack="",IS.prototype.column=void 0,IS.prototype.line=void 0,IS.prototype.ancestors=void 0,IS.prototype.cause=void 0,IS.prototype.fatal=void 0,IS.prototype.place=void 0,IS.prototype.ruleId=void 0,IS.prototype.source=void 0;const AS={}.hasOwnProperty,NS=new Map,OS=/[A-Z]/g,RS=new Set(["table","tbody","thead","tfoot","tr"]),TS=new Set(["td","th"]),MS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function PS(e,t){if(!t||void 0===t.Fragment)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if("function"!=typeof t.jsxDEV)throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=function(e,t){return n;function n(n,r,o,i){const a=Array.isArray(o.children),s=xS(n);return t(r,o,i,a,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}(n,t.jsxDEV)}else{if("function"!=typeof t.jsx)throw new TypeError("Expected `jsx` in production options");if("function"!=typeof t.jsxs)throw new TypeError("Expected `jsxs` in production options");r=function(e,t,n){return r;function r(e,r,o,i){const a=Array.isArray(o.children)?n:t;return i?a(r,o,i):a(r,o)}}(0,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:!1!==t.passKeys,passNode:t.passNode||!1,schema:"svg"===t.space?sS:aS,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:!1!==t.tableCellAlignToStyle},i=DS(o,e,void 0);return i&&"string"!=typeof i?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function DS(e,t,n){return"element"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.tagName.toLowerCase()&&"html"===r.space&&(o=sS,e.schema=o);e.ancestors.push(t);const i=FS(e,t.tagName,!1),a=function(e,t){const n={};let r,o;for(o in t.properties)if("children"!==o&&AS.call(t.properties,o)){const i=zS(e,o,t.properties[o]);if(i){const[o,a]=i;e.tableCellAlignToStyle&&"align"===o&&"string"==typeof a&&TS.has(t.tagName)?r=a:n[o]=a}}if(r){(n.style||(n.style={}))["css"===e.stylePropertyNameCase?"text-align":"textAlign"]=r}return n}(e,t);let s=LS(e,t);RS.has(t.tagName)&&(s=s.filter((function(e){return"string"!=typeof e||!("object"==typeof(t=e)?"text"===t.type&&IC(t.value):IC(t));var t})));return jS(e,a,i,t),BS(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxFlowExpression"===t.type||"mdxTextExpression"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}VS(e,t.position)}(e,t):"mdxJsxFlowElement"===t.type||"mdxJsxTextElement"===t.type?function(e,t,n){const r=e.schema;let o=r;"svg"===t.name&&"html"===r.space&&(o=sS,e.schema=o);e.ancestors.push(t);const i=null===t.name?e.Fragment:FS(e,t.name,!0),a=function(e,t){const n={};for(const r of t.attributes)if("mdxJsxExpressionAttribute"===r.type)if(r.data&&r.data.estree&&e.evaluater){const t=r.data.estree.body[0];t.type;const o=t.expression;o.type;const i=o.properties[0];i.type,Object.assign(n,e.evaluater.evaluateExpression(i.argument))}else VS(e,t.position);else{const o=r.name;let i;if(r.value&&"object"==typeof r.value)if(r.value.data&&r.value.data.estree&&e.evaluater){const t=r.value.data.estree.body[0];t.type,i=e.evaluater.evaluateExpression(t.expression)}else VS(e,t.position);else i=null===r.value||r.value;n[o]=i}return n}(e,t),s=LS(e,t);return jS(e,a,i,t),BS(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}(e,t,n):"mdxjsEsm"===t.type?function(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);VS(e,t.position)}(e,t):"root"===t.type?function(e,t,n){const r={};return BS(r,LS(e,t)),e.create(t,e.Fragment,r,n)}(e,t,n):"text"===t.type?function(e,t){return t.value}(0,t):void 0}function jS(e,t,n,r){"string"!=typeof n&&n!==e.Fragment&&e.passNode&&(t.node=r)}function BS(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function LS(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:NS;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const e="element"===i.type?i.tagName:"mdxJsxFlowElement"===i.type||"mdxJsxTextElement"===i.type?i.name:void 0;if(e){const t=o.get(e)||0;a=e+"-"+t,o.set(e,t+1)}}const s=DS(e,i,a);void 0!==s&&n.push(s)}return n}function zS(e,t,n){const r=function(e,t){const n=OC(t);let r=t,o=RC;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&"data"===n.slice(0,4)&&rS.test(t)){if("-"===t.charAt(4)){const e=t.slice(5).replace(nS,iS);r="data"+e.charAt(0).toUpperCase()+e.slice(1)}else{const e=t.slice(4);if(!nS.test(e)){let n=e.replace(tS,oS);"-"!==n.charAt(0)&&(n="-"+n),t="data"+n}}o=WC}return new o(r,t)}(e.schema,t);if(!(null==n||"number"==typeof n&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?function(e){const t={};return(""===e[e.length-1]?[...e,""]:e).join((t.padRight?" ":"")+","+(!1===t.padLeft?"":" ")).trim()}(n):function(e){return e.join(" ").trim()}(n)),"style"===r.property){let t="object"==typeof n?n:function(e,t){try{return vS(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};const n=t,r=new IS("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=MS+"#cannot-parse-style-attribute",r}}(e,String(n));return"css"===e.stylePropertyNameCase&&(t=function(e){const t={};let n;for(n in e)AS.call(e,n)&&(t[GS(n)]=e[n]);return t}(t)),["style",t]}return["react"===e.elementAttributeNameCase&&r.space?eS[r.property]||r.property:r.attribute,n]}}function FS(e,t,n){let r;if(n)if(t.includes(".")){const e=t.split(".");let n,o=-1;for(;++o<e.length;){const t=SC(e[o])?{type:"Identifier",name:e[o]}:{type:"Literal",value:e[o]};n=n?{type:"MemberExpression",object:n,property:t,computed:Boolean(o&&"Literal"===t.type),optional:!1}:t}r=n}else r=SC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};else r={type:"Literal",value:t};if("Literal"===r.type){const t=r.value;return AS.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);VS(e)}function VS(e,t){const n=new IS("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=MS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function GS(e){let t=e.replace(OS,WS);return"ms-"===t.slice(0,3)&&(t="-"+t),t}function WS(e){return"-"+e.toLowerCase()}const HS={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},XS={};function YS(e,t){return $S(e,"boolean"!=typeof XS.includeImageAlt||XS.includeImageAlt,"boolean"!=typeof XS.includeHtml||XS.includeHtml)}function $S(e,t,n){if(function(e){return Boolean(e&&"object"==typeof e)}(e)){if("value"in e)return"html"!==e.type||n?e.value:"";if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return ZS(e.children,t,n)}return Array.isArray(e)?ZS(e,t,n):""}function ZS(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=$S(e[o],t,n);return r.join("")}const US=document.createElement("i");function JS(e){const t="&"+e+";";US.innerHTML=t;const n=US.textContent;return(59!==n.charCodeAt(n.length-1)||"semi"===e)&&(n!==t&&n)}function KS(e,t,n,r){const o=e.length;let i,a=0;if(t=t<0?-t>o?0:o+t:t>o?o:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);a<r.length;)i=r.slice(a,a+1e4),i.unshift(t,0),e.splice(...i),a+=1e4,t+=1e4}function qS(e,t){return e.length>0?(KS(e,e.length,0,t),e):t}const QS={}.hasOwnProperty;function e_(e){const t={};let n=-1;for(;++n<e.length;)t_(t,e[n]);return t}function t_(e,t){let n;for(n in t){const r=(QS.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let i;if(o)for(i in o){QS.call(r,i)||(r[i]=[]);const e=o[i];n_(r[i],Array.isArray(e)?e:e?[e]:[])}}}function n_(e,t){let n=-1;const r=[];for(;++n<t.length;)("after"===t[n].add?e:r).push(t[n]);KS(e,0,0,r)}function r_(e,t){const n=Number.parseInt(e,t);return n<9||11===n||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||!(65535&~n)||65534==(65535&n)||n>1114111?"�":String.fromCodePoint(n)}function o_(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const i_=y_(/[A-Za-z]/),a_=y_(/[\dA-Za-z]/),s_=y_(/[#-'*+\--9=?A-Z^-~]/);function l_(e){return null!==e&&(e<32||127===e)}const c_=y_(/\d/),u_=y_(/[\dA-Fa-f]/),d_=y_(/[!-/:-@[-`{-~]/);function f_(e){return null!==e&&e<-2}function p_(e){return null!==e&&(e<0||32===e)}function h_(e){return-2===e||-1===e||32===e}const m_=y_(/\p{P}|\p{S}/u),g_=y_(/\s/);function y_(e){return function(t){return null!==t&&t>-1&&e.test(String.fromCharCode(t))}}function b_(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(37===i&&a_(e.charCodeAt(n+1))&&a_(e.charCodeAt(n+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const t=e.charCodeAt(n+1);i<56320&&t>56319&&t<57344?(a=String.fromCharCode(i,t),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function v_(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return function(r){if(h_(r))return e.enter(n),a(r);return t(r)};function a(r){return h_(r)&&i++<o?(e.consume(r),a):(e.exit(n),t(r))}}const w_={tokenize:function(e){const t=e.attempt(this.parser.constructs.contentInitial,(function(n){if(null===n)return void e.consume(n);return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),v_(e,t,"linePrefix")}),(function(t){return e.enter("paragraph"),r(t)}));let n;return t;function r(t){const r=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){return null===t?(e.exit("chunkText"),e.exit("paragraph"),void e.consume(t)):f_(t)?(e.consume(t),e.exit("chunkText"),r):(e.consume(t),o)}}};const x_={tokenize:function(e){const t=this,n=[];let r,o,i,a=0;return s;function s(r){if(a<n.length){const o=n[a];return t.containerState=o[1],e.attempt(o[0].continuation,l,c)(r)}return c(r)}function l(e){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&b();const n=t.events.length;let o,i=n;for(;i--;)if("exit"===t.events[i][0]&&"chunkFlow"===t.events[i][1].type){o=t.events[i][1].end;break}y(a);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return KS(t.events,i+1,0,t.events.slice(n)),t.events.length=s,c(e)}return s(e)}function c(o){if(a===n.length){if(!r)return f(o);if(r.currentConstruct&&r.currentConstruct.concrete)return h(o);t.interrupt=Boolean(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(E_,u,d)(o)}function u(e){return r&&b(),y(a),f(e)}function d(e){return t.parser.lazy[t.now().line]=a!==n.length,i=t.now().offset,h(e)}function f(n){return t.containerState={},e.attempt(E_,p,h)(n)}function p(e){return a++,n.push([t.currentConstruct,t.containerState]),f(e)}function h(n){return null===n?(r&&b(),y(0),void e.consume(n)):(r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:o}),m(n))}function m(n){return null===n?(g(e.exit("chunkFlow"),!0),y(0),void e.consume(n)):f_(n)?(e.consume(n),g(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(n),m)}function g(e,n){const s=t.sliceStream(e);if(n&&s.push(null),e.previous=o,o&&(o.next=e),o=e,r.defineSkip(e.start),r.write(s),t.parser.lazy[e.start.line]){let e=r.events.length;for(;e--;)if(r.events[e][1].start.offset<i&&(!r.events[e][1].end||r.events[e][1].end.offset>i))return;const n=t.events.length;let o,s,l=n;for(;l--;)if("exit"===t.events[l][0]&&"chunkFlow"===t.events[l][1].type){if(o){s=t.events[l][1].end;break}o=!0}for(y(a),e=n;e<t.events.length;)t.events[e][1].end={...s},e++;KS(t.events,l+1,0,t.events.slice(n)),t.events.length=e}}function y(r){let o=n.length;for(;o-- >r;){const r=n[o];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function b(){r.write([null]),o=void 0,r=void 0,t.containerState._closeFlow=void 0}}},E_={tokenize:function(e,t,n){return v_(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}};function k_(e){return null===e||p_(e)||g_(e)?1:m_(e)?2:void 0}function C_(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const S_={name:"attention",resolveAll:function(e,t){let n,r,o,i,a,s,l,c,u=-1;for(;++u<e.length;)if("enter"===e[u][0]&&"attentionSequence"===e[u][1].type&&e[u][1]._close)for(n=u;n--;)if("exit"===e[n][0]&&"attentionSequence"===e[n][1].type&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[u][1]).charCodeAt(0)){if((e[n][1]._close||e[u][1]._open)&&(e[u][1].end.offset-e[u][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[u][1].end.offset-e[u][1].start.offset)%3))continue;s=e[n][1].end.offset-e[n][1].start.offset>1&&e[u][1].end.offset-e[u][1].start.offset>1?2:1;const d={...e[n][1].end},f={...e[u][1].start};__(d,-s),__(f,s),i={type:s>1?"strongSequence":"emphasisSequence",start:d,end:{...e[n][1].end}},a={type:s>1?"strongSequence":"emphasisSequence",start:{...e[u][1].start},end:f},o={type:s>1?"strongText":"emphasisText",start:{...e[n][1].end},end:{...e[u][1].start}},r={type:s>1?"strong":"emphasis",start:{...i.start},end:{...a.end}},e[n][1].end={...i.start},e[u][1].start={...a.end},l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=qS(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=qS(l,[["enter",r,t],["enter",i,t],["exit",i,t],["enter",o,t]]),l=qS(l,C_(t.parser.constructs.insideSpan.null,e.slice(n+1,u),t)),l=qS(l,[["exit",o,t],["enter",a,t],["exit",a,t],["exit",r,t]]),e[u][1].end.offset-e[u][1].start.offset?(c=2,l=qS(l,[["enter",e[u][1],t],["exit",e[u][1],t]])):c=0,KS(e,n-1,u-n+3,l),u=n+l.length-c-2;break}u=-1;for(;++u<e.length;)"attentionSequence"===e[u][1].type&&(e[u][1].type="data");return e},tokenize:function(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=k_(r);let i;return function(t){return i=t,e.enter("attentionSequence"),a(t)};function a(s){if(s===i)return e.consume(s),a;const l=e.exit("attentionSequence"),c=k_(s),u=!c||2===c&&o||n.includes(s),d=!o||2===o&&c||n.includes(r);return l._open=Boolean(42===i?u:u&&(o||!d)),l._close=Boolean(42===i?d:d&&(c||!u)),t(s)}}};function __(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const I_={name:"autolink",tokenize:function(e,t,n){let r=0;return function(t){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(t),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o};function o(t){return i_(t)?(e.consume(t),i):64===t?n(t):l(t)}function i(e){return 43===e||45===e||46===e||a_(e)?(r=1,a(e)):l(e)}function a(t){return 58===t?(e.consume(t),r=0,s):(43===t||45===t||46===t||a_(t))&&r++<32?(e.consume(t),a):(r=0,l(t))}function s(r){return 62===r?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(r),e.exit("autolinkMarker"),e.exit("autolink"),t):null===r||32===r||60===r||l_(r)?n(r):(e.consume(r),s)}function l(t){return 64===t?(e.consume(t),c):s_(t)?(e.consume(t),l):n(t)}function c(e){return a_(e)?u(e):n(e)}function u(n){return 46===n?(e.consume(n),r=0,c):62===n?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(n),e.exit("autolinkMarker"),e.exit("autolink"),t):d(n)}function d(t){if((45===t||a_(t))&&r++<63){const n=45===t?d:u;return e.consume(t),n}return n(t)}}};const A_={partial:!0,tokenize:function(e,t,n){return function(t){return h_(t)?v_(e,r,"linePrefix")(t):r(t)};function r(e){return null===e||f_(e)?t(e):n(e)}}};const N_={continuation:{tokenize:function(e,t,n){const r=this;return function(t){if(h_(t))return v_(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t);return o(t)};function o(r){return e.attempt(N_,t,n)(r)}}},exit:function(e){e.exit("blockQuote")},name:"blockQuote",tokenize:function(e,t,n){const r=this;return function(t){if(62===t){const n=r.containerState;return n.open||(e.enter("blockQuote",{_container:!0}),n.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(t),e.exit("blockQuoteMarker"),o}return n(t)};function o(n){return h_(n)?(e.enter("blockQuotePrefixWhitespace"),e.consume(n),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(n))}}};const O_={name:"characterEscape",tokenize:function(e,t,n){return function(t){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(t),e.exit("escapeMarker"),r};function r(r){return d_(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}};const R_={name:"characterReference",tokenize:function(e,t,n){const r=this;let o,i,a=0;return function(t){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(t),e.exit("characterReferenceMarker"),s};function s(t){return 35===t?(e.enter("characterReferenceMarkerNumeric"),e.consume(t),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),o=31,i=a_,c(t))}function l(t){return 88===t||120===t?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(t),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,i=u_,c):(e.enter("characterReferenceValue"),o=7,i=c_,c(t))}function c(s){if(59===s&&a){const o=e.exit("characterReferenceValue");return i!==a_||JS(r.sliceSerialize(o))?(e.enter("characterReferenceMarker"),e.consume(s),e.exit("characterReferenceMarker"),e.exit("characterReference"),t):n(s)}return i(s)&&a++<o?(e.consume(s),c):n(s)}}};const T_={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(null===t)return n(t);return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}},M_={concrete:!0,name:"codeFenced",tokenize:function(e,t,n){const r=this,o={partial:!0,tokenize:function(e,t,n){let o=0;return a;function a(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),l}function l(t){return e.enter("codeFencedFence"),h_(t)?v_(e,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):c(t)}function c(t){return t===i?(e.enter("codeFencedFenceSequence"),u(t)):n(t)}function u(t){return t===i?(o++,e.consume(t),u):o>=s?(e.exit("codeFencedFenceSequence"),h_(t)?v_(e,d,"whitespace")(t):d(t)):n(t)}function d(r){return null===r||f_(r)?(e.exit("codeFencedFence"),t(r)):n(r)}}};let i,a=0,s=0;return function(t){return function(t){const n=r.events[r.events.length-1];return a=n&&"linePrefix"===n[1].type?n[2].sliceSerialize(n[1],!0).length:0,i=t,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(t)}(t)};function l(t){return t===i?(s++,e.consume(t),l):s<3?n(t):(e.exit("codeFencedFenceSequence"),h_(t)?v_(e,c,"whitespace")(t):c(t))}function c(n){return null===n||f_(n)?(e.exit("codeFencedFence"),r.interrupt?t(n):e.check(T_,p,b)(n)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),u(n))}function u(t){return null===t||f_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),c(t)):h_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),v_(e,d,"whitespace")(t)):96===t&&t===i?n(t):(e.consume(t),u)}function d(t){return null===t||f_(t)?c(t):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),f(t))}function f(t){return null===t||f_(t)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),c(t)):96===t&&t===i?n(t):(e.consume(t),f)}function p(t){return e.attempt(o,b,h)(t)}function h(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),m}function m(t){return a>0&&h_(t)?v_(e,g,"linePrefix",a+1)(t):g(t)}function g(t){return null===t||f_(t)?e.check(T_,p,b)(t):(e.enter("codeFlowValue"),y(t))}function y(t){return null===t||f_(t)?(e.exit("codeFlowValue"),g(t)):(e.consume(t),y)}function b(n){return e.exit("codeFenced"),t(n)}}};const P_={name:"codeIndented",tokenize:function(e,t,n){const r=this;return function(t){return e.enter("codeIndented"),v_(e,o,"linePrefix",5)(t)};function o(e){const t=r.events[r.events.length-1];return t&&"linePrefix"===t[1].type&&t[2].sliceSerialize(t[1],!0).length>=4?i(e):n(e)}function i(t){return null===t?s(t):f_(t)?e.attempt(D_,i,s)(t):(e.enter("codeFlowValue"),a(t))}function a(t){return null===t||f_(t)?(e.exit("codeFlowValue"),i(t)):(e.consume(t),a)}function s(n){return e.exit("codeIndented"),t(n)}}},D_={partial:!0,tokenize:function(e,t,n){const r=this;return o;function o(t){return r.parser.lazy[r.now().line]?n(t):f_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o):v_(e,i,"linePrefix",5)(t)}function i(e){const i=r.events[r.events.length-1];return i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(e):f_(e)?o(e):n(e)}}};const j_={name:"codeText",previous:function(e){return 96!==e||"characterEscape"===this.events[this.events.length-1][1].type},resolve:function(e){let t,n,r=e.length-4,o=3;if(!("lineEnding"!==e[o][1].type&&"space"!==e[o][1].type||"lineEnding"!==e[r][1].type&&"space"!==e[r][1].type))for(t=o;++t<r;)if("codeTextData"===e[t][1].type){e[o][1].type="codeTextPadding",e[r][1].type="codeTextPadding",o+=2,r-=2;break}t=o-1,r++;for(;++t<=r;)void 0===n?t!==r&&"lineEnding"!==e[t][1].type&&(n=t):t!==r&&"lineEnding"!==e[t][1].type||(e[n][1].type="codeTextData",t!==n+2&&(e[n][1].end=e[t-1][1].end,e.splice(n+2,t-n-2),r-=t-n-2,t=n+2),n=void 0);return e},tokenize:function(e,t,n){let r,o,i=0;return function(t){return e.enter("codeText"),e.enter("codeTextSequence"),a(t)};function a(t){return 96===t?(e.consume(t),i++,a):(e.exit("codeTextSequence"),s(t))}function s(t){return null===t?n(t):32===t?(e.enter("space"),e.consume(t),e.exit("space"),s):96===t?(o=e.enter("codeTextSequence"),r=0,c(t)):f_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),s):(e.enter("codeTextData"),l(t))}function l(t){return null===t||32===t||96===t||f_(t)?(e.exit("codeTextData"),s(t)):(e.consume(t),l)}function c(n){return 96===n?(e.consume(n),r++,c):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(n)):(o.type="codeTextData",l(n))}}};class B_{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const n=null==t?Number.POSITIVE_INFINITY:t;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){const r=t||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return n&&L_(this.left,n),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),L_(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),L_(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&0===this.right.length||e<0&&0===this.left.length))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);L_(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);L_(this.left,t.reverse())}}}function L_(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function z_(e){const t={};let n,r,o,i,a,s,l,c=-1;const u=new B_(e);for(;++c<u.length;){for(;c in t;)c=t[c];if(n=u.get(c),c&&"chunkFlow"===n[1].type&&"listItemPrefix"===u.get(c-1)[1].type&&(s=n[1]._tokenizer.events,o=0,o<s.length&&"lineEndingBlank"===s[o][1].type&&(o+=2),o<s.length&&"content"===s[o][1].type))for(;++o<s.length&&"content"!==s[o][1].type;)"chunkText"===s[o][1].type&&(s[o][1]._isInFirstContentOfListItem=!0,o++);if("enter"===n[0])n[1].contentType&&(Object.assign(t,F_(u,c)),c=t[c],l=!0);else if(n[1]._container){for(o=c,r=void 0;o--;)if(i=u.get(o),"lineEnding"===i[1].type||"lineEndingBlank"===i[1].type)"enter"===i[0]&&(r&&(u.get(r)[1].type="lineEndingBlank"),i[1].type="lineEnding",r=o);else if("linePrefix"!==i[1].type&&"listItemIndent"!==i[1].type)break;r&&(n[1].end={...u.get(r)[1].start},a=u.slice(r,c),a.unshift(n),u.splice(r,c-r+1,a))}}return KS(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!l}function F_(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const s=a.events,l=[],c={};let u,d,f=-1,p=n,h=0,m=0;const g=[m];for(;p;){for(;e.get(++o)[1]!==p;);i.push(o),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&a.defineSkip(p.start),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),p._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)"exit"===s[f][0]&&"enter"===s[f-1][0]&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(m=f+1,g.push(m),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(a.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){const t=s.slice(g[f],g[f+1]),n=i.pop();l.push([n,n+t.length-1]),e.splice(n,2,t)}for(l.reverse(),f=-1;++f<l.length;)c[h+l[f][0]]=h+l[f][1],h+=l[f][1]-l[f][0]-1;return c}const V_={resolve:function(e){return z_(e),e},tokenize:function(e,t){let n;return function(t){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(t)};function r(t){return null===t?o(t):f_(t)?e.check(G_,i,o)(t):(e.consume(t),r)}function o(n){return e.exit("chunkContent"),e.exit("content"),t(n)}function i(t){return e.consume(t),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}},G_={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),v_(e,o,"linePrefix")};function o(o){if(null===o||f_(o))return n(o);const i=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&i&&"linePrefix"===i[1].type&&i[2].sliceSerialize(i[1],!0).length>=4?t(o):e.interrupt(r.parser.constructs.flow,n,t)(o)}}};function W_(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return function(t){if(60===t)return e.enter(r),e.enter(o),e.enter(i),e.consume(t),e.exit(i),d;if(null===t||32===t||41===t||l_(t))return n(t);return e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(t)};function d(n){return 62===n?(e.enter(i),e.consume(n),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(n))}function f(t){return 62===t?(e.exit("chunkString"),e.exit(s),d(t)):null===t||60===t||f_(t)?n(t):(e.consume(t),92===t?p:f)}function p(t){return 60===t||62===t||92===t?(e.consume(t),f):f(t)}function h(o){return u||null!==o&&41!==o&&!p_(o)?u<c&&40===o?(e.consume(o),u++,h):41===o?(e.consume(o),u--,h):null===o||32===o||40===o||l_(o)?n(o):(e.consume(o),92===o?m:h):(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(o))}function m(t){return 40===t||41===t||92===t?(e.consume(t),h):h(t)}}function H_(e,t,n,r,o,i){const a=this;let s,l=0;return function(t){return e.enter(r),e.enter(o),e.consume(t),e.exit(o),e.enter(i),c};function c(d){return l>999||null===d||91===d||93===d&&!s||94===d&&!l&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):93===d?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):f_(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(t){return null===t||91===t||93===t||f_(t)||l++>999?(e.exit("chunkString"),c(t)):(e.consume(t),s||(s=!h_(t)),92===t?d:u)}function d(t){return 91===t||92===t||93===t?(e.consume(t),l++,u):u(t)}}function X_(e,t,n,r,o,i){let a;return function(t){if(34===t||39===t||40===t)return e.enter(r),e.enter(o),e.consume(t),e.exit(o),a=40===t?41:t,s;return n(t)};function s(n){return n===a?(e.enter(o),e.consume(n),e.exit(o),e.exit(r),t):(e.enter(i),l(n))}function l(t){return t===a?(e.exit(i),s(a)):null===t?n(t):f_(t)?(e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),v_(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(t))}function c(t){return t===a||null===t||f_(t)?(e.exit("chunkString"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return t===a||92===t?(e.consume(t),c):c(t)}}function Y_(e,t){let n;return function r(o){if(f_(o))return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r;if(h_(o))return v_(e,r,n?"linePrefix":"lineSuffix")(o);return t(o)}}const $_={name:"definition",tokenize:function(e,t,n){const r=this;let o;return function(t){return e.enter("definition"),function(t){return H_.call(r,e,i,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(t)}(t)};function i(t){return o=o_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),a):n(t)}function a(t){return p_(t)?Y_(e,s)(t):s(t)}function s(t){return W_(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(t)}function l(t){return e.attempt(Z_,c,c)(t)}function c(t){return h_(t)?v_(e,u,"whitespace")(t):u(t)}function u(i){return null===i||f_(i)?(e.exit("definition"),r.parser.defined.push(o),t(i)):n(i)}}},Z_={partial:!0,tokenize:function(e,t,n){return function(t){return p_(t)?Y_(e,r)(t):n(t)};function r(t){return X_(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(t)}function o(t){return h_(t)?v_(e,i,"whitespace")(t):i(t)}function i(e){return null===e||f_(e)?t(e):n(e)}}};const U_={name:"hardBreakEscape",tokenize:function(e,t,n){return function(t){return e.enter("hardBreakEscape"),e.consume(t),r};function r(r){return f_(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}};const J_={name:"headingAtx",resolve:function(e,t){let n,r,o=e.length-2,i=3;"whitespace"===e[i][1].type&&(i+=2);o-2>i&&"whitespace"===e[o][1].type&&(o-=2);"atxHeadingSequence"===e[o][1].type&&(i===o-1||o-4>i&&"whitespace"===e[o-2][1].type)&&(o-=i+1===o?2:4);o>i&&(n={type:"atxHeadingText",start:e[i][1].start,end:e[o][1].end},r={type:"chunkText",start:e[i][1].start,end:e[o][1].end,contentType:"text"},KS(e,i,o-i+1,[["enter",n,t],["enter",r,t],["exit",r,t],["exit",n,t]]));return e},tokenize:function(e,t,n){let r=0;return function(t){return e.enter("atxHeading"),function(t){return e.enter("atxHeadingSequence"),o(t)}(t)};function o(t){return 35===t&&r++<6?(e.consume(t),o):null===t||p_(t)?(e.exit("atxHeadingSequence"),i(t)):n(t)}function i(n){return 35===n?(e.enter("atxHeadingSequence"),a(n)):null===n||f_(n)?(e.exit("atxHeading"),t(n)):h_(n)?v_(e,i,"whitespace")(n):(e.enter("atxHeadingText"),s(n))}function a(t){return 35===t?(e.consume(t),a):(e.exit("atxHeadingSequence"),i(t))}function s(t){return null===t||35===t||p_(t)?(e.exit("atxHeadingText"),i(t)):(e.consume(t),s)}}};const K_=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],q_=["pre","script","style","textarea"],Q_={concrete:!0,name:"htmlFlow",resolveTo:function(e){let t=e.length;for(;t--&&("enter"!==e[t][0]||"htmlFlow"!==e[t][1].type););t>1&&"linePrefix"===e[t-2][1].type&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2));return e},tokenize:function(e,t,n){const r=this;let o,i,a,s,l;return function(t){return function(t){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(t),c}(t)};function c(s){return 33===s?(e.consume(s),u):47===s?(e.consume(s),i=!0,p):63===s?(e.consume(s),o=3,r.interrupt?t:P):i_(s)?(e.consume(s),a=String.fromCharCode(s),h):n(s)}function u(i){return 45===i?(e.consume(i),o=2,d):91===i?(e.consume(i),o=5,s=0,f):i_(i)?(e.consume(i),o=4,r.interrupt?t:P):n(i)}function d(o){return 45===o?(e.consume(o),r.interrupt?t:P):n(o)}function f(o){const i="CDATA[";return o===i.charCodeAt(s++)?(e.consume(o),6===s?r.interrupt?t:_:f):n(o)}function p(t){return i_(t)?(e.consume(t),a=String.fromCharCode(t),h):n(t)}function h(s){if(null===s||47===s||62===s||p_(s)){const l=47===s,c=a.toLowerCase();return l||i||!q_.includes(c)?K_.includes(a.toLowerCase())?(o=6,l?(e.consume(s),m):r.interrupt?t(s):_(s)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):i?g(s):y(s)):(o=1,r.interrupt?t(s):_(s))}return 45===s||a_(s)?(e.consume(s),a+=String.fromCharCode(s),h):n(s)}function m(o){return 62===o?(e.consume(o),r.interrupt?t:_):n(o)}function g(t){return h_(t)?(e.consume(t),g):C(t)}function y(t){return 47===t?(e.consume(t),C):58===t||95===t||i_(t)?(e.consume(t),b):h_(t)?(e.consume(t),y):C(t)}function b(t){return 45===t||46===t||58===t||95===t||a_(t)?(e.consume(t),b):v(t)}function v(t){return 61===t?(e.consume(t),w):h_(t)?(e.consume(t),v):y(t)}function w(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),l=t,x):h_(t)?(e.consume(t),w):E(t)}function x(t){return t===l?(e.consume(t),l=null,k):null===t||f_(t)?n(t):(e.consume(t),x)}function E(t){return null===t||34===t||39===t||47===t||60===t||61===t||62===t||96===t||p_(t)?v(t):(e.consume(t),E)}function k(e){return 47===e||62===e||h_(e)?y(e):n(e)}function C(t){return 62===t?(e.consume(t),S):n(t)}function S(t){return null===t||f_(t)?_(t):h_(t)?(e.consume(t),S):n(t)}function _(t){return 45===t&&2===o?(e.consume(t),O):60===t&&1===o?(e.consume(t),R):62===t&&4===o?(e.consume(t),D):63===t&&3===o?(e.consume(t),P):93===t&&5===o?(e.consume(t),M):!f_(t)||6!==o&&7!==o?null===t||f_(t)?(e.exit("htmlFlowData"),I(t)):(e.consume(t),_):(e.exit("htmlFlowData"),e.check(eI,j,I)(t))}function I(t){return e.check(tI,A,j)(t)}function A(t){return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),N}function N(t){return null===t||f_(t)?I(t):(e.enter("htmlFlowData"),_(t))}function O(t){return 45===t?(e.consume(t),P):_(t)}function R(t){return 47===t?(e.consume(t),a="",T):_(t)}function T(t){if(62===t){const n=a.toLowerCase();return q_.includes(n)?(e.consume(t),D):_(t)}return i_(t)&&a.length<8?(e.consume(t),a+=String.fromCharCode(t),T):_(t)}function M(t){return 93===t?(e.consume(t),P):_(t)}function P(t){return 62===t?(e.consume(t),D):45===t&&2===o?(e.consume(t),P):_(t)}function D(t){return null===t||f_(t)?(e.exit("htmlFlowData"),j(t)):(e.consume(t),D)}function j(n){return e.exit("htmlFlow"),t(n)}}},eI={partial:!0,tokenize:function(e,t,n){return function(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(A_,t,n)}}},tI={partial:!0,tokenize:function(e,t,n){const r=this;return function(t){if(f_(t))return e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),o;return n(t)};function o(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}};const nI={name:"htmlText",tokenize:function(e,t,n){const r=this;let o,i,a;return function(t){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(t),s};function s(t){return 33===t?(e.consume(t),l):47===t?(e.consume(t),w):63===t?(e.consume(t),b):i_(t)?(e.consume(t),k):n(t)}function l(t){return 45===t?(e.consume(t),c):91===t?(e.consume(t),i=0,p):i_(t)?(e.consume(t),y):n(t)}function c(t){return 45===t?(e.consume(t),f):n(t)}function u(t){return null===t?n(t):45===t?(e.consume(t),d):f_(t)?(a=u,T(t)):(e.consume(t),u)}function d(t){return 45===t?(e.consume(t),f):u(t)}function f(e){return 62===e?R(e):45===e?d(e):u(e)}function p(t){const r="CDATA[";return t===r.charCodeAt(i++)?(e.consume(t),6===i?h:p):n(t)}function h(t){return null===t?n(t):93===t?(e.consume(t),m):f_(t)?(a=h,T(t)):(e.consume(t),h)}function m(t){return 93===t?(e.consume(t),g):h(t)}function g(t){return 62===t?R(t):93===t?(e.consume(t),g):h(t)}function y(t){return null===t||62===t?R(t):f_(t)?(a=y,T(t)):(e.consume(t),y)}function b(t){return null===t?n(t):63===t?(e.consume(t),v):f_(t)?(a=b,T(t)):(e.consume(t),b)}function v(e){return 62===e?R(e):b(e)}function w(t){return i_(t)?(e.consume(t),x):n(t)}function x(t){return 45===t||a_(t)?(e.consume(t),x):E(t)}function E(t){return f_(t)?(a=E,T(t)):h_(t)?(e.consume(t),E):R(t)}function k(t){return 45===t||a_(t)?(e.consume(t),k):47===t||62===t||p_(t)?C(t):n(t)}function C(t){return 47===t?(e.consume(t),R):58===t||95===t||i_(t)?(e.consume(t),S):f_(t)?(a=C,T(t)):h_(t)?(e.consume(t),C):R(t)}function S(t){return 45===t||46===t||58===t||95===t||a_(t)?(e.consume(t),S):_(t)}function _(t){return 61===t?(e.consume(t),I):f_(t)?(a=_,T(t)):h_(t)?(e.consume(t),_):C(t)}function I(t){return null===t||60===t||61===t||62===t||96===t?n(t):34===t||39===t?(e.consume(t),o=t,A):f_(t)?(a=I,T(t)):h_(t)?(e.consume(t),I):(e.consume(t),N)}function A(t){return t===o?(e.consume(t),o=void 0,O):null===t?n(t):f_(t)?(a=A,T(t)):(e.consume(t),A)}function N(t){return null===t||34===t||39===t||60===t||61===t||96===t?n(t):47===t||62===t||p_(t)?C(t):(e.consume(t),N)}function O(e){return 47===e||62===e||p_(e)?C(e):n(e)}function R(r){return 62===r?(e.consume(r),e.exit("htmlTextData"),e.exit("htmlText"),t):n(r)}function T(t){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),M}function M(t){return h_(t)?v_(e,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):P(t)}function P(t){return e.enter("htmlTextData"),a(t)}}};const rI={name:"labelEnd",resolveAll:function(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),"labelImage"===r.type||"labelLink"===r.type||"labelEnd"===r.type){const e="labelImage"===r.type?4:2;r.type="data",t+=e}}e.length!==n.length&&KS(e,0,e.length,n);return e},resolveTo:function(e,t){let n,r,o,i,a=e.length,s=0;for(;a--;)if(n=e[a][1],r){if("link"===n.type||"labelLink"===n.type&&n._inactive)break;"enter"===e[a][0]&&"labelLink"===n.type&&(n._inactive=!0)}else if(o){if("enter"===e[a][0]&&("labelImage"===n.type||"labelLink"===n.type)&&!n._balanced&&(r=a,"labelLink"!==n.type)){s=2;break}}else"labelEnd"===n.type&&(o=a);const l={type:"labelLink"===e[r][1].type?"link":"image",start:{...e[r][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[r][1].start},end:{...e[o][1].end}},u={type:"labelText",start:{...e[r+s+2][1].end},end:{...e[o-2][1].start}};return i=[["enter",l,t],["enter",c,t]],i=qS(i,e.slice(r+1,r+s+3)),i=qS(i,[["enter",u,t]]),i=qS(i,C_(t.parser.constructs.insideSpan.null,e.slice(r+s+4,o-3),t)),i=qS(i,[["exit",u,t],e[o-2],e[o-1],["exit",c,t]]),i=qS(i,e.slice(o+1)),i=qS(i,[["exit",l,t]]),KS(e,r,e.length,i),e},tokenize:function(e,t,n){const r=this;let o,i,a=r.events.length;for(;a--;)if(("labelImage"===r.events[a][1].type||"labelLink"===r.events[a][1].type)&&!r.events[a][1]._balanced){o=r.events[a][1];break}return function(t){if(!o)return n(t);if(o._inactive)return u(t);return i=r.parser.defined.includes(o_(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelEnd"),s};function s(t){return 40===t?e.attempt(oI,c,i?c:u)(t):91===t?e.attempt(iI,c,i?l:u)(t):i?c(t):u(t)}function l(t){return e.attempt(aI,c,u)(t)}function c(e){return t(e)}function u(e){return o._balanced=!0,n(e)}}},oI={tokenize:function(e,t,n){return function(t){return e.enter("resource"),e.enter("resourceMarker"),e.consume(t),e.exit("resourceMarker"),r};function r(t){return p_(t)?Y_(e,o)(t):o(t)}function o(t){return 41===t?c(t):W_(e,i,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(t)}function i(t){return p_(t)?Y_(e,s)(t):c(t)}function a(e){return n(e)}function s(t){return 34===t||39===t||40===t?X_(e,l,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(t):c(t)}function l(t){return p_(t)?Y_(e,c)(t):c(t)}function c(r){return 41===r?(e.enter("resourceMarker"),e.consume(r),e.exit("resourceMarker"),e.exit("resource"),t):n(r)}}},iI={tokenize:function(e,t,n){const r=this;return function(t){return H_.call(r,e,o,i,"reference","referenceMarker","referenceString")(t)};function o(e){return r.parser.defined.includes(o_(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function i(e){return n(e)}}},aI={tokenize:function(e,t,n){return function(t){return e.enter("reference"),e.enter("referenceMarker"),e.consume(t),e.exit("referenceMarker"),r};function r(r){return 93===r?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}};const sI={name:"labelStartImage",resolveAll:rI.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(t),e.exit("labelImageMarker"),o};function o(t){return 91===t?(e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelImage"),i):n(t)}function i(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const lI={name:"labelStartLink",resolveAll:rI.resolveAll,tokenize:function(e,t,n){const r=this;return function(t){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(t),e.exit("labelMarker"),e.exit("labelLink"),o};function o(e){return 94===e&&"_hiddenFootnoteSupport"in r.parser.constructs?n(e):t(e)}}};const cI={name:"lineEnding",tokenize:function(e,t){return function(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),v_(e,t,"linePrefix")}}};const uI={name:"thematicBreak",tokenize:function(e,t,n){let r,o=0;return function(t){return e.enter("thematicBreak"),function(e){return r=e,i(e)}(t)};function i(i){return i===r?(e.enter("thematicBreakSequence"),a(i)):o>=3&&(null===i||f_(i))?(e.exit("thematicBreak"),t(i)):n(i)}function a(t){return t===r?(e.consume(t),o++,a):(e.exit("thematicBreakSequence"),h_(t)?v_(e,i,"whitespace")(t):i(t))}}};const dI={continuation:{tokenize:function(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(A_,o,i);function o(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,v_(e,t,"listItemIndent",r.containerState.size+1)(n)}function i(n){return r.containerState.furtherBlankLines||!h_(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pI,t,a)(n))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,v_(e,e.attempt(dI,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}},exit:function(e){e.exit(this.containerState.type)},name:"list",tokenize:function(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&"linePrefix"===o[1].type?o[2].sliceSerialize(o[1],!0).length:0,a=0;return function(t){const o=r.containerState.type||(42===t||43===t||45===t?"listUnordered":"listOrdered");if("listUnordered"===o?!r.containerState.marker||t===r.containerState.marker:c_(t)){if(r.containerState.type||(r.containerState.type=o,e.enter(o,{_container:!0})),"listUnordered"===o)return e.enter("listItemPrefix"),42===t||45===t?e.check(uI,n,l)(t):l(t);if(!r.interrupt||49===t)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(t)}return n(t)};function s(t){return c_(t)&&++a<10?(e.consume(t),s):(!r.interrupt||a<2)&&(r.containerState.marker?t===r.containerState.marker:41===t||46===t)?(e.exit("listItemValue"),l(t)):n(t)}function l(t){return e.enter("listItemMarker"),e.consume(t),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||t,e.check(A_,r.interrupt?n:c,e.attempt(fI,d,u))}function c(e){return r.containerState.initialBlankLine=!0,i++,d(e)}function u(t){return h_(t)?(e.enter("listItemPrefixWhitespace"),e.consume(t),e.exit("listItemPrefixWhitespace"),d):n(t)}function d(n){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(n)}}},fI={partial:!0,tokenize:function(e,t,n){const r=this;return v_(e,(function(e){const o=r.events[r.events.length-1];return!h_(e)&&o&&"listItemPrefixWhitespace"===o[1].type?t(e):n(e)}),"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5)}},pI={partial:!0,tokenize:function(e,t,n){const r=this;return v_(e,(function(e){const o=r.events[r.events.length-1];return o&&"listItemIndent"===o[1].type&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?t(e):n(e)}),"listItemIndent",r.containerState.size+1)}};const hI={name:"setextUnderline",resolveTo:function(e,t){let n,r,o,i=e.length;for(;i--;)if("enter"===e[i][0]){if("content"===e[i][1].type){n=i;break}"paragraph"===e[i][1].type&&(r=i)}else"content"===e[i][1].type&&e.splice(i,1),o||"definition"!==e[i][1].type||(o=i);const a={type:"setextHeading",start:{...e[n][1].start},end:{...e[e.length-1][1].end}};e[r][1].type="setextHeadingText",o?(e.splice(r,0,["enter",a,t]),e.splice(o+1,0,["exit",e[n][1],t]),e[n][1].end={...e[o][1].end}):e[n][1]=a;return e.push(["exit",a,t]),e},tokenize:function(e,t,n){const r=this;let o;return function(t){let a,s=r.events.length;for(;s--;)if("lineEnding"!==r.events[s][1].type&&"linePrefix"!==r.events[s][1].type&&"content"!==r.events[s][1].type){a="paragraph"===r.events[s][1].type;break}if(!r.parser.lazy[r.now().line]&&(r.interrupt||a))return e.enter("setextHeadingLine"),o=t,function(t){return e.enter("setextHeadingLineSequence"),i(t)}(t);return n(t)};function i(t){return t===o?(e.consume(t),i):(e.exit("setextHeadingLineSequence"),h_(t)?v_(e,a,"lineSuffix")(t):a(t))}function a(r){return null===r||f_(r)?(e.exit("setextHeadingLine"),t(r)):n(r)}}};const mI={tokenize:function(e){const t=this,n=e.attempt(A_,(function(r){if(null===r)return void e.consume(r);return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}),e.attempt(this.parser.constructs.flowInitial,r,v_(e,e.attempt(this.parser.constructs.flow,r,e.attempt(V_,r)),"linePrefix")));return n;function r(r){if(null!==r)return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n;e.consume(r)}}};const gI={resolveAll:wI()},yI=vI("string"),bI=vI("text");function vI(e){return{resolveAll:wI("text"===e?xI:void 0),tokenize:function(t){const n=this,r=this.parser.constructs[e],o=t.attempt(r,i,a);return i;function i(e){return l(e)?o(e):a(e)}function a(e){if(null!==e)return t.enter("data"),t.consume(e),s;t.consume(e)}function s(e){return l(e)?(t.exit("data"),o(e)):(t.consume(e),s)}function l(e){if(null===e)return!0;const t=r[e];let o=-1;if(t)for(;++o<t.length;){const e=t[o];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}}function wI(e){return function(t,n){let r,o=-1;for(;++o<=t.length;)void 0===r?t[o]&&"data"===t[o][1].type&&(r=o,o++):t[o]&&"data"===t[o][1].type||(o!==r+2&&(t[r][1].end=t[o-1][1].end,t.splice(r+2,o-r-2),o=r+2),r=void 0);return e?e(t,n):t}}function xI(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||"lineEnding"===e[n][1].type)&&"data"===e[n-1][1].type){const r=e[n-1][1],o=t.sliceStream(r);let i,a=o.length,s=-1,l=0;for(;a--;){const e=o[a];if("string"==typeof e){for(s=e.length;32===e.charCodeAt(s-1);)l++,s--;if(s)break;s=-1}else if(-2===e)i=!0,l++;else if(-1!==e){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const o={type:n===e.length||i||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?s:r.start._bufferIndex+s,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...o.start},r.start.offset===r.end.offset?Object.assign(r,o):(e.splice(n,0,["enter",o,t],["exit",o,t]),n+=2)}n++}return e}const EI={42:dI,43:dI,45:dI,48:dI,49:dI,50:dI,51:dI,52:dI,53:dI,54:dI,55:dI,56:dI,57:dI,62:N_},kI={91:$_},CI={[-2]:P_,[-1]:P_,32:P_},SI={35:J_,42:uI,45:[hI,uI],60:Q_,61:hI,95:uI,96:M_,126:M_},_I={38:R_,92:O_},II={[-5]:cI,[-4]:cI,[-3]:cI,33:sI,38:R_,42:S_,60:[I_,nI],91:lI,92:[U_,O_],93:rI,95:S_,96:j_},AI={null:[S_,gI]};var NI=Object.freeze({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:kI,disable:{null:[]},document:EI,flow:SI,flowInitial:CI,insideSpan:AI,string:_I,text:II});function OI(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},i=[];let a=[],s=[];const l={attempt:g((function(e,t){y(e,t.from)})),check:g(m),consume:function(e){f_(e)?(r.line++,r.column=1,r.offset+=-3===e?2:1,b()):-1!==e&&(r.column++,r.offset++);r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++));c.previous=e},enter:function(e,t){const n=t||{};return n.type=e,n.start=f(),c.events.push(["enter",n,c]),s.push(n),n},exit:function(e){const t=s.pop();return t.end=f(),c.events.push(["exit",t,c]),t},interrupt:g(m,{interrupt:!0})},c={code:null,containerState:{},defineSkip:function(e){o[e.line]=e.column,b()},events:[],now:f,parser:e,previous:null,sliceSerialize:function(e,t){return function(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if("string"==typeof i)a=i;else switch(i){case-5:a="\r";break;case-4:a="\n";break;case-3:a="\r\n";break;case-2:a=t?" ":"\t";break;case-1:if(!t&&o)continue;a=" ";break;default:a=String.fromCharCode(i)}o=-2===i,r.push(a)}return r.join("")}(d(e),t)},sliceStream:d,write:function(e){if(a=qS(a,e),p(),null!==a[a.length-1])return[];return y(t,0),c.events=C_(i,c.events,c),c.events}};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function d(e){return function(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const e=a[0];"string"==typeof e?a[0]=e.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}(a,e)}function f(){const{_bufferIndex:e,_index:t,line:n,column:o,offset:i}=r;return{_bufferIndex:e,_index:t,line:n,column:o,offset:i}}function p(){let e;for(;r._index<a.length;){const t=a[r._index];if("string"==typeof t)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)h(t.charCodeAt(r._bufferIndex));else h(t)}}function h(e){u=u(e)}function m(e,t){t.restore()}function g(e,t){return function(n,o,i){let a,u,d,p;return Array.isArray(n)?h(n):"tokenize"in n?h([n]):function(e){return t;function t(t){const n=null!==t&&e[t],r=null!==t&&e.null;return h([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}(n);function h(e){return a=e,u=0,0===e.length?i:m(e[u])}function m(e){return function(n){p=function(){const e=f(),t=c.previous,n=c.currentConstruct,o=c.events.length,i=Array.from(s);return{from:o,restore:a};function a(){r=e,c.previous=t,c.currentConstruct=n,c.events.length=o,s=i,b()}}(),d=e,e.partial||(c.currentConstruct=e);if(e.name&&c.parser.constructs.disable.null.includes(e.name))return y();return e.tokenize.call(t?Object.assign(Object.create(c),t):c,l,g,y)(n)}}function g(t){return e(d,p),o}function y(e){return p.restore(),++u<a.length?m(a[u]):i}}}function y(e,t){e.resolveAll&&!i.includes(e)&&i.push(e),e.resolve&&KS(c.events,t,c.events.length-t,e.resolve(c.events.slice(t),c)),e.resolveTo&&(c.events=e.resolveTo(c.events,c))}function b(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}const RI=/[\0\t\n\r]/g;const TI=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function MI(e,t,n){if(t)return t;if(35===n.charCodeAt(0)){const e=n.charCodeAt(1),t=120===e||88===e;return r_(n.slice(t?2:1),t?16:10)}return JS(n)||e}const PI={}.hasOwnProperty;function DI(e,t,n){return"string"!=typeof t&&(n=t,t=void 0),function(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(te),autolinkProtocol:S,autolinkEmail:S,atxHeading:i(K),blockQuote:i(Y),characterEscape:S,characterReference:S,codeFenced:i($),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i($,a),codeText:i(Z,a),codeTextData:S,data:S,codeFlowValue:S,definition:i(U),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(J),hardBreakEscape:i(q),hardBreakTrailing:i(q),htmlFlow:i(Q,a),htmlFlowData:S,htmlText:i(Q,a),htmlTextData:S,image:i(ee),label:a,link:i(te),listItem:i(re),listItemValue:f,listOrdered:i(ne,d),listUnordered:i(ne),paragraph:i(oe),reference:z,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(K),strong:i(ie),thematicBreak:i(se)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:X,autolinkProtocol:H,blockQuote:l(),characterEscapeValue:_,characterReferenceMarkerHexadecimal:V,characterReferenceMarkerNumeric:V,characterReferenceValue:G,characterReference:W,codeFenced:l(g),codeFencedFence:m,codeFencedFenceInfo:p,codeFencedFenceMeta:h,codeFlowValue:_,codeIndented:l(y),codeText:l(R),codeTextData:_,data:_,definition:l(),definitionDestinationString:w,definitionLabelString:b,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(A),hardBreakTrailing:l(A),htmlFlow:l(N),htmlFlowData:_,htmlText:l(O),htmlTextData:_,image:l(M),label:D,labelText:P,lineEnding:I,link:l(T),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:F,resourceDestinationString:j,resourceTitleString:B,resource:L,setextHeading:l(C),setextHeadingLineSequence:k,setextHeadingText:E,strong:l(),thematicBreak:l()}};BI(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(e){let r={type:"root",children:[]};const i={stack:[r],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},l=[];let d=-1;for(;++d<e.length;)if("listOrdered"===e[d][1].type||"listUnordered"===e[d][1].type)if("enter"===e[d][0])l.push(d);else{d=o(e,l.pop(),d)}for(d=-1;++d<e.length;){const n=t[e[d][0]];PI.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},i),e[d][1])}if(i.tokenStack.length>0){const e=i.tokenStack[i.tokenStack.length-1];(e[1]||zI).call(i,void 0,e[0])}for(r.position={start:jI(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:jI(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function o(e,t,n){let r,o,i,a,s=t-1,l=-1,c=!1;for(;++s<=n;){const t=e[s];switch(t[1].type){case"listUnordered":case"listOrdered":case"blockQuote":"enter"===t[0]?l++:l--,a=void 0;break;case"lineEndingBlank":"enter"===t[0]&&(!r||a||l||i||(i=s),a=void 0);break;case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:a=void 0}if(!l&&"enter"===t[0]&&"listItemPrefix"===t[1].type||-1===l&&"exit"===t[0]&&("listUnordered"===t[1].type||"listOrdered"===t[1].type)){if(r){let a=s;for(o=void 0;a--;){const t=e[a];if("lineEnding"===t[1].type||"lineEndingBlank"===t[1].type){if("exit"===t[0])continue;o&&(e[o][1].type="lineEndingBlank",c=!0),t[1].type="lineEnding",o=a}else if("linePrefix"!==t[1].type&&"blockQuotePrefix"!==t[1].type&&"blockQuotePrefixWhitespace"!==t[1].type&&"blockQuoteMarker"!==t[1].type&&"listItemIndent"!==t[1].type)break}i&&(!o||i<o)&&(r._spread=!0),r.end=Object.assign({},o?e[o][1].start:t[1].end),e.splice(o||s,0,["exit",r,t[2]]),s++,n++}if("listItemPrefix"===t[1].type){const o={type:"listItem",_spread:!1,start:Object.assign({},t[1].start),end:void 0};r=o,e.splice(s,0,["enter",o,t[2]]),s++,n++,i=void 0,a=!0}}}return e[t][1]._spread=c,n}function i(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:jI(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),c.call(this,t)}}function c(e,t){const n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw new Error("Cannot close `"+e.type+"` ("+kS({start:e.start,end:e.end})+"): it’s not open");if(r[0].type!==e.type)if(t)t.call(this,e,r[0]);else{(r[1]||zI).call(this,e,r[0])}n.position.end=jI(e.end)}function u(){return YS(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){this.stack[this.stack.length-2].start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){const e=this.resume();this.stack[this.stack.length-1].lang=e}function h(){const e=this.resume();this.stack[this.stack.length-1].meta=e}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const e=this.resume();this.stack[this.stack.length-1].value=e.replace(/(\r?\n|\r)$/g,"")}function b(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=o_(this.sliceSerialize(e)).toLowerCase()}function v(){const e=this.resume();this.stack[this.stack.length-1].title=e}function w(){const e=this.resume();this.stack[this.stack.length-1].url=e}function x(e){const t=this.stack[this.stack.length-1];if(!t.depth){const n=this.sliceSerialize(e).length;t.depth=n}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function k(e){this.stack[this.stack.length-1].depth=61===this.sliceSerialize(e).codePointAt(0)?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function S(e){const t=this.stack[this.stack.length-1].children;let n=t[t.length-1];n&&"text"===n.type||(n=ae(),n.position={start:jI(e.start),end:void 0},t.push(n)),this.stack.push(n)}function _(e){const t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=jI(e.end)}function I(e){const n=this.stack[this.stack.length-1];if(this.data.atHardBreak){return n.children[n.children.length-1].position.end=jI(e.end),void(this.data.atHardBreak=void 0)}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(S.call(this,e),_.call(this,e))}function A(){this.data.atHardBreak=!0}function N(){const e=this.resume();this.stack[this.stack.length-1].value=e}function O(){const e=this.resume();this.stack[this.stack.length-1].value=e}function R(){const e=this.resume();this.stack[this.stack.length-1].value=e}function T(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function M(){const e=this.stack[this.stack.length-1];if(this.data.inReference){const t=this.data.referenceType||"shortcut";e.type+="Reference",e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){const t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=function(e){return e.replace(TI,MI)}(t),n.identifier=o_(t).toLowerCase()}function D(){const e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];if(this.data.inReference=!0,"link"===n.type){const t=e.children;n.children=t}else n.alt=t}function j(){const e=this.resume();this.stack[this.stack.length-1].url=e}function B(){const e=this.resume();this.stack[this.stack.length-1].title=e}function L(){this.data.inReference=void 0}function z(){this.data.referenceType="collapsed"}function F(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=o_(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType="full"}function V(e){this.data.characterReferenceType=e.type}function G(e){const t=this.sliceSerialize(e),n=this.data.characterReferenceType;let r;if(n)r=r_(t,"characterReferenceMarkerNumeric"===n?10:16),this.data.characterReferenceType=void 0;else{r=JS(t)}this.stack[this.stack.length-1].value+=r}function W(e){this.stack.pop().position.end=jI(e.end)}function H(e){_.call(this,e);this.stack[this.stack.length-1].url=this.sliceSerialize(e)}function X(e){_.call(this,e);this.stack[this.stack.length-1].url="mailto:"+this.sliceSerialize(e)}function Y(){return{type:"blockquote",children:[]}}function $(){return{type:"code",lang:null,meta:null,value:""}}function Z(){return{type:"inlineCode",value:""}}function U(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function J(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function q(){return{type:"break"}}function Q(){return{type:"html",value:""}}function ee(){return{type:"image",title:null,url:"",alt:null}}function te(){return{type:"link",title:null,url:"",children:[]}}function ne(e){return{type:"list",ordered:"listOrdered"===e.type,start:null,spread:e._spread,children:[]}}function re(e){return{type:"listItem",spread:e._spread,checked:null,children:[]}}function oe(){return{type:"paragraph",children:[]}}function ie(){return{type:"strong",children:[]}}function ae(){return{type:"text",value:""}}function se(){return{type:"thematicBreak"}}}(n)(function(e){for(;!z_(e););return e}(function(e){const t={constructs:e_([NI,...(e||{}).extensions||[]]),content:n(w_),defined:[],document:n(x_),flow:n(mI),lazy:{},string:n(yI),text:n(bI)};return t;function n(e){return function(n){return OI(t,e,n)}}}(n).document().write(function(){let e,t=1,n="",r=!0;return function(o,i,a){const s=[];let l,c,u,d,f;for(o=n+("string"==typeof o?o.toString():new TextDecoder(i||void 0).decode(o)),u=0,n="",r&&(65279===o.charCodeAt(0)&&u++,r=void 0);u<o.length;){if(RI.lastIndex=u,l=RI.exec(o),d=l&&void 0!==l.index?l.index:o.length,f=o.charCodeAt(d),!l){n=o.slice(u);break}if(10===f&&u===d&&e)s.push(-3),e=void 0;else switch(e&&(s.push(-5),e=void 0),u<d&&(s.push(o.slice(u,d)),t+=d-u),f){case 0:s.push(65533),t++;break;case 9:for(c=4*Math.ceil(t/4),s.push(-2);t++<c;)s.push(-1);break;case 10:s.push(-4),t=1;break;default:e=!0,t=1}u=d+1}return a&&(e&&s.push(-5),n&&s.push(n),s.push(null)),s}}()(e,t,!0))))}function jI(e){return{line:e.line,column:e.column,offset:e.offset}}function BI(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?BI(e,r):LI(e,r)}}function LI(e,t){let n;for(n in t)if(PI.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function zI(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+kS({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+kS({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+kS({start:t.start,end:t.end})+") is still open")}function FI(e){const t=this;t.parser=function(n){return DI(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function VI(e,t){const n=t.referenceType;let r="]";if("collapsed"===n?r+="[]":"full"===n&&(r+="["+(t.label||t.identifier)+"]"),"imageReference"===t.type)return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),i=o[0];i&&"text"===i.type?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&"text"===a.type?a.value+=r:o.push({type:"text",value:r}),o}function GI(e){const t=e.spread;return null==t?e.children.length>1:t}function WI(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(HI(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(HI(t.slice(o),o>0,!1)),i.join("")}function HI(e,t,n){let r=0,o=e.length;if(t){let t=e.codePointAt(r);for(;9===t||32===t;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(o-1);for(;9===t||32===t;)o--,t=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}const XI={blockquote:function(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)},break:function(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:"\n"}]},code:function(e,t){const n=t.value?t.value+"\n":"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o},delete:function(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},emphasis:function(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:function(e,t){const n="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=b_(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);void 0===s?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)},heading:function(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},html:function(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}},imageReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return VI(e,t);const o={src:b_(r.url||""),alt:t.alt};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)},image:function(e,t){const n={src:b_(t.url)};null!==t.alt&&void 0!==t.alt&&(n.alt=t.alt),null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)},inlineCode:function(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)},linkReference:function(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return VI(e,t);const o={href:b_(r.url||"")};null!==r.title&&void 0!==r.title&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)},link:function(e,t){const n={href:b_(t.url)};null!==t.title&&void 0!==t.title&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)},listItem:function(e,t,n){const r=e.all(t),o=n?function(e){let t=!1;if("list"===e.type){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=GI(n[r])}return t}(n):GI(t),i={},a=[];if("boolean"==typeof t.checked){const e=r[0];let n;e&&"element"===e.type&&"p"===e.tagName?n=e:(n={type:"element",tagName:"p",properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:"text",value:" "}),n.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const e=r[s];(o||0!==s||"element"!==e.type||"p"!==e.tagName)&&a.push({type:"text",value:"\n"}),"element"!==e.type||"p"!==e.tagName||o?a.push(e):a.push(...e.children)}const l=r[r.length-1];l&&(o||"element"!==l.type||"p"!==l.tagName)&&a.push({type:"text",value:"\n"});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)},list:function(e,t){const n={},r=e.all(t);let o=-1;for("number"==typeof t.start&&1!==t.start&&(n.start=t.start);++o<r.length;){const e=r[o];if("element"===e.type&&"li"===e.tagName&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)},paragraph:function(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},root:function(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)},strong:function(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},table:function(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const n={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),o.push(n)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},i=xS(t.children[1]),a=wS(t.children[t.children.length-1]);i&&a&&(r.position={start:i,end:a}),o.push(r)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)},tableCell:function(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},tableRow:function(e,t,n){const r=n?n.children:void 0,o=0===(r?r.indexOf(t):1)?"th":"td",i=n&&"table"===n.type?n.align:void 0,a=i?i.length:t.children.length;let s=-1;const l=[];for(;++s<a;){const n=t.children[s],r={},a=i?i[s]:void 0;a&&(r.align=a);let c={type:"element",tagName:o,properties:r,children:[]};n&&(c.children=e.all(n),e.patch(n,c),c=e.applyData(n,c)),l.push(c)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(l,!0)};return e.patch(t,c),e.applyData(t,c)},text:function(e,t){const n={type:"text",value:WI(String(t.value))};return e.patch(t,n),e.applyData(t,n)},thematicBreak:function(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)},toml:YI,yaml:YI,definition:YI,footnoteDefinition:YI};function YI(){}const $I="object"==typeof self?self:globalThis,ZI=e=>((e,t)=>{const n=(t,n)=>(e.set(n,t),t),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case 0:case-1:return n(a,o);case 1:{const e=n([],o);for(const t of a)e.push(r(t));return e}case 2:{const e=n({},o);for(const[t,n]of a)e[r(t)]=r(n);return e}case 3:return n(new Date(a),o);case 4:{const{source:e,flags:t}=a;return n(new RegExp(e,t),o)}case 5:{const e=n(new Map,o);for(const[t,n]of a)e.set(r(t),r(n));return e}case 6:{const e=n(new Set,o);for(const t of a)e.add(r(t));return e}case 7:{const{name:e,message:t}=a;return n(new $I[e](t),o)}case 8:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:e}=new Uint8Array(a);return n(new DataView(e),a)}}return n(new $I[i](a),o)};return r})(new Map,e)(0),UI="",{toString:JI}={},{keys:KI}=Object,qI=e=>{const t=typeof e;if("object"!==t||!e)return[0,t];const n=JI.call(e).slice(8,-1);switch(n){case"Array":return[1,UI];case"Object":return[2,UI];case"Date":return[3,UI];case"RegExp":return[4,UI];case"Map":return[5,UI];case"Set":return[6,UI];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},QI=([e,t])=>0===e&&("function"===t||"symbol"===t),eA=(e,{json:t,lossy:n}={})=>{const r=[];return((e,t,n,r)=>{const o=(e,t)=>{const o=r.push(e)-1;return n.set(t,o),o},i=r=>{if(n.has(r))return n.get(r);let[a,s]=qI(r);switch(a){case 0:{let t=r;switch(s){case"bigint":a=8,t=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);t=null;break;case"undefined":return o([-1],r)}return o([a,t],r)}case 1:{if(s){let e=r;return"DataView"===s?e=new Uint8Array(r.buffer):"ArrayBuffer"===s&&(e=new Uint8Array(r)),o([s,[...e]],r)}const e=[],t=o([a,e],r);for(const t of r)e.push(i(t));return t}case 2:{if(s)switch(s){case"BigInt":return o([s,r.toString()],r);case"Boolean":case"Number":case"String":return o([s,r.valueOf()],r)}if(t&&"toJSON"in r)return i(r.toJSON());const n=[],l=o([a,n],r);for(const t of KI(r))!e&&QI(qI(r[t]))||n.push([i(t),i(r[t])]);return l}case 3:return o([a,r.toISOString()],r);case 4:{const{source:e,flags:t}=r;return o([a,{source:e,flags:t}],r)}case 5:{const t=[],n=o([a,t],r);for(const[n,o]of r)(e||!QI(qI(n))&&!QI(qI(o)))&&t.push([i(n),i(o)]);return n}case 6:{const t=[],n=o([a,t],r);for(const n of r)!e&&QI(qI(n))||t.push(i(n));return n}}const{message:l}=r;return o([a,{name:s,message:l}],r)};return i})(!(t||n),!!t,new Map,r)(e),r};var tA="function"==typeof structuredClone?(e,t)=>t&&("json"in t||"lossy"in t)?ZI(eA(e,t)):structuredClone(e):(e,t)=>ZI(eA(e,t));function nA(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function rA(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}const oA=function(e){if(null==e)return aA;if("function"==typeof e)return iA(e);if("object"==typeof e)return Array.isArray(e)?function(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=oA(e[n]);return iA(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}(e):function(e){const t=e;return iA(n);function n(n){const r=n;let o;for(o in e)if(r[o]!==t[o])return!1;return!0}}(e);if("string"==typeof e)return function(e){return iA(t);function t(t){return t&&t.type===e}}(e);throw new Error("Expected function, string, or object as test")};function iA(e){return function(t,n,r){return Boolean(function(e){return null!==e&&"object"==typeof e&&"type"in e}(t)&&e.call(this,t,"number"==typeof n?n:void 0,r||void 0))}}function aA(){return!0}const sA=[],lA=!0,cA=!1;function uA(e,t,n,r){let o;"function"==typeof t&&"function"!=typeof n?(r=n,n=t):o=t;const i=oA(o),a=r?-1:1;!function e(o,s,l){const c=o&&"object"==typeof o?o:{};if("string"==typeof c.type){const e="string"==typeof c.tagName?c.tagName:"string"==typeof c.name?c.name:void 0;Object.defineProperty(u,"name",{value:"node ("+o.type+(e?"<"+e+">":"")+")"})}return u;function u(){let c,u,d,f=sA;if((!t||i(o,s,l[l.length-1]||void 0))&&(f=function(e){if(Array.isArray(e))return e;if("number"==typeof e)return[lA,e];return null==e?sA:[e]}(n(o,l)),f[0]===cA))return f;if("children"in o&&o.children){const t=o;if(t.children&&"skip"!==f[0])for(u=(r?t.children.length:-1)+a,d=l.concat(t);u>-1&&u<t.children.length;){const n=t.children[u];if(c=e(n,u,d)(),c[0]===cA)return c;u="number"==typeof c[1]?c[1]:u+a}}return f}}(e,void 0,[])()}function dA(e,t,n,r){let o,i,a;"function"==typeof t?(i=void 0,a=t,o=n):(i=t,a=n,o=r),uA(e,i,(function(e,t){const n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return a(e,r,n)}),o)}const fA={}.hasOwnProperty,pA={};function hA(e,t){e.position&&(t.position=function(e){const t=xS(e),n=wS(e);if(t&&n)return{start:t,end:n}}(e))}function mA(e,t){let n=t;if(e&&e.data){const t=e.data.hName,r=e.data.hChildren,o=e.data.hProperties;if("string"==typeof t)if("element"===n.type)n.tagName=t;else{n={type:"element",tagName:t,properties:{},children:"children"in n?n.children:[n]}}"element"===n.type&&o&&Object.assign(n.properties,tA(o)),"children"in n&&n.children&&null!=r&&(n.children=r)}return n}function gA(e,t){const n=t.data||{},r=!("value"in t)||fA.call(n,"hProperties")||fA.call(n,"hChildren")?{type:"element",tagName:"div",properties:{},children:e.all(t)}:{type:"text",value:t.value};return e.patch(t,r),e.applyData(t,r)}function yA(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:"\n"});++r<e.length;)r&&n.push({type:"text",value:"\n"}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:"\n"}),n}function bA(e){let t=0,n=e.charCodeAt(t);for(;9===n||32===n;)t++,n=e.charCodeAt(t);return e.slice(t)}function vA(e,t){const n=function(e,t){const n=t||pA,r=new Map,o=new Map,i=new Map,a={...XI,...n.handlers},s={all:function(e){const t=[];if("children"in e){const n=e.children;let r=-1;for(;++r<n.length;){const o=s.one(n[r],e);if(o){if(r&&"break"===n[r-1].type&&(Array.isArray(o)||"text"!==o.type||(o.value=bA(o.value)),!Array.isArray(o)&&"element"===o.type)){const e=o.children[0];e&&"text"===e.type&&(e.value=bA(e.value))}Array.isArray(o)?t.push(...o):t.push(o)}}}return t},applyData:mA,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:function(e,t){const n=e.type,r=s.handlers[n];if(fA.call(s.handlers,n)&&r)return r(s,e,t);if(s.options.passThrough&&s.options.passThrough.includes(n)){if("children"in e){const{children:t,...n}=e,r=tA(n);return r.children=s.all(e),r}return tA(e)}return(s.options.unknownHandler||gA)(s,e,t)},options:n,patch:hA,wrap:yA};return dA(e,(function(e){if("definition"===e.type||"footnoteDefinition"===e.type){const t="definition"===e.type?r:o,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}})),s}(e,t),r=n.one(e,void 0),o=function(e){const t="string"==typeof e.options.clobberPrefix?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||nA,r=e.options.footnoteBackLabel||rA,o=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const o=e.footnoteById.get(e.footnoteOrder[l]);if(!o)continue;const i=e.all(o),a=String(o.identifier).toUpperCase(),c=b_(a.toLowerCase());let u=0;const d=[],f=e.footnoteCounts.get(a);for(;void 0!==f&&++u<=f;){d.length>0&&d.push({type:"text",value:" "});let e="string"==typeof n?n:n(l,u);"string"==typeof e&&(e={type:"text",value:e}),d.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+c+(u>1?"-"+u:""),dataFootnoteBackref:"",ariaLabel:"string"==typeof r?r:r(l,u),className:["data-footnote-backref"]},children:Array.isArray(e)?e:[e]})}const p=i[i.length-1];if(p&&"element"===p.type&&"p"===p.tagName){const e=p.children[p.children.length-1];e&&"text"===e.type?e.value+=" ":p.children.push({type:"text",value:" "}),p.children.push(...d)}else i.push(...d);const h={type:"element",tagName:"li",properties:{id:t+"fn-"+c},children:e.wrap(i,!0)};e.patch(o,h),s.push(h)}if(0!==s.length)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...tA(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:"\n"},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:"\n"}]}}(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:"\n"},o),i}function wA(e,t){return e&&"run"in e?async function(n,r){const o=vA(n,{file:r,...t});await e.run(o,r)}:function(n,r){return vA(n,{file:r,...e||t})}}function xA(e){if(e)throw e}var EA,kA;var CA=function(){if(kA)return EA;kA=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(e){return"function"==typeof Array.isArray?Array.isArray(e):"[object Array]"===t.call(e)},i=function(n){if(!n||"[object Object]"!==t.call(n))return!1;var r,o=e.call(n,"constructor"),i=n.constructor&&n.constructor.prototype&&e.call(n.constructor.prototype,"isPrototypeOf");if(n.constructor&&!o&&!i)return!1;for(r in n);return void 0===r||e.call(n,r)},a=function(e,t){n&&"__proto__"===t.name?n(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},s=function(t,n){if("__proto__"===n){if(!e.call(t,n))return;if(r)return r(t,n).value}return t[n]};return EA=function e(){var t,n,r,l,c,u,d=arguments[0],f=1,p=arguments.length,h=!1;for("boolean"==typeof d&&(h=d,d=arguments[1]||{},f=2),(null==d||"object"!=typeof d&&"function"!=typeof d)&&(d={});f<p;++f)if(null!=(t=arguments[f]))for(n in t)r=s(d,n),d!==(l=s(t,n))&&(h&&l&&(i(l)||(c=o(l)))?(c?(c=!1,u=r&&o(r)?r:[]):u=r&&i(r)?r:{},a(d,{name:n,newValue:e(h,u,l)})):void 0!==l&&a(d,{name:n,newValue:l}));return d},EA}(),SA=I(CA);function _A(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 IA(){const e=[],t={run:function(...t){let n=-1;const r=t.pop();if("function"!=typeof r)throw new TypeError("Expected function as last argument, not "+r);!function o(i,...a){const s=e[++n];let l=-1;if(i)r(i);else{for(;++l<t.length;)null!==a[l]&&void 0!==a[l]||(a[l]=t[l]);t=a,s?function(e,t){let n;return r;function r(...t){const r=e.length>t.length;let a;r&&t.push(o);try{a=e.apply(this,t)}catch(e){if(r&&n)throw e;return o(e)}r||(a&&a.then&&"function"==typeof a.then?a.then(i,o):a instanceof Error?o(a):i(a))}function o(e,...r){n||(n=!0,t(e,...r))}function i(e){o(null,e)}}(s,o)(...a):r(null,...a)}}(null,...t)},use:function(n){if("function"!=typeof n)throw new TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}};return t}const AA={basename:function(e,t){if(void 0!==t&&"string"!=typeof t)throw new TypeError('"ext" argument must be a string');NA(e);let n,r=0,o=-1,i=e.length;if(void 0===t||0===t.length||t.length>e.length){for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else o<0&&(n=!0,o=i+1);return o<0?"":e.slice(r,o)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(47===e.codePointAt(i)){if(n){r=i+1;break}}else a<0&&(n=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(o=i):(s=-1,o=a));r===o?o=a:o<0&&(o=e.length);return e.slice(r,o)},dirname:function(e){if(NA(e),0===e.length)return".";let t,n=-1,r=e.length;for(;--r;)if(47===e.codePointAt(r)){if(t){n=r;break}}else t||(t=!0);return n<0?47===e.codePointAt(0)?"/":".":1===n&&47===e.codePointAt(0)?"//":e.slice(0,n)},extname:function(e){NA(e);let t,n=e.length,r=-1,o=0,i=-1,a=0;for(;n--;){const s=e.codePointAt(n);if(47!==s)r<0&&(t=!0,r=n+1),46===s?i<0?i=n:1!==a&&(a=1):i>-1&&(a=-1);else if(t){o=n+1;break}}if(i<0||r<0||0===a||1===a&&i===r-1&&i===o+1)return"";return e.slice(i,r)},join:function(...e){let t,n=-1;for(;++n<e.length;)NA(e[n]),e[n]&&(t=void 0===t?e[n]:t+"/"+e[n]);return void 0===t?".":function(e){NA(e);const t=47===e.codePointAt(0);let n=function(e,t){let n,r,o="",i=0,a=-1,s=0,l=-1;for(;++l<=e.length;){if(l<e.length)n=e.codePointAt(l);else{if(47===n)break;n=47}if(47===n){if(a===l-1||1===s);else if(a!==l-1&&2===s){if(o.length<2||2!==i||46!==o.codePointAt(o.length-1)||46!==o.codePointAt(o.length-2))if(o.length>2){if(r=o.lastIndexOf("/"),r!==o.length-1){r<0?(o="",i=0):(o=o.slice(0,r),i=o.length-1-o.lastIndexOf("/")),a=l,s=0;continue}}else if(o.length>0){o="",i=0,a=l,s=0;continue}t&&(o=o.length>0?o+"/..":"..",i=2)}else o.length>0?o+="/"+e.slice(a+1,l):o=e.slice(a+1,l),i=l-a-1;a=l,s=0}else 46===n&&s>-1?s++:s=-1}return o}(e,!t);0!==n.length||t||(n=".");n.length>0&&47===e.codePointAt(e.length-1)&&(n+="/");return t?"/"+n:n}(t)},sep:"/"};function NA(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const OA={cwd:function(){return"/"}};function RA(e){return Boolean(null!==e&&"object"==typeof e&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&void 0===e.auth)}function TA(e){if("string"==typeof e)e=new URL(e);else if(!RA(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if("file:"!==e.protocol){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return function(e){if(""!==e.hostname){const e=new TypeError('File URL host must be "localhost" or empty on darwin');throw e.code="ERR_INVALID_FILE_URL_HOST",e}const t=e.pathname;let n=-1;for(;++n<t.length;)if(37===t.codePointAt(n)&&50===t.codePointAt(n+1)){const e=t.codePointAt(n+2);if(70===e||102===e){const e=new TypeError("File URL path must not include encoded / characters");throw e.code="ERR_INVALID_FILE_URL_PATH",e}}return decodeURIComponent(t)}(e)}const MA=["history","path","basename","stem","extname","dirname"];class PA{constructor(e){let t;t=e?RA(e)?{path:e}:"string"==typeof e||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(e)?{value:e}:e:{},this.cwd="cwd"in t?"":OA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n,r=-1;for(;++r<MA.length;){const e=MA[r];e in t&&void 0!==t[e]&&null!==t[e]&&(this[e]="history"===e?[...t[e]]:t[e])}for(n in t)MA.includes(n)||(this[n]=t[n])}get basename(){return"string"==typeof this.path?AA.basename(this.path):void 0}set basename(e){jA(e,"basename"),DA(e,"basename"),this.path=AA.join(this.dirname||"",e)}get dirname(){return"string"==typeof this.path?AA.dirname(this.path):void 0}set dirname(e){BA(this.basename,"dirname"),this.path=AA.join(e||"",this.basename)}get extname(){return"string"==typeof this.path?AA.extname(this.path):void 0}set extname(e){if(DA(e,"extname"),BA(this.dirname,"extname"),e){if(46!==e.codePointAt(0))throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=AA.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){RA(e)&&(e=TA(e)),jA(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return"string"==typeof this.path?AA.basename(this.path,this.extname):void 0}set stem(e){jA(e,"stem"),DA(e,"stem"),this.path=AA.join(this.dirname||"",e+(this.extname||""))}fail(e,t,n){const r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){const r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){const r=new IS(e,t,n);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){if(void 0===this.value)return"";if("string"==typeof this.value)return this.value;return new TextDecoder(e||void 0).decode(this.value)}}function DA(e,t){if(e&&e.includes(AA.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+AA.sep+"`")}function jA(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function BA(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}const LA=function(e){const t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r},zA={}.hasOwnProperty;class FA extends LA{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=IA()}copy(){const e=new FA;let t=-1;for(;++t<this.attachers.length;){const n=this.attachers[t];e.use(...n)}return e.data(SA(!0,{},this.namespace)),e}data(e,t){return"string"==typeof e?2===arguments.length?(HA("data",this.frozen),this.namespace[e]=t,this):zA.call(this.namespace,e)&&this.namespace[e]||void 0:e?(HA("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...n]=this.attachers[this.freezeIndex];if(!1===n[0])continue;!0===n[0]&&(n[0]=void 0);const r=t.call(e,...n);"function"==typeof r&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=$A(e),n=this.parser||this.Parser;return GA("parse",n),n(String(t),t)}process(e,t){const n=this;return this.freeze(),GA("process",this.parser||this.Parser),WA("process",this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,o){const i=$A(e),a=n.parse(i);function s(e,n){e||!n?o(e):r?r(n):t(void 0,n)}n.run(a,i,(function(e,t,r){if(e||!t||!r)return s(e);const o=t,i=n.stringify(o,r);var a;"string"==typeof(a=i)||function(e){return Boolean(e&&"object"==typeof e&&"byteLength"in e&&"byteOffset"in e)}(a)?r.value=i:r.result=i,s(e,r)}))}}processSync(e){let t,n=!1;return this.freeze(),GA("processSync",this.parser||this.Parser),WA("processSync",this.compiler||this.Compiler),this.process(e,(function(e,r){n=!0,xA(e),t=r})),YA("processSync","process",n),t}run(e,t,n){XA(e),this.freeze();const r=this.transformers;return n||"function"!=typeof t||(n=t,t=void 0),n?o(void 0,n):new Promise(o);function o(o,i){const a=$A(t);r.run(e,a,(function(t,r,a){const s=r||e;t?i(t):o?o(s):n(void 0,s,a)}))}}runSync(e,t){let n,r=!1;return this.run(e,t,(function(e,t){xA(e),n=t,r=!0})),YA("runSync","run",r),n}stringify(e,t){this.freeze();const n=$A(t),r=this.compiler||this.Compiler;return WA("stringify",r),XA(e),r(e,n)}use(e,...t){const n=this.attachers,r=this.namespace;if(HA("use",this.frozen),null==e);else if("function"==typeof e)s(e,t);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");Array.isArray(e)?a(e):i(e)}return this;function o(e){if("function"==typeof e)s(e,[]);else{if("object"!=typeof e)throw new TypeError("Expected usable value, not `"+e+"`");if(Array.isArray(e)){const[t,...n]=e;s(t,n)}else i(e)}}function i(e){if(!("plugins"in e)&&!("settings"in e))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(e.plugins),e.settings&&(r.settings=SA(!0,r.settings,e.settings))}function a(e){let t=-1;if(null==e);else{if(!Array.isArray(e))throw new TypeError("Expected a list of plugins, not `"+e+"`");for(;++t<e.length;){o(e[t])}}}function s(e,t){let r=-1,o=-1;for(;++r<n.length;)if(n[r][0]===e){o=r;break}if(-1===o)n.push([e,...t]);else if(t.length>0){let[r,...i]=t;const a=n[o][1];_A(a)&&_A(r)&&(r=SA(!0,a,r)),n[o]=[e,r,...i]}}}}const VA=(new FA).freeze();function GA(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `parser`")}function WA(e,t){if("function"!=typeof t)throw new TypeError("Cannot `"+e+"` without `compiler`")}function HA(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function XA(e){if(!_A(e)||"string"!=typeof e.type)throw new TypeError("Expected node, got `"+e+"`")}function YA(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $A(e){return function(e){return Boolean(e&&"object"==typeof e&&"message"in e&&"messages"in e)}(e)?e:new PA(e)}const ZA=[],UA={allowDangerousHtml:!0},JA=/^(https?|ircs?|mailto|xmpp)$/i,KA=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function qA(e){const t=function(e){const t=e.rehypePlugins||ZA,n=e.remarkPlugins||ZA,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...UA}:UA,o=VA().use(FI).use(n).use(wA,r).use(t);return o}(e),n=function(e){const t=e.children||"",n=new PA;"string"==typeof t&&(n.value=t);return n}(e);return function(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,i=t.disallowedElements,a=t.skipHtml,s=t.unwrapDisallowed,l=t.urlTransform||QA;for(const e of KA)Object.hasOwn(t,e.from)&&(e.from,e.to&&e.to,e.id);t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:"root"===e.type?e.children:[e]});return dA(e,c),PS(e,{Fragment:Lf.Fragment,components:o,ignoreInvalidStyle:!0,jsx:Lf.jsx,jsxs:Lf.jsxs,passKeys:!0,passNode:!0});function c(e,t,o){if("raw"===e.type&&o&&"number"==typeof t)return a?o.children.splice(t,1):o.children[t]={type:"text",value:e.value},t;if("element"===e.type){let t;for(t in HS)if(Object.hasOwn(HS,t)&&Object.hasOwn(e.properties,t)){const n=e.properties[t],r=HS[t];(null===r||r.includes(e.tagName))&&(e.properties[t]=l(String(n||""),t,e))}}if("element"===e.type){let a=n?!n.includes(e.tagName):!!i&&i.includes(e.tagName);if(!a&&r&&"number"==typeof t&&(a=!r(e,t,o)),a&&o&&"number"==typeof t)return s&&e.children?o.children.splice(t,1,...e.children):o.children.splice(t,1),t}}}(t.runSync(t.parse(n),n),e)}function QA(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return-1===t||-1!==o&&t>o||-1!==n&&t>n||-1!==r&&t>r||JA.test(e.slice(0,t))?e:""}function eN(e,t){const n=String(e);if("string"!=typeof t)throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;-1!==o;)r++,o=n.indexOf(t,o+t.length);return r}function tN(e,t,n){const r=oA((n||{}).ignore||[]),o=function(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const e=n[r];t.push([nN(e[0]),rN(e[1])])}return t}(t);let i=-1;for(;++i<o.length;)uA(e,"text",a);function a(e,t){let n,a=-1;for(;++a<t.length;){const e=t[a],o=n?n.children:void 0;if(r(e,o?o.indexOf(e):void 0,n))return;n=e}if(n)return function(e,t){const n=t[t.length-1],r=o[i][0],a=o[i][1];let s=0;const l=n.children.indexOf(e);let c=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){const n=d.index,o={index:d.index,input:d.input,stack:[...t,e]};let i=a(...d,o);if("string"==typeof i&&(i=i.length>0?{type:"text",value:i}:void 0),!1===i?r.lastIndex=n+1:(s!==n&&u.push({type:"text",value:e.value.slice(s,n)}),Array.isArray(i)?u.push(...i):i&&u.push(i),s=n+d[0].length,c=!0),!r.global)break;d=r.exec(e.value)}c?(s<e.value.length&&u.push({type:"text",value:e.value.slice(s)}),n.children.splice(l,1,...u)):u=[e];return l+u.length}(e,t)}}function nN(e){return"string"==typeof e?new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}(e),"g"):e}function rN(e){return"function"==typeof e?e:function(){return e}}const oN="phrasing",iN=["autolink","link","image","label"];function aN(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function sN(e){this.config.enter.autolinkProtocol.call(this,e)}function lN(e){this.config.exit.autolinkProtocol.call(this,e)}function cN(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function uN(e){this.config.exit.autolinkEmail.call(this,e)}function dN(e){this.exit(e)}function fN(e){tN(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,pN],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,hN]],{ignore:["link","linkReference"]})}function pN(e,t,n,r,o){let i="";if(!mN(o))return!1;if(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!function(e){const t=e.split(".");if(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))return!1;return!0}(n))return!1;const a=function(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=eN(e,"(");let i=eN(e,")");for(;-1!==r&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function hN(e,t,n,r){return!(!mN(r,!0)||/[-\d_]$/.test(n))&&{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function mN(e,t){const n=e.input.charCodeAt(e.index-1);return(0===e.index||g_(n)||m_(n))&&(!t||47!==n)}function gN(){this.buffer()}function yN(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function bN(){this.buffer()}function vN(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function wN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=o_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xN(e){this.exit(e)}function EN(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=o_(this.sliceSerialize(e)).toLowerCase(),n.label=t}function kN(e){this.exit(e)}function CN(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{after:"]",before:i})),s(),a(),i+=o.move("]"),i}function SN(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:function(e,n,r,o){const i=r.createTracker(o);let a=i.move("[^");const s=r.enter("footnoteDefinition"),l=r.enter("label");a+=i.move(r.safe(r.associationId(e),{before:a,after:"]"})),l(),a+=i.move("]:"),e.children&&e.children.length>0&&(i.shift(4),a+=i.move((t?"\n":" ")+r.indentLines(r.containerFlow(e,i.current()),t?IN:_N)));return s(),a},footnoteReference:CN},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]}}function _N(e,t,n){return 0===t?e:IN(e,t,n)}function IN(e,t,n){return(n?"":" ")+e}CN.peek=function(){return"["};const AN=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];function NN(e){this.enter({type:"delete",children:[]},e)}function ON(e){this.exit(e)}function RN(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function TN(e){return e.length}function MN(e){const t="string"==typeof e?e.codePointAt(0):0;return 67===t||99===t?99:76===t||108===t?108:82===t||114===t?114:0}function PN(e,t,n){return">"+(n?"":" ")+e}function DN(e,t,n){if("string"==typeof t&&(t=[t]),!t||0===t.length)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function jN(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if("\n"===n.unsafe[o].character&&(i=n.stack,a=n.unsafe[o],DN(i,a.inConstruct,!0)&&!DN(i,a.notInConstruct,!1)))return/[ \t]/.test(r.before)?"":" ";var i,a;return"\\\n"}function BN(e,t,n){return(n?"":" ")+e}function LN(e){const t=e.options.quote||'"';if('"'!==t&&"'"!==t)throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function zN(e){return"&#x"+e.toString(16).toUpperCase()+";"}function FN(e,t,n){const r=k_(e),o=k_(t);return void 0===r?void 0===o?"_"===n?{inside:!0,outside:!0}:{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!0}:1===r?void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!0}:{inside:!1,outside:!1}:void 0===o?{inside:!1,outside:!1}:1===o?{inside:!0,outside:!1}:{inside:!1,outside:!1}}function VN(e,t,n,r){const o=function(e){const t=e.options.emphasis||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}(n),i=n.enter("emphasis"),a=n.createTracker(r),s=a.move(o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=FN(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=zN(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=FN(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+zN(d));const p=a.move(o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}function GN(e){return e.value||""}function WN(e,t,n,r){const o=LN(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function HN(e,t,n,r){const o=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function XN(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const e=n.unsafe[i],t=n.compilePattern(e);let o;if(e.atBreak)for(;o=t.exec(r);){let e=o.index;10===r.charCodeAt(e)&&13===r.charCodeAt(e-1)&&e--,r=r.slice(0,e)+" "+r.slice(o.index+1)}}return o+r+o}function YN(e,t){const n=YS(e);return Boolean(!t.options.resourceLink&&e.url&&!e.title&&e.children&&1===e.children.length&&"text"===e.children[0].type&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}function $N(e,t,n,r){const o=LN(n),i='"'===o?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(YN(e,n)){const t=n.stack;n.stack=[],s=n.enter("autolink");let r=a.move("<");return r+=a.move(n.containerPhrasing(e,{before:r,after:">",...a.current()})),r+=a.move(">"),s(),n.stack=t,r}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function ZN(e,t,n,r){const o=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const u=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),"full"!==o&&c&&c===d?"shortcut"===o?l=l.slice(0,-1):l+=s.move("]"):l+=s.move(d+"]"),l}function UN(e){const t=e.options.bullet||"*";if("*"!==t&&"+"!==t&&"-"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function JN(e){const t=e.options.rule||"*";if("*"!==t&&"-"!==t&&"_"!==t)throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}RN.peek=function(){return"~"},VN.peek=function(e,t,n){return n.options.emphasis||"*"},GN.peek=function(){return"<"},WN.peek=function(){return"!"},HN.peek=function(){return"!"},XN.peek=function(){return"`"},$N.peek=function(e,t,n){return YN(e,n)?"<":"["},ZN.peek=function(){return"["};const KN=oA(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qN(e,t,n,r){const o=function(e){const t=e.options.strong||"*";if("*"!==t&&"_"!==t)throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}(n),i=n.enter("strong"),a=n.createTracker(r),s=a.move(o+o);let l=a.move(n.containerPhrasing(e,{after:o,before:s,...a.current()}));const c=l.charCodeAt(0),u=FN(r.before.charCodeAt(r.before.length-1),c,o);u.inside&&(l=zN(c)+l.slice(1));const d=l.charCodeAt(l.length-1),f=FN(r.after.charCodeAt(0),d,o);f.inside&&(l=l.slice(0,-1)+zN(d));const p=a.move(o+o);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+l+p}qN.peek=function(e,t,n){return n.options.strong||"*"};const QN={blockquote:function(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),PN);return o(),a},break:jN,code:function(e,t,n,r){const o=function(e){const t=e.options.fence||"`";if("`"!==t&&"~"!==t)throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}(n),i=e.value||"",a="`"===o?"GraveAccent":"Tilde";if(function(e,t){return Boolean(!1===t.options.fences&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}(e,n)){const e=n.enter("codeIndented"),t=n.indentLines(i,BN);return e(),t}const s=n.createTracker(r),l=o.repeat(Math.max(function(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if("string"!=typeof t)throw new TypeError("Expected substring");for(;-1!==r;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const t=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){const t=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:"\n",encode:["`"],...s.current()})),t()}return u+=s.move("\n"),i&&(u+=s.move(i+"\n")),u+=s.move(l),c(),u},definition:function(e,t,n,r){const o=LN(n),i='"'===o?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":"\n",...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c},emphasis:VN,hardBreak:jN,heading:function(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(function(e,t){let n=!1;return dA(e,(function(e){if("value"in e&&/\r?\n|\r/.test(e.value)||"break"===e.type)return n=!0,cA})),Boolean((!e.depth||e.depth<3)&&YS(e)&&(t.options.setext||n))}(e,n)){const t=n.enter("headingSetext"),r=n.enter("phrasing"),a=n.containerPhrasing(e,{...i.current(),before:"\n",after:"\n"});return r(),t(),a+"\n"+(1===o?"=":"-").repeat(a.length-(Math.max(a.lastIndexOf("\r"),a.lastIndexOf("\n"))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:"\n",...i.current()});return/^[\t ]/.test(c)&&(c=zN(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c},html:GN,image:WN,imageReference:HN,inlineCode:XN,link:$N,linkReference:ZN,list:function(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?function(e){const t=e.options.bulletOrdered||".";if("."!==t&&")"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}(n):UN(n);const s=e.ordered?"."===a?")":".":function(e){const t=UN(e),n=e.options.bulletOther;if(!n)return"*"===t?"-":"*";if("*"!==n&&"+"!==n&&"-"!==n)throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}(n);let l=!(!t||!n.bulletLastUsed)&&a===n.bulletLastUsed;if(!e.ordered){const t=e.children?e.children[0]:void 0;if("*"!==a&&"-"!==a||!t||t.children&&t.children[0]||"list"!==n.stack[n.stack.length-1]||"listItem"!==n.stack[n.stack.length-2]||"list"!==n.stack[n.stack.length-3]||"listItem"!==n.stack[n.stack.length-4]||0!==n.indexStack[n.indexStack.length-1]||0!==n.indexStack[n.indexStack.length-2]||0!==n.indexStack[n.indexStack.length-3]||(l=!0),JN(n)===a&&t){let t=-1;for(;++t<e.children.length;){const n=e.children[t];if(n&&"listItem"===n.type&&n.children&&n.children[0]&&"thematicBreak"===n.children[0].type){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c},listItem:function(e,t,n,r){const o=function(e){const t=e.options.listItemIndent||"one";if("tab"!==t&&"one"!==t&&"mixed"!==t)throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}(n);let i=n.bulletCurrent||UN(n);t&&"list"===t.type&&t.ordered&&(i=("number"==typeof t.start&&t.start>-1?t.start:1)+(!1===n.options.incrementListMarker?0:t.children.indexOf(e))+i);let a=i.length+1;("tab"===o||"mixed"===o&&(t&&"list"===t.type&&t.spread||e.spread))&&(a=4*Math.ceil(a/4));const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),(function(e,t,n){if(t)return(n?"":" ".repeat(a))+e;return(n?i:i+" ".repeat(a-i.length))+e}));return l(),c},paragraph:function(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a},root:function(e,t,n,r){return(e.children.some((function(e){return KN(e)}))?n.containerPhrasing:n.containerFlow).call(n,e,r)},strong:qN,text:function(e,t,n,r){return n.safe(e.value,r)},thematicBreak:function(e,t,n){const r=(JN(n)+(n.options.ruleSpaces?" ":"")).repeat(function(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}(n));return n.options.ruleSpaces?r.slice(0,-1):r}};function eO(e){const t=e._align;this.enter({type:"table",align:t.map((function(e){return"none"===e?null:e})),children:[]},e),this.data.inTable=!0}function tO(e){this.exit(e),this.data.inTable=void 0}function nO(e){this.enter({type:"tableRow",children:[]},e)}function rO(e){this.exit(e)}function oO(e){this.enter({type:"tableCell",children:[]},e)}function iO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,aO));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function aO(e,t){return"|"===t?t:e}function sO(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:"\n",inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[\t :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:function(e,t,n){let r=QN.inlineCode(e,t,n);n.stack.includes("tableCell")&&(r=r.replace(/\|/g,"\\$&"));return r},table:function(e,t,n,r){return s(function(e,t,n){const r=e.children;let o=-1;const i=[],a=t.enter("table");for(;++o<r.length;)i[o]=l(r[o],t,n);return a(),i}(e,n,r),e.align)},tableCell:a,tableRow:function(e,t,n,r){const o=l(e,n,r),i=s([o]);return i.slice(0,i.indexOf("\n"))}}};function a(e,t,n,r){const o=n.enter("tableCell"),a=n.enter("phrasing"),s=n.containerPhrasing(e,{...r,before:i,after:i});return a(),o(),s}function s(e,t){return function(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||TN,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const t=[],r=[];let i=-1;for(e[u].length>c&&(c=e[u].length);++i<e[u].length;){const a=null==(d=e[u][i])?"":String(d);if(!1!==n.alignDelimiters){const e=o(a);r[i]=e,(void 0===l[i]||e>l[i])&&(l[i]=e)}t.push(a)}a[u]=t,s[u]=r}var d;let f=-1;if("object"==typeof r&&"length"in r)for(;++f<c;)i[f]=MN(r[f]);else{const e=MN(r);for(;++f<c;)i[f]=e}f=-1;const p=[],h=[];for(;++f<c;){const e=i[f];let t="",r="";99===e?(t=":",r=":"):108===e?t=":":114===e&&(r=":");let o=!1===n.alignDelimiters?1:Math.max(1,l[f]-t.length-r.length);const a=t+"-".repeat(o)+r;!1!==n.alignDelimiters&&(o=t.length+o+r.length,o>l[f]&&(l[f]=o),h[f]=o),p[f]=a}a.splice(1,0,p),s.splice(1,0,h),u=-1;const m=[];for(;++u<a.length;){const e=a[u],t=s[u];f=-1;const r=[];for(;++f<c;){const o=e[f]||"";let a="",s="";if(!1!==n.alignDelimiters){const e=l[f]-(t[f]||0),n=i[f];114===n?a=" ".repeat(e):99===n?e%2?(a=" ".repeat(e/2+.5),s=" ".repeat(e/2-.5)):(a=" ".repeat(e/2),s=a):s=" ".repeat(e)}!1===n.delimiterStart||f||r.push("|"),!1===n.padding||!1===n.alignDelimiters&&""===o||!1===n.delimiterStart&&!f||r.push(" "),!1!==n.alignDelimiters&&r.push(a),r.push(o),!1!==n.alignDelimiters&&r.push(s),!1!==n.padding&&r.push(" "),!1===n.delimiterEnd&&f===c-1||r.push("|")}m.push(!1===n.delimiterEnd?r.join("").replace(/ +$/,""):r.join(""))}return m.join("\n")}(e,{align:t,alignDelimiters:r,padding:n,stringLength:o})}function l(e,t,n){const r=e.children;let o=-1;const i=[],s=t.enter("tableRow");for(;++o<r.length;)i[o]=a(r[o],0,t,n);return s(),i}}function lO(e){const t=this.stack[this.stack.length-2];t.type,t.checked="taskListCheckValueChecked"===e.type}function cO(e){const t=this.stack[this.stack.length-2];if(t&&"listItem"===t.type&&"boolean"==typeof t.checked){const e=this.stack[this.stack.length-1];e.type;const n=e.children[0];if(n&&"text"===n.type){const r=t.children;let o,i=-1;for(;++i<r.length;){const e=r[i];if("paragraph"===e.type){o=e;break}}o===e&&(n.value=n.value.slice(1),0===n.value.length?e.children.shift():e.position&&n.position&&"number"==typeof n.position.start.offset&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function uO(e,t,n,r){const o=e.children[0],i="boolean"==typeof e.checked&&o&&"paragraph"===o.type,a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=QN.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,(function(e){return e+a}))),l}const dO={tokenize:function(e,t,n){let r=0;return function t(i){if((87===i||119===i)&&r<3)return r++,e.consume(i),t;if(46===i&&3===r)return e.consume(i),o;return n(i)};function o(e){return null===e?n(e):t(e)}},partial:!0},fO={tokenize:function(e,t,n){let r,o,i;return a;function a(t){return 46===t||95===t?e.check(hO,l,s)(t):null===t||p_(t)||g_(t)||45!==t&&m_(t)?l(t):(i=!0,e.consume(t),a)}function s(t){return 95===t?r=!0:(o=r,r=void 0),e.consume(t),a}function l(e){return o||r||!i?n(e):t(e)}},partial:!0},pO={tokenize:function(e,t){let n=0,r=0;return o;function o(a){return 40===a?(n++,e.consume(a),o):41===a&&r<n?i(a):33===a||34===a||38===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||60===a||63===a||93===a||95===a||126===a?e.check(hO,t,i)(a):null===a||p_(a)||g_(a)?t(a):(e.consume(a),o)}function i(t){return 41===t&&r++,e.consume(t),o}},partial:!0},hO={tokenize:function(e,t,n){return r;function r(a){return 33===a||34===a||39===a||41===a||42===a||44===a||46===a||58===a||59===a||63===a||95===a||126===a?(e.consume(a),r):38===a?(e.consume(a),i):93===a?(e.consume(a),o):60===a||null===a||p_(a)||g_(a)?t(a):n(a)}function o(e){return null===e||40===e||91===e||p_(e)||g_(e)?t(e):r(e)}function i(e){return i_(e)?a(e):n(e)}function a(t){return 59===t?(e.consume(t),r):i_(t)?(e.consume(t),a):n(t)}},partial:!0},mO={tokenize:function(e,t,n){return function(t){return e.consume(t),r};function r(e){return a_(e)?n(e):t(e)}},partial:!0},gO={name:"wwwAutolink",tokenize:function(e,t,n){const r=this;return function(t){if(87!==t&&119!==t||!xO.call(r,r.previous)||SO(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(dO,e.attempt(fO,e.attempt(pO,o),n),n)(t)};function o(n){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(n)}},previous:xO},yO={name:"protocolAutolink",tokenize:function(e,t,n){const r=this;let o="",i=!1;return function(t){if((72===t||104===t)&&EO.call(r,r.previous)&&!SO(r.events))return e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(t),e.consume(t),a;return n(t)};function a(t){if(i_(t)&&o.length<5)return o+=String.fromCodePoint(t),e.consume(t),a;if(58===t){const n=o.toLowerCase();if("http"===n||"https"===n)return e.consume(t),s}return n(t)}function s(t){return 47===t?(e.consume(t),i?l:(i=!0,s)):n(t)}function l(t){return null===t||l_(t)||p_(t)||g_(t)||m_(t)?n(t):e.attempt(fO,e.attempt(pO,c),n)(t)}function c(n){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(n)}},previous:EO},bO={name:"emailAutolink",tokenize:function(e,t,n){const r=this;let o,i;return function(t){if(!CO(t)||!kO.call(r,r.previous)||SO(r.events))return n(t);return e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),a(t)};function a(t){return CO(t)?(e.consume(t),a):64===t?(e.consume(t),s):n(t)}function s(t){return 46===t?e.check(mO,c,l)(t):45===t||95===t||a_(t)?(i=!0,e.consume(t),s):c(t)}function l(t){return e.consume(t),o=!0,s}function c(a){return i&&o&&i_(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(a)):n(a)}},previous:kO},vO={};let wO=48;for(;wO<123;)vO[wO]=bO,wO++,58===wO?wO=65:91===wO&&(wO=97);function xO(e){return null===e||40===e||42===e||95===e||91===e||93===e||126===e||p_(e)}function EO(e){return!i_(e)}function kO(e){return!(47===e||CO(e))}function CO(e){return 43===e||45===e||46===e||95===e||a_(e)}function SO(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if(("labelLink"===r.type||"labelImage"===r.type)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}vO[43]=bO,vO[45]=bO,vO[46]=bO,vO[95]=bO,vO[72]=[bO,yO],vO[104]=[bO,yO],vO[87]=[bO,gO],vO[119]=[bO,gO];const _O={tokenize:function(e,t,n){const r=this;return v_(e,(function(e){const o=r.events[r.events.length-1];return o&&"gfmFootnoteDefinitionIndent"===o[1].type&&4===o[2].sliceSerialize(o[1],!0).length?t(e):n(e)}),"gfmFootnoteDefinitionIndent",5)},partial:!0};function IO(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const e=r.events[o][1];if("labelImage"===e.type){a=e;break}if("gfmFootnoteCall"===e.type||"labelLink"===e.type||"label"===e.type||"image"===e.type||"link"===e.type)break}return function(o){if(!a||!a._balanced)return n(o);const s=o_(r.sliceSerialize({start:a.end,end:r.now()}));if(94!==s.codePointAt(0)||!i.includes(s.slice(1)))return n(o);return e.enter("gfmFootnoteCallLabelMarker"),e.consume(o),e.exit("gfmFootnoteCallLabelMarker"),t(o)}}function AO(e,t){let n=e.length;for(;n--;)if("labelImage"===e[n][1].type&&"enter"===e[n][0]){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function NO(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0;return function(t){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(t),e.exit("gfmFootnoteCallLabelMarker"),s};function s(t){return 94!==t?n(t):(e.enter("gfmFootnoteCallMarker"),e.consume(t),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(s){if(a>999||93===s&&!i||null===s||91===s||p_(s))return n(s);if(93===s){e.exit("chunkString");const i=e.exit("gfmFootnoteCallString");return o.includes(o_(r.sliceSerialize(i)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(s),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(s)}return p_(s)||(i=!0),a++,e.consume(s),92===s?c:l}function c(t){return 91===t||92===t||93===t?(e.consume(t),a++,l):l(t)}}function OO(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a,s=0;return function(t){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),l};function l(t){return 94===t?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",c):n(t)}function c(t){if(s>999||93===t&&!a||null===t||91===t||p_(t))return n(t);if(93===t){e.exit("chunkString");const n=e.exit("gfmFootnoteDefinitionLabelString");return i=o_(r.sliceSerialize(n)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(t),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return p_(t)||(a=!0),s++,e.consume(t),92===t?u:c}function u(t){return 91===t||92===t||93===t?(e.consume(t),s++,c):c(t)}function d(t){return 58===t?(e.enter("definitionMarker"),e.consume(t),e.exit("definitionMarker"),o.includes(i)||o.push(i),v_(e,f,"gfmFootnoteDefinitionWhitespace")):n(t)}function f(e){return t(e)}}function RO(e,t,n){return e.check(A_,t,e.attempt(_O,t,n))}function TO(e){e.exit("gfmFootnoteDefinition")}function MO(e){let t=(e||{}).singleTilde;const n={name:"strikethrough",tokenize:function(e,n,r){const o=this.previous,i=this.events;let a=0;return function(t){if(126===o&&"characterEscape"!==i[i.length-1][1].type)return r(t);return e.enter("strikethroughSequenceTemporary"),s(t)};function s(i){const l=k_(o);if(126===i)return a>1?r(i):(e.consume(i),a++,s);if(a<2&&!t)return r(i);const c=e.exit("strikethroughSequenceTemporary"),u=k_(i);return c._open=!u||2===u&&Boolean(l),c._close=!l||2===l&&Boolean(u),n(i)}},resolveAll:function(e,t){let n=-1;for(;++n<e.length;)if("enter"===e[n][0]&&"strikethroughSequenceTemporary"===e[n][1].type&&e[n][1]._close){let r=n;for(;r--;)if("exit"===e[r][0]&&"strikethroughSequenceTemporary"===e[r][1].type&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset==e[r][1].end.offset-e[r][1].start.offset){e[n][1].type="strikethroughSequence",e[r][1].type="strikethroughSequence";const o={type:"strikethrough",start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},i={type:"strikethroughText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a=[["enter",o,t],["enter",e[r][1],t],["exit",e[r][1],t],["enter",i,t]],s=t.parser.constructs.insideSpan.null;s&&KS(a,a.length,0,C_(s,e.slice(r+1,n),t)),KS(a,a.length,0,[["exit",i,t],["enter",e[n][1],t],["exit",e[n][1],t],["exit",o,t]]),KS(e,r-1,n-r+3,a),n=r+a.length-2;break}}n=-1;for(;++n<e.length;)"strikethroughSequenceTemporary"===e[n][1].type&&(e[n][1].type="data");return e}};return null==t&&(t=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}}}class PO{constructor(){this.map=[]}add(e,t,n){!function(e,t,n,r){let o=0;if(0===n&&0===r.length)return;for(;o<e.map.length;){if(e.map[o][0]===t)return e.map[o][1]+=n,void e.map[o][2].push(...r);o+=1}e.map.push([t,n,r])}(this,e,t,n)}consume(e){if(this.map.sort((function(e,t){return e[0]-t[0]})),0===this.map.length)return;let t=this.map.length;const n=[];for(;t>0;)t-=1,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(const t of r)e.push(t);r=n.pop()}this.map.length=0}}function DO(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if("enter"===o[0])"tableContent"===o[1].type&&r.push("tableDelimiterMarker"===e[t+1][1].type?"left":"none");else if("tableContent"===o[1].type){if("tableDelimiterMarker"===e[t-1][1].type){const e=r.length-1;r[e]="left"===r[e]?"center":"right"}}else if("tableDelimiterRow"===o[1].type)break}else"enter"===o[0]&&"tableDelimiterRow"===o[1].type&&(n=!0);t+=1}return r}function jO(e,t,n){const r=this;let o,i=0,a=0;return function(e){let t=r.events.length-1;for(;t>-1;){const e=r.events[t][1].type;if("lineEnding"!==e&&"linePrefix"!==e)break;t--}const o=t>-1?r.events[t][1].type:null,i="tableHead"===o||"tableRow"===o?w:s;if(i===w&&r.parser.lazy[r.now().line])return n(e);return i(e)};function s(t){return e.enter("tableHead"),e.enter("tableRow"),function(e){if(124===e)return l(e);return o=!0,a+=1,l(e)}(t)}function l(t){return null===t?n(t):f_(t)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(t),e.exit("lineEnding"),d):n(t):h_(t)?v_(e,l,"whitespace")(t):(a+=1,o&&(o=!1,i+=1),124===t?(e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),o=!0,l):(e.enter("data"),c(t)))}function c(t){return null===t||124===t||p_(t)?(e.exit("data"),l(t)):(e.consume(t),92===t?u:c)}function u(t){return 92===t||124===t?(e.consume(t),c):c(t)}function d(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter("tableDelimiterRow"),o=!1,h_(t)?v_(e,f,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(t):f(t))}function f(t){return 45===t||58===t?h(t):124===t?(o=!0,e.enter("tableCellDivider"),e.consume(t),e.exit("tableCellDivider"),p):v(t)}function p(t){return h_(t)?v_(e,h,"whitespace")(t):h(t)}function h(t){return 58===t?(a+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),m):45===t?(a+=1,m(t)):null===t||f_(t)?b(t):v(t)}function m(t){return 45===t?(e.enter("tableDelimiterFiller"),g(t)):v(t)}function g(t){return 45===t?(e.consume(t),g):58===t?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(t),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(t))}function y(t){return h_(t)?v_(e,b,"whitespace")(t):b(t)}function b(n){return 124===n?f(n):(null===n||f_(n))&&o&&i===a?(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(n)):v(n)}function v(e){return n(e)}function w(t){return e.enter("tableRow"),x(t)}function x(n){return 124===n?(e.enter("tableCellDivider"),e.consume(n),e.exit("tableCellDivider"),x):null===n||f_(n)?(e.exit("tableRow"),t(n)):h_(n)?v_(e,x,"whitespace")(n):(e.enter("data"),E(n))}function E(t){return null===t||124===t||p_(t)?(e.exit("data"),x(t)):(e.consume(t),92===t?k:E)}function k(t){return 92===t||124===t?(e.consume(t),E):E(t)}}function BO(e,t){let n,r,o,i=-1,a=!0,s=0,l=[0,0,0,0],c=[0,0,0,0],u=!1,d=0;const f=new PO;for(;++i<e.length;){const p=e[i],h=p[1];"enter"===p[0]?"tableHead"===h.type?(u=!1,0!==d&&(zO(f,t,d,n,r),r=void 0,d=0),n={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",n,t]])):"tableRow"===h.type||"tableDelimiterRow"===h.type?(a=!0,o=void 0,l=[0,0,0,0],c=[0,i+1,0,0],u&&(u=!1,r={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},f.add(i,0,[["enter",r,t]])),s="tableDelimiterRow"===h.type?2:r?3:1):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type?"tableCellDivider"===h.type&&(a?a=!1:(0!==l[1]&&(c[0]=c[1],o=LO(f,t,l,s,void 0,o)),l=c,c=[l[1],i,0,0])):(a=!1,0===c[2]&&(0!==l[1]&&(c[0]=c[1],o=LO(f,t,l,s,void 0,o),l=[0,0,0,0]),c[2]=i)):"tableHead"===h.type?(u=!0,d=i):"tableRow"===h.type||"tableDelimiterRow"===h.type?(d=i,0!==l[1]?(c[0]=c[1],o=LO(f,t,l,s,i,o)):0!==c[1]&&(o=LO(f,t,c,s,i,o)),s=0):!s||"data"!==h.type&&"tableDelimiterMarker"!==h.type&&"tableDelimiterFiller"!==h.type||(c[3]=i)}for(0!==d&&zO(f,t,d,n,r),f.consume(t.events),i=-1;++i<t.events.length;){const e=t.events[i];"enter"===e[0]&&"table"===e[1].type&&(e[1]._align=DO(t.events,i))}return e}function LO(e,t,n,r,o,i){const a=1===r?"tableHeader":2===r?"tableDelimiter":"tableData";0!==n[0]&&(i.end=Object.assign({},FO(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const s=FO(t.events,n[1]);if(i={type:a,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[["enter",i,t]]),0!==n[2]){const o=FO(t.events,n[2]),i=FO(t.events,n[3]),a={type:"tableContent",start:Object.assign({},o),end:Object.assign({},i)};if(e.add(n[2],0,[["enter",a,t]]),2!==r){const r=t.events[n[2]],o=t.events[n[3]];if(r[1].end=Object.assign({},o[1].end),r[1].type="chunkText",r[1].contentType="text",n[3]>n[2]+1){const t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[["exit",a,t]])}return void 0!==o&&(i.end=Object.assign({},FO(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function zO(e,t,n,r,o){const i=[],a=FO(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function FO(e,t){const n=e[t],r="enter"===n[0]?"start":"end";return n[1][r]}const VO={name:"tasklistCheck",tokenize:function(e,t,n){const r=this;return function(t){if(null!==r.previous||!r._gfmTasklistFirstContentOfListItem)return n(t);return e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),o};function o(t){return p_(t)?(e.enter("taskListCheckValueUnchecked"),e.consume(t),e.exit("taskListCheckValueUnchecked"),i):88===t||120===t?(e.enter("taskListCheckValueChecked"),e.consume(t),e.exit("taskListCheckValueChecked"),i):n(t)}function i(t){return 93===t?(e.enter("taskListCheckMarker"),e.consume(t),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),a):n(t)}function a(r){return f_(r)?t(r):h_(r)?e.check({tokenize:GO},t,n)(r):n(r)}}};function GO(e,t,n){return v_(e,(function(e){return null===e?n(e):t(e)}),"whitespace")}const WO={};function HO(e){const t=e||WO,n=this.data(),r=n.micromarkExtensions||(n.micromarkExtensions=[]),o=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),i=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);r.push(function(e){return e_([{text:vO},{document:{91:{name:"gfmFootnoteDefinition",tokenize:OO,continuation:{tokenize:RO},exit:TO}},text:{91:{name:"gfmFootnoteCall",tokenize:NO},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:IO,resolveTo:AO}}},MO(e),{flow:{null:{name:"table",tokenize:jO,resolveAll:BO}}},{text:{91:VO}}])}(t)),o.push([{transforms:[fN],enter:{literalAutolink:aN,literalAutolinkEmail:sN,literalAutolinkHttp:sN,literalAutolinkWww:sN},exit:{literalAutolink:dN,literalAutolinkEmail:uN,literalAutolinkHttp:lN,literalAutolinkWww:cN}},{enter:{gfmFootnoteCallString:gN,gfmFootnoteCall:yN,gfmFootnoteDefinitionLabelString:bN,gfmFootnoteDefinition:vN},exit:{gfmFootnoteCallString:wN,gfmFootnoteCall:xN,gfmFootnoteDefinitionLabelString:EN,gfmFootnoteDefinition:kN}},{canContainEols:["delete"],enter:{strikethrough:NN},exit:{strikethrough:ON}},{enter:{table:eO,tableData:oO,tableHeader:oO,tableRow:nO},exit:{codeText:iO,table:tO,tableData:rO,tableHeader:rO,tableRow:rO}},{exit:{taskListCheckValueChecked:lO,taskListCheckValueUnchecked:lO,paragraph:cO}}]),i.push(function(e){return{extensions:[{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:oN,notInConstruct:iN},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:oN,notInConstruct:iN},{character:":",before:"[ps]",after:"\\/",inConstruct:oN,notInConstruct:iN}]},SN(e),{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:AN}],handlers:{delete:RN}},sO(e),{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:uO}}]}}(t))}const XO=({item:t})=>{const n=o(xW);return e.createElement("div",{className:"libnodeentry",onClick:e=>{2===e.detail&&n.worker?.add_node(t.node_id)},title:t.description},t.node_name||t.node_id)},YO=(e,t)=>{const n=e.nodes?.some((e=>e.node_id.toLowerCase().includes(t.toLowerCase())))??!1,r=e.subshelves?.some((e=>YO(e,t)))??!1;return n||r},$O=({item:t,filter:n,parentkey:r})=>{const[o,i]=c(!1),a=t.nodes?.filter((e=>e.node_id.toLowerCase().includes(n.toLowerCase()))),s=o||n.length>0;return YO(t,n)?e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>i(!o),style:{cursor:"pointer"},title:t.description},e.createElement("div",{className:"shelftitle_text"},t.name),e.createElement("div",{className:"expandicon "+(s?"open":"close")},e.createElement(zv,null))),e.createElement("div",{className:"libnodecontainer "+(s?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},a&&e.createElement(e.Fragment,null,a.map((t=>e.createElement(XO,{key:t.node_id,item:t})))),t.subshelves&&e.createElement(e.Fragment,null,t.subshelves.map((t=>e.createElement($O,{key:r+t.name,item:t,filter:n,parentkey:r+t.name})))))),e.createElement("hr",null)):e.createElement(e.Fragment,null)},ZO=({filter:t,setFilter:n})=>e.createElement("div",{className:"libfilter"},e.createElement(Xv,{fontSize:"inherit"}),e.createElement("input",{type:"text",placeholder:"Filter",value:t,onChange:e=>{n(e.target.value)}}),t&&e.createElement(Fv,{fontSize:"inherit",onClick:()=>{n("")}})),UO=[">=","==","<=","<",">"],JO=">=",KO=({availableModule:t})=>e.createElement("div",{className:"module-links"},t.homepage&&e.createElement(e.Fragment,null,e.createElement("a",{href:t.homepage,target:"_blank",rel:"noopener noreferrer"},"Homepage")),t.source&&t.homepage&&" | ",t.source&&e.createElement(e.Fragment,null,e.createElement("a",{href:t.source,target:"_blank",rel:"noopener noreferrer"},"Source"))),qO=({availableModule:t})=>{const[n,r]=c(!1),o=t.description.length>150?t.description.substring(0,150)+"...":t.description;return e.createElement("div",{className:"module-description"},e.createElement(qA,{remarkPlugins:[HO]},n?t.description.replace(/\\n/g," \n"):o.replace(/\\n/g," \n")),t.description.length>150&&e.createElement("button",{onClick:()=>r(!n),className:"toggle-description"},n?"Show less":"Show more"))},QO=({availableModule:t,on_change:n})=>{const[r,o]=c(t.version||"latest"),[i,a]=c(JO);return t.releases&&!t.releases.includes(r)&&t.releases.unshift(r),e.createElement(e.Fragment,null,e.createElement("select",{value:i,onChange:e=>{e.target.value!==i&&UO.includes(e.target.value)&&(a(e.target.value),"latest"!==r&&n(e.target.value+r))}},UO.map((t=>e.createElement("option",{key:t,value:t},t)))),e.createElement("select",{onChange:e=>{const t=e.target.value;o(t),n("latest"!==t?i+t:t)},value:r},t.releases&&t.releases.map((t=>e.createElement("option",{key:t,value:t},t)))))},eR=({availableModule:t,on_remove:n,on_update:r})=>{const[o,i]=c(JO+t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name+(t.version?` (${t.version})`:"")),e.createElement(KO,{availableModule:t}),e.createElement(qO,{availableModule:t}),e.createElement("div",null,e.createElement(QO,{availableModule:t,on_change:i}),e.createElement("button",{className:"update-button",disabled:o===t.version,onClick:()=>{r(t,o)}},"Update"),e.createElement("button",{className:"remove-button",onClick:()=>{n(t)}},"Remove")))},tR=({availableModule:t,on_add:n})=>{const[r,o]=c(JO+t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name+(t.version?` (${t.version})`:"")),e.createElement(KO,{availableModule:t}),e.createElement(qO,{availableModule:t}),e.createElement("div",null,e.createElement(QO,{availableModule:t,on_change:o}),e.createElement("button",{className:"add-button",onClick:()=>{n(t,r)}},"Add")))},nR=({availableModule:t,on_add:n})=>{const[r,o]=c(JO+t.version||"latest");return e.createElement("div",{className:"addable-module"},e.createElement("div",{className:"module-name"},t.name),e.createElement(KO,{availableModule:t}),e.createElement(qO,{availableModule:t}),e.createElement("div",null,e.createElement(QO,{availableModule:t,on_change:o}),e.createElement("button",{className:"add-button",onClick:()=>{n(t,r)}},"Add")))},rR=({children:t})=>{const[n,r]=c(""),i=o(xW),[a,s]=c(!0),[l,u]=c(!0),[d,f]=c(!0),[p,h]=c({installed:[],available:[],active:[]}),[m,g]=c(!1);if(!i.worker)return e.createElement(e.Fragment,null);const y=(e,t)=>{g(!1),void 0!==i.worker&&i.worker.add_lib(e.name,t)},b=(e,t)=>{g(!1),void 0!==i.worker&&i.worker.add_lib(e.name,t)},v=e=>{g(!1),void 0!==i.worker&&i.worker.remove_lib(e.name)},w=(e,t)=>{g(!1),void 0!==i.worker&&i.worker.add_lib(e.name,t)},x=e=>e.filter((e=>e.name.toLowerCase().includes(n.toLowerCase())||e.description.toLowerCase().includes(n.toLowerCase()))),E=x(p.available),k=x(p.installed),C=x(p.active);return e.createElement(Yv,{title:"Manage Library",trigger:t,description:"Add or remove libraries to the current worker.",onOpenChange:e=>{e&&void 0!==i.worker&&i.worker.is_open&&i.worker.get_available_modules().then((e=>{h(e)}))},open:m,setOpen:g},e.createElement("input",{className:"filter-input styledinput",type:"text",placeholder:"Filter modules...",value:n,onChange:e=>r(e.target.value)}),e.createElement("div",{className:"packagelist",style:{maxHeight:"70%",overflow:"auto"}},k.length>0&&e.createElement("h3",{onClick:()=>{f(!d)}},"Installed"),d&&k.map((t=>e.createElement(tR,{key:t.name+t.source,availableModule:t,on_add:y}))),E.length>0&&e.createElement("h3",{onClick:()=>{u(!l)}},"Available"),l&&E.map((t=>e.createElement(nR,{key:t.name+t.source,availableModule:t,on_add:b}))),C.length>0&&e.createElement("h3",{onClick:()=>{s(!a)}},"Active"),a&&C.map((t=>e.createElement(eR,{key:t.name+t.source,availableModule:t,on_remove:v,on_update:w})))))},oR=({ins:t})=>{const[n,r]=c(t.name),i=o(xW);return e.createElement(e.Fragment,null,e.createElement(Yv,{title:t.name,description:"Settings for"+t.name,trigger:e.createElement("div",null,"Settings"),buttons:[{text:"Save",onClick:()=>{i.worker&&(i.worker.update_external_worker(t.uuid,t.nodeclassid,{name:n}),t.name=n)},close:!0},{text:"Delete",onClick:()=>{i.worker&&i.worker.remove_external_worker(t.uuid,t.nodeclassid)},close:!0}]},e.createElement("div",null,e.createElement("div",null,e.createElement("label",{htmlFor:"name"},"Name: "),e.createElement("input",{type:"text",name:"name",value:n,onChange:e=>r(e.target.value),className:"styledinput"})))))},iR=({ins:t,lib:n,filter:r="",parentkey:o})=>{const[i,a]=c(!1),s=n?.nodes?.filter((e=>e.node_id.toLowerCase().includes(r.toLowerCase())));return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>a(!i),style:{cursor:"pointer"},title:t.name},e.createElement("div",{className:"shelftitle_text"},t.name),e.createElement("div",{className:"expandicon "+(i?"open":"close")},e.createElement(zv,null))),e.createElement("div",{className:"libnodecontainer "+(i?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},i&&e.createElement(e.Fragment,null,e.createElement("div",{className:"libnodeentry",title:t.uuid},e.createElement(oR,{ins:t})),n&&e.createElement(e.Fragment,null,s&&e.createElement(e.Fragment,null,s.map((t=>e.createElement(XO,{key:o+t.node_id,item:t})))),n.subshelves.map((t=>e.createElement($O,{key:o+t.name,item:t,filter:r,parentkey:o+t.name}))))))))},aR=({item:t,mod:n,lib:r})=>{const i=o(xW),[a,s]=c(!1),l=t.name||t.module+"."+t.class_name;return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>s(!a),style:{cursor:"pointer"},title:l},e.createElement("div",{className:"shelftitle_text"},l),e.createElement("div",{className:"expandicon "+(a?"open":"close")},e.createElement(zv,null))),e.createElement("div",{className:"libnodecontainer "+(a?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},a&&e.createElement(e.Fragment,null,e.createElement("div",{className:"libnodeentry",onClick:e=>{2===e.detail&&i.worker?.add_external_worker({module:n,cls_module:t.module,cls_name:t.class_name})},title:t.name},"New Instance"),t.instances.map((t=>e.createElement(iR,{key:t.uuid,ins:t,lib:r?.subshelves.find((e=>e.name===t.uuid)),parentkey:t.uuid})))))))},sR=({externalworkermod:t,lib:n})=>{const[r,o]=c(!1),i=r;return e.createElement("div",{className:"shelfcontainer"},e.createElement("div",{className:"shelftitle",onClick:()=>o(!r),style:{cursor:"pointer"},title:t.module},e.createElement("div",{className:"shelftitle_text"},t.module),e.createElement("div",{className:"expandicon "+(i?"open":"close")},e.createElement(zv,null))),e.createElement("div",{className:"libnodecontainer "+(i?"open":"close")},e.createElement("div",{className:"libnodecontainer_inner"},t.worker_classes.map((r=>e.createElement(aR,{key:r.module+r.class_name,item:r,mod:t.module,lib:n}))))),e.createElement("hr",null))},lR=()=>{const t=o(xW),n=t.lib.libstate(),r=e.useContext(xW),i=r.local_settings((e=>e.view_settings.expand_lib)),a=r.local_settings((e=>e.update_view_settings)),s=pC("m"),[l,u]=c(""),d=t.worker?.state((e=>e.is_open))??!1;return e.createElement(mC,{maxSize:s?"100%":"300px",direction:s?"down":"right",containerClassName:"pos-left pos-top bg1 h-12",onExpandChange:e=>{a({expand_lib:e})},expanded:void 0===i||i},e.createElement("div",{className:"libcontainer"},e.createElement("div",{className:"library"},e.createElement("div",{className:"libtitle"},"Lib"),e.createElement("hr",{className:"hr_prominent"}),e.createElement(ZO,{filter:l,setFilter:u}),e.createElement("div",{className:"vscrollcontainer"},n.lib.shelves.filter((e=>"_external_worker"!==e.name)).map((t=>e.createElement($O,{key:t.name,item:t,filter:l,parentkey:t.name})))),e.createElement("hr",null),e.createElement("div",{className:"libtitle"},"External Worker"),e.createElement("hr",{className:"hr_prominent"}),e.createElement("div",{className:"vscrollcontainer"},n.external_worker?.map((t=>e.createElement(sR,{key:t.module,externalworkermod:t,lib:n.lib.shelves.find((e=>"_external_worker"===e.name))})))),e.createElement("hr",null)),e.createElement("div",{style:{paddingTop:"0.5rem"}}),d&&e.createElement("div",{className:"addlib"},e.createElement(rR,null,e.createElement("button",null,"Manage Libraries")))))};const{useRef:cR}=t;function uR(e){const t=cR();return n=>{const r=e(n);return function(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[n,r]of e)if(!Object.is(r,t.get(n)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}(t.current,r)?t.current:t.current=r}}var dR="Popover",[fR,pR]=zf(dR,[Nx]),hR=Nx(),[mR,gR]=fR(dR),yR=t=>{const{__scopePopover:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!1}=t,l=hR(n),c=e.useRef(null),[u,d]=e.useState(!1),[f=!1,p]=Yf({prop:o,defaultProp:i,onChange:a});return Lf.jsx(Xx,{...l,children:Lf.jsx(mR,{scope:n,contentId:Hf(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:e.useCallback((()=>p((e=>!e))),[p]),hasCustomAnchor:u,onCustomAnchorAdd:e.useCallback((()=>d(!0)),[]),onCustomAnchorRemove:e.useCallback((()=>d(!1)),[]),modal:s,children:r})})};yR.displayName=dR;var bR="PopoverAnchor";e.forwardRef(((t,n)=>{const{__scopePopover:r,...o}=t,i=gR(bR,r),a=hR(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:l}=i;return e.useEffect((()=>(s(),()=>l())),[s,l]),Lf.jsx(Yx,{...a,...o,ref:n})})).displayName=bR;var vR="PopoverTrigger",wR=e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=gR(vR,n),i=hR(n),a=Of(t,o.triggerRef),s=Lf.jsx(Kf.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":TR(o.open),...r,ref:a,onClick:If(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:Lf.jsx(Yx,{asChild:!0,...i,children:s})}));wR.displayName=vR;var xR="PopoverPortal",[ER,kR]=fR(xR,{forceMount:void 0}),CR=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=gR(xR,t);return Lf.jsx(ER,{scope:t,forceMount:n,children:Lf.jsx(vp,{present:n||i.open,children:Lf.jsx(bp,{asChild:!0,container:o,children:r})})})};CR.displayName=xR;var SR="PopoverContent",_R=e.forwardRef(((e,t)=>{const n=kR(SR,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=gR(SR,e.__scopePopover);return Lf.jsx(vp,{present:r||i.open,children:i.modal?Lf.jsx(IR,{...o,ref:t}):Lf.jsx(AR,{...o,ref:t})})}));_R.displayName=SR;var IR=e.forwardRef(((t,n)=>{const r=gR(SR,t.__scopePopover),o=e.useRef(null),i=Of(n,o),a=e.useRef(!1);return e.useEffect((()=>{const e=o.current;if(e)return bh(e)}),[]),Lf.jsx(dh,{as:$f,allowPinchZoom:!0,children:Lf.jsx(NR,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:If(t.onCloseAutoFocus,(e=>{e.preventDefault(),a.current||r.triggerRef.current?.focus()})),onPointerDownOutside:If(t.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r}),{checkForDefaultPrevented:!1}),onFocusOutside:If(t.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})})})),AR=e.forwardRef(((t,n)=>{const r=gR(SR,t.__scopePopover),o=e.useRef(!1),i=e.useRef(!1);return Lf.jsx(NR,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})})),NR=e.forwardRef(((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...d}=e,f=gR(SR,n),p=hR(n);return Ep(),Lf.jsx(dp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:Lf.jsx(op,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>f.onOpenChange(!1),children:Lf.jsx($x,{"data-state":TR(f.open),role:"dialog",id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})})),OR="PopoverClose";e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=gR(OR,n);return Lf.jsx(Kf.button,{type:"button",...r,ref:t,onClick:If(e.onClick,(()=>o.onOpenChange(!1)))})})).displayName=OR;var RR=e.forwardRef(((e,t)=>{const{__scopePopover:n,...r}=e,o=hR(n);return Lf.jsx(Zx,{...o,...r,ref:t})}));function TR(e){return e?"open":"closed"}RR.displayName="PopoverArrow";var MR=yR,PR=wR,DR=CR,jR=_R,BR=RR;const LR={bytes:({iostore:e})=>{const{full:t,preview:n}=e.valuestore(),r=JSON.stringify(t?.value||n?.value)||"";return`Bytes(${Math.round(3*r.length/4)})`}},zR=e=>!!e&&e instanceof Date,FR=e=>!!e&&e instanceof Object&&"function"==typeof e;function VR(e,t){return void 0===t&&(t=!1),!e||t?`"${e}"`:e}function GR(e){let{field:t,value:n,data:r,lastElement:o,openBracket:i,closeBracket:a,level:l,style:d,shouldExpandNode:h,clickToExpandNode:m,outerRef:g,beforeExpandChange:y}=e;const b=u(!1),[v,w]=c((()=>h(l,n,t))),x=u(null);s((()=>{b.current?w(h(l,n,t)):b.current=!0}),[h]);const E=p();if(0===r.length)return function(e){let{field:t,openBracket:n,closeBracket:r,lastElement:o,style:i}=e;return f("div",{className:i.basicChildStyle,role:"treeitem","aria-selected":void 0},(t||""===t)&&f("span",{className:i.label},VR(t,i.quotesForFieldNames),":"),f("span",{className:i.punctuation},n),f("span",{className:i.punctuation},r),!o&&f("span",{className:i.punctuation},","))}({field:t,openBracket:i,closeBracket:a,lastElement:o,style:d});const k=v?d.collapseIcon:d.expandIcon,C=v?d.ariaLables.collapseJson:d.ariaLables.expandJson,S=l+1,_=r.length-1,I=e=>{v===e||y&&!y({level:l,value:n,field:t,newExpandValue:e})||w(e)},A=e=>{if("ArrowRight"===e.key||"ArrowLeft"===e.key)e.preventDefault(),I("ArrowRight"===e.key);else if("ArrowUp"===e.key||"ArrowDown"===e.key){e.preventDefault();const t="ArrowUp"===e.key?-1:1;if(!g.current)return;const n=g.current.querySelectorAll("[role=button]");let r=-1;for(let e=0;e<n.length;e++)if(0===n[e].tabIndex){r=e;break}if(r<0)return;const o=(r+t+n.length)%n.length;n[r].tabIndex=-1,n[o].tabIndex=0,n[o].focus()}},N=()=>{var e;I(!v);const t=x.current;if(!t)return;const n=null===(e=g.current)||void 0===e?void 0:e.querySelector('[role=button][tabindex="0"]');n&&(n.tabIndex=-1),t.tabIndex=0,t.focus()};return f("div",{className:d.basicChildStyle,role:"treeitem","aria-expanded":v,"aria-selected":void 0},f("span",{className:k,onClick:N,onKeyDown:A,role:"button","aria-label":C,"aria-expanded":v,"aria-controls":v?E:void 0,ref:x,tabIndex:0===l?0:-1}),(t||""===t)&&f("span",m?{className:d.clickableLabel,onClick:N,onKeyDown:A}:{className:d.label},VR(t,d.quotesForFieldNames),":"),f("span",{className:d.punctuation},i),v?f("ul",{id:E,role:"group",className:d.childFieldsContainer},r.map(((e,t)=>f(YR,{key:e[0]||t,field:e[0],value:e[1],style:d,lastElement:t===_,level:S,shouldExpandNode:h,clickToExpandNode:m,outerRef:g})))):f("span",{className:d.collapsedContent,onClick:N,onKeyDown:A}),f("span",{className:d.punctuation},a),!o&&f("span",{className:d.punctuation},","))}function WR(e){let{field:t,value:n,style:r,lastElement:o,shouldExpandNode:i,clickToExpandNode:a,level:s,outerRef:l,beforeExpandChange:c}=e;return GR({field:t,value:n,lastElement:o||!1,level:s,openBracket:"{",closeBracket:"}",style:r,shouldExpandNode:i,clickToExpandNode:a,data:Object.keys(n).map((e=>[e,n[e]])),outerRef:l,beforeExpandChange:c})}function HR(e){let{field:t,value:n,style:r,lastElement:o,level:i,shouldExpandNode:a,clickToExpandNode:s,outerRef:l,beforeExpandChange:c}=e;return GR({field:t,value:n,lastElement:o||!1,level:i,openBracket:"[",closeBracket:"]",style:r,shouldExpandNode:a,clickToExpandNode:s,data:n.map((e=>[void 0,e])),outerRef:l,beforeExpandChange:c})}function XR(e){let t,{field:n,value:r,style:o,lastElement:i}=e,a=o.otherValue;var s;return null===r?(t="null",a=o.nullValue):void 0===r?(t="undefined",a=o.undefinedValue):"string"==typeof(s=r)||s instanceof String?(t=function(e,t,n){return n?JSON.stringify(e):t?`"${e}"`:e}(r,!o.noQuotesForStringValues,o.stringifyStringValues),a=o.stringValue):(e=>"boolean"==typeof e||e instanceof Boolean)(r)?(t=r?"true":"false",a=o.booleanValue):(e=>"number"==typeof e||e instanceof Number)(r)?(t=r.toString(),a=o.numberValue):(e=>"bigint"==typeof e||e instanceof BigInt)(r)?(t=`${r.toString()}n`,a=o.numberValue):t=zR(r)?r.toISOString():FR(r)?"function() { }":r.toString(),f("div",{className:o.basicChildStyle,role:"treeitem","aria-selected":void 0},(n||""===n)&&f("span",{className:o.label},VR(n,o.quotesForFieldNames),":"),f("span",{className:a},t),!i&&f("span",{className:o.punctuation},","))}function YR(e){const t=e.value;return n=t,Array.isArray(n)?f(HR,Object.assign({},e)):!(e=>"object"==typeof e&&null!==e)(t)||zR(t)||FR(t)?f(XR,Object.assign({},e)):f(WR,Object.assign({},e));var n}var $R="_2bkNM",ZR="_1BXBN";const UR={collapseJson:"collapse JSON",expandJson:"expand JSON"},JR={container:"_2IvMF _GzYRV",basicChildStyle:$R,childFieldsContainer:ZR,label:"_1MGIk",clickableLabel:"_2YKJg _1MGIk _1MFti",nullValue:"_2T6PJ",undefinedValue:"_1Gho6",stringValue:"_vGjyY",booleanValue:"_3zQKs",numberValue:"_1bQdo",otherValue:"_1xvuR",punctuation:"_3uHL6 _3eOF8",collapseIcon:"_oLqym _f10Tu _1MFti _1LId0",expandIcon:"_2AXVT _f10Tu _1MFti _1UmXx",collapsedContent:"_2KJWg _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:UR,stringifyStringValues:!1},KR={container:"_11RoI _GzYRV",basicChildStyle:$R,childFieldsContainer:ZR,label:"_2bSDX",clickableLabel:"_1RQEj _2bSDX _1MFti",nullValue:"_LaAZe",undefinedValue:"_GTKgm",stringValue:"_Chy1W",booleanValue:"_2vRm-",numberValue:"_2bveF",otherValue:"_1prJR",punctuation:"_gsbQL _3eOF8",collapseIcon:"_3QHg2 _f10Tu _1MFti _1LId0",expandIcon:"_17H2C _f10Tu _1MFti _1UmXx",collapsedContent:"_3fDAz _1pNG9 _1MFti",noQuotesForStringValues:!1,quotesForFieldNames:!1,ariaLables:UR,stringifyStringValues:!1},qR=()=>!0,QR=e=>e<1,eT=e=>{let{data:t,style:n=JR,shouldExpandNode:r=qR,clickToExpandNode:o=!1,beforeExpandChange:i,...a}=e;const s=u(null);return f("div",Object.assign({"aria-label":"JSON view"},a,{className:n.container,ref:s,role:"tree"}),f(YR,{value:t,style:{...JR,...n},lastElement:!0,level:0,shouldExpandNode:r,clickToExpandNode:o,outerRef:s,beforeExpandChange:i}))};function tT(e){if(null==e)return!1;if("object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype)&&function(e){for(const t in e)if(Object.hasOwn(e,t))return!1;return!0}(e)}const nT=({data:t})=>e.createElement(eT,{data:tT(t)?"":t,style:KR,shouldExpandNode:QR});function rT(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=rT(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function oT(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=rT(e))&&(r&&(r+=" "),r+=t);return r}function iT(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let a="",s=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(a+=(!0===s?"":" ")+t(r),s=!1,n&&n[r]&&(a+=" "+n[r]))}r[o]=a}return r}const aT=e.createContext();function sT(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>n.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${n} for the full message.`}function lT(e){if("string"!=typeof e)throw new Error("production"!==Q.env.NODE_ENV?"MUI: `capitalize(string)` expects a string argument.":sT(7));return e.charAt(0).toUpperCase()+e.slice(1)}"production"!==Q.env.NODE_ENV&&(aT.displayName="TableContext");var cT,uT={exports:{}},dT={};function fT(){if(cT)return dT;cT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),a=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),p=Symbol.for("react.client.reference");function h(f){if("object"==typeof f&&null!==f){var p=f.$$typeof;switch(p){case e:switch(f=f.type){case n:case o:case r:case l:case c:return f;default:switch(f=f&&f.$$typeof){case a:case s:case d:case u:case i:return f;default:return p}}case t:return p}}}return dT.ContextConsumer=i,dT.ContextProvider=a,dT.Element=e,dT.ForwardRef=s,dT.Fragment=n,dT.Lazy=d,dT.Memo=u,dT.Portal=t,dT.Profiler=o,dT.StrictMode=r,dT.Suspense=l,dT.SuspenseList=c,dT.isContextConsumer=function(e){return h(e)===i},dT.isContextProvider=function(e){return h(e)===a},dT.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},dT.isForwardRef=function(e){return h(e)===s},dT.isFragment=function(e){return h(e)===n},dT.isLazy=function(e){return h(e)===d},dT.isMemo=function(e){return h(e)===u},dT.isPortal=function(e){return h(e)===t},dT.isProfiler=function(e){return h(e)===o},dT.isStrictMode=function(e){return h(e)===r},dT.isSuspense=function(e){return h(e)===l},dT.isSuspenseList=function(e){return h(e)===c},dT.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===l||e===c||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===d||e.$$typeof===u||e.$$typeof===a||e.$$typeof===i||e.$$typeof===s||e.$$typeof===p||void 0!==e.getModuleId)},dT.typeOf=h,dT}var pT,hT,mT={};function gT(){return pT||(pT=1,"production"!==Q.env.NODE_ENV&&function(){function e(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case r:case i:case o:case c:case u:return e;default:switch(e=e&&e.$$typeof){case s:case l:case f:case d:case a:return e;default:return p}}case n:return p}}}var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.for("react.client.reference");mT.ContextConsumer=a,mT.ContextProvider=s,mT.Element=t,mT.ForwardRef=l,mT.Fragment=r,mT.Lazy=f,mT.Memo=d,mT.Portal=n,mT.Profiler=i,mT.StrictMode=o,mT.Suspense=c,mT.SuspenseList=u,mT.isContextConsumer=function(t){return e(t)===a},mT.isContextProvider=function(t){return e(t)===s},mT.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},mT.isForwardRef=function(t){return e(t)===l},mT.isFragment=function(t){return e(t)===r},mT.isLazy=function(t){return e(t)===f},mT.isMemo=function(t){return e(t)===d},mT.isPortal=function(t){return e(t)===n},mT.isProfiler=function(t){return e(t)===i},mT.isStrictMode=function(t){return e(t)===o},mT.isSuspense=function(t){return e(t)===c},mT.isSuspenseList=function(t){return e(t)===u},mT.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===i||e===o||e===c||e===u||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===d||e.$$typeof===s||e.$$typeof===a||e.$$typeof===l||e.$$typeof===h||void 0!==e.getModuleId)},mT.typeOf=e}()),mT}function yT(){return hT||(hT=1,"production"===Q.env.NODE_ENV?uT.exports=fT():uT.exports=gT()),uT.exports}var bT=yT();function vT(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 wT(t){if(e.isValidElement(t)||bT.isValidElementType(t)||!vT(t))return t;const n={};return Object.keys(t).forEach((e=>{n[e]=wT(t[e])})),n}function xT(t,n,r={clone:!0}){const o=r.clone?{...t}:t;return vT(t)&&vT(n)&&Object.keys(n).forEach((i=>{e.isValidElement(n[i])||bT.isValidElementType(n[i])?o[i]=n[i]:vT(n[i])&&Object.prototype.hasOwnProperty.call(t,i)&&vT(t[i])?o[i]=xT(t[i],n[i],r):r.clone?o[i]=vT(n[i])?wT(n[i]):n[i]:o[i]=n[i]})),o}function ET(e,t){return t?xT(e,t,{clone:!1}):e}const kT="production"!==Q.env.NODE_ENV?qb.oneOfType([qb.number,qb.string,qb.object,qb.array]):{};const CT={xs:0,sm:600,md:900,lg:1200,xl:1536},ST={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${CT[e]}px)`},_T={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:CT[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function IT(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||ST;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||ST;return Object.keys(t).reduce(((o,i)=>{if(a=e.keys,"@"===(s=i)||s.startsWith("@")&&(a.some((e=>s.startsWith(`@${e}`)))||s.match(/^@\d/))){const e=function(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n){if("production"!==Q.env.NODE_ENV)throw new Error("production"!==Q.env.NODE_ENV?`MUI: The provided shorthand (${t}) is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.\nFor example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:sT(18,`(${t})`));return null}const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}(r.containerQueries?r:_T,i);e&&(o[e]=n(t[i],i))}else if(Object.keys(e.values||CT).includes(i)){o[e.up(i)]=n(t[i],i)}else{const e=i;o[e]=t[e]}var a,s;return o}),{})}return n(t)}function AT(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function NT(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:AT(e,n)||r,t&&(o=t(o,r,e)),o}function OT(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:o}=e,i=e=>{if(null==e[t])return null;const i=e[t],a=AT(e.theme,r)||{};return IT(e,i,(e=>{let r=NT(a,o,e);return e===r&&"string"==typeof e&&(r=NT(a,o,`${t}${"default"===e?"":lT(e)}`,e)),!1===n?r:{[n]:r}}))};return i.propTypes="production"!==Q.env.NODE_ENV?{[t]:kT}:{},i.filterProps=[t],i}const RT={m:"margin",p:"padding"},TT={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},MT={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},PT=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!MT[e])return[e];e=MT[e]}const[t,n]=e.split(""),r=RT[t],o=TT[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),DT=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],jT=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],BT=[...DT,...jT];function LT(e,t,n,r){const o=AT(e,t,!0)??n;return"number"==typeof o||"string"==typeof o?e=>"string"==typeof e?e:("production"!==Q.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${r} argument to be a number or a string, got ${e}.`),"string"==typeof o?`calc(${e} * ${o})`:o*e):Array.isArray(o)?e=>{if("string"==typeof e)return e;const n=Math.abs(e);"production"!==Q.env.NODE_ENV&&(Number.isInteger(n)?n>o.length-1&&console.error([`MUI: The value provided (${n}) overflows.`,`The supported values are: ${JSON.stringify(o)}.`,`${n} > ${o.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n")));const r=o[n];return e>=0?r:"number"==typeof r?-r:`-${r}`}:"function"==typeof o?o:("production"!==Q.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${o}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}function zT(e){return LT(e,"spacing",8,"spacing")}function FT(e,t){return"string"==typeof t||null==t?t:e(t)}function VT(e,t,n,r){if(!t.includes(n))return null;const o=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=FT(t,n),e)),{})}(PT(n),r);return IT(e,e[n],o)}function GT(e,t){const n=zT(e.theme);return Object.keys(e).map((r=>VT(e,t,r,n))).reduce(ET,{})}function WT(e){return GT(e,DT)}function HT(e){return GT(e,jT)}function XT(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?ET(n,t[r](e)):n),{});return n.propTypes="production"!==Q.env.NODE_ENV?e.reduce(((e,t)=>Object.assign(e,t.propTypes)),{}):{},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n}function YT(e){return"number"!=typeof e?e:`${e}px solid`}function $T(e,t){return OT({prop:e,themeKey:"borders",transform:t})}WT.propTypes="production"!==Q.env.NODE_ENV?DT.reduce(((e,t)=>(e[t]=kT,e)),{}):{},WT.filterProps=DT,HT.propTypes="production"!==Q.env.NODE_ENV?jT.reduce(((e,t)=>(e[t]=kT,e)),{}):{},HT.filterProps=jT,"production"===Q.env.NODE_ENV||BT.reduce(((e,t)=>(e[t]=kT,e)),{});const ZT=$T("border",YT),UT=$T("borderTop",YT),JT=$T("borderRight",YT),KT=$T("borderBottom",YT),qT=$T("borderLeft",YT),QT=$T("borderColor"),eM=$T("borderTopColor"),tM=$T("borderRightColor"),nM=$T("borderBottomColor"),rM=$T("borderLeftColor"),oM=$T("outline",YT),iM=$T("outlineColor"),aM=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=LT(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:FT(t,e)});return IT(e,e.borderRadius,n)}return null};aM.propTypes="production"!==Q.env.NODE_ENV?{borderRadius:kT}:{},aM.filterProps=["borderRadius"],XT(ZT,UT,JT,KT,qT,QT,eM,tM,nM,rM,aM,oM,iM);const sM=e=>{if(void 0!==e.gap&&null!==e.gap){const t=LT(e.theme,"spacing",8,"gap"),n=e=>({gap:FT(t,e)});return IT(e,e.gap,n)}return null};sM.propTypes="production"!==Q.env.NODE_ENV?{gap:kT}:{},sM.filterProps=["gap"];const lM=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=LT(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:FT(t,e)});return IT(e,e.columnGap,n)}return null};lM.propTypes="production"!==Q.env.NODE_ENV?{columnGap:kT}:{},lM.filterProps=["columnGap"];const cM=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=LT(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:FT(t,e)});return IT(e,e.rowGap,n)}return null};cM.propTypes="production"!==Q.env.NODE_ENV?{rowGap:kT}:{},cM.filterProps=["rowGap"];function uM(e,t){return"grey"===t?t:e}XT(sM,lM,cM,OT({prop:"gridColumn"}),OT({prop:"gridRow"}),OT({prop:"gridAutoFlow"}),OT({prop:"gridAutoColumns"}),OT({prop:"gridAutoRows"}),OT({prop:"gridTemplateColumns"}),OT({prop:"gridTemplateRows"}),OT({prop:"gridTemplateAreas"}),OT({prop:"gridArea"}));function dM(e){return e<=1&&0!==e?100*e+"%":e}XT(OT({prop:"color",themeKey:"palette",transform:uM}),OT({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:uM}),OT({prop:"backgroundColor",themeKey:"palette",transform:uM}));const fM=OT({prop:"width",transform:dM}),pM=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||CT[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:dM(t)}};return IT(e,e.maxWidth,t)}return null};pM.filterProps=["maxWidth"];const hM=OT({prop:"minWidth",transform:dM}),mM=OT({prop:"height",transform:dM}),gM=OT({prop:"maxHeight",transform:dM}),yM=OT({prop:"minHeight",transform:dM});OT({prop:"size",cssProperty:"width",transform:dM}),OT({prop:"size",cssProperty:"height",transform:dM});XT(fM,pM,hM,mM,gM,yM,OT({prop:"boxSizing"}));const bM={border:{themeKey:"borders",transform:YT},borderTop:{themeKey:"borders",transform:YT},borderRight:{themeKey:"borders",transform:YT},borderBottom:{themeKey:"borders",transform:YT},borderLeft:{themeKey:"borders",transform:YT},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:YT},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:aM},color:{themeKey:"palette",transform:uM},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:uM},backgroundColor:{themeKey:"palette",transform:uM},p:{style:HT},pt:{style:HT},pr:{style:HT},pb:{style:HT},pl:{style:HT},px:{style:HT},py:{style:HT},padding:{style:HT},paddingTop:{style:HT},paddingRight:{style:HT},paddingBottom:{style:HT},paddingLeft:{style:HT},paddingX:{style:HT},paddingY:{style:HT},paddingInline:{style:HT},paddingInlineStart:{style:HT},paddingInlineEnd:{style:HT},paddingBlock:{style:HT},paddingBlockStart:{style:HT},paddingBlockEnd:{style:HT},m:{style:WT},mt:{style:WT},mr:{style:WT},mb:{style:WT},ml:{style:WT},mx:{style:WT},my:{style:WT},margin:{style:WT},marginTop:{style:WT},marginRight:{style:WT},marginBottom:{style:WT},marginLeft:{style:WT},marginX:{style:WT},marginY:{style:WT},marginInline:{style:WT},marginInlineStart:{style:WT},marginInlineEnd:{style:WT},marginBlock:{style:WT},marginBlockStart:{style:WT},marginBlockEnd:{style:WT},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:sM},rowGap:{style:cM},columnGap:{style:lM},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:dM},maxWidth:{style:pM},minWidth:{transform:dM},height:{transform:dM},maxHeight:{transform:dM},minHeight:{transform:dM},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"}};const vM=function(){function e(e,t,n,r){const o={[e]:t,theme:n},i=r[e];if(!i)return{[e]:t};const{cssProperty:a=e,themeKey:s,transform:l,style:c}=i;if(null==t)return null;if("typography"===s&&"inherit"===t)return{[e]:t};const u=AT(n,s)||{};if(c)return c(o);return IT(o,t,(t=>{let n=NT(u,l,t);return t===n&&"string"==typeof t&&(n=NT(u,l,`${e}${"default"===t?"":lT(t)}`,t)),!1===a?n:{[a]:n}}))}return function t(n){const{sx:r,theme:o={}}=n||{};if(!r)return null;const i=o.unstable_sxConfig??bM;function a(n){let r=n;if("function"==typeof n)r=n(o);else if("object"!=typeof n)return n;if(!r)return null;const a=function(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}(o.breakpoints),s=Object.keys(a);let l=a;return Object.keys(r).forEach((n=>{const a=function(e,t){return"function"==typeof e?e(t):e}(r[n],o);if(null!=a)if("object"==typeof a)if(i[n])l=ET(l,e(n,a,o,i));else{const e=IT({theme:o},a,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,a)?l=ET(l,e):l[n]=t({sx:a,theme:o})}else l=ET(l,e(n,a,o,i))})),function(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)}));return n.length?n.reduce(((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e}),{...t}):t}(o,function(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}(s,l))}return Array.isArray(r)?r.map(a):a(r)}}();function wM(){return wM=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wM.apply(null,arguments)}vM.filterProps=["sx"];var xM=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=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,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||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 t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(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}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(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]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),EM="-ms-",kM="-moz-",CM="-webkit-",SM="comm",_M="rule",IM="decl",AM="@keyframes",NM=Math.abs,OM=String.fromCharCode,RM=Object.assign;function TM(e){return e.trim()}function MM(e,t,n){return e.replace(t,n)}function PM(e,t){return e.indexOf(t)}function DM(e,t){return 0|e.charCodeAt(t)}function jM(e,t,n){return e.slice(t,n)}function BM(e){return e.length}function LM(e){return e.length}function zM(e,t){return t.push(e),e}var FM=1,VM=1,GM=0,WM=0,HM=0,XM="";function YM(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:FM,column:VM,length:a,return:""}}function $M(e,t){return RM(YM("",null,null,"",null,null,0),e,{length:-e.length},t)}function ZM(){return HM=WM>0?DM(XM,--WM):0,VM--,10===HM&&(VM=1,FM--),HM}function UM(){return HM=WM<GM?DM(XM,WM++):0,VM++,10===HM&&(VM=1,FM++),HM}function JM(){return DM(XM,WM)}function KM(){return WM}function qM(e,t){return jM(XM,e,t)}function QM(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 eP(e){return FM=VM=1,GM=BM(XM=e),WM=0,[]}function tP(e){return XM="",e}function nP(e){return TM(qM(WM-1,iP(91===e?e+2:40===e?e+1:e)))}function rP(e){for(;(HM=JM())&&HM<33;)UM();return QM(e)>2||QM(HM)>3?"":" "}function oP(e,t){for(;--t&&UM()&&!(HM<48||HM>102||HM>57&&HM<65||HM>70&&HM<97););return qM(e,KM()+(t<6&&32==JM()&&32==UM()))}function iP(e){for(;UM();)switch(HM){case e:return WM;case 34:case 39:34!==e&&39!==e&&iP(HM);break;case 40:41===e&&iP(e);break;case 92:UM()}return WM}function aP(e,t){for(;UM()&&e+HM!==57&&(e+HM!==84||47!==JM()););return"/*"+qM(t,WM-1)+"*"+OM(47===e?e:UM())}function sP(e){for(;!QM(JM());)UM();return qM(e,WM)}function lP(e){return tP(cP("",null,null,null,[""],e=eP(e),0,[0],e))}function cP(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,h=0,m=1,g=1,y=1,b=0,v="",w=o,x=i,E=r,k=v;g;)switch(h=b,b=UM()){case 40:if(108!=h&&58==DM(k,d-1)){-1!=PM(k+=MM(nP(b),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:k+=nP(b);break;case 9:case 10:case 13:case 32:k+=rP(h);break;case 92:k+=oP(KM()-1,7);continue;case 47:switch(JM()){case 42:case 47:zM(dP(aP(UM(),KM()),t,n),l);break;default:k+="/"}break;case 123*m:s[c++]=BM(k)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:-1==y&&(k=MM(k,/\f/g,"")),p>0&&BM(k)-d&&zM(p>32?fP(k+";",r,n,d-1):fP(MM(k," ","")+";",r,n,d-2),l);break;case 59:k+=";";default:if(zM(E=uP(k,t,n,c,u,o,s,v,w=[],x=[],d),i),123===b)if(0===u)cP(k,t,E,E,w,i,d,s,x);else switch(99===f&&110===DM(k,3)?100:f){case 100:case 108:case 109:case 115:cP(e,E,E,r&&zM(uP(e,E,E,0,0,o,s,v,o,w=[],d),x),o,x,d,s,r?w:x);break;default:cP(k,E,E,E,[""],x,0,s,x)}}c=u=p=0,m=y=1,v=k="",d=a;break;case 58:d=1+BM(k),p=h;default:if(m<1)if(123==b)--m;else if(125==b&&0==m++&&125==ZM())continue;switch(k+=OM(b),b*m){case 38:y=u>0?1:(k+="\f",-1);break;case 44:s[c++]=(BM(k)-1)*y,y=1;break;case 64:45===JM()&&(k+=nP(UM())),f=JM(),u=d=BM(v=k+=sP(KM())),b++;break;case 45:45===h&&2==BM(k)&&(m=0)}}return i}function uP(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,f=0===o?i:[""],p=LM(f),h=0,m=0,g=0;h<r;++h)for(var y=0,b=jM(e,d+1,d=NM(m=a[h])),v=e;y<p;++y)(v=TM(m>0?f[y]+" "+b:MM(b,/&\f/g,f[y])))&&(l[g++]=v);return YM(e,t,n,0===o?_M:s,l,c,u)}function dP(e,t,n){return YM(e,t,n,SM,OM(HM),jM(e,2,-2),0)}function fP(e,t,n,r){return YM(e,t,n,IM,jM(e,0,r),jM(e,r+1,-1),r)}function pP(e,t){for(var n="",r=LM(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function hP(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case IM:return e.return=e.return||e.value;case SM:return"";case AM:return e.return=e.value+"{"+pP(e.children,r)+"}";case _M:e.value=e.props.join(",")}return BM(n=pP(e.children,r))?e.return=e.value+"{"+n+"}":""}function mP(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var gP=function(e,t,n){for(var r=0,o=0;r=o,o=JM(),38===r&&12===o&&(t[n]=1),!QM(o);)UM();return qM(e,WM)},yP=function(e,t){return tP(function(e,t){var n=-1,r=44;do{switch(QM(r)){case 0:38===r&&12===JM()&&(t[n]=1),e[n]+=gP(WM-1,t,n);break;case 2:e[n]+=nP(r);break;case 4:if(44===r){e[++n]=58===JM()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=OM(r)}}while(r=UM());return e}(eP(e),t))},bP=new WeakMap,vP=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||bP.get(n))&&!r){bP.set(e,!0);for(var o=[],i=yP(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},wP=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function xP(e,t){switch(function(e,t){return 45^DM(e,0)?(((t<<2^DM(e,0))<<2^DM(e,1))<<2^DM(e,2))<<2^DM(e,3):0}(e,t)){case 5103:return CM+"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 CM+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return CM+e+kM+e+EM+e+e;case 6828:case 4268:return CM+e+EM+e+e;case 6165:return CM+e+EM+"flex-"+e+e;case 5187:return CM+e+MM(e,/(\w+).+(:[^]+)/,CM+"box-$1$2"+EM+"flex-$1$2")+e;case 5443:return CM+e+EM+"flex-item-"+MM(e,/flex-|-self/,"")+e;case 4675:return CM+e+EM+"flex-line-pack"+MM(e,/align-content|flex-|-self/,"")+e;case 5548:return CM+e+EM+MM(e,"shrink","negative")+e;case 5292:return CM+e+EM+MM(e,"basis","preferred-size")+e;case 6060:return CM+"box-"+MM(e,"-grow","")+CM+e+EM+MM(e,"grow","positive")+e;case 4554:return CM+MM(e,/([^-])(transform)/g,"$1"+CM+"$2")+e;case 6187:return MM(MM(MM(e,/(zoom-|grab)/,CM+"$1"),/(image-set)/,CM+"$1"),e,"")+e;case 5495:case 3959:return MM(e,/(image-set\([^]*)/,CM+"$1$`$1");case 4968:return MM(MM(e,/(.+:)(flex-)?(.*)/,CM+"box-pack:$3"+EM+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+CM+e+e;case 4095:case 3583:case 4068:case 2532:return MM(e,/(.+)-inline(.+)/,CM+"$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(BM(e)-1-t>6)switch(DM(e,t+1)){case 109:if(45!==DM(e,t+4))break;case 102:return MM(e,/(.+:)(.+)-([^]+)/,"$1"+CM+"$2-$3$1"+kM+(108==DM(e,t+3)?"$3":"$2-$3"))+e;case 115:return~PM(e,"stretch")?xP(MM(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==DM(e,t+1))break;case 6444:switch(DM(e,BM(e)-3-(~PM(e,"!important")&&10))){case 107:return MM(e,":",":"+CM)+e;case 101:return MM(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+CM+(45===DM(e,14)?"inline-":"")+"box$3$1"+CM+"$2$3$1"+EM+"$2box$3")+e}break;case 5936:switch(DM(e,t+11)){case 114:return CM+e+EM+MM(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return CM+e+EM+MM(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return CM+e+EM+MM(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return CM+e+EM+e+e}return e}var EP,kP,CP=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case IM:e.return=xP(e.value,e.length);break;case AM:return pP([$M(e,{value:MM(e.value,"@","@"+CM)})],r);case _M:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return pP([$M(e,{props:[MM(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return pP([$M(e,{props:[MM(t,/:(plac\w+)/,":"+CM+"input-$1")]}),$M(e,{props:[MM(t,/:(plac\w+)/,":-moz-$1")]}),$M(e,{props:[MM(t,/:(plac\w+)/,EM+"input-$1")]})],r)}return""}))}}],SP=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var r,o,i=e.stylisPlugins||CP,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,c,u=[hP,(c=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&c(e)})],d=function(e){var t=LM(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}([vP,wP].concat(i,u));o=function(e,t,n,r){l=n,function(e){pP(lP(e),d)}(e?e+"{"+t.styles+"}":t.styles),r&&(f.inserted[t.name]=!0)};var f={key:t,sheet:new xM({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return f.sheet.hydrate(s),f};!function(){if(kP)return EP;kP=1;var e=Wb(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},n={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},r={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},o={};function i(n){return e.isMemo(n)?r:o[n.$$typeof]||t}o[e.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o[e.Memo]=r;var a=Object.defineProperty,s=Object.getOwnPropertyNames,l=Object.getOwnPropertySymbols,c=Object.getOwnPropertyDescriptor,u=Object.getPrototypeOf,d=Object.prototype;EP=function e(t,r,o){if("string"!=typeof r){if(d){var f=u(r);f&&f!==d&&e(t,f,o)}var p=s(r);l&&(p=p.concat(l(r)));for(var h=i(t),m=i(r),g=0;g<p.length;++g){var y=p[g];if(!(n[y]||o&&o[y]||m&&m[y]||h&&h[y])){var b=c(r,y);try{a(t,y,b)}catch(e){}}}}return t}}();function _P(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}var IP=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},AP=function(e,t,n){IP(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}};var NP={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},OP=/[A-Z]|^ms/g,RP=/_EMO_([^_]+?)_([^]*?)_EMO_/g,TP=function(e){return 45===e.charCodeAt(1)},MP=function(e){return null!=e&&"boolean"!=typeof e},PP=mP((function(e){return TP(e)?e:e.replace(OP,"-$&").toLowerCase()})),DP=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(RP,(function(e,t,n){return BP={name:t,styles:n,next:BP},t}))}return 1===NP[e]||TP(e)||"number"!=typeof t||0===t?t:t+"px"};function jP(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return BP={name:o.name,styles:o.styles,next:BP},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)BP={name:a.name,styles:a.styles,next:BP},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=jP(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;null!=t&&void 0!==t[s]?r+=i+"{"+t[s]+"}":MP(s)&&(r+=PP(i)+":"+DP(i,s)+";")}else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var l=jP(e,t,a);switch(i){case"animation":case"animationName":r+=PP(i)+":"+l+";";break;default:r+=i+"{"+l+"}"}}else for(var c=0;c<a.length;c++)MP(a[c])&&(r+=PP(i)+":"+DP(i,a[c])+";")}return r}(e,t,n);case"function":if(void 0!==e){var s=BP,l=n(e);return BP=s,jP(e,t,l)}}var c=n;if(null==t)return c;var u=t[c];return void 0!==u?u:c}var BP,LP=/label:\s*([^\s;{]+)\s*(;|$)/g;function zP(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";BP=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=jP(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=jP(n,t,e[a]),r)o+=i[a]}LP.lastIndex=0;for(var s,l="";null!==(s=LP.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:BP}}var FP=!!e.useInsertionEffect&&e.useInsertionEffect||function(e){return e()},VP=e.createContext("undefined"!=typeof HTMLElement?SP({key:"css"}):null);VP.Provider;var GP,WP,HP=function(e){return r((function(t,n){var r=o(VP);return e(t,r,n)}))},XP=e.createContext({}),YP={}.hasOwnProperty,$P="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",ZP=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return IP(t,n,r),FP((function(){return AP(t,n,r)})),null},UP=HP((function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[$P],a=[o],s="";"string"==typeof t.className?s=_P(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=zP(a,void 0,e.useContext(XP));s+=n.key+"-"+l.name;var c={};for(var u in t)YP.call(t,u)&&"css"!==u&&u!==$P&&(c[u]=t[u]);return c.className=s,r&&(c.ref=r),e.createElement(e.Fragment,null,e.createElement(ZP,{cache:n,serialized:l,isStringTag:"string"==typeof i}),e.createElement(i,c))})),JP=UP,KP=function(t,n){var r=arguments;if(null==n||!YP.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=JP,i[1]=function(e,t){var n={};for(var r in t)YP.call(t,r)&&(n[r]=t[r]);return n[$P]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)};function qP(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return zP(t)}function QP(){var e=qP.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_"}}}GP=KP||(KP={}),WP||(WP=GP.JSX||(GP.JSX={}));var eD=/^((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|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)-.*))$/,tD=mP((function(e){return eD.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),nD=function(e){return"theme"!==e},rD=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?tD:nD},oD=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},iD=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return IP(t,n,r),FP((function(){return AP(t,n,r)})),null},aD=function t(n,r){var o,i,a=n.__emotion_real===n,s=a&&n.__emotion_base||n;void 0!==r&&(o=r.label,i=r.target);var l=oD(n,r,a),c=l||rD(s),u=!c("as");return function(){var d=arguments,f=a&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==o&&f.push("label:"+o+";"),null==d[0]||void 0===d[0].raw)f.push.apply(f,d);else{var p=d[0];f.push(p[0]);for(var h=d.length,m=1;m<h;m++)f.push(d[m],p[m])}var g=HP((function(t,n,r){var o=u&&t.as||s,a="",d=[],p=t;if(null==t.theme){for(var h in p={},t)p[h]=t[h];p.theme=e.useContext(XP)}"string"==typeof t.className?a=_P(n.registered,d,t.className):null!=t.className&&(a=t.className+" ");var m=zP(f.concat(d),n.registered,p);a+=n.key+"-"+m.name,void 0!==i&&(a+=" "+i);var g=u&&void 0===l?rD(o):c,y={};for(var b in t)u&&"as"===b||g(b)&&(y[b]=t[b]);return y.className=a,r&&(y.ref=r),e.createElement(e.Fragment,null,e.createElement(iD,{cache:n,serialized:m,isStringTag:"string"==typeof o}),e.createElement(o,y))}));return g.displayName=void 0!==o?o:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",g.defaultProps=n.defaultProps,g.__emotion_real=g,g.__emotion_base=s,g.__emotion_styles=f,g.__emotion_forwardProp=l,Object.defineProperty(g,"toString",{value:function(){return"."+i}}),g.withComponent=function(e,n){return t(e,wM({},r,n,{shouldForwardProp:oD(g,n,!0)})).apply(void 0,f)},g}}.bind(null);["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"].forEach((function(e){aD[e]=aD(e)}));const sD=[];function lD(e){return sD[0]=e,zP(sD)}function cD(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(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})),{})})(t),a=Object.keys(i);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function c(e,o){const i=a.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[a[i]]?t[a[i]]:o)-r/100}${n})`}return{keys:a,values:i,up:s,down:l,between:c,only:function(e){return a.indexOf(e)+1<a.length?c(e,a[a.indexOf(e)+1]):s(e)},not:function(e){const t=a.indexOf(e);return 0===t?s(a[1]):t===a.length-1?l(a[t]):c(e,a[a.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}const uD={borderRadius:4};function dD(e=8,t=zT({spacing:e})){if(e.mui)return e;const n=(...e)=>{"production"!==Q.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`));return(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ")};return n.mui=!0,n}function fD(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}function pD(e={},...t){const{breakpoints:n={},palette:r={},spacing:o,shape:i={},...a}=e;let s=xT({breakpoints:cD(n),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:dD(o),shape:{...uD,...i}},a);return s=function(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}(s),s.applyStyles=fD,s=t.reduce(((e,t)=>xT(e,t)),s),s.unstable_sxConfig={...bM,...a?.unstable_sxConfig},s.unstable_sx=function(e){return vM({sx:e,theme:this})},s}const hD=e=>e,mD=(()=>{let e=hD;return{configure(t){e=t},generate:t=>e(t),reset(){e=hD}}})(),gD={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 yD(e,t,n="Mui"){const r=gD[t];return r?`${n}-${r}`:`${mD.generate(e)}-${t}`}function bD(e,t,n="Mui"){const r={};return t.forEach((t=>{r[t]=yD(e,t,n)})),r}function vD(e,t=""){return e.displayName||e.name||t}function wD(e,t,n){const r=vD(t);return e.displayName||(""!==r?`${n}(${r})`:n)}function xD(e){const{variants:t,...n}=e,r={variants:t,style:lD(n),isProcessed:!0};return r.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=lD(e.style))})),r}const ED=pD();function kD(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function CD(e){return e?(t,n)=>n[e]:null}function SD(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>SD(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return _D(e,n.variants,[t])}return n?.isProcessed?n.style:n}function _D(e,t,n=[]){let r;e:for(let o=0;o<t.length;o+=1){const i=t[o];if("function"==typeof i.props){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(r))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?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(i.style(r))):n.push(i.style)}return n}function ID(e,t){let n;return"production"!==Q.env.NODE_ENV&&e&&(n=`${e}-${AD(t||"Root")}`),n}function AD(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}function ND(e,t){const n={...t};for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const o=r;if("components"===o||"slots"===o)n[o]={...e[o],...n[o]};else if("componentsProps"===o||"slotProps"===o){const r=e[o],i=t[o];if(i)if(r){n[o]={...i};for(const e in r)if(Object.prototype.hasOwnProperty.call(r,e)){const t=e;n[o][t]=ND(r[t],i[t])}}else n[o]=i;else n[o]=r||{}}else void 0===n[o]&&(n[o]=e[o])}return n}const OD="undefined"!=typeof window?e.useLayoutEffect:e.useEffect;function RD(e,t=0,n=1){return"production"!==Q.env.NODE_ENV&&(e<t||e>n)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${n}].`),function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}(e,t,n)}function TD(e){if(e.type)return e;if("#"===e.charAt(0))return TD(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),"production"!==Q.env.NODE_ENV&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error("production"!==Q.env.NODE_ENV?`MUI: Unsupported \`${e}\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:sT(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error("production"!==Q.env.NODE_ENV?`MUI: unsupported \`${r}\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:sT(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}const MD=(e,t)=>{try{return(e=>{const t=TD(e);return t.values.slice(0,3).map(((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e)).join(" ")})(e)}catch(n){return t&&"production"!==Q.env.NODE_ENV&&console.warn(t),e}};function PD(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function DD(e){e=TD(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let s="rgb";const l=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(s+="a",l.push(t[3])),PD({type:s,values:l})}function jD(e){let t="hsl"===(e=TD(e)).type||"hsla"===e.type?TD(DD(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 BD(e,t){const n=jD(e),r=jD(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function LD(e,t){return e=TD(e),t=RD(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,PD(e)}function zD(e,t,n){try{return LD(e,t)}catch(t){return e}}function FD(e,t){if(e=TD(e),t=RD(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return PD(e)}function VD(e,t,n){try{return FD(e,t)}catch(t){return e}}function GD(e,t){if(e=TD(e),t=RD(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return PD(e)}function WD(e,t,n){try{return GD(e,t)}catch(t){return e}}function HD(e,t,n){try{return function(e,t=.15){return jD(e)>.5?FD(e,t):GD(e,t)}(e,t)}catch(t){return e}}var XD,YD,$D=(XD=qb.elementType,YD=function(e,t,n,r,o){const i=e[t],a=o||t;if(null==i||"undefined"==typeof window)return null;let s;return"function"!=typeof i||function(e){const{prototype:t={}}=e;return Boolean(t.isReactComponent)}(i)||(s="Did you accidentally provide a plain function component instead?"),void 0!==s?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null},"production"===Q.env.NODE_ENV?()=>null:function(...e){return XD(...e)||YD(...e)});const ZD=qb.oneOfType([qb.func,qb.object]);function UD(t){const n=e.useRef(t);return OD((()=>{n.current=t})),e.useRef(((...e)=>(0,n.current)(...e))).current}function JD(...t){return e.useMemo((()=>t.every((e=>null==e))?null:e=>{t.forEach((t=>{!function(e,t){"function"==typeof e?e(t):e&&(e.current=t)}(t,e)}))}),t)}const KD={};function qD(t,n){const r=e.useRef(KD);return r.current===KD&&(r.current=t(n)),r}const QD=[];class ej{static create(){return new ej}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 tj(){const t=qD(ej.create).current;var n;return n=t.disposeEffect,e.useEffect(n,QD),t}function nj(e){try{return e.matches(":focus-visible")}catch(e){"production"===Q.env.NODE_ENV||/jsdom/.test(window.navigator.userAgent)||console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join("\n"))}return!1}function rj(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function oj(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:o,className:i}=e;if(!t){const e=oT(n?.className,i,o?.className,r?.className),t={...n?.style,...o?.style,...r?.style},a={...n,...o,...r};return e.length>0&&(a.className=e),Object.keys(t).length>0&&(a.style=t),{props:a,internalRef:void 0}}const a=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}({...o,...r}),s=rj(r),l=rj(o),c=t(a),u=oT(c?.className,n?.className,i,o?.className,r?.className),d={...c?.style,...n?.style,...o?.style,...r?.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}const ij=e.createContext(void 0);function aj({props:t,name:n}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const o=t.components[n];return o.defaultProps?ND(o.defaultProps,r):o.styleOverrides||o.variants?r:ND(o,r)}({props:t,name:n,theme:{components:e.useContext(ij)}})}"production"!==Q.env.NODE_ENV&&(qb.node,qb.object);const sj={theme:void 0};function lj(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}const cj=(e,t,n,r=[])=>{let o=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])}))};function uj(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},a={};var s,l;return s=(e,t,s)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((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)(e,t);Object.assign(o,{[r]:l}),cj(i,e,`var(${r})`,s),cj(a,e,`var(${r}, ${l})`,s)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach((([t,o])=>{(!l||l&&!l([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):s([...n,t],o,r))}))}(e),{css:o,vars:i,varsWithDefaults:a}}const dj={black:"#000",white:"#fff"},fj={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"},pj="#f3e5f5",hj="#ce93d8",mj="#ba68c8",gj="#ab47bc",yj="#9c27b0",bj="#7b1fa2",vj="#e57373",wj="#ef5350",xj="#f44336",Ej="#d32f2f",kj="#c62828",Cj="#ffb74d",Sj="#ffa726",_j="#ff9800",Ij="#f57c00",Aj="#e65100",Nj="#e3f2fd",Oj="#90caf9",Rj="#42a5f5",Tj="#1976d2",Mj="#1565c0",Pj="#4fc3f7",Dj="#29b6f6",jj="#03a9f4",Bj="#0288d1",Lj="#01579b",zj="#81c784",Fj="#66bb6a",Vj="#4caf50",Gj="#388e3c",Wj="#2e7d32",Hj="#1b5e20";function Xj(){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:dj.white,default:dj.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}}}const Yj=Xj();function $j(){return{text:{primary:dj.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:dj.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}}}const Zj=$j();function Uj(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=GD(e.main,o):"dark"===t&&(e.dark=FD(e.main,i)))}function Jj(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2,...o}=e,i=e.primary||function(e="light"){return"dark"===e?{main:Oj,light:Nj,dark:Rj}:{main:Tj,light:Rj,dark:Mj}}(t),a=e.secondary||function(e="light"){return"dark"===e?{main:hj,light:pj,dark:gj}:{main:yj,light:mj,dark:bj}}(t),s=e.error||function(e="light"){return"dark"===e?{main:xj,light:vj,dark:Ej}:{main:Ej,light:wj,dark:kj}}(t),l=e.info||function(e="light"){return"dark"===e?{main:Dj,light:Pj,dark:Bj}:{main:Bj,light:jj,dark:Lj}}(t),c=e.success||function(e="light"){return"dark"===e?{main:Fj,light:zj,dark:Gj}:{main:Wj,light:Vj,dark:Hj}}(t),u=e.warning||function(e="light"){return"dark"===e?{main:Sj,light:Cj,dark:Ij}:{main:"#ed6c02",light:_j,dark:Aj}}(t);function d(e){const t=BD(e,Zj.text.primary)>=n?Zj.text.primary:Yj.text.primary;if("production"!==Q.env.NODE_ENV){const n=BD(e,t);n<3&&console.error([`MUI: The contrast ratio of ${n}:1 for ${t} on ${e}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join("\n"))}return t}const f=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error("production"!==Q.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\nThe color object needs to have a \`main\` property or a \`${n}\` property.`:sT(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error("production"!==Q.env.NODE_ENV?`MUI: The color${t?` (${t})`:""} provided to augmentColor(color) is invalid.\n\`color.main\` should be a string, but \`${JSON.stringify(e.main)}\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from "@mui/material/colors";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });`:sT(12,t?` (${t})`:"",JSON.stringify(e.main)));return Uj(e,"light",o,r),Uj(e,"dark",i,r),e.contrastText||(e.contrastText=d(e.main)),e};let p;"light"===t?p=Xj():"dark"===t&&(p=$j()),"production"!==Q.env.NODE_ENV&&(p||console.error(`MUI: The palette mode \`${t}\` is not supported.`));return xT({common:{...dj},mode:t,primary:f({color:i,name:"primary"}),secondary:f({color:a,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:f({color:s,name:"error"}),warning:f({color:u,name:"warning"}),info:f({color:l,name:"info"}),success:f({color:c,name:"success"}),grey:fj,contrastThreshold:n,getContrastText:d,augmentColor:f,tonalOffset:r,...p},o)}function Kj(e){const t={};return Object.entries(e).forEach((e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)})),t}const qj={textTransform:"uppercase"},Qj='"Roboto", "Helvetica", "Arial", sans-serif';function eB(e,t){const{fontFamily:n=Qj,fontSize:r=14,fontWeightLight:o=300,fontWeightRegular:i=400,fontWeightMedium:a=500,fontWeightBold:s=700,htmlFontSize:l=16,allVariants:c,pxToRem:u,...d}="function"==typeof t?t(e):t;"production"!==Q.env.NODE_ENV&&("number"!=typeof r&&console.error("MUI: `fontSize` is required to be a number."),"number"!=typeof l&&console.error("MUI: `htmlFontSize` is required to be a number."));const f=r/14,p=u||(e=>e/l*f+"rem"),h=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===Qj?{letterSpacing:(a=o/t,Math.round(1e5*a)/1e5)+"em"}:{},...i,...c};var a},m={h1:h(o,96,1.167,-1.5),h2:h(o,60,1.2,-.5),h3:h(i,48,1.167,0),h4:h(i,34,1.235,.25),h5:h(i,24,1.334,0),h6:h(a,20,1.6,.15),subtitle1:h(i,16,1.75,.15),subtitle2:h(a,14,1.57,.1),body1:h(i,16,1.5,.15),body2:h(i,14,1.43,.15),button:h(a,14,1.75,.4,qj),caption:h(i,12,1.66,.4),overline:h(i,12,2.66,1,qj),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return xT({htmlFontSize:l,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:o,fontWeightRegular:i,fontWeightMedium:a,fontWeightBold:s,...m},d,{clone:!1})}function tB(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const nB=["none",tB(0,2,1,-1,0,1,1,0,0,1,3,0),tB(0,3,1,-2,0,2,2,0,0,1,5,0),tB(0,3,3,-2,0,3,4,0,0,1,8,0),tB(0,2,4,-1,0,4,5,0,0,1,10,0),tB(0,3,5,-1,0,5,8,0,0,1,14,0),tB(0,3,5,-1,0,6,10,0,0,1,18,0),tB(0,4,5,-2,0,7,10,1,0,2,16,1),tB(0,5,5,-3,0,8,10,1,0,3,14,2),tB(0,5,6,-3,0,9,12,1,0,3,16,2),tB(0,6,6,-3,0,10,14,1,0,4,18,3),tB(0,6,7,-4,0,11,15,1,0,4,20,3),tB(0,7,8,-4,0,12,17,2,0,5,22,4),tB(0,7,8,-4,0,13,19,2,0,5,24,4),tB(0,7,9,-4,0,14,21,2,0,5,26,4),tB(0,8,9,-5,0,15,22,2,0,6,28,5),tB(0,8,10,-5,0,16,24,2,0,6,30,5),tB(0,8,11,-5,0,17,26,2,0,6,32,5),tB(0,9,11,-5,0,18,28,2,0,7,34,6),tB(0,9,12,-6,0,19,29,2,0,7,36,6),tB(0,10,13,-6,0,20,31,3,0,8,38,7),tB(0,10,13,-6,0,21,33,3,0,8,40,7),tB(0,10,14,-6,0,22,35,3,0,8,42,7),tB(0,11,14,-7,0,23,36,3,0,9,44,8),tB(0,11,15,-7,0,24,38,3,0,9,46,8)],rB={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)"},oB={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function iB(e){return`${Math.round(e)}ms`}function aB(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function sB(e){const t={...rB,...e.easing},n={...oB,...e.duration};return{getAutoHeightDuration:aB,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:i=t.easeInOut,delay:a=0,...s}=r;if("production"!==Q.env.NODE_ENV){const t=e=>"string"==typeof e,n=e=>!Number.isNaN(parseFloat(e));t(e)||Array.isArray(e)||console.error('MUI: Argument "props" must be a string or Array.'),n(o)||t(o)||console.error(`MUI: Argument "duration" must be a number or a string but found ${o}.`),t(i)||console.error('MUI: Argument "easing" must be a string.'),n(a)||t(a)||console.error('MUI: Argument "delay" must be a number or a string.'),"object"!=typeof r&&console.error(["MUI: Secong argument of transition.create must be an object.","Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`"].join("\n")),0!==Object.keys(s).length&&console.error(`MUI: Unrecognized argument(s) [${Object.keys(s).join(",")}].`)}return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:iB(o)} ${i} ${"string"==typeof a?a:iB(a)}`)).join(",")},...e,easing:t,duration:n}}const lB={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function cB(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let o=0;o<n.length;o++){const[i,a]=n[o];!vT(r=a)&&void 0!==r&&"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&!Array.isArray(r)||i.startsWith("unstable_")?delete t[i]:vT(a)&&(t[i]={...a},e(t[i]))}var r}(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 uB(e={},...t){const{breakpoints:n,mixins:r={},spacing:o,palette:i={},transitions:a={},typography:s={},shape:l,...c}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error("production"!==Q.env.NODE_ENV?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":sT(20));const u=Jj(i),d=pD(e);let f=xT(d,{mixins:(p=d.breakpoints,h=r,{toolbar:{minHeight:56,[p.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[p.up("sm")]:{minHeight:64}},...h}),palette:u,shadows:nB.slice(),typography:eB(u,s),transitions:sB(a),zIndex:{...lB}});var p,h;if(f=xT(f,c),f=t.reduce(((e,t)=>xT(e,t)),f),"production"!==Q.env.NODE_ENV){const e=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],t=(t,n)=>{let r;for(r in t){const o=t[r];if(e.includes(r)&&Object.keys(o).length>0){if("production"!==Q.env.NODE_ENV){const e=yD("",r);console.error([`MUI: The \`${n}\` component increases the CSS specificity of the \`${r}\` internal state.`,"You can not override it like this: ",JSON.stringify(t,null,2),"",`Instead, you need to use the '&.${e}' syntax:`,JSON.stringify({root:{[`&.${e}`]:o}},null,2),"","https://mui.com/r/state-classes-guide"].join("\n"))}t[r]={}}}};Object.keys(f.components).forEach((e=>{const n=f.components[e].styleOverrides;n&&e.startsWith("Mui")&&t(n,e)}))}return f.unstable_sxConfig={...bM,...c?.unstable_sxConfig},f.unstable_sx=function(e){return vM({sx:e,theme:this})},f.toRuntimeSource=cB,f}const dB=[...Array(25)].map(((e,t)=>{if(0===t)return"none";const n=function(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`}));function fB(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function pB(e){return"dark"===e?dB:[]}function hB(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}var mB=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(a=e.cssVarPrefix,[...[...Array(25)].map(((e,t)=>`--${a?`${a}-`:""}overlays-${t}`)),`--${a?`${a}-`:""}palette-AppBar-darkBg`,`--${a?`${a}-`:""}palette-AppBar-darkColor`]).forEach((e=>{o[e]=n[e],delete n[e]})),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}var a;return r};function gB(e,t,n){!e[t]&&n&&(e[t]=n)}function yB(e){return"string"==typeof e&&e.startsWith("hsl")?DD(e):e}function bB(e,t){`${t}Channel`in e||(e[`${t}Channel`]=MD(yB(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.`))}const vB=e=>{try{return e()}catch(e){}};function wB(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=Jj(t);return{palette:i,opacity:{...fB(i.mode),...n},overlays:r||pB(i.mode),...o}}({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...a}=uB({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...fB(o),...t?.opacity},overlays:t?.overlays||pB(o)},a}function xB(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:r,disableCssColorScheme:o=!1,cssVarPrefix:i="mui",shouldSkipGeneratingVar:a=hB,colorSchemeSelector:s=(n.light&&n.dark?"media":void 0),rootSelector:l=":root",...c}=e,u=Object.keys(n)[0],d=r||(n.light&&"light"!==u?"light":u),f=((e="mui")=>lj(e))(i),{[d]:p,light:h,dark:m,...g}=n,y={...g};let b=p;if(("dark"===d&&!("dark"in n)||"light"===d&&!("light"in n))&&(b=!0),!b)throw new Error("production"!==Q.env.NODE_ENV?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:sT(21,d));const v=wB(y,b,c,d);h&&!y.light&&wB(y,h,void 0,"light"),m&&!y.dark&&wB(y,m,void 0,"dark");let w={defaultColorScheme:d,...v,cssVarPrefix:i,colorSchemeSelector:s,rootSelector:l,getCssVar:f,colorSchemes:y,font:{...Kj(v.typography),...v.font},spacing:(x=c.spacing,"number"==typeof x?`${x}px`:"string"==typeof x||"function"==typeof x||Array.isArray(x)?x:"8px")};var x;Object.keys(w.colorSchemes).forEach((e=>{const t=w.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return f(e,t[r][o])};if("light"===t.mode&&(gB(t.common,"background","#fff"),gB(t.common,"onBackground","#000")),"dark"===t.mode&&(gB(t.common,"background","#000"),gB(t.common,"onBackground","#fff")),function(e,t){t.forEach((t=>{e[t]||(e[t]={})}))}(t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),"light"===t.mode){gB(t.Alert,"errorColor",VD(t.error.light,.6)),gB(t.Alert,"infoColor",VD(t.info.light,.6)),gB(t.Alert,"successColor",VD(t.success.light,.6)),gB(t.Alert,"warningColor",VD(t.warning.light,.6)),gB(t.Alert,"errorFilledBg",n("palette-error-main")),gB(t.Alert,"infoFilledBg",n("palette-info-main")),gB(t.Alert,"successFilledBg",n("palette-success-main")),gB(t.Alert,"warningFilledBg",n("palette-warning-main")),gB(t.Alert,"errorFilledColor",vB((()=>t.getContrastText(t.error.main)))),gB(t.Alert,"infoFilledColor",vB((()=>t.getContrastText(t.info.main)))),gB(t.Alert,"successFilledColor",vB((()=>t.getContrastText(t.success.main)))),gB(t.Alert,"warningFilledColor",vB((()=>t.getContrastText(t.warning.main)))),gB(t.Alert,"errorStandardBg",WD(t.error.light,.9)),gB(t.Alert,"infoStandardBg",WD(t.info.light,.9)),gB(t.Alert,"successStandardBg",WD(t.success.light,.9)),gB(t.Alert,"warningStandardBg",WD(t.warning.light,.9)),gB(t.Alert,"errorIconColor",n("palette-error-main")),gB(t.Alert,"infoIconColor",n("palette-info-main")),gB(t.Alert,"successIconColor",n("palette-success-main")),gB(t.Alert,"warningIconColor",n("palette-warning-main")),gB(t.AppBar,"defaultBg",n("palette-grey-100")),gB(t.Avatar,"defaultBg",n("palette-grey-400")),gB(t.Button,"inheritContainedBg",n("palette-grey-300")),gB(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),gB(t.Chip,"defaultBorder",n("palette-grey-400")),gB(t.Chip,"defaultAvatarColor",n("palette-grey-700")),gB(t.Chip,"defaultIconColor",n("palette-grey-700")),gB(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),gB(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),gB(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),gB(t.LinearProgress,"primaryBg",WD(t.primary.main,.62)),gB(t.LinearProgress,"secondaryBg",WD(t.secondary.main,.62)),gB(t.LinearProgress,"errorBg",WD(t.error.main,.62)),gB(t.LinearProgress,"infoBg",WD(t.info.main,.62)),gB(t.LinearProgress,"successBg",WD(t.success.main,.62)),gB(t.LinearProgress,"warningBg",WD(t.warning.main,.62)),gB(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),gB(t.Slider,"primaryTrack",WD(t.primary.main,.62)),gB(t.Slider,"secondaryTrack",WD(t.secondary.main,.62)),gB(t.Slider,"errorTrack",WD(t.error.main,.62)),gB(t.Slider,"infoTrack",WD(t.info.main,.62)),gB(t.Slider,"successTrack",WD(t.success.main,.62)),gB(t.Slider,"warningTrack",WD(t.warning.main,.62));const e=HD(t.background.default,.8);gB(t.SnackbarContent,"bg",e),gB(t.SnackbarContent,"color",vB((()=>t.getContrastText(e)))),gB(t.SpeedDialAction,"fabHoverBg",HD(t.background.paper,.15)),gB(t.StepConnector,"border",n("palette-grey-400")),gB(t.StepContent,"border",n("palette-grey-400")),gB(t.Switch,"defaultColor",n("palette-common-white")),gB(t.Switch,"defaultDisabledColor",n("palette-grey-100")),gB(t.Switch,"primaryDisabledColor",WD(t.primary.main,.62)),gB(t.Switch,"secondaryDisabledColor",WD(t.secondary.main,.62)),gB(t.Switch,"errorDisabledColor",WD(t.error.main,.62)),gB(t.Switch,"infoDisabledColor",WD(t.info.main,.62)),gB(t.Switch,"successDisabledColor",WD(t.success.main,.62)),gB(t.Switch,"warningDisabledColor",WD(t.warning.main,.62)),gB(t.TableCell,"border",WD(zD(t.divider,1),.88)),gB(t.Tooltip,"bg",zD(t.grey[700],.92))}if("dark"===t.mode){gB(t.Alert,"errorColor",WD(t.error.light,.6)),gB(t.Alert,"infoColor",WD(t.info.light,.6)),gB(t.Alert,"successColor",WD(t.success.light,.6)),gB(t.Alert,"warningColor",WD(t.warning.light,.6)),gB(t.Alert,"errorFilledBg",n("palette-error-dark")),gB(t.Alert,"infoFilledBg",n("palette-info-dark")),gB(t.Alert,"successFilledBg",n("palette-success-dark")),gB(t.Alert,"warningFilledBg",n("palette-warning-dark")),gB(t.Alert,"errorFilledColor",vB((()=>t.getContrastText(t.error.dark)))),gB(t.Alert,"infoFilledColor",vB((()=>t.getContrastText(t.info.dark)))),gB(t.Alert,"successFilledColor",vB((()=>t.getContrastText(t.success.dark)))),gB(t.Alert,"warningFilledColor",vB((()=>t.getContrastText(t.warning.dark)))),gB(t.Alert,"errorStandardBg",VD(t.error.light,.9)),gB(t.Alert,"infoStandardBg",VD(t.info.light,.9)),gB(t.Alert,"successStandardBg",VD(t.success.light,.9)),gB(t.Alert,"warningStandardBg",VD(t.warning.light,.9)),gB(t.Alert,"errorIconColor",n("palette-error-main")),gB(t.Alert,"infoIconColor",n("palette-info-main")),gB(t.Alert,"successIconColor",n("palette-success-main")),gB(t.Alert,"warningIconColor",n("palette-warning-main")),gB(t.AppBar,"defaultBg",n("palette-grey-900")),gB(t.AppBar,"darkBg",n("palette-background-paper")),gB(t.AppBar,"darkColor",n("palette-text-primary")),gB(t.Avatar,"defaultBg",n("palette-grey-600")),gB(t.Button,"inheritContainedBg",n("palette-grey-800")),gB(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),gB(t.Chip,"defaultBorder",n("palette-grey-700")),gB(t.Chip,"defaultAvatarColor",n("palette-grey-300")),gB(t.Chip,"defaultIconColor",n("palette-grey-300")),gB(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),gB(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),gB(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),gB(t.LinearProgress,"primaryBg",VD(t.primary.main,.5)),gB(t.LinearProgress,"secondaryBg",VD(t.secondary.main,.5)),gB(t.LinearProgress,"errorBg",VD(t.error.main,.5)),gB(t.LinearProgress,"infoBg",VD(t.info.main,.5)),gB(t.LinearProgress,"successBg",VD(t.success.main,.5)),gB(t.LinearProgress,"warningBg",VD(t.warning.main,.5)),gB(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),gB(t.Slider,"primaryTrack",VD(t.primary.main,.5)),gB(t.Slider,"secondaryTrack",VD(t.secondary.main,.5)),gB(t.Slider,"errorTrack",VD(t.error.main,.5)),gB(t.Slider,"infoTrack",VD(t.info.main,.5)),gB(t.Slider,"successTrack",VD(t.success.main,.5)),gB(t.Slider,"warningTrack",VD(t.warning.main,.5));const e=HD(t.background.default,.98);gB(t.SnackbarContent,"bg",e),gB(t.SnackbarContent,"color",vB((()=>t.getContrastText(e)))),gB(t.SpeedDialAction,"fabHoverBg",HD(t.background.paper,.15)),gB(t.StepConnector,"border",n("palette-grey-600")),gB(t.StepContent,"border",n("palette-grey-600")),gB(t.Switch,"defaultColor",n("palette-grey-300")),gB(t.Switch,"defaultDisabledColor",n("palette-grey-600")),gB(t.Switch,"primaryDisabledColor",VD(t.primary.main,.55)),gB(t.Switch,"secondaryDisabledColor",VD(t.secondary.main,.55)),gB(t.Switch,"errorDisabledColor",VD(t.error.main,.55)),gB(t.Switch,"infoDisabledColor",VD(t.info.main,.55)),gB(t.Switch,"successDisabledColor",VD(t.success.main,.55)),gB(t.Switch,"warningDisabledColor",VD(t.warning.main,.55)),gB(t.TableCell,"border",VD(zD(t.divider,1),.68)),gB(t.Tooltip,"bg",zD(t.grey[700],.92))}bB(t.background,"default"),bB(t.background,"paper"),bB(t.common,"background"),bB(t.common,"onBackground"),bB(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&gB(t[e],"mainChannel",MD(yB(n.main))),n.light&&gB(t[e],"lightChannel",MD(yB(n.light))),n.dark&&gB(t[e],"darkChannel",MD(yB(n.dark))),n.contrastText&&gB(t[e],"contrastTextChannel",MD(yB(n.contrastText))),"text"===e&&(bB(t[e],"primary"),bB(t[e],"secondary")),"action"===e&&(n.active&&bB(t[e],"active"),n.selected&&bB(t[e],"selected")))}))})),w=t.reduce(((e,t)=>xT(e,t)),w);const E={prefix:i,disableCssColorScheme:o,shouldSkipGeneratingVar:a,getSelector:mB(w)},{vars:k,generateThemeVars:C,generateStyleSheets:S}=function(e,t={}){const{getSelector:n=g,disableCssColorScheme:r,colorSchemeSelector:o}=t,{colorSchemes:i={},components:a,defaultColorScheme:s="light",...l}=e,{vars:c,css:u,varsWithDefaults:d}=uj(l,t);let f=d;const p={},{[s]:h,...m}=i;if(Object.entries(m||{}).forEach((([e,n])=>{const{vars:r,css:o,varsWithDefaults:i}=uj(n,t);f=xT(f,i),p[e]={css:o,vars:r}})),h){const{css:e,vars:n,varsWithDefaults:r}=uj(h,t);f=xT(f,r),p[s]={css:e,vars:n}}function g(t,n){let r=o;if("class"===o&&(r=".%s"),"data"===o&&(r="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(r=`[${o}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=i[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:f,generateThemeVars:()=>{let e={...c};return Object.entries(p).forEach((([,{vars:t}])=>{e=xT(e,t)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function a(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}a(n(void 0,{...u}),u);const{[o]:s,...l}=p;if(s){const{css:e}=s,t=i[o]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};a(n(o,{...l}),l)}return Object.entries(l).forEach((([e,{css:t}])=>{const o=i[e]?.palette?.mode,s=!r&&o?{colorScheme:o,...t}:{...t};a(n(e,{...s}),s)})),t}}}(w,E);return w.vars=k,Object.entries(w.colorSchemes[w.defaultColorScheme]).forEach((([e,t])=>{w[e]=t})),w.generateThemeVars=C,w.generateStyleSheets=S,w.generateSpacing=function(){return dD(c.spacing,zT(this))},w.getColorSchemeSelector=function(e){return function(t){return"media"===e?("production"!==Q.env.NODE_ENV&&"light"!==t&&"dark"!==t&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${t}'.`),`@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)} &`:"&"}}(s),w.spacing=w.generateSpacing(),w.shouldSkipGeneratingVar=a,w.unstable_sxConfig={...bM,...c?.unstable_sxConfig},w.unstable_sx=function(e){return vM({sx:e,theme:this})},w.toRuntimeSource=cB,w}function EB(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:Jj({...!0===n?{}:n.palette,mode:t})})}const kB=function(e={},...t){const{palette:n,cssVariables:r=!1,colorSchemes:o=(n?void 0:{light:!0}),defaultColorScheme:i=n?.mode,...a}=e,s=i||"light",l=o?.[s],c={...o,...n?{[s]:{..."boolean"!=typeof l&&l,palette:n}}:void 0};if(!1===r){if(!("colorSchemes"in e))return uB(e,...t);let r=n;"palette"in e||c[s]&&(!0!==c[s]?r=c[s].palette:"dark"===s&&(r={mode:"dark"}));const o=uB({...e,palette:r},...t);return o.defaultColorScheme=s,o.colorSchemes=c,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==c.light&&c.light,palette:o.palette},EB(o,"dark",c.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==c.dark&&c.dark,palette:o.palette},EB(o,"light",c.light)),o}return n||"light"in c||"light"!==s||(c.light=!0),xB({...a,colorSchemes:c,defaultColorScheme:s,..."boolean"!=typeof r&&r},...t)}();const CB=function(e={}){const{themeId:t,defaultTheme:n=ED,rootShouldForwardProp:r=kD,slotShouldForwardProp:o=kD}=e;function i(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{!function(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}(e,(e=>e.filter((e=>e!==vM))));const{name:n,slot:a,skipVariantsResolver:s,skipSx:l,overridesResolver:c=CD(AD(a)),...u}=t,d=void 0!==s?s:a&&"Root"!==a&&"root"!==a||!1,f=l||!1;let p=kD;"Root"===a||"root"===a?p=r:a?p=o:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(p=void 0);const h=function(e,t){const n=aD(e,t);return"production"!==Q.env.NODE_ENV?(...t)=>{const r="string"==typeof e?`"${e}"`:"component";return 0===t.length?console.error([`MUI: Seems like you called \`styled(${r})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n")):t.some((e=>void 0===e))&&console.error(`MUI: the styled(${r})(...args) API requires all its args to be defined.`),n(...t)}:n}(e,{shouldForwardProp:p,label:ID(n,a),...u}),m=e=>{if("function"==typeof e&&e.__emotion_real!==e)return function(t){return SD(t,e)};if(vT(e)){const t=xD(e);return t.variants?function(e){return SD(e,t)}:t.style}return e},g=(...t)=>{const r=[],o=t.map(m),s=[];if(r.push(i),n&&c&&s.push((function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=SD(e,r[t]);return c(e,o)})),n&&!d&&s.push((function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?_D(e,r):null})),f||s.push(vM),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(s.length).fill("");let i;i=[...t,...e,...n],i.raw=[...t,...e.raw,...n],r.unshift(i)}const l=[...r,...o,...s],u=h(...l);return e.muiName&&(u.muiName=e.muiName),"production"!==Q.env.NODE_ENV&&(u.displayName=function(e,t,n){if(e)return`${e}${lT(t||"")}`;return`Styled(${function(e){if(null!=e){if("string"==typeof e)return e;if("function"==typeof e)return vD(e,"Component");if("object"==typeof e)switch(e.$$typeof){case bT.ForwardRef:return wD(e,e.render,"ForwardRef");case bT.Memo:return wD(e,e.type,"memo");default:return}}}(n)})`}(n,a,e)),u};return h.withConfig&&(g.withConfig=h.withConfig),g}}({themeId:"$$material",defaultTheme:kB,rootShouldForwardProp:e=>function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}(e)&&"classes"!==e}),SB=function(e){let t,n;return function(r){let o=t;return void 0!==o&&r.theme===n||(sj.theme=r.theme,o=xD(e(sj)),t=o,n=r.theme),o}};function _B(e){return aj(e)}function IB(e){return yD("MuiTable",e)}"production"!==Q.env.NODE_ENV&&(qb.node,qb.object.isRequired),bD("MuiTable",["root","stickyHeader"]);const AB=CB("table",{name:"MuiTable",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.stickyHeader&&t.stickyHeader]}})(SB((({theme:e})=>({display:"table",width:"100%",borderCollapse:"collapse",borderSpacing:0,"& caption":{...e.typography.body2,padding:e.spacing(2),color:(e.vars||e).palette.text.secondary,textAlign:"left",captionSide:"bottom"},variants:[{props:({ownerState:e})=>e.stickyHeader,style:{borderCollapse:"separate"}}]})))),NB="table",OB=e.forwardRef((function(t,n){const r=_B({props:t,name:"MuiTable"}),{className:o,component:i=NB,padding:a="normal",size:s="medium",stickyHeader:l=!1,...c}=r,u={...r,component:i,padding:a,size:s,stickyHeader:l},d=(e=>{const{classes:t,stickyHeader:n}=e;return iT({root:["root",n&&"stickyHeader"]},IB,t)})(u),f=e.useMemo((()=>({padding:a,size:s,stickyHeader:l})),[a,s,l]);return Lf.jsx(aT.Provider,{value:f,children:Lf.jsx(AB,{as:i,role:i===NB?null:"table",ref:n,className:oT(d.root,o),ownerState:u,...c})})}));"production"!==Q.env.NODE_ENV&&(OB.propTypes={children:qb.node,classes:qb.object,className:qb.string,component:qb.elementType,padding:qb.oneOf(["checkbox","none","normal"]),size:qb.oneOfType([qb.oneOf(["medium","small"]),qb.string]),stickyHeader:qb.bool,sx:qb.oneOfType([qb.arrayOf(qb.oneOfType([qb.func,qb.object,qb.bool])),qb.func,qb.object])});const RB=e.createContext();function TB(e){return yD("MuiTableBody",e)}"production"!==Q.env.NODE_ENV&&(RB.displayName="Tablelvl2Context"),bD("MuiTableBody",["root"]);const MB=CB("tbody",{name:"MuiTableBody",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-row-group"}),PB={variant:"body"},DB="tbody",jB=e.forwardRef((function(e,t){const n=_B({props:e,name:"MuiTableBody"}),{className:r,component:o=DB,...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return iT({root:["root"]},TB,t)})(a);return Lf.jsx(RB.Provider,{value:PB,children:Lf.jsx(MB,{className:oT(s.root,r),as:o,ref:t,role:o===DB?null:"rowgroup",ownerState:a,...i})})}));function BB(e){return yD("MuiTableCell",e)}"production"!==Q.env.NODE_ENV&&(jB.propTypes={children:qb.node,classes:qb.object,className:qb.string,component:qb.elementType,sx:qb.oneOfType([qb.arrayOf(qb.oneOfType([qb.func,qb.object,qb.bool])),qb.func,qb.object])});const LB=bD("MuiTableCell",["root","head","body","footer","sizeSmall","sizeMedium","paddingCheckbox","paddingNone","alignLeft","alignCenter","alignRight","alignJustify","stickyHeader"]),zB=CB("td",{name:"MuiTableCell",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${lT(n.size)}`],"normal"!==n.padding&&t[`padding${lT(n.padding)}`],"inherit"!==n.align&&t[`align${lT(n.align)}`],n.stickyHeader&&t.stickyHeader]}})(SB((({theme:e})=>({...e.typography.body2,display:"table-cell",verticalAlign:"inherit",borderBottom:e.vars?`1px solid ${e.vars.palette.TableCell.border}`:`1px solid\n ${"light"===e.palette.mode?GD(LD(e.palette.divider,1),.88):FD(LD(e.palette.divider,1),.68)}`,textAlign:"left",padding:16,variants:[{props:{variant:"head"},style:{color:(e.vars||e).palette.text.primary,lineHeight:e.typography.pxToRem(24),fontWeight:e.typography.fontWeightMedium}},{props:{variant:"body"},style:{color:(e.vars||e).palette.text.primary}},{props:{variant:"footer"},style:{color:(e.vars||e).palette.text.secondary,lineHeight:e.typography.pxToRem(21),fontSize:e.typography.pxToRem(12)}},{props:{size:"small"},style:{padding:"6px 16px",[`&.${LB.paddingCheckbox}`]:{width:24,padding:"0 12px 0 16px","& > *":{padding:0}}}},{props:{padding:"checkbox"},style:{width:48,padding:"0 0 0 4px"}},{props:{padding:"none"},style:{padding:0}},{props:{align:"left"},style:{textAlign:"left"}},{props:{align:"center"},style:{textAlign:"center"}},{props:{align:"right"},style:{textAlign:"right",flexDirection:"row-reverse"}},{props:{align:"justify"},style:{textAlign:"justify"}},{props:({ownerState:e})=>e.stickyHeader,style:{position:"sticky",top:0,zIndex:2,backgroundColor:(e.vars||e).palette.background.default}}]})))),FB=e.forwardRef((function(t,n){const r=_B({props:t,name:"MuiTableCell"}),{align:o="inherit",className:i,component:a,padding:s,scope:l,size:c,sortDirection:u,variant:d,...f}=r,p=e.useContext(aT),h=e.useContext(RB),m=h&&"head"===h.variant;let g;g=a||(m?"th":"td");let y=l;"td"===g?y=void 0:!y&&m&&(y="col");const b=d||h&&h.variant,v={...r,align:o,component:g,padding:s||(p&&p.padding?p.padding:"normal"),size:c||(p&&p.size?p.size:"medium"),sortDirection:u,stickyHeader:"head"===b&&p&&p.stickyHeader,variant:b},w=(e=>{const{classes:t,variant:n,align:r,padding:o,size:i,stickyHeader:a}=e;return iT({root:["root",n,a&&"stickyHeader","inherit"!==r&&`align${lT(r)}`,"normal"!==o&&`padding${lT(o)}`,`size${lT(i)}`]},BB,t)})(v);let x=null;return u&&(x="asc"===u?"ascending":"descending"),Lf.jsx(zB,{as:g,ref:n,className:oT(w.root,i),"aria-sort":x,scope:y,ownerState:v,...f})}));function VB(e){return yD("MuiTableContainer",e)}"production"!==Q.env.NODE_ENV&&(FB.propTypes={align:qb.oneOf(["center","inherit","justify","left","right"]),children:qb.node,classes:qb.object,className:qb.string,component:qb.elementType,padding:qb.oneOf(["checkbox","none","normal"]),scope:qb.string,size:qb.oneOfType([qb.oneOf(["medium","small"]),qb.string]),sortDirection:qb.oneOf(["asc","desc",!1]),sx:qb.oneOfType([qb.arrayOf(qb.oneOfType([qb.func,qb.object,qb.bool])),qb.func,qb.object]),variant:qb.oneOfType([qb.oneOf(["body","footer","head"]),qb.string])}),bD("MuiTableContainer",["root"]);const GB=CB("div",{name:"MuiTableContainer",slot:"Root",overridesResolver:(e,t)=>t.root})({width:"100%",overflowX:"auto"}),WB=e.forwardRef((function(e,t){const n=_B({props:e,name:"MuiTableContainer"}),{className:r,component:o="div",...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return iT({root:["root"]},VB,t)})(a);return Lf.jsx(GB,{ref:t,as:o,className:oT(s.root,r),ownerState:a,...i})}));function HB(e){return yD("MuiTableHead",e)}"production"!==Q.env.NODE_ENV&&(WB.propTypes={children:qb.node,classes:qb.object,className:qb.string,component:qb.elementType,sx:qb.oneOfType([qb.arrayOf(qb.oneOfType([qb.func,qb.object,qb.bool])),qb.func,qb.object])}),bD("MuiTableHead",["root"]);const XB=CB("thead",{name:"MuiTableHead",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"table-header-group"}),YB={variant:"head"},$B="thead",ZB=e.forwardRef((function(e,t){const n=_B({props:e,name:"MuiTableHead"}),{className:r,component:o=$B,...i}=n,a={...n,component:o},s=(e=>{const{classes:t}=e;return iT({root:["root"]},HB,t)})(a);return Lf.jsx(RB.Provider,{value:YB,children:Lf.jsx(XB,{as:o,className:oT(s.root,r),ref:t,role:o===$B?null:"rowgroup",ownerState:a,...i})})}));function UB(e){return yD("MuiTableRow",e)}"production"!==Q.env.NODE_ENV&&(ZB.propTypes={children:qb.node,classes:qb.object,className:qb.string,component:qb.elementType,sx:qb.oneOfType([qb.arrayOf(qb.oneOfType([qb.func,qb.object,qb.bool])),qb.func,qb.object])});const JB=bD("MuiTableRow",["root","selected","hover","head","footer"]),KB=CB("tr",{name:"MuiTableRow",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.head&&t.head,n.footer&&t.footer]}})(SB((({theme:e})=>({color:"inherit",display:"table-row",verticalAlign:"middle",outline:0,[`&.${JB.hover}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${JB.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:LD(e.palette.primary.main,e.palette.action.selectedOpacity),"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:LD(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)}}})))),qB="tr",QB=e.forwardRef((function(t,n){const r=_B({props:t,name:"MuiTableRow"}),{className:o,component:i=qB,hover:a=!1,selected:s=!1,...l}=r,c=e.useContext(RB),u={...r,component:i,hover:a,selected:s,head:c&&"head"===c.variant,footer:c&&"footer"===c.variant},d=(e=>{const{classes:t,selected:n,hover:r,head:o,footer:i}=e;return iT({root:["root",n&&"selected",r&&"hover",o&&"head",i&&"footer"]},UB,t)})(u);return Lf.jsx(KB,{as:i,ref:n,className:oT(d.root,o),role:i===qB?null:"row",ownerState:u,...l})}));"production"!==Q.env.NODE_ENV&&(QB.propTypes={children:qb.node,classes:qb.object,className:qb.string,component:qb.elementType,hover:qb.bool,selected:qb.bool,sx:qb.oneOfType([qb.arrayOf(qb.oneOfType([qb.func,qb.object,qb.bool])),qb.func,qb.object])});class eL{static create(){return new eL}static use(){const t=qD(eL.create).current,[n,r]=e.useState(!1);return t.shouldMount=n,t.setShouldMount=r,e.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}(),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 tL(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}function nL(e,t){return nL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},nL(e,t)}function rL(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,nL(e,t)}var oL=t.createContext(null);function iL(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function aL(e,t){var n=Object.create(null);return e&&g.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&h(e)?t(e):e}(e)})),n}function sL(e,t,n){return null!=n[t]?n[t]:e.props[t]}function lL(e,t,n){var r=aL(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var a in e)a in t?i.length&&(o[a]=i,i=[]):i.push(a);var s={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var c=o[l][r];s[o[l][r]]=n(c)}s[l]=n(l)}for(r=0;r<i.length;r++)s[i[r]]=n(i[r]);return s}(t,r);return Object.keys(o).forEach((function(i){var a=o[i];if(h(a)){var s=i in t,l=i in r,c=t[i],u=h(c)&&!c.props.in;!l||s&&!u?l||!s||u?l&&s&&h(c)&&(o[i]=m(a,{onExited:n.bind(null,a),in:c.props.in,exit:sL(a,"exit",e),enter:sL(a,"enter",e)})):o[i]=m(a,{in:!1}):o[i]=m(a,{onExited:n.bind(null,a),in:!0,exit:sL(a,"exit",e),enter:sL(a,"enter",e)})}})),o}var cL=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},uL=function(e){function n(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind(iL(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}rL(n,e);var r=n.prototype;return r.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},r.componentWillUnmount=function(){this.mounted=!1},n.getDerivedStateFromProps=function(e,t){var n,r,o=t.children,i=t.handleExited;return{children:t.firstRender?(n=e,r=i,aL(n.children,(function(e){return m(e,{onExited:r.bind(null,e),in:!0,appear:sL(e,"appear",n),enter:sL(e,"enter",n),exit:sL(e,"exit",n)})}))):lL(e,o,i),firstRender:!1}},r.handleExited=function(e,t){var n=aL(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=wM({},t.children);return delete n[e.key],{children:n}})))},r.render=function(){var e=this.props,n=e.component,r=e.childFactory,o=tL(e,["component","childFactory"]),i=this.state.contextValue,a=cL(this.state.children).map(r);return delete o.appear,delete o.enter,delete o.exit,null===n?t.createElement(oL.Provider,{value:i},a):t.createElement(oL.Provider,{value:i},t.createElement(n,o,a))},n}(t.Component);function dL(t){const{className:n,classes:r,pulsate:o=!1,rippleX:i,rippleY:a,rippleSize:s,in:l,onExited:c,timeout:u}=t,[d,f]=e.useState(!1),p=oT(n,r.ripple,r.rippleVisible,o&&r.ripplePulsate),h={width:s,height:s,top:-s/2+a,left:-s/2+i},m=oT(r.child,d&&r.childLeaving,o&&r.childPulsate);return l||d||f(!0),e.useEffect((()=>{if(!l&&null!=c){const e=setTimeout(c,u);return()=>{clearTimeout(e)}}}),[c,l,u]),Lf.jsx("span",{className:p,style:h,children:Lf.jsx("span",{className:m})})}uL.propTypes="production"!==Q.env.NODE_ENV?{component:qb.any,children:qb.node,appear:qb.bool,enter:qb.bool,exit:qb.bool,childFactory:qb.func}:{},uL.defaultProps={component:"div",childFactory:function(e){return e}},"production"!==Q.env.NODE_ENV&&(dL.propTypes={classes:qb.object.isRequired,className:qb.string,in:qb.bool,onExited:qb.func,pulsate:qb.bool,rippleSize:qb.number,rippleX:qb.number,rippleY:qb.number,timeout:qb.number.isRequired});const fL=bD("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),pL=QP`
79
27
  0% {
80
28
  transform: scale(0);
81
29
  opacity: 0.1;
@@ -85,7 +33,7 @@ function(e,t){const n=LM(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
85
33
  transform: scale(1);
86
34
  opacity: 0.3;
87
35
  }
88
- `,$j=RM`
36
+ `,hL=QP`
89
37
  0% {
90
38
  opacity: 1;
91
39
  }
@@ -93,7 +41,7 @@ function(e,t){const n=LM(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
93
41
  100% {
94
42
  opacity: 0;
95
43
  }
96
- `,Zj=RM`
44
+ `,mL=QP`
97
45
  0% {
98
46
  transform: scale(1);
99
47
  }
@@ -105,23 +53,23 @@ function(e,t){const n=LM(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
105
53
  100% {
106
54
  transform: scale(1);
107
55
  }
108
- `,Yj=nj("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Uj=nj(Hj,{name:"MuiTouchRipple",slot:"Ripple"})`
56
+ `,gL=CB("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),yL=CB(dL,{name:"MuiTouchRipple",slot:"Ripple"})`
109
57
  opacity: 0;
110
58
  position: absolute;
111
59
 
112
- &.${Wj.rippleVisible} {
60
+ &.${fL.rippleVisible} {
113
61
  opacity: 0.3;
114
62
  transform: scale(1);
115
- animation-name: ${Xj};
63
+ animation-name: ${pL};
116
64
  animation-duration: ${550}ms;
117
65
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
118
66
  }
119
67
 
120
- &.${Wj.ripplePulsate} {
68
+ &.${fL.ripplePulsate} {
121
69
  animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
122
70
  }
123
71
 
124
- & .${Wj.child} {
72
+ & .${fL.child} {
125
73
  opacity: 1;
126
74
  display: block;
127
75
  width: 100%;
@@ -130,28 +78,28 @@ function(e,t){const n=LM(e,t);return"production"!==process.env.NODE_ENV?(...t)=>
130
78
  background-color: currentColor;
131
79
  }
132
80
 
133
- & .${Wj.childLeaving} {
81
+ & .${fL.childLeaving} {
134
82
  opacity: 0;
135
- animation-name: ${$j};
83
+ animation-name: ${hL};
136
84
  animation-duration: ${550}ms;
137
85
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
138
86
  }
139
87
 
140
- & .${Wj.childPulsate} {
88
+ & .${fL.childPulsate} {
141
89
  position: absolute;
142
90
  /* @noflip */
143
91
  left: 0px;
144
92
  top: 0;
145
- animation-name: ${Zj};
93
+ animation-name: ${mL};
146
94
  animation-duration: 2500ms;
147
95
  animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
148
96
  animation-iteration-count: infinite;
149
97
  animation-delay: 200ms;
150
98
  }
151
- `,Jj=e.forwardRef((function(t,n){const r=oj({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=e.useState([]),u=e.useRef(0),d=e.useRef(null);e.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const f=e.useRef(!1),p=MP(),h=e.useRef(null),m=e.useRef(null),g=e.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,yd.jsx(Uj,{classes:{ripple:jO(i.ripple,Wj.ripple),rippleVisible:jO(i.rippleVisible,Wj.rippleVisible),ripplePulsate:jO(i.ripplePulsate,Wj.ripplePulsate),child:jO(i.child,Wj.child),childLeaving:jO(i.childLeaving,Wj.childLeaving),childPulsate:jO(i.childPulsate,Wj.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)])),u.current+=1,d.current=a}),[i]),y=e.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&f.current)return void(f.current=!1);"touchstart"===e?.type&&(f.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===h.current&&(h.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},p.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[o,g,p]),b=e.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=e.useCallback(((e,t)=>{if(p.clear(),"touchend"===e?.type&&h.current)return h.current(),h.current=null,void p.start(0,(()=>{v(e,t)}));h.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return e.useImperativeHandle(n,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),yd.jsx(Yj,{className:jO(Wj.root,i.root,a),ref:m,...s,children:yd.jsx(Gj,{component:null,exit:!0,children:l})})}));function Kj(e){return UM("MuiButtonBase",e)}"production"!==process.env.NODE_ENV&&(Jj.propTypes={center:Ty.bool,classes:Ty.object,className:Ty.string});const qj=JM("MuiButtonBase",["root","disabled","focusVisible"]),Qj=nj("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.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"},[`&.${qj.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),eB=e.forwardRef((function(t,n){const r=oj({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:h="a",onBlur:m,onClick:g,onContextMenu:y,onDragLeave:b,onFocus:v,onFocusVisible:w,onKeyDown:x,onKeyUp:k,onMouseDown:C,onMouseLeave:E,onMouseUp:S,onTouchEnd:_,onTouchMove:I,onTouchStart:A,tabIndex:N=0,TouchRippleProps:O,touchRippleRef:R,type:T,...M}=r,P=e.useRef(null),D=Tj.use(),j=AP(D.ref,R),[B,L]=e.useState(!1);c&&B&&L(!1),e.useImperativeHandle(o,(()=>({focusVisible:()=>{L(!0),P.current.focus()}})),[]);const z=D.shouldMount&&!u&&!c;e.useEffect((()=>{B&&f&&!u&&D.pulsate()}),[u,f,B,D]);const F=tB(D,"start",C,d),V=tB(D,"stop",y,d),G=tB(D,"stop",b,d),H=tB(D,"stop",S,d),W=tB(D,"stop",(e=>{B&&e.preventDefault(),E&&E(e)}),d),X=tB(D,"start",A,d),$=tB(D,"stop",_,d),Z=tB(D,"stop",I,d),Y=tB(D,"stop",(e=>{PP(e.target)||L(!1),m&&m(e)}),!1),U=IP((e=>{P.current||(P.current=e.currentTarget),PP(e.target)&&(L(!0),w&&w(e)),v&&v(e)})),J=()=>{const e=P.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},K=IP((e=>{f&&!e.repeat&&B&&" "===e.key&&D.stop(e,(()=>{D.start(e)})),e.target===e.currentTarget&&J()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&J()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),q=IP((e=>{f&&" "===e.key&&B&&!e.defaultPrevented&&D.stop(e,(()=>{D.pulsate(e)})),k&&k(e),g&&e.target===e.currentTarget&&J()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let Q=l;"button"===Q&&(M.href||M.to)&&(Q=h);const ee={};"button"===Q?(ee.type=void 0===T?"button":T,ee.disabled=c):(M.href||M.to||(ee.role="button"),c&&(ee["aria-disabled"]=c));const te=AP(n,P),ne={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:N,focusVisible:B},re=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=BO({root:["root",t&&"disabled",n&&"focusVisible"]},Kj,o);return n&&r&&(i.root+=` ${r}`),i})(ne);return yd.jsxs(Qj,{as:Q,className:jO(re.root,s),ownerState:ne,onBlur:Y,onClick:g,onContextMenu:V,onFocus:U,onKeyDown:K,onKeyUp:q,onMouseDown:F,onMouseLeave:W,onMouseUp:H,onDragLeave:G,onTouchEnd:$,onTouchMove:Z,onTouchStart:X,ref:te,tabIndex:c?-1:N,type:T,...ee,...M,children:[a,z?yd.jsx(Jj,{ref:j,center:i,...O}):null]})}));function tB(e,t,n,r=!1){return IP((o=>(n&&n(o),r||e[t](o),!0)))}function nB(e){return UM("MuiSvgIcon",e)}"production"!==process.env.NODE_ENV&&(eB.propTypes={action:_P,centerRipple:Ty.bool,children:Ty.node,classes:Ty.object,className:Ty.string,component:SP,disabled:Ty.bool,disableRipple:Ty.bool,disableTouchRipple:Ty.bool,focusRipple:Ty.bool,focusVisibleClassName:Ty.string,href:Ty.any,LinkComponent:Ty.elementType,onBlur:Ty.func,onClick:Ty.func,onContextMenu:Ty.func,onDragLeave:Ty.func,onFocus:Ty.func,onFocusVisible:Ty.func,onKeyDown:Ty.func,onKeyUp:Ty.func,onMouseDown:Ty.func,onMouseLeave:Ty.func,onMouseUp:Ty.func,onTouchEnd:Ty.func,onTouchMove:Ty.func,onTouchStart:Ty.func,sx:Ty.oneOfType([Ty.arrayOf(Ty.oneOfType([Ty.func,Ty.object,Ty.bool])),Ty.func,Ty.object]),tabIndex:Ty.number,TouchRippleProps:Ty.object,touchRippleRef:Ty.oneOfType([Ty.func,Ty.shape({current:Ty.shape({pulsate:Ty.func.isRequired,start:Ty.func.isRequired,stop:Ty.func.isRequired})})]),type:Ty.oneOfType([Ty.oneOf(["button","reset","submit"]),Ty.string])}),JM("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const rB=nj("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${FO(n.color)}`],t[`fontSize${FO(n.fontSize)}`]]}})(rj((({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}}]})))),oB=e.forwardRef((function(t,n){const r=oj({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,h=e.isValidElement(o)&&"svg"===o.type,m={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},g={};u||(g.viewBox=f);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return BO({root:["root","inherit"!==t&&`color${FO(t)}`,`fontSize${FO(n)}`]},nB,r)})(m);return yd.jsxs(rB,{as:s,className:jO(y.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...p,...h&&o.props,ownerState:m,children:[h?o.props.children:o,d?yd.jsx("title",{children:d}):null]})}));"production"!==process.env.NODE_ENV&&(oB.propTypes={children:Ty.node,classes:Ty.object,className:Ty.string,color:Ty.oneOfType([Ty.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),Ty.string]),component:Ty.elementType,fontSize:Ty.oneOfType([Ty.oneOf(["inherit","large","medium","small"]),Ty.string]),htmlColor:Ty.string,inheritViewBox:Ty.bool,shapeRendering:Ty.string,sx:Ty.oneOfType([Ty.arrayOf(Ty.oneOfType([Ty.func,Ty.object,Ty.bool])),Ty.func,Ty.object]),titleAccess:Ty.string,viewBox:Ty.string}),oB.muiName="SvgIcon";var iB=function(t,n){function r(e,r){return yd.jsx(oB,{"data-testid":`${n}Icon`,ref:r,...e,children:t})}return"production"!==process.env.NODE_ENV&&(r.displayName=`${n}Icon`),r.muiName=oB.muiName,e.memo(e.forwardRef(r))}(yd.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function aB(e){return UM("MuiTableSortLabel",e)}const sB=JM("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);function lB(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,p=u[e]||r,h=function(e,t,n){return"function"==typeof e?e(t,n):e}(d[e],o),{props:{component:m,...g},internalRef:y}=jP({className:n,...l,externalForwardedProps:"root"===e?f:void 0,externalSlotProps:h}),b=AP(y,h?.ref,t.ref),v="root"===e?m||c:m,w=function(e,t,n){return void 0===e||function(e){return"string"==typeof e}(e)?t:{...t,ownerState:{...t.ownerState,...n}}}(p,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...v&&!s&&{as:v},...v&&s&&{component:v},ref:b},o);return[p,w]}const cB=nj(eB,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(rj((({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${sB.icon}`]:{opacity:.5}},[`&.${sB.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${sB.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})))),uB=nj("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${FO(n.direction)}`]]}})(rj((({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]})))),dB=e.forwardRef((function(e,t){const n=oj({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:o,className:i,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=iB,slots:c={},slotProps:u={},...d}=n,f={...n,active:r,direction:a,hideSortIcon:s,IconComponent:l},p=(e=>{const{classes:t,direction:n,active:r}=e;return BO({root:["root",r&&"active",`direction${FO(n)}`],icon:["icon",`iconDirection${FO(n)}`]},aB,t)})(f),h={slots:c,slotProps:u},[m,g]=lB("root",{elementType:cB,externalForwardedProps:h,ownerState:f,className:jO(p.root,i),ref:t}),[y,b]=lB("icon",{elementType:uB,externalForwardedProps:h,ownerState:f,className:p.icon});return yd.jsxs(m,{disableRipple:!0,component:"span",...g,...d,children:[o,s&&!r?null:yd.jsx(y,{as:l,...b})]})}));"production"!==process.env.NODE_ENV&&(dB.propTypes={active:Ty.bool,children:Ty.node,classes:Ty.object,className:Ty.string,direction:Ty.oneOf(["asc","desc"]),hideSortIcon:Ty.bool,IconComponent:Ty.elementType,slotProps:Ty.shape({icon:Ty.oneOfType([Ty.func,Ty.object]),root:Ty.oneOfType([Ty.func,Ty.object])}),slots:Ty.shape({icon:Ty.elementType,root:Ty.elementType}),sx:Ty.oneOfType([Ty.arrayOf(Ty.oneOfType([Ty.func,Ty.object,Ty.bool])),Ty.func,Ty.object])});const fB=({tabledata:t})=>{const n=a((()=>(e=>{const t=[];if(void 0===e)return{header:[],rows:[]};void 0===e.data&&(e.data=[]),void 0===e.columns&&(0===e.data.length?e.columns=[]:e.columns=e.data[0].map(((e,t)=>`col${t}`))),void 0===e.index&&(e.index=e.data.map(((e,t)=>`row${t}`)));for(let n=0;n<e.index.length;n++){const r=[e.index[n]];for(let t=0;t<e.columns.length;t++)r.push(e.data[n][t]);t.push(r)}return{header:["index",...e.columns],rows:t}})(t)),[t]),[r,o]=c("asc"),[i,s]=c("index");let l=n.header.indexOf(i);-1===l&&(l=0);const u=((e,t)=>{const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>t(e[0],n[0]))),n.map((e=>e[0]))})(n.rows,(e=>"desc"===e?(e,t)=>t[l]<e[l]?-1:1:(e,t)=>e[l]<t[l]?-1:1)(r));return e.createElement(xj,{className:"tablecontainer"},e.createElement(lj,{size:"small"},e.createElement(_j,{className:"tableHead"},e.createElement(Rj,{className:"tableheadercolor"},n.header.map((t=>e.createElement(bj,{key:t,sortDirection:i===t&&r,className:"tableheadercolor"},e.createElement(dB,{active:i===t,direction:i===t?r:"asc",onClick:()=>(e=>{o(i===e&&"asc"===r?"desc":"asc"),s(e)})(t),className:"tableheadercolor",sx:{"& .MuiTableSortLabel-icon":{color:"inherit !important"}}},t)))))),e.createElement(hj,null,u.map(((n,r)=>e.createElement(Rj,{key:t.index[r]},n.map(((t,n)=>e.createElement(bj,{key:n,className:0==n?"indexcol":"datacol"},t)))))))))};var pB,hB={};
99
+ `,bL=e.forwardRef((function(t,n){const r=_B({props:t,name:"MuiTouchRipple"}),{center:o=!1,classes:i={},className:a,...s}=r,[l,c]=e.useState([]),u=e.useRef(0),d=e.useRef(null);e.useEffect((()=>{d.current&&(d.current(),d.current=null)}),[l]);const f=e.useRef(!1),p=tj(),h=e.useRef(null),m=e.useRef(null),g=e.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:a}=e;c((e=>[...e,Lf.jsx(yL,{classes:{ripple:oT(i.ripple,fL.ripple),rippleVisible:oT(i.rippleVisible,fL.rippleVisible),ripplePulsate:oT(i.ripplePulsate,fL.ripplePulsate),child:oT(i.child,fL.child),childLeaving:oT(i.childLeaving,fL.childLeaving),childPulsate:oT(i.childPulsate,fL.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},u.current)])),u.current+=1,d.current=a}),[i]),y=e.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:i=o||t.pulsate,fakeElement:a=!1}=t;if("mousedown"===e?.type&&f.current)return void(f.current=!1);"touchstart"===e?.type&&(f.current=!0);const s=a?null:m.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(i||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(i)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2==0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}e?.touches?null===h.current&&(h.current=()=>{g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},p.start(80,(()=>{h.current&&(h.current(),h.current=null)}))):g({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[o,g,p]),b=e.useCallback((()=>{y({},{pulsate:!0})}),[y]),v=e.useCallback(((e,t)=>{if(p.clear(),"touchend"===e?.type&&h.current)return h.current(),h.current=null,void p.start(0,(()=>{v(e,t)}));h.current=null,c((e=>e.length>0?e.slice(1):e)),d.current=t}),[p]);return e.useImperativeHandle(n,(()=>({pulsate:b,start:y,stop:v})),[b,y,v]),Lf.jsx(gL,{className:oT(fL.root,i.root,a),ref:m,...s,children:Lf.jsx(uL,{component:null,exit:!0,children:l})})}));function vL(e){return yD("MuiButtonBase",e)}"production"!==Q.env.NODE_ENV&&(bL.propTypes={center:qb.bool,classes:qb.object,className:qb.string});const wL=bD("MuiButtonBase",["root","disabled","focusVisible"]),xL=CB("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.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"},[`&.${wL.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),EL=e.forwardRef((function(t,n){const r=_B({props:t,name:"MuiButtonBase"}),{action:o,centerRipple:i=!1,children:a,className:s,component:l="button",disabled:c=!1,disableRipple:u=!1,disableTouchRipple:d=!1,focusRipple:f=!1,focusVisibleClassName:p,LinkComponent:h="a",onBlur:m,onClick:g,onContextMenu:y,onDragLeave:b,onFocus:v,onFocusVisible:w,onKeyDown:x,onKeyUp:E,onMouseDown:k,onMouseLeave:C,onMouseUp:S,onTouchEnd:_,onTouchMove:I,onTouchStart:A,tabIndex:N=0,TouchRippleProps:O,touchRippleRef:R,type:T,...M}=r,P=e.useRef(null),D=eL.use(),j=JD(D.ref,R),[B,L]=e.useState(!1);c&&B&&L(!1),e.useImperativeHandle(o,(()=>({focusVisible:()=>{L(!0),P.current.focus()}})),[]);const z=D.shouldMount&&!u&&!c;e.useEffect((()=>{B&&f&&!u&&D.pulsate()}),[u,f,B,D]);const F=kL(D,"start",k,d),V=kL(D,"stop",y,d),G=kL(D,"stop",b,d),W=kL(D,"stop",S,d),H=kL(D,"stop",(e=>{B&&e.preventDefault(),C&&C(e)}),d),X=kL(D,"start",A,d),Y=kL(D,"stop",_,d),$=kL(D,"stop",I,d),Z=kL(D,"stop",(e=>{nj(e.target)||L(!1),m&&m(e)}),!1),U=UD((e=>{P.current||(P.current=e.currentTarget),nj(e.target)&&(L(!0),w&&w(e)),v&&v(e)})),J=()=>{const e=P.current;return l&&"button"!==l&&!("A"===e.tagName&&e.href)},K=UD((e=>{f&&!e.repeat&&B&&" "===e.key&&D.stop(e,(()=>{D.start(e)})),e.target===e.currentTarget&&J()&&" "===e.key&&e.preventDefault(),x&&x(e),e.target===e.currentTarget&&J()&&"Enter"===e.key&&!c&&(e.preventDefault(),g&&g(e))})),q=UD((e=>{f&&" "===e.key&&B&&!e.defaultPrevented&&D.stop(e,(()=>{D.pulsate(e)})),E&&E(e),g&&e.target===e.currentTarget&&J()&&" "===e.key&&!e.defaultPrevented&&g(e)}));let Q=l;"button"===Q&&(M.href||M.to)&&(Q=h);const ee={};"button"===Q?(ee.type=void 0===T?"button":T,ee.disabled=c):(M.href||M.to||(ee.role="button"),c&&(ee["aria-disabled"]=c));const te=JD(n,P),ne={...r,centerRipple:i,component:l,disabled:c,disableRipple:u,disableTouchRipple:d,focusRipple:f,tabIndex:N,focusVisible:B},re=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i=iT({root:["root",t&&"disabled",n&&"focusVisible"]},vL,o);return n&&r&&(i.root+=` ${r}`),i})(ne);return Lf.jsxs(xL,{as:Q,className:oT(re.root,s),ownerState:ne,onBlur:Z,onClick:g,onContextMenu:V,onFocus:U,onKeyDown:K,onKeyUp:q,onMouseDown:F,onMouseLeave:H,onMouseUp:W,onDragLeave:G,onTouchEnd:Y,onTouchMove:$,onTouchStart:X,ref:te,tabIndex:c?-1:N,type:T,...ee,...M,children:[a,z?Lf.jsx(bL,{ref:j,center:i,...O}):null]})}));function kL(e,t,n,r=!1){return UD((o=>(n&&n(o),r||e[t](o),!0)))}function CL(e){return yD("MuiSvgIcon",e)}"production"!==Q.env.NODE_ENV&&(EL.propTypes={action:ZD,centerRipple:qb.bool,children:qb.node,classes:qb.object,className:qb.string,component:$D,disabled:qb.bool,disableRipple:qb.bool,disableTouchRipple:qb.bool,focusRipple:qb.bool,focusVisibleClassName:qb.string,href:qb.any,LinkComponent:qb.elementType,onBlur:qb.func,onClick:qb.func,onContextMenu:qb.func,onDragLeave:qb.func,onFocus:qb.func,onFocusVisible:qb.func,onKeyDown:qb.func,onKeyUp:qb.func,onMouseDown:qb.func,onMouseLeave:qb.func,onMouseUp:qb.func,onTouchEnd:qb.func,onTouchMove:qb.func,onTouchStart:qb.func,sx:qb.oneOfType([qb.arrayOf(qb.oneOfType([qb.func,qb.object,qb.bool])),qb.func,qb.object]),tabIndex:qb.number,TouchRippleProps:qb.object,touchRippleRef:qb.oneOfType([qb.func,qb.shape({current:qb.shape({pulsate:qb.func.isRequired,start:qb.func.isRequired,stop:qb.func.isRequired})})]),type:qb.oneOfType([qb.oneOf(["button","reset","submit"]),qb.string])}),bD("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const SL=CB("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${lT(n.color)}`],t[`fontSize${lT(n.fontSize)}`]]}})(SB((({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}}]})))),_L=e.forwardRef((function(t,n){const r=_B({props:t,name:"MuiSvgIcon"}),{children:o,className:i,color:a="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:d,viewBox:f="0 0 24 24",...p}=r,h=e.isValidElement(o)&&"svg"===o.type,m={...r,color:a,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:f,hasSvgAsChild:h},g={};u||(g.viewBox=f);const y=(e=>{const{color:t,fontSize:n,classes:r}=e;return iT({root:["root","inherit"!==t&&`color${lT(t)}`,`fontSize${lT(n)}`]},CL,r)})(m);return Lf.jsxs(SL,{as:s,className:oT(y.root,i),focusable:"false",color:c,"aria-hidden":!d||void 0,role:d?"img":void 0,ref:n,...g,...p,...h&&o.props,ownerState:m,children:[h?o.props.children:o,d?Lf.jsx("title",{children:d}):null]})}));"production"!==Q.env.NODE_ENV&&(_L.propTypes={children:qb.node,classes:qb.object,className:qb.string,color:qb.oneOfType([qb.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),qb.string]),component:qb.elementType,fontSize:qb.oneOfType([qb.oneOf(["inherit","large","medium","small"]),qb.string]),htmlColor:qb.string,inheritViewBox:qb.bool,shapeRendering:qb.string,sx:qb.oneOfType([qb.arrayOf(qb.oneOfType([qb.func,qb.object,qb.bool])),qb.func,qb.object]),titleAccess:qb.string,viewBox:qb.string}),_L.muiName="SvgIcon";var IL=function(t,n){function r(e,r){return Lf.jsx(_L,{"data-testid":`${n}Icon`,ref:r,...e,children:t})}return"production"!==Q.env.NODE_ENV&&(r.displayName=`${n}Icon`),r.muiName=_L.muiName,e.memo(e.forwardRef(r))}(Lf.jsx("path",{d:"M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"}),"ArrowDownward");function AL(e){return yD("MuiTableSortLabel",e)}const NL=bD("MuiTableSortLabel",["root","active","icon","iconDirectionDesc","iconDirectionAsc","directionDesc","directionAsc"]);function OL(e,t){const{className:n,elementType:r,ownerState:o,externalForwardedProps:i,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=i,p=u[e]||r,h=function(e,t,n){return"function"==typeof e?e(t,n):e}(d[e],o),{props:{component:m,...g},internalRef:y}=oj({className:n,...l,externalForwardedProps:"root"===e?f:void 0,externalSlotProps:h}),b=JD(y,h?.ref,t.ref),v="root"===e?m||c:m,w=function(e,t,n){return void 0===e||function(e){return"string"==typeof e}(e)?t:{...t,ownerState:{...t.ownerState,...n}}}(p,{..."root"===e&&!c&&!u[e]&&a,..."root"!==e&&!u[e]&&a,...g,...v&&!s&&{as:v},...v&&s&&{component:v},ref:b},o);return[p,w]}const RL=CB(EL,{name:"MuiTableSortLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.active&&t.active]}})(SB((({theme:e})=>({cursor:"pointer",display:"inline-flex",justifyContent:"flex-start",flexDirection:"inherit",alignItems:"center","&:focus":{color:(e.vars||e).palette.text.secondary},"&:hover":{color:(e.vars||e).palette.text.secondary,[`& .${NL.icon}`]:{opacity:.5}},[`&.${NL.active}`]:{color:(e.vars||e).palette.text.primary,[`& .${NL.icon}`]:{opacity:1,color:(e.vars||e).palette.text.secondary}}})))),TL=CB("span",{name:"MuiTableSortLabel",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,t[`iconDirection${lT(n.direction)}`]]}})(SB((({theme:e})=>({fontSize:18,marginRight:4,marginLeft:4,opacity:0,transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.shorter}),userSelect:"none",variants:[{props:{direction:"desc"},style:{transform:"rotate(0deg)"}},{props:{direction:"asc"},style:{transform:"rotate(180deg)"}}]})))),ML=e.forwardRef((function(e,t){const n=_B({props:e,name:"MuiTableSortLabel"}),{active:r=!1,children:o,className:i,direction:a="asc",hideSortIcon:s=!1,IconComponent:l=IL,slots:c={},slotProps:u={},...d}=n,f={...n,active:r,direction:a,hideSortIcon:s,IconComponent:l},p=(e=>{const{classes:t,direction:n,active:r}=e;return iT({root:["root",r&&"active",`direction${lT(n)}`],icon:["icon",`iconDirection${lT(n)}`]},AL,t)})(f),h={slots:c,slotProps:u},[m,g]=OL("root",{elementType:RL,externalForwardedProps:h,ownerState:f,className:oT(p.root,i),ref:t}),[y,b]=OL("icon",{elementType:TL,externalForwardedProps:h,ownerState:f,className:p.icon});return Lf.jsxs(m,{disableRipple:!0,component:"span",...g,...d,children:[o,s&&!r?null:Lf.jsx(y,{as:l,...b})]})}));"production"!==Q.env.NODE_ENV&&(ML.propTypes={active:qb.bool,children:qb.node,classes:qb.object,className:qb.string,direction:qb.oneOf(["asc","desc"]),hideSortIcon:qb.bool,IconComponent:qb.elementType,slotProps:qb.shape({icon:qb.oneOfType([qb.func,qb.object]),root:qb.oneOfType([qb.func,qb.object])}),slots:qb.shape({icon:qb.elementType,root:qb.elementType}),sx:qb.oneOfType([qb.arrayOf(qb.oneOfType([qb.func,qb.object,qb.bool])),qb.func,qb.object])});const PL=({tabledata:t})=>{const n=a((()=>(e=>{const t=[];if(void 0===e)return{header:[],rows:[]};void 0===e.data&&(e.data=[]),void 0===e.columns&&(0===e.data.length?e.columns=[]:e.columns=e.data[0].map(((e,t)=>`col${t}`))),void 0===e.index&&(e.index=e.data.map(((e,t)=>`row${t}`)));for(let n=0;n<e.index.length;n++){const r=[e.index[n]];for(let t=0;t<e.columns.length;t++)r.push(e.data[n][t]);t.push(r)}return{header:["index",...e.columns],rows:t}})(t)),[t]),[r,o]=c("asc"),[i,s]=c("index");let l=n.header.indexOf(i);-1===l&&(l=0);const u=((e,t)=>{const n=e.map(((e,t)=>[e,t]));return n.sort(((e,n)=>t(e[0],n[0]))),n.map((e=>e[0]))})(n.rows,(e=>"desc"===e?(e,t)=>t[l]<e[l]?-1:1:(e,t)=>e[l]<t[l]?-1:1)(r));return e.createElement(WB,{className:"tablecontainer"},e.createElement(OB,{size:"small"},e.createElement(ZB,{className:"tableHead"},e.createElement(QB,{className:"tableheadercolor"},n.header.map((t=>e.createElement(FB,{key:t,sortDirection:i===t&&r,className:"tableheadercolor"},e.createElement(ML,{active:i===t,direction:i===t?r:"asc",onClick:()=>(e=>{o(i===e&&"asc"===r?"desc":"asc"),s(e)})(t),className:"tableheadercolor",sx:{"& .MuiTableSortLabel-icon":{color:"inherit !important"}}},t)))))),e.createElement(jB,null,u.map(((n,r)=>e.createElement(QB,{key:t.index[r]},n.map(((t,n)=>e.createElement(FB,{key:n,className:0==n?"indexcol":"datacol"},t)))))))))};var DL,jL={};
152
100
  /*!
153
101
  * content-type
154
102
  * Copyright(c) 2015 Douglas Christopher Wilson
155
103
  * MIT Licensed
156
- */var mB=function(){if(pB)return hB;pB=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,o=/([\\"])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function a(e){var r=String(e);if(n.test(r))return r;if(r.length>0&&!t.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(o,"\\$1")+'"'}function s(e){this.parameters=Object.create(null),this.type=e}return hB.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!i.test(r))throw new TypeError("invalid type");var o=r;if(t&&"object"==typeof t)for(var s,l=Object.keys(t).sort(),c=0;c<l.length;c++){if(s=l[c],!n.test(s))throw new TypeError("invalid parameter name");o+="; "+s+"="+a(t[s])}return o},hB.parse=function(t){if(!t)throw new TypeError("argument string is required");var n="object"==typeof t?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(t):t;if("string"!=typeof n)throw new TypeError("argument string is required to be a string");var o=n.indexOf(";"),a=-1!==o?n.slice(0,o).trim():n.trim();if(!i.test(a))throw new TypeError("invalid media type");var l=new s(a.toLowerCase());if(-1!==o){var c,u,d;for(e.lastIndex=o;u=e.exec(n);){if(u.index!==o)throw new TypeError("invalid parameter format");o+=u[0].length,c=u[1].toLowerCase(),34===(d=u[2]).charCodeAt(0)&&-1!==(d=d.slice(1,-1)).indexOf("\\")&&(d=d.replace(r,"$1")),l.parameters[c]=d}if(o!==n.length)throw new TypeError("invalid parameter format")}return l},hB}(),gB=new Map,yB=function(e){return e.cloneNode(!0)},bB=function(){return"file:"===window.location.protocol},vB=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=mB.parse(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(bB()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||bB()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(e){if(r.abort(),!(e instanceof Error))throw e;n(e,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},wB={},xB=function(e,t){wB[e]=wB[e]||[],wB[e].push(t)},kB=function(e,t,n){if(gB.has(e)){var r=gB.get(e);if(void 0===r)return void xB(e,n);if(r instanceof SVGSVGElement)return void n(null,yB(r))}gB.set(e,void 0),xB(e,n),vB(e,t,(function(t,n){var r;t?gB.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&gB.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(wB[e])){var n=gB.get(e),r=wB[e][t];n instanceof SVGSVGElement&&r(null,yB(n)),n instanceof Error&&r(n),t===wB[e].length-1&&delete wB[e]}}),0)},n=0,r=wB[e].length;n<r;n++)t(n)}(e)}))},CB=function(e,t,n){vB(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},EB=0,SB=[],_B={},IB="http://www.w3.org/1999/xlink",AB=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==SB.indexOf(e))return SB.splice(SB.indexOf(e),1),void(e=null);SB.push(e),e.setAttribute("src",""),(r?kB:CB)(s,o,(function(r,o){if(!o)return SB.splice(SB.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var u=e.getAttribute("width");u&&o.setAttribute("width",u);var d=e.getAttribute("height");d&&o.setAttribute("height",d);var f=Array.from(new Set(af(af(af([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",f);var p=e.getAttribute("style");p&&o.setAttribute("style",p),o.setAttribute("data-src",s);var h=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(h,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var m,g,y,b,v,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){m=e,y=w[e];for(var t=function(e,t){var n;b=g[e].id,v=b+"-"+ ++EB,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+b+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+b+'"?\\)'))||n[t].setAttribute(e,"url(#"+v+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(IB,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(IB,"href","#"+v);g[e].id=v},n=0,r=(g=o.querySelectorAll(m+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var x,k,C=o.querySelectorAll("script"),E=[],S=0,_=C.length;S<_;S++)(k=C[S].getAttribute("type"))&&"application/ecmascript"!==k&&"application/javascript"!==k&&"text/javascript"!==k||((x=C[S].innerText||C[S].textContent)&&E.push(x),o.removeChild(C[S]));if(E.length>0&&("always"===t||"once"===t&&!_B[s])){for(var I=0,A=E.length;I<A;I++)new Function(E[I])(window);_B[s]=!0}var N=o.querySelectorAll("style");if(Array.prototype.forEach.call(N,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",IB),i(o),!e.parentNode)return SB.splice(SB.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),SB.splice(SB.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},NB=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],OB="http://www.w3.org/2000/svg",RB="http://www.w3.org/1999/xlink",TB=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},e.state=e.initialState,e._isMounted=!1,e.reactWrapper=void 0,e.nonReactWrapper=void 0,e.refCallback=function(t){e.reactWrapper=t},e}Dj(n,t);var r=n.prototype;return r.renderSVG=function(){var e=this;if(this.reactWrapper instanceof function(e){return((null==e?void 0:e.ownerDocument)||document).defaultView||window}(this.reactWrapper).Node){var t,n,r=this.props,o=r.desc,i=r.evalScripts,a=r.httpRequestWithCredentials,s=r.renumerateIRIElements,l=r.src,c=r.title,u=r.useRequestCache,d=this.props.onError,f=this.props.beforeInjection,p=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((t=document.createElementNS(OB,h)).setAttribute("xmlns",OB),t.setAttribute("xmlns:xlink",RB),n=document.createElementNS(OB,h)):(t=document.createElement(h),n=document.createElement(h)),t.appendChild(n),n.dataset.src=l,this.nonReactWrapper=this.reactWrapper.appendChild(t);var m=function(t){e.removeSVG(),e._isMounted?e.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){d(t)})):d(t)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,u=void 0===c||c,d=n.evalScripts,f=void 0===d?"never":d,p=n.httpRequestWithCredentials,h=void 0!==p&&p,m=n.renumerateIRIElements,g=void 0===m||m;if(e&&"length"in e)for(var y=0,b=0,v=e.length;b<v;b++)AB(e[b],f,g,u,h,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?AB(e,f,g,u,h,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(n,{afterEach:function(t,n){t?m(t):e._isMounted&&e.setState((function(){return{isLoading:!1}}),(function(){try{p(n)}catch(e){m(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),o){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=o,e.prepend(n)}if(c){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var i=document.createElement("title");i.innerHTML=c,e.prepend(i)}try{f(e)}catch(e){m(e)}},cacheRequests:u,evalScripts:i,httpRequestWithCredentials:a,renumerateIRIElements:s})}},r.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},r.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},r.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(qR({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},r.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},r.render=function(){var t=this.props;t.afterInjection,t.beforeInjection,t.desc,t.evalScripts;var n=t.fallback;t.httpRequestWithCredentials;var r=t.loading;t.renumerateIRIElements,t.src,t.title,t.useRequestCache;var o=t.wrapper,i=Mj(t,NB),a=o;return e.createElement(a,qR({},i,{ref:this.refCallback},"svg"===o?{xmlns:OB,xmlnsXlink:RB}:{}),this.state.isLoading&&r&&e.createElement(r,null),this.state.hasError&&n&&e.createElement(n,null))},n}(e.Component);TB.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},TB.propTypes={afterInjection:Ry.func,beforeInjection:Ry.func,desc:Ry.string,evalScripts:Ry.oneOf(["always","once","never"]),fallback:Ry.oneOfType([Ry.func,Ry.object,Ry.string]),httpRequestWithCredentials:Ry.bool,loading:Ry.oneOfType([Ry.func,Ry.object,Ry.string]),onError:Ry.func,renumerateIRIElements:Ry.bool,src:Ry.string.isRequired,title:Ry.string,useRequestCache:Ry.bool,wrapper:Ry.oneOf(["div","span","svg"])};const MB=({value:t})=>e.createElement(TB,{src:`data:image/svg+xml;base64,${btoa(t)}`,style:{maxWidth:"100%",maxHeight:"100%"},beforeInjection:e=>{e.classList.add("svg-class-name"),e.setAttribute("style","max-width: 100%; max-height: 100%;"),e.setAttribute("width","100%"),e.setAttribute("height","100%")}}),PB=({value:t,preValue:n,onLoaded:r})=>{const[o,i]=e.useState(n||t);return e.useEffect((()=>{if(t===n)return;const e=new Image;return e.onload=()=>{r?.(),i(t)},e.src=t,()=>{e.onload=null}}),[t,n,r]),void 0===o?e.createElement(e.Fragment,null):"string"!=typeof o?(console.error("Base64ImageOutput: value is not a string",o),e.createElement(e.Fragment,null)):e.createElement("img",{src:o,style:{maxWidth:"100%",maxHeight:"100%"}})},DB=({value:t})=>e.createElement(MB,{value:t}),jB=({value:t})=>{let n="";try{n=JSON.stringify(t)}catch(e){}return e.createElement("div",null,e.createElement("pre",null,n))},BB=({value:t})=>{if("string"!=typeof t||t.length%4!=0)return e.createElement("div",null,t);const n=Math.round(3*t.length/4);return e.createElement("div",null,e.createElement("pre",null,"Bytes(",n,")"))},LB=({value:t})=>e.createElement(fB,{tabledata:t||{columns:[],index:[],data:[]}}),zB=({value:t})=>e.createElement(PO,{data:t}),FB=zB,VB={string:jB,table:LB,image:PB,svg:DB,dict:zB,bytes:BB};function GB(e,[t,n]){return Math.min(n,Math.max(t,e))}var HB=["PageUp","PageDown"],WB=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],XB={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},$B="Slider",[ZB,YB,UB]=Ib($B),[JB,KB]=bd($B,[UB]),[qB,QB]=JB($B),eL=e.forwardRef(((t,n)=>{const{name:r,min:o=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[o],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:m,...g}=t,y=e.useRef(new Set),b=e.useRef(0),v="horizontal"===s?rL:oL,[w=[],x]=Sd({prop:d,defaultProp:u,onChange:e=>{const t=[...y.current];t[b.current]?.focus(),f(e)}}),k=e.useRef(w);function C(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(a),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-o)/a)*a+o,r),l=GB(s,[o,i]);x(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,c*a)){b.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&p(r),t?r:e}return e}))}return yd.jsx(qB,{scope:t.__scopeSlider,name:r,disabled:l,min:o,max:i,valueIndexToChangeRef:b,thumbs:y.current,values:w,orientation:s,form:m,children:yd.jsx(ZB.Provider,{scope:t.__scopeSlider,children:yd.jsx(ZB.Slot,{scope:t.__scopeSlider,children:yd.jsx(v,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:n,onPointerDown:ad(g.onPointerDown,(()=>{l||(k.current=w)})),min:o,max:i,inverted:h,onSlideStart:l?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(w,e);C(e,t)},onSlideMove:l?void 0:function(e){C(e,b.current)},onSlideEnd:l?void 0:function(){const e=k.current[b.current];w[b.current]!==e&&p(w)},onHomeKeyDown:()=>!l&&C(o,0,{commit:!0}),onEndKeyDown:()=>!l&&C(i,w.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=HB.includes(e.key)||e.shiftKey&&WB.includes(e.key)?10:1,r=b.current;C(w[r]+a*n*t,r,{commit:!0})}}})})})})}));eL.displayName=$B;var[tL,nL]=JB($B,{startEdge:"left",endEdge:"right",size:"width",direction:1}),rL=e.forwardRef(((t,n)=>{const{min:r,max:o,dir:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=t,[f,p]=e.useState(null),h=cd(n,(e=>p(e))),m=e.useRef(void 0),g=Nb(i),y="ltr"===g,b=y&&!a||!y&&a;function v(e){const t=m.current||f.getBoundingClientRect(),n=mL([0,t.width],b?[r,o]:[o,r]);return m.current=t,n(e-t.left)}return yd.jsx(tL,{scope:t.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:yd.jsx(iL,{dir:g,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=v(e.clientX);s?.(t)},onSlideMove:e=>{const t=v(e.clientX);l?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{const t=XB[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})})),oL=e.forwardRef(((t,n)=>{const{min:r,max:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=t,d=e.useRef(null),f=cd(n,d),p=e.useRef(void 0),h=!i;function m(e){const t=p.current||d.current.getBoundingClientRect(),n=mL([0,t.height],h?[o,r]:[r,o]);return p.current=t,n(e-t.top)}return yd.jsx(tL,{scope:t.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:yd.jsx(iL,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);a?.(t)},onSlideMove:e=>{const t=m(e.clientY);s?.(t)},onSlideEnd:()=>{p.current=void 0,l?.()},onStepKeyDown:e=>{const t=XB[h?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})})),iL=e.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=QB($B,n);return yd.jsx(Od.span,{...c,ref:t,onKeyDown:ad(e.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):HB.concat(WB).includes(e.key)&&(l(e),e.preventDefault())})),onPointerDown:ad(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)})),onPointerMove:ad(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:ad(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))}))})})),aL="SliderTrack",sL=e.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=QB(aL,n);return yd.jsx(Od.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));sL.displayName=aL;var lL="SliderRange",cL=e.forwardRef(((t,n)=>{const{__scopeSlider:r,...o}=t,i=QB(lL,r),a=nL(lL,r),s=cd(n,e.useRef(null)),l=i.values.length,c=i.values.map((e=>hL(e,i.min,i.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return yd.jsx(Od.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:s,style:{...t.style,[a.startEdge]:u+"%",[a.endEdge]:d+"%"}})}));cL.displayName=lL;var uL="SliderThumb",dL=e.forwardRef(((t,n)=>{const r=YB(t.__scopeSlider),[o,i]=e.useState(null),a=cd(n,(e=>i(e))),s=e.useMemo((()=>o?r().findIndex((e=>e.ref.current===o)):-1),[r,o]);return yd.jsx(fL,{...t,ref:a,index:s})})),fL=e.forwardRef(((t,n)=>{const{__scopeSlider:r,index:o,name:i,...a}=t,s=QB(uL,r),l=nL(uL,r),[c,u]=e.useState(null),d=cd(n,(e=>u(e))),f=!c||(s.form||!!c.closest("form")),p=aw(c),h=s.values[o],m=void 0===h?0:hL(h,s.min,s.max),g=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,s.values.length),y=p?.[l.size],b=y?function(e,t,n){const r=e/2,o=mL([0,50],[0,r]);return(r-o(t)*n)*n}(y,m,l.direction):0;return e.useEffect((()=>{if(c)return s.thumbs.add(c),()=>{s.thumbs.delete(c)}}),[c,s.thumbs]),yd.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${m}% + ${b}px)`},children:[yd.jsx(ZB.ItemSlot,{scope:t.__scopeSlider,children:yd.jsx(Od.span,{role:"slider","aria-label":t["aria-label"]||g,"aria-valuemin":s.min,"aria-valuenow":h,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...a,ref:d,style:void 0===h?{display:"none"}:t.style,onFocus:ad(t.onFocus,(()=>{s.valueIndexToChangeRef.current=o}))})}),f&&yd.jsx(pL,{name:i??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:h},o)]})}));dL.displayName=uL;var pL=t=>{const{value:n,...r}=t,o=e.useRef(null),i=function(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}(n);return e.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("input",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),yd.jsx("input",{style:{display:"none"},...r,ref:o,defaultValue:n})};function hL(e,t,n){return GB(100/(n-t)*(e-t),[0,100])}function mL(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}var gL=eL,yL=sL,bL=cL,vL=dL,wL=e.forwardRef(((e,t)=>yd.jsx(Od.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})));wL.displayName="VisuallyHidden";var xL=wL,[kL,CL]=bd("Tooltip",[cw]),EL=cw(),SL="TooltipProvider",_L=700,IL="tooltip.open",[AL,NL]=kL(SL),OL=t=>{const{__scopeTooltip:n,delayDuration:r=_L,skipDelayDuration:o=300,disableHoverableContent:i=!1,children:a}=t,[s,l]=e.useState(!0),c=e.useRef(!1),u=e.useRef(0);return e.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),yd.jsx(AL,{scope:n,isOpenDelayed:s,delayDuration:r,onOpen:e.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:e.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),o)}),[o]),isPointerInTransitRef:c,onPointerInTransitChange:e.useCallback((e=>{c.current=e}),[]),disableHoverableContent:i,children:a})};OL.displayName=SL;var RL="Tooltip",[TL,ML]=kL(RL),PL=t=>{const{__scopeTooltip:n,children:r,open:o,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=t,c=NL(RL,t.__scopeTooltip),u=EL(n),[d,f]=e.useState(null),p=Cd(),h=e.useRef(0),m=s??c.disableHoverableContent,g=l??c.delayDuration,y=e.useRef(!1),[b=!1,v]=Sd({prop:o,defaultProp:i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(IL))):c.onClose(),a?.(e)}}),w=e.useMemo((()=>b?y.current?"delayed-open":"instant-open":"closed"),[b]),x=e.useCallback((()=>{window.clearTimeout(h.current),h.current=0,y.current=!1,v(!0)}),[v]),k=e.useCallback((()=>{window.clearTimeout(h.current),h.current=0,v(!1)}),[v]),C=e.useCallback((()=>{window.clearTimeout(h.current),h.current=window.setTimeout((()=>{y.current=!0,v(!0),h.current=0}),g)}),[g,v]);return e.useEffect((()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)}),[]),yd.jsx(Sw,{...u,children:yd.jsx(TL,{scope:n,contentId:p,open:b,stateAttribute:w,trigger:d,onTriggerChange:f,onTriggerEnter:e.useCallback((()=>{c.isOpenDelayed?C():x()}),[c.isOpenDelayed,C,x]),onTriggerLeave:e.useCallback((()=>{m?k():(window.clearTimeout(h.current),h.current=0)}),[k,m]),onOpen:x,onClose:k,disableHoverableContent:m,children:r})})};PL.displayName=RL;var DL="TooltipTrigger",jL=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,...o}=t,i=ML(DL,r),a=NL(DL,r),s=EL(r),l=cd(n,e.useRef(null),i.onTriggerChange),c=e.useRef(!1),u=e.useRef(!1),d=e.useCallback((()=>c.current=!1),[]);return e.useEffect((()=>()=>document.removeEventListener("pointerup",d)),[d]),yd.jsx(_w,{asChild:!0,...s,children:yd.jsx(Od.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...o,ref:l,onPointerMove:ad(t.onPointerMove,(e=>{"touch"!==e.pointerType&&(u.current||a.isPointerInTransitRef.current||(i.onTriggerEnter(),u.current=!0))})),onPointerLeave:ad(t.onPointerLeave,(()=>{i.onTriggerLeave(),u.current=!1})),onPointerDown:ad(t.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})})),onFocus:ad(t.onFocus,(()=>{c.current||i.onOpen()})),onBlur:ad(t.onBlur,i.onClose),onClick:ad(t.onClick,i.onClose)})})}));jL.displayName=DL;var[BL,LL]=kL("TooltipPortal",{forceMount:void 0}),zL="TooltipContent",FL=e.forwardRef(((e,t)=>{const n=LL(zL,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=ML(zL,e.__scopeTooltip);return yd.jsx(qd,{present:r||a.open,children:a.disableHoverableContent?yd.jsx(WL,{side:o,...i,ref:t}):yd.jsx(VL,{side:o,...i,ref:t})})})),VL=e.forwardRef(((t,n)=>{const r=ML(zL,t.__scopeTooltip),o=NL(zL,t.__scopeTooltip),i=e.useRef(null),a=cd(n,i),[s,l]=e.useState(null),{trigger:c,onClose:u}=r,d=i.current,{onPointerInTransitChange:f}=o,p=e.useCallback((()=>{l(null),f(!1)}),[f]),h=e.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}(r,n.getBoundingClientRect()),i=function(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),a=function(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}(t)}([...i,...function(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())]);l(a),f(!0)}),[f]);return e.useEffect((()=>()=>p()),[p]),e.useEffect((()=>{if(c&&d){const e=e=>h(e,d),t=e=>h(e,c);return c.addEventListener("pointerleave",e),d.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),d.removeEventListener("pointerleave",t)}}}),[c,d,h,p]),e.useEffect((()=>{if(s){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||d?.contains(t),o=!function(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,l=t[i].x,c=t[i].y;s>r!=c>r&&n<(l-a)*(r-s)/(c-s)+a&&(o=!o)}return o}(n,s);r?p():o&&(p(),u())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,d,s,u,p]),yd.jsx(WL,{...t,ref:a})})),[GL,HL]=kL(RL,{isInside:!1}),WL=e.forwardRef(((t,n)=>{const{__scopeTooltip:r,children:o,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:s,...l}=t,c=ML(zL,r),u=EL(r),{onClose:d}=c;return e.useEffect((()=>(document.addEventListener(IL,d),()=>document.removeEventListener(IL,d))),[d]),e.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;t?.contains(c.trigger)&&d()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,d]),yd.jsx(Bd,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:d,children:yd.jsxs(Iw,{"data-state":c.stateAttribute,...u,...l,ref:n,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[yd.jsx(Ad,{children:o}),yd.jsx(GL,{scope:r,isInside:!0,children:yd.jsx(xL,{id:c.contentId,role:"tooltip",children:i||o})})]})})}));FL.displayName=zL;var XL="TooltipArrow";e.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=EL(n);return HL(XL,n).isInside?null:yd.jsx(Aw,{...o,...r,ref:t})})).displayName=XL;var $L,ZL,YL,UL,JL,KL,qL,QL,ez=PL,tz=jL,nz=FL;function rz(){if(UL)return YL;UL=1;const e=ZL?$L:(ZL=1,$L={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};YL=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}function r(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=i-o;let s,l;i===o?s=0:t===i?s=(n-r)/a:n===i?s=2+(r-t)/a:r===i&&(s=4+(t-n)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(o+i)/2;return l=i===o?0:c<=.5?a/(i+o):a/(2-i-o),[s,100*l,100*c]},n.rgb.hsv=function(e){let t,n,r,o,i;const a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),d=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/c,t=d(a),n=d(s),r=d(l),a===c?o=r-n:s===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const i=n.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[i,100*a,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const o=t[n];if(o)return o;let i,a=1/0;for(const t of Object.keys(e)){const o=r(n,e[t]);o<a&&(a=o,i=t)}return i},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],i=t[2];r/=95.047,o/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(r-o),200*(o-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,i,a;if(0===n)return a=255*r,[a,a,a];o=r<.5?r*(1+n):r+n-r*n;const s=2*r-o,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,a=6*i<1?s+6*(o-s)*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,l[e]=255*a;return l},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=i<=1?i:2-i;return[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*i),l=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let i,a;a=(2-n)*r;const s=(2-n)*o;return i=n*o,i/=s<=1?s:2-s,i=i||0,a/=2,[t,100*i,100*a]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let i;o>1&&(n/=o,r/=o);const a=Math.floor(6*t),s=1-r;i=6*t-a,1&a&&(i=1-i);const l=n+i*(s-n);let c,u,d;switch(a){default:case 6:case 0:c=s,u=l,d=n;break;case 1:c=l,u=s,d=n;break;case 2:c=n,u=s,d=l;break;case 3:c=n,u=l,d=s;break;case 4:c=l,u=n,d=s;break;case 5:c=s,u=n,d=l}return[255*c,255*u,255*d]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,i,a;return o=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,a=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[255*o,255*i,255*a]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,i=t**3,a=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,i]=e;let a=null===t?n.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let s=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(s+=60),s},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),a=o-i;let s,l;return s=a<1?i/(1-a):0,l=a<=0?0:o===t?(n-r)/a%6:o===n?2+(r-t)/a:4+(t-n)/a,l/=6,l%=1,[360*l,100*a,100*s]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],i=t%1*6,a=i%1,s=1-a;let l=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return l=(1-n)*r,[255*(n*o[0]+l),255*(n*o[1]+l),255*(n*o[2]+l)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},YL}function oz(){if(KL)return JL;KL=1;const e=rz();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,i=0;i<e;i++){const e=o[i],a=n[e];-1===a.distance&&(a.distance=n[t].distance+1,a.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let i=e[r[t].parent][t],a=r[t].parent;for(;r[a].parent;)o.unshift(r[a].parent),i=n(e[r[a].parent][a],i),a=r[a].parent;return i.conversion=o,i}return JL=function(e){const n=t(e),o={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(o[e]=r(e,n))}return o},JL}var iz=function(){if(QL)return qL;QL=1;const e=rz(),t=oz(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach((e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),qL=n}(),az=E({__proto__:null,default:I(iz)},[iz]);const sz=(e,t)=>{const n=Array.isArray(t)?t:[t];if(void 0===n[0]||null===n[0])return sz("rgb",[0,0,0]);const r=az[e];if(!r)throw new Error("Unsupported color type: "+e);r[e]=()=>n;const o=e=>{const t=e(...n);return Array.isArray(t)?null!=t[0]:t};if(!o(r.rgb)||!o(r.hsl))return sz("rgb",[0,0,0]);const i={};return Object.keys(r).forEach((t=>{const o=r[t];"function"==typeof o&&(i[t]=()=>t===e?n:o(...n))})),i},lz=({onChange:t,colorconverter:n,allow_null:r=!1})=>{if(null===n&&!r)throw new Error("Color converter is null");const[o,i]=c(n),[a,l]=c([0,0,0]),[u,d]=c([0,0,0]),[f,p]=c([0,0,0]),[h,m]=c("000");s((()=>{if(!o){if(!r)throw new Error("Color converter is null");return d([0,0,0]),l([0,0,0]),p([0,0,0]),void m("")}l(o.hsl()),d(o.rgb()),p(o.hsv()),m(o.hex())}),[o]);const g={backgroundColor:`hsl(${a[0]}, ${a[1]}%, ${a[2]}%)`,padding:"10px",margin:"10px 0"};return e.createElement("div",{style:{backgroundColor:"white"}},e.createElement("div",{style:g},"Color Preview"),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"RGB"),e.createElement("div",null),e.createElement("label",null,"Red"),e.createElement("input",{type:"range",min:"0",max:"255",value:u[0],onChange:e=>{const n=[parseInt(e.target.value),u[1],u[2]],r=sz("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #f00)"}}),e.createElement("label",null,"Green"),e.createElement("input",{type:"range",min:"0",max:"255",value:u[1],onChange:e=>{const n=[u[0],parseInt(e.target.value),u[2]],r=sz("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #0f0)"}}),e.createElement("label",null,"Blue"),e.createElement("input",{type:"range",min:"0",max:"255",value:u[2],onChange:e=>{const n=[u[0],u[1],parseInt(e.target.value)],r=sz("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #00f)"}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HSL"),e.createElement("div",null),e.createElement("label",null,"Hue"),e.createElement("input",{type:"range",min:"0",max:"360",value:a[0],onChange:e=>{const n=[parseInt(e.target.value),a[1],a[2]],r=sz("hsl",n);i(r),t(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),e.createElement("label",null,"Saturation"),e.createElement("input",{type:"range",min:"0",max:"100",value:a[1],onChange:e=>{const n=[a[0],parseInt(e.target.value),a[2]],r=sz("hsl",n);i(r),t(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),e.createElement("label",null,"Lightness"),e.createElement("input",{type:"range",min:"0",max:"100",value:a[2],onChange:e=>{const n=[a[0],a[1],parseInt(e.target.value)],r=sz("hsl",n);i(r),t(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%), #fff)`}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HSV"),e.createElement("div",null),e.createElement("label",null,"Hue"),e.createElement("input",{type:"range",min:"0",max:"360",value:f[0],onChange:e=>{const n=[parseInt(e.target.value),f[1],f[2]],r=sz("hsv",n);i(r),t(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),e.createElement("label",null,"Saturation"),e.createElement("input",{type:"range",min:"0",max:"100",value:f[1],onChange:e=>{const n=[f[0],parseInt(e.target.value),f[2]],r=sz("hsv",n);i(r),t(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),e.createElement("label",null,"Value"),e.createElement("input",{type:"range",min:"0",max:"100",value:f[2],onChange:e=>{const n=[f[0],f[1],parseInt(e.target.value)],r=sz("hsv",n);i(r),t(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%))`}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HEX"),e.createElement("div",null),e.createElement("input",{type:"text",value:h,onChange:e=>{const n=""===e.target.value?null:sz("hex",[e.target.value]);i(n),t(n)}})))},cz=({inicolordata:t,inicolorspace:n,allow_null:r=!1,delay:i=1e3,onChange:d})=>{const f=void 0!==t?t:[0,0,0],p=void 0===t?"rgb":n||"hex",h=Array.isArray(f)?f:[f],m=a((()=>{let e=sz(p,h);return void 0===e.rgb()&&(e=sz("rgb",[0,0,0])),e}),[p,h]),[g,y]=c(m);s((()=>{const e=void 0!==t?t:[0,0,0],r=void 0===t?"rgb":n||"hex",o=Array.isArray(e)?e:[e];let i=sz(r,o);void 0===i.rgb()&&(i=sz("rgb",[0,0,0])),y(i)}),[JSON.stringify(t),n]);const b=o(AG),v=b.local_state((()=>b.reactflowRef)),w=u(null),x=l((e=>{if(null===e&&!r)throw new Error("Color is null");null!==e&&y(e),w.current&&clearTimeout(w.current),d&&(w.current=setTimeout((()=>{d(e),w.current=null}),i))}),[r,d,i]);s((()=>()=>{w.current&&clearTimeout(w.current)}),[]);const k=a((()=>({background:"#"+g.hex(),borderRadius:"0.3rem",width:"2rem",height:"1rem"})),[g]);return e.createElement(dO,null,e.createElement(fO,{asChild:!0},e.createElement("button",{style:k})),e.createElement(pO,{container:v},e.createElement(hO,{side:"left",className:"iotooltipcontent"},e.createElement(lz,{onChange:x,colorconverter:g,allow_null:r}))))};function uz(e){return uz="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uz(e)}function dz(e){var t=function(e,t){if("object"!=uz(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=uz(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==uz(t)?t:t+""}function fz(e,t,n){return(t=dz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pz(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hz(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pz(Object(n),!0).forEach((function(t){fz(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pz(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mz(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function gz(e,t){if(e){if("string"==typeof e)return mz(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mz(e,t):void 0}}function yz(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||gz(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bz(e,t){if(null==e)return{};var n,r,o=Mj(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var vz=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function wz(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dz(r.key),r)}}function xz(e){return xz=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xz(e)}function kz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(kz=function(){return!!e})()}function Cz(e){var t=kz();return function(){var n,r=xz(e);if(t){var o=xz(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==uz(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Bj(e)}(this,n)}}function Ez(e){return function(e){if(Array.isArray(e))return mz(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||gz(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var Sz=d,_z=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Iz=function(){};function Az(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Nz(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(Az(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var Oz=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===uz(e)&&null!==e?[e]:[]},Rz=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,hz({},bz(e,_z))},Tz=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function Mz(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Pz(e){return Mz(e)?window.pageYOffset:e.scrollTop}function Dz(e,t){Mz(e)?window.scrollTo(0,t):e.scrollTop=t}function jz(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Iz,o=Pz(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);Dz(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function Bz(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Dz(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Dz(e,Math.max(t.offsetTop-o,0))}function Lz(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var zz=!1,Fz={get passive(){return zz=!0}},Vz="undefined"!=typeof window?window:{};Vz.addEventListener&&Vz.removeEventListener&&(Vz.addEventListener("p",Iz,Fz),Vz.removeEventListener("p",Iz,!1));var Gz=zz;function Hz(e){return null!=e}function Wz(e,t,n){return e?t:n}var Xz=["children","innerProps"],$z=["children","innerProps"];function Zz(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,h=f.height,m=f.top,g=n.offsetParent.getBoundingClientRect().top,y=a?window.innerHeight:Mz(u=l)?window.innerHeight:u.clientHeight,b=Pz(l),v=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=g-w,k=y-m,C=x+b,E=d-b-m,S=p-y+b+v,_=b+m-w,I=160;switch(o){case"auto":case"bottom":if(k>=h)return{placement:"bottom",maxHeight:t};if(E>=h&&!a)return i&&jz(l,S,I),{placement:"bottom",maxHeight:t};if(!a&&E>=r||a&&k>=r)return i&&jz(l,S,I),{placement:"bottom",maxHeight:a?k-v:E-v};if("auto"===o||a){var A=t,N=a?x:C;return N>=r&&(A=Math.min(N-v-s,t)),{placement:"top",maxHeight:A}}if("bottom"===o)return i&&Dz(l,S),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(C>=h&&!a)return i&&jz(l,_,I),{placement:"top",maxHeight:t};if(!a&&C>=r||a&&x>=r){var O=t;return(!a&&C>=r||a&&x>=r)&&(O=a?x-w:C-w),i&&jz(l,_,I),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var Yz,Uz=function(e){return"auto"===e?"bottom":e},Jz=i(null),Kz=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,s=e.menuShouldScrollIntoView,l=e.theme,d=(o(Jz)||{}).setPortalPlacement,f=u(null),p=yz(c(r),2),h=p[0],m=p[1],g=yz(c(null),2),y=g[0],b=g[1],v=l.spacing.controlHeight;return Sz((function(){var e=f.current;if(e){var t="fixed"===a,o=Zz({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:v});m(o.maxHeight),b(o.placement),null==d||d(o.placement)}}),[r,i,a,s,n,d,v]),t({ref:f,placerProps:hz(hz({},e),{},{placement:y||Uz(i),maxHeight:h})})},qz=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return NM("div",qR({},Tz(e,"menu",{menu:!0}),{ref:n},r),t)},Qz=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return hz({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},eF=Qz,tF=Qz,nF=["size"],rF=["innerProps","isRtl","size"];var oF="production"===process.env.NODE_ENV?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},iF=function(e){var t=e.size,n=bz(e,nF);return NM("svg",qR({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:oF},n))},aF=function(e){return NM(iF,qR({size:20},e),NM("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},sF=function(e){return NM(iF,qR({size:20},e),NM("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},lF=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return hz({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},cF=lF,uF=lF,dF=RM(Yz||(Yz=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),fF=function(e){var t=e.delay,n=e.offset;return NM("span",{css:OM({animation:"".concat(dF," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"production"===process.env.NODE_ENV?"":";label:LoadingDot;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},pF=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return NM("div",qR({ref:o},Tz(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},hF=["data"],mF=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return NM("div",qR({},Tz(e,"group",{group:!0}),s),NM(i,qR({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),NM("div",null,t))},gF=["innerRef","isDisabled","isHidden","inputClassName"],yF={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},bF={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":hz({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},yF)},vF=function(e){return hz({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},yF)},wF=function(e){var t=e.cx,n=e.value,r=Rz(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=bz(r,gF);return NM("div",qR({},Tz(e,"input",{"input-container":!0}),{"data-value":n||""}),NM("input",qR({className:t({input:!0},s),ref:o,style:vF(a),disabled:i},l)))},xF=function(e){var t=e.children,n=e.innerProps;return NM("div",n,t)};var kF=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return NM(l,{data:r,innerProps:hz(hz({},Tz(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},NM(c,{data:r,innerProps:hz({},Tz(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),NM(u,{data:r,innerProps:hz(hz({},Tz(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},CF=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return NM("div",qR({},Tz(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},EF=function(e){var t=e.children,n=e.innerProps;return NM("div",qR({},Tz(e,"placeholder",{placeholder:!0}),n),t)},SF=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return NM("div",qR({},Tz(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},_F={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return NM("div",qR({},Tz(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||NM(aF,null))},Control:pF,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return NM("div",qR({},Tz(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||NM(sF,null))},DownChevron:sF,CrossIcon:aF,Group:mF,GroupHeading:function(e){var t=Rz(e);t.data;var n=bz(t,hF);return NM("div",qR({},Tz(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return NM("div",qR({},Tz(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return NM("span",qR({},t,Tz(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:wF,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=bz(e,rF);return NM("div",qR({},Tz(hz(hz({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),NM(fF,{delay:0,offset:n}),NM(fF,{delay:160,offset:!0}),NM(fF,{delay:320,offset:!n}))},Menu:qz,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return NM("div",qR({},Tz(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,s=e.menuPosition,d=u(null),f=u(null),p=yz(c(Uz(i)),2),h=p[0],m=p[1],g=a((function(){return{setPortalPlacement:m}}),[]),y=yz(c(null),2),b=y[0],v=y[1],w=l((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===s?0:window.pageYOffset,n=e[h]+t;n===(null==b?void 0:b.offset)&&e.left===(null==b?void 0:b.rect.left)&&e.width===(null==b?void 0:b.rect.width)||v({offset:n,rect:e})}}),[r,s,h,null==b?void 0:b.offset,null==b?void 0:b.rect.left,null==b?void 0:b.rect.width]);Sz((function(){w()}),[w]);var x=l((function(){"function"==typeof f.current&&(f.current(),f.current=null),r&&d.current&&(f.current=jv(r,d.current,w,{elementResize:"ResizeObserver"in window}))}),[r,w]);Sz((function(){x()}),[x]);var k=l((function(e){d.current=e,x()}),[x]);if(!t&&"fixed"!==s||!b)return null;var E=NM("div",qR({ref:k},Tz(hz(hz({},e),{},{offset:b.offset,position:s,rect:b.rect}),"menuPortal",{"menu-portal":!0}),o),n);return NM(Jz.Provider,{value:g},t?C(E,t):E)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=bz(e,$z);return NM("div",qR({},Tz(hz(hz({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=bz(e,Xz);return NM("div",qR({},Tz(hz(hz({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:kF,MultiValueContainer:xF,MultiValueLabel:xF,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return NM("div",qR({role:"button"},n),t||NM(aF,{size:14}))},Option:CF,Placeholder:EF,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return NM("div",qR({},Tz(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:SF,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return NM("div",qR({},Tz(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},IF=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function AF(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||IF(r)&&IF(o)))return!1;var r,o;return!0}for(var NF="production"===process.env.NODE_ENV?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},OF=function(e){return NM("span",qR({css:NF},e))},RF={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",f="".concat(l?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},TF=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,s=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,h=l.isMulti,m=l.isOptionDisabled,g=l.isSearchable,y=l.menuIsOpen,v=l.options,w=l.screenReaderStatus,x=l.tabSelectsValue,k=l.isLoading,C=l["aria-label"],E=l["aria-live"],S=a((function(){return hz(hz({},RF),d||{})}),[d]),_=a((function(){var e,n="";if(t&&S.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?f(c):"",d=o||a||void 0,p=d?d.map(f):[],h=hz({isDisabled:c&&m(c,s),label:u,labels:p},t);n=S.onChange(h)}return n}),[t,S,m,s,f]),I=a((function(){var e="",t=n||r,i=!!(n&&s&&s.includes(n));if(t&&S.onFocus){var a={focused:t,label:f(t),isDisabled:m(t,s),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:s,isAppleDevice:u};e=S.onFocus(a)}return e}),[n,r,f,m,S,o,s,u]),A=a((function(){var e="";if(y&&v.length&&!k&&S.onFilter){var t=w({count:o.length});e=S.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,y,S,v,w,k]),N="initial-input-focus"===(null==t?void 0:t.action),O=a((function(){var e="";if(S.guidance){var t=r?"value":y?"menu":"input";e=S.guidance({"aria-label":C,context:t,isDisabled:n&&m(n,s),isMulti:h,isSearchable:g,tabSelectsValue:x,isInitialFocus:N})}return e}),[C,n,r,h,m,g,y,S,s,x,N]),R=NM(b,null,NM("span",{id:"aria-selection"},_),NM("span",{id:"aria-focused"},I),NM("span",{id:"aria-results"},A),NM("span",{id:"aria-guidance"},O));return NM(b,null,NM(OF,{id:c},N&&R),NM(OF,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!N&&R))},MF=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],PF=new RegExp("["+MF.map((function(e){return e.letters})).join("")+"]","g"),DF={},jF=0;jF<MF.length;jF++)for(var BF=MF[jF],LF=0;LF<BF.letters.length;LF++)DF[BF.letters[LF]]=BF.base;var zF=function(e){return e.replace(PF,(function(e){return DF[e]}))},FF=function(e,t){void 0===t&&(t=AF);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(zF),VF=function(e){return e.replace(/^\s+|\s+$/g,"")},GF=function(e){return"".concat(e.label," ").concat(e.value)},HF=["innerRef"];function WF(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=yz(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=yz(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(bz(e,HF),"onExited","in","enter","exit","appear");return NM("input",qR({ref:t},n,{css:OM({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"production"===process.env.NODE_ENV?"":";label:DummyInput;","production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var XF=["boxSizing","height","overflow","paddingRight","position"],$F={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function ZF(e){e.cancelable&&e.preventDefault()}function YF(e){e.stopPropagation()}function UF(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function JF(){return"ontouchstart"in window||navigator.maxTouchPoints}var KF=!("undefined"==typeof window||!window.document||!window.document.createElement),qF=0,QF={capture:!1,passive:!1};var eV=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},tV="production"===process.env.NODE_ENV?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}};function nV(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=u(!1),c=u(!1),d=u(0),f=u(null),p=l((function(e,t){if(null!==f.current){var s=f.current,l=s.scrollTop,u=s.scrollHeight,d=s.clientHeight,p=f.current,h=t>0,m=u-d-l,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&c.current&&(i&&i(e),c.current=!1),h&&t>m?(n&&!a.current&&n(e),p.scrollTop=u,g=!0,a.current=!0):!h&&-t>l&&(o&&!c.current&&o(e),p.scrollTop=0,g=!0,c.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),h=l((function(e){p(e,e.deltaY)}),[p]),m=l((function(e){d.current=e.changedTouches[0].clientY}),[]),g=l((function(e){var t=d.current-e.changedTouches[0].clientY;p(e,t)}),[p]),y=l((function(e){if(e){var t=!!Gz&&{passive:!1};e.addEventListener("wheel",h,t),e.addEventListener("touchstart",m,t),e.addEventListener("touchmove",g,t)}}),[g,m,h]),b=l((function(e){e&&(e.removeEventListener("wheel",h,!1),e.removeEventListener("touchstart",m,!1),e.removeEventListener("touchmove",g,!1))}),[g,m,h]);return s((function(){if(t){var e=f.current;return y(e),function(){b(e)}}}),[t,y,b]),function(e){f.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=u({}),i=u(null),a=l((function(e){if(KF){var t=document.body,n=t&&t.style;if(r&&XF.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&qF<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys($F).forEach((function(e){var t=$F[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&JF()&&(t.addEventListener("touchmove",ZF,QF),e&&(e.addEventListener("touchstart",UF,QF),e.addEventListener("touchmove",YF,QF))),qF+=1}}),[r]),c=l((function(e){if(KF){var t=document.body,n=t&&t.style;qF=Math.max(qF-1,0),r&&qF<1&&XF.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&JF()&&(t.removeEventListener("touchmove",ZF,QF),e&&(e.removeEventListener("touchstart",UF,QF),e.removeEventListener("touchmove",YF,QF)))}}),[r]);return s((function(){if(t){var e=i.current;return a(e),function(){c(e)}}}),[t,a,c]),function(e){i.current=e}}({isEnabled:n});return NM(b,null,n&&NM("div",{onClick:eV,css:tV}),t((function(e){o(e),i(e)})))}var rV="production"===process.env.NODE_ENV?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},oV=function(e){var t=e.name,n=e.onFocus;return NM("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:rV,value:"",onChange:function(){}})};function iV(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function aV(){return iV(/^Mac/i)}function sV(){return iV(/^iPhone/i)||iV(/^iPad/i)||aV()&&navigator.maxTouchPoints>1}var lV={clearIndicator:uF,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return hz({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:cF,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return hz({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return hz({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return hz(hz({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},bF),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return hz({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:tF,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return hz((fz(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),fz(n,"position","absolute"),fz(n,"width","100%"),fz(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return hz({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return hz({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return hz({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return hz({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:eF,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return hz({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return hz({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return hz({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return hz({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},cV={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},uV={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Lz(),captureMenuScroll:!Lz(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=hz({ignoreCase:!0,ignoreAccents:!0,stringify:GF,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,s=r.trim,l=r.matchFrom,c=s?VF(n):n,u=s?VF(a(t)):a(t);return o&&(c=c.toLowerCase(),u=u.toLowerCase()),i&&(c=FF(c),u=zF(u)),"start"===l?u.substr(0,c.length)===c:u.indexOf(c)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function dV(e,t,n,r){return{type:"option",data:t,isDisabled:vV(e,t,n),isSelected:wV(e,t,n),label:yV(e,t),value:bV(e,t),index:r}}function fV(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return dV(e,n,t,r)})).filter((function(t){return mV(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=dV(e,n,t,r);return mV(e,i)?i:void 0})).filter(Hz)}function pV(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Ez(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function hV(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,Ez(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function mV(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!kV(e)||!i)&&xV(e,{label:a,value:s,data:o},r)}var gV=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},yV=function(e,t){return e.getOptionLabel(t)},bV=function(e,t){return e.getOptionValue(t)};function vV(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function wV(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=bV(e,t);return n.some((function(t){return bV(e,t)===r}))}function xV(e,t,n){return!e.filterOption||e.filterOption(t,n)}var kV=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},CV=1,EV=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pj(e,t)}(n,y);var t=Cz(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=aV()||sV(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(Ez(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=Wz(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(Wz(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=Wz(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return gV(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return hV(fV(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Nz.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return yV(r.props,e)},r.getOptionValue=function(e){return bV(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=lV[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,hz(hz({},_F),e.components);var e},r.buildCategorizedOptions=function(){return fV(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return pV(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:hz({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Mz(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return kV(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!h||f&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++CV),r.state.selectValue=Oz(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=gV(o,i[a])}return r}return function(e,t,n){t&&wz(e.prototype,t),n&&wz(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Bz(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Bz(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(cV):hz(hz({},cV),this.props.theme):cV}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return vV(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return wV(this.props,e,t)}},{key:"filterOption",value:function(e,t){return xV(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,n=t.isDisabled,r=t.isSearchable,o=t.inputId,i=t.inputValue,a=t.tabIndex,s=t.form,l=t.menuIsOpen,c=t.required,u=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),g=hz(hz(hz({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?e.createElement(u,qR({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:n,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},g)):e.createElement(WF,qR({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Iz,onFocus:this.onInputFocus,disabled:n,tabIndex:a,inputMode:"none",form:s,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,l=n.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,f=u.isDisabled,p=u.isMulti,h=u.inputValue,m=u.placeholder,g=this.state,y=g.selectValue,b=g.focusedValue,v=g.isFocused;if(!this.hasValue()||!d)return h?null:e.createElement(l,qR({},c,{key:"placeholder",isDisabled:f,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return y.map((function(n,s){var l=n===b,u="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return e.createElement(r,qR({},c,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:f,key:u,index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))}));if(h)return null;var w=y[0];return e.createElement(s,qR({},c,{data:w,isDisabled:f}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,qR({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!t||!i)return null;return e.createElement(t,qR({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,r=t.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.createElement(r,qR({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,qR({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,l=n.LoadingMessage,c=n.NoOptionsMessage,u=n.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,m=p.inputValue,g=p.isLoading,y=p.loadingMessage,b=p.minMenuHeight,v=p.maxMenuHeight,w=p.menuIsOpen,x=p.menuPlacement,k=p.menuPosition,C=p.menuPortalTarget,E=p.menuShouldBlockScroll,S=p.menuShouldScrollIntoView,_=p.noOptionsMessage,I=p.onMenuScrollToTop,A=p.onMenuScrollToBottom;if(!w)return null;var N,O=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,l=n.label,c=n.value,p=f===i,h=a?void 0:function(){return t.onOptionHover(i)},m=a?void 0:function(){return t.selectOption(i)},g="".concat(t.getElementId("option"),"-").concat(r),y={id:g,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":t.isAppleDevice?void 0:s};return e.createElement(u,qR({},d,{innerProps:y,data:i,isDisabled:a,isSelected:s,key:g,label:l,type:o,value:c,isFocused:p,innerRef:p?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())N=this.getCategorizedOptions().map((function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,l="".concat(t.getElementId("group"),"-").concat(s),c="".concat(l,"-heading");return e.createElement(r,qR({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:c,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map((function(e){return O(e,"".concat(s,"-").concat(e.index))})))}if("option"===n.type)return O(n,"".concat(n.index))}));else if(g){var R=y({inputValue:m});if(null===R)return null;N=e.createElement(l,d,R)}else{var T=_({inputValue:m});if(null===T)return null;N=e.createElement(c,d,T)}var M={minMenuHeight:b,maxMenuHeight:v,menuPlacement:x,menuPosition:k,menuShouldScrollIntoView:S},P=e.createElement(Kz,qR({},d,M),(function(n){var r=n.ref,o=n.placerProps,s=o.placement,l=o.maxHeight;return e.createElement(i,qR({},d,M,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:g,placement:s}),e.createElement(nV,{captureEnabled:h,onTopArrive:I,onBottomArrive:A,lockEnabled:E},(function(n){return e.createElement(a,qR({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:t.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:f}),N)})))}));return C||"fixed"===k?e.createElement(s,qR({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:x,menuPosition:k}),P):P}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=n.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return e.createElement(oV,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(r){var c=l.map((function(e){return t.getOptionValue(e)})).join(r);return e.createElement("input",{name:a,type:"hidden",value:c})}var u=l.length>0?l.map((function(n,r){return e.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:t.getOptionValue(n)})})):e.createElement("input",{name:a,type:"hidden",value:""});return e.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return e.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,l=this.getFocusableOptions();return e.createElement(TF,qR({},t,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,s=a.className,l=a.id,c=a.isDisabled,u=a.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return e.createElement(o,qR({},f,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),e.createElement(n,qR({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),e.createElement(i,qR({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),e.createElement(r,qR({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=Oz(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var g=d?function(e,t){return pV(fV(e,t))}(e,h):[],y=d?hV(fV(e,h),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,v=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:v,focusedOptionId:gV(y,v),focusableOptionsWithIds:y,focusedValue:b,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,k=a&&s;return a&&!k&&(x={value:Wz(p,h,h[0]||null),options:h,action:"initial-input-focus"},k=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),hz(hz(hz({},m),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:k})}}]),n}();EV.defaultProps=uV;var SV=r((function(t,n){var r=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,u=e.menuIsOpen,d=e.onChange,f=e.onInputChange,p=e.onMenuClose,h=e.onMenuOpen,m=e.value,g=bz(e,vz),y=yz(c(void 0!==s?s:n),2),b=y[0],v=y[1],w=yz(c(void 0!==u?u:o),2),x=w[0],k=w[1],C=yz(c(void 0!==m?m:a),2),E=C[0],S=C[1],_=l((function(e,t){"function"==typeof d&&d(e,t),S(e)}),[d]),I=l((function(e,t){var n;"function"==typeof f&&(n=f(e,t)),v(void 0!==n?n:e)}),[f]),A=l((function(){"function"==typeof h&&h(),k(!0)}),[h]),N=l((function(){"function"==typeof p&&p(),k(!1)}),[p]),O=void 0!==s?s:b,R=void 0!==u?u:x,T=void 0!==m?m:E;return hz(hz({},g),{},{inputValue:O,menuIsOpen:R,onChange:_,onInputChange:I,onMenuClose:N,onMenuOpen:A,value:T})}(t);return e.createElement(EV,qR({ref:n},r))})),_V=SV;const IV=({options:t,items_per_page:n,className:r,defaultValue:o,onChange:i})=>{const[a,s]=c(""),[l,u]=c(0),d=t.filter((e=>e.label.toLowerCase().includes(a)||e.value.toLowerCase().includes(a)));var f;f=void 0!==n?d.slice(l*n,(l+1)*n):d;const p={control:e=>({...e,minHeight:void 0})};return e.createElement(_V,{options:f,onInputChange:e=>{s(e.toLowerCase()),u(0)},onChange:i,inputValue:a,isSearchable:!0,placeholder:"Select an option...",className:r,unstyled:!0,styles:p,classNamePrefix:"styled-select",defaultValue:o,value:o})},AV=({iostore:t,inputconverter:n,parser:r=e=>parseFloat(e)})=>{const o=e.useContext(AG),{preview:i}=t.valuestore(),a=t.use(),[s,l]=e.useState(n[1](i?.value));e.useEffect((()=>{l(n[1](i?.value))}),[i]);const c=e=>{e=r(parseFloat(e.toString()).toString()),isNaN(e)?(e="<NoValue>",l("")):(void 0!==a.value_options?.min&&e<a.value_options.min&&(e=a.value_options.min),void 0!==a.value_options?.max&&e>a.value_options.max&&(e=a.value_options.max),l(e.toString()));try{e=n[0](e)}catch(e){}o.worker?.set_io_value({nid:a.node,ioid:a.id,value:e,set_default:a.render_options.set_default})};let u=a.connected?n[1](i?.value):s;return void 0===u&&(u=a.value_options?.min),void 0===u&&(u=a.value_options?.max),void 0===u&&(u=""),null===u&&(u=""),void 0!==a.value_options?.max&&void 0!==a.value_options?.min?e.createElement("div",{style:{minWidth:"100px"},className:"SliderContainer"},e.createElement(gL,{className:"SliderRoot",value:[void 0===u?a.value_options?.min:u],min:a.value_options?.min,max:a.value_options?.max,step:a.value_options.step||(a.value_options?.max-a.value_options?.min)/1e3,disabled:a.connected,onValueCommit:e=>{isNaN(e[0])||c(e[0])},onValueChange:e=>{isNaN(e[0])||l(e[0].toString())}},e.createElement(yL,{className:"SliderTrack"},e.createElement(bL,{className:"SliderRange"})),e.createElement(OL,null,e.createElement(ez,{open:!0},e.createElement(tz,{asChild:!0},e.createElement(vL,{className:"SliderThumb"})),e.createElement(nz,{className:"SliderTooltipContent"},u))))):e.createElement("input",{type:"text",className:"nodedatainput styledinput numberinput",value:u,onChange:e=>l(e.target.value),onBlur:e=>{c(e.target.value)},onKeyDown:e=>{if("ArrowUp"!==e.key)if("ArrowDown"!==e.key)/^[0-9.eE+-]$/.test(e.key)||["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(e.key)||e.preventDefault();else{let t=a.value_options?.step||1;e.shiftKey&&(t*=10);let n=(parseFloat(u)||0)-t;c(n)}else{let t=a.value_options?.step||1;e.shiftKey&&(t*=10);let n=(parseFloat(u)||0)+t;c(n)}},disabled:a.connected,step:a.value_options?.step,min:a.value_options?.min,max:a.value_options?.max})},NV=({iostore:t,inputconverter:n})=>{const r=e.useContext(AG),{preview:o,full:i}=t.valuestore(),a=t.use(),s=void 0===i?o?.value:i?.value,[l,c]=e.useState(n[1](s));e.useEffect((()=>{c(n[1](s))}),[s]);let u=a.connected?n[1](s):l;return null==u&&(u=""),e.createElement("input",{className:"nodedatainput styledinput stringinput",value:u,onChange:e=>c(e.target.value),onBlur:e=>{let t=e.target.value;t||(t="<NoValue>");try{t=n[0](t)}catch(e){}r.worker?.set_io_value({nid:a.node,ioid:a.id,value:t,set_default:a.render_options.set_default})},disabled:a.connected})},OV=e=>e,RV=e=>parseFloat(e),TV=e=>!!e,MV=e=>"null"===e?null:e,PV=({iostore:t,inputconverter:n,parser:r})=>{const o=t.use(),{preview:i,full:a}=t.valuestore(),s=void 0===a?i?.value:a.value;let l=o.value_options?.options||[];Array.isArray(l)&&(l={type:"enum",values:l,keys:l.map((e=>null===e?"None":e.toString())),nullable:!1}),"enum"!==l.type&&(l={type:"enum",values:Object.values(l),keys:Object.keys(l),nullable:!1}),!l.nullable||l.values.includes(null)||l.keys.includes("None")||(l.values.unshift(null),l.keys.unshift("None"));const c=[];for(let e=0;e<l.values.length;e++){const t=null===l.values[e]||void 0===l.values[e]?"undefined":typeof l.values[e];let n=l.values[e];null===n&&(n="null"),void 0===n&&(n="undefined"),c.push([l.keys[e],n.toString(),t])}const u=e.useContext(AG),d=({value:e,datatype:t})=>{const i=r||(e=>"nuinputconvertermber"===e?RV:"boolean"===e?TV:"undefined"===e?MV:OV)(t);let a=i(e);try{a=n[0](e)}catch(e){}u.worker?.set_io_value({nid:o.node,ioid:o.id,value:a,set_default:o.render_options.set_default})};let f=s;null===f&&(f="null"),void 0===f&&(f="undefined");const p=c.find((e=>e[1]===f.toString()));let h;void 0!==p&&(h={value:p[1],label:p[0],datatype:p[2]});const m=c.map((e=>({value:e[1],label:e[0],datatype:e[2]})));return e.createElement(IV,{className:"nodedatainput styleddropdown",options:m,defaultValue:h,onChange:e=>{d(null!==e?e:{value:"<NoValue>",datatype:"string"})}})},DV={float:({iostore:e,inputconverter:t})=>AV({iostore:e,inputconverter:t,parser:parseFloat}),int:({iostore:e,inputconverter:t})=>AV({iostore:e,inputconverter:t,parser:parseInt}),bool:({iostore:t,inputconverter:n})=>{const r=e.useContext(AG),{preview:o}=t.valuestore(),i=t.use(),a=void 0===o?.value,s=e.useRef(null);e.useEffect((()=>{s.current&&(s.current.indeterminate=a)}),[s,a]);return e.createElement("input",{ref:s,type:"checkbox",className:"styledcheckbox booleaninput",checked:!!n[1](o?.value),onChange:e=>{let t=e.target.checked;try{t=n[0](e.target.checked)}catch(e){}r.worker?.set_io_value({nid:i.node,ioid:i.id,value:t,set_default:i.render_options.set_default})},disabled:i.connected})},string:NV,str:NV,color:({iostore:t})=>{const n=e.useContext(AG),r=t.use(),{preview:o,full:i}=t.valuestore(),a=void 0===i?o?.value:i.value,s=r.value_options?.colorspace||"hex";let l=!1;return"string"!=typeof r.type&&"anyOf"in r.type&&void 0!==r.type.anyOf&&(l=r.type.anyOf.some((e=>"None"===e))),e.createElement(cz,{onChange:e=>{let t="<NoValue>";e&&(t=e[s]?e[s]():e.hex()),null===e&&(t=null),n.worker?.set_io_value({nid:r.node,ioid:r.id,value:t,set_default:r.render_options.set_default})},inicolordata:a,allow_null:l,inicolorspace:s})},select:PV,enum:PV,bytes:((t,n=void 0)=>({iostore:r})=>{const{full:o,preview:i}=r.valuestore(),a=void 0===o?i:o,s=a?.value||n;return e.createElement(t,{iostore:r,value:s})})(BB,"")},jV=({iostore:t,typestring:n})=>{const{InLineRenderer:r}=e.useContext(WV),{preview:o,full:i}=t.valuestore();if(n&&r[n])return e.createElement("div",null,r[n]({iostore:t}));let a=(JSON.stringify(i||o)||"").replace(/\\n/g,"\n");return a.length>63&&(a=a.slice(0,60)+"..."),e.createElement("div",null,a)},BV=(t,n=void 0)=>({iostore:r})=>{const{full:o,preview:i}=r.valuestore(),a=void 0===o?i:o,s=a?.value||n;return e.createElement(t,{iostore:r,value:s})},LV={string:BV(jB),table:BV(LB),image:BV(PB),svg:BV(DB,""),dict:BV(zB,"{}"),bytes:BV(BB,"")},zV=t=>({iostore:n,value:r,preValue:o,onLoaded:i})=>e.createElement(t,{iostore:n,value:r,preValue:o,onLoaded:i}),FV=zV(zB),VV={Inputrenderer:DV,Outputrenderer:{},HandlePreviewRenderer:{},DataOverlayRenderer:{},DataPreviewViewRenderer:LV,DataViewRenderer:VB,InLineRenderer:gO,NodeContextExtenders:{},NodeRenderer:{},NodeHooks:{}},GV=(e,t)=>{const n=t.options||{},r=void 0===n.overwrite||n.overwrite;switch(t.type){case"EXTEND_INPUT_RENDER":return!r&&e.Inputrenderer[t.payload.type]?e:{...e,Inputrenderer:{...e.Inputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_OUTPUT_RENDER":return!r&&e.Outputrenderer[t.payload.type]?e:{...e,Outputrenderer:{...e.Outputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_HANDLE_PREVIEW_RENDER":return!r&&e.HandlePreviewRenderer[t.payload.type]?e:{...e,HandlePreviewRenderer:{...e.HandlePreviewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_OVERLAY_RENDER":return!r&&e.DataOverlayRenderer[t.payload.type]?e:{...e,DataOverlayRenderer:{...e.DataOverlayRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_PREVIEW_RENDER":return!r&&e.DataPreviewViewRenderer[t.payload.type]?e:{...e,DataPreviewViewRenderer:{...e.DataPreviewViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_VIEW_RENDER":return!r&&e.DataViewRenderer[t.payload.type]?e:{...e,DataViewRenderer:{...e.DataViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_CONTEXT_EXTENDER":return!r&&e.NodeContextExtenders[t.payload.type]?e:{...e,NodeContextExtenders:{...e.NodeContextExtenders,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_RENDERER":return!r&&e.NodeRenderer[t.payload.type]?e:{...e,NodeRenderer:{...e.NodeRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_HOOKS":return!r&&e.NodeHooks[t.payload.type]?e:{...e,NodeHooks:{...e.NodeHooks,[t.payload.type]:t.payload.component}};case"EXTEND_FROM_PLUGIN":let n=!1;const o=[[t.payload.plugin.input_renderers||{},e.Inputrenderer],[t.payload.plugin.output_renderers||{},e.Outputrenderer],[t.payload.plugin.handle_preview_renderers||{},e.HandlePreviewRenderer],[t.payload.plugin.data_overlay_renderers||{},e.DataOverlayRenderer],[t.payload.plugin.data_preview_renderers||{},e.DataPreviewViewRenderer],[t.payload.plugin.data_view_renderers||{},e.DataViewRenderer],[t.payload.plugin.node_context_extenders||{},e.NodeContextExtenders],[t.payload.plugin.node_renderers||{},e.NodeRenderer],[t.payload.plugin.node_hooks||{},e.NodeHooks]];for(const[e,t]of o){if(Object.keys(e).length>0)if(r)n=!0;else for(const r in e)if(!t[r]){n=!0;break}if(n)break}if(!n)return e;for(const[e,t]of o)for(const n in e)!r&&t[n]||(t[n]=e[n]);return{...e};default:return e}},HV=({children:t,plugins:n,fnrf_zst:r})=>{const[o,i]=v(GV,VV),a=(e,t)=>{i({type:"EXTEND_FROM_PLUGIN",payload:{plugin:e},options:t})};return s((()=>{for(const t in n){const o=n[t];if(!o)continue;const i=o.renderpluginfactory;i&&a(i({React:e,fnrf_zst:r,NodeContext:lG}))}}),[n]),e.createElement(WV.Provider,{value:{Inputrenderer:o.Inputrenderer,Outputrenderer:o.Outputrenderer,HandlePreviewRenderer:o.HandlePreviewRenderer,DataOverlayRenderer:o.DataOverlayRenderer,DataPreviewViewRenderer:o.DataPreviewViewRenderer,DataViewRenderer:o.DataViewRenderer,InLineRenderer:o.InLineRenderer,NodeContextExtenders:o.NodeContextExtenders,NodeRenderer:o.NodeRenderer,NodeHooks:o.NodeHooks,extendInputRenderMapping:(e,t,n)=>{i({type:"EXTEND_INPUT_RENDER",payload:{type:e,component:t},options:n})},extendOutputRenderMapping:(e,t,n)=>{i({type:"EXTEND_OUTPUT_RENDER",payload:{type:e,component:t},options:n})},extendHandlePreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_HANDLE_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataOverlayRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_OVERLAY_RENDER",payload:{type:e,component:t},options:n})},extendDataPreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataViewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_VIEW_RENDER",payload:{type:e,component:t},options:n})},extendNodeContextExtender:(e,t,n)=>{i({type:"EXTEND_NODE_CONTEXT_EXTENDER",payload:{type:e,component:t},options:n})},extendNodeRenderer:(e,t,n)=>{i({type:"EXTEND_NODE_RENDERER",payload:{type:e,component:t},options:n})},extendNodeHooks:(e,t,n)=>{i({type:"EXTEND_NODE_HOOKS",payload:{type:e,component:t},options:n})},extendFromPlugin:a}},t)},WV=i({Inputrenderer:VV.Inputrenderer,Outputrenderer:VV.Outputrenderer,HandlePreviewRenderer:VV.HandlePreviewRenderer,DataOverlayRenderer:VV.DataOverlayRenderer,DataPreviewViewRenderer:VV.DataPreviewViewRenderer,DataViewRenderer:VV.DataViewRenderer,InLineRenderer:VV.InLineRenderer,NodeContextExtenders:VV.NodeContextExtenders,NodeRenderer:VV.NodeRenderer,NodeHooks:VV.NodeHooks,extendInputRenderMapping:(e,t,n)=>{},extendOutputRenderMapping:(e,t,n)=>{},extendHandlePreviewRenderMapping:(e,t,n)=>{},extendDataOverlayRenderMapping:(e,t,n)=>{},extendDataPreviewRenderMapping:(e,t,n)=>{},extendDataViewRenderMapping:(e,t,n)=>{},extendNodeContextExtender:(e,t,n)=>{},extendNodeRenderer:(e,t,n)=>{},extendNodeHooks:(e,t,n)=>{},extendFromPlugin:(e,t)=>{}}),XV=e=>{const t=o(AG),{DataOverlayRenderer:n,DataViewRenderer:r}=o(WV);if(void 0===e)return;const i=t.render_options(),[a]=YV(e.type,i.typemap||{});return a?n[a]?n[a]:r[a]?zV(r[a]):FV:FV},$V=({iostore:t,Component:n})=>{const[r,o]=e.useState(void 0),[i,a]=e.useState(void 0),{full:s}=t.valuestore();e.useEffect((()=>{void 0===s?t.getState().try_get_full_value():a(s.value)}),[s]);return e.createElement(n,{iostore:t,value:i,preValue:r,onLoaded:()=>{void 0!==i&&o(i)}})},ZV=({iostore:t,Component:n})=>e.createElement(n,{iostore:t}),YV=(e,t)=>{if("string"==typeof e)return e in t?[t[e],e]:[e,e];if("allOf"in e&&void 0!==e.allOf)return[void 0,void 0];if("anyOf"in e&&void 0!==e.anyOf){const n=e.anyOf.map((e=>YV(e,t)));for(const e of n)switch(e[0]){case"bool":return["bool",e[1]];case"enum":return["enum",e[1]];case"float":return["float",e[1]];case"int":return["int",e[1]];case"string":case"str":return["string",e[1]]}return[void 0,void 0]}return"type"in e&&void 0!==e.type&&"enum"===e.type?["enum","enum"]:[void 0,void 0]},UV=({iostore:t,typestring:n,preview:r,...i})=>{const[a,s]=c(!1),[l,u]=c(!1),d=e.useContext(AG),f=t.use(),[p,h]=(e=>{const t=o(AG).render_options(),{HandlePreviewRenderer:n,DataPreviewViewRenderer:r}=o(WV),i=XV(e);let a;if(e){const[o]=YV(e.type,t.typemap||{});a=o?n[o]?n[o]:r[o]?r[o]:BV(FB):BV(FB)}return[a,i]})(f),m=d.local_state((()=>d.reactflowRef));return e.createElement(dO,{open:a||l,onOpenChange:u},e.createElement(fO,{asChild:!0},e.createElement(Bi,{id:f.id,"data-type":n,...i})),e.createElement(pO,{container:m},e.createElement(hO,{className:"iotooltipcontent",sideOffset:5},e.createElement("div",{className:"iotooltip_container"},e.createElement("div",{className:"iotooltip_header"},a?e.createElement(kb,{onClick:()=>s(!1)}):e.createElement(xb,{onClick:()=>s(!0)}),h&&e.createElement(_b,{title:f.full_id,trigger:e.createElement(pb,null),onOpenChange:e=>{e&&f.try_get_full_value&&f.try_get_full_value(),s(e)}},e.createElement($V,{Component:h,iostore:t}))),p?e.createElement(ZV,{Component:p,iostore:t}):`no preview available for "${n}"`),e.createElement(mO,{className:"iotooltipcontentarrow"}))))},JV={"":[e=>e,e=>e],str_to_json:[e=>JSON.parse(e),e=>"string"==typeof e?e:JSON.stringify(e)],str_to_list:[e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t:[t]}catch(t){try{return JSON.parse("["+e+"]")}catch(e){}}throw new Error("Invalid list")},e=>JSON.stringify(e)]},KV=({iostore:t})=>{const n=o(AG).render_options(),r=t.use(),[i,a]=YV(r.render_options.type,n.typemap||{}),{Inputrenderer:s}=o(WV),l=i?r.value_options?.options?PV:s[i]:void 0,c=JV[(a&&n.inputconverter?.[a])??""]||JV[""];return r.hidden?null:e.createElement("div",{className:"nodeinput","data-type":i},e.createElement(UV,{iostore:t,typestring:i,position:Qo.Left,type:"target"}),l&&e.createElement("div",{className:"iovaluefield nodrag","data-type":i},e.createElement(l,{iostore:t,inputconverter:c})),e.createElement("div",{className:"ioname"},r.name),e.createElement(UV,{iostore:t,typestring:i,position:Qo.Right,type:"source"}))},qV=({iostore:t})=>{const n=o(AG).render_options(),r=t.use(),[i]=YV(r.type,n.typemap||{}),{Outputrenderer:a}=o(WV),s=i?a[i]:void 0;return r.hidden?null:e.createElement("div",{className:"nodeoutput","data-type":i},e.createElement(UV,{iostore:t,typestring:i,position:Qo.Right,type:"source"}),e.createElement("div",{className:"ioname"},r.name),s?e.createElement("div",{className:"iovaluefield nodrag"},e.createElement(s,{iostore:t})):e.createElement("div",{className:"iovaluefield"},e.createElement(jV,{iostore:t,typestring:i})))};function QV(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}function eG(e,t){const n=["","K","M","G","T"];let r=0;for(;e>=t&&r<n.length-1;)e/=t,r++;return[e.toFixed(2),n[r]]}const tG=({state:t,className:n="reacttqdm",...r})=>{const o=u(null),i=u(null);s((()=>{const e=()=>{o.current&&i.current&&function(e,t,n={}){const{maxFontSize:r=100,minFontSize:o=6,decrementFactor:i=.9}=n;if(!e||!t)return;if(i>=1||i<=0)throw new Error("decrementFactor must be between 0 and 1");const a=e.getBoundingClientRect(),s=a.width,l=a.height;let c=r;t.style.whiteSpace="nowrap",t.style.display="inline-block",t.style.fontSize=c+"px";let u=t.getBoundingClientRect();for(;(u.width>s||u.height>l)&&c>o;)c*=i,t.style.fontSize=c+"px",u=t.getBoundingClientRect()}(o.current,i.current,{maxFontSize:12,decrementFactor:.9})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]);const a=t.total?t.n/t.total*100:0;return e.createElement("div",{ref:o,className:n,...r},e.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},e.createElement("div",{className:n+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"}},e.createElement("div",{className:n+"-progress",style:{width:`${a}%`,height:"100%"}})),e.createElement("div",{className:n+"-text",ref:i},function(e={n:0,elapsed:0,ascii:!1,unit:"it",unit_scale:!1,unit_divisor:1e3}){let t=e.total??null;const{n:n,unit_scale:r,elapsed:o,unit:i,unit_divisor:a,prefix:s="",rate:l,postfix:c=null,initial:u=0}=e;null!==t&&n>=t+.5&&(t=null);let d=n,f=t,p=l;r&&!0!==r&&1!==r&&(null!==t&&(f=t*r),d=n*r,void 0!==l&&(p=l*r));const h=QV(o);void 0===p&&o>0&&(p=(d-u)/o);const m=p?1/p:void 0,[g,y]=p?eG(p,a):[void 0,""],[b,v]=m?eG(m,1e3):[void 0,""],w=m&&m>1?b?`${b}${v}s/`+i:"?":(g||"?")+`${y}${i}/s`,x=r?eG(d,a).join(""):d.toString(),k=r&&null!==f?eG(f,a).join(""):f?.toString()??"?",C=p?QV(p&&null!==f?(f-d)/p:0):"?",E=s?`${s}: `:"";if(null!==t){const e=` ${x}/${k} [${h} < ${C}, ${w}${c??""}]`;return`${E}${(d/t*100).toFixed(0)}%${e}`}return`${E}${x}${i} [${h}, ${w}${c??""}]`}(t))))},nG=e.memo((({node_data:t})=>{const n=o(AG);return e.createElement("div",{className:"nodeheader",title:t.description||t.node_name},e.createElement("div",{className:"nodeheader_element"},e.createElement(Eb,{fontSize:"inherit",className:"triggerbutton",onClick:()=>{n.on_node_action({type:"trigger",from_remote:!1,id:t.id})}}),e.createElement(Cb,{fontSize:"inherit",onClick:async()=>{console.log("nodestatus",await(n.worker?.get_node_status(t.id)))}})),e.createElement("div",{className:"nodeheader_element nodeheader_title"},e.createElement("div",{className:"nodeheader_title_text"},t.node_name)),e.createElement("div",{className:"nodeheader_element"},e.createElement(vb,{fontSize:"inherit"})))})),rG=({iostore:t,node_data:n})=>{const r=t.use(),[i,a]=(e=>{const t=o(AG),n=XV(e),{DataPreviewViewRenderer:r,DataViewRenderer:i}=o(WV),a=t.render_options();if(void 0===e)return[void 0,n];const[s]=YV(e.type,a.typemap||{});return s?r[s]?[r[s],n]:i[s]?[BV(i[s]),n]:[BV(FB),n]:[BV(FB),n]})(r);return e.createElement("div",{className:"nodrag nodedatabody","data-src":n.render_options?.data?.src||""},i&&r&&e.createElement(_b,{title:r.full_id,trigger:e.createElement("div",{className:"nodedatabutton"},e.createElement(ZV,{Component:i,iostore:t})),onOpenChange:e=>{e&&r?.try_get_full_value&&r?.try_get_full_value()}},a&&e.createElement($V,{Component:a,iostore:t})))},oG=e.memo((({node_data:t})=>{const n=t.render_options?.data?.src?t.io[t.render_options?.data?.src]:void 0;return e.createElement("div",{className:"nodebody"},t.outputs.map((n=>e.createElement(qV,{key:n,iostore:t.io[n]}))),n&&e.createElement(rG,{node_data:t,iostore:n}),t.inputs.map((n=>e.createElement(KV,{key:n,iostore:t.io[n]}))))})),iG=e.memo((({node_data:t})=>{const[n,r]=c(t.name);s((()=>{r(t.name)}),[t]);const i=o(AG);return e.createElement("input",{className:"nodename_input",value:n,onChange:e=>{r(e.target.value)},onBlur:e=>{const n=e.target.value;i.on_node_action({type:"update",from_remote:!1,id:t.id,node:{name:n}})}})})),aG=({node_data:t})=>{if(!t.progress)return null;const n=t.progress();return e.createElement(tG,{state:n,className:"nodeprogress"})},sG=e.memo((({node_data:t})=>e.createElement("div",{className:"nodefooter"},t.error&&e.createElement("div",{className:"nodeerror"},t.error),e.createElement(aG,{node_data:t})))),lG=e.createContext(null),cG=({iostore:t})=>{const n=e.useContext(AG).render_options(),r=t.use(),[o,i]=YV(r.render_options.type,n.typemap||{}),{Inputrenderer:a}=e.useContext(WV),s=o?r.value_options?.options?PV:a[o]:void 0,l=JV[(i&&n.inputconverter?.[i])??""]||JV[""];return e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,r.name),s&&e.createElement(s,{iostore:t,inputconverter:l}),e.createElement("div",null,e.createElement("label",null,"hidden:",e.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:r.connected,onChange:e=>{r.set_hidden?.(e.target.checked)},checked:r.hidden}))))},uG=({iostore:t})=>{const n=t.use();return e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,n.name),e.createElement("div",null,e.createElement("label",null,"hidden:",e.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:n.connected,onChange:e=>{n.set_hidden?.(e.target.checked)},checked:n.hidden}))))},dG=({nodestore:t})=>{const n=t.use();return e.createElement("div",{className:"nodesettings_content"},e.createElement("div",{className:"nodesettings_section"},e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,"Name"),e.createElement("div",null,e.createElement(iG,{node_data:n})))),e.createElement("div",{className:"nodesettings_section"},e.createElement("div",null,"Inputs"),n.inputs.map((t=>e.createElement(cG,{iostore:n.io[t],key:t})))),e.createElement("div",{className:"nodesettings_section"},e.createElement("div",null,"Outputs"),n.outputs.map((t=>e.createElement(uG,{iostore:n.io[t],key:t})))))},fG=()=>{const t=e.useContext(AG),n=t.local_state((e=>e.selected_nodes));if(0===n.length)return e.createElement("div",null,"Node Settings");if(n.length>1)return e.createElement("div",null,"Multiple Nodes Selected");const r=t.nodespace.get_node(n[0]);return r?e.createElement(dG,{nodestore:r}):e.createElement("div",null,"Node not found")},pG=()=>{const t=e.useContext(AG),n=t.local_settings((e=>e.view_settings.expand_node_props)),r=t.local_settings((e=>e.update_view_settings));return e.createElement(Uk,{maxSize:"300px",direction:"left",expanded:void 0!==n&&n,containerClassName:"pos-right pos-top bg1 h-12",className:"nodesettings_content",onExpandChange:e=>{r({expand_node_props:e})}},e.createElement(fG,null))},hG=e=>({nodes:e.nodes,edges:e.edges,onNodesChange:e.onNodesChange,onEdgesChange:e.onEdgesChange,onConnect:e.onConnect}),mG={default:({data:t})=>{const n=t.nodestore.use(),r=n.properties["frontend:collapsed"]||!1,{visualTrigger:i,nodecontext:a}=(t=>{const n=o(AG),[r,i]=c(!1),a=t.in_trigger(),l=o(WV),u=l.NodeContextExtenders[t.node_id],d=e.useMemo((()=>u?.({node_data:t})||{}),[u,t]),f=e.useMemo((()=>({...d,node_data:t})),[d,t]),p=l.NodeHooks[t.node_id];for(const e of p||[])e({nodecontext:f});return s((()=>{n.worker?.call_hooks("node_mounted",t.id)}),[n.worker,t.id]),s((()=>{let e;return a&&!r?i(!0):r&&(e=setTimeout((()=>i(!1)),200)),()=>clearTimeout(e)}),[a,r]),{visualTrigger:r,nodecontext:f}})(n);return e.createElement(lG.Provider,{value:a},e.createElement("div",{className:"innernode"+(i?" intrigger":"")+(n.error?" error":"")},e.createElement(nG,{node_data:n}),e.createElement(iG,{node_data:n}),r?null:e.createElement(oG,{node_data:n}),e.createElement(sG,{node_data:n})))}},gG={default:({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:a,targetPosition:s,data:l,...c})=>{const[u]=fi({sourceX:n,sourceY:r,sourcePosition:a,targetX:o,targetY:i,targetPosition:s});return e.createElement(e.Fragment,null,e.createElement(Wo,{id:t,path:u,...c}))}},yG=()=>{const t=xa();return o(AG).rf_instance=t,e.createElement(e.Fragment,null)},bG=()=>{const t=o(AG),n=la("Delete"),r=vo(Js,xe),i=vo(Us,xe);if(n){for(const n of r)if(n.selected){if(!t.worker)return e.createElement(e.Fragment,null);if(!n.source||!n.target)return e.createElement(e.Fragment,null);if(!n.sourceHandle||!n.targetHandle)return e.createElement(e.Fragment,null);t.worker.remove_edge({src_nid:n.source,src_ioid:n.sourceHandle,trg_nid:n.target,trg_ioid:n.targetHandle})}for(const n of i)if(n.selected){if(!t.worker)return e.createElement(e.Fragment,null);t.worker.remove_node(n.id)}}return e.createElement(e.Fragment,null)},vG=({id:t,top:n,left:r,right:i,bottom:a,...s})=>{const{getNode:c,setNodes:u,addNodes:d,setEdges:f}=xa(),p=o(AG),h=l((()=>{const e=c(t);if(!e)return;const n={x:e.position.x+50,y:e.position.y+50};d({...e,id:`${e.id}-copy`,position:n})}),[t,c,d]),m=l((()=>{p.on_node_action({type:"delete",id:t,from_remote:!1})}),[t,u,f]),g=p.nodespace.get_node(t,!1);if(!g)return e.createElement(e.Fragment,null," ");const y=g.use();return e.createElement("div",{style:{top:n,left:r,right:i,bottom:a},className:"context-menu",...s},e.createElement("p",{style:{fontWeight:"bold"}},e.createElement("small",null,y.name)),e.createElement("button",{onClick:h},"duplicate"),e.createElement("button",{onClick:m},"delete"))},wG=t=>{const n=o(AG),r=u(null);s((()=>{n.reactflowRef=r.current}),[r]);const[i,a]=c(null),d=l((()=>a(null)),[a]),{nodes:f,edges:p,onNodesChange:h,onEdgesChange:m,onConnect:g}=n.useReactFlowStore(GN(hG));return e.createElement("div",{className:"reactflowlayer"},e.createElement(Ys,{nodes:f,edges:p,onNodesChange:h,onEdgesChange:m,onConnect:g,nodeTypes:mG,edgeTypes:gG,minZoom:t.minZoom,maxZoom:t.maxZoom,fitView:!0,onSelectionChange:({nodes:e,edges:t})=>{const r=n.local_state.getState();n.local_state.setState({...r,selected_nodes:e.map((e=>e.id)),selected_edges:t.map((e=>e.id))})},ref:r,onPaneClick:d,panOnDrag:!t.static},e.createElement(yG,null),e.createElement(bG,null),e.createElement(pl,{color:"#888",gap:16,size:1}),t.minimap&&e.createElement(al,{nodeStrokeWidth:3,pannable:!t.static,zoomable:!t.static,zoomStep:3}),i&&e.createElement(vG,{onClick:d,...i})))},xG=i(void 0),kG=r(((t,n)=>{const{asChild:r,children:o,className:i,style:a,...s}=t,[l,d]=c(!1),f=u(null),[p,h]=c(null),[m,g]=c({}),y=t.htime||300,b=t.vtime||300,v=t.hdelay||0,k=t.vdelay||200;w(n,(()=>f.current),[]);let C;if(r&&e.isValidElement(o)){const t=o,n=[t.props.className,i,"smooth-expand",l?"smooth-expand-expanded":""].filter(Boolean).join(" "),r={...t.props.style,...a,...m};C=e.cloneElement(t,{ref:f,className:n,style:r,...s})}else C=e.createElement("div",{ref:f,...s,className:`smooth-expand ${l?"smooth-expand-expanded":""} ${i||""}`,style:{...a,...m}},o);const E=e.createElement(xG.Provider,{value:{isExpanded:l,toggleExpand:async()=>{f.current&&(l?await(async()=>{if(!f.current)return;if(!p)return;const e={transitionProperty:"width, left, height, top",transitionDuration:`${y}ms, ${y}ms, ${b}ms, ${b}ms`};g((t=>({...t,...e})));const[t,n,r,o]=p,i=new Promise((e=>{setTimeout((()=>{g((e=>({...e,left:`${t}px`,width:`${r}px`}))),e()}),k)})),a=new Promise((e=>{setTimeout((()=>{g((e=>({...e,top:`${n}px`,height:`${o}px`}))),e()}),v)})),s=Math.max(y+v,b+k),l=new Promise((e=>{setTimeout((()=>{e()}),s)}));await Promise.all([i,a,l]),f.current.style.transition="",g({}),d(!1)})():await(async()=>{if(!f.current)return;f.current.style.transition="none",f.current.style.position="",f.current.style.top="",f.current.style.left="",f.current.style.width="",f.current.style.height="";const e=f.current.getBoundingClientRect();h([e.left,e.top,e.width,e.height]),f.current.style.transition="none",g({position:"absolute",top:`${e.top}px`,left:`${e.left}px`,width:`${e.width}px`,height:`${e.height}px`}),g((e=>({...e,transitionProperty:"width, left, height, top",transitionDuration:`${y}ms, ${y}ms, ${b}ms, ${b}ms`}))),d(!0);const t=new Promise((e=>{setTimeout((()=>{g((e=>({...e,left:"0px",width:"100vw"}))),e()}),v)})),n=new Promise((e=>{setTimeout((()=>{g((e=>({...e,top:"0px",height:"100vh"}))),e()}),k)})),r=Math.max(y+v,b+k),o=new Promise((e=>{setTimeout((()=>{e()}),r)}));await Promise.all([t,n,o])})())}}},C);return l?x.createPortal(E,document.body):E}));kG.Trigger=function({children:t}){const n=o(xG);if(!n)throw new Error("SmoothExpandComponent.Trigger must be used within a SmoothExpandComponent");return e.createElement("div",{style:{cursor:"pointer"},onClick:n.toggleExpand},t)},kG.Expanded=function({children:t}){const n=o(xG);if(!n)throw new Error("SmoothExpandComponent.Expanded must be used within a SmoothExpandComponent");return n.isExpanded?e.createElement(e.Fragment,null,t):null},kG.Collapsed=function({children:t}){const n=o(xG);if(!n)throw new Error("SmoothExpandComponent.Collapsed must be used within a SmoothExpandComponent");return n.isExpanded?null:e.createElement(e.Fragment,null,t)};const CG=e.createContext(void 0),EG=r(((t,n)=>{const{asChild:r,children:o,className:i,style:a,...d}=t,f=u(null);w(n,(()=>f.current),[]);const[p,h]=c(!1),m=l((async()=>{try{const e=f.current;if(!e)return;if(p){const e=document;e.exitFullscreen?await e.exitFullscreen():e.mozCancelFullScreen?await e.mozCancelFullScreen():e.webkitExitFullscreen?await e.webkitExitFullscreen():e.msExitFullscreen&&await e.msExitFullscreen(),h(!1)}else e.requestFullscreen?await e.requestFullscreen():e.mozRequestFullScreen?await e.mozRequestFullScreen():e.webkitRequestFullscreen?await e.webkitRequestFullscreen():e.msRequestFullscreen&&await e.msRequestFullscreen(),h(!0)}catch(e){console.error("Error toggling fullscreen",e)}}),[p]);let g;if(s((()=>{const e=()=>{const e=document.fullscreenElement;h(!!e)};return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}),[]),r&&e.isValidElement(o)){const t=o,n=[t.props.className,i].filter(Boolean).join(" "),r={...t.props.style,...a};g=e.cloneElement(t,{ref:f,className:n,style:r,...d})}else g=e.createElement("div",{ref:f,...d,className:i,style:a},o);return e.createElement(CG.Provider,{value:{isFullScreen:p,toggleFullscreen:m}},g)}));EG.Trigger=function({children:t}){const n=e.useContext(CG);if(!n)throw new Error("FullScreenComponent.Trigger must be used within a FullScreenComponent");return e.createElement("div",{style:{cursor:"pointer"},onClick:n.toggleFullscreen},t)},EG.InFullScreen=function({children:t}){const n=e.useContext(CG);if(!n)throw new Error("FullScreenComponent.Expanded must be used within a FullScreenComponent");return n.isFullScreen?e.createElement(e.Fragment,null,t):null},EG.OutFullScreen=function({children:t}){const n=e.useContext(CG);if(!n)throw new Error("FullScreenComponent.Collapsed must be used within a FullScreenComponent");return n.isFullScreen?null:e.createElement(e.Fragment,null,t)};const SG=({fnrf_zst:t,header:n,flow:r,library:o})=>{const[i,a]=c(t.options.worker),s=e.useRef(null);t.workermanager&&(t.workermanager.on_setWorker=a),t.set_worker(i),e.useEffect((()=>{t.auto_progress()}),[]),e.useEffect((()=>{t.local_state.setState({funcnodescontainerRef:s.current})}),[s]);const l=t.plugins();return e.createElement(HV,{plugins:l,fnrf_zst:t},e.createElement(AG.Provider,{value:t},e.createElement(kG,{asChild:!0},e.createElement(EG,{asChild:!0},e.createElement($k,{style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",flex:1}},e.createElement("div",{ref:s,className:"funcnodesreactflowcontainer funcnodescontainer"},n.show&&e.createElement(tC,{...n}),e.createElement("div",{className:"funcnodesreactflowbody"},e.createElement(wG,{...r}),i&&o.show&&e.createElement(FN,null),i&&r.showNodeSettings&&e.createElement(pG,null)),e.createElement("div",{className:"funcnodesflaotingmenu"},e.createElement(EG.OutFullScreen,null,r.allowExpand&&e.createElement(kG.Trigger,null,e.createElement(kG.Expanded,null,e.createElement(mb,{size:"xl",style:{padding:"4px"}})),e.createElement(kG.Collapsed,null,e.createElement(gb,{size:"xl",style:{padding:"4px"}})))),r.allowFullScreen&&e.createElement(EG.Trigger,null,e.createElement(EG.OutFullScreen,null,e.createElement(pb,{size:"xl",style:{padding:"4px"}})),e.createElement(EG.InFullScreen,null,e.createElement(hb,{size:"xl",style:{padding:"4px"}}))))))))))},_G={},IG={id:"",debug:!1,useWorkerManager:!0,show_library:!0,header:{show:!0,showmenu:!0},flow:{minimap:!0,static:!1,minZoom:.1,maxZoom:5,allowFullScreen:!0,allowExpand:!0,showNodeSettings:!0},library:{show:!0}},AG=i(Il(IG)),NG=t=>{let n=q(t,{...IG,id:nd()}).new_obj;if(!n.useWorkerManager&&void 0===n.worker)return e.createElement("div",null,"Error: If you don't use a worker manager, you must provide a default worker.");if(t.useWorkerManager&&void 0===t.workermanager_url)return e.createElement("div",null,"Error: If you use a worker manager, you must provide a worker manager url.");void 0===window.fnrf_zst&&(window.fnrf_zst=_G);let r=_G[n.id];if(void 0===r&&(r=Il(n),_G[n.id]=r),n.worker&&n.worker.set_zustand(r),r.options.debug=n.debug,n.useWorkerManager){const e=new id(n.workermanager_url,r);r.workermanager=e}return e.createElement(SG,{fnrf_zst:r,header:n.header,library:n.library,flow:n.flow})},OG={set_io_value:({nid:e,ioid:t,value:n,set_default:r=!1})=>{const i=o(AG);i.worker?.set_io_value({nid:e,ioid:t,value:n,set_default:r})}},RG=t=>{const n=new Sl("FuncNodes",t.debug?"debug":"info");n.debug("Initalizing FuncNodes with props:",t);let r=q(t,{...IG,id:nd()}).new_obj;if(void 0===t.worker&&void 0!==t.worker_url&&(r.useWorkerManager=!1,r.worker=new od({url:t.worker_url,uuid:r.id,on_sync_complete:r.on_sync_complete})),void 0!==r.worker){const e=Il(r);r.worker.set_zustand(e)}if(void 0!==t.fnw_url){if(void 0===r.worker)throw new Error("defining fnw_url requires a worker to be defined");const e=async function(e,t=!0){try{const n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch from URL: ${n.status} ${n.statusText}`);const r=await n.blob();return await new Promise(((e,n)=>{const o=new FileReader;o.onload=()=>{const r=o.result;"string"!=typeof r&&(n("Failed to convert URL to Base64: No result from FileReader"),n(o.error)),e(t?r.split(",")[1]:r)},o.onerror=()=>n(o.error),o.readAsDataURL(r)}))}catch(e){throw console.error("Error converting URL to Base64:",e),e}}(t.fnw_url),n=r.worker.on_sync_complete,o=async t=>{const r=await e;t.on_sync_complete=n,await t.update_from_export(r)};r.worker.on_sync_complete=o}return n.debug("Initalizing FuncnodesReactFlow with props:",r),e.createElement("div",{className:"FuncnodesApp"},e.createElement(NG,{...r}))};export{AG as FuncNodesContext,Il as FuncNodesReactFlowZustand,rd as FuncNodesWorker,NG as FuncnodesReactFlow,lG as NodeContext,wG as ReactFlowLayer,WV as RenderMappingContext,HV as RenderMappingProvider,od as WebSocketWorker,q as deep_update,RG as default,OG as helperfunctions};
104
+ */var BL=function(){if(DL)return jL;DL=1;var e=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,t=/^[\u000b\u0020-\u007e\u0080-\u00ff]+$/,n=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,r=/\\([\u000b\u0020-\u00ff])/g,o=/([\\"])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;function a(e){var r=String(e);if(n.test(r))return r;if(r.length>0&&!t.test(r))throw new TypeError("invalid parameter value");return'"'+r.replace(o,"\\$1")+'"'}function s(e){this.parameters=Object.create(null),this.type=e}return jL.format=function(e){if(!e||"object"!=typeof e)throw new TypeError("argument obj is required");var t=e.parameters,r=e.type;if(!r||!i.test(r))throw new TypeError("invalid type");var o=r;if(t&&"object"==typeof t)for(var s,l=Object.keys(t).sort(),c=0;c<l.length;c++){if(s=l[c],!n.test(s))throw new TypeError("invalid parameter name");o+="; "+s+"="+a(t[s])}return o},jL.parse=function(t){if(!t)throw new TypeError("argument string is required");var n="object"==typeof t?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(t):t;if("string"!=typeof n)throw new TypeError("argument string is required to be a string");var o=n.indexOf(";"),a=-1!==o?n.slice(0,o).trim():n.trim();if(!i.test(a))throw new TypeError("invalid media type");var l=new s(a.toLowerCase());if(-1!==o){var c,u,d;for(e.lastIndex=o;u=e.exec(n);){if(u.index!==o)throw new TypeError("invalid parameter format");o+=u[0].length,c=u[1].toLowerCase(),34===(d=u[2]).charCodeAt(0)&&-1!==(d=d.slice(1,-1)).indexOf("\\")&&(d=d.replace(r,"$1")),l.parameters[c]=d}if(o!==n.length)throw new TypeError("invalid parameter format")}return l},jL}(),LL=new Map,zL=function(e){return e.cloneNode(!0)},FL=function(){return"file:"===window.location.protocol},VL=function(e,t,n){var r=new XMLHttpRequest;r.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===r.readyState){var t=r.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var o=BL.parse(t).type;if("image/svg+xml"!==o&&"text/plain"!==o)throw new Error("Invalid content type: ".concat(o))}if(4===r.readyState){if(404===r.status||null===r.responseXML)throw new Error(FL()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===r.status||FL()&&0===r.status))throw new Error("There was a problem injecting the SVG: "+r.status+" "+r.statusText);n(null,r)}}catch(e){if(r.abort(),!(e instanceof Error))throw e;n(e,r)}},r.open("GET",e),r.withCredentials=t,r.overrideMimeType&&r.overrideMimeType("text/xml"),r.send()},GL={},WL=function(e,t){GL[e]=GL[e]||[],GL[e].push(t)},HL=function(e,t,n){if(LL.has(e)){var r=LL.get(e);if(void 0===r)return void WL(e,n);if(r instanceof SVGSVGElement)return void n(null,zL(r))}LL.set(e,void 0),WL(e,n),VL(e,t,(function(t,n){var r;t?LL.set(e,t):(null===(r=n.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&LL.set(e,n.responseXML.documentElement),function(e){for(var t=function(t,n){setTimeout((function(){if(Array.isArray(GL[e])){var n=LL.get(e),r=GL[e][t];n instanceof SVGSVGElement&&r(null,zL(n)),n instanceof Error&&r(n),t===GL[e].length-1&&delete GL[e]}}),0)},n=0,r=GL[e].length;n<r;n++)t(n)}(e)}))},XL=function(e,t,n){VL(e,t,(function(e,t){var r;e?n(e):(null===(r=t.responseXML)||void 0===r?void 0:r.documentElement)instanceof SVGSVGElement&&n(null,t.responseXML.documentElement)}))},YL=0,$L=[],ZL={},UL="http://www.w3.org/1999/xlink",JL=function(e,t,n,r,o,i,a){var s=e.getAttribute("data-src")||e.getAttribute("src");if(s){if(-1!==$L.indexOf(e))return $L.splice($L.indexOf(e),1),void(e=null);$L.push(e),e.setAttribute("src",""),(r?HL:XL)(s,o,(function(r,o){if(!o)return $L.splice($L.indexOf(e),1),e=null,void a(r);var l=e.getAttribute("id");l&&o.setAttribute("id",l);var c=e.getAttribute("title");c&&o.setAttribute("title",c);var u=e.getAttribute("width");u&&o.setAttribute("width",u);var d=e.getAttribute("height");d&&o.setAttribute("height",d);var f=Array.from(new Set(_p(_p(_p([],(o.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();o.setAttribute("class",f);var p=e.getAttribute("style");p&&o.setAttribute("style",p),o.setAttribute("data-src",s);var h=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(h,(function(e){e.name&&e.value&&o.setAttribute(e.name,e.value)})),n){var m,g,y,b,v,w={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(w).forEach((function(e){m=e,y=w[e];for(var t=function(e,t){var n;b=g[e].id,v=b+"-"+ ++YL,Array.prototype.forEach.call(y,(function(e){for(var t=0,r=(n=o.querySelectorAll("["+e+'*="'+b+'"]')).length;t<r;t++){var i=n[t].getAttribute(e);i&&!i.match(new RegExp('url\\("?#'+b+'"?\\)'))||n[t].setAttribute(e,"url(#"+v+")")}}));for(var r=o.querySelectorAll("[*|href]"),i=[],a=0,s=r.length;a<s;a++){var l=r[a].getAttributeNS(UL,"href");l&&l.toString()==="#"+g[e].id&&i.push(r[a])}for(var c=0,u=i.length;c<u;c++)i[c].setAttributeNS(UL,"href","#"+v);g[e].id=v},n=0,r=(g=o.querySelectorAll(m+"[id]")).length;n<r;n++)t(n)}))}o.removeAttribute("xmlns:a");for(var x,E,k=o.querySelectorAll("script"),C=[],S=0,_=k.length;S<_;S++)(E=k[S].getAttribute("type"))&&"application/ecmascript"!==E&&"application/javascript"!==E&&"text/javascript"!==E||((x=k[S].innerText||k[S].textContent)&&C.push(x),o.removeChild(k[S]));if(C.length>0&&("always"===t||"once"===t&&!ZL[s])){for(var I=0,A=C.length;I<A;I++)new Function(C[I])(window);ZL[s]=!0}var N=o.querySelectorAll("style");if(Array.prototype.forEach.call(N,(function(e){e.textContent+=""})),o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("xmlns:xlink",UL),i(o),!e.parentNode)return $L.splice($L.indexOf(e),1),e=null,void a(new Error("Parent node is null"));e.parentNode.replaceChild(o,e),$L.splice($L.indexOf(e),1),e=null,a(null,o)}))}else a(new Error("Invalid data-src or src attribute"))},KL=["afterInjection","beforeInjection","desc","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","title","useRequestCache","wrapper"],qL="http://www.w3.org/2000/svg",QL="http://www.w3.org/1999/xlink",ez=function(t){function n(){for(var e,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(e=t.call.apply(t,[this].concat(r))||this).initialState={hasError:!1,isLoading:!0},e.state=e.initialState,e._isMounted=!1,e.reactWrapper=void 0,e.nonReactWrapper=void 0,e.refCallback=function(t){e.reactWrapper=t},e}rL(n,t);var r=n.prototype;return r.renderSVG=function(){var e=this;if(this.reactWrapper instanceof function(e){return((null==e?void 0:e.ownerDocument)||document).defaultView||window}(this.reactWrapper).Node){var t,n,r=this.props,o=r.desc,i=r.evalScripts,a=r.httpRequestWithCredentials,s=r.renumerateIRIElements,l=r.src,c=r.title,u=r.useRequestCache,d=this.props.onError,f=this.props.beforeInjection,p=this.props.afterInjection,h=this.props.wrapper;"svg"===h?((t=document.createElementNS(qL,h)).setAttribute("xmlns",qL),t.setAttribute("xmlns:xlink",QL),n=document.createElementNS(qL,h)):(t=document.createElement(h),n=document.createElement(h)),t.appendChild(n),n.dataset.src=l,this.nonReactWrapper=this.reactWrapper.appendChild(t);var m=function(t){e.removeSVG(),e._isMounted?e.setState((function(){return{hasError:!0,isLoading:!1}}),(function(){d(t)})):d(t)};!function(e,t){var n=void 0===t?{}:t,r=n.afterAll,o=void 0===r?function(){}:r,i=n.afterEach,a=void 0===i?function(){}:i,s=n.beforeEach,l=void 0===s?function(){}:s,c=n.cacheRequests,u=void 0===c||c,d=n.evalScripts,f=void 0===d?"never":d,p=n.httpRequestWithCredentials,h=void 0!==p&&p,m=n.renumerateIRIElements,g=void 0===m||m;if(e&&"length"in e)for(var y=0,b=0,v=e.length;b<v;b++)JL(e[b],f,g,u,h,l,(function(t,n){a(t,n),e&&"length"in e&&e.length===++y&&o(y)}));else e?JL(e,f,g,u,h,l,(function(t,n){a(t,n),o(1),e=null})):o(0)}(n,{afterEach:function(t,n){t?m(t):e._isMounted&&e.setState((function(){return{isLoading:!1}}),(function(){try{p(n)}catch(e){m(e)}}))},beforeEach:function(e){if(e.setAttribute("role","img"),o){var t=e.querySelector(":scope > desc");t&&e.removeChild(t);var n=document.createElement("desc");n.innerHTML=o,e.prepend(n)}if(c){var r=e.querySelector(":scope > title");r&&e.removeChild(r);var i=document.createElement("title");i.innerHTML=c,e.prepend(i)}try{f(e)}catch(e){m(e)}},cacheRequests:u,evalScripts:i,httpRequestWithCredentials:a,renumerateIRIElements:s})}},r.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},r.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},r.componentDidUpdate=function(e){var t=this;(function(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1})(wM({},e),this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},r.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},r.render=function(){var t=this.props;t.afterInjection,t.beforeInjection,t.desc,t.evalScripts;var n=t.fallback;t.httpRequestWithCredentials;var r=t.loading;t.renumerateIRIElements,t.src,t.title,t.useRequestCache;var o=t.wrapper,i=tL(t,KL),a=o;return e.createElement(a,wM({},i,{ref:this.refCallback},"svg"===o?{xmlns:qL,xmlnsXlink:QL}:{}),this.state.isLoading&&r&&e.createElement(r,null),this.state.hasError&&n&&e.createElement(n,null))},n}(e.Component);ez.defaultProps={afterInjection:function(){},beforeInjection:function(){},desc:"",evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,onError:function(){},renumerateIRIElements:!0,title:"",useRequestCache:!0,wrapper:"div"},ez.propTypes={afterInjection:Kb.func,beforeInjection:Kb.func,desc:Kb.string,evalScripts:Kb.oneOf(["always","once","never"]),fallback:Kb.oneOfType([Kb.func,Kb.object,Kb.string]),httpRequestWithCredentials:Kb.bool,loading:Kb.oneOfType([Kb.func,Kb.object,Kb.string]),onError:Kb.func,renumerateIRIElements:Kb.bool,src:Kb.string.isRequired,title:Kb.string,useRequestCache:Kb.bool,wrapper:Kb.oneOf(["div","span","svg"])};const tz=({value:t})=>e.createElement(ez,{src:`data:image/svg+xml;base64,${btoa(t)}`,style:{maxWidth:"100%",maxHeight:"100%"},beforeInjection:e=>{e.classList.add("svg-class-name"),e.setAttribute("style","max-width: 100%; max-height: 100%;"),e.setAttribute("width","100%"),e.setAttribute("height","100%")}}),nz=({value:t,preValue:n,onLoaded:r})=>{const[o,i]=e.useState(n||t);return e.useEffect((()=>{if(t===n)return;const e=new Image;return e.onload=()=>{r?.(),i(t)},e.src=t,()=>{e.onload=null}}),[t,n,r]),void 0===o?e.createElement(e.Fragment,null):"string"!=typeof o?(console.error("Base64ImageOutput: value is not a string",o),e.createElement(e.Fragment,null)):e.createElement("img",{src:o,style:{maxWidth:"100%",maxHeight:"100%"}})},rz=({value:t})=>e.createElement(tz,{value:t}),oz=({value:t})=>{let n="";try{n=JSON.stringify(t)}catch(e){}return e.createElement("div",null,e.createElement("pre",null,n))},iz=({value:t})=>{if("string"!=typeof t||t.length%4!=0)return e.createElement("div",null,t);const n=Math.round(3*t.length/4);return e.createElement("div",null,e.createElement("pre",null,"Bytes(",n,")"))},az=({value:t})=>e.createElement(PL,{tabledata:t||{columns:[],index:[],data:[]}}),sz=({value:t})=>e.createElement(nT,{data:t}),lz=sz,cz={string:oz,table:az,image:nz,svg:rz,dict:sz,bytes:iz};function uz(e,[t,n]){return Math.min(n,Math.max(t,e))}var dz=["PageUp","PageDown"],fz=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],pz={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},hz="Slider",[mz,gz,yz]=$v(hz),[bz,vz]=zf(hz,[yz]),[wz,xz]=bz(hz),Ez=e.forwardRef(((t,n)=>{const{name:r,min:o=0,max:i=100,step:a=1,orientation:s="horizontal",disabled:l=!1,minStepsBetweenThumbs:c=0,defaultValue:u=[o],value:d,onValueChange:f=()=>{},onValueCommit:p=()=>{},inverted:h=!1,form:m,...g}=t,y=e.useRef(new Set),b=e.useRef(0),v="horizontal"===s?Sz:_z,[w=[],x]=Yf({prop:d,defaultProp:u,onChange:e=>{const t=[...y.current];t[b.current]?.focus(),f(e)}}),E=e.useRef(w);function k(e,t,{commit:n}={commit:!1}){const r=function(e){return(String(e).split(".")[1]||"").length}(a),s=function(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}(Math.round((e-o)/a)*a+o,r),l=uz(s,[o,i]);x(((e=[])=>{const r=function(e=[],t,n){const r=[...e];return r[n]=t,r.sort(((e,t)=>e-t))}(e,l,t);if(function(e,t){if(t>0){const n=function(e){return e.slice(0,-1).map(((t,n)=>e[n+1]-t))}(e);return Math.min(...n)>=t}return!0}(r,c*a)){b.current=r.indexOf(l);const t=String(r)!==String(e);return t&&n&&p(r),t?r:e}return e}))}return Lf.jsx(wz,{scope:t.__scopeSlider,name:r,disabled:l,min:o,max:i,valueIndexToChangeRef:b,thumbs:y.current,values:w,orientation:s,form:m,children:Lf.jsx(mz.Provider,{scope:t.__scopeSlider,children:Lf.jsx(mz.Slot,{scope:t.__scopeSlider,children:Lf.jsx(v,{"aria-disabled":l,"data-disabled":l?"":void 0,...g,ref:n,onPointerDown:If(g.onPointerDown,(()=>{l||(E.current=w)})),min:o,max:i,inverted:h,onSlideStart:l?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const n=e.map((e=>Math.abs(e-t))),r=Math.min(...n);return n.indexOf(r)}(w,e);k(e,t)},onSlideMove:l?void 0:function(e){k(e,b.current)},onSlideEnd:l?void 0:function(){const e=E.current[b.current];w[b.current]!==e&&p(w)},onHomeKeyDown:()=>!l&&k(o,0,{commit:!0}),onEndKeyDown:()=>!l&&k(i,w.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!l){const n=dz.includes(e.key)||e.shiftKey&&fz.includes(e.key)?10:1,r=b.current;k(w[r]+a*n*t,r,{commit:!0})}}})})})})}));Ez.displayName=hz;var[kz,Cz]=bz(hz,{startEdge:"left",endEdge:"right",size:"width",direction:1}),Sz=e.forwardRef(((t,n)=>{const{min:r,max:o,dir:i,inverted:a,onSlideStart:s,onSlideMove:l,onSlideEnd:c,onStepKeyDown:u,...d}=t,[f,p]=e.useState(null),h=Of(n,(e=>p(e))),m=e.useRef(void 0),g=Uv(i),y="ltr"===g,b=y&&!a||!y&&a;function v(e){const t=m.current||f.getBoundingClientRect(),n=Bz([0,t.width],b?[r,o]:[o,r]);return m.current=t,n(e-t.left)}return Lf.jsx(kz,{scope:t.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:Lf.jsx(Iz,{dir:g,"data-orientation":"horizontal",...d,ref:h,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=v(e.clientX);s?.(t)},onSlideMove:e=>{const t=v(e.clientX);l?.(t)},onSlideEnd:()=>{m.current=void 0,c?.()},onStepKeyDown:e=>{const t=pz[b?"from-left":"from-right"].includes(e.key);u?.({event:e,direction:t?-1:1})}})})})),_z=e.forwardRef(((t,n)=>{const{min:r,max:o,inverted:i,onSlideStart:a,onSlideMove:s,onSlideEnd:l,onStepKeyDown:c,...u}=t,d=e.useRef(null),f=Of(n,d),p=e.useRef(void 0),h=!i;function m(e){const t=p.current||d.current.getBoundingClientRect(),n=Bz([0,t.height],h?[o,r]:[r,o]);return p.current=t,n(e-t.top)}return Lf.jsx(kz,{scope:t.__scopeSlider,startEdge:h?"bottom":"top",endEdge:h?"top":"bottom",size:"height",direction:h?1:-1,children:Lf.jsx(Iz,{"data-orientation":"vertical",...u,ref:f,style:{...u.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=m(e.clientY);a?.(t)},onSlideMove:e=>{const t=m(e.clientY);s?.(t)},onSlideEnd:()=>{p.current=void 0,l?.()},onStepKeyDown:e=>{const t=pz[h?"from-bottom":"from-top"].includes(e.key);c?.({event:e,direction:t?-1:1})}})})})),Iz=e.forwardRef(((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:i,onHomeKeyDown:a,onEndKeyDown:s,onStepKeyDown:l,...c}=e,u=xz(hz,n);return Lf.jsx(Kf.span,{...c,ref:t,onKeyDown:If(e.onKeyDown,(e=>{"Home"===e.key?(a(e),e.preventDefault()):"End"===e.key?(s(e),e.preventDefault()):dz.concat(fz).includes(e.key)&&(l(e),e.preventDefault())})),onPointerDown:If(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),u.thumbs.has(t)?t.focus():r(e)})),onPointerMove:If(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&o(e)})),onPointerUp:If(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),i(e))}))})})),Az="SliderTrack",Nz=e.forwardRef(((e,t)=>{const{__scopeSlider:n,...r}=e,o=xz(Az,n);return Lf.jsx(Kf.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})}));Nz.displayName=Az;var Oz="SliderRange",Rz=e.forwardRef(((t,n)=>{const{__scopeSlider:r,...o}=t,i=xz(Oz,r),a=Cz(Oz,r),s=Of(n,e.useRef(null)),l=i.values.length,c=i.values.map((e=>jz(e,i.min,i.max))),u=l>1?Math.min(...c):0,d=100-Math.max(...c);return Lf.jsx(Kf.span,{"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,...o,ref:s,style:{...t.style,[a.startEdge]:u+"%",[a.endEdge]:d+"%"}})}));Rz.displayName=Oz;var Tz="SliderThumb",Mz=e.forwardRef(((t,n)=>{const r=gz(t.__scopeSlider),[o,i]=e.useState(null),a=Of(n,(e=>i(e))),s=e.useMemo((()=>o?r().findIndex((e=>e.ref.current===o)):-1),[r,o]);return Lf.jsx(Pz,{...t,ref:a,index:s})})),Pz=e.forwardRef(((t,n)=>{const{__scopeSlider:r,index:o,name:i,...a}=t,s=xz(Tz,r),l=Cz(Tz,r),[c,u]=e.useState(null),d=Of(n,(e=>u(e))),f=!c||(s.form||!!c.closest("form")),p=_x(c),h=s.values[o],m=void 0===h?0:jz(h,s.min,s.max),g=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(o,s.values.length),y=p?.[l.size],b=y?function(e,t,n){const r=e/2,o=Bz([0,50],[0,r]);return(r-o(t)*n)*n}(y,m,l.direction):0;return e.useEffect((()=>{if(c)return s.thumbs.add(c),()=>{s.thumbs.delete(c)}}),[c,s.thumbs]),Lf.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[l.startEdge]:`calc(${m}% + ${b}px)`},children:[Lf.jsx(mz.ItemSlot,{scope:t.__scopeSlider,children:Lf.jsx(Kf.span,{role:"slider","aria-label":t["aria-label"]||g,"aria-valuemin":s.min,"aria-valuenow":h,"aria-valuemax":s.max,"aria-orientation":s.orientation,"data-orientation":s.orientation,"data-disabled":s.disabled?"":void 0,tabIndex:s.disabled?void 0:0,...a,ref:d,style:void 0===h?{display:"none"}:t.style,onFocus:If(t.onFocus,(()=>{s.valueIndexToChangeRef.current=o}))})}),f&&Lf.jsx(Dz,{name:i??(s.name?s.name+(s.values.length>1?"[]":""):void 0),form:s.form,value:h},o)]})}));Mz.displayName=Tz;var Dz=t=>{const{value:n,...r}=t,o=e.useRef(null),i=function(t){const n=e.useRef({value:t,previous:t});return e.useMemo((()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous)),[t])}(n);return e.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("input",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),Lf.jsx("input",{style:{display:"none"},...r,ref:o,defaultValue:n})};function jz(e,t,n){return uz(100/(n-t)*(e-t),[0,100])}function Bz(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}var Lz,zz,Fz,Vz,Gz,Wz,Hz,Xz,Yz=Ez,$z=Nz,Zz=Rz,Uz=Mz;function Jz(){if(Vz)return Fz;Vz=1;const e=zz?Lz:(zz=1,Lz={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}),t={};for(const n of Object.keys(e))t[e[n]]=n;const n={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};Fz=n;for(const e of Object.keys(n)){if(!("channels"in n[e]))throw new Error("missing channels property: "+e);if(!("labels"in n[e]))throw new Error("missing channel labels property: "+e);if(n[e].labels.length!==n[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=n[e];delete n[e].channels,delete n[e].labels,Object.defineProperty(n[e],"channels",{value:t}),Object.defineProperty(n[e],"labels",{value:r})}function r(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}return n.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),i=Math.max(t,n,r),a=i-o;let s,l;i===o?s=0:t===i?s=(n-r)/a:n===i?s=2+(r-t)/a:r===i&&(s=4+(t-n)/a),s=Math.min(60*s,360),s<0&&(s+=360);const c=(o+i)/2;return l=i===o?0:c<=.5?a/(i+o):a/(2-i-o),[s,100*l,100*c]},n.rgb.hsv=function(e){let t,n,r,o,i;const a=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(a,s,l),u=c-Math.min(a,s,l),d=function(e){return(c-e)/6/u+.5};return 0===u?(o=0,i=0):(i=u/c,t=d(a),n=d(s),r=d(l),a===c?o=r-n:s===c?o=1/3+t-r:l===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[360*o,100*i,100*c]},n.rgb.hwb=function(e){const t=e[0],r=e[1];let o=e[2];const i=n.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(r,o));return o=1-1/255*Math.max(t,Math.max(r,o)),[i,100*a,100*o]},n.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r);return[100*((1-t-o)/(1-o)||0),100*((1-n-o)/(1-o)||0),100*((1-r-o)/(1-o)||0),100*o]},n.rgb.keyword=function(n){const o=t[n];if(o)return o;let i,a=1/0;for(const t of Object.keys(e)){const o=r(n,e[t]);o<a&&(a=o,i=t)}return i},n.keyword.rgb=function(t){return e[t]},n.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;return[100*(.4124*t+.3576*n+.1805*r),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},n.rgb.lab=function(e){const t=n.rgb.xyz(e);let r=t[0],o=t[1],i=t[2];r/=95.047,o/=100,i/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;return[116*o-16,500*(r-o),200*(o-i)]},n.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,i,a;if(0===n)return a=255*r,[a,a,a];o=r<.5?r*(1+n):r+n-r*n;const s=2*r-o,l=[0,0,0];for(let e=0;e<3;e++)i=t+1/3*-(e-1),i<0&&i++,i>1&&i--,a=6*i<1?s+6*(o-s)*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,l[e]=255*a;return l},n.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const i=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=i<=1?i:2-i;return[t,100*(0===r?2*o/(i+o):2*n/(r+n)),100*((r+n)/2)]},n.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,i=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*i),l=255*r*(1-n*(1-i));switch(r*=255,o){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}},n.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let i,a;a=(2-n)*r;const s=(2-n)*o;return i=n*o,i/=s<=1?s:2-s,i=i||0,a/=2,[t,100*i,100*a]},n.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let i;o>1&&(n/=o,r/=o);const a=Math.floor(6*t),s=1-r;i=6*t-a,1&a&&(i=1-i);const l=n+i*(s-n);let c,u,d;switch(a){default:case 6:case 0:c=s,u=l,d=n;break;case 1:c=l,u=s,d=n;break;case 2:c=n,u=s,d=l;break;case 3:c=n,u=l,d=s;break;case 4:c=l,u=n,d=s;break;case 5:c=s,u=n,d=l}return[255*c,255*u,255*d]},n.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100;return[255*(1-Math.min(1,t*(1-o)+o)),255*(1-Math.min(1,n*(1-o)+o)),255*(1-Math.min(1,r*(1-o)+o))]},n.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,i,a;return o=3.2406*t+-1.5372*n+-.4986*r,i=-.9689*t+1.8758*n+.0415*r,a=.0557*t+-.204*n+1.057*r,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,i=i>.0031308?1.055*i**(1/2.4)-.055:12.92*i,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),a=Math.min(Math.max(0,a),1),[255*o,255*i,255*a]},n.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;return[116*n-16,500*(t-n),200*(n-r)]},n.lab.xyz=function(e){let t,n,r;n=(e[0]+16)/116,t=e[1]/500+n,r=n-e[2]/200;const o=n**3,i=t**3,a=r**3;return n=o>.008856?o:(n-16/116)/7.787,t=i>.008856?i:(t-16/116)/7.787,r=a>.008856?a:(r-16/116)/7.787,t*=95.047,n*=100,r*=108.883,[t,n,r]},n.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=360*Math.atan2(r,n)/2/Math.PI,o<0&&(o+=360);return[t,Math.sqrt(n*n+r*r),o]},n.lch.lab=function(e){const t=e[0],n=e[1],r=e[2]/360*2*Math.PI;return[t,n*Math.cos(r),n*Math.sin(r)]},n.rgb.ansi16=function(e,t=null){const[r,o,i]=e;let a=null===t?n.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),0===a)return 30;let s=30+(Math.round(i/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return 2===a&&(s+=60),s},n.hsv.ansi16=function(e){return n.rgb.ansi16(n.hsv.rgb(e),e[2])},n.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];if(t===n&&n===r)return t<8?16:t>248?231:Math.round((t-8)/247*24)+232;return 16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},n.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},n.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},n.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},n.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];3===t[0].length&&(n=n.split("").map((e=>e+e)).join(""));const r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},n.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),i=Math.min(Math.min(t,n),r),a=o-i;let s,l;return s=a<1?i/(1-a):0,l=a<=0?0:o===t?(n-r)/a%6:o===n?2+(r-t)/a:4+(t-n)/a,l/=6,l%=1,[360*l,100*a,100*s]},n.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],100*r,100*o]},n.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];const o=[0,0,0],i=t%1*6,a=i%1,s=1-a;let l=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=a,o[2]=0;break;case 1:o[0]=s,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=a;break;case 3:o[0]=0,o[1]=s,o[2]=1;break;case 4:o[0]=a,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=s}return l=(1-n)*r,[255*(n*o[0]+l),255*(n*o[1]+l),255*(n*o[2]+l)]},n.hcg.hsv=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);let r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},n.hcg.hsl=function(e){const t=e[1]/100,n=e[2]/100*(1-t)+.5*t;let r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},n.hcg.hwb=function(e){const t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},n.hwb.hcg=function(e){const t=e[1]/100,n=1-e[2]/100,r=n-t;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],100*r,100*o]},n.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},n.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},n.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},n.gray.hsl=function(e){return[0,0,e[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(e){return[0,100,e[0]]},n.gray.cmyk=function(e){return[0,0,0,e[0]]},n.gray.lab=function(e){return[e[0],0,0]},n.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},n.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]},Fz}function Kz(){if(Wz)return Gz;Wz=1;const e=Jz();function t(t){const n=function(){const t={},n=Object.keys(e);for(let e=n.length,r=0;r<e;r++)t[n[r]]={distance:-1,parent:null};return t}(),r=[t];for(n[t].distance=0;r.length;){const t=r.pop(),o=Object.keys(e[t]);for(let e=o.length,i=0;i<e;i++){const e=o[i],a=n[e];-1===a.distance&&(a.distance=n[t].distance+1,a.parent=t,r.unshift(e))}}return n}function n(e,t){return function(n){return t(e(n))}}function r(t,r){const o=[r[t].parent,t];let i=e[r[t].parent][t],a=r[t].parent;for(;r[a].parent;)o.unshift(r[a].parent),i=n(e[r[a].parent][a],i),a=r[a].parent;return i.conversion=o,i}return Gz=function(e){const n=t(e),o={},i=Object.keys(n);for(let e=i.length,t=0;t<e;t++){const e=i[t];null!==n[e].parent&&(o[e]=r(e,n))}return o},Gz}var qz=function(){if(Xz)return Hz;Xz=1;const e=Jz(),t=Kz(),n={};return Object.keys(e).forEach((r=>{n[r]={},Object.defineProperty(n[r],"channels",{value:e[r].channels}),Object.defineProperty(n[r],"labels",{value:e[r].labels});const o=t(r);Object.keys(o).forEach((e=>{const t=o[e];n[r][e]=function(e){const t=function(...t){const n=t[0];if(null==n)return n;n.length>1&&(t=n);const r=e(t);if("object"==typeof r)for(let e=r.length,t=0;t<e;t++)r[t]=Math.round(r[t]);return r};return"conversion"in e&&(t.conversion=e.conversion),t}(t),n[r][e].raw=function(e){const t=function(...t){const n=t[0];return null==n?n:(n.length>1&&(t=n),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(t)}))})),Hz=n}(),Qz=C({__proto__:null,default:I(qz)},[qz]);const eF=(e,t)=>{const n=Array.isArray(t)?t:[t];if(void 0===n[0]||null===n[0])return eF("rgb",[0,0,0]);const r=Qz[e];if(!r)throw new Error("Unsupported color type: "+e);r[e]=()=>n;const o=e=>{const t=e(...n);return Array.isArray(t)?null!=t[0]:t};if(!o(r.rgb)||!o(r.hsl))return eF("rgb",[0,0,0]);const i={};return Object.keys(r).forEach((t=>{const o=r[t];"function"==typeof o&&(i[t]=()=>t===e?n:o(...n))})),i},tF=({onChange:t,colorconverter:n,allow_null:r=!1})=>{if(null===n&&!r)throw new Error("Color converter is null");const[o,i]=c(n),[a,l]=c([0,0,0]),[u,d]=c([0,0,0]),[f,p]=c([0,0,0]),[h,m]=c("000");s((()=>{if(!o){if(!r)throw new Error("Color converter is null");return d([0,0,0]),l([0,0,0]),p([0,0,0]),void m("")}l(o.hsl()),d(o.rgb()),p(o.hsv()),m(o.hex())}),[o]);const g={backgroundColor:`hsl(${a[0]}, ${a[1]}%, ${a[2]}%)`,padding:"10px",margin:"10px 0"};return e.createElement("div",{style:{backgroundColor:"white"}},e.createElement("div",{style:g},"Color Preview"),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"RGB"),e.createElement("div",null),e.createElement("label",null,"Red"),e.createElement("input",{type:"range",min:"0",max:"255",value:u[0],onChange:e=>{const n=[parseInt(e.target.value),u[1],u[2]],r=eF("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #f00)"}}),e.createElement("label",null,"Green"),e.createElement("input",{type:"range",min:"0",max:"255",value:u[1],onChange:e=>{const n=[u[0],parseInt(e.target.value),u[2]],r=eF("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #0f0)"}}),e.createElement("label",null,"Blue"),e.createElement("input",{type:"range",min:"0",max:"255",value:u[2],onChange:e=>{const n=[u[0],u[1],parseInt(e.target.value)],r=eF("rgb",n);i(r),t(r)},style:{background:"linear-gradient(to right, #000, #00f)"}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HSL"),e.createElement("div",null),e.createElement("label",null,"Hue"),e.createElement("input",{type:"range",min:"0",max:"360",value:a[0],onChange:e=>{const n=[parseInt(e.target.value),a[1],a[2]],r=eF("hsl",n);i(r),t(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),e.createElement("label",null,"Saturation"),e.createElement("input",{type:"range",min:"0",max:"100",value:a[1],onChange:e=>{const n=[a[0],parseInt(e.target.value),a[2]],r=eF("hsl",n);i(r),t(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),e.createElement("label",null,"Lightness"),e.createElement("input",{type:"range",min:"0",max:"100",value:a[2],onChange:e=>{const n=[a[0],a[1],parseInt(e.target.value)],r=eF("hsl",n);i(r),t(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%), #fff)`}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HSV"),e.createElement("div",null),e.createElement("label",null,"Hue"),e.createElement("input",{type:"range",min:"0",max:"360",value:f[0],onChange:e=>{const n=[parseInt(e.target.value),f[1],f[2]],r=eF("hsv",n);i(r),t(r)},style:{background:"linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"}}),e.createElement("label",null,"Saturation"),e.createElement("input",{type:"range",min:"0",max:"100",value:f[1],onChange:e=>{const n=[f[0],parseInt(e.target.value),f[2]],r=eF("hsv",n);i(r),t(r)},style:{background:`linear-gradient(to right, #fff, hsl(${a[0]}, 100%, 50%))`}}),e.createElement("label",null,"Value"),e.createElement("input",{type:"range",min:"0",max:"100",value:f[2],onChange:e=>{const n=[f[0],f[1],parseInt(e.target.value)],r=eF("hsv",n);i(r),t(r)},style:{background:`linear-gradient(to right, #000, hsl(${a[0]}, 100%, 50%))`}})),e.createElement("div",{className:"colorspace"},e.createElement("div",{className:"colorspace_title"},"HEX"),e.createElement("div",null),e.createElement("input",{type:"text",value:h,onChange:e=>{const n=""===e.target.value?null:eF("hex",[e.target.value]);i(n),t(n)}})))},nF=({inicolordata:t,inicolorspace:n,allow_null:r=!1,delay:i=1e3,onChange:d})=>{const f=void 0!==t?t:[0,0,0],p=void 0===t?"rgb":n||"hex",h=Array.isArray(f)?f:[f],m=a((()=>{let e=eF(p,h);return void 0===e.rgb()&&(e=eF("rgb",[0,0,0])),e}),[p,h]),[g,y]=c(m);s((()=>{const e=void 0!==t?t:[0,0,0],r=void 0===t?"rgb":n||"hex",o=Array.isArray(e)?e:[e];let i=eF(r,o);void 0===i.rgb()&&(i=eF("rgb",[0,0,0])),y(i)}),[JSON.stringify(t),n]);const b=o(xW),v=b.local_state((()=>b.reactflowRef)),w=u(null),x=l((e=>{if(null===e&&!r)throw new Error("Color is null");null!==e&&y(e),w.current&&clearTimeout(w.current),d&&(w.current=setTimeout((()=>{d(e),w.current=null}),i))}),[r,d,i]);s((()=>()=>{w.current&&clearTimeout(w.current)}),[]);const E=a((()=>({background:"#"+g.hex(),borderRadius:"0.3rem",width:"2rem",height:"1rem"})),[g]);return e.createElement(MR,null,e.createElement(PR,{asChild:!0},e.createElement("button",{style:E})),e.createElement(DR,{container:v},e.createElement(jR,{side:"left",className:"iotooltipcontent"},e.createElement(tF,{onChange:x,colorconverter:g,allow_null:r}))))};function rF(e){return rF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rF(e)}function oF(e){var t=function(e,t){if("object"!=rF(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=rF(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rF(t)?t:t+""}function iF(e,t,n){return(t=oF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function aF(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function sF(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?aF(Object(n),!0).forEach((function(t){iF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aF(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lF(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function cF(e,t){if(e){if("string"==typeof e)return lF(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?lF(e,t):void 0}}function uF(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||cF(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dF(e,t){if(null==e)return{};var n,r,o=tL(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var fF=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function pF(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,oF(r.key),r)}}function hF(e){return hF=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},hF(e)}function mF(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(mF=function(){return!!e})()}function gF(e){var t=mF();return function(){var n,r=hF(e);if(t){var o=hF(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==rF(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return iL(e)}(this,n)}}function yF(e){return function(e){if(Array.isArray(e))return lF(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||cF(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var bF=d,vF=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],wF=function(){};function xF(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function EF(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(xF(e,a)));return i.filter((function(e){return e})).map((function(e){return String(e).trim()})).join(" ")}var kF=function(e){return function(e){return Array.isArray(e)}(e)?e.filter(Boolean):"object"===rF(e)&&null!==e?[e]:[]},CF=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,sF({},dF(e,vF))},SF=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function _F(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function IF(e){return _F(e)?window.pageYOffset:e.scrollTop}function AF(e,t){_F(e)?window.scrollTo(0,t):e.scrollTop=t}function NF(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:wF,o=IF(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);AF(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function OF(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?AF(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&AF(e,Math.max(t.offsetTop-o,0))}function RF(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var TF=!1,MF={get passive(){return TF=!0}},PF="undefined"!=typeof window?window:{};PF.addEventListener&&PF.removeEventListener&&(PF.addEventListener("p",wF,MF),PF.removeEventListener("p",wF,!1));var DF=TF;function jF(e){return null!=e}function BF(e,t,n){return e?t:n}var LF=["children","innerProps"],zF=["children","innerProps"];function FF(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u,d=l.getBoundingClientRect().height,f=n.getBoundingClientRect(),p=f.bottom,h=f.height,m=f.top,g=n.offsetParent.getBoundingClientRect().top,y=a?window.innerHeight:_F(u=l)?window.innerHeight:u.clientHeight,b=IF(l),v=parseInt(getComputedStyle(n).marginBottom,10),w=parseInt(getComputedStyle(n).marginTop,10),x=g-w,E=y-m,k=x+b,C=d-b-m,S=p-y+b+v,_=b+m-w,I=160;switch(o){case"auto":case"bottom":if(E>=h)return{placement:"bottom",maxHeight:t};if(C>=h&&!a)return i&&NF(l,S,I),{placement:"bottom",maxHeight:t};if(!a&&C>=r||a&&E>=r)return i&&NF(l,S,I),{placement:"bottom",maxHeight:a?E-v:C-v};if("auto"===o||a){var A=t,N=a?x:k;return N>=r&&(A=Math.min(N-v-s,t)),{placement:"top",maxHeight:A}}if("bottom"===o)return i&&AF(l,S),{placement:"bottom",maxHeight:t};break;case"top":if(x>=h)return{placement:"top",maxHeight:t};if(k>=h&&!a)return i&&NF(l,_,I),{placement:"top",maxHeight:t};if(!a&&k>=r||a&&x>=r){var O=t;return(!a&&k>=r||a&&x>=r)&&(O=a?x-w:k-w),i&&NF(l,_,I),{placement:"top",maxHeight:O}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}var VF,GF=function(e){return"auto"===e?"bottom":e},WF=i(null),HF=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,i=e.menuPlacement,a=e.menuPosition,s=e.menuShouldScrollIntoView,l=e.theme,d=(o(WF)||{}).setPortalPlacement,f=u(null),p=uF(c(r),2),h=p[0],m=p[1],g=uF(c(null),2),y=g[0],b=g[1],v=l.spacing.controlHeight;return bF((function(){var e=f.current;if(e){var t="fixed"===a,o=FF({maxHeight:r,menuEl:e,minHeight:n,placement:i,shouldScroll:s&&!t,isFixedPosition:t,controlHeight:v});m(o.maxHeight),b(o.placement),null==d||d(o.placement)}}),[r,i,a,s,n,d,v]),t({ref:f,placerProps:sF(sF({},e),{},{placement:y||GF(i),maxHeight:h})})},XF=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return KP("div",wM({},SF(e,"menu",{menu:!0}),{ref:n},r),t)},YF=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return sF({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},$F=YF,ZF=YF,UF=["size"],JF=["innerProps","isRtl","size"];var KF="production"===Q.env.NODE_ENV?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},qF=function(e){var t=e.size,n=dF(e,UF);return KP("svg",wM({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:KF},n))},QF=function(e){return KP(qF,wM({size:20},e),KP("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},eV=function(e){return KP(qF,wM({size:20},e),KP("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},tV=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return sF({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},nV=tV,rV=tV,oV=QP(VF||(VF=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),iV=function(e){var t=e.delay,n=e.offset;return KP("span",{css:qP({animation:"".concat(oV," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"production"===Q.env.NODE_ENV?"":";label:LoadingDot;","production"===Q.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},aV=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return KP("div",wM({ref:o},SF(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},sV=["data"],lV=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,c=e.theme,u=e.selectProps;return KP("div",wM({},SF(e,"group",{group:!0}),s),KP(i,wM({},a,{selectProps:u,theme:c,getStyles:r,getClassNames:o,cx:n}),l),KP("div",null,t))},cV=["innerRef","isDisabled","isHidden","inputClassName"],uV={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},dV={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":sF({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},uV)},fV=function(e){return sF({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},uV)},pV=function(e){var t=e.cx,n=e.value,r=CF(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=dF(r,cV);return KP("div",wM({},SF(e,"input",{"input-container":!0}),{"data-value":n||""}),KP("input",wM({className:t({input:!0},s),ref:o,style:fV(a),disabled:i},l)))},hV=function(e){var t=e.children,n=e.innerProps;return KP("div",n,t)};var mV=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,c=n.Label,u=n.Remove;return KP(l,{data:r,innerProps:sF(sF({},SF(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},KP(c,{data:r,innerProps:sF({},SF(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),KP(u,{data:r,innerProps:sF(sF({},SF(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},gV=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return KP("div",wM({},SF(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},yV=function(e){var t=e.children,n=e.innerProps;return KP("div",wM({},SF(e,"placeholder",{placeholder:!0}),n),t)},bV=function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return KP("div",wM({},SF(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},vV={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return KP("div",wM({},SF(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||KP(QF,null))},Control:aV,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return KP("div",wM({},SF(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||KP(eV,null))},DownChevron:eV,CrossIcon:QF,Group:lV,GroupHeading:function(e){var t=CF(e);t.data;var n=dF(t,sV);return KP("div",wM({},SF(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return KP("div",wM({},SF(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return KP("span",wM({},t,SF(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:pV,LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=dF(e,JF);return KP("div",wM({},SF(sF(sF({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),KP(iV,{delay:0,offset:n}),KP(iV,{delay:160,offset:!0}),KP(iV,{delay:320,offset:!n}))},Menu:XF,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return KP("div",wM({},SF(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,s=e.menuPosition,d=u(null),f=u(null),p=uF(c(GF(i)),2),h=p[0],m=p[1],g=a((function(){return{setPortalPlacement:m}}),[]),y=uF(c(null),2),b=y[0],v=y[1],w=l((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===s?0:window.pageYOffset,n=e[h]+t;n===(null==b?void 0:b.offset)&&e.left===(null==b?void 0:b.rect.left)&&e.width===(null==b?void 0:b.rect.width)||v({offset:n,rect:e})}}),[r,s,h,null==b?void 0:b.offset,null==b?void 0:b.rect.left,null==b?void 0:b.rect.width]);bF((function(){w()}),[w]);var x=l((function(){"function"==typeof f.current&&(f.current(),f.current=null),r&&d.current&&(f.current=nx(r,d.current,w,{elementResize:"ResizeObserver"in window}))}),[r,w]);bF((function(){x()}),[x]);var E=l((function(e){d.current=e,x()}),[x]);if(!t&&"fixed"!==s||!b)return null;var C=KP("div",wM({ref:E},SF(sF(sF({},e),{},{offset:b.offset,position:s,rect:b.rect}),"menuPortal",{"menu-portal":!0}),o),n);return KP(WF.Provider,{value:g},t?k(C,t):C)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=dF(e,zF);return KP("div",wM({},SF(sF(sF({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=dF(e,LF);return KP("div",wM({},SF(sF(sF({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:mV,MultiValueContainer:hV,MultiValueLabel:hV,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return KP("div",wM({role:"button"},n),t||KP(QF,{size:14}))},Option:gV,Placeholder:yV,SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return KP("div",wM({},SF(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:bV,ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return KP("div",wM({},SF(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},wV=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function xV(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],o=t[n],!(r===o||wV(r)&&wV(o)))return!1;var r,o;return!0}for(var EV="production"===Q.env.NODE_ENV?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},kV=function(e){return KP("span",wM({css:EV},e))},CV={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,c=e.isAppleDevice,u=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(u(a,n),".");if("menu"===t&&c){var d=s?" disabled":"",f="".concat(l?" selected":"").concat(d);return"".concat(i).concat(f,", ").concat(u(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},SV=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,s=e.selectValue,l=e.selectProps,c=e.id,u=e.isAppleDevice,d=l.ariaLiveMessages,f=l.getOptionLabel,p=l.inputValue,h=l.isMulti,m=l.isOptionDisabled,g=l.isSearchable,y=l.menuIsOpen,v=l.options,w=l.screenReaderStatus,x=l.tabSelectsValue,E=l.isLoading,k=l["aria-label"],C=l["aria-live"],S=a((function(){return sF(sF({},CV),d||{})}),[d]),_=a((function(){var e,n="";if(t&&S.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,l=t.value,c=i||r||(e=l,Array.isArray(e)?null:e),u=c?f(c):"",d=o||a||void 0,p=d?d.map(f):[],h=sF({isDisabled:c&&m(c,s),label:u,labels:p},t);n=S.onChange(h)}return n}),[t,S,m,s,f]),I=a((function(){var e="",t=n||r,i=!!(n&&s&&s.includes(n));if(t&&S.onFocus){var a={focused:t,label:f(t),isDisabled:m(t,s),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:s,isAppleDevice:u};e=S.onFocus(a)}return e}),[n,r,f,m,S,o,s,u]),A=a((function(){var e="";if(y&&v.length&&!E&&S.onFilter){var t=w({count:o.length});e=S.onFilter({inputValue:p,resultsMessage:t})}return e}),[o,p,y,S,v,w,E]),N="initial-input-focus"===(null==t?void 0:t.action),O=a((function(){var e="";if(S.guidance){var t=r?"value":y?"menu":"input";e=S.guidance({"aria-label":k,context:t,isDisabled:n&&m(n,s),isMulti:h,isSearchable:g,tabSelectsValue:x,isInitialFocus:N})}return e}),[k,n,r,h,m,g,y,S,s,x,N]),R=KP(b,null,KP("span",{id:"aria-selection"},_),KP("span",{id:"aria-focused"},I),KP("span",{id:"aria-results"},A),KP("span",{id:"aria-guidance"},O));return KP(b,null,KP(kV,{id:c},N&&R),KP(kV,{"aria-live":C,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!N&&R))},_V=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],IV=new RegExp("["+_V.map((function(e){return e.letters})).join("")+"]","g"),AV={},NV=0;NV<_V.length;NV++)for(var OV=_V[NV],RV=0;RV<OV.letters.length;RV++)AV[OV.letters[RV]]=OV.base;var TV=function(e){return e.replace(IV,(function(e){return AV[e]}))},MV=function(e,t){void 0===t&&(t=xV);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(TV),PV=function(e){return e.replace(/^\s+|\s+$/g,"")},DV=function(e){return"".concat(e.label," ").concat(e.value)},jV=["innerRef"];function BV(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter((function(e){var t=uF(e,1)[0];return!n.includes(t)}));return o.reduce((function(e,t){var n=uF(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})}(dF(e,jV),"onExited","in","enter","exit","appear");return KP("input",wM({ref:t},n,{css:qP({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"production"===Q.env.NODE_ENV?"":";label:DummyInput;","production"===Q.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var LV=["boxSizing","height","overflow","paddingRight","position"],zV={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function FV(e){e.cancelable&&e.preventDefault()}function VV(e){e.stopPropagation()}function GV(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function WV(){return"ontouchstart"in window||navigator.maxTouchPoints}var HV=!("undefined"==typeof window||!window.document||!window.document.createElement),XV=0,YV={capture:!1,passive:!1};var $V=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},ZV="production"===Q.env.NODE_ENV?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}};function UV(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,a=u(!1),c=u(!1),d=u(0),f=u(null),p=l((function(e,t){if(null!==f.current){var s=f.current,l=s.scrollTop,u=s.scrollHeight,d=s.clientHeight,p=f.current,h=t>0,m=u-d-l,g=!1;m>t&&a.current&&(r&&r(e),a.current=!1),h&&c.current&&(i&&i(e),c.current=!1),h&&t>m?(n&&!a.current&&n(e),p.scrollTop=u,g=!0,a.current=!0):!h&&-t>l&&(o&&!c.current&&o(e),p.scrollTop=0,g=!0,c.current=!0),g&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}}),[n,r,o,i]),h=l((function(e){p(e,e.deltaY)}),[p]),m=l((function(e){d.current=e.changedTouches[0].clientY}),[]),g=l((function(e){var t=d.current-e.changedTouches[0].clientY;p(e,t)}),[p]),y=l((function(e){if(e){var t=!!DF&&{passive:!1};e.addEventListener("wheel",h,t),e.addEventListener("touchstart",m,t),e.addEventListener("touchmove",g,t)}}),[g,m,h]),b=l((function(e){e&&(e.removeEventListener("wheel",h,!1),e.removeEventListener("touchstart",m,!1),e.removeEventListener("touchmove",g,!1))}),[g,m,h]);return s((function(){if(t){var e=f.current;return y(e),function(){b(e)}}}),[t,y,b]),function(e){f.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=u({}),i=u(null),a=l((function(e){if(HV){var t=document.body,n=t&&t.style;if(r&&LV.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&XV<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(zV).forEach((function(e){var t=zV[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&WV()&&(t.addEventListener("touchmove",FV,YV),e&&(e.addEventListener("touchstart",GV,YV),e.addEventListener("touchmove",VV,YV))),XV+=1}}),[r]),c=l((function(e){if(HV){var t=document.body,n=t&&t.style;XV=Math.max(XV-1,0),r&&XV<1&&LV.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&WV()&&(t.removeEventListener("touchmove",FV,YV),e&&(e.removeEventListener("touchstart",GV,YV),e.removeEventListener("touchmove",VV,YV)))}}),[r]);return s((function(){if(t){var e=i.current;return a(e),function(){c(e)}}}),[t,a,c]),function(e){i.current=e}}({isEnabled:n});return KP(b,null,n&&KP("div",{onClick:$V,css:ZV}),t((function(e){o(e),i(e)})))}var JV="production"===Q.env.NODE_ENV?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}},KV=function(e){var t=e.name,n=e.onFocus;return KP("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:JV,value:"",onChange:function(){}})};function qV(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function QV(){return qV(/^Mac/i)}function eG(){return qV(/^iPhone/i)||qV(/^iPad/i)||QV()&&navigator.maxTouchPoints>1}var tG={clearIndicator:rV,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return sF({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:nV,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return sF({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return sF({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return sF(sF({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},dV),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return sF({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:ZF,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return sF((iF(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),iF(n,"position","absolute"),iF(n,"width","100%"),iF(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return sF({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return sF({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return sF({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return sF({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:$F,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return sF({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return sF({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return sF({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return sF({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},nG={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},rG={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:RF(),captureMenuScroll:!RF(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e){return function(t,n){if(t.data.__isNew__)return!0;var r=sF({ignoreCase:!0,ignoreAccents:!0,stringify:DV,trim:!0,matchFrom:"any"},e),o=r.ignoreCase,i=r.ignoreAccents,a=r.stringify,s=r.trim,l=r.matchFrom,c=s?PV(n):n,u=s?PV(a(t)):a(t);return o&&(c=c.toLowerCase(),u=u.toLowerCase()),i&&(c=MV(c),u=TV(u)),"start"===l?u.substr(0,c.length)===c:u.indexOf(c)>-1}}(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function oG(e,t,n,r){return{type:"option",data:t,isDisabled:fG(e,t,n),isSelected:pG(e,t,n),label:uG(e,t),value:dG(e,t),index:r}}function iG(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return oG(e,n,t,r)})).filter((function(t){return lG(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=oG(e,n,t,r);return lG(e,i)?i:void 0})).filter(jF)}function aG(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,yF(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function sG(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,yF(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function lG(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!mG(e)||!i)&&hG(e,{label:a,value:s,data:o},r)}var cG=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},uG=function(e,t){return e.getOptionLabel(t)},dG=function(e,t){return e.getOptionValue(t)};function fG(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function pG(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=dG(e,t);return n.some((function(t){return dG(e,t)===r}))}function hG(e,t,n){return!e.filterOption||e.filterOption(t,n)}var mG=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},gG=1,yG=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nL(e,t)}(n,y);var t=gF(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.isAppleDevice=QV()||eG(),r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var c=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==c})),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(yF(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=BF(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(BF(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=BF(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return cG(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return sG(iG(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return EF.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return uG(r.props,e)},r.getOptionValue=function(e){return dG(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=tG[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,sF(sF({},vV),e.components);var e},r.buildCategorizedOptions=function(){return iG(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return aG(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:sF({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout((function(){return r.focusInput()})))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&_F(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return mG(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,c=t.menuIsOpen,u=t.onKeyDown,d=t.tabSelectsValue,f=t.openMenuOnFocus,p=r.state,h=p.focusedOption,m=p.focusedValue,g=p.selectValue;if(!(l||"function"==typeof u&&(u(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!c||!d||!h||f&&r.isOptionSelected(h,g))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(c){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":c?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!c){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":c?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":c?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!c)return;r.focusOption("pageup");break;case"PageDown":if(!c)return;r.focusOption("pagedown");break;case"Home":if(!c)return;r.focusOption("first");break;case"End":if(!c)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++gG),r.state.selectValue=kF(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=cG(o,i[a])}return r}return function(e,t,n){t&&pF(e.prototype,t),n&&pF(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&OF(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(OF(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(nG):sF(sF({},nG),this.props.theme):nG}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,c=s.isRtl,u=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:c,options:u,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return fG(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return pG(this.props,e,t)}},{key:"filterOption",value:function(e,t){return hG(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,n=t.isDisabled,r=t.isSearchable,o=t.inputId,i=t.inputValue,a=t.tabIndex,s=t.form,l=t.menuIsOpen,c=t.required,u=this.getComponents().Input,d=this.state,f=d.inputIsHidden,p=d.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),g=sF(sF(sF({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":c,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?e.createElement(u,wM({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:n,isHidden:f,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},g)):e.createElement(BV,wM({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:wF,onFocus:this.onInputFocus,disabled:n,tabIndex:a,inputMode:"none",form:s,value:""},g))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,l=n.Placeholder,c=this.commonProps,u=this.props,d=u.controlShouldRenderValue,f=u.isDisabled,p=u.isMulti,h=u.inputValue,m=u.placeholder,g=this.state,y=g.selectValue,b=g.focusedValue,v=g.isFocused;if(!this.hasValue()||!d)return h?null:e.createElement(l,wM({},c,{key:"placeholder",isDisabled:f,isFocused:v,innerProps:{id:this.getElementId("placeholder")}}),m);if(p)return y.map((function(n,s){var l=n===b,u="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return e.createElement(r,wM({},c,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:f,key:u,index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))}));if(h)return null;var w=y[0];return e.createElement(s,wM({},c,{data:w,isDisabled:f}),this.formatOptionLabel(w,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,wM({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!t||!i)return null;return e.createElement(t,wM({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,r=t.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.createElement(r,wM({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,wM({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,l=n.LoadingMessage,c=n.NoOptionsMessage,u=n.Option,d=this.commonProps,f=this.state.focusedOption,p=this.props,h=p.captureMenuScroll,m=p.inputValue,g=p.isLoading,y=p.loadingMessage,b=p.minMenuHeight,v=p.maxMenuHeight,w=p.menuIsOpen,x=p.menuPlacement,E=p.menuPosition,k=p.menuPortalTarget,C=p.menuShouldBlockScroll,S=p.menuShouldScrollIntoView,_=p.noOptionsMessage,I=p.onMenuScrollToTop,A=p.onMenuScrollToBottom;if(!w)return null;var N,O=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,l=n.label,c=n.value,p=f===i,h=a?void 0:function(){return t.onOptionHover(i)},m=a?void 0:function(){return t.selectOption(i)},g="".concat(t.getElementId("option"),"-").concat(r),y={id:g,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":t.isAppleDevice?void 0:s};return e.createElement(u,wM({},d,{innerProps:y,data:i,isDisabled:a,isSelected:s,key:g,label:l,type:o,value:c,isFocused:p,innerRef:p?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())N=this.getCategorizedOptions().map((function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,l="".concat(t.getElementId("group"),"-").concat(s),c="".concat(l,"-heading");return e.createElement(r,wM({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:c,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map((function(e){return O(e,"".concat(s,"-").concat(e.index))})))}if("option"===n.type)return O(n,"".concat(n.index))}));else if(g){var R=y({inputValue:m});if(null===R)return null;N=e.createElement(l,d,R)}else{var T=_({inputValue:m});if(null===T)return null;N=e.createElement(c,d,T)}var M={minMenuHeight:b,maxMenuHeight:v,menuPlacement:x,menuPosition:E,menuShouldScrollIntoView:S},P=e.createElement(HF,wM({},d,M),(function(n){var r=n.ref,o=n.placerProps,s=o.placement,l=o.maxHeight;return e.createElement(i,wM({},d,M,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:g,placement:s}),e.createElement(UV,{captureEnabled:h,onTopArrive:I,onBottomArrive:A,lockEnabled:C},(function(n){return e.createElement(a,wM({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:t.getElementId("listbox")},isLoading:g,maxHeight:l,focusedOption:f}),N)})))}));return k||"fixed"===E?e.createElement(s,wM({},d,{appendTo:k,controlElement:this.controlRef,menuPlacement:x,menuPosition:E}),P):P}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=n.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return e.createElement(KV,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(r){var c=l.map((function(e){return t.getOptionValue(e)})).join(r);return e.createElement("input",{name:a,type:"hidden",value:c})}var u=l.length>0?l.map((function(n,r){return e.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:t.getOptionValue(n)})})):e.createElement("input",{name:a,type:"hidden",value:""});return e.createElement("div",null,u)}var d=l[0]?this.getOptionValue(l[0]):"";return e.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,l=this.getFocusableOptions();return e.createElement(SV,wM({},t,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,s=a.className,l=a.id,c=a.isDisabled,u=a.menuIsOpen,d=this.state.isFocused,f=this.commonProps=this.getCommonProps();return e.createElement(o,wM({},f,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:c,isFocused:d}),this.renderLiveRegion(),e.createElement(n,wM({},f,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:c,isFocused:d,menuIsOpen:u}),e.createElement(i,wM({},f,{isDisabled:c}),this.renderPlaceholderOrValue(),this.renderInput()),e.createElement(r,wM({},f,{isDisabled:c}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,c=e.options,u=e.value,d=e.menuIsOpen,f=e.inputValue,p=e.isMulti,h=kF(u),m={};if(n&&(u!==n.value||c!==n.options||d!==n.menuIsOpen||f!==n.inputValue)){var g=d?function(e,t){return aG(iG(e,t))}(e,h):[],y=d?sG(iG(e,h),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,h):null,v=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,g);m={selectValue:h,focusedOption:v,focusedOptionId:cG(y,v),focusableOptionsWithIds:y,focusedValue:b,clearFocusValueOnUpdate:!1}}var w=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,E=a&&s;return a&&!E&&(x={value:BF(p,h,h[0]||null),options:h,action:"initial-input-focus"},E=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(x=null),sF(sF(sF({},m),w),{},{prevProps:e,ariaSelection:x,prevWasFocused:E})}}]),n}();yG.defaultProps=rG;var bG=r((function(t,n){var r=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,a=void 0===i?null:i,s=e.inputValue,u=e.menuIsOpen,d=e.onChange,f=e.onInputChange,p=e.onMenuClose,h=e.onMenuOpen,m=e.value,g=dF(e,fF),y=uF(c(void 0!==s?s:n),2),b=y[0],v=y[1],w=uF(c(void 0!==u?u:o),2),x=w[0],E=w[1],k=uF(c(void 0!==m?m:a),2),C=k[0],S=k[1],_=l((function(e,t){"function"==typeof d&&d(e,t),S(e)}),[d]),I=l((function(e,t){var n;"function"==typeof f&&(n=f(e,t)),v(void 0!==n?n:e)}),[f]),A=l((function(){"function"==typeof h&&h(),E(!0)}),[h]),N=l((function(){"function"==typeof p&&p(),E(!1)}),[p]),O=void 0!==s?s:b,R=void 0!==u?u:x,T=void 0!==m?m:C;return sF(sF({},g),{},{inputValue:O,menuIsOpen:R,onChange:_,onInputChange:I,onMenuClose:N,onMenuOpen:A,value:T})}(t);return e.createElement(yG,wM({ref:n},r))})),vG=bG;const wG=({options:t,items_per_page:n,className:r,defaultValue:o,onChange:i})=>{const[a,s]=c(""),[l,u]=c(0),d=t.filter((e=>e.label.toLowerCase().includes(a)||e.value.toLowerCase().includes(a)));var f;f=void 0!==n?d.slice(l*n,(l+1)*n):d;const p={control:e=>({...e,minHeight:void 0})};return e.createElement(vG,{options:f,onInputChange:e=>{s(e.toLowerCase()),u(0)},onChange:i,inputValue:a,isSearchable:!0,placeholder:"Select an option...",className:r,unstyled:!0,styles:p,classNamePrefix:"styled-select",defaultValue:o,value:o})};const xG=({iostore:t,inputconverter:n,parser:r=e=>parseFloat(e)})=>{const o=e.useContext(xW),{preview:i}=t.valuestore(),a=t.use(),[s,l]=e.useState(n[1](i?.value));e.useEffect((()=>{l(n[1](i?.value))}),[i]);const c=e=>{var t;e=r(parseFloat(e.toString()).toString()),isNaN(e)?(e="<NoValue>",l("")):(void 0!==a.value_options?.min&&e<a.value_options.min&&(e=a.value_options.min),void 0!==a.value_options?.max&&e>a.value_options.max&&(e=a.value_options.max),e=0===(t=e)?0:Math.abs(t)<1e-12?t:Number(t.toPrecision(12)),l(e.toString()));try{e=n[0](e)}catch(e){}o.worker?.set_io_value({nid:a.node,ioid:a.id,value:e,set_default:a.render_options.set_default})};let u=a.connected?n[1](i?.value):s;void 0===u&&(u=a.value_options?.min),void 0===u&&(u=a.value_options?.max),void 0===u&&(u=""),null===u&&(u="");let d=null,f=1;return void 0!==a.value_options?.step?f=a.value_options.step:void 0!==a.value_options?.max&&void 0!==a.value_options?.min&&(f=(a.value_options?.max-a.value_options?.min)/1e3),void 0===a.value_options?.max||void 0===a.value_options?.min||a.connected||(d=e.createElement("div",{style:{minWidth:"100px"},className:"SliderContainer"},e.createElement(Yz,{className:"SliderRoot",value:[void 0===u?a.value_options?.min:u],min:a.value_options?.min,max:a.value_options?.max,step:f,disabled:a.connected,onValueCommit:e=>{isNaN(e[0])||c(e[0])},onValueChange:e=>{isNaN(e[0])||l(e[0].toString())}},e.createElement($z,{className:"SliderTrack"},e.createElement(Zz,{className:"SliderRange"})),e.createElement(Uz,{className:"SliderThumb"})))),e.createElement(e.Fragment,null,d,e.createElement("input",{type:"text",className:"nodedatainput styledinput numberinput",value:u,onChange:e=>l(e.target.value),onBlur:e=>{c(e.target.value)},onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey)if("ArrowUp"!==e.key)if("ArrowDown"!==e.key)/^[0-9.eE+-]$/.test(e.key)||["Backspace","ArrowLeft","ArrowRight","Delete","Tab"].includes(e.key)||e.preventDefault();else{e.shiftKey&&(f*=10);let t=(parseFloat(u)||0)-f;c(t)}else{e.shiftKey&&(f*=10);let t=(parseFloat(u)||0)+f;c(t)}},disabled:a.connected,step:a.value_options?.step,min:a.value_options?.min,max:a.value_options?.max}))},EG=({iostore:t,inputconverter:n})=>{const r=e.useContext(xW),{preview:o,full:i}=t.valuestore(),a=t.use(),s=void 0===i?o?.value:i?.value,[l,c]=e.useState(n[1](s));e.useEffect((()=>{c(n[1](s))}),[s]);let u=a.connected?n[1](s):l;return null==u&&(u=""),e.createElement("input",{className:"nodedatainput styledinput stringinput",value:u,onChange:e=>c(e.target.value),onBlur:e=>{let t=e.target.value;t||(t="<NoValue>");try{t=n[0](t)}catch(e){}r.worker?.set_io_value({nid:a.node,ioid:a.id,value:t,set_default:a.render_options.set_default})},disabled:a.connected})},kG=e=>e,CG=e=>parseFloat(e),SG=e=>!!e,_G=e=>"null"===e?null:e,IG=({iostore:t,inputconverter:n,parser:r})=>{const o=t.use(),{preview:i,full:a}=t.valuestore(),s=void 0===a?i?.value:a.value;let l=o.value_options?.options||[];Array.isArray(l)&&(l={type:"enum",values:l,keys:l.map((e=>null===e?"None":e.toString())),nullable:!1}),"enum"!==l.type&&(l={type:"enum",values:Object.values(l),keys:Object.keys(l),nullable:!1}),!l.nullable||l.values.includes(null)||l.keys.includes("None")||(l.values.unshift(null),l.keys.unshift("None"));const c=[];for(let e=0;e<l.values.length;e++){const t=null===l.values[e]||void 0===l.values[e]?"undefined":typeof l.values[e];let n=l.values[e];null===n&&(n="null"),void 0===n&&(n="undefined"),c.push([l.keys[e],n.toString(),t])}const u=e.useContext(xW),d=({value:e,datatype:t})=>{const i=r||(e=>"nuinputconvertermber"===e?CG:"boolean"===e?SG:"undefined"===e?_G:kG)(t);let a=i(e);try{a=n[0](e)}catch(e){}u.worker?.set_io_value({nid:o.node,ioid:o.id,value:a,set_default:o.render_options.set_default})};let f=s;null===f&&(f="null"),void 0===f&&(f="undefined");const p=c.find((e=>e[1]===f.toString()));let h;void 0!==p&&(h={value:p[1],label:p[0],datatype:p[2]});const m=c.map((e=>({value:e[1],label:e[0],datatype:e[2]})));return e.createElement(wG,{className:"nodedatainput styleddropdown",options:m,defaultValue:h,onChange:e=>{d(null!==e?e:{value:"<NoValue>",datatype:"string"})}})},AG={float:({iostore:e,inputconverter:t})=>xG({iostore:e,inputconverter:t,parser:parseFloat}),int:({iostore:e,inputconverter:t})=>xG({iostore:e,inputconverter:t,parser:parseInt}),bool:({iostore:t,inputconverter:n})=>{const r=e.useContext(xW),{preview:o}=t.valuestore(),i=t.use(),a=void 0===o?.value,s=e.useRef(null);e.useEffect((()=>{s.current&&(s.current.indeterminate=a)}),[s,a]);return e.createElement("input",{ref:s,type:"checkbox",className:"styledcheckbox booleaninput",checked:!!n[1](o?.value),onChange:e=>{let t=e.target.checked;try{t=n[0](e.target.checked)}catch(e){}r.worker?.set_io_value({nid:i.node,ioid:i.id,value:t,set_default:i.render_options.set_default})},disabled:i.connected})},string:EG,str:EG,color:({iostore:t})=>{const n=e.useContext(xW),r=t.use(),{preview:o,full:i}=t.valuestore(),a=void 0===i?o?.value:i.value,s=r.value_options?.colorspace||"hex";let l=!1;return"string"!=typeof r.type&&"anyOf"in r.type&&void 0!==r.type.anyOf&&(l=r.type.anyOf.some((e=>"None"===e))),e.createElement(nF,{onChange:e=>{let t="<NoValue>";e&&(t=e[s]?e[s]():e.hex()),null===e&&(t=null),n.worker?.set_io_value({nid:r.node,ioid:r.id,value:t,set_default:r.render_options.set_default})},inicolordata:a,allow_null:l,inicolorspace:s})},select:IG,enum:IG,bytes:((t,n=void 0)=>({iostore:r})=>{const{full:o,preview:i}=r.valuestore(),a=void 0===o?i:o,s=a?.value||n;return e.createElement(t,{iostore:r,value:s})})(iz,"")},NG=({iostore:t,typestring:n})=>{const{InLineRenderer:r}=e.useContext(BG),{preview:o,full:i}=t.valuestore();if(n&&r[n])return e.createElement("div",null,r[n]({iostore:t}));let a=(JSON.stringify(i||o)||"").replace(/\\n/g,"\n");return a.length>63&&(a=a.slice(0,60)+"..."),e.createElement("div",null,a)},OG=(t,n=void 0)=>({iostore:r})=>{const{full:o,preview:i}=r.valuestore(),a=void 0===o?i:o,s=a?.value||n;return e.createElement(t,{iostore:r,value:s})},RG={string:OG(oz),table:OG(az),image:OG(nz),svg:OG(rz,""),dict:OG(sz,"{}"),bytes:OG(iz,"")},TG=t=>({iostore:n,value:r,preValue:o,onLoaded:i})=>e.createElement(t,{iostore:n,value:r,preValue:o,onLoaded:i}),MG=TG(sz),PG={Inputrenderer:AG,Outputrenderer:{},HandlePreviewRenderer:{},DataOverlayRenderer:{},DataPreviewViewRenderer:RG,DataViewRenderer:cz,InLineRenderer:LR,NodeContextExtenders:{},NodeRenderer:{},NodeHooks:{}},DG=(e,t)=>{const n=t.options||{},r=void 0===n.overwrite||n.overwrite;switch(t.type){case"EXTEND_INPUT_RENDER":return!r&&e.Inputrenderer[t.payload.type]?e:{...e,Inputrenderer:{...e.Inputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_OUTPUT_RENDER":return!r&&e.Outputrenderer[t.payload.type]?e:{...e,Outputrenderer:{...e.Outputrenderer,[t.payload.type]:t.payload.component}};case"EXTEND_HANDLE_PREVIEW_RENDER":return!r&&e.HandlePreviewRenderer[t.payload.type]?e:{...e,HandlePreviewRenderer:{...e.HandlePreviewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_OVERLAY_RENDER":return!r&&e.DataOverlayRenderer[t.payload.type]?e:{...e,DataOverlayRenderer:{...e.DataOverlayRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_PREVIEW_RENDER":return!r&&e.DataPreviewViewRenderer[t.payload.type]?e:{...e,DataPreviewViewRenderer:{...e.DataPreviewViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_DATA_VIEW_RENDER":return!r&&e.DataViewRenderer[t.payload.type]?e:{...e,DataViewRenderer:{...e.DataViewRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_CONTEXT_EXTENDER":return!r&&e.NodeContextExtenders[t.payload.type]?e:{...e,NodeContextExtenders:{...e.NodeContextExtenders,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_RENDERER":return!r&&e.NodeRenderer[t.payload.type]?e:{...e,NodeRenderer:{...e.NodeRenderer,[t.payload.type]:t.payload.component}};case"EXTEND_NODE_HOOKS":return!r&&e.NodeHooks[t.payload.type]?e:{...e,NodeHooks:{...e.NodeHooks,[t.payload.type]:t.payload.component}};case"EXTEND_FROM_PLUGIN":let n=!1;const o=[[t.payload.plugin.input_renderers||{},e.Inputrenderer],[t.payload.plugin.output_renderers||{},e.Outputrenderer],[t.payload.plugin.handle_preview_renderers||{},e.HandlePreviewRenderer],[t.payload.plugin.data_overlay_renderers||{},e.DataOverlayRenderer],[t.payload.plugin.data_preview_renderers||{},e.DataPreviewViewRenderer],[t.payload.plugin.data_view_renderers||{},e.DataViewRenderer],[t.payload.plugin.node_context_extenders||{},e.NodeContextExtenders],[t.payload.plugin.node_renderers||{},e.NodeRenderer],[t.payload.plugin.node_hooks||{},e.NodeHooks]];for(const[e,t]of o){if(Object.keys(e).length>0)if(r)n=!0;else for(const r in e)if(!t[r]){n=!0;break}if(n)break}if(!n)return e;for(const[e,t]of o)for(const n in e)!r&&t[n]||(t[n]=e[n]);return{...e};default:return e}},jG=({children:t,plugins:n,fnrf_zst:r})=>{const[o,i]=v(DG,PG),a=(e,t)=>{i({type:"EXTEND_FROM_PLUGIN",payload:{plugin:e},options:t})};return s((()=>{for(const t in n){const o=n[t];if(!o)continue;const i=o.renderpluginfactory;i&&a(i({React:e,fnrf_zst:r,NodeContext:tW}))}}),[n]),e.createElement(BG.Provider,{value:{Inputrenderer:o.Inputrenderer,Outputrenderer:o.Outputrenderer,HandlePreviewRenderer:o.HandlePreviewRenderer,DataOverlayRenderer:o.DataOverlayRenderer,DataPreviewViewRenderer:o.DataPreviewViewRenderer,DataViewRenderer:o.DataViewRenderer,InLineRenderer:o.InLineRenderer,NodeContextExtenders:o.NodeContextExtenders,NodeRenderer:o.NodeRenderer,NodeHooks:o.NodeHooks,extendInputRenderMapping:(e,t,n)=>{i({type:"EXTEND_INPUT_RENDER",payload:{type:e,component:t},options:n})},extendOutputRenderMapping:(e,t,n)=>{i({type:"EXTEND_OUTPUT_RENDER",payload:{type:e,component:t},options:n})},extendHandlePreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_HANDLE_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataOverlayRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_OVERLAY_RENDER",payload:{type:e,component:t},options:n})},extendDataPreviewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_PREVIEW_RENDER",payload:{type:e,component:t},options:n})},extendDataViewRenderMapping:(e,t,n)=>{i({type:"EXTEND_DATA_VIEW_RENDER",payload:{type:e,component:t},options:n})},extendNodeContextExtender:(e,t,n)=>{i({type:"EXTEND_NODE_CONTEXT_EXTENDER",payload:{type:e,component:t},options:n})},extendNodeRenderer:(e,t,n)=>{i({type:"EXTEND_NODE_RENDERER",payload:{type:e,component:t},options:n})},extendNodeHooks:(e,t,n)=>{i({type:"EXTEND_NODE_HOOKS",payload:{type:e,component:t},options:n})},extendFromPlugin:a}},t)},BG=i({Inputrenderer:PG.Inputrenderer,Outputrenderer:PG.Outputrenderer,HandlePreviewRenderer:PG.HandlePreviewRenderer,DataOverlayRenderer:PG.DataOverlayRenderer,DataPreviewViewRenderer:PG.DataPreviewViewRenderer,DataViewRenderer:PG.DataViewRenderer,InLineRenderer:PG.InLineRenderer,NodeContextExtenders:PG.NodeContextExtenders,NodeRenderer:PG.NodeRenderer,NodeHooks:PG.NodeHooks,extendInputRenderMapping:(e,t,n)=>{},extendOutputRenderMapping:(e,t,n)=>{},extendHandlePreviewRenderMapping:(e,t,n)=>{},extendDataOverlayRenderMapping:(e,t,n)=>{},extendDataPreviewRenderMapping:(e,t,n)=>{},extendDataViewRenderMapping:(e,t,n)=>{},extendNodeContextExtender:(e,t,n)=>{},extendNodeRenderer:(e,t,n)=>{},extendNodeHooks:(e,t,n)=>{},extendFromPlugin:(e,t)=>{}}),LG=e=>{const t=o(xW),{DataOverlayRenderer:n,DataViewRenderer:r}=o(BG);if(void 0===e)return;const i=t.render_options(),[a]=VG(e.type,i.typemap||{});return a?n[a]?n[a]:r[a]?TG(r[a]):MG:MG},zG=({iostore:t,Component:n})=>{const[r,o]=e.useState(void 0),[i,a]=e.useState(void 0),{full:s}=t.valuestore();e.useEffect((()=>{void 0===s?t.getState().try_get_full_value():a(s.value)}),[s]);return e.createElement(n,{iostore:t,value:i,preValue:r,onLoaded:()=>{void 0!==i&&o(i)}})},FG=({iostore:t,Component:n})=>e.createElement(n,{iostore:t}),VG=(e,t)=>{if("string"==typeof e)return e in t?[t[e],e]:[e,e];if("allOf"in e&&void 0!==e.allOf)return[void 0,void 0];if("anyOf"in e&&void 0!==e.anyOf){const n=e.anyOf.map((e=>VG(e,t)));for(const e of n)switch(e[0]){case"bool":return["bool",e[1]];case"enum":return["enum",e[1]];case"float":return["float",e[1]];case"int":return["int",e[1]];case"string":case"str":return["string",e[1]]}return[void 0,void 0]}return"type"in e&&void 0!==e.type&&"enum"===e.type?["enum","enum"]:[void 0,void 0]},GG=({iostore:t,typestring:n,preview:r,...i})=>{const[a,s]=c(!1),[l,u]=c(!1),d=e.useContext(xW),f=t.use(),[p,h]=(e=>{const t=o(xW).render_options(),{HandlePreviewRenderer:n,DataPreviewViewRenderer:r}=o(BG),i=LG(e);let a;if(e){const[o]=VG(e.type,t.typemap||{});a=o?n[o]?n[o]:r[o]?r[o]:OG(lz):OG(lz)}return[a,i]})(f),m=d.local_state((()=>d.reactflowRef));return e.createElement(MR,{open:a||l,onOpenChange:u},e.createElement(PR,{asChild:!0},e.createElement(ca,{id:f.id,"data-type":n,...i})),e.createElement(DR,{container:m},e.createElement(jR,{className:"iotooltipcontent",sideOffset:5},e.createElement("div",{className:"iotooltip_container"},e.createElement("div",{className:"iotooltip_header"},a?e.createElement(Gv,{onClick:()=>s(!1)}):e.createElement(Vv,{onClick:()=>s(!0)}),h&&e.createElement(Yv,{title:f.full_id,trigger:e.createElement(Mv,null),onOpenChange:e=>{e&&f.try_get_full_value&&f.try_get_full_value(),s(e)}},e.createElement(zG,{Component:h,iostore:t}))),p?e.createElement(FG,{Component:p,iostore:t}):`no preview available for "${n}"`),e.createElement(BR,{className:"iotooltipcontentarrow"}))))},WG={"":[e=>e,e=>e],str_to_json:[e=>JSON.parse(e),e=>"string"==typeof e?e:JSON.stringify(e)],str_to_list:[e=>{try{const t=JSON.parse(e);return Array.isArray(t)?t:[t]}catch(t){try{return JSON.parse("["+e+"]")}catch(e){}}throw new Error("Invalid list")},e=>JSON.stringify(e)]},HG=({iostore:t})=>{const n=o(xW).render_options(),r=t.use(),[i,a]=VG(r.render_options.type,n.typemap||{}),{Inputrenderer:s}=o(BG),l=i?r.value_options?.options?IG:s[i]:void 0,c=WG[(a&&n.inputconverter?.[a])??""]||WG[""];return r.hidden?null:e.createElement("div",{className:"nodeinput","data-type":i},e.createElement(GG,{iostore:t,typestring:i,position:Si.Left,type:"target"}),l&&e.createElement("div",{className:"iovaluefield nodrag","data-type":i},e.createElement(l,{iostore:t,inputconverter:c})),e.createElement("div",{className:"ioname"},r.name),e.createElement(GG,{iostore:t,typestring:i,position:Si.Right,type:"source"}))},XG=({iostore:t})=>{const n=o(xW).render_options(),r=t.use(),[i]=VG(r.type,n.typemap||{}),{Outputrenderer:a}=o(BG),s=i?a[i]:void 0;return r.hidden?null:e.createElement("div",{className:"nodeoutput","data-type":i},e.createElement(GG,{iostore:t,typestring:i,position:Si.Right,type:"source"}),e.createElement("div",{className:"ioname"},r.name),s?e.createElement("div",{className:"iovaluefield nodrag"},e.createElement(s,{iostore:t})):e.createElement("div",{className:"iovaluefield"},e.createElement(NG,{iostore:t,typestring:i})))};function YG(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`}function $G(e,t){const n=["","K","M","G","T"];let r=0;for(;e>=t&&r<n.length-1;)e/=t,r++;return[e.toFixed(2),n[r]]}const ZG=({state:t,className:n="reacttqdm",...r})=>{const o=u(null),i=u(null);s((()=>{const e=()=>{o.current&&i.current&&function(e,t,n={}){const{maxFontSize:r=100,minFontSize:o=6,decrementFactor:i=.9}=n;if(!e||!t)return;if(i>=1||i<=0)throw new Error("decrementFactor must be between 0 and 1");const a=e.getBoundingClientRect(),s=a.width,l=a.height;let c=r;t.style.whiteSpace="nowrap",t.style.display="inline-block",t.style.fontSize=c+"px";let u=t.getBoundingClientRect();for(;(u.width>s||u.height>l)&&c>o;)c*=i,t.style.fontSize=c+"px",u=t.getBoundingClientRect()}(o.current,i.current,{maxFontSize:12,decrementFactor:.9})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]);const a=t.total?t.n/t.total*100:0;return e.createElement("div",{ref:o,className:n,...r},e.createElement("div",{style:{position:"relative",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}},e.createElement("div",{className:n+"-bar",style:{position:"absolute",width:"100%",height:"100%",overflow:"hidden"}},e.createElement("div",{className:n+"-progress",style:{width:`${a}%`,height:"100%"}})),e.createElement("div",{className:n+"-text",ref:i},function(e={n:0,elapsed:0,ascii:!1,unit:"it",unit_scale:!1,unit_divisor:1e3}){let t=e.total??null;const{n:n,unit_scale:r,elapsed:o,unit:i,unit_divisor:a,prefix:s="",rate:l,postfix:c=null,initial:u=0}=e;null!==t&&n>=t+.5&&(t=null);let d=n,f=t,p=l;r&&!0!==r&&1!==r&&(null!==t&&(f=t*r),d=n*r,void 0!==l&&(p=l*r));const h=YG(o);void 0===p&&o>0&&(p=(d-u)/o);const m=p?1/p:void 0,[g,y]=p?$G(p,a):[void 0,""],[b,v]=m?$G(m,1e3):[void 0,""],w=m&&m>1?b?`${b}${v}s/`+i:"?":(g||"?")+`${y}${i}/s`,x=r?$G(d,a).join(""):d.toString(),E=r&&null!==f?$G(f,a).join(""):f?.toString()??"?",k=p?YG(p&&null!==f?(f-d)/p:0):"?",C=s?`${s}: `:"";if(null!==t){const e=` ${x}/${E} [${h} < ${k}, ${w}${c??""}]`;return`${C}${(d/t*100).toFixed(0)}%${e}`}return`${C}${x}${i} [${h}, ${w}${c??""}]`}(t))))},UG=e.memo((({node_data:t})=>{const n=o(xW);return e.createElement("div",{className:"nodeheader",title:t.description||t.node_name},e.createElement("div",{className:"nodeheader_element"},e.createElement(Hv,{fontSize:"inherit",className:"triggerbutton",onClick:()=>{n.on_node_action({type:"trigger",from_remote:!1,id:t.id})}}),e.createElement(Wv,{fontSize:"inherit",onClick:async()=>{console.log("nodestatus",await(n.worker?.get_node_status(t.id)))}})),e.createElement("div",{className:"nodeheader_element nodeheader_title"},e.createElement("div",{className:"nodeheader_title_text"},t.node_name)),e.createElement("div",{className:"nodeheader_element"},e.createElement(zv,{fontSize:"inherit"})))})),JG=({iostore:t,node_data:n})=>{const r=t.use(),[i,a]=(e=>{const t=o(xW),n=LG(e),{DataPreviewViewRenderer:r,DataViewRenderer:i}=o(BG),a=t.render_options();if(void 0===e)return[void 0,n];const[s]=VG(e.type,a.typemap||{});return s?r[s]?[r[s],n]:i[s]?[OG(i[s]),n]:[OG(lz),n]:[OG(lz),n]})(r);return e.createElement("div",{className:"nodrag nodedatabody","data-src":n.render_options?.data?.src||""},i&&r&&e.createElement(Yv,{title:r.full_id,trigger:e.createElement("div",{className:"nodedatabutton"},e.createElement(FG,{Component:i,iostore:t})),onOpenChange:e=>{e&&r?.try_get_full_value&&r?.try_get_full_value()}},a&&e.createElement(zG,{Component:a,iostore:t})))},KG=e.memo((({node_data:t})=>{const n=t.render_options?.data?.src?t.io[t.render_options?.data?.src]:void 0;return e.createElement("div",{className:"nodebody"},t.outputs.map((n=>e.createElement(XG,{key:n,iostore:t.io[n]}))),n&&e.createElement(JG,{node_data:t,iostore:n}),t.inputs.map((n=>e.createElement(HG,{key:n,iostore:t.io[n]}))))})),qG=e.memo((({node_data:t})=>{const[n,r]=c(t.name);s((()=>{r(t.name)}),[t]);const i=o(xW);return e.createElement("input",{className:"nodename_input",value:n,onChange:e=>{r(e.target.value)},onBlur:e=>{const n=e.target.value;i.on_node_action({type:"update",from_remote:!1,id:t.id,node:{name:n}})}})})),QG=({node_data:t})=>{if(!t.progress)return null;const n=t.progress();return e.createElement(ZG,{state:n,className:"nodeprogress"})},eW=e.memo((({node_data:t})=>e.createElement("div",{className:"nodefooter"},t.error&&e.createElement("div",{className:"nodeerror"},t.error),e.createElement(QG,{node_data:t})))),tW=e.createContext(null),nW=({iostore:t})=>{const n=e.useContext(xW).render_options(),r=t.use(),[o,i]=VG(r.render_options.type,n.typemap||{}),{Inputrenderer:a}=e.useContext(BG),s=o?r.value_options?.options?IG:a[o]:void 0,l=WG[(i&&n.inputconverter?.[i])??""]||WG[""];return e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,r.name),s&&e.createElement(s,{iostore:t,inputconverter:l}),e.createElement("div",null,e.createElement("label",null,"hidden:",e.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:r.connected,onChange:e=>{r.set_hidden?.(e.target.checked)},checked:r.hidden}))))},rW=({iostore:t})=>{const n=t.use();return e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,n.name),e.createElement("div",null,e.createElement("label",null,"hidden:",e.createElement("input",{className:"styledcheckbox",type:"checkbox",disabled:n.connected,onChange:e=>{n.set_hidden?.(e.target.checked)},checked:n.hidden}))))},oW=({nodestore:t})=>{const n=t.use();return e.createElement("div",{className:"nodesettings_content"},e.createElement("div",{className:"nodesettings_section"},e.createElement("div",{className:"nodesettings_component"},e.createElement("div",null,"Name"),e.createElement("div",null,e.createElement(qG,{node_data:n})))),e.createElement("div",{className:"nodesettings_section"},e.createElement("div",null,"Inputs"),n.inputs.map((t=>e.createElement(nW,{iostore:n.io[t],key:t})))),e.createElement("div",{className:"nodesettings_section"},e.createElement("div",null,"Outputs"),n.outputs.map((t=>e.createElement(rW,{iostore:n.io[t],key:t})))))},iW=()=>{const t=e.useContext(xW),n=t.local_state((e=>e.selected_nodes));if(0===n.length)return e.createElement("div",null,"Node Settings");if(n.length>1)return e.createElement("div",null,"Multiple Nodes Selected");const r=t.nodespace.get_node(n[0]);return r?e.createElement(oW,{nodestore:r}):e.createElement("div",null,"Node not found")},aW=()=>{const t=e.useContext(xW),n=t.local_settings((e=>e.view_settings.expand_node_props)),r=t.local_settings((e=>e.update_view_settings));return e.createElement(mC,{maxSize:"300px",direction:"left",expanded:void 0!==n&&n,containerClassName:"pos-right pos-top bg1 h-12",className:"nodesettings_content",onExpandChange:e=>{r({expand_node_props:e})}},e.createElement(iW,null))},sW=e=>({nodes:e.nodes,edges:e.edges,onNodesChange:e.onNodesChange,onEdgesChange:e.onEdgesChange,onConnect:e.onConnect}),lW={default:({data:t})=>{const n=t.nodestore.use(),r=n.properties["frontend:collapsed"]||!1,{visualTrigger:i,nodecontext:a}=(t=>{const n=o(xW),[r,i]=c(!1),a=t.in_trigger(),l=o(BG),u=l.NodeContextExtenders[t.node_id],d=e.useMemo((()=>u?.({node_data:t})||{}),[u,t]),f=e.useMemo((()=>({...d,node_data:t})),[d,t]),p=l.NodeHooks[t.node_id];for(const e of p||[])e({nodecontext:f});return s((()=>{n.worker?.call_hooks("node_mounted",t.id)}),[n.worker,t.id]),s((()=>{let e;return a&&!r?i(!0):r&&(e=setTimeout((()=>i(!1)),200)),()=>clearTimeout(e)}),[a,r]),{visualTrigger:r,nodecontext:f}})(n);return e.createElement(tW.Provider,{value:a},e.createElement("div",{className:"innernode"+(i?" intrigger":"")+(n.error?" error":"")},e.createElement(UG,{node_data:n}),e.createElement(qG,{node_data:n}),r?null:e.createElement(KG,{node_data:n}),e.createElement(eW,{node_data:n})))}},cW={default:({id:t,sourceX:n,sourceY:r,targetX:o,targetY:i,sourcePosition:a,targetPosition:s,data:l,...c})=>{const[u]=Li({sourceX:n,sourceY:r,sourcePosition:a,targetX:o,targetY:i,targetPosition:s});return e.createElement(e.Fragment,null,e.createElement(gi,{id:t,path:u,...c}))}},uW=()=>{const t=$a();return o(xW).rf_instance=t,e.createElement(e.Fragment,null)},dW=()=>{const t=o(xW),n=Pa("Delete"),r=Xo(El,$e),i=Xo(xl,$e);if(n){for(const n of r)if(n.selected){if(!t.worker)return e.createElement(e.Fragment,null);if(!n.source||!n.target)return e.createElement(e.Fragment,null);if(!n.sourceHandle||!n.targetHandle)return e.createElement(e.Fragment,null);t.worker.remove_edge({src_nid:n.source,src_ioid:n.sourceHandle,trg_nid:n.target,trg_ioid:n.targetHandle})}for(const n of i)if(n.selected){if(!t.worker)return e.createElement(e.Fragment,null);t.worker.remove_node(n.id)}}return e.createElement(e.Fragment,null)},fW=({id:t,top:n,left:r,right:i,bottom:a,...s})=>{const{getNode:c,setNodes:u,addNodes:d,setEdges:f}=$a(),p=o(xW),h=l((()=>{const e=c(t);if(!e)return;const n={x:e.position.x+50,y:e.position.y+50};d({...e,id:`${e.id}-copy`,position:n})}),[t,c,d]),m=l((()=>{p.on_node_action({type:"delete",id:t,from_remote:!1})}),[t,u,f]),g=p.nodespace.get_node(t,!1);if(!g)return e.createElement(e.Fragment,null," ");const y=g.use();return e.createElement("div",{style:{top:n,left:r,right:i,bottom:a},className:"context-menu",...s},e.createElement("p",{style:{fontWeight:"bold"}},e.createElement("small",null,y.name)),e.createElement("button",{onClick:h},"duplicate"),e.createElement("button",{onClick:m},"delete"))},pW=t=>{const n=o(xW),r=u(null);s((()=>{n.reactflowRef=r.current}),[r]);const[i,a]=c(null),d=l((()=>a(null)),[a]),{nodes:f,edges:p,onNodesChange:h,onEdgesChange:m,onConnect:g}=n.useReactFlowStore(uR(sW));return e.createElement("div",{className:"reactflowlayer"},e.createElement(wl,{nodes:f,edges:p,onNodesChange:h,onEdgesChange:m,onConnect:g,nodeTypes:lW,edgeTypes:cW,minZoom:t.minZoom,maxZoom:t.maxZoom,fitView:!0,onSelectionChange:({nodes:e,edges:t})=>{const r=n.local_state.getState();n.local_state.setState({...r,selected_nodes:e.map((e=>e.id)),selected_edges:t.map((e=>e.id))})},ref:r,onPaneClick:d,panOnDrag:!t.static},e.createElement(uW,null),e.createElement(dW,null),e.createElement(zl,{color:"#888",gap:16,size:1}),t.minimap&&e.createElement(Tl,{nodeStrokeWidth:3,pannable:!t.static,zoomable:!t.static,zoomStep:3}),i&&e.createElement(fW,{onClick:d,...i})))},hW=i(void 0),mW=r(((t,n)=>{const{asChild:r,children:o,className:i,style:a,...s}=t,[l,d]=c(!1),f=u(null),[p,h]=c(null),[m,g]=c({}),y=t.htime||300,b=t.vtime||300,v=t.hdelay||0,E=t.vdelay||200;w(n,(()=>f.current),[]);let k;if(r&&e.isValidElement(o)){const t=o,n=[t.props.className,i,"smooth-expand",l?"smooth-expand-expanded":""].filter(Boolean).join(" "),r={...t.props.style,...a,...m};k=e.cloneElement(t,{ref:f,className:n,style:r,...s})}else k=e.createElement("div",{ref:f,...s,className:`smooth-expand ${l?"smooth-expand-expanded":""} ${i||""}`,style:{...a,...m}},o);const C=e.createElement(hW.Provider,{value:{isExpanded:l,toggleExpand:async()=>{f.current&&(l?await(async()=>{if(!f.current)return;if(!p)return;const e={transitionProperty:"width, left, height, top",transitionDuration:`${y}ms, ${y}ms, ${b}ms, ${b}ms`};g((t=>({...t,...e})));const[t,n,r,o]=p,i=new Promise((e=>{setTimeout((()=>{g((e=>({...e,left:`${t}px`,width:`${r}px`}))),e()}),E)})),a=new Promise((e=>{setTimeout((()=>{g((e=>({...e,top:`${n}px`,height:`${o}px`}))),e()}),v)})),s=Math.max(y+v,b+E),l=new Promise((e=>{setTimeout((()=>{e()}),s)}));await Promise.all([i,a,l]),f.current.style.transition="",g({}),d(!1)})():await(async()=>{if(!f.current)return;f.current.style.transition="none",f.current.style.position="",f.current.style.top="",f.current.style.left="",f.current.style.width="",f.current.style.height="";const e=f.current.getBoundingClientRect();h([e.left,e.top,e.width,e.height]),f.current.style.transition="none",g({position:"absolute",top:`${e.top}px`,left:`${e.left}px`,width:`${e.width}px`,height:`${e.height}px`}),g((e=>({...e,transitionProperty:"width, left, height, top",transitionDuration:`${y}ms, ${y}ms, ${b}ms, ${b}ms`}))),d(!0);const t=new Promise((e=>{setTimeout((()=>{g((e=>({...e,left:"0px",width:"100vw"}))),e()}),v)})),n=new Promise((e=>{setTimeout((()=>{g((e=>({...e,top:"0px",height:"100vh"}))),e()}),E)})),r=Math.max(y+v,b+E),o=new Promise((e=>{setTimeout((()=>{e()}),r)}));await Promise.all([t,n,o])})())}}},k);return l?x.createPortal(C,document.body):C}));mW.Trigger=function({children:t}){const n=o(hW);if(!n)throw new Error("SmoothExpandComponent.Trigger must be used within a SmoothExpandComponent");return e.createElement("div",{style:{cursor:"pointer"},onClick:n.toggleExpand},t)},mW.Expanded=function({children:t}){const n=o(hW);if(!n)throw new Error("SmoothExpandComponent.Expanded must be used within a SmoothExpandComponent");return n.isExpanded?e.createElement(e.Fragment,null,t):null},mW.Collapsed=function({children:t}){const n=o(hW);if(!n)throw new Error("SmoothExpandComponent.Collapsed must be used within a SmoothExpandComponent");return n.isExpanded?null:e.createElement(e.Fragment,null,t)};const gW=e.createContext(void 0),yW=r(((t,n)=>{const{asChild:r,children:o,className:i,style:a,...d}=t,f=u(null);w(n,(()=>f.current),[]);const[p,h]=c(!1),m=l((async()=>{try{const e=f.current;if(!e)return;if(p){const e=document;e.exitFullscreen?await e.exitFullscreen():e.mozCancelFullScreen?await e.mozCancelFullScreen():e.webkitExitFullscreen?await e.webkitExitFullscreen():e.msExitFullscreen&&await e.msExitFullscreen(),h(!1)}else e.requestFullscreen?await e.requestFullscreen():e.mozRequestFullScreen?await e.mozRequestFullScreen():e.webkitRequestFullscreen?await e.webkitRequestFullscreen():e.msRequestFullscreen&&await e.msRequestFullscreen(),h(!0)}catch(e){console.error("Error toggling fullscreen",e)}}),[p]);let g;if(s((()=>{const e=()=>{const e=document.fullscreenElement;h(!!e)};return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),document.addEventListener("mozfullscreenchange",e),document.addEventListener("MSFullscreenChange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e),document.removeEventListener("mozfullscreenchange",e),document.removeEventListener("MSFullscreenChange",e)}}),[]),r&&e.isValidElement(o)){const t=o,n=[t.props.className,i].filter(Boolean).join(" "),r={...t.props.style,...a};g=e.cloneElement(t,{ref:f,className:n,style:r,...d})}else g=e.createElement("div",{ref:f,...d,className:i,style:a},o);return e.createElement(gW.Provider,{value:{isFullScreen:p,toggleFullscreen:m}},g)}));yW.Trigger=function({children:t}){const n=e.useContext(gW);if(!n)throw new Error("FullScreenComponent.Trigger must be used within a FullScreenComponent");return e.createElement("div",{style:{cursor:"pointer"},onClick:n.toggleFullscreen},t)},yW.InFullScreen=function({children:t}){const n=e.useContext(gW);if(!n)throw new Error("FullScreenComponent.Expanded must be used within a FullScreenComponent");return n.isFullScreen?e.createElement(e.Fragment,null,t):null},yW.OutFullScreen=function({children:t}){const n=e.useContext(gW);if(!n)throw new Error("FullScreenComponent.Collapsed must be used within a FullScreenComponent");return n.isFullScreen?null:e.createElement(e.Fragment,null,t)};const bW=({fnrf_zst:t,header:n,flow:r,library:o})=>{const[i,a]=c(t.options.worker),s=e.useRef(null);t.workermanager&&(t.workermanager.on_setWorker=a),t.set_worker(i),e.useEffect((()=>{t.auto_progress()}),[]),e.useEffect((()=>{t.local_state.setState({funcnodescontainerRef:s.current})}),[s]);const l=t.plugins();return e.createElement(jG,{plugins:l,fnrf_zst:t},e.createElement(xW.Provider,{value:t},e.createElement(mW,{asChild:!0},e.createElement(yW,{asChild:!0},e.createElement(fC,{style:{height:"100%",width:"100%",display:"flex",flexDirection:"column",flex:1}},e.createElement("div",{ref:s,className:"funcnodesreactflowcontainer funcnodescontainer"},n.show&&e.createElement(xC,{...n}),e.createElement("div",{className:"funcnodesreactflowbody"},e.createElement(pW,{...r}),i&&o.show&&e.createElement(lR,null),i&&r.showNodeSettings&&e.createElement(aW,null)),e.createElement("div",{className:"funcnodesflaotingmenu"},e.createElement(yW.OutFullScreen,null,r.allowExpand&&e.createElement(mW.Trigger,null,e.createElement(mW.Expanded,null,e.createElement(Dv,{size:"xl",style:{padding:"4px"}})),e.createElement(mW.Collapsed,null,e.createElement(jv,{size:"xl",style:{padding:"4px"}})))),r.allowFullScreen&&e.createElement(yW.Trigger,null,e.createElement(yW.OutFullScreen,null,e.createElement(Mv,{size:"xl",style:{padding:"4px"}})),e.createElement(yW.InFullScreen,null,e.createElement(Pv,{size:"xl",style:{padding:"4px"}}))))))))))},vW={},wW={id:"",debug:!1,useWorkerManager:!0,show_library:!0,header:{show:!0,showmenu:!0},flow:{minimap:!0,static:!1,minZoom:.1,maxZoom:5,allowFullScreen:!0,allowExpand:!0,showNodeSettings:!0},library:{show:!0}},xW=i(Ql(wW)),EW=t=>{let n=ke(t,{...wW,id:kf()}).new_obj;if(!n.useWorkerManager&&void 0===n.worker)return e.createElement("div",null,"Error: If you don't use a worker manager, you must provide a default worker.");if(t.useWorkerManager&&void 0===t.workermanager_url)return e.createElement("div",null,"Error: If you use a worker manager, you must provide a worker manager url.");void 0===window.fnrf_zst&&(window.fnrf_zst=vW);let r=vW[n.id];if(void 0===r&&(r=Ql(n),vW[n.id]=r),n.worker&&n.worker.set_zustand(r),r.options.debug=n.debug,n.useWorkerManager){const e=new _f(n.workermanager_url,r);r.workermanager=e}return e.createElement(bW,{fnrf_zst:r,header:n.header,library:n.library,flow:n.flow})},kW={set_io_value:({nid:e,ioid:t,value:n,set_default:r=!1})=>{const i=o(xW);i.worker?.set_io_value({nid:e,ioid:t,value:n,set_default:r})}},CW=t=>{const n=new Kl("FuncNodes",t.debug?"debug":"info");n.debug("Initalizing FuncNodes with props:",t);let r=ke(t,{...wW,id:kf()}).new_obj;if(void 0===t.worker&&void 0!==t.worker_url&&(r.useWorkerManager=!1,r.worker=new Sf({url:t.worker_url,uuid:r.id,on_sync_complete:r.on_sync_complete})),void 0!==r.worker){const e=Ql(r);r.worker.set_zustand(e)}if(void 0!==t.fnw_url){if(void 0===r.worker)throw new Error("defining fnw_url requires a worker to be defined");const e=async function(e,t=!0){try{const n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch from URL: ${n.status} ${n.statusText}`);const r=await n.blob();return await new Promise(((e,n)=>{const o=new FileReader;o.onload=()=>{const r=o.result;"string"!=typeof r&&(n("Failed to convert URL to Base64: No result from FileReader"),n(o.error)),e(t?r.split(",")[1]:r)},o.onerror=()=>n(o.error),o.readAsDataURL(r)}))}catch(e){throw console.error("Error converting URL to Base64:",e),e}}(t.fnw_url),n=r.worker.on_sync_complete,o=async t=>{const r=await e;t.on_sync_complete=n,await t.update_from_export(r)};r.worker.on_sync_complete=o}return n.debug("Initalizing FuncnodesReactFlow with props:",r),e.createElement("div",{className:"FuncnodesApp"},e.createElement(EW,{...r}))};export{xW as FuncNodesContext,Ql as FuncNodesReactFlowZustand,Cf as FuncNodesWorker,EW as FuncnodesReactFlow,tW as NodeContext,pW as ReactFlowLayer,BG as RenderMappingContext,jG as RenderMappingProvider,Sf as WebSocketWorker,ke as deep_update,CW as default,kW as helperfunctions};
157
105
  //# sourceMappingURL=index.esm.mjs.map