@dxos/shell 0.3.11-main.cc2fe2c → 0.3.11-main.ccc0ca3

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,7 +1,7 @@
1
- (function(Xt,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("react-dom"),require("@phosphor-icons/react"),require("@dxos/react-client/echo"),require("@dxos/react-client"),require("@dxos/client-protocol"),require("@dxos/react-client/halo"),require("@dxos/client-services")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@phosphor-icons/react","@dxos/react-client/echo","@dxos/react-client","@dxos/client-protocol","@dxos/react-client/halo","@dxos/client-services"],c):(Xt=typeof globalThis<"u"?globalThis:Xt||self,c(Xt.Shell={},Xt.React,Xt.$7SXl2$reactdom,Xt.react,Xt.echo,Xt.reactClient,Xt.clientProtocol,Xt.halo,Xt.clientServices))})(this,function(Xt,c,on,ze,ga,Ue,an,si,U1){"use strict";function Ad(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ve=Ad(c),Od=Ad(on);function li(e){"@babel/helpers - typeof";return li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(e)}function W1(e,t){if(li(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(li(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Td(e){var t=W1(e,"string");return li(t)==="symbol"?t:String(t)}function Id(e,t,r){return t=Td(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function sn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function H1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}function V1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Td(n.key),n)}}function z1(e,t,r){return t&&Pd(e.prototype,t),r&&Pd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var G1=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,K1={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},q1=function(t){return K1[t]},Y1=function(t){return t.replace(G1,q1)};function kd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Nd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?kd(Object(r),!0).forEach(function(n){Id(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):kd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var $l={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Y1},Dd,J1=c.createContext();function X1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$l=Nd(Nd({},$l),e)}function Z1(){return $l}var Q1=function(){function e(){V1(this,e),this.usedNamespaces={}}return z1(e,[{key:"addUsedNamespaces",value:function(r){var n=this;r.forEach(function(o){n.usedNamespaces[o]||(n.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function ew(e){Dd=e}function tw(){return Dd}var rw={type:"3rdParty",init:function(t){X1(t.options.react),ew(t)}};function nw(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];typeof r[0]=="string"&&(r[0]="react-i18next:: ".concat(r[0])),(e=console).warn.apply(e,r)}}var Ld={};function Cl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];typeof t[0]=="string"&&Ld[t[0]]||(typeof t[0]=="string"&&(Ld[t[0]]=new Date),nw.apply(void 0,t))}function Md(e,t,r){e.loadNamespaces(t,function(){if(e.isInitialized)r();else{var n=function o(){setTimeout(function(){e.off("initialized",o)},0),r()};e.on("initialized",n)}})}function ow(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var a=function(l,u){var f=t.services.backendConnector.state["".concat(l,"|").concat(u)];return f===-1||f===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(n,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(n,e)&&(!o||a(i,e)))}function iw(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Cl("i18n.languages were undefined or empty",t.languages),!0;var n=t.options.ignoreJSONStructure!==void 0;return n?t.hasLoadedNamespace(e,{precheck:function(i,a){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,e))return!1}}):ow(e,t,r)}function aw(e){if(Array.isArray(e))return e}function sw(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,o=f}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}function Fd(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function lw(e,t){if(e){if(typeof e=="string")return Fd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Fd(e,t)}}function cw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uw(e,t){return aw(e)||sw(e,t)||lw(e,t)||cw()}function jd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Al(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jd(Object(r),!0).forEach(function(n){Id(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var fw=function(t,r){var n=c.useRef();return c.useEffect(function(){n.current=r?n.current:t},[t,r]),n.current};function tt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=c.useContext(J1)||{},o=n.i18n,i=n.defaultNS,a=r||o||tw();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Q1),!a){Cl("You will need to pass in an i18next instance by using initReactI18next");var s=function(P){return Array.isArray(P)?P[P.length-1]:P},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&Cl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Al(Al(Al({},Z1()),a.options.react),t),f=u.useSuspense,d=u.keyPrefix,p=e||i||a.options&&a.options.defaultNS;p=typeof p=="string"?[p]:p||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(p);var h=(a.isInitialized||a.initializedStoreOnce)&&p.every(function(C){return iw(C,a,u)});function g(){return a.getFixedT(null,u.nsMode==="fallback"?p:p[0],d)}var v=c.useState(g),y=uw(v,2),m=y[0],w=y[1],E=p.join(),x=fw(E),k=c.useRef(!0);c.useEffect(function(){var C=u.bindI18n,P=u.bindI18nStore;k.current=!0,!h&&!f&&Md(a,p,function(){k.current&&w(g)}),h&&x&&x!==E&&k.current&&w(g);function F(){k.current&&w(g)}return C&&a&&a.on(C,F),P&&a&&a.store.on(P,F),function(){k.current=!1,C&&a&&C.split(" ").forEach(function(D){return a.off(D,F)}),P&&a&&P.split(" ").forEach(function(D){return a.store.off(D,F)})}},[a,E]);var I=c.useRef(!0);c.useEffect(function(){k.current&&!I.current&&w(g),I.current=!1},[a,d]);var S=[m,a,h];if(S.t=m,S.i18n=a,S.ready=h,h||!h&&!f)return S;throw new Promise(function(C){Md(a,p,function(){C()})})}var Bd={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Ye,function(){return r.importState=function(o){var i=new r;return i.importState(o),i},r;function r(){return function(o){var i=0,a=0,s=0,l=1;o.length==0&&(o=[+new Date]);var u=n();i=u(" "),a=u(" "),s=u(" ");for(var f=0;f<o.length;f++)i-=u(o[f]),i<0&&(i+=1),a-=u(o[f]),a<0&&(a+=1),s-=u(o[f]),s<0&&(s+=1);u=null;var d=function(){var p=2091639*i+l*23283064365386963e-26;return i=a,a=s,s=p-(l=p|0)};return d.next=d,d.uint32=function(){return d()*4294967296},d.fract53=function(){return d()+(d()*2097152|0)*11102230246251565e-32},d.version="Alea 0.9",d.args=o,d.exportState=function(){return[i,a,s,l]},d.importState=function(p){i=+p[0]||0,a=+p[1]||0,s=+p[2]||0,l=+p[3]||0},d}(Array.prototype.slice.call(arguments))}function n(){var o=4022871197,i=function(a){a=a.toString();for(var s=0;s<a.length;s++){o+=a.charCodeAt(s);var l=.02519603282416938*o;o=l>>>0,l-=o,l*=o,o=l>>>0,l-=o,o+=l*4294967296}return(o>>>0)*23283064365386963e-26};return i.version="Mash 0.9",i}})})(Bd);var dw=Bd.exports;const pw=sn(dw);var Ol=e=>{const t=c.useRef(null);return c.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t},hw=pw,gw=new hw("@dxos/react-hooks"),vw=(e=4)=>gw().toString(16).slice(2,e+2),Et=(e,t,r)=>c.useMemo(()=>t??`${e}-${vw((r==null?void 0:r.n)??4)}`,[t]),mw=e=>{const[t,r]=c.useState(void 0),n=c.useRef(t);return n.current=t,c.useEffect(()=>{const o=e.current;if(!o)return;const i=()=>r(!0),a=()=>r(!1);return o.addEventListener("focus",i),o.addEventListener("blur",a),n.current===void 0&&r(document.activeElement===o),()=>{o.removeEventListener("focus",i),o.removeEventListener("blur",a)}},[e,r]),t},Rd={sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)"},Ud=(e,t={})=>{const{ssr:r=!0,fallback:n}=t,o=(Array.isArray(e)?e:[e]).map(l=>l in Rd?Rd[l]:l);let i=Array.isArray(n)?n:[n];i=i.filter(l=>l!=null);const[a,s]=c.useState(()=>o.map((l,u)=>{var f;return{media:l,matches:r?!!i[u]:(f=document.defaultView)==null?void 0:f.matchMedia(l).matches}}));return c.useEffect(()=>{s(o.map(f=>{var d;return{media:f,matches:(d=document.defaultView)==null?void 0:d.matchMedia(f).matches}}));const l=o.map(f=>{var d;return(d=document.defaultView)==null?void 0:d.matchMedia(f)}),u=f=>{s(d=>d.slice().map(p=>p.media===f.media?{...p,matches:f.matches}:p))};return l.forEach(f=>{typeof(f==null?void 0:f.addListener)=="function"?f==null||f.addListener(u):f==null||f.addEventListener("change",u)}),()=>{l.forEach(f=>{typeof(f==null?void 0:f.removeListener)=="function"?f==null||f.removeListener(u):f==null||f.removeEventListener("change",u)})}},[document.defaultView]),a.map(l=>!!l.matches)};function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rt.apply(this,arguments)}function bw(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Tl(...e){return t=>e.forEach(r=>bw(r,t))}function tr(...e){return c.useCallback(Tl(...e),e)}const St=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(ww);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Il,rt({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Il,rt({},n,{ref:t}),r)});St.displayName="Slot";const Il=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{..._w(n,r.props),ref:t?Tl(t,r.ref):r.ref}):c.Children.count(r)>1?c.Children.only(null):null});Il.displayName="SlotClone";const yw=({children:e})=>c.createElement(c.Fragment,null,e);function ww(e){return c.isValidElement(e)&&e.type===yw}function _w(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const Ge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?St:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,rt({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Wd(e,t){e&&on.flushSync(()=>e.dispatchEvent(t))}function pr(e){"@babel/helpers - typeof";return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pr(e)}function $r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ew(e,t){if(pr(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(pr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hd(e){var t=Ew(e,"string");return pr(t)==="symbol"?t:String(t)}function Vd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hd(n.key),n)}}function Cr(e,t,r){return t&&Vd(e.prototype,t),r&&Vd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function ln(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Pl(e,t){return Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Pl(e,t)}function va(e,t){if(typeof t!="function"&&t!==null)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&&Pl(e,t)}function ci(e,t){if(t&&(pr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ln(e)}function Ar(e){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ar(e)}function cn(e,t,r){return t=Hd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xw(e){if(Array.isArray(e))return e}function Sw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zd(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function $w(e,t){if(e){if(typeof e=="string")return zd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return zd(e,t)}}function Cw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Aw(e){return xw(e)||Sw(e)||$w(e)||Cw()}function Gd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Kd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gd(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ow={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,r){console&&console[t]&&console[t].apply(console,r)}},Tw=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$r(this,e),this.init(t,r)}return Cr(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||Ow,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,o,i){return i&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(o).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new e(this.logger,Kd(Kd({},{prefix:"".concat(this.prefix,":").concat(r,":")}),this.options))}},{key:"clone",value:function(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new e(this.logger,r)}}]),e}(),Or=new Tw,un=function(){function e(){$r(this,e),this.observers={}}return Cr(e,[{key:"on",value:function(r,n){var o=this;return r.split(" ").forEach(function(i){o.observers[i]=o.observers[i]||[],o.observers[i].push(n)}),this}},{key:"off",value:function(r,n){if(this.observers[r]){if(!n){delete this.observers[r];return}this.observers[r]=this.observers[r].filter(function(o){return o!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(this.observers[r]){var a=[].concat(this.observers[r]);a.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[r].concat(o))})}}}]),e}();function ui(){var e,t,r=new Promise(function(n,o){e=n,t=o});return r.resolve=e,r.reject=t,r}function qd(e){return e==null?"":""+e}function Iw(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function kl(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var i=typeof t!="string"?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return o()?{}:{obj:e,k:n(i.shift())}}function Yd(e,t,r){var n=kl(e,t,Object),o=n.obj,i=n.k;o[i]=r}function Pw(e,t,r,n){var o=kl(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],n&&(i[a]=i[a].concat(r)),n||i[a].push(r)}function ma(e,t){var r=kl(e,t),n=r.obj,o=r.k;if(n)return n[o]}function Jd(e,t,r){var n=ma(e,r);return n!==void 0?n:ma(t,r)}function Xd(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):Xd(e[n],t[n],r):e[n]=t[n]);return e}function so(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var kw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Nw(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return kw[t]}):e}var ba=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Dw=[" ",",","?","!",";"];function Lw(e,t,r){t=t||"",r=r||"";var n=Dw.filter(function(s){return t.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var o=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}function Zd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ya(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zd(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Mw(e){var t=Fw();return function(){var n=Ar(e),o;if(t){var i=Ar(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ci(this,o)}}function Fw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Qd(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),o=e,i=0;i<n.length;++i){if(!o||typeof o[n[i]]=="string"&&i+1<n.length)return;if(o[n[i]]===void 0){for(var a=2,s=n.slice(i,i+a).join(r),l=o[s];l===void 0&&n.length>i+a;)a++,s=n.slice(i,i+a).join(r),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=n.slice(i+a).join(r);return u?Qd(l,u,r):void 0}o=o[n[i]]}return o}}var jw=function(e){va(r,e);var t=Mw(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return $r(this,r),o=t.call(this),ba&&un.call(ln(o)),o.data=n||{},o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return Cr(r,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var i=this.options.ns.indexOf(o);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,f=[o,i];a&&typeof a!="string"&&(f=f.concat(a)),a&&typeof a=="string"&&(f=f.concat(l?a.split(l):a)),o.indexOf(".")>-1&&(f=o.split("."));var d=ma(this.data,f);return d||!u||typeof a!="string"?d:Qd(this.data&&this.data[o]&&this.data[o][i],a,l)}},{key:"addResource",value:function(o,i,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var f=[o,i];a&&(f=f.concat(u?a.split(u):a)),o.indexOf(".")>-1&&(f=o.split("."),s=i,i=f[1]),this.addNamespaces(i),Yd(this.data,f,s),l.silent||this.emit("added",o,i,a,s)}},{key:"addResources",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(o,i,l,a[l],{silent:!0});s.silent||this.emit("added",o,i,a)}},{key:"addResourceBundle",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},f=[o,i];o.indexOf(".")>-1&&(f=o.split("."),s=a,a=i,i=f[1]),this.addNamespaces(i);var d=ma(this.data,f)||{};s?Xd(d,a,l):d=ya(ya({},d),a),Yd(this.data,f,d),u.silent||this.emit("added",o,i,a)}},{key:"removeResourceBundle",value:function(o,i){this.hasResourceBundle(o,i)&&delete this.data[o][i],this.removeNamespaces(i),this.emit("removed",o,i)}},{key:"hasResourceBundle",value:function(o,i){return this.getResource(o,i)!==void 0}},{key:"getResourceBundle",value:function(o,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?ya(ya({},{}),this.getResource(o,i)):this.getResource(o,i)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var i=this.getDataByLanguage(o),a=i&&Object.keys(i)||[];return!!a.find(function(s){return i[s]&&Object.keys(i[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(un),ep={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,o,i){var a=this;return t.forEach(function(s){a.processors[s]&&(r=a.processors[s].process(r,n,o,i))}),r}};function tp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?tp(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Bw(e){var t=Rw();return function(){var n=Ar(e),o;if(t){var i=Ar(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ci(this,o)}}function Rw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var rp={},np=function(e){va(r,e);var t=Bw(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return $r(this,r),o=t.call(this),ba&&un.call(ln(o)),Iw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,ln(o)),o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Or.create("translator"),o}return Cr(r,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var a=this.resolve(o,i);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(o,i){var a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ns||this.options.defaultNS||[],u=a&&o.indexOf(a)>-1,f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!Lw(o,a,s);if(u&&!f){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var p=o.split(a);(a!==s||a===s&&this.options.ns.indexOf(p[0])>-1)&&(l=p.shift()),o=p.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,i,a){var s=this;if(pr(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,f=this.extractFromKey(o[o.length-1],i),d=f.key,p=f.namespaces,h=p[p.length-1],g=i.lng||this.language,v=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(v){var y=i.nsSeparator||this.options.nsSeparator;return l?(m.res="".concat(h).concat(y).concat(d),m):"".concat(h).concat(y).concat(d)}return l?(m.res=d,m):d}var m=this.resolve(o,i),w=m&&m.res,E=m&&m.usedKey||d,x=m&&m.exactUsedKey||d,k=Object.prototype.toString.apply(w),I=["[object Number]","[object Function]","[object RegExp]"],S=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,P=typeof w!="string"&&typeof w!="boolean"&&typeof w!="number";if(C&&w&&P&&I.indexOf(k)<0&&!(typeof S=="string"&&k==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,w,Ht(Ht({},i),{},{ns:p})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(m.res=F,m):F}if(u){var D=k==="[object Array]",N=D?[]:{},J=D?x:E;for(var K in w)if(Object.prototype.hasOwnProperty.call(w,K)){var Y="".concat(J).concat(u).concat(K);N[K]=this.translate(Y,Ht(Ht({},i),{joinArrays:!1,ns:p})),N[K]===Y&&(N[K]=w[K])}w=N}}else if(C&&typeof S=="string"&&k==="[object Array]")w=w.join(S),w&&(w=this.extendTranslation(w,o,i,a));else{var te=!1,oe=!1,le=i.count!==void 0&&typeof i.count!="string",ae=r.hasDefaultValue(i),ge=le?this.pluralResolver.getSuffix(g,i.count,i):"",ce=i["defaultValue".concat(ge)]||i.defaultValue;!this.isValidLookup(w)&&ae&&(te=!0,w=ce),this.isValidLookup(w)||(oe=!0,w=d);var q=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,H=q&&oe?void 0:w,re=ae&&ce!==w&&this.options.updateMissing;if(oe||te||re){if(this.logger.log(re?"updateKey":"missingKey",g,h,d,re?ce:w),u){var de=this.resolve(d,Ht(Ht({},i),{},{keySeparator:!1}));de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var U=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(var M=0;M<z.length;M++)U.push(z[M]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(i.lng||this.language):U.push(i.lng||this.language);var R=function(O,T,Z){var ne=ae&&Z!==w?Z:H;s.options.missingKeyHandler?s.options.missingKeyHandler(O,h,T,ne,re,i):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(O,h,T,ne,re,i),s.emit("missingKey",O,h,T,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&le?U.forEach(function(G){s.pluralResolver.getSuffixes(G,i).forEach(function(O){R([G],d+O,i["defaultValue".concat(O)]||ce)})}):R(U,d,ce))}w=this.extendTranslation(w,o,i,m,a),oe&&w===d&&this.options.appendNamespaceToMissingKey&&(w="".concat(h,":").concat(d)),(oe||te)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(d):d,te?w:void 0):w=this.options.parseMissingKeyHandler(w))}return l?(m.res=w,m):w}},{key:"extendTranslation",value:function(o,i,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,Ht(Ht({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(Ht(Ht({},a),{interpolation:Ht(Ht({},this.options.interpolation),a.interpolation)}));var f=typeof o=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(f){var p=o.match(this.interpolator.nestingRegexp);d=p&&p.length}var h=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(h=Ht(Ht({},this.options.interpolation.defaultVariables),h)),o=this.interpolator.interpolate(o,h,a.lng||this.language,a),f){var g=o.match(this.interpolator.nestingRegexp),v=g&&g.length;d<v&&(a.nest=!1)}a.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var w=arguments.length,E=new Array(w),x=0;x<w;x++)E[x]=arguments[x];return l&&l[0]===E[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(i[0])),null):u.translate.apply(u,E.concat([i]))},a)),a.interpolation&&this.interpolator.reset()}var y=a.postProcess||this.options.postProcess,m=typeof y=="string"?[y]:y;return o!=null&&m&&m.length&&a.applyPostProcessor!==!1&&(o=ep.handle(m,o,i,this.options&&this.options.postProcessPassResolved?Ht({i18nResolved:s},a):a,this)),o}},{key:"resolve",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,f,d;return typeof o=="string"&&(o=[o]),o.forEach(function(p){if(!i.isValidLookup(s)){var h=i.extractFromKey(p,a),g=h.key;l=g;var v=h.namespaces;i.options.fallbackNS&&(v=v.concat(i.options.fallbackNS));var y=a.count!==void 0&&typeof a.count!="string",m=y&&!a.ordinal&&a.count===0&&i.pluralResolver.shouldUseIntlApi(),w=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",E=a.lngs?a.lngs:i.languageUtils.toResolveHierarchy(a.lng||i.language,a.fallbackLng);v.forEach(function(x){i.isValidLookup(s)||(d=x,!rp["".concat(E[0],"-").concat(x)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(d)&&(rp["".concat(E[0],"-").concat(x)]=!0,i.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(k){if(!i.isValidLookup(s)){f=k;var I=[g];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(I,g,k,x,a);else{var S;y&&(S=i.pluralResolver.getSuffix(k,a.count,a));var C="".concat(i.options.pluralSeparator,"zero");if(y&&(I.push(g+S),m&&I.push(g+C)),w){var P="".concat(g).concat(i.options.contextSeparator).concat(a.context);I.push(P),y&&(I.push(P+S),m&&I.push(P+C))}}for(var F;F=I.pop();)i.isValidLookup(s)||(u=F,s=i.getResource(k,x,F,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,i,a,s):this.resourceStore.getResource(o,i,a,s)}}],[{key:"hasDefaultValue",value:function(o){var i="defaultValue";for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&i===a.substring(0,i.length)&&o[a]!==void 0)return!0;return!1}}]),r}(un);function Nl(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Uw=function(){function e(t){$r(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Or.create("languageUtils")}return Cr(e,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],o=r.split("-");return this.options.lowerCaseLng?o=o.map(function(i){return i.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nl(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=Nl(o[1].toLowerCase())),n.indexOf(o[2].toLowerCase())>-1&&(o[2]=Nl(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var o;return r.forEach(function(i){if(!o){var a=n.formatLanguageCode(i);(!n.options.supportedLngs||n.isSupportedCode(a))&&(o=a)}}),!o&&this.options.supportedLngs&&r.forEach(function(i){if(!o){var a=n.getLanguagePartFromCode(i);if(n.isSupportedCode(a))return o=a;o=n.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var o=r[n];return o||(o=r[this.getScriptPartFromCode(n)]),o||(o=r[this.formatLanguageCode(n)]),o||(o=r[this.getLanguagePartFromCode(n)]),o||(o=r.default),o||[]}},{key:"toResolveHierarchy",value:function(r,n){var o=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],r),a=[],s=function(u){u&&(o.isSupportedCode(u)?a.push(u):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),i.forEach(function(l){a.indexOf(l)<0&&s(o.formatLanguageCode(l))}),a}}]),e}(),Ww=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Hw={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},Vw=["v1","v2","v3"],op={zero:0,one:1,two:2,few:3,many:4,other:5};function zw(){var e={};return Ww.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:Hw[t.fc]}})}),e}var Gw=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};$r(this,e),this.languageUtils=t,this.options=r,this.logger=Or.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=zw()}return Cr(e,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(r,n);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,o).map(function(i){return"".concat(n).concat(i)})}},{key:"getSuffixes",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort(function(a,s){return op[a]-op[s]}).map(function(a){return"".concat(n.options.prepend).concat(a)}):i.numbers.map(function(a){return n.getSuffix(r,a,o)}):[]}},{key:"getSuffix",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(n)):this.getSuffixRetroCompatible(i,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var o=this,i=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),a=r.numbers[i];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return o.options.prepend&&a.toString()?o.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!Vw.includes(this.options.compatibilityJSON)}}]),e}();function ip(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function hr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ip(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ip(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Kw=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$r(this,e),this.logger=Or.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Cr(e,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:Nw,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?so(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?so(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?so(n.nestingPrefix):n.nestingPrefixEscaped||so("$t("),this.nestingSuffix=n.nestingSuffix?so(n.nestingSuffix):n.nestingSuffixEscaped||so(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(r,n,o,i){var a=this,s,l,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(y){return y.replace(/\$/g,"$$$$")}var p=function(m){if(m.indexOf(a.formatSeparator)<0){var w=Jd(n,f,m);return a.alwaysFormat?a.format(w,void 0,o,hr(hr(hr({},i),n),{},{interpolationkey:m})):w}var E=m.split(a.formatSeparator),x=E.shift().trim(),k=E.join(a.formatSeparator).trim();return a.format(Jd(n,f,x),k,o,hr(hr(hr({},i),n),{},{interpolationkey:x}))};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,g=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(m){return d(m)}},{regex:this.regexp,safeValue:function(m){return a.escapeValue?d(a.escape(m)):d(m)}}];return v.forEach(function(y){for(u=0;s=y.regex.exec(r);){var m=s[1].trim();if(l=p(m),l===void 0)if(typeof h=="function"){var w=h(r,s,i);l=typeof w=="string"?w:""}else if(i&&i.hasOwnProperty(m))l="";else if(g){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(r)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=qd(l));var E=y.safeValue(l);if(r=r.replace(s[0],E),g?(y.regex.lastIndex+=l.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l=hr({},i);l.applyPostProcessor=!1,delete l.defaultValue;function u(h,g){var v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;var y=h.split(new RegExp("".concat(v,"[ ]*{"))),m="{".concat(y[1]);h=y[0],m=this.interpolate(m,l);var w=m.match(/'/g),E=m.match(/"/g);(w&&w.length%2===0&&!E||E.length%2!==0)&&(m=m.replace(/'/g,'"'));try{l=JSON.parse(m),g&&(l=hr(hr({},g),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),x),"".concat(h).concat(v).concat(m)}return delete l.defaultValue,h}for(;a=this.nestingRegexp.exec(r);){var f=[],d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var p=a[1].split(this.formatSeparator).map(function(h){return h.trim()});a[1]=p.shift(),f=p,d=!0}if(s=n(u.call(this,a[1].trim(),l),l),s&&a[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=qd(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(r)),s=""),d&&(s=f.reduce(function(h,g){return o.format(h,g,i.lng,hr(hr({},i),{},{interpolationkey:a[1].trim()}))},s.trim())),r=r.replace(a[0],s),this.regexp.lastIndex=0}return r}}]),e}();function ap(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ap(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ap(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qw(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);if(t==="currency"&&o.indexOf(":")<0)r.currency||(r.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)r.range||(r.range=o.trim());else{var i=o.split(";");i.forEach(function(a){if(a){var s=a.split(":"),l=Aw(s),u=l[0],f=l.slice(1),d=f.join(":").trim().replace(/^'+|'+$/g,"");r[u.trim()]||(r[u.trim()]=d),d==="false"&&(r[u.trim()]=!1),d==="true"&&(r[u.trim()]=!0),isNaN(d)||(r[u.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:r}}function lo(e){var t={};return function(n,o,i){var a=o+JSON.stringify(i),s=t[a];return s||(s=e(o,i),t[a]=s),s(n)}}var Yw=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};$r(this,e),this.logger=Or.create("formatter"),this.options=t,this.formats={number:lo(function(r,n){var o=new Intl.NumberFormat(r,n);return function(i){return o.format(i)}}),currency:lo(function(r,n){var o=new Intl.NumberFormat(r,fn(fn({},n),{},{style:"currency"}));return function(i){return o.format(i)}}),datetime:lo(function(r,n){var o=new Intl.DateTimeFormat(r,fn({},n));return function(i){return o.format(i)}}),relativetime:lo(function(r,n){var o=new Intl.RelativeTimeFormat(r,fn({},n));return function(i){return o.format(i,n.range||"day")}}),list:lo(function(r,n){var o=new Intl.ListFormat(r,fn({},n));return function(i){return o.format(i)}})},this.init(t)}return Cr(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=n.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=lo(n)}},{key:"format",value:function(r,n,o,i){var a=this,s=n.split(this.formatSeparator),l=s.reduce(function(u,f){var d=qw(f),p=d.formatName,h=d.formatOptions;if(a.formats[p]){var g=u;try{var v=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},y=v.locale||v.lng||i.locale||i.lng||o;g=a.formats[p](u,y,fn(fn(fn({},h),i),v))}catch(m){a.logger.warn(m)}return g}else a.logger.warn("there was no format function for ".concat(p));return u},r);return l}}]),e}();function sp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function lp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sp(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jw(e){var t=Xw();return function(){var n=Ar(e),o;if(t){var i=Ar(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ci(this,o)}}function Xw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Zw(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var Qw=function(e){va(r,e);var t=Jw(r);function r(n,o,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return $r(this,r),a=t.call(this),ba&&un.call(ln(a)),a.backend=n,a.store=o,a.services=i,a.languageUtils=i.languageUtils,a.options=s,a.logger=Or.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(i,s.backend,s),a}return Cr(r,[{key:"queueLoad",value:function(o,i,a,s){var l=this,u={},f={},d={},p={};return o.forEach(function(h){var g=!0;i.forEach(function(v){var y="".concat(h,"|").concat(v);!a.reload&&l.store.hasResourceBundle(h,v)?l.state[y]=2:l.state[y]<0||(l.state[y]===1?f[y]===void 0&&(f[y]=!0):(l.state[y]=1,g=!1,f[y]===void 0&&(f[y]=!0),u[y]===void 0&&(u[y]=!0),p[v]===void 0&&(p[v]=!0)))}),g||(d[h]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}},{key:"loaded",value:function(o,i,a){var s=o.split("|"),l=s[0],u=s[1];i&&this.emit("failedLoading",l,u,i),a&&this.store.addResourceBundle(l,u,a),this.state[o]=i?-1:2;var f={};this.queue.forEach(function(d){Pw(d.loaded,[l],u),Zw(d,o),i&&d.errors.push(i),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(p){f[p]||(f[p]={});var h=d.loaded[p];h.length&&h.forEach(function(g){f[p][g]===void 0&&(f[p][g]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,i,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,f=arguments.length>5?arguments[5]:void 0;if(!o.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:i,fcName:a,tried:l,wait:u,callback:f});return}return this.readingCalls++,this.backend[a](o,i,function(d,p){if(s.readingCalls--,s.waitingReads.length>0){var h=s.waitingReads.shift();s.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(d&&p&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,i,a,l+1,u*2,f)},u);return}f(d,p)})}},{key:"prepareLoading",value:function(o,i){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(o,i,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(f){a.loadOne(f)})}},{key:"load",value:function(o,i,a){this.prepareLoading(o,i,{},a)}},{key:"reload",value:function(o,i,a){this.prepareLoading(o,i,{reload:!0},a)}},{key:"loadOne",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(f,d){f&&i.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),f),!f&&d&&i.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),d),i.loaded(o,f,d)})}},{key:"saveMissing",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(i)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}a==null||a===""||(this.backend&&this.backend.create&&this.backend.create(o,i,a,s,null,lp(lp({},u),{},{isUpdate:l})),!(!o||!o[0])&&this.store.addResource(o[0],i,a,s))}}]),r}(un);function e_(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var r={};if(pr(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),pr(t[2])==="object"||pr(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach(function(o){r[o]=n[o]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function cp(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function up(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?up(Object(r),!0).forEach(function(n){cn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):up(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t_(e){var t=r_();return function(){var n=Ar(e),o;if(t){var i=Ar(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ci(this,o)}}function r_(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function wa(){}function n_(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var _a=function(e){va(r,e);var t=t_(r);function r(){var n,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if($r(this,r),n=t.call(this),ba&&un.call(ln(n)),n.options=cp(o),n.services={},n.logger=Or,n.modules={external:[]},n_(ln(n)),i&&!n.isInitialized&&!o.isClone){if(!n.options.initImmediate)return n.init(o,i),ci(n,ln(n));setTimeout(function(){n.init(o,i)},0)}return n}return Cr(r,[{key:"init",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(a=i,i={}),!i.defaultNS&&i.defaultNS!==!1&&i.ns&&(typeof i.ns=="string"?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));var s=e_();this.options=Tr(Tr(Tr({},s),this.options),cp(i)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Tr(Tr({},s.interpolation),this.options.interpolation)),i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator);function l(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?Or.init(l(this.modules.logger),this.options):Or.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Yw);var f=new Uw(this.options);this.store=new jw(this.options.resources,this.options);var d=this.services;d.logger=Or,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Gw(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Kw(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Qw(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new np(this.services,this.options),this.translator.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.external.forEach(function(m){m.init&&m.init(o)})}if(this.format=this.options.interpolation.format,a||(a=wa),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments)}});var g=["addResource","addResources","addResourceBundle","removeResourceBundle"];g.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments),o}});var v=ui(),y=function(){var w=function(x,k){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),v.resolve(k),a(x,k)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return w(null,o.t.bind(o));o.changeLanguage(o.options.lng,w)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),v}},{key:"loadResources",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wa,s=a,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],f=function(h){if(h){var g=i.services.languageUtils.toResolveHierarchy(h);g.forEach(function(v){u.indexOf(v)<0&&u.push(v)})}};if(l)f(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(p){return f(p)})}this.options.preload&&this.options.preload.forEach(function(p){return f(p)}),this.services.backendConnector.load(u,this.options.ns,function(p){!p&&!i.resolvedLanguage&&i.language&&i.setResolvedLanguage(i.language),s(p)})}else s(null)}},{key:"reloadResources",value:function(o,i,a){var s=ui();return o||(o=this.languages),i||(i=this.options.ns),a||(a=wa),this.services.backendConnector.reload(o,i,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&ep.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var i=0;i<this.languages.length;i++){var a=this.languages[i];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(o,i){var a=this;this.isLanguageChangingTo=o;var s=ui();this.emit("languageChanging",o);var l=function(p){a.language=p,a.languages=a.services.languageUtils.toResolveHierarchy(p),a.resolvedLanguage=void 0,a.setResolvedLanguage(p)},u=function(p,h){h?(l(h),a.translator.changeLanguage(h),a.isLanguageChangingTo=void 0,a.emit("languageChanged",h),a.logger.log("languageChanged",h)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),i&&i(p,function(){return a.t.apply(a,arguments)})},f=function(p){!o&&!p&&a.services.languageDetector&&(p=[]);var h=typeof p=="string"?p:a.services.languageUtils.getBestMatchFromCodes(p);h&&(a.language||l(h),a.translator.language||a.translator.changeLanguage(h),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(h)),a.loadResources(h,function(g){u(g,h)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(f):f(o),s}},{key:"getFixedT",value:function(o,i,a){var s=this,l=function u(f,d){var p;if(pr(d)!=="object"){for(var h=arguments.length,g=new Array(h>2?h-2:0),v=2;v<h;v++)g[v-2]=arguments[v];p=s.options.overloadTranslationOptionHandler([f,d].concat(g))}else p=Tr({},d);p.lng=p.lng||u.lng,p.lngs=p.lngs||u.lngs,p.ns=p.ns||u.ns,p.keyPrefix=p.keyPrefix||a||u.keyPrefix;var y=s.options.keySeparator||".",m=p.keyPrefix?"".concat(p.keyPrefix).concat(y).concat(f):f;return s.t(m,p)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=i,l.keyPrefix=a,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var f=function(h,g){var v=i.services.backendConnector.state["".concat(h,"|").concat(g)];return v===-1||v===2};if(a.precheck){var d=a.precheck(this,f);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(s,o)&&(!l||f(u,o)))}},{key:"loadNamespaces",value:function(o,i){var a=this,s=ui();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),i&&i(l)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(o,i){var a=ui();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),i&&i(u)}),a):(i&&i(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:wa,s=Tr(Tr(Tr({},this.options),i),{isClone:!0}),l=new r(s);(i.debug!==void 0||i.prefix!==void 0)&&(l.logger=l.logger.clone(i));var u=["store","services","language"];return u.forEach(function(f){l[f]=o[f]}),l.services=Tr({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new np(l.services,l.options),l.translator.on("*",function(f){for(var d=arguments.length,p=new Array(d>1?d-1:0),h=1;h<d;h++)p[h-1]=arguments[h];l.emit.apply(l,[f].concat(p))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(un);cn(_a,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new _a(e,t)});var jt=_a.createInstance();jt.createInstance=_a.createInstance,jt.createInstance,jt.init,jt.loadResources,jt.reloadResources,jt.use,jt.changeLanguage,jt.getFixedT,jt.t,jt.exists,jt.setDefaultNamespace,jt.hasLoadedNamespace,jt.loadNamespaces,jt.loadLanguages;function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},be.apply(this,arguments)}function o_(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function dn(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...g}=d,v=(p==null?void 0:p[e][l])||s,y=c.useMemo(()=>g,Object.values(g));return c.createElement(v.Provider,{value:y},h)}function f(d,p){const h=(p==null?void 0:p[e][l])||s,g=c.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,i_(o,...t)]}function i_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Vt(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const Ir=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function a_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function fp(...e){return t=>e.forEach(r=>a_(r,t))}function At(...e){return c.useCallback(fp(...e),e)}const Dl=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(s_);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Ll,be({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Ll,be({},n,{ref:t}),r)});Dl.displayName="Slot";const Ll=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...l_(n,r.props),ref:fp(t,r.ref)}):c.Children.count(r)>1?c.Children.only(null):null});Ll.displayName="SlotClone";const Ml=({children:e})=>c.createElement(c.Fragment,null,e);function s_(e){return c.isValidElement(e)&&e.type===Ml}function l_(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const ft=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?Dl:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,be({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function c_(e,t){e&&on.flushSync(()=>e.dispatchEvent(t))}const dp="Avatar",[u_,F9]=dn(dp),[f_,d_]=u_(dp),p_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=c.useState("idle");return c.createElement(f_,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},c.createElement(ft.span,be({},n,{ref:t})))}),h_="AvatarFallback",g_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=d_(h_,r),[a,s]=c.useState(n===void 0);return c.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),a&&i.imageLoadingStatus!=="loaded"?c.createElement(ft.span,be({},o,{ref:t})):null}),v_=p_,pp=g_;function co(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function Pr(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...g}=d,v=(p==null?void 0:p[e][l])||s,y=c.useMemo(()=>g,Object.values(g));return c.createElement(v.Provider,{value:y},h)}function f(d,p){const h=(p==null?void 0:p[e][l])||s,g=c.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,m_(o,...t)]}function m_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function fi(e,t,r){return parseInt(e.substr(t,r),16)}function hp(e){return e|=0,e<0?"00":e<16?"0"+e.toString(16):e<256?e.toString(16):"ff"}function Fl(e,t,r){return r=r<0?r+6:r>6?r-6:r,hp(255*(r<1?e+(t-e)*r:r<3?t:r<4?e+(t-e)*(4-r):e))}function b_(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t;const r=e.length;if(r<6){const n=e[1],o=e[2],i=e[3],a=e[4]||"";t="#"+n+n+o+o+i+i+a+a}return(r==7||r>8)&&(t=e),t}}function y_(e,t,r){let n;if(t==0){const o=hp(r*255);n=o+o+o}else{const o=r<=.5?r*(t+1):r+t-r*t,i=r*2-o;n=Fl(i,o,e*6+2)+Fl(i,o,e*6)+Fl(i,o,e*6-2)}return"#"+n}function di(e,t,r){const n=[.55,.5,.5,.46,.6,.55,.55],o=n[e*6+.5|0];return r=r<.5?r*o*2:o+(r-.5)*(1-o)*2,y_(e,t,r)}const w_=typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{},gp={V:"jdenticon_config",n:"config"};var __={};function E_(e,t){const r=typeof e=="object"&&e||__[gp.n]||w_[gp.V]||{},n=r.lightness||{},o=r.saturation||{},i="color"in o?o.color:o,a=o.grayscale,s=r.backColor,l=r.padding;function u(d,p){let h=n[d];return h&&h.length>1||(h=p),function(g){return g=h[0]+g*(h[1]-h[0]),g<0?0:g>1?1:g}}function f(d){const p=r.hues;let h;return p&&p.length>0&&(h=p[0|.999*d*p.length]),typeof h=="number"?(h/360%1+1)%1:d}return{W:f,o:typeof i=="number"?i:.5,D:typeof a=="number"?a:0,p:u("color",[.4,.8]),F:u("grayscale",[.3,.9]),G:b_(s),X:typeof e=="number"?e:typeof l=="number"?l:t}}class Ea{constructor(t,r){this.x=t,this.y=r}}let vp=class{constructor(t,r,n,o){this.q=t,this.t=r,this.H=n,this.Y=o}I(t,r,n,o){const i=this.q+this.H,a=this.t+this.H,s=this.Y;return s===1?new Ea(i-r-(o||0),this.t+t):s===2?new Ea(i-t-(n||0),a-r-(o||0)):s===3?new Ea(this.q+r,a-t-(n||0)):new Ea(this.q+t,this.t+r)}};const x_=new vp(0,0,0,0);class S_{constructor(t){this.J=t,this.u=x_}g(t,r){const n=r?-2:2,o=[];for(let i=r?t.length-2:0;i<t.length&&i>=0;i+=n)o.push(this.u.I(t[i],t[i+1]));this.J.g(o)}h(t,r,n,o){const i=this.u.I(t,r,n,n);this.J.h(i,n,o)}i(t,r,n,o,i){this.g([t,r,t+n,r,t+n,r+o,t,r+o],i)}j(t,r,n,o,i,a){const s=[t+n,r,t+n,r+o,t,r+o,t,r];s.splice((i||0)%4*2,2),this.g(s,a)}K(t,r,n,o,i){this.g([t+n/2,r,t+n,r+o/2,t+n/2,r+o,t,r+o/2],i)}}function $_(e,t,r,n){e=e%14;let o,i,a,s,l,u;e?e==1?(a=0|r*.5,s=0|r*.8,t.j(r-a,0,a,s,2)):e==2?(a=0|r/3,t.i(a,a,r-a,r-a)):e==3?(l=r*.1,u=r<6?1:r<8?2:0|r*.25,l=l>1?0|l:l>.5?1:l,t.i(u,u,r-l-u,r-l-u)):e==4?(i=0|r*.15,a=0|r*.5,t.h(r-a-i,r-a-i,a)):e==5?(l=r*.1,u=l*4,u>3&&(u=0|u),t.i(0,0,r,r),t.g([u,u,r-l,u,u+(r-u-l)/2,r-l],!0)):e==6?t.g([0,0,r,0,r,r*.7,r*.4,r*.4,r*.7,r,0,r]):e==7?t.j(r/2,r/2,r/2,r/2,3):e==8?(t.i(0,0,r,r/2),t.i(0,r/2,r/2,r/2),t.j(r/2,r/2,r/2,r/2,1)):e==9?(l=r*.14,u=r<4?1:r<6?2:0|r*.35,l=r<8?l:0|l,t.i(0,0,r,r),t.i(u,u,r-u-l,r-u-l,!0)):e==10?(l=r*.12,u=l*3,t.i(0,0,r,r),t.h(u,u,r-l-u,!0)):e==11?t.j(r/2,r/2,r/2,r/2,3):e==12?(i=r*.25,t.i(0,0,r,r),t.K(i,i,r-i,r-i,!0)):!n&&(i=r*.4,a=r*1.2,t.h(i,i,a)):(o=r*.42,t.g([0,0,r,0,r,r-o*2,r-o,r,0,r]))}function mp(e,t,r){e=e%4;let n;e?e==1?t.j(0,r/2,r,r/2,0):e==2?t.K(0,0,r,r):(n=r/6,t.h(n,n,r-2*n)):t.j(0,0,r,r,0)}function C_(e,t){return e=t.W(e),[di(e,t.D,t.F(0)),di(e,t.o,t.p(.5)),di(e,t.D,t.F(1)),di(e,t.o,t.p(1)),di(e,t.o,t.p(0))]}function A_(e,t,r){const n=E_(r,.08);n.G&&e.m(n.G);let o=e.k;const i=.5+o*n.X|0;o-=i*2;const a=new S_(e),s=0|o/4,l=0|i+o/2-s*2,u=0|i+o/2-s*2;function f(y,m,w,E,x){const k=fi(t,w,1);let I=E?fi(t,E,1):0;e.L(p[h[y]]);for(let S=0;S<x.length;S++)a.u=new vp(l+x[S][0]*s,u+x[S][1]*s,s,I++%4),m(k,a,s,S);e.M()}const d=fi(t,-7)/268435455,p=C_(d,n),h=[];let g;function v(y){if(y.indexOf(g)>=0){for(let m=0;m<y.length;m++)if(h.indexOf(y[m])>=0)return!0}}for(let y=0;y<3;y++)g=fi(t,8+y,1)%p.length,(v([0,4])||v([2,3]))&&(g=1),h.push(g);f(0,mp,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),f(1,mp,4,5,[[0,0],[3,0],[3,3],[0,3]]),f(2,$_,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function O_(e){var n=0,o=0,i=encodeURI(e)+"%80",a=[],s,l=[],u=1732584193,f=4023233417,d=~u,p=~f,h=3285377520,g=[u,f,d,p,h],v=0,y="";function m(w,E){return w<<E|w>>>32-E}for(;n<i.length;o++)a[o>>2]=a[o>>2]|(i[n]=="%"?parseInt(i.substring(n+1,n+=3),16):i.charCodeAt(n++))<<(3-(o&3))*8;for(s=((o+7>>6)+1)*16,a[s-1]=o*8-8;v<s;v+=16){for(n=0;n<80;n++)o=m(u,5)+h+(n<20?(f&d^~f&p)+1518500249:n<40?(f^d^p)+1859775393:n<60?(f&d^f&p^d&p)+2400959708:(f^d^p)+3395469782)+(l[n]=n<16?a[v+n]|0:m(l[n-3]^l[n-8]^l[n-14]^l[n-16],1)),h=p,p=d,d=m(f,30),f=u,u=o;g[0]=u=g[0]+u|0,g[1]=f=g[1]+f|0,g[2]=d=g[2]+d|0,g[3]=p=g[3]+p|0,g[4]=h=g[4]+h|0}for(n=0;n<40;n++)y+=(g[n>>3]>>>(7-(n&7))*4&15).toString(16);return y}function T_(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function I_(e){return O_(e==null?"":""+e)}function uo(e){return(e*10+.5|0)/10}class P_{constructor(){this.v=""}g(t){let r="";for(let n=0;n<t.length;n++)r+=(n?"L":"M")+uo(t[n].x)+" "+uo(t[n].y);this.v+=r+"Z"}h(t,r,n){const o=n?0:1,i=uo(r/2),a=uo(r),s="a"+i+","+i+" 0 1,"+o+" ";this.v+="M"+uo(t.x)+" "+uo(t.y+r/2)+s+a+",0"+s+-a+",0"}}class k_{constructor(t){this.A,this.B={},this.N=t,this.k=t.k}m(t){const r=/^(#......)(..)?/.exec(t),n=r[2]?fi(r[2],0)/255:1;this.N.m(r[1],n)}L(t){this.A=this.B[t]||(this.B[t]=new P_)}M(){}g(t){this.A.g(t)}h(t,r,n){this.A.h(t,r,n)}finish(){const t=this.B;for(let r in t)t.hasOwnProperty(r)&&this.N.O(r,t[r].v)}}const N_={P:"http://www.w3.org/2000/svg",R:"width",S:"height"};class D_{constructor(t){this.k=t,this.C='<svg xmlns="'+N_.P+'" width="'+t+'" height="'+t+'" viewBox="0 0 '+t+" "+t+'">'}m(t,r){r&&(this.C+='<rect width="100%" height="100%" fill="'+t+'" opacity="'+r.toFixed(2)+'"/>')}O(t,r){this.C+='<path fill="'+t+'" d="'+r+'"/>'}toString(){return this.C+"</svg>"}}function L_(e,t,r){const n=new D_(t);return A_(new k_(n),T_(e)||I_(e),r),n.toString()}typeof document<"u"&&document.querySelectorAll.bind(document);function pt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function xa({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=M_({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=Vt(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function M_({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=Vt(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const F_=ve.useId||(()=>{});let j_=0;function pi(e){const[t,r]=ve.useState(F_());return Ir(()=>{e||r(n=>n??String(j_++))},[e]),e||(t?`radix-${t}`:"")}const B_=c.createContext(void 0);function R_(e){const t=c.useContext(B_);return e||t||"ltr"}function U_(e,t=globalThis==null?void 0:globalThis.document){const r=Vt(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const jl="dismissableLayer.update",W_="dismissableLayer.pointerDownOutside",H_="dismissableLayer.focusOutside";let bp;const V_=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yp=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(V_),[d,p]=c.useState(null),h=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=c.useState({}),v=At(t,C=>p(C)),y=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(m),E=d?y.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=E>=w,I=z_(C=>{const P=C.target,F=[...f.branches].some(D=>D.contains(P));!k||F||(i==null||i(C),s==null||s(C),C.defaultPrevented||l==null||l())},h),S=G_(C=>{const P=C.target;[...f.branches].some(D=>D.contains(P))||(a==null||a(C),s==null||s(C),C.defaultPrevented||l==null||l())},h);return U_(C=>{E===f.layers.size-1&&(o==null||o(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(bp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),wp(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=bp)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),wp())},[d,f]),c.useEffect(()=>{const C=()=>g({});return document.addEventListener(jl,C),()=>document.removeEventListener(jl,C)},[]),c.createElement(ft.div,be({},u,{ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:pt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:pt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:pt(e.onPointerDownCapture,I.onPointerDownCapture)}))});function z_(e,t=globalThis==null?void 0:globalThis.document){const r=Vt(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){_p(W_,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function G_(e,t=globalThis==null?void 0:globalThis.document){const r=Vt(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&_p(H_,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function wp(){const e=new CustomEvent(jl);document.dispatchEvent(e)}function _p(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?c_(o,i):o.dispatchEvent(i)}const Bl="focusScope.autoFocusOnMount",Rl="focusScope.autoFocusOnUnmount",Ep={bubbles:!1,cancelable:!0},K_=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=Vt(o),f=Vt(i),d=c.useRef(null),p=At(t,v=>l(v)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(m){if(h.paused||!s)return;const w=m.target;s.contains(w)?d.current=w:Pn(d.current,{select:!0})},y=function(m){h.paused||!s||s.contains(m.relatedTarget)||Pn(d.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",y),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y)}}},[n,s,h.paused]),c.useEffect(()=>{if(s){$p.add(h);const v=document.activeElement;if(!s.contains(v)){const m=new CustomEvent(Bl,Ep);s.addEventListener(Bl,u),s.dispatchEvent(m),m.defaultPrevented||(q_(Q_(xp(s)),{select:!0}),document.activeElement===v&&Pn(s))}return()=>{s.removeEventListener(Bl,u),setTimeout(()=>{const m=new CustomEvent(Rl,Ep);s.addEventListener(Rl,f),s.dispatchEvent(m),m.defaultPrevented||Pn(v??document.body,{select:!0}),s.removeEventListener(Rl,f),$p.remove(h)},0)}}},[s,u,f,h]);const g=c.useCallback(v=>{if(!r&&!n||h.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(y&&m){const w=v.currentTarget,[E,x]=Y_(w);E&&x?!v.shiftKey&&m===x?(v.preventDefault(),r&&Pn(E,{select:!0})):v.shiftKey&&m===E&&(v.preventDefault(),r&&Pn(x,{select:!0})):m===w&&v.preventDefault()}},[r,n,h.paused]);return c.createElement(ft.div,be({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function q_(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Pn(n,{select:t}),document.activeElement!==r)return}function Y_(e){const t=xp(e),r=Sp(t,e),n=Sp(t.reverse(),e);return[r,n]}function xp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Sp(e,t){for(const r of e)if(!J_(r,{upTo:t}))return r}function J_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function X_(e){return e instanceof HTMLInputElement&&"select"in e}function Pn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&X_(e)&&t&&e.select()}}const $p=Z_();function Z_(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Cp(e,t),e.unshift(t)},remove(t){var r;e=Cp(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Cp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Q_(e){return e.filter(t=>t.tagName!=="A")}const Ap=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?on.createPortal(c.createElement(ft.div,be({},o,{ref:t})),n):null});function eE(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const ir=e=>{const{present:t,children:r}=e,n=tE(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=At(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};ir.displayName="Presence";function tE(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=eE(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Sa(n.current);i.current=s==="mounted"?u:"none"},[s]),Ir(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=Sa(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ir(()=>{if(t){const u=d=>{const h=Sa(n.current).includes(d.animationName);d.target===t&&h&&on.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Sa(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Sa(e){return(e==null?void 0:e.animationName)||"none"}let Ul=0;function rE(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Op()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Op()),Ul++,()=>{Ul===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Ul--}},[])}function Op(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var kr=function(){return kr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},kr.apply(this,arguments)};function Tp(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function nE(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var $a="right-scroll-bar-position",Ca="width-before-scroll-bar",oE="with-scroll-bars-hidden",iE="--removed-body-scroll-bar-size";function aE(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function sE(e,t){var r=c.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function lE(e,t){return sE(t||null,function(r){return e.forEach(function(n){return aE(n,r)})})}function cE(e){return e}function uE(e,t){t===void 0&&(t=cE);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function fE(e){e===void 0&&(e={});var t=uE(null);return t.options=kr({async:!0,ssr:!1},e),t}var Ip=function(e){var t=e.sideCar,r=Tp(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return ve.createElement(n,kr({},r))};Ip.isSideCarExport=!0;function dE(e,t){return e.useMedium(t),Ip}var Pp=fE(),Wl=function(){},Aa=ve.forwardRef(function(e,t){var r=ve.useRef(null),n=ve.useState({onScrollCapture:Wl,onWheelCapture:Wl,onTouchMoveCapture:Wl}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,m=y===void 0?"div":y,w=Tp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=p,x=lE([r,t]),k=kr(kr({},w),o);return ve.createElement(ve.Fragment,null,f&&ve.createElement(E,{sideCar:Pp,removeScrollBar:u,shards:d,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),a?ve.cloneElement(ve.Children.only(s),kr(kr({},k),{ref:x})):ve.createElement(m,kr({},k,{className:l,ref:x}),s))});Aa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Aa.classNames={fullWidth:Ca,zeroRight:$a};var kp,pE=function(){if(kp)return kp;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function hE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=pE();return t&&e.setAttribute("nonce",t),e}function gE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function vE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var mE=function(){var e=0,t=null;return{add:function(r){e==0&&(t=hE())&&(gE(t,r),vE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},bE=function(){var e=mE();return function(t,r){ve.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Np=function(){var e=bE(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},yE={left:0,top:0,right:0,gap:0},Hl=function(e){return parseInt(e||"",10)||0},wE=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Hl(r),Hl(n),Hl(o)]},_E=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return yE;var t=wE(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},EE=Np(),xE=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
4
- .`.concat(oE,` {
1
+ (function(Zt,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("react-dom"),require("@phosphor-icons/react"),require("@dxos/react-client/echo"),require("@dxos/react-client"),require("@dxos/client-protocol"),require("@dxos/react-client/halo"),require("@dxos/client-services")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@phosphor-icons/react","@dxos/react-client/echo","@dxos/react-client","@dxos/client-protocol","@dxos/react-client/halo","@dxos/client-services"],c):(Zt=typeof globalThis<"u"?globalThis:Zt||self,c(Zt.Shell={},Zt.React,Zt.$7SXl2$reactdom,Zt.react,Zt.echo,Zt.reactClient,Zt.clientProtocol,Zt.halo,Zt.clientServices))})(this,function(Zt,c,an,ze,va,Ue,sn,li,H1){"use strict";function Od(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ve=Od(c),Td=Od(an);function ci(e){"@babel/helpers - typeof";return ci=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(e)}function V1(e,t){if(ci(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ci(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Id(e){var t=V1(e,"string");return ci(t)==="symbol"?t:String(t)}function Pd(e,t,r){return t=Id(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Je=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ln(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function z1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}function G1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Id(n.key),n)}}function K1(e,t,r){return t&&kd(e.prototype,t),r&&kd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var q1=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Y1={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},J1=function(t){return Y1[t]},X1=function(t){return t.replace(q1,J1)};function Nd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Dd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nd(Object(r),!0).forEach(function(n){Pd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Cl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:X1},Ld,Z1=c.createContext();function Q1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cl=Dd(Dd({},Cl),e)}function ew(){return Cl}var tw=function(){function e(){G1(this,e),this.usedNamespaces={}}return K1(e,[{key:"addUsedNamespaces",value:function(r){var n=this;r.forEach(function(o){n.usedNamespaces[o]||(n.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function rw(e){Ld=e}function nw(){return Ld}var ow={type:"3rdParty",init:function(t){Q1(t.options.react),rw(t)}};function iw(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];typeof r[0]=="string"&&(r[0]="react-i18next:: ".concat(r[0])),(e=console).warn.apply(e,r)}}var Md={};function Al(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];typeof t[0]=="string"&&Md[t[0]]||(typeof t[0]=="string"&&(Md[t[0]]=new Date),iw.apply(void 0,t))}function Fd(e,t,r){e.loadNamespaces(t,function(){if(e.isInitialized)r();else{var n=function o(){setTimeout(function(){e.off("initialized",o)},0),r()};e.on("initialized",n)}})}function aw(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var a=function(l,u){var f=t.services.backendConnector.state["".concat(l,"|").concat(u)];return f===-1||f===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(n,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(n,e)&&(!o||a(i,e)))}function sw(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Al("i18n.languages were undefined or empty",t.languages),!0;var n=t.options.ignoreJSONStructure!==void 0;return n?t.hasLoadedNamespace(e,{precheck:function(i,a){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,e))return!1}}):aw(e,t,r)}function lw(e){if(Array.isArray(e))return e}function cw(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,o=f}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}function jd(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function uw(e,t){if(e){if(typeof e=="string")return jd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return jd(e,t)}}function fw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dw(e,t){return lw(e)||cw(e,t)||uw(e,t)||fw()}function Bd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ol(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bd(Object(r),!0).forEach(function(n){Pd(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var pw=function(t,r){var n=c.useRef();return c.useEffect(function(){n.current=r?n.current:t},[t,r]),n.current};function rt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=c.useContext(Z1)||{},o=n.i18n,i=n.defaultNS,a=r||o||nw();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new tw),!a){Al("You will need to pass in an i18next instance by using initReactI18next");var s=function(P){return Array.isArray(P)?P[P.length-1]:P},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&Al("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Ol(Ol(Ol({},ew()),a.options.react),t),f=u.useSuspense,d=u.keyPrefix,p=e||i||a.options&&a.options.defaultNS;p=typeof p=="string"?[p]:p||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(p);var h=(a.isInitialized||a.initializedStoreOnce)&&p.every(function(C){return sw(C,a,u)});function g(){return a.getFixedT(null,u.nsMode==="fallback"?p:p[0],d)}var v=c.useState(g),y=dw(v,2),m=y[0],w=y[1],E=p.join(),x=pw(E),k=c.useRef(!0);c.useEffect(function(){var C=u.bindI18n,P=u.bindI18nStore;k.current=!0,!h&&!f&&Fd(a,p,function(){k.current&&w(g)}),h&&x&&x!==E&&k.current&&w(g);function F(){k.current&&w(g)}return C&&a&&a.on(C,F),P&&a&&a.store.on(P,F),function(){k.current=!1,C&&a&&C.split(" ").forEach(function(D){return a.off(D,F)}),P&&a&&P.split(" ").forEach(function(D){return a.store.off(D,F)})}},[a,E]);var I=c.useRef(!0);c.useEffect(function(){k.current&&!I.current&&w(g),I.current=!1},[a,d]);var S=[m,a,h];if(S.t=m,S.i18n=a,S.ready=h,h||!h&&!f)return S;throw new Promise(function(C){Fd(a,p,function(){C()})})}var Rd={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Je,function(){return r.importState=function(o){var i=new r;return i.importState(o),i},r;function r(){return function(o){var i=0,a=0,s=0,l=1;o.length==0&&(o=[+new Date]);var u=n();i=u(" "),a=u(" "),s=u(" ");for(var f=0;f<o.length;f++)i-=u(o[f]),i<0&&(i+=1),a-=u(o[f]),a<0&&(a+=1),s-=u(o[f]),s<0&&(s+=1);u=null;var d=function(){var p=2091639*i+l*23283064365386963e-26;return i=a,a=s,s=p-(l=p|0)};return d.next=d,d.uint32=function(){return d()*4294967296},d.fract53=function(){return d()+(d()*2097152|0)*11102230246251565e-32},d.version="Alea 0.9",d.args=o,d.exportState=function(){return[i,a,s,l]},d.importState=function(p){i=+p[0]||0,a=+p[1]||0,s=+p[2]||0,l=+p[3]||0},d}(Array.prototype.slice.call(arguments))}function n(){var o=4022871197,i=function(a){a=a.toString();for(var s=0;s<a.length;s++){o+=a.charCodeAt(s);var l=.02519603282416938*o;o=l>>>0,l-=o,l*=o,o=l>>>0,l-=o,o+=l*4294967296}return(o>>>0)*23283064365386963e-26};return i.version="Mash 0.9",i}})})(Rd);var hw=Rd.exports;const gw=ln(hw);var Tl=e=>{const t=c.useRef(null);return c.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t},vw=gw,mw=new vw("@dxos/react-hooks"),bw=(e=4)=>mw().toString(16).slice(2,e+2),xt=(e,t,r)=>c.useMemo(()=>t??`${e}-${bw((r==null?void 0:r.n)??4)}`,[t]),yw=e=>{const[t,r]=c.useState(void 0),n=c.useRef(t);return n.current=t,c.useEffect(()=>{const o=e.current;if(!o)return;const i=()=>r(!0),a=()=>r(!1);return o.addEventListener("focus",i),o.addEventListener("blur",a),n.current===void 0&&r(document.activeElement===o),()=>{o.removeEventListener("focus",i),o.removeEventListener("blur",a)}},[e,r]),t},Ud={sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)"},Wd=(e,t={})=>{const{ssr:r=!0,fallback:n}=t,o=(Array.isArray(e)?e:[e]).map(l=>l in Ud?Ud[l]:l);let i=Array.isArray(n)?n:[n];i=i.filter(l=>l!=null);const[a,s]=c.useState(()=>o.map((l,u)=>{var f;return{media:l,matches:r?!!i[u]:(f=document.defaultView)==null?void 0:f.matchMedia(l).matches}}));return c.useEffect(()=>{s(o.map(f=>{var d;return{media:f,matches:(d=document.defaultView)==null?void 0:d.matchMedia(f).matches}}));const l=o.map(f=>{var d;return(d=document.defaultView)==null?void 0:d.matchMedia(f)}),u=f=>{s(d=>d.slice().map(p=>p.media===f.media?{...p,matches:f.matches}:p))};return l.forEach(f=>{typeof(f==null?void 0:f.addListener)=="function"?f==null||f.addListener(u):f==null||f.addEventListener("change",u)}),()=>{l.forEach(f=>{typeof(f==null?void 0:f.removeListener)=="function"?f==null||f.removeListener(u):f==null||f.removeEventListener("change",u)})}},[document.defaultView]),a.map(l=>!!l.matches)};function it(){return it=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},it.apply(this,arguments)}function ww(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Il(...e){return t=>e.forEach(r=>ww(r,t))}function rr(...e){return c.useCallback(Il(...e),e)}const $t=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(Ew);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Pl,it({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Pl,it({},n,{ref:t}),r)});$t.displayName="Slot";const Pl=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...xw(n,r.props),ref:t?Il(t,r.ref):r.ref}):c.Children.count(r)>1?c.Children.only(null):null});Pl.displayName="SlotClone";const _w=({children:e})=>c.createElement(c.Fragment,null,e);function Ew(e){return c.isValidElement(e)&&e.type===_w}function xw(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const Ge=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?$t:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,it({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Hd(e,t){e&&an.flushSync(()=>e.dispatchEvent(t))}function hr(e){"@babel/helpers - typeof";return hr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hr(e)}function Cr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sw(e,t){if(hr(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(hr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vd(e){var t=Sw(e,"string");return hr(t)==="symbol"?t:String(t)}function zd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Vd(n.key),n)}}function Ar(e,t,r){return t&&zd(e.prototype,t),r&&zd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function cn(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function kl(e,t){return kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},kl(e,t)}function ma(e,t){if(typeof t!="function"&&t!==null)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&&kl(e,t)}function ui(e,t){if(t&&(hr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return cn(e)}function Or(e){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Or(e)}function un(e,t,r){return t=Vd(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $w(e){if(Array.isArray(e))return e}function Cw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gd(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Aw(e,t){if(e){if(typeof e=="string")return Gd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Gd(e,t)}}function Ow(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tw(e){return $w(e)||Cw(e)||Aw(e)||Ow()}function Kd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function qd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kd(Object(r),!0).forEach(function(n){un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Iw={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,r){console&&console[t]&&console[t].apply(console,r)}},Pw=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Cr(this,e),this.init(t,r)}return Ar(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||Iw,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,o,i){return i&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(o).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new e(this.logger,qd(qd({},{prefix:"".concat(this.prefix,":").concat(r,":")}),this.options))}},{key:"clone",value:function(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new e(this.logger,r)}}]),e}(),Tr=new Pw,fn=function(){function e(){Cr(this,e),this.observers={}}return Ar(e,[{key:"on",value:function(r,n){var o=this;return r.split(" ").forEach(function(i){o.observers[i]=o.observers[i]||[],o.observers[i].push(n)}),this}},{key:"off",value:function(r,n){if(this.observers[r]){if(!n){delete this.observers[r];return}this.observers[r]=this.observers[r].filter(function(o){return o!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(this.observers[r]){var a=[].concat(this.observers[r]);a.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[r].concat(o))})}}}]),e}();function fi(){var e,t,r=new Promise(function(n,o){e=n,t=o});return r.resolve=e,r.reject=t,r}function Yd(e){return e==null?"":""+e}function kw(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function Nl(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var i=typeof t!="string"?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return o()?{}:{obj:e,k:n(i.shift())}}function Jd(e,t,r){var n=Nl(e,t,Object),o=n.obj,i=n.k;o[i]=r}function Nw(e,t,r,n){var o=Nl(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],n&&(i[a]=i[a].concat(r)),n||i[a].push(r)}function ba(e,t){var r=Nl(e,t),n=r.obj,o=r.k;if(n)return n[o]}function Xd(e,t,r){var n=ba(e,r);return n!==void 0?n:ba(t,r)}function Zd(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):Zd(e[n],t[n],r):e[n]=t[n]);return e}function lo(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Dw={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Lw(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return Dw[t]}):e}var ya=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Mw=[" ",",","?","!",";"];function Fw(e,t,r){t=t||"",r=r||"";var n=Mw.filter(function(s){return t.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var o=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}function Qd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function wa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qd(Object(r),!0).forEach(function(n){un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jw(e){var t=Bw();return function(){var n=Or(e),o;if(t){var i=Or(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ui(this,o)}}function Bw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ep(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),o=e,i=0;i<n.length;++i){if(!o||typeof o[n[i]]=="string"&&i+1<n.length)return;if(o[n[i]]===void 0){for(var a=2,s=n.slice(i,i+a).join(r),l=o[s];l===void 0&&n.length>i+a;)a++,s=n.slice(i,i+a).join(r),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=n.slice(i+a).join(r);return u?ep(l,u,r):void 0}o=o[n[i]]}return o}}var Rw=function(e){ma(r,e);var t=jw(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Cr(this,r),o=t.call(this),ya&&fn.call(cn(o)),o.data=n||{},o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return Ar(r,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var i=this.options.ns.indexOf(o);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,f=[o,i];a&&typeof a!="string"&&(f=f.concat(a)),a&&typeof a=="string"&&(f=f.concat(l?a.split(l):a)),o.indexOf(".")>-1&&(f=o.split("."));var d=ba(this.data,f);return d||!u||typeof a!="string"?d:ep(this.data&&this.data[o]&&this.data[o][i],a,l)}},{key:"addResource",value:function(o,i,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var f=[o,i];a&&(f=f.concat(u?a.split(u):a)),o.indexOf(".")>-1&&(f=o.split("."),s=i,i=f[1]),this.addNamespaces(i),Jd(this.data,f,s),l.silent||this.emit("added",o,i,a,s)}},{key:"addResources",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(o,i,l,a[l],{silent:!0});s.silent||this.emit("added",o,i,a)}},{key:"addResourceBundle",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},f=[o,i];o.indexOf(".")>-1&&(f=o.split("."),s=a,a=i,i=f[1]),this.addNamespaces(i);var d=ba(this.data,f)||{};s?Zd(d,a,l):d=wa(wa({},d),a),Jd(this.data,f,d),u.silent||this.emit("added",o,i,a)}},{key:"removeResourceBundle",value:function(o,i){this.hasResourceBundle(o,i)&&delete this.data[o][i],this.removeNamespaces(i),this.emit("removed",o,i)}},{key:"hasResourceBundle",value:function(o,i){return this.getResource(o,i)!==void 0}},{key:"getResourceBundle",value:function(o,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?wa(wa({},{}),this.getResource(o,i)):this.getResource(o,i)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var i=this.getDataByLanguage(o),a=i&&Object.keys(i)||[];return!!a.find(function(s){return i[s]&&Object.keys(i[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(fn),tp={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,o,i){var a=this;return t.forEach(function(s){a.processors[s]&&(r=a.processors[s].process(r,n,o,i))}),r}};function rp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Vt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rp(Object(r),!0).forEach(function(n){un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uw(e){var t=Ww();return function(){var n=Or(e),o;if(t){var i=Or(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ui(this,o)}}function Ww(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var np={},op=function(e){ma(r,e);var t=Uw(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Cr(this,r),o=t.call(this),ya&&fn.call(cn(o)),kw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,cn(o)),o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Tr.create("translator"),o}return Ar(r,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var a=this.resolve(o,i);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(o,i){var a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ns||this.options.defaultNS||[],u=a&&o.indexOf(a)>-1,f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!Fw(o,a,s);if(u&&!f){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var p=o.split(a);(a!==s||a===s&&this.options.ns.indexOf(p[0])>-1)&&(l=p.shift()),o=p.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,i,a){var s=this;if(hr(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,f=this.extractFromKey(o[o.length-1],i),d=f.key,p=f.namespaces,h=p[p.length-1],g=i.lng||this.language,v=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(v){var y=i.nsSeparator||this.options.nsSeparator;return l?(m.res="".concat(h).concat(y).concat(d),m):"".concat(h).concat(y).concat(d)}return l?(m.res=d,m):d}var m=this.resolve(o,i),w=m&&m.res,E=m&&m.usedKey||d,x=m&&m.exactUsedKey||d,k=Object.prototype.toString.apply(w),I=["[object Number]","[object Function]","[object RegExp]"],S=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,C=!this.i18nFormat||this.i18nFormat.handleAsObject,P=typeof w!="string"&&typeof w!="boolean"&&typeof w!="number";if(C&&w&&P&&I.indexOf(k)<0&&!(typeof S=="string"&&k==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,w,Vt(Vt({},i),{},{ns:p})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(m.res=F,m):F}if(u){var D=k==="[object Array]",N=D?[]:{},J=D?x:E;for(var K in w)if(Object.prototype.hasOwnProperty.call(w,K)){var Y="".concat(J).concat(u).concat(K);N[K]=this.translate(Y,Vt(Vt({},i),{joinArrays:!1,ns:p})),N[K]===Y&&(N[K]=w[K])}w=N}}else if(C&&typeof S=="string"&&k==="[object Array]")w=w.join(S),w&&(w=this.extendTranslation(w,o,i,a));else{var te=!1,oe=!1,le=i.count!==void 0&&typeof i.count!="string",ae=r.hasDefaultValue(i),ge=le?this.pluralResolver.getSuffix(g,i.count,i):"",ce=i["defaultValue".concat(ge)]||i.defaultValue;!this.isValidLookup(w)&&ae&&(te=!0,w=ce),this.isValidLookup(w)||(oe=!0,w=d);var q=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,H=q&&oe?void 0:w,re=ae&&ce!==w&&this.options.updateMissing;if(oe||te||re){if(this.logger.log(re?"updateKey":"missingKey",g,h,d,re?ce:w),u){var de=this.resolve(d,Vt(Vt({},i),{},{keySeparator:!1}));de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var U=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(var M=0;M<z.length;M++)U.push(z[M]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(i.lng||this.language):U.push(i.lng||this.language);var R=function(O,T,Z){var ne=ae&&Z!==w?Z:H;s.options.missingKeyHandler?s.options.missingKeyHandler(O,h,T,ne,re,i):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(O,h,T,ne,re,i),s.emit("missingKey",O,h,T,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&le?U.forEach(function(G){s.pluralResolver.getSuffixes(G,i).forEach(function(O){R([G],d+O,i["defaultValue".concat(O)]||ce)})}):R(U,d,ce))}w=this.extendTranslation(w,o,i,m,a),oe&&w===d&&this.options.appendNamespaceToMissingKey&&(w="".concat(h,":").concat(d)),(oe||te)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(d):d,te?w:void 0):w=this.options.parseMissingKeyHandler(w))}return l?(m.res=w,m):w}},{key:"extendTranslation",value:function(o,i,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,Vt(Vt({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(Vt(Vt({},a),{interpolation:Vt(Vt({},this.options.interpolation),a.interpolation)}));var f=typeof o=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(f){var p=o.match(this.interpolator.nestingRegexp);d=p&&p.length}var h=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(h=Vt(Vt({},this.options.interpolation.defaultVariables),h)),o=this.interpolator.interpolate(o,h,a.lng||this.language,a),f){var g=o.match(this.interpolator.nestingRegexp),v=g&&g.length;d<v&&(a.nest=!1)}a.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var w=arguments.length,E=new Array(w),x=0;x<w;x++)E[x]=arguments[x];return l&&l[0]===E[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(i[0])),null):u.translate.apply(u,E.concat([i]))},a)),a.interpolation&&this.interpolator.reset()}var y=a.postProcess||this.options.postProcess,m=typeof y=="string"?[y]:y;return o!=null&&m&&m.length&&a.applyPostProcessor!==!1&&(o=tp.handle(m,o,i,this.options&&this.options.postProcessPassResolved?Vt({i18nResolved:s},a):a,this)),o}},{key:"resolve",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,f,d;return typeof o=="string"&&(o=[o]),o.forEach(function(p){if(!i.isValidLookup(s)){var h=i.extractFromKey(p,a),g=h.key;l=g;var v=h.namespaces;i.options.fallbackNS&&(v=v.concat(i.options.fallbackNS));var y=a.count!==void 0&&typeof a.count!="string",m=y&&!a.ordinal&&a.count===0&&i.pluralResolver.shouldUseIntlApi(),w=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",E=a.lngs?a.lngs:i.languageUtils.toResolveHierarchy(a.lng||i.language,a.fallbackLng);v.forEach(function(x){i.isValidLookup(s)||(d=x,!np["".concat(E[0],"-").concat(x)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(d)&&(np["".concat(E[0],"-").concat(x)]=!0,i.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(k){if(!i.isValidLookup(s)){f=k;var I=[g];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(I,g,k,x,a);else{var S;y&&(S=i.pluralResolver.getSuffix(k,a.count,a));var C="".concat(i.options.pluralSeparator,"zero");if(y&&(I.push(g+S),m&&I.push(g+C)),w){var P="".concat(g).concat(i.options.contextSeparator).concat(a.context);I.push(P),y&&(I.push(P+S),m&&I.push(P+C))}}for(var F;F=I.pop();)i.isValidLookup(s)||(u=F,s=i.getResource(k,x,F,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,i,a,s):this.resourceStore.getResource(o,i,a,s)}}],[{key:"hasDefaultValue",value:function(o){var i="defaultValue";for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&i===a.substring(0,i.length)&&o[a]!==void 0)return!0;return!1}}]),r}(fn);function Dl(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Hw=function(){function e(t){Cr(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Tr.create("languageUtils")}return Ar(e,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],o=r.split("-");return this.options.lowerCaseLng?o=o.map(function(i){return i.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=Dl(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=Dl(o[1].toLowerCase())),n.indexOf(o[2].toLowerCase())>-1&&(o[2]=Dl(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var o;return r.forEach(function(i){if(!o){var a=n.formatLanguageCode(i);(!n.options.supportedLngs||n.isSupportedCode(a))&&(o=a)}}),!o&&this.options.supportedLngs&&r.forEach(function(i){if(!o){var a=n.getLanguagePartFromCode(i);if(n.isSupportedCode(a))return o=a;o=n.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var o=r[n];return o||(o=r[this.getScriptPartFromCode(n)]),o||(o=r[this.formatLanguageCode(n)]),o||(o=r[this.getLanguagePartFromCode(n)]),o||(o=r.default),o||[]}},{key:"toResolveHierarchy",value:function(r,n){var o=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],r),a=[],s=function(u){u&&(o.isSupportedCode(u)?a.push(u):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),i.forEach(function(l){a.indexOf(l)<0&&s(o.formatLanguageCode(l))}),a}}]),e}(),Vw=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],zw={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},Gw=["v1","v2","v3"],ip={zero:0,one:1,two:2,few:3,many:4,other:5};function Kw(){var e={};return Vw.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:zw[t.fc]}})}),e}var qw=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Cr(this,e),this.languageUtils=t,this.options=r,this.logger=Tr.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Kw()}return Ar(e,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(r,n);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,o).map(function(i){return"".concat(n).concat(i)})}},{key:"getSuffixes",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort(function(a,s){return ip[a]-ip[s]}).map(function(a){return"".concat(n.options.prepend).concat(a)}):i.numbers.map(function(a){return n.getSuffix(r,a,o)}):[]}},{key:"getSuffix",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(n)):this.getSuffixRetroCompatible(i,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var o=this,i=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),a=r.numbers[i];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return o.options.prepend&&a.toString()?o.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!Gw.includes(this.options.compatibilityJSON)}}]),e}();function ap(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function gr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ap(Object(r),!0).forEach(function(n){un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ap(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Yw=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cr(this,e),this.logger=Tr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Ar(e,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:Lw,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?lo(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?lo(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?lo(n.nestingPrefix):n.nestingPrefixEscaped||lo("$t("),this.nestingSuffix=n.nestingSuffix?lo(n.nestingSuffix):n.nestingSuffixEscaped||lo(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(r,n,o,i){var a=this,s,l,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(y){return y.replace(/\$/g,"$$$$")}var p=function(m){if(m.indexOf(a.formatSeparator)<0){var w=Xd(n,f,m);return a.alwaysFormat?a.format(w,void 0,o,gr(gr(gr({},i),n),{},{interpolationkey:m})):w}var E=m.split(a.formatSeparator),x=E.shift().trim(),k=E.join(a.formatSeparator).trim();return a.format(Xd(n,f,x),k,o,gr(gr(gr({},i),n),{},{interpolationkey:x}))};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,g=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,v=[{regex:this.regexpUnescape,safeValue:function(m){return d(m)}},{regex:this.regexp,safeValue:function(m){return a.escapeValue?d(a.escape(m)):d(m)}}];return v.forEach(function(y){for(u=0;s=y.regex.exec(r);){var m=s[1].trim();if(l=p(m),l===void 0)if(typeof h=="function"){var w=h(r,s,i);l=typeof w=="string"?w:""}else if(i&&i.hasOwnProperty(m))l="";else if(g){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(r)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=Yd(l));var E=y.safeValue(l);if(r=r.replace(s[0],E),g?(y.regex.lastIndex+=l.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l=gr({},i);l.applyPostProcessor=!1,delete l.defaultValue;function u(h,g){var v=this.nestingOptionsSeparator;if(h.indexOf(v)<0)return h;var y=h.split(new RegExp("".concat(v,"[ ]*{"))),m="{".concat(y[1]);h=y[0],m=this.interpolate(m,l);var w=m.match(/'/g),E=m.match(/"/g);(w&&w.length%2===0&&!E||E.length%2!==0)&&(m=m.replace(/'/g,'"'));try{l=JSON.parse(m),g&&(l=gr(gr({},g),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),x),"".concat(h).concat(v).concat(m)}return delete l.defaultValue,h}for(;a=this.nestingRegexp.exec(r);){var f=[],d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var p=a[1].split(this.formatSeparator).map(function(h){return h.trim()});a[1]=p.shift(),f=p,d=!0}if(s=n(u.call(this,a[1].trim(),l),l),s&&a[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=Yd(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(r)),s=""),d&&(s=f.reduce(function(h,g){return o.format(h,g,i.lng,gr(gr({},i),{},{interpolationkey:a[1].trim()}))},s.trim())),r=r.replace(a[0],s),this.regexp.lastIndex=0}return r}}]),e}();function sp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function dn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sp(Object(r),!0).forEach(function(n){un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Jw(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);if(t==="currency"&&o.indexOf(":")<0)r.currency||(r.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)r.range||(r.range=o.trim());else{var i=o.split(";");i.forEach(function(a){if(a){var s=a.split(":"),l=Tw(s),u=l[0],f=l.slice(1),d=f.join(":").trim().replace(/^'+|'+$/g,"");r[u.trim()]||(r[u.trim()]=d),d==="false"&&(r[u.trim()]=!1),d==="true"&&(r[u.trim()]=!0),isNaN(d)||(r[u.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:r}}function co(e){var t={};return function(n,o,i){var a=o+JSON.stringify(i),s=t[a];return s||(s=e(o,i),t[a]=s),s(n)}}var Xw=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cr(this,e),this.logger=Tr.create("formatter"),this.options=t,this.formats={number:co(function(r,n){var o=new Intl.NumberFormat(r,n);return function(i){return o.format(i)}}),currency:co(function(r,n){var o=new Intl.NumberFormat(r,dn(dn({},n),{},{style:"currency"}));return function(i){return o.format(i)}}),datetime:co(function(r,n){var o=new Intl.DateTimeFormat(r,dn({},n));return function(i){return o.format(i)}}),relativetime:co(function(r,n){var o=new Intl.RelativeTimeFormat(r,dn({},n));return function(i){return o.format(i,n.range||"day")}}),list:co(function(r,n){var o=new Intl.ListFormat(r,dn({},n));return function(i){return o.format(i)}})},this.init(t)}return Ar(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=n.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=co(n)}},{key:"format",value:function(r,n,o,i){var a=this,s=n.split(this.formatSeparator),l=s.reduce(function(u,f){var d=Jw(f),p=d.formatName,h=d.formatOptions;if(a.formats[p]){var g=u;try{var v=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},y=v.locale||v.lng||i.locale||i.lng||o;g=a.formats[p](u,y,dn(dn(dn({},h),i),v))}catch(m){a.logger.warn(m)}return g}else a.logger.warn("there was no format function for ".concat(p));return u},r);return l}}]),e}();function lp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function cp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lp(Object(r),!0).forEach(function(n){un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Zw(e){var t=Qw();return function(){var n=Or(e),o;if(t){var i=Or(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ui(this,o)}}function Qw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e_(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var t_=function(e){ma(r,e);var t=Zw(r);function r(n,o,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Cr(this,r),a=t.call(this),ya&&fn.call(cn(a)),a.backend=n,a.store=o,a.services=i,a.languageUtils=i.languageUtils,a.options=s,a.logger=Tr.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(i,s.backend,s),a}return Ar(r,[{key:"queueLoad",value:function(o,i,a,s){var l=this,u={},f={},d={},p={};return o.forEach(function(h){var g=!0;i.forEach(function(v){var y="".concat(h,"|").concat(v);!a.reload&&l.store.hasResourceBundle(h,v)?l.state[y]=2:l.state[y]<0||(l.state[y]===1?f[y]===void 0&&(f[y]=!0):(l.state[y]=1,g=!1,f[y]===void 0&&(f[y]=!0),u[y]===void 0&&(u[y]=!0),p[v]===void 0&&(p[v]=!0)))}),g||(d[h]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}},{key:"loaded",value:function(o,i,a){var s=o.split("|"),l=s[0],u=s[1];i&&this.emit("failedLoading",l,u,i),a&&this.store.addResourceBundle(l,u,a),this.state[o]=i?-1:2;var f={};this.queue.forEach(function(d){Nw(d.loaded,[l],u),e_(d,o),i&&d.errors.push(i),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(p){f[p]||(f[p]={});var h=d.loaded[p];h.length&&h.forEach(function(g){f[p][g]===void 0&&(f[p][g]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,i,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,f=arguments.length>5?arguments[5]:void 0;if(!o.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:i,fcName:a,tried:l,wait:u,callback:f});return}return this.readingCalls++,this.backend[a](o,i,function(d,p){if(s.readingCalls--,s.waitingReads.length>0){var h=s.waitingReads.shift();s.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(d&&p&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,i,a,l+1,u*2,f)},u);return}f(d,p)})}},{key:"prepareLoading",value:function(o,i){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(o,i,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(f){a.loadOne(f)})}},{key:"load",value:function(o,i,a){this.prepareLoading(o,i,{},a)}},{key:"reload",value:function(o,i,a){this.prepareLoading(o,i,{reload:!0},a)}},{key:"loadOne",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(f,d){f&&i.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),f),!f&&d&&i.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),d),i.loaded(o,f,d)})}},{key:"saveMissing",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(i)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}a==null||a===""||(this.backend&&this.backend.create&&this.backend.create(o,i,a,s,null,cp(cp({},u),{},{isUpdate:l})),!(!o||!o[0])&&this.store.addResource(o[0],i,a,s))}}]),r}(fn);function r_(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var r={};if(hr(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),hr(t[2])==="object"||hr(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach(function(o){r[o]=n[o]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function up(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function fp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Ir(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fp(Object(r),!0).forEach(function(n){un(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function n_(e){var t=o_();return function(){var n=Or(e),o;if(t){var i=Or(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return ui(this,o)}}function o_(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function _a(){}function i_(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var Ea=function(e){ma(r,e);var t=n_(r);function r(){var n,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(Cr(this,r),n=t.call(this),ya&&fn.call(cn(n)),n.options=up(o),n.services={},n.logger=Tr,n.modules={external:[]},i_(cn(n)),i&&!n.isInitialized&&!o.isClone){if(!n.options.initImmediate)return n.init(o,i),ui(n,cn(n));setTimeout(function(){n.init(o,i)},0)}return n}return Ar(r,[{key:"init",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(a=i,i={}),!i.defaultNS&&i.defaultNS!==!1&&i.ns&&(typeof i.ns=="string"?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));var s=r_();this.options=Ir(Ir(Ir({},s),this.options),up(i)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Ir(Ir({},s.interpolation),this.options.interpolation)),i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator);function l(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?Tr.init(l(this.modules.logger),this.options):Tr.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Xw);var f=new Hw(this.options);this.store=new Rw(this.options.resources,this.options);var d=this.services;d.logger=Tr,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new qw(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Yw(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new t_(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new op(this.services,this.options),this.translator.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.external.forEach(function(m){m.init&&m.init(o)})}if(this.format=this.options.interpolation.format,a||(a=_a),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments)}});var g=["addResource","addResources","addResourceBundle","removeResourceBundle"];g.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments),o}});var v=fi(),y=function(){var w=function(x,k){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),v.resolve(k),a(x,k)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return w(null,o.t.bind(o));o.changeLanguage(o.options.lng,w)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),v}},{key:"loadResources",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a,s=a,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],f=function(h){if(h){var g=i.services.languageUtils.toResolveHierarchy(h);g.forEach(function(v){u.indexOf(v)<0&&u.push(v)})}};if(l)f(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(p){return f(p)})}this.options.preload&&this.options.preload.forEach(function(p){return f(p)}),this.services.backendConnector.load(u,this.options.ns,function(p){!p&&!i.resolvedLanguage&&i.language&&i.setResolvedLanguage(i.language),s(p)})}else s(null)}},{key:"reloadResources",value:function(o,i,a){var s=fi();return o||(o=this.languages),i||(i=this.options.ns),a||(a=_a),this.services.backendConnector.reload(o,i,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&tp.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var i=0;i<this.languages.length;i++){var a=this.languages[i];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(o,i){var a=this;this.isLanguageChangingTo=o;var s=fi();this.emit("languageChanging",o);var l=function(p){a.language=p,a.languages=a.services.languageUtils.toResolveHierarchy(p),a.resolvedLanguage=void 0,a.setResolvedLanguage(p)},u=function(p,h){h?(l(h),a.translator.changeLanguage(h),a.isLanguageChangingTo=void 0,a.emit("languageChanged",h),a.logger.log("languageChanged",h)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),i&&i(p,function(){return a.t.apply(a,arguments)})},f=function(p){!o&&!p&&a.services.languageDetector&&(p=[]);var h=typeof p=="string"?p:a.services.languageUtils.getBestMatchFromCodes(p);h&&(a.language||l(h),a.translator.language||a.translator.changeLanguage(h),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(h)),a.loadResources(h,function(g){u(g,h)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(f):f(o),s}},{key:"getFixedT",value:function(o,i,a){var s=this,l=function u(f,d){var p;if(hr(d)!=="object"){for(var h=arguments.length,g=new Array(h>2?h-2:0),v=2;v<h;v++)g[v-2]=arguments[v];p=s.options.overloadTranslationOptionHandler([f,d].concat(g))}else p=Ir({},d);p.lng=p.lng||u.lng,p.lngs=p.lngs||u.lngs,p.ns=p.ns||u.ns,p.keyPrefix=p.keyPrefix||a||u.keyPrefix;var y=s.options.keySeparator||".",m=p.keyPrefix?"".concat(p.keyPrefix).concat(y).concat(f):f;return s.t(m,p)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=i,l.keyPrefix=a,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var f=function(h,g){var v=i.services.backendConnector.state["".concat(h,"|").concat(g)];return v===-1||v===2};if(a.precheck){var d=a.precheck(this,f);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(s,o)&&(!l||f(u,o)))}},{key:"loadNamespaces",value:function(o,i){var a=this,s=fi();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),i&&i(l)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(o,i){var a=fi();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),i&&i(u)}),a):(i&&i(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_a,s=Ir(Ir(Ir({},this.options),i),{isClone:!0}),l=new r(s);(i.debug!==void 0||i.prefix!==void 0)&&(l.logger=l.logger.clone(i));var u=["store","services","language"];return u.forEach(function(f){l[f]=o[f]}),l.services=Ir({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new op(l.services,l.options),l.translator.on("*",function(f){for(var d=arguments.length,p=new Array(d>1?d-1:0),h=1;h<d;h++)p[h-1]=arguments[h];l.emit.apply(l,[f].concat(p))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(fn);un(Ea,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Ea(e,t)});var Bt=Ea.createInstance();Bt.createInstance=Ea.createInstance,Bt.createInstance,Bt.init,Bt.loadResources,Bt.reloadResources,Bt.use,Bt.changeLanguage,Bt.getFixedT,Bt.t,Bt.exists,Bt.setDefaultNamespace,Bt.hasLoadedNamespace,Bt.loadNamespaces,Bt.loadLanguages;function Oe(){return Oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oe.apply(this,arguments)}function a_(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function pn(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...g}=d,v=(p==null?void 0:p[e][l])||s,y=c.useMemo(()=>g,Object.values(g));return c.createElement(v.Provider,{value:y},h)}function f(d,p){const h=(p==null?void 0:p[e][l])||s,g=c.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,s_(o,...t)]}function s_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function zt(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const Pr=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{};function Ke(){return Ke=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ke.apply(this,arguments)}function l_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function dp(...e){return t=>e.forEach(r=>l_(r,t))}function Ot(...e){return c.useCallback(dp(...e),e)}const Ll=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(c_);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Ml,Ke({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Ml,Ke({},n,{ref:t}),r)});Ll.displayName="Slot";const Ml=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...u_(n,r.props),ref:dp(t,r.ref)}):c.Children.count(r)>1?c.Children.only(null):null});Ml.displayName="SlotClone";const Fl=({children:e})=>c.createElement(c.Fragment,null,e);function c_(e){return c.isValidElement(e)&&e.type===Fl}function u_(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const dt=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?Ll:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,Ke({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function f_(e,t){e&&an.flushSync(()=>e.dispatchEvent(t))}const pp="Avatar",[d_,B9]=pn(pp),[p_,h_]=d_(pp),g_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=c.useState("idle");return c.createElement(p_,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},c.createElement(dt.span,Oe({},n,{ref:t})))}),v_="AvatarFallback",m_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=h_(v_,r),[a,s]=c.useState(n===void 0);return c.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),a&&i.imageLoadingStatus!=="loaded"?c.createElement(dt.span,Oe({},o,{ref:t})):null}),b_=g_,hp=m_;function uo(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function kr(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...g}=d,v=(p==null?void 0:p[e][l])||s,y=c.useMemo(()=>g,Object.values(g));return c.createElement(v.Provider,{value:y},h)}function f(d,p){const h=(p==null?void 0:p[e][l])||s,g=c.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,y_(o,...t)]}function y_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function di(e,t,r){return parseInt(e.substr(t,r),16)}function gp(e){return e|=0,e<0?"00":e<16?"0"+e.toString(16):e<256?e.toString(16):"ff"}function jl(e,t,r){return r=r<0?r+6:r>6?r-6:r,gp(255*(r<1?e+(t-e)*r:r<3?t:r<4?e+(t-e)*(4-r):e))}function w_(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t;const r=e.length;if(r<6){const n=e[1],o=e[2],i=e[3],a=e[4]||"";t="#"+n+n+o+o+i+i+a+a}return(r==7||r>8)&&(t=e),t}}function __(e,t,r){let n;if(t==0){const o=gp(r*255);n=o+o+o}else{const o=r<=.5?r*(t+1):r+t-r*t,i=r*2-o;n=jl(i,o,e*6+2)+jl(i,o,e*6)+jl(i,o,e*6-2)}return"#"+n}function pi(e,t,r){const n=[.55,.5,.5,.46,.6,.55,.55],o=n[e*6+.5|0];return r=r<.5?r*o*2:o+(r-.5)*(1-o)*2,__(e,t,r)}const E_=typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{},vp={V:"jdenticon_config",n:"config"};var x_={};function S_(e,t){const r=typeof e=="object"&&e||x_[vp.n]||E_[vp.V]||{},n=r.lightness||{},o=r.saturation||{},i="color"in o?o.color:o,a=o.grayscale,s=r.backColor,l=r.padding;function u(d,p){let h=n[d];return h&&h.length>1||(h=p),function(g){return g=h[0]+g*(h[1]-h[0]),g<0?0:g>1?1:g}}function f(d){const p=r.hues;let h;return p&&p.length>0&&(h=p[0|.999*d*p.length]),typeof h=="number"?(h/360%1+1)%1:d}return{W:f,o:typeof i=="number"?i:.5,D:typeof a=="number"?a:0,p:u("color",[.4,.8]),F:u("grayscale",[.3,.9]),G:w_(s),X:typeof e=="number"?e:typeof l=="number"?l:t}}class xa{constructor(t,r){this.x=t,this.y=r}}let mp=class{constructor(t,r,n,o){this.q=t,this.t=r,this.H=n,this.Y=o}I(t,r,n,o){const i=this.q+this.H,a=this.t+this.H,s=this.Y;return s===1?new xa(i-r-(o||0),this.t+t):s===2?new xa(i-t-(n||0),a-r-(o||0)):s===3?new xa(this.q+r,a-t-(n||0)):new xa(this.q+t,this.t+r)}};const $_=new mp(0,0,0,0);class C_{constructor(t){this.J=t,this.u=$_}g(t,r){const n=r?-2:2,o=[];for(let i=r?t.length-2:0;i<t.length&&i>=0;i+=n)o.push(this.u.I(t[i],t[i+1]));this.J.g(o)}h(t,r,n,o){const i=this.u.I(t,r,n,n);this.J.h(i,n,o)}i(t,r,n,o,i){this.g([t,r,t+n,r,t+n,r+o,t,r+o],i)}j(t,r,n,o,i,a){const s=[t+n,r,t+n,r+o,t,r+o,t,r];s.splice((i||0)%4*2,2),this.g(s,a)}K(t,r,n,o,i){this.g([t+n/2,r,t+n,r+o/2,t+n/2,r+o,t,r+o/2],i)}}function A_(e,t,r,n){e=e%14;let o,i,a,s,l,u;e?e==1?(a=0|r*.5,s=0|r*.8,t.j(r-a,0,a,s,2)):e==2?(a=0|r/3,t.i(a,a,r-a,r-a)):e==3?(l=r*.1,u=r<6?1:r<8?2:0|r*.25,l=l>1?0|l:l>.5?1:l,t.i(u,u,r-l-u,r-l-u)):e==4?(i=0|r*.15,a=0|r*.5,t.h(r-a-i,r-a-i,a)):e==5?(l=r*.1,u=l*4,u>3&&(u=0|u),t.i(0,0,r,r),t.g([u,u,r-l,u,u+(r-u-l)/2,r-l],!0)):e==6?t.g([0,0,r,0,r,r*.7,r*.4,r*.4,r*.7,r,0,r]):e==7?t.j(r/2,r/2,r/2,r/2,3):e==8?(t.i(0,0,r,r/2),t.i(0,r/2,r/2,r/2),t.j(r/2,r/2,r/2,r/2,1)):e==9?(l=r*.14,u=r<4?1:r<6?2:0|r*.35,l=r<8?l:0|l,t.i(0,0,r,r),t.i(u,u,r-u-l,r-u-l,!0)):e==10?(l=r*.12,u=l*3,t.i(0,0,r,r),t.h(u,u,r-l-u,!0)):e==11?t.j(r/2,r/2,r/2,r/2,3):e==12?(i=r*.25,t.i(0,0,r,r),t.K(i,i,r-i,r-i,!0)):!n&&(i=r*.4,a=r*1.2,t.h(i,i,a)):(o=r*.42,t.g([0,0,r,0,r,r-o*2,r-o,r,0,r]))}function bp(e,t,r){e=e%4;let n;e?e==1?t.j(0,r/2,r,r/2,0):e==2?t.K(0,0,r,r):(n=r/6,t.h(n,n,r-2*n)):t.j(0,0,r,r,0)}function O_(e,t){return e=t.W(e),[pi(e,t.D,t.F(0)),pi(e,t.o,t.p(.5)),pi(e,t.D,t.F(1)),pi(e,t.o,t.p(1)),pi(e,t.o,t.p(0))]}function T_(e,t,r){const n=S_(r,.08);n.G&&e.m(n.G);let o=e.k;const i=.5+o*n.X|0;o-=i*2;const a=new C_(e),s=0|o/4,l=0|i+o/2-s*2,u=0|i+o/2-s*2;function f(y,m,w,E,x){const k=di(t,w,1);let I=E?di(t,E,1):0;e.L(p[h[y]]);for(let S=0;S<x.length;S++)a.u=new mp(l+x[S][0]*s,u+x[S][1]*s,s,I++%4),m(k,a,s,S);e.M()}const d=di(t,-7)/268435455,p=O_(d,n),h=[];let g;function v(y){if(y.indexOf(g)>=0){for(let m=0;m<y.length;m++)if(h.indexOf(y[m])>=0)return!0}}for(let y=0;y<3;y++)g=di(t,8+y,1)%p.length,(v([0,4])||v([2,3]))&&(g=1),h.push(g);f(0,bp,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),f(1,bp,4,5,[[0,0],[3,0],[3,3],[0,3]]),f(2,A_,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function I_(e){var n=0,o=0,i=encodeURI(e)+"%80",a=[],s,l=[],u=1732584193,f=4023233417,d=~u,p=~f,h=3285377520,g=[u,f,d,p,h],v=0,y="";function m(w,E){return w<<E|w>>>32-E}for(;n<i.length;o++)a[o>>2]=a[o>>2]|(i[n]=="%"?parseInt(i.substring(n+1,n+=3),16):i.charCodeAt(n++))<<(3-(o&3))*8;for(s=((o+7>>6)+1)*16,a[s-1]=o*8-8;v<s;v+=16){for(n=0;n<80;n++)o=m(u,5)+h+(n<20?(f&d^~f&p)+1518500249:n<40?(f^d^p)+1859775393:n<60?(f&d^f&p^d&p)+2400959708:(f^d^p)+3395469782)+(l[n]=n<16?a[v+n]|0:m(l[n-3]^l[n-8]^l[n-14]^l[n-16],1)),h=p,p=d,d=m(f,30),f=u,u=o;g[0]=u=g[0]+u|0,g[1]=f=g[1]+f|0,g[2]=d=g[2]+d|0,g[3]=p=g[3]+p|0,g[4]=h=g[4]+h|0}for(n=0;n<40;n++)y+=(g[n>>3]>>>(7-(n&7))*4&15).toString(16);return y}function P_(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function k_(e){return I_(e==null?"":""+e)}function fo(e){return(e*10+.5|0)/10}class N_{constructor(){this.v=""}g(t){let r="";for(let n=0;n<t.length;n++)r+=(n?"L":"M")+fo(t[n].x)+" "+fo(t[n].y);this.v+=r+"Z"}h(t,r,n){const o=n?0:1,i=fo(r/2),a=fo(r),s="a"+i+","+i+" 0 1,"+o+" ";this.v+="M"+fo(t.x)+" "+fo(t.y+r/2)+s+a+",0"+s+-a+",0"}}class D_{constructor(t){this.A,this.B={},this.N=t,this.k=t.k}m(t){const r=/^(#......)(..)?/.exec(t),n=r[2]?di(r[2],0)/255:1;this.N.m(r[1],n)}L(t){this.A=this.B[t]||(this.B[t]=new N_)}M(){}g(t){this.A.g(t)}h(t,r,n){this.A.h(t,r,n)}finish(){const t=this.B;for(let r in t)t.hasOwnProperty(r)&&this.N.O(r,t[r].v)}}const L_={P:"http://www.w3.org/2000/svg",R:"width",S:"height"};class M_{constructor(t){this.k=t,this.C='<svg xmlns="'+L_.P+'" width="'+t+'" height="'+t+'" viewBox="0 0 '+t+" "+t+'">'}m(t,r){r&&(this.C+='<rect width="100%" height="100%" fill="'+t+'" opacity="'+r.toFixed(2)+'"/>')}O(t,r){this.C+='<path fill="'+t+'" d="'+r+'"/>'}toString(){return this.C+"</svg>"}}function F_(e,t,r){const n=new M_(t);return T_(new D_(n),P_(e)||k_(e),r),n.toString()}typeof document<"u"&&document.querySelectorAll.bind(document);function ht(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Sa({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=j_({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=zt(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function j_({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=zt(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const B_=ve.useId||(()=>{});let R_=0;function hi(e){const[t,r]=ve.useState(B_());return Pr(()=>{e||r(n=>n??String(R_++))},[e]),e||(t?`radix-${t}`:"")}const U_=c.createContext(void 0);function W_(e){const t=c.useContext(U_);return e||t||"ltr"}function H_(e,t=globalThis==null?void 0:globalThis.document){const r=zt(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Bl="dismissableLayer.update",V_="dismissableLayer.pointerDownOutside",z_="dismissableLayer.focusOutside";let yp;const G_=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wp=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(G_),[d,p]=c.useState(null),h=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=c.useState({}),v=Ot(t,C=>p(C)),y=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(m),E=d?y.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=E>=w,I=K_(C=>{const P=C.target,F=[...f.branches].some(D=>D.contains(P));!k||F||(i==null||i(C),s==null||s(C),C.defaultPrevented||l==null||l())},h),S=q_(C=>{const P=C.target;[...f.branches].some(D=>D.contains(P))||(a==null||a(C),s==null||s(C),C.defaultPrevented||l==null||l())},h);return H_(C=>{E===f.layers.size-1&&(o==null||o(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(yp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),_p(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=yp)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),_p())},[d,f]),c.useEffect(()=>{const C=()=>g({});return document.addEventListener(Bl,C),()=>document.removeEventListener(Bl,C)},[]),c.createElement(dt.div,Ke({},u,{ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:ht(e.onFocusCapture,S.onFocusCapture),onBlurCapture:ht(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:ht(e.onPointerDownCapture,I.onPointerDownCapture)}))});function K_(e,t=globalThis==null?void 0:globalThis.document){const r=zt(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Ep(V_,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function q_(e,t=globalThis==null?void 0:globalThis.document){const r=zt(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&Ep(z_,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function _p(){const e=new CustomEvent(Bl);document.dispatchEvent(e)}function Ep(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?f_(o,i):o.dispatchEvent(i)}const Rl="focusScope.autoFocusOnMount",Ul="focusScope.autoFocusOnUnmount",xp={bubbles:!1,cancelable:!0},Y_=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=zt(o),f=zt(i),d=c.useRef(null),p=Ot(t,v=>l(v)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(m){if(h.paused||!s)return;const w=m.target;s.contains(w)?d.current=w:kn(d.current,{select:!0})},y=function(m){h.paused||!s||s.contains(m.relatedTarget)||kn(d.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",y),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y)}}},[n,s,h.paused]),c.useEffect(()=>{if(s){Cp.add(h);const v=document.activeElement;if(!s.contains(v)){const m=new CustomEvent(Rl,xp);s.addEventListener(Rl,u),s.dispatchEvent(m),m.defaultPrevented||(J_(tE(Sp(s)),{select:!0}),document.activeElement===v&&kn(s))}return()=>{s.removeEventListener(Rl,u),setTimeout(()=>{const m=new CustomEvent(Ul,xp);s.addEventListener(Ul,f),s.dispatchEvent(m),m.defaultPrevented||kn(v??document.body,{select:!0}),s.removeEventListener(Ul,f),Cp.remove(h)},0)}}},[s,u,f,h]);const g=c.useCallback(v=>{if(!r&&!n||h.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(y&&m){const w=v.currentTarget,[E,x]=X_(w);E&&x?!v.shiftKey&&m===x?(v.preventDefault(),r&&kn(E,{select:!0})):v.shiftKey&&m===E&&(v.preventDefault(),r&&kn(x,{select:!0})):m===w&&v.preventDefault()}},[r,n,h.paused]);return c.createElement(dt.div,Ke({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function J_(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(kn(n,{select:t}),document.activeElement!==r)return}function X_(e){const t=Sp(e),r=$p(t,e),n=$p(t.reverse(),e);return[r,n]}function Sp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function $p(e,t){for(const r of e)if(!Z_(r,{upTo:t}))return r}function Z_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Q_(e){return e instanceof HTMLInputElement&&"select"in e}function kn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Q_(e)&&t&&e.select()}}const Cp=eE();function eE(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ap(e,t),e.unshift(t)},remove(t){var r;e=Ap(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Ap(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function tE(e){return e.filter(t=>t.tagName!=="A")}const Op=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?an.createPortal(c.createElement(dt.div,Ke({},o,{ref:t})),n):null});function rE(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const ar=e=>{const{present:t,children:r}=e,n=nE(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=Ot(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};ar.displayName="Presence";function nE(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=rE(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=$a(n.current);i.current=s==="mounted"?u:"none"},[s]),Pr(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=$a(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Pr(()=>{if(t){const u=d=>{const h=$a(n.current).includes(d.animationName);d.target===t&&h&&an.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=$a(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function $a(e){return(e==null?void 0:e.animationName)||"none"}let Wl=0;function oE(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Tp()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Tp()),Wl++,()=>{Wl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Wl--}},[])}function Tp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Nr=function(){return Nr=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Nr.apply(this,arguments)};function Ip(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function iE(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ca="right-scroll-bar-position",Aa="width-before-scroll-bar",aE="with-scroll-bars-hidden",sE="--removed-body-scroll-bar-size";function lE(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function cE(e,t){var r=c.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function uE(e,t){return cE(t||null,function(r){return e.forEach(function(n){return lE(n,r)})})}function fE(e){return e}function dE(e,t){t===void 0&&(t=fE);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function pE(e){e===void 0&&(e={});var t=dE(null);return t.options=Nr({async:!0,ssr:!1},e),t}var Pp=function(e){var t=e.sideCar,r=Ip(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return ve.createElement(n,Nr({},r))};Pp.isSideCarExport=!0;function hE(e,t){return e.useMedium(t),Pp}var kp=pE(),Hl=function(){},Oa=ve.forwardRef(function(e,t){var r=ve.useRef(null),n=ve.useState({onScrollCapture:Hl,onWheelCapture:Hl,onTouchMoveCapture:Hl}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,m=y===void 0?"div":y,w=Ip(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=p,x=uE([r,t]),k=Nr(Nr({},w),o);return ve.createElement(ve.Fragment,null,f&&ve.createElement(E,{sideCar:kp,removeScrollBar:u,shards:d,noIsolation:h,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),a?ve.cloneElement(ve.Children.only(s),Nr(Nr({},k),{ref:x})):ve.createElement(m,Nr({},k,{className:l,ref:x}),s))});Oa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Oa.classNames={fullWidth:Aa,zeroRight:Ca};var Np,gE=function(){if(Np)return Np;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gE();return t&&e.setAttribute("nonce",t),e}function mE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function bE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yE=function(){var e=0,t=null;return{add:function(r){e==0&&(t=vE())&&(mE(t,r),bE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},wE=function(){var e=yE();return function(t,r){ve.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Dp=function(){var e=wE(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},_E={left:0,top:0,right:0,gap:0},Vl=function(e){return parseInt(e||"",10)||0},EE=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Vl(r),Vl(n),Vl(o)]},xE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _E;var t=EE(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},SE=Dp(),$E=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
4
+ .`.concat(aE,` {
5
5
  overflow: hidden `).concat(n,`;
6
6
  padding-right: `).concat(s,"px ").concat(n,`;
7
7
  }
@@ -18,29 +18,29 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
18
18
  `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
19
19
  }
20
20
 
21
- .`).concat($a,` {
21
+ .`).concat(Ca,` {
22
22
  right: `).concat(s,"px ").concat(n,`;
23
23
  }
24
24
 
25
- .`).concat(Ca,` {
25
+ .`).concat(Aa,` {
26
26
  margin-right: `).concat(s,"px ").concat(n,`;
27
27
  }
28
28
 
29
- .`).concat($a," .").concat($a,` {
29
+ .`).concat(Ca," .").concat(Ca,` {
30
30
  right: 0 `).concat(n,`;
31
31
  }
32
32
 
33
- .`).concat(Ca," .").concat(Ca,` {
33
+ .`).concat(Aa," .").concat(Aa,` {
34
34
  margin-right: 0 `).concat(n,`;
35
35
  }
36
36
 
37
37
  body {
38
- `).concat(iE,": ").concat(s,`px;
38
+ `).concat(sE,": ").concat(s,`px;
39
39
  }
40
- `)},SE=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=ve.useMemo(function(){return _E(o)},[o]);return ve.createElement(EE,{styles:xE(i,!t,o,r?"":"!important")})},Vl=!1;if(typeof window<"u")try{var Oa=Object.defineProperty({},"passive",{get:function(){return Vl=!0,!0}});window.addEventListener("test",Oa,Oa),window.removeEventListener("test",Oa,Oa)}catch{Vl=!1}var fo=Vl?{passive:!1}:!1,$E=function(e){return e.tagName==="TEXTAREA"},Dp=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!$E(e)&&r[t]==="visible")},CE=function(e){return Dp(e,"overflowY")},AE=function(e){return Dp(e,"overflowX")},Lp=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=Mp(e,r);if(n){var o=Fp(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},OE=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},TE=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Mp=function(e,t){return e==="v"?CE(t):AE(t)},Fp=function(e,t){return e==="v"?OE(t):TE(t)},IE=function(e,t){return e==="h"&&t==="rtl"?-1:1},PE=function(e,t,r,n,o){var i=IE(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),u=!1,f=a>0,d=0,p=0;do{var h=Fp(e,s),g=h[0],v=h[1],y=h[2],m=v-y-i*g;(g||m)&&Mp(e,s)&&(d+=m,p+=g),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(o&&d===0||!o&&a>d)||!f&&(o&&p===0||!o&&-a>p))&&(u=!0),u},Ta=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jp=function(e){return[e.deltaX,e.deltaY]},Bp=function(e){return e&&"current"in e?e.current:e},kE=function(e,t){return e[0]===t[0]&&e[1]===t[1]},NE=function(e){return`
40
+ `)},CE=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=ve.useMemo(function(){return xE(o)},[o]);return ve.createElement(SE,{styles:$E(i,!t,o,r?"":"!important")})},zl=!1;if(typeof window<"u")try{var Ta=Object.defineProperty({},"passive",{get:function(){return zl=!0,!0}});window.addEventListener("test",Ta,Ta),window.removeEventListener("test",Ta,Ta)}catch{zl=!1}var po=zl?{passive:!1}:!1,AE=function(e){return e.tagName==="TEXTAREA"},Lp=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!AE(e)&&r[t]==="visible")},OE=function(e){return Lp(e,"overflowY")},TE=function(e){return Lp(e,"overflowX")},Mp=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=Fp(e,r);if(n){var o=jp(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},IE=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},PE=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Fp=function(e,t){return e==="v"?OE(t):TE(t)},jp=function(e,t){return e==="v"?IE(t):PE(t)},kE=function(e,t){return e==="h"&&t==="rtl"?-1:1},NE=function(e,t,r,n,o){var i=kE(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),u=!1,f=a>0,d=0,p=0;do{var h=jp(e,s),g=h[0],v=h[1],y=h[2],m=v-y-i*g;(g||m)&&Fp(e,s)&&(d+=m,p+=g),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(o&&d===0||!o&&a>d)||!f&&(o&&p===0||!o&&-a>p))&&(u=!0),u},Ia=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Bp=function(e){return[e.deltaX,e.deltaY]},Rp=function(e){return e&&"current"in e?e.current:e},DE=function(e,t){return e[0]===t[0]&&e[1]===t[1]},LE=function(e){return`
41
41
  .block-interactivity-`.concat(e,` {pointer-events: none;}
42
42
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
43
- `)},DE=0,po=[];function LE(e){var t=ve.useRef([]),r=ve.useRef([0,0]),n=ve.useRef(),o=ve.useState(DE++)[0],i=ve.useState(function(){return Np()})[0],a=ve.useRef(e);ve.useEffect(function(){a.current=e},[e]),ve.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=nE([e.lockRef.current],(e.shards||[]).map(Bp),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ve.useCallback(function(v,y){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var m=Ta(v),w=r.current,E="deltaX"in v?v.deltaX:w[0]-m[0],x="deltaY"in v?v.deltaY:w[1]-m[1],k,I=v.target,S=Math.abs(E)>Math.abs(x)?"h":"v";if("touches"in v&&S==="h"&&I.type==="range")return!1;var C=Lp(S,I);if(!C)return!0;if(C?k=S:(k=S==="v"?"h":"v",C=Lp(S,I)),!C)return!1;if(!n.current&&"changedTouches"in v&&(E||x)&&(n.current=k),!k)return!0;var P=n.current||k;return PE(P,y,v,P==="h"?E:x,!0)},[]),l=ve.useCallback(function(v){var y=v;if(!(!po.length||po[po.length-1]!==i)){var m="deltaY"in y?jp(y):Ta(y),w=t.current.filter(function(k){return k.name===y.type&&k.target===y.target&&kE(k.delta,m)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var E=(a.current.shards||[]).map(Bp).filter(Boolean).filter(function(k){return k.contains(y.target)}),x=E.length>0?s(y,E[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=ve.useCallback(function(v,y,m,w){var E={name:v,delta:y,target:m,should:w};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(x){return x!==E})},1)},[]),f=ve.useCallback(function(v){r.current=Ta(v),n.current=void 0},[]),d=ve.useCallback(function(v){u(v.type,jp(v),v.target,s(v,e.lockRef.current))},[]),p=ve.useCallback(function(v){u(v.type,Ta(v),v.target,s(v,e.lockRef.current))},[]);ve.useEffect(function(){return po.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,fo),document.addEventListener("touchmove",l,fo),document.addEventListener("touchstart",f,fo),function(){po=po.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,fo),document.removeEventListener("touchmove",l,fo),document.removeEventListener("touchstart",f,fo)}},[]);var h=e.removeScrollBar,g=e.inert;return ve.createElement(ve.Fragment,null,g?ve.createElement(i,{styles:NE(o)}):null,h?ve.createElement(SE,{gapMode:"margin"}):null)}const ME=dE(Pp,LE);var Rp=ve.forwardRef(function(e,t){return ve.createElement(Aa,kr({},e,{ref:t,sideCar:ME}))});Rp.classNames=Aa.classNames;const Up=Rp;var FE=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},ho=new WeakMap,Ia=new WeakMap,Pa={},zl=0,Wp=function(e){return e&&(e.host||Wp(e.parentNode))},jE=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Wp(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},BE=function(e,t,r,n){var o=jE(t,Array.isArray(e)?e:[e]);Pa[r]||(Pa[r]=new WeakMap);var i=Pa[r],a=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))f(p);else{var h=p.getAttribute(n),g=h!==null&&h!=="false",v=(ho.get(p)||0)+1,y=(i.get(p)||0)+1;ho.set(p,v),i.set(p,y),a.push(p),v===1&&g&&Ia.set(p,!0),y===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}})};return f(t),s.clear(),zl++,function(){a.forEach(function(d){var p=ho.get(d)-1,h=i.get(d)-1;ho.set(d,p),i.set(d,h),p||(Ia.has(d)||d.removeAttribute(n),Ia.delete(d)),h||d.removeAttribute(r)}),zl--,zl||(ho=new WeakMap,ho=new WeakMap,Ia=new WeakMap,Pa={})}},Hp=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||FE(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),BE(n,o,r,"aria-hidden")):function(){return null}};const Vp="Dialog",[zp,Gp]=dn(Vp),[RE,gr]=zp(Vp),UE=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=c.useRef(null),l=c.useRef(null),[u=!1,f]=xa({prop:n,defaultProp:o,onChange:i});return c.createElement(RE,{scope:t,triggerRef:s,contentRef:l,contentId:pi(),titleId:pi(),descriptionId:pi(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:a},r)},WE="DialogTrigger",Kp=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(WE,r),i=At(t,o.triggerRef);return c.createElement(ft.button,be({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ql(o.open)},n,{ref:i,onClick:pt(e.onClick,o.onOpenToggle)}))}),qp="DialogPortal",[HE,Yp]=zp(qp,{forceMount:void 0}),Jp=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=gr(qp,t);return c.createElement(HE,{scope:t,forceMount:r},c.Children.map(n,a=>c.createElement(ir,{present:r||i.open},c.createElement(Ap,{asChild:!0,container:o},a))))},Gl="DialogOverlay",Xp=c.forwardRef((e,t)=>{const r=Yp(Gl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=gr(Gl,e.__scopeDialog);return i.modal?c.createElement(ir,{present:n||i.open},c.createElement(VE,be({},o,{ref:t}))):null}),VE=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(Gl,r);return c.createElement(Up,{as:Dl,allowPinchZoom:!0,shards:[o.contentRef]},c.createElement(ft.div,be({"data-state":ql(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),go="DialogContent",Kl=c.forwardRef((e,t)=>{const r=Yp(go,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=gr(go,e.__scopeDialog);return c.createElement(ir,{present:n||i.open},i.modal?c.createElement(zE,be({},o,{ref:t})):c.createElement(GE,be({},o,{ref:t})))}),zE=c.forwardRef((e,t)=>{const r=gr(go,e.__scopeDialog),n=c.useRef(null),o=At(t,r.contentRef,n);return c.useEffect(()=>{const i=n.current;if(i)return Hp(i)},[]),c.createElement(Zp,be({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:pt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:pt(e.onFocusOutside,i=>i.preventDefault())}))}),GE=c.forwardRef((e,t)=>{const r=gr(go,e.__scopeDialog),n=c.useRef(!1);return c.createElement(Zp,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}n.current=!1},onInteractOutside:o=>{var i,a;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(n.current=!0);const s=o.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&o.preventDefault()}}))}),Zp=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=gr(go,r),l=c.useRef(null),u=At(t,l);return rE(),c.createElement(c.Fragment,null,c.createElement(K_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},c.createElement(yp,be({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ql(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Qp="DialogTitle",eh=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(Qp,r);return c.createElement(ft.h2,be({id:o.titleId},n,{ref:t}))}),KE="DialogDescription",th=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(KE,r);return c.createElement(ft.p,be({id:o.descriptionId},n,{ref:t}))}),qE="DialogClose",rh=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=gr(qE,r);return c.createElement(ft.button,be({type:"button"},n,{ref:t,onClick:pt(e.onClick,()=>o.onOpenChange(!1))}))});function ql(e){return e?"open":"closed"}const YE="DialogTitleWarning",[JE,j9]=o_(YE,{contentName:go,titleName:Qp,docsSlug:"dialog"}),Yl=UE,XE=Kp,ZE=Jp,QE=Xp,ex=Kl,tx=eh,rx=th,nh=rh,nx="AlertDialog",[ox,B9]=dn(nx,[Gp]),zr=Gp(),ix=e=>{const{__scopeAlertDialog:t,...r}=e,n=zr(t);return c.createElement(Yl,be({},n,r,{modal:!0}))},ax=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=zr(r);return c.createElement(XE,be({},o,n,{ref:t}))}),sx=e=>{const{__scopeAlertDialog:t,...r}=e,n=zr(t);return c.createElement(ZE,be({},n,r))},lx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=zr(r);return c.createElement(QE,be({},o,n,{ref:t}))}),oh="AlertDialogContent",[cx,ux]=ox(oh),fx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,i=zr(r),a=c.useRef(null),s=At(t,a),l=c.useRef(null);return c.createElement(JE,{contentName:oh,titleName:dx,docsSlug:"alert-dialog"},c.createElement(cx,{scope:r,cancelRef:l},c.createElement(ex,be({role:"alertdialog"},i,o,{ref:s,onOpenAutoFocus:pt(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)===null||f===void 0||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault()}),c.createElement(Ml,null,n),!1)))}),dx="AlertDialogTitle",px=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=zr(r);return c.createElement(tx,be({},o,n,{ref:t}))}),hx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=zr(r);return c.createElement(rx,be({},o,n,{ref:t}))}),gx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=zr(r);return c.createElement(nh,be({},o,n,{ref:t}))}),vx="AlertDialogCancel",mx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=ux(vx,r),i=zr(r),a=At(t,o);return c.createElement(nh,be({},i,n,{ref:a}))}),bx=ix;function lt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ih(e){const t=e+"CollectionProvider",[r,n]=Pr(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:g,children:v}=h,y=c.useRef(null),m=c.useRef(new Map).current;return c.createElement(o,{scope:g,itemMap:m,collectionRef:y},v)},s=e+"CollectionSlot",l=c.forwardRef((h,g)=>{const{scope:v,children:y}=h,m=i(s,v),w=tr(g,m.collectionRef);return c.createElement(St,{ref:w},y)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",d=c.forwardRef((h,g)=>{const{scope:v,children:y,...m}=h,w=c.useRef(null),E=tr(g,w),x=i(u,v);return c.useEffect(()=>(x.itemMap.set(w,{ref:w,...m}),()=>void x.itemMap.delete(w))),c.createElement(St,{[f]:"",ref:E},y)});function p(h){const g=i(e+"CollectionConsumer",h);return c.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const m=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((x,k)=>m.indexOf(x.ref.current)-m.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,n]}const yx=c.createContext(void 0);function ah(e){const t=c.useContext(yx);return e||t||"ltr"}function Nr(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function wx(e,t=globalThis==null?void 0:globalThis.document){const r=Nr(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}let Jl=0;function _x(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:sh()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:sh()),Jl++,()=>{Jl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Jl--}},[])}function sh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const vo=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Ex=ve.useId||(()=>{});let xx=0;function Xl(e){const[t,r]=ve.useState(Ex());return vo(()=>{e||r(n=>n??String(xx++))},[e]),e||(t?`radix-${t}`:"")}function mo(e){return e.split("-")[1]}function Zl(e){return e==="y"?"height":"width"}function Gr(e){return e.split("-")[0]}function kn(e){return["top","bottom"].includes(Gr(e))?"x":"y"}function lh(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=kn(t),l=Zl(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(Gr(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(mo(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const Sx=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=lh(u,n,l),p=n,h={},g=0;for(let v=0;v<s.length;v++){const{name:y,fn:m}=s[v],{x:w,y:E,data:x,reset:k}=await m({x:f,y:d,initialPlacement:n,placement:p,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});f=w??f,d=E??d,h={...h,[y]:{...h[y],...x}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:d}=lh(u,p,l)),v=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:h}};function ch(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function ka(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function hi(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,g=ch(h),v=s[p?d==="floating"?"reference":"floating":d],y=ka(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=d==="floating"?{...a.floating,x:n,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(w))&&await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1},x=ka(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:w,strategy:l}):m);return{top:(y.top-x.top+g.top)/E.y,bottom:(x.bottom-y.bottom+g.bottom)/E.y,left:(y.left-x.left+g.left)/E.x,right:(x.right-y.right+g.right)/E.x}}const Ql=Math.min,Nn=Math.max;function ec(e,t,r){return Nn(e,Ql(t,r))}const uh=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e||{},{x:o,y:i,placement:a,rects:s,platform:l,elements:u}=t;if(r==null)return{};const f=ch(n),d={x:o,y:i},p=kn(a),h=Zl(p),g=await l.getDimensions(r),v=p==="y",y=v?"top":"left",m=v?"bottom":"right",w=v?"clientHeight":"clientWidth",E=s.reference[h]+s.reference[p]-d[p]-s.floating[h],x=d[p]-s.reference[p],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let I=k?k[w]:0;I&&await(l.isElement==null?void 0:l.isElement(k))||(I=u.floating[w]||s.floating[h]);const S=E/2-x/2,C=f[y],P=I-g[h]-f[m],F=I/2-g[h]/2+S,D=ec(C,F,P),N=mo(a)!=null&&F!=D&&s.reference[h]/2-(F<C?f[y]:f[m])-g[h]/2<0;return{[p]:d[p]-(N?F<C?C-F:P-F:0),data:{[p]:D,centerOffset:F-D}}}}),fh=["top","right","bottom","left"];fh.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const $x={left:"right",right:"left",bottom:"top",top:"bottom"};function Na(e){return e.replace(/left|right|bottom|top/g,t=>$x[t])}function Cx(e,t,r){r===void 0&&(r=!1);const n=mo(e),o=kn(e),i=Zl(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Na(a)),{main:a,cross:Na(a)}}const Ax={start:"end",end:"start"};function tc(e){return e.replace(/start|end/g,t=>Ax[t])}const Ox=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=e,y=Gr(n),m=Gr(a)===a,w=await(s.isRTL==null?void 0:s.isRTL(l.floating)),E=d||(m||!g?[Na(a)]:function(D){const N=Na(D);return[tc(D),N,tc(N)]}(a));d||h==="none"||E.push(...function(D,N,J,K){const Y=mo(D);let te=function(oe,le,ae){const ge=["left","right"],ce=["right","left"],q=["top","bottom"],H=["bottom","top"];switch(oe){case"top":case"bottom":return ae?le?ce:ge:le?ge:ce;case"left":case"right":return le?q:H;default:return[]}}(Gr(D),J==="start",K);return Y&&(te=te.map(oe=>oe+"-"+Y),N&&(te=te.concat(te.map(tc)))),te}(a,g,h,w));const x=[a,...E],k=await hi(t,v),I=[];let S=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[y]),f){const{main:D,cross:N}=Cx(n,i,w);I.push(k[D],k[N])}if(S=[...S,{placement:n,overflows:I}],!I.every(D=>D<=0)){var C,P;const D=(((C=o.flip)==null?void 0:C.index)||0)+1,N=x[D];if(N)return{data:{index:D,overflows:S},reset:{placement:N}};let J=(P=S.filter(K=>K.overflows[0]<=0).sort((K,Y)=>K.overflows[1]-Y.overflows[1])[0])==null?void 0:P.placement;if(!J)switch(p){case"bestFit":{var F;const K=(F=S.map(Y=>[Y.placement,Y.overflows.filter(te=>te>0).reduce((te,oe)=>te+oe,0)]).sort((Y,te)=>Y[1]-te[1])[0])==null?void 0:F[0];K&&(J=K);break}case"initialPlacement":J=a}if(n!==J)return{reset:{placement:J}}}return{}}}};function dh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ph(e){return fh.some(t=>e[t]>=0)}const Tx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{strategy:r="referenceHidden",...n}=e,{rects:o}=t;switch(r){case"referenceHidden":{const i=dh(await hi(t,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ph(i)}}}case"escaped":{const i=dh(await hi(t,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:ph(i)}}}default:return{}}}}},Ix=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=Gr(s),p=mo(s),h=kn(s)==="x",g=["left","top"].includes(d)?-1:1,v=f&&h?-1:1,y=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*v,y:m*g}:{x:m*g,y:w*v}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function hh(e){return e==="x"?"y":"x"}const Px=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:m,y:w}=y;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await hi(t,l),d=kn(Gr(o)),p=hh(d);let h=u[d],g=u[p];if(i){const y=d==="y"?"bottom":"right";h=ec(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";g=ec(g+f[p==="y"?"top":"left"],g,g-f[y])}const v=s.fn({...t,[d]:h,[p]:g});return{...v,data:{x:v.x-r,y:v.y-n}}}}},kx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=kn(o),p=hh(d);let h=f[d],g=f[p];const v=typeof s=="function"?s(t):s,y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const E=d==="y"?"height":"width",x=i.reference[d]-i.floating[E]+y.mainAxis,k=i.reference[d]+i.reference[E]-y.mainAxis;h<x?h=x:h>k&&(h=k)}if(u){var m,w;const E=d==="y"?"width":"height",x=["top","left"].includes(Gr(o)),k=i.reference[p]-i.floating[E]+(x&&((m=a.offset)==null?void 0:m[p])||0)+(x?0:y.crossAxis),I=i.reference[p]+i.reference[E]+(x?0:((w=a.offset)==null?void 0:w[p])||0)-(x?y.crossAxis:0);g<k?g=k:g>I&&(g=I)}return{[d]:h,[p]:g}}}},Nx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=e,l=await hi(t,s),u=Gr(r),f=mo(r),d=kn(r)==="x",{width:p,height:h}=n.floating;let g,v;u==="top"||u==="bottom"?(g=u,v=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,g=f==="end"?"top":"bottom");const y=h-l[g],m=p-l[v],w=!t.middlewareData.shift;let E=y,x=m;if(d){const I=p-l.left-l.right;x=f||w?Ql(m,I):I}else{const I=h-l.top-l.bottom;E=f||w?Ql(y,I):I}if(w&&!f){const I=Nn(l.left,0),S=Nn(l.right,0),C=Nn(l.top,0),P=Nn(l.bottom,0);d?x=p-2*(I!==0||S!==0?I+S:Nn(l.left,l.right)):E=h-2*(C!==0||P!==0?C+P:Nn(l.top,l.bottom))}await a({...t,availableWidth:x,availableHeight:E});const k=await o.getDimensions(i.floating);return p!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function ar(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vr(e){return ar(e).getComputedStyle(e)}function gh(e){return e instanceof ar(e).Node}function pn(e){return gh(e)?(e.nodeName||"").toLowerCase():""}function mr(e){return e instanceof ar(e).HTMLElement}function rr(e){return e instanceof ar(e).Element}function vh(e){return typeof ShadowRoot>"u"?!1:e instanceof ar(e).ShadowRoot||e instanceof ShadowRoot}function gi(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Dx(e){return["table","td","th"].includes(pn(e))}function rc(e){const t=nc(),r=vr(e);return r.transform!=="none"||r.perspective!=="none"||!t&&!!r.backdropFilter&&r.backdropFilter!=="none"||!t&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function nc(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Da(e){return["html","body","#document"].includes(pn(e))}const mh=Math.min,vi=Math.max,La=Math.round;function bh(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=mr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=La(r)!==i||La(n)!==a;return s&&(r=i,n=a),{width:r,height:n,fallback:s}}function yh(e){return rr(e)?e:e.contextElement}const wh={x:1,y:1};function bo(e){const t=yh(e);if(!mr(t))return wh;const r=t.getBoundingClientRect(),{width:n,height:o,fallback:i}=bh(t);let a=(i?La(r.width):r.width)/n,s=(i?La(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const _h={x:0,y:0};function Eh(e,t,r){var n,o;if(t===void 0&&(t=!0),!nc())return _h;const i=e?ar(e):window;return!r||t&&r!==i?_h:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((o=i.visualViewport)==null?void 0:o.offsetTop)||0}}function Dn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=yh(e);let a=wh;t&&(n?rr(n)&&(a=bo(n)):a=bo(e));const s=Eh(i,r,n);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const p=ar(i),h=n&&rr(n)?ar(n):n;let g=p.frameElement;for(;g&&n&&h!==p;){const v=bo(g),y=g.getBoundingClientRect(),m=getComputedStyle(g);y.x+=(g.clientLeft+parseFloat(m.paddingLeft))*v.x,y.y+=(g.clientTop+parseFloat(m.paddingTop))*v.y,l*=v.x,u*=v.y,f*=v.x,d*=v.y,l+=y.x,u+=y.y,g=ar(g).frameElement}}return ka({width:f,height:d,x:l,y:u})}function hn(e){return((gh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ma(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function xh(e){return Dn(hn(e)).left+Ma(e).scrollLeft}function yo(e){if(pn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vh(e)&&e.host||hn(e);return vh(t)?t.host:t}function Sh(e){const t=yo(e);return Da(t)?t.ownerDocument.body:mr(t)&&gi(t)?t:Sh(t)}function mi(e,t){var r;t===void 0&&(t=[]);const n=Sh(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=ar(n);return o?t.concat(i,i.visualViewport||[],gi(n)?n:[]):t.concat(n,mi(n))}function $h(e,t,r){let n;if(t==="viewport")n=function(o,i){const a=ar(o),s=hn(o),l=a.visualViewport;let u=s.clientWidth,f=s.clientHeight,d=0,p=0;if(l){u=l.width,f=l.height;const h=nc();(!h||h&&i==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}return{width:u,height:f,x:d,y:p}}(e,r);else if(t==="document")n=function(o){const i=hn(o),a=Ma(o),s=o.ownerDocument.body,l=vi(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=vi(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let f=-a.scrollLeft+xh(o);const d=-a.scrollTop;return vr(s).direction==="rtl"&&(f+=vi(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:f,y:d}}(hn(e));else if(rr(t))n=function(o,i){const a=Dn(o,!0,i==="fixed"),s=a.top+o.clientTop,l=a.left+o.clientLeft,u=mr(o)?bo(o):{x:1,y:1};return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:l*u.x,y:s*u.y}}(t,r);else{const o=Eh(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return ka(n)}function Ch(e,t){const r=yo(e);return!(r===t||!rr(r)||Da(r))&&(vr(r).position==="fixed"||Ch(r,t))}function Ah(e,t){return mr(e)&&vr(e).position!=="fixed"?t?t(e):e.offsetParent:null}function Oh(e,t){const r=ar(e);if(!mr(e))return r;let n=Ah(e,t);for(;n&&Dx(n)&&vr(n).position==="static";)n=Ah(n,t);return n&&(pn(n)==="html"||pn(n)==="body"&&vr(n).position==="static"&&!rc(n))?r:n||function(o){let i=yo(o);for(;mr(i)&&!Da(i);){if(rc(i))return i;i=yo(i)}return null}(e)||r}function Lx(e,t,r){const n=mr(t),o=hn(t),i=r==="fixed",a=Dn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((pn(t)!=="body"||gi(o))&&(s=Ma(t)),mr(t)){const u=Dn(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&(l.x=xh(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const Mx={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=r==="clippingAncestors"?function(u,f){const d=f.get(u);if(d)return d;let p=mi(u).filter(y=>rr(y)&&pn(y)!=="body"),h=null;const g=vr(u).position==="fixed";let v=g?yo(u):u;for(;rr(v)&&!Da(v);){const y=vr(v),m=rc(v);m||y.position!=="fixed"||(h=null),(g?!m&&!h:!m&&y.position==="static"&&h&&["absolute","fixed"].includes(h.position)||gi(v)&&!m&&Ch(u,v))?p=p.filter(w=>w!==v):h=y,v=yo(v)}return f.set(u,p),p}(t,this._c):[].concat(r),a=[...i,n],s=a[0],l=a.reduce((u,f)=>{const d=$h(t,f,o);return u.top=vi(d.top,u.top),u.right=mh(d.right,u.right),u.bottom=mh(d.bottom,u.bottom),u.left=vi(d.left,u.left),u},$h(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=mr(r),i=hn(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((o||!o&&n!=="fixed")&&((pn(r)!=="body"||gi(i))&&(a=Ma(r)),mr(r))){const u=Dn(r);s=bo(r),l.x=u.x+r.clientLeft,l.y=u.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:rr,getDimensions:function(e){return bh(e)},getOffsetParent:Oh,getDocumentElement:hn,getScale:bo,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||Oh,i=this.getDimensions;return{reference:Lx(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>vr(e).direction==="rtl"};function Fx(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o||i?[...rr(e)?mi(e):e.contextElement?mi(e.contextElement):[],...mi(t)]:[];l.forEach(p=>{const h=!rr(p)&&p.toString().includes("V");!o||s&&!h||p.addEventListener("scroll",r,{passive:!0}),i&&p.addEventListener("resize",r)});let u,f=null;a&&(f=new ResizeObserver(()=>{r()}),rr(e)&&!s&&f.observe(e),rr(e)||!e.contextElement||s||f.observe(e.contextElement),f.observe(t));let d=s?Dn(e):null;return s&&function p(){const h=Dn(e);!d||h.x===d.x&&h.y===d.y&&h.width===d.width&&h.height===d.height||r(),d=h,u=requestAnimationFrame(p)}(),r(),()=>{var p;l.forEach(h=>{o&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(p=f)==null||p.disconnect(),f=null,s&&cancelAnimationFrame(u)}}const jx=(e,t,r)=>{const n=new Map,o={platform:Mx,...r},i={...o.platform,_c:n};return Sx(e,t,{...o,platform:i})},Bx=e=>{const{element:t,padding:r}=e;function n(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return t&&n(t)?t.current!=null?uh({element:t.current,padding:r}).fn(o):{}:t?uh({element:t,padding:r}).fn(o):{}}}};var Fa=typeof document<"u"?c.useLayoutEffect:c.useEffect;function ja(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!ja(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!ja(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Th(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ih(e,t){const r=Th(e);return Math.round(t*r)/r}function Ph(e){const t=ve.useRef(e);return Fa(()=>{t.current=e}),t}function Rx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=ve.useState(n);ja(p,n)||h(n);const[g,v]=ve.useState(null),[y,m]=ve.useState(null),w=ve.useCallback(te=>{te!=I.current&&(I.current=te,v(te))},[v]),E=ve.useCallback(te=>{te!==S.current&&(S.current=te,m(te))},[m]),x=i||g,k=a||y,I=ve.useRef(null),S=ve.useRef(null),C=ve.useRef(f),P=Ph(l),F=Ph(o),D=ve.useCallback(()=>{if(!I.current||!S.current)return;const te={placement:t,strategy:r,middleware:p};F.current&&(te.platform=F.current),jx(I.current,S.current,te).then(oe=>{const le={...oe,isPositioned:!0};N.current&&!ja(C.current,le)&&(C.current=le,Od.flushSync(()=>{d(le)}))})},[p,t,r,F]);Fa(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(te=>({...te,isPositioned:!1})))},[u]);const N=ve.useRef(!1);Fa(()=>(N.current=!0,()=>{N.current=!1}),[]),Fa(()=>{if(x&&(I.current=x),k&&(S.current=k),x&&k){if(P.current)return P.current(x,k,D);D()}},[x,k,D,P]);const J=ve.useMemo(()=>({reference:I,floating:S,setReference:w,setFloating:E}),[w,E]),K=ve.useMemo(()=>({reference:x,floating:k}),[x,k]),Y=ve.useMemo(()=>{const te={position:r,left:0,top:0};if(!K.floating)return te;const oe=Ih(K.floating,f.x),le=Ih(K.floating,f.y);return s?{...te,transform:"translate("+oe+"px, "+le+"px)",...Th(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:oe,top:le}},[r,s,K.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:D,refs:J,elements:K,floatingStyles:Y}),[f,D,J,K,Y])}const Ux=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(Ge.svg,be({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))});function kh(e){const[t,r]=c.useState(void 0);return vo(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function Wx(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ba=e=>{const{present:t,children:r}=e,n=Hx(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=tr(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};Ba.displayName="Presence";function Hx(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Wx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Ra(n.current);i.current=s==="mounted"?u:"none"},[s]),vo(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=Ra(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),vo(()=>{if(t){const u=d=>{const h=Ra(n.current).includes(d.animationName);d.target===t&&h&&on.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Ra(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Ra(e){return(e==null?void 0:e.animationName)||"none"}function Kr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Vx({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=Nr(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function Vx({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=Nr(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const oc="rovingFocusGroup.onEntryFocus",zx={bubbles:!1,cancelable:!0},ic="RovingFocusGroup",[ac,Nh,Gx]=ih(ic),[Kx,Dh]=Pr(ic,[Gx]),[qx,Yx]=Kx(ic),Jx=c.forwardRef((e,t)=>c.createElement(ac.Provider,{scope:e.__scopeRovingFocusGroup},c.createElement(ac.Slot,{scope:e.__scopeRovingFocusGroup},c.createElement(Xx,be({},e,{ref:t}))))),Xx=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...f}=e,d=c.useRef(null),p=tr(t,d),h=ah(i),[g=null,v]=Kr({prop:a,defaultProp:s,onChange:l}),[y,m]=c.useState(!1),w=Nr(u),E=Nh(r),x=c.useRef(!1),[k,I]=c.useState(0);return c.useEffect(()=>{const S=d.current;if(S)return S.addEventListener(oc,w),()=>S.removeEventListener(oc,w)},[w]),c.createElement(qx,{scope:r,orientation:n,dir:h,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>v(S),[v]),onItemShiftTab:c.useCallback(()=>m(!0),[]),onFocusableItemAdd:c.useCallback(()=>I(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>I(S=>S-1),[])},c.createElement(Ge.div,be({tabIndex:y||k===0?-1:0,"data-orientation":n},f,{ref:p,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,()=>{x.current=!0}),onFocus:lt(e.onFocus,S=>{const C=!x.current;if(S.target===S.currentTarget&&C&&!y){const P=new CustomEvent(oc,zx);if(S.currentTarget.dispatchEvent(P),!P.defaultPrevented){const F=E().filter(Y=>Y.focusable),D=F.find(Y=>Y.active),N=F.find(Y=>Y.id===g),K=[D,N,...F].filter(Boolean).map(Y=>Y.ref.current);Lh(K)}}x.current=!1}),onBlur:lt(e.onBlur,()=>m(!1))})))}),Zx="RovingFocusGroupItem",Qx=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:i,...a}=e,s=Xl(),l=i||s,u=Yx(Zx,r),f=u.currentTabStopId===l,d=Nh(r),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return c.useEffect(()=>{if(n)return p(),()=>h()},[n,p,h]),c.createElement(ac.ItemSlot,{scope:r,id:l,focusable:n,active:o},c.createElement(Ge.span,be({tabIndex:f?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:lt(e.onMouseDown,g=>{n?u.onItemFocus(l):g.preventDefault()}),onFocus:lt(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:lt(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=r2(g,u.orientation,u.dir);if(v!==void 0){g.preventDefault();let m=d().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")m.reverse();else if(v==="prev"||v==="next"){v==="prev"&&m.reverse();const w=m.indexOf(g.currentTarget);m=u.loop?n2(m,w+1):m.slice(w+1)}setTimeout(()=>Lh(m))}})})))}),e2={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function t2(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function r2(e,t,r){const n=t2(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return e2[n]}function Lh(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function n2(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const o2=Jx,i2=Qx,sc="dismissableLayer.update",a2="dismissableLayer.pointerDownOutside",s2="dismissableLayer.focusOutside";let Mh;const l2=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),c2=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(l2),[d,p]=c.useState(null),h=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=c.useState({}),v=tr(t,C=>p(C)),y=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(m),E=d?y.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=E>=w,I=u2(C=>{const P=C.target,F=[...f.branches].some(D=>D.contains(P));!k||F||(i==null||i(C),s==null||s(C),C.defaultPrevented||l==null||l())},h),S=f2(C=>{const P=C.target;[...f.branches].some(D=>D.contains(P))||(a==null||a(C),s==null||s(C),C.defaultPrevented||l==null||l())},h);return wx(C=>{E===f.layers.size-1&&(o==null||o(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Mh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Fh(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Mh)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Fh())},[d,f]),c.useEffect(()=>{const C=()=>g({});return document.addEventListener(sc,C),()=>document.removeEventListener(sc,C)},[]),c.createElement(Ge.div,be({},u,{ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:lt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:lt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:lt(e.onPointerDownCapture,I.onPointerDownCapture)}))});function u2(e,t=globalThis==null?void 0:globalThis.document){const r=Nr(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){jh(a2,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function f2(e,t=globalThis==null?void 0:globalThis.document){const r=Nr(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&jh(s2,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Fh(){const e=new CustomEvent(sc);document.dispatchEvent(e)}function jh(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Wd(o,i):o.dispatchEvent(i)}const lc="focusScope.autoFocusOnMount",cc="focusScope.autoFocusOnUnmount",Bh={bubbles:!1,cancelable:!0},d2=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=Nr(o),f=Nr(i),d=c.useRef(null),p=tr(t,v=>l(v)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(E){if(h.paused||!s)return;const x=E.target;s.contains(x)?d.current=x:gn(d.current,{select:!0})},y=function(E){if(h.paused||!s)return;const x=E.relatedTarget;x!==null&&(s.contains(x)||gn(d.current,{select:!0}))},m=function(E){const x=document.activeElement;for(const k of E)k.removedNodes.length>0&&(s!=null&&s.contains(x)||gn(s))};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(m);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[n,s,h.paused]),c.useEffect(()=>{if(s){Wh.add(h);const v=document.activeElement;if(!s.contains(v)){const m=new CustomEvent(lc,Bh);s.addEventListener(lc,u),s.dispatchEvent(m),m.defaultPrevented||(p2(b2(Rh(s)),{select:!0}),document.activeElement===v&&gn(s))}return()=>{s.removeEventListener(lc,u),setTimeout(()=>{const m=new CustomEvent(cc,Bh);s.addEventListener(cc,f),s.dispatchEvent(m),m.defaultPrevented||gn(v??document.body,{select:!0}),s.removeEventListener(cc,f),Wh.remove(h)},0)}}},[s,u,f,h]);const g=c.useCallback(v=>{if(!r&&!n||h.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(y&&m){const w=v.currentTarget,[E,x]=h2(w);E&&x?!v.shiftKey&&m===x?(v.preventDefault(),r&&gn(E,{select:!0})):v.shiftKey&&m===E&&(v.preventDefault(),r&&gn(x,{select:!0})):m===w&&v.preventDefault()}},[r,n,h.paused]);return c.createElement(Ge.div,be({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function p2(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(gn(n,{select:t}),document.activeElement!==r)return}function h2(e){const t=Rh(e),r=Uh(t,e),n=Uh(t.reverse(),e);return[r,n]}function Rh(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Uh(e,t){for(const r of e)if(!g2(r,{upTo:t}))return r}function g2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function v2(e){return e instanceof HTMLInputElement&&"select"in e}function gn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&v2(e)&&t&&e.select()}}const Wh=m2();function m2(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Hh(e,t),e.unshift(t)},remove(t){var r;e=Hh(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Hh(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function b2(e){return e.filter(t=>t.tagName!=="A")}const Vh="Popper",[zh,Gh]=Pr(Vh),[y2,Kh]=zh(Vh),w2=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(y2,{scope:t,anchor:n,onAnchorChange:o},r)},_2="PopperAnchor",E2=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=Kh(_2,r),a=c.useRef(null),s=tr(t,a);return c.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:c.createElement(Ge.div,be({},o,{ref:s}))}),qh="PopperContent",[x2,S2]=zh(qh),$2=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:g=0,arrowPadding:v=0,collisionBoundary:y=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:k,...I}=e,S=Kh(qh,f),[C,P]=c.useState(null),F=tr(t,ne=>P(ne)),[D,N]=c.useState(null),J=kh(D),K=(r=J==null?void 0:J.width)!==null&&r!==void 0?r:0,Y=(n=J==null?void 0:J.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(y)?y:[y],ae=le.length>0,ge={padding:oe,boundary:le.filter(T2),altBoundary:ae},{refs:ce,floatingStyles:q,placement:H,isPositioned:re,middlewareData:de}=Rx({strategy:"fixed",placement:te,whileElementsMounted:Fx,elements:{reference:S.anchor},middleware:[Ix({mainAxis:p+Y,alignmentAxis:g}),x&&Px({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?kx():void 0,...ge}),x&&Ox({...ge}),Nx({...ge,apply:({elements:ne,rects:pe,availableWidth:me,availableHeight:xe})=>{const{width:Ee,height:ie}=pe.reference,Ne=ne.floating.style;Ne.setProperty("--radix-popper-available-width",`${me}px`),Ne.setProperty("--radix-popper-available-height",`${xe}px`),Ne.setProperty("--radix-popper-anchor-width",`${Ee}px`),Ne.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),D&&Bx({element:D,padding:v}),I2({arrowWidth:K,arrowHeight:Y}),E&&Tx({strategy:"referenceHidden"})]}),[U,z]=Yh(H),M=Nr(k);vo(()=>{re&&(M==null||M())},[re,M]);const R=(o=de.arrow)===null||o===void 0?void 0:o.x,G=(i=de.arrow)===null||i===void 0?void 0:i.y,O=((a=de.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[T,Z]=c.useState();return vo(()=>{C&&Z(window.getComputedStyle(C).zIndex)},[C]),c.createElement("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:re?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T,"--radix-popper-transform-origin":[(s=de.transformOrigin)===null||s===void 0?void 0:s.x,(l=de.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement(x2,{scope:f,placedSide:U,onArrowChange:N,arrowX:R,arrowY:G,shouldHideArrow:O},c.createElement(Ge.div,be({"data-side":U,"data-align":z},I,{ref:F,style:{...I.style,animation:re?void 0:"none",opacity:(u=de.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),C2="PopperArrow",A2={top:"bottom",right:"left",bottom:"top",left:"right"},O2=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=S2(C2,n),a=A2[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(Ux,be({},o,{ref:r,style:{...o.style,display:"block"}})))});function T2(e){return e!==null}const I2=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,v]=Yh(s),y={start:"0%",center:"50%",end:"100%"}[v],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return g==="bottom"?(E=d?y:`${m}px`,x=`${-h}px`):g==="top"?(E=d?y:`${m}px`,x=`${l.floating.height+h}px`):g==="right"?(E=`${-h}px`,x=d?y:`${w}px`):g==="left"&&(E=`${l.floating.width+h}px`,x=d?y:`${w}px`),{data:{x:E,y:x}}}});function Yh(e){const[t,r="center"]=e.split("-");return[t,r]}const P2=w2,k2=E2,N2=$2,D2=O2,L2=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?on.createPortal(c.createElement(Ge.div,rt({},o,{ref:t})),n):null}),M2=["Enter"," "],F2=["ArrowDown","PageUp","Home"],Jh=["ArrowUp","PageDown","End"],j2=[...F2,...Jh],Ua="Menu",[uc,B2,R2]=ih(Ua),[Ln,Xh]=Pr(Ua,[R2,Gh,Dh]),Wa=Gh(),Zh=Dh(),[U2,bi]=Ln(Ua),[W2,fc]=Ln(Ua),H2=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:i,modal:a=!0}=e,s=Wa(t),[l,u]=c.useState(null),f=c.useRef(!1),d=Nr(i),p=ah(o);return c.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.createElement(P2,s,c.createElement(U2,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u},c.createElement(W2,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:a},n)))},V2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Wa(r);return c.createElement(k2,be({},o,n,{ref:t}))}),Qh="MenuPortal",[z2,G2]=Ln(Qh,{forceMount:void 0}),K2=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,i=bi(Qh,t);return c.createElement(z2,{scope:t,forceMount:r},c.createElement(Ba,{present:r||i.open},c.createElement(L2,{asChild:!0,container:o},n)))},vn="MenuContent",[q2,eg]=Ln(vn),Y2=c.forwardRef((e,t)=>{const r=G2(vn,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=bi(vn,e.__scopeMenu),a=fc(vn,e.__scopeMenu);return c.createElement(uc.Provider,{scope:e.__scopeMenu},c.createElement(Ba,{present:n||i.open},c.createElement(uc.Slot,{scope:e.__scopeMenu},a.modal?c.createElement(J2,be({},o,{ref:t})):c.createElement(X2,be({},o,{ref:t})))))}),J2=c.forwardRef((e,t)=>{const r=bi(vn,e.__scopeMenu),n=c.useRef(null),o=tr(t,n);return c.useEffect(()=>{const i=n.current;if(i)return Hp(i)},[]),c.createElement(tg,be({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))}),X2=c.forwardRef((e,t)=>{const r=bi(vn,e.__scopeMenu);return c.createElement(tg,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))}),tg=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:g,...v}=e,y=bi(vn,r),m=fc(vn,r),w=Wa(r),E=Zh(r),x=B2(r),[k,I]=c.useState(null),S=c.useRef(null),C=tr(t,S,y.onContentChange),P=c.useRef(0),F=c.useRef(""),D=c.useRef(0),N=c.useRef(null),J=c.useRef("right"),K=c.useRef(0),Y=g?Up:c.Fragment,te=g?{as:St,allowPinchZoom:!0}:void 0,oe=ae=>{var ge,ce;const q=F.current+ae,H=x().filter(R=>!R.disabled),re=document.activeElement,de=(ge=H.find(R=>R.ref.current===re))===null||ge===void 0?void 0:ge.textValue,U=H.map(R=>R.textValue),z=uS(U,q,de),M=(ce=H.find(R=>R.textValue===z))===null||ce===void 0?void 0:ce.ref.current;(function R(G){F.current=G,window.clearTimeout(P.current),G!==""&&(P.current=window.setTimeout(()=>R(""),1e3))})(q),M&&setTimeout(()=>M.focus())};c.useEffect(()=>()=>window.clearTimeout(P.current),[]),_x();const le=c.useCallback(ae=>{var ge,ce;return J.current===((ge=N.current)===null||ge===void 0?void 0:ge.side)&&dS(ae,(ce=N.current)===null||ce===void 0?void 0:ce.area)},[]);return c.createElement(q2,{scope:r,searchRef:F,onItemEnter:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),onItemLeave:c.useCallback(ae=>{var ge;le(ae)||((ge=S.current)===null||ge===void 0||ge.focus(),I(null))},[le]),onTriggerLeave:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),pointerGraceTimerRef:D,onPointerGraceIntentChange:c.useCallback(ae=>{N.current=ae},[])},c.createElement(Y,te,c.createElement(d2,{asChild:!0,trapped:o,onMountAutoFocus:lt(i,ae=>{var ge;ae.preventDefault(),(ge=S.current)===null||ge===void 0||ge.focus()}),onUnmountAutoFocus:a},c.createElement(c2,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h},c.createElement(o2,be({asChild:!0},E,{dir:m.dir,orientation:"vertical",loop:n,currentTabStopId:k,onCurrentTabStopIdChange:I,onEntryFocus:lt(l,ae=>{m.isUsingKeyboardRef.current||ae.preventDefault()})}),c.createElement(N2,be({role:"menu","aria-orientation":"vertical","data-state":sS(y.open),"data-radix-menu-content":"",dir:m.dir},w,v,{ref:C,style:{outline:"none",...v.style},onKeyDown:lt(v.onKeyDown,ae=>{const ce=ae.target.closest("[data-radix-menu-content]")===ae.currentTarget,q=ae.ctrlKey||ae.altKey||ae.metaKey,H=ae.key.length===1;ce&&(ae.key==="Tab"&&ae.preventDefault(),!q&&H&&oe(ae.key));const re=S.current;if(ae.target!==re||!j2.includes(ae.key))return;ae.preventDefault();const U=x().filter(z=>!z.disabled).map(z=>z.ref.current);Jh.includes(ae.key)&&U.reverse(),lS(U)}),onBlur:lt(e.onBlur,ae=>{ae.currentTarget.contains(ae.target)||(window.clearTimeout(P.current),F.current="")}),onPointerMove:lt(e.onPointerMove,pc(ae=>{const ge=ae.target,ce=K.current!==ae.clientX;if(ae.currentTarget.contains(ge)&&ce){const q=ae.clientX>K.current?"right":"left";J.current=q,K.current=ae.clientX}}))})))))))}),Z2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,be({role:"group"},n,{ref:t}))}),Q2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,be({},n,{ref:t}))}),dc="MenuItem",rg="menu.itemSelect",ng=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,i=c.useRef(null),a=fc(dc,e.__scopeMenu),s=eg(dc,e.__scopeMenu),l=tr(t,i),u=c.useRef(!1),f=()=>{const d=i.current;if(!r&&d){const p=new CustomEvent(rg,{bubbles:!0,cancelable:!0});d.addEventListener(rg,h=>n==null?void 0:n(h),{once:!0}),Wd(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return c.createElement(eS,be({},o,{ref:l,disabled:r,onClick:lt(e.onClick,f),onPointerDown:d=>{var p;(p=e.onPointerDown)===null||p===void 0||p.call(e,d),u.current=!0},onPointerUp:lt(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)===null||p===void 0||p.click()}),onKeyDown:lt(e.onKeyDown,d=>{const p=s.searchRef.current!=="";r||p&&d.key===" "||M2.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),eS=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...i}=e,a=eg(dc,r),s=Zh(r),l=c.useRef(null),u=tr(t,l),[f,d]=c.useState(!1),[p,h]=c.useState("");return c.useEffect(()=>{const g=l.current;if(g){var v;h(((v=g.textContent)!==null&&v!==void 0?v:"").trim())}},[i.children]),c.createElement(uc.ItemSlot,{scope:r,disabled:n,textValue:o??p},c.createElement(i2,be({asChild:!0},s,{focusable:!n}),c.createElement(Ge.div,be({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:u,onPointerMove:lt(e.onPointerMove,pc(g=>{n?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:lt(e.onPointerLeave,pc(g=>a.onItemLeave(g))),onFocus:lt(e.onFocus,()=>d(!0)),onBlur:lt(e.onBlur,()=>d(!1))}))))}),tS=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return c.createElement(rS,{scope:e.__scopeMenu,checked:r},c.createElement(ng,be({role:"menuitemcheckbox","aria-checked":Ha(r)?"mixed":r},o,{ref:t,"data-state":ig(r),onSelect:lt(o.onSelect,()=>n==null?void 0:n(Ha(r)?!0:!r),{checkForDefaultPrevented:!1})})))});Ln("MenuRadioGroup",{value:void 0,onValueChange:()=>{}});const og="MenuItemIndicator",[rS,nS]=Ln(og,{checked:!1}),oS=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,i=nS(og,r);return c.createElement(Ba,{present:n||Ha(i.checked)||i.checked===!0},c.createElement(Ge.span,be({},o,{ref:t,"data-state":ig(i.checked)})))}),iS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,be({role:"separator","aria-orientation":"horizontal"},n,{ref:t}))}),aS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Wa(r);return c.createElement(D2,be({},o,n,{ref:t}))});Ln("MenuSub");function sS(e){return e?"open":"closed"}function Ha(e){return e==="indeterminate"}function ig(e){return Ha(e)?"indeterminate":e?"checked":"unchecked"}function lS(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function cS(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function uS(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=cS(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==r));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function fS(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function dS(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return fS(r,t)}function pc(e){return t=>t.pointerType==="mouse"?e(t):void 0}const pS=H2,hS=V2,gS=K2,vS=Y2,mS=Z2,bS=Q2,yS=ng,wS=tS,_S=oS,ES=iS,xS=aS,ag="DropdownMenu",[SS,H9]=Pr(ag,[Xh]),br=Xh(),[$S,sg]=SS(ag),CS=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=br(t),u=c.useRef(null),[f=!1,d]=Kr({prop:o,defaultProp:i,onChange:a});return c.createElement($S,{scope:t,triggerId:Xl(),triggerRef:u,contentId:Xl(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:s},c.createElement(pS,be({},l,{open:f,onOpenChange:d,dir:n,modal:s}),r))},AS="DropdownMenuTrigger",OS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,i=sg(AS,r),a=br(r);return c.createElement(hS,be({asChild:!0},a),c.createElement(Ge.button,be({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":n?"":void 0,disabled:n},o,{ref:Tl(t,i.triggerRef),onPointerDown:lt(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:lt(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})))}),TS=e=>{const{__scopeDropdownMenu:t,...r}=e,n=br(t);return c.createElement(gS,be({},n,r))},IS="DropdownMenuContent",PS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=sg(IS,r),i=br(r),a=c.useRef(!1);return c.createElement(vS,be({id:o.contentId,"aria-labelledby":o.triggerId},i,n,{ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,s=>{var l;a.current||(l=o.triggerRef.current)===null||l===void 0||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:lt(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(a.current=!0)}),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)"}}))}),kS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(mS,be({},o,n,{ref:t}))}),NS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(bS,be({},o,n,{ref:t}))}),DS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(yS,be({},o,n,{ref:t}))}),LS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(wS,be({},o,n,{ref:t}))}),MS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(_S,be({},o,n,{ref:t}))}),FS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(ES,be({},o,n,{ref:t}))}),jS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=br(r);return c.createElement(xS,be({},o,n,{ref:t}))}),BS=OS,RS=TS,US=PS,WS=kS,HS=NS,VS=DS,zS=LS,GS=MS,KS=FS,qS=jS;function YS(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function lg(e){const[t,r]=c.useState(void 0);return Ir(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}const cg="Checkbox",[JS,V9]=dn(cg),[XS,ZS]=JS(cg),QS=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=At(t,E=>p(E)),g=c.useRef(!1),v=d?!!d.closest("form"):!0,[y=!1,m]=xa({prop:o,defaultProp:i,onChange:u}),w=c.useRef(y);return c.useEffect(()=>{const E=d==null?void 0:d.form;if(E){const x=()=>m(w.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[d,m]),c.createElement(XS,{scope:r,state:y,disabled:s},c.createElement(ft.button,rt({type:"button",role:"checkbox","aria-checked":Mn(y)?"mixed":y,"aria-required":a,"data-state":ug(y),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onKeyDown:pt(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:pt(e.onClick,E=>{m(x=>Mn(x)?!0:!x),v&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})})),v&&c.createElement(r$,{control:d,bubbles:!g.current,name:n,value:l,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),e$="CheckboxIndicator",t$=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,i=ZS(e$,r);return c.createElement(ir,{present:n||Mn(i.state)||i.state===!0},c.createElement(ft.span,rt({"data-state":ug(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),r$=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=YS(r),s=lg(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});l.indeterminate=Mn(r),d.call(l,Mn(r)?!1:r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",rt({type:"checkbox","aria-hidden":!0,defaultChecked:Mn(r)?!1:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Mn(e){return e==="indeterminate"}function ug(e){return Mn(e)?"indeterminate":e?"checked":"unchecked"}const n$=QS,o$=t$;function i$(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const fg="Switch",[a$,z9]=Pr(fg),[s$,l$]=a$(fg),c$=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=tr(t,w=>p(w)),g=c.useRef(!1),v=d?!!d.closest("form"):!0,[y=!1,m]=Kr({prop:o,defaultProp:i,onChange:u});return c.createElement(s$,{scope:r,checked:y,disabled:s},c.createElement(Ge.button,be({type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":dg(y),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onClick:lt(e.onClick,w=>{m(E=>!E),v&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})})),v&&c.createElement(d$,{control:d,bubbles:!g.current,name:n,value:l,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),u$="SwitchThumb",f$=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=l$(u$,r);return c.createElement(Ge.span,be({"data-state":dg(o.checked),"data-disabled":o.disabled?"":void 0},n,{ref:t}))}),d$=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=i$(r),s=kh(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",be({type:"checkbox","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function dg(e){return e?"checked":"unchecked"}const p$=c$,h$=f$;/*! *****************************************************************************
43
+ `)},ME=0,ho=[];function FE(e){var t=ve.useRef([]),r=ve.useRef([0,0]),n=ve.useRef(),o=ve.useState(ME++)[0],i=ve.useState(function(){return Dp()})[0],a=ve.useRef(e);ve.useEffect(function(){a.current=e},[e]),ve.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=iE([e.lockRef.current],(e.shards||[]).map(Rp),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ve.useCallback(function(v,y){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var m=Ia(v),w=r.current,E="deltaX"in v?v.deltaX:w[0]-m[0],x="deltaY"in v?v.deltaY:w[1]-m[1],k,I=v.target,S=Math.abs(E)>Math.abs(x)?"h":"v";if("touches"in v&&S==="h"&&I.type==="range")return!1;var C=Mp(S,I);if(!C)return!0;if(C?k=S:(k=S==="v"?"h":"v",C=Mp(S,I)),!C)return!1;if(!n.current&&"changedTouches"in v&&(E||x)&&(n.current=k),!k)return!0;var P=n.current||k;return NE(P,y,v,P==="h"?E:x,!0)},[]),l=ve.useCallback(function(v){var y=v;if(!(!ho.length||ho[ho.length-1]!==i)){var m="deltaY"in y?Bp(y):Ia(y),w=t.current.filter(function(k){return k.name===y.type&&k.target===y.target&&DE(k.delta,m)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var E=(a.current.shards||[]).map(Rp).filter(Boolean).filter(function(k){return k.contains(y.target)}),x=E.length>0?s(y,E[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=ve.useCallback(function(v,y,m,w){var E={name:v,delta:y,target:m,should:w};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(x){return x!==E})},1)},[]),f=ve.useCallback(function(v){r.current=Ia(v),n.current=void 0},[]),d=ve.useCallback(function(v){u(v.type,Bp(v),v.target,s(v,e.lockRef.current))},[]),p=ve.useCallback(function(v){u(v.type,Ia(v),v.target,s(v,e.lockRef.current))},[]);ve.useEffect(function(){return ho.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,po),document.addEventListener("touchmove",l,po),document.addEventListener("touchstart",f,po),function(){ho=ho.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,po),document.removeEventListener("touchmove",l,po),document.removeEventListener("touchstart",f,po)}},[]);var h=e.removeScrollBar,g=e.inert;return ve.createElement(ve.Fragment,null,g?ve.createElement(i,{styles:LE(o)}):null,h?ve.createElement(CE,{gapMode:"margin"}):null)}const jE=hE(kp,FE);var Up=ve.forwardRef(function(e,t){return ve.createElement(Oa,Nr({},e,{ref:t,sideCar:jE}))});Up.classNames=Oa.classNames;const Wp=Up;var BE=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},go=new WeakMap,Pa=new WeakMap,ka={},Gl=0,Hp=function(e){return e&&(e.host||Hp(e.parentNode))},RE=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Hp(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},UE=function(e,t,r,n){var o=RE(t,Array.isArray(e)?e:[e]);ka[r]||(ka[r]=new WeakMap);var i=ka[r],a=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))f(p);else{var h=p.getAttribute(n),g=h!==null&&h!=="false",v=(go.get(p)||0)+1,y=(i.get(p)||0)+1;go.set(p,v),i.set(p,y),a.push(p),v===1&&g&&Pa.set(p,!0),y===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}})};return f(t),s.clear(),Gl++,function(){a.forEach(function(d){var p=go.get(d)-1,h=i.get(d)-1;go.set(d,p),i.set(d,h),p||(Pa.has(d)||d.removeAttribute(n),Pa.delete(d)),h||d.removeAttribute(r)}),Gl--,Gl||(go=new WeakMap,go=new WeakMap,Pa=new WeakMap,ka={})}},Vp=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||BE(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),UE(n,o,r,"aria-hidden")):function(){return null}};const zp="Dialog",[Gp,Kp]=pn(zp),[WE,vr]=Gp(zp),HE=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=c.useRef(null),l=c.useRef(null),[u=!1,f]=Sa({prop:n,defaultProp:o,onChange:i});return c.createElement(WE,{scope:t,triggerRef:s,contentRef:l,contentId:hi(),titleId:hi(),descriptionId:hi(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:a},r)},VE="DialogTrigger",qp=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=vr(VE,r),i=Ot(t,o.triggerRef);return c.createElement(dt.button,Oe({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Yl(o.open)},n,{ref:i,onClick:ht(e.onClick,o.onOpenToggle)}))}),Yp="DialogPortal",[zE,Jp]=Gp(Yp,{forceMount:void 0}),Xp=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=vr(Yp,t);return c.createElement(zE,{scope:t,forceMount:r},c.Children.map(n,a=>c.createElement(ar,{present:r||i.open},c.createElement(Op,{asChild:!0,container:o},a))))},Kl="DialogOverlay",Zp=c.forwardRef((e,t)=>{const r=Jp(Kl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=vr(Kl,e.__scopeDialog);return i.modal?c.createElement(ar,{present:n||i.open},c.createElement(GE,Oe({},o,{ref:t}))):null}),GE=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=vr(Kl,r);return c.createElement(Wp,{as:Ll,allowPinchZoom:!0,shards:[o.contentRef]},c.createElement(dt.div,Oe({"data-state":Yl(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),vo="DialogContent",ql=c.forwardRef((e,t)=>{const r=Jp(vo,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=vr(vo,e.__scopeDialog);return c.createElement(ar,{present:n||i.open},i.modal?c.createElement(KE,Oe({},o,{ref:t})):c.createElement(qE,Oe({},o,{ref:t})))}),KE=c.forwardRef((e,t)=>{const r=vr(vo,e.__scopeDialog),n=c.useRef(null),o=Ot(t,r.contentRef,n);return c.useEffect(()=>{const i=n.current;if(i)return Vp(i)},[]),c.createElement(Qp,Oe({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ht(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:ht(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:ht(e.onFocusOutside,i=>i.preventDefault())}))}),qE=c.forwardRef((e,t)=>{const r=vr(vo,e.__scopeDialog),n=c.useRef(!1);return c.createElement(Qp,Oe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}n.current=!1},onInteractOutside:o=>{var i,a;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(n.current=!0);const s=o.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&o.preventDefault()}}))}),Qp=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=vr(vo,r),l=c.useRef(null),u=Ot(t,l);return oE(),c.createElement(c.Fragment,null,c.createElement(Y_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},c.createElement(wp,Oe({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Yl(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),eh="DialogTitle",th=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=vr(eh,r);return c.createElement(dt.h2,Oe({id:o.titleId},n,{ref:t}))}),YE="DialogDescription",rh=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=vr(YE,r);return c.createElement(dt.p,Oe({id:o.descriptionId},n,{ref:t}))}),JE="DialogClose",nh=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=vr(JE,r);return c.createElement(dt.button,Oe({type:"button"},n,{ref:t,onClick:ht(e.onClick,()=>o.onOpenChange(!1))}))});function Yl(e){return e?"open":"closed"}const XE="DialogTitleWarning",[ZE,R9]=a_(XE,{contentName:vo,titleName:eh,docsSlug:"dialog"}),Jl=HE,QE=qp,ex=Xp,tx=Zp,rx=ql,nx=th,ox=rh,oh=nh,ix="AlertDialog",[ax,U9]=pn(ix,[Kp]),Gr=Kp(),sx=e=>{const{__scopeAlertDialog:t,...r}=e,n=Gr(t);return c.createElement(Jl,Oe({},n,r,{modal:!0}))},lx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(QE,Oe({},o,n,{ref:t}))}),cx=e=>{const{__scopeAlertDialog:t,...r}=e,n=Gr(t);return c.createElement(ex,Oe({},n,r))},ux=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(tx,Oe({},o,n,{ref:t}))}),ih="AlertDialogContent",[fx,dx]=ax(ih),px=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,i=Gr(r),a=c.useRef(null),s=Ot(t,a),l=c.useRef(null);return c.createElement(ZE,{contentName:ih,titleName:hx,docsSlug:"alert-dialog"},c.createElement(fx,{scope:r,cancelRef:l},c.createElement(rx,Oe({role:"alertdialog"},i,o,{ref:s,onOpenAutoFocus:ht(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)===null||f===void 0||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault()}),c.createElement(Fl,null,n),!1)))}),hx="AlertDialogTitle",gx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(nx,Oe({},o,n,{ref:t}))}),vx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(ox,Oe({},o,n,{ref:t}))}),mx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Gr(r);return c.createElement(oh,Oe({},o,n,{ref:t}))}),bx="AlertDialogCancel",yx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=dx(bx,r),i=Gr(r),a=Ot(t,o);return c.createElement(oh,Oe({},i,n,{ref:a}))}),wx=sx;function ct(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ah(e){const t=e+"CollectionProvider",[r,n]=kr(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:g,children:v}=h,y=c.useRef(null),m=c.useRef(new Map).current;return c.createElement(o,{scope:g,itemMap:m,collectionRef:y},v)},s=e+"CollectionSlot",l=c.forwardRef((h,g)=>{const{scope:v,children:y}=h,m=i(s,v),w=rr(g,m.collectionRef);return c.createElement($t,{ref:w},y)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",d=c.forwardRef((h,g)=>{const{scope:v,children:y,...m}=h,w=c.useRef(null),E=rr(g,w),x=i(u,v);return c.useEffect(()=>(x.itemMap.set(w,{ref:w,...m}),()=>void x.itemMap.delete(w))),c.createElement($t,{[f]:"",ref:E},y)});function p(h){const g=i(e+"CollectionConsumer",h);return c.useCallback(()=>{const y=g.collectionRef.current;if(!y)return[];const m=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((x,k)=>m.indexOf(x.ref.current)-m.indexOf(k.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,n]}const _x=c.createContext(void 0);function sh(e){const t=c.useContext(_x);return e||t||"ltr"}function Dr(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function Ex(e,t=globalThis==null?void 0:globalThis.document){const r=Dr(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}let Xl=0;function xx(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:lh()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:lh()),Xl++,()=>{Xl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Xl--}},[])}function lh(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const mo=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Sx=ve.useId||(()=>{});let $x=0;function Zl(e){const[t,r]=ve.useState(Sx());return mo(()=>{e||r(n=>n??String($x++))},[e]),e||(t?`radix-${t}`:"")}function bo(e){return e.split("-")[1]}function Ql(e){return e==="y"?"height":"width"}function Kr(e){return e.split("-")[0]}function Nn(e){return["top","bottom"].includes(Kr(e))?"x":"y"}function ch(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=Nn(t),l=Ql(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(Kr(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(bo(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const Cx=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=ch(u,n,l),p=n,h={},g=0;for(let v=0;v<s.length;v++){const{name:y,fn:m}=s[v],{x:w,y:E,data:x,reset:k}=await m({x:f,y:d,initialPlacement:n,placement:p,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});f=w??f,d=E??d,h={...h,[y]:{...h[y],...x}},k&&g<=50&&(g++,typeof k=="object"&&(k.placement&&(p=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):k.rects),{x:f,y:d}=ch(u,p,l)),v=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:h}};function uh(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function Na(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function gi(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,g=uh(h),v=s[p?d==="floating"?"reference":"floating":d],y=Na(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=d==="floating"?{...a.floating,x:n,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(w))&&await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1},x=Na(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:w,strategy:l}):m);return{top:(y.top-x.top+g.top)/E.y,bottom:(x.bottom-y.bottom+g.bottom)/E.y,left:(y.left-x.left+g.left)/E.x,right:(x.right-y.right+g.right)/E.x}}const ec=Math.min,Dn=Math.max;function tc(e,t,r){return Dn(e,ec(t,r))}const fh=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e||{},{x:o,y:i,placement:a,rects:s,platform:l,elements:u}=t;if(r==null)return{};const f=uh(n),d={x:o,y:i},p=Nn(a),h=Ql(p),g=await l.getDimensions(r),v=p==="y",y=v?"top":"left",m=v?"bottom":"right",w=v?"clientHeight":"clientWidth",E=s.reference[h]+s.reference[p]-d[p]-s.floating[h],x=d[p]-s.reference[p],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let I=k?k[w]:0;I&&await(l.isElement==null?void 0:l.isElement(k))||(I=u.floating[w]||s.floating[h]);const S=E/2-x/2,C=f[y],P=I-g[h]-f[m],F=I/2-g[h]/2+S,D=tc(C,F,P),N=bo(a)!=null&&F!=D&&s.reference[h]/2-(F<C?f[y]:f[m])-g[h]/2<0;return{[p]:d[p]-(N?F<C?C-F:P-F:0),data:{[p]:D,centerOffset:F-D}}}}),dh=["top","right","bottom","left"];dh.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const Ax={left:"right",right:"left",bottom:"top",top:"bottom"};function Da(e){return e.replace(/left|right|bottom|top/g,t=>Ax[t])}function Ox(e,t,r){r===void 0&&(r=!1);const n=bo(e),o=Nn(e),i=Ql(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Da(a)),{main:a,cross:Da(a)}}const Tx={start:"end",end:"start"};function rc(e){return e.replace(/start|end/g,t=>Tx[t])}const Ix=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...v}=e,y=Kr(n),m=Kr(a)===a,w=await(s.isRTL==null?void 0:s.isRTL(l.floating)),E=d||(m||!g?[Da(a)]:function(D){const N=Da(D);return[rc(D),N,rc(N)]}(a));d||h==="none"||E.push(...function(D,N,J,K){const Y=bo(D);let te=function(oe,le,ae){const ge=["left","right"],ce=["right","left"],q=["top","bottom"],H=["bottom","top"];switch(oe){case"top":case"bottom":return ae?le?ce:ge:le?ge:ce;case"left":case"right":return le?q:H;default:return[]}}(Kr(D),J==="start",K);return Y&&(te=te.map(oe=>oe+"-"+Y),N&&(te=te.concat(te.map(rc)))),te}(a,g,h,w));const x=[a,...E],k=await gi(t,v),I=[];let S=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&I.push(k[y]),f){const{main:D,cross:N}=Ox(n,i,w);I.push(k[D],k[N])}if(S=[...S,{placement:n,overflows:I}],!I.every(D=>D<=0)){var C,P;const D=(((C=o.flip)==null?void 0:C.index)||0)+1,N=x[D];if(N)return{data:{index:D,overflows:S},reset:{placement:N}};let J=(P=S.filter(K=>K.overflows[0]<=0).sort((K,Y)=>K.overflows[1]-Y.overflows[1])[0])==null?void 0:P.placement;if(!J)switch(p){case"bestFit":{var F;const K=(F=S.map(Y=>[Y.placement,Y.overflows.filter(te=>te>0).reduce((te,oe)=>te+oe,0)]).sort((Y,te)=>Y[1]-te[1])[0])==null?void 0:F[0];K&&(J=K);break}case"initialPlacement":J=a}if(n!==J)return{reset:{placement:J}}}return{}}}};function ph(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hh(e){return dh.some(t=>e[t]>=0)}const Px=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{strategy:r="referenceHidden",...n}=e,{rects:o}=t;switch(r){case"referenceHidden":{const i=ph(await gi(t,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:hh(i)}}}case"escaped":{const i=ph(await gi(t,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:hh(i)}}}default:return{}}}}},kx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=Kr(s),p=bo(s),h=Nn(s)==="x",g=["left","top"].includes(d)?-1:1,v=f&&h?-1:1,y=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*v,y:m*g}:{x:m*g,y:w*v}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function gh(e){return e==="x"?"y":"x"}const Nx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:m,y:w}=y;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await gi(t,l),d=Nn(Kr(o)),p=gh(d);let h=u[d],g=u[p];if(i){const y=d==="y"?"bottom":"right";h=tc(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";g=tc(g+f[p==="y"?"top":"left"],g,g-f[y])}const v=s.fn({...t,[d]:h,[p]:g});return{...v,data:{x:v.x-r,y:v.y-n}}}}},Dx=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=Nn(o),p=gh(d);let h=f[d],g=f[p];const v=typeof s=="function"?s(t):s,y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const E=d==="y"?"height":"width",x=i.reference[d]-i.floating[E]+y.mainAxis,k=i.reference[d]+i.reference[E]-y.mainAxis;h<x?h=x:h>k&&(h=k)}if(u){var m,w;const E=d==="y"?"width":"height",x=["top","left"].includes(Kr(o)),k=i.reference[p]-i.floating[E]+(x&&((m=a.offset)==null?void 0:m[p])||0)+(x?0:y.crossAxis),I=i.reference[p]+i.reference[E]+(x?0:((w=a.offset)==null?void 0:w[p])||0)-(x?y.crossAxis:0);g<k?g=k:g>I&&(g=I)}return{[d]:h,[p]:g}}}},Lx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=e,l=await gi(t,s),u=Kr(r),f=bo(r),d=Nn(r)==="x",{width:p,height:h}=n.floating;let g,v;u==="top"||u==="bottom"?(g=u,v=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(v=u,g=f==="end"?"top":"bottom");const y=h-l[g],m=p-l[v],w=!t.middlewareData.shift;let E=y,x=m;if(d){const I=p-l.left-l.right;x=f||w?ec(m,I):I}else{const I=h-l.top-l.bottom;E=f||w?ec(y,I):I}if(w&&!f){const I=Dn(l.left,0),S=Dn(l.right,0),C=Dn(l.top,0),P=Dn(l.bottom,0);d?x=p-2*(I!==0||S!==0?I+S:Dn(l.left,l.right)):E=h-2*(C!==0||P!==0?C+P:Dn(l.top,l.bottom))}await a({...t,availableWidth:x,availableHeight:E});const k=await o.getDimensions(i.floating);return p!==k.width||h!==k.height?{reset:{rects:!0}}:{}}}};function sr(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mr(e){return sr(e).getComputedStyle(e)}function vh(e){return e instanceof sr(e).Node}function hn(e){return vh(e)?(e.nodeName||"").toLowerCase():""}function br(e){return e instanceof sr(e).HTMLElement}function nr(e){return e instanceof sr(e).Element}function mh(e){return typeof ShadowRoot>"u"?!1:e instanceof sr(e).ShadowRoot||e instanceof ShadowRoot}function vi(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Mx(e){return["table","td","th"].includes(hn(e))}function nc(e){const t=oc(),r=mr(e);return r.transform!=="none"||r.perspective!=="none"||!t&&!!r.backdropFilter&&r.backdropFilter!=="none"||!t&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function oc(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function La(e){return["html","body","#document"].includes(hn(e))}const bh=Math.min,mi=Math.max,Ma=Math.round;function yh(e){const t=mr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=br(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Ma(r)!==i||Ma(n)!==a;return s&&(r=i,n=a),{width:r,height:n,fallback:s}}function wh(e){return nr(e)?e:e.contextElement}const _h={x:1,y:1};function yo(e){const t=wh(e);if(!br(t))return _h;const r=t.getBoundingClientRect(),{width:n,height:o,fallback:i}=yh(t);let a=(i?Ma(r.width):r.width)/n,s=(i?Ma(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Eh={x:0,y:0};function xh(e,t,r){var n,o;if(t===void 0&&(t=!0),!oc())return Eh;const i=e?sr(e):window;return!r||t&&r!==i?Eh:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((o=i.visualViewport)==null?void 0:o.offsetTop)||0}}function Ln(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=wh(e);let a=_h;t&&(n?nr(n)&&(a=yo(n)):a=yo(e));const s=xh(i,r,n);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const p=sr(i),h=n&&nr(n)?sr(n):n;let g=p.frameElement;for(;g&&n&&h!==p;){const v=yo(g),y=g.getBoundingClientRect(),m=getComputedStyle(g);y.x+=(g.clientLeft+parseFloat(m.paddingLeft))*v.x,y.y+=(g.clientTop+parseFloat(m.paddingTop))*v.y,l*=v.x,u*=v.y,f*=v.x,d*=v.y,l+=y.x,u+=y.y,g=sr(g).frameElement}}return Na({width:f,height:d,x:l,y:u})}function gn(e){return((vh(e)?e.ownerDocument:e.document)||window.document).documentElement}function Fa(e){return nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Sh(e){return Ln(gn(e)).left+Fa(e).scrollLeft}function wo(e){if(hn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mh(e)&&e.host||gn(e);return mh(t)?t.host:t}function $h(e){const t=wo(e);return La(t)?t.ownerDocument.body:br(t)&&vi(t)?t:$h(t)}function bi(e,t){var r;t===void 0&&(t=[]);const n=$h(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=sr(n);return o?t.concat(i,i.visualViewport||[],vi(n)?n:[]):t.concat(n,bi(n))}function Ch(e,t,r){let n;if(t==="viewport")n=function(o,i){const a=sr(o),s=gn(o),l=a.visualViewport;let u=s.clientWidth,f=s.clientHeight,d=0,p=0;if(l){u=l.width,f=l.height;const h=oc();(!h||h&&i==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}return{width:u,height:f,x:d,y:p}}(e,r);else if(t==="document")n=function(o){const i=gn(o),a=Fa(o),s=o.ownerDocument.body,l=mi(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=mi(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let f=-a.scrollLeft+Sh(o);const d=-a.scrollTop;return mr(s).direction==="rtl"&&(f+=mi(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:f,y:d}}(gn(e));else if(nr(t))n=function(o,i){const a=Ln(o,!0,i==="fixed"),s=a.top+o.clientTop,l=a.left+o.clientLeft,u=br(o)?yo(o):{x:1,y:1};return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:l*u.x,y:s*u.y}}(t,r);else{const o=xh(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Na(n)}function Ah(e,t){const r=wo(e);return!(r===t||!nr(r)||La(r))&&(mr(r).position==="fixed"||Ah(r,t))}function Oh(e,t){return br(e)&&mr(e).position!=="fixed"?t?t(e):e.offsetParent:null}function Th(e,t){const r=sr(e);if(!br(e))return r;let n=Oh(e,t);for(;n&&Mx(n)&&mr(n).position==="static";)n=Oh(n,t);return n&&(hn(n)==="html"||hn(n)==="body"&&mr(n).position==="static"&&!nc(n))?r:n||function(o){let i=wo(o);for(;br(i)&&!La(i);){if(nc(i))return i;i=wo(i)}return null}(e)||r}function Fx(e,t,r){const n=br(t),o=gn(t),i=r==="fixed",a=Ln(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((hn(t)!=="body"||vi(o))&&(s=Fa(t)),br(t)){const u=Ln(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&(l.x=Sh(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const jx={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=r==="clippingAncestors"?function(u,f){const d=f.get(u);if(d)return d;let p=bi(u).filter(y=>nr(y)&&hn(y)!=="body"),h=null;const g=mr(u).position==="fixed";let v=g?wo(u):u;for(;nr(v)&&!La(v);){const y=mr(v),m=nc(v);m||y.position!=="fixed"||(h=null),(g?!m&&!h:!m&&y.position==="static"&&h&&["absolute","fixed"].includes(h.position)||vi(v)&&!m&&Ah(u,v))?p=p.filter(w=>w!==v):h=y,v=wo(v)}return f.set(u,p),p}(t,this._c):[].concat(r),a=[...i,n],s=a[0],l=a.reduce((u,f)=>{const d=Ch(t,f,o);return u.top=mi(d.top,u.top),u.right=bh(d.right,u.right),u.bottom=bh(d.bottom,u.bottom),u.left=mi(d.left,u.left),u},Ch(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=br(r),i=gn(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((o||!o&&n!=="fixed")&&((hn(r)!=="body"||vi(i))&&(a=Fa(r)),br(r))){const u=Ln(r);s=yo(r),l.x=u.x+r.clientLeft,l.y=u.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:nr,getDimensions:function(e){return yh(e)},getOffsetParent:Th,getDocumentElement:gn,getScale:yo,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||Th,i=this.getDimensions;return{reference:Fx(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>mr(e).direction==="rtl"};function Bx(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o||i?[...nr(e)?bi(e):e.contextElement?bi(e.contextElement):[],...bi(t)]:[];l.forEach(p=>{const h=!nr(p)&&p.toString().includes("V");!o||s&&!h||p.addEventListener("scroll",r,{passive:!0}),i&&p.addEventListener("resize",r)});let u,f=null;a&&(f=new ResizeObserver(()=>{r()}),nr(e)&&!s&&f.observe(e),nr(e)||!e.contextElement||s||f.observe(e.contextElement),f.observe(t));let d=s?Ln(e):null;return s&&function p(){const h=Ln(e);!d||h.x===d.x&&h.y===d.y&&h.width===d.width&&h.height===d.height||r(),d=h,u=requestAnimationFrame(p)}(),r(),()=>{var p;l.forEach(h=>{o&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(p=f)==null||p.disconnect(),f=null,s&&cancelAnimationFrame(u)}}const Rx=(e,t,r)=>{const n=new Map,o={platform:jx,...r},i={...o.platform,_c:n};return Cx(e,t,{...o,platform:i})},Ux=e=>{const{element:t,padding:r}=e;function n(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return t&&n(t)?t.current!=null?fh({element:t.current,padding:r}).fn(o):{}:t?fh({element:t,padding:r}).fn(o):{}}}};var ja=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Ba(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Ba(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Ba(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Ih(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ph(e,t){const r=Ih(e);return Math.round(t*r)/r}function kh(e){const t=ve.useRef(e);return ja(()=>{t.current=e}),t}function Wx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=ve.useState(n);Ba(p,n)||h(n);const[g,v]=ve.useState(null),[y,m]=ve.useState(null),w=ve.useCallback(te=>{te!=I.current&&(I.current=te,v(te))},[v]),E=ve.useCallback(te=>{te!==S.current&&(S.current=te,m(te))},[m]),x=i||g,k=a||y,I=ve.useRef(null),S=ve.useRef(null),C=ve.useRef(f),P=kh(l),F=kh(o),D=ve.useCallback(()=>{if(!I.current||!S.current)return;const te={placement:t,strategy:r,middleware:p};F.current&&(te.platform=F.current),Rx(I.current,S.current,te).then(oe=>{const le={...oe,isPositioned:!0};N.current&&!Ba(C.current,le)&&(C.current=le,Td.flushSync(()=>{d(le)}))})},[p,t,r,F]);ja(()=>{u===!1&&C.current.isPositioned&&(C.current.isPositioned=!1,d(te=>({...te,isPositioned:!1})))},[u]);const N=ve.useRef(!1);ja(()=>(N.current=!0,()=>{N.current=!1}),[]),ja(()=>{if(x&&(I.current=x),k&&(S.current=k),x&&k){if(P.current)return P.current(x,k,D);D()}},[x,k,D,P]);const J=ve.useMemo(()=>({reference:I,floating:S,setReference:w,setFloating:E}),[w,E]),K=ve.useMemo(()=>({reference:x,floating:k}),[x,k]),Y=ve.useMemo(()=>{const te={position:r,left:0,top:0};if(!K.floating)return te;const oe=Ph(K.floating,f.x),le=Ph(K.floating,f.y);return s?{...te,transform:"translate("+oe+"px, "+le+"px)",...Ih(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:oe,top:le}},[r,s,K.floating,f.x,f.y]);return ve.useMemo(()=>({...f,update:D,refs:J,elements:K,floatingStyles:Y}),[f,D,J,K,Y])}const Hx=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(Ge.svg,Ke({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))});function Nh(e){const[t,r]=c.useState(void 0);return mo(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function Vx(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ra=e=>{const{present:t,children:r}=e,n=zx(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=rr(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};Ra.displayName="Presence";function zx(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Vx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Ua(n.current);i.current=s==="mounted"?u:"none"},[s]),mo(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=Ua(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),mo(()=>{if(t){const u=d=>{const h=Ua(n.current).includes(d.animationName);d.target===t&&h&&an.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Ua(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Ua(e){return(e==null?void 0:e.animationName)||"none"}function qr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Gx({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=Dr(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function Gx({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=Dr(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const ic="rovingFocusGroup.onEntryFocus",Kx={bubbles:!1,cancelable:!0},ac="RovingFocusGroup",[sc,Dh,qx]=ah(ac),[Yx,Lh]=kr(ac,[qx]),[Jx,Xx]=Yx(ac),Zx=c.forwardRef((e,t)=>c.createElement(sc.Provider,{scope:e.__scopeRovingFocusGroup},c.createElement(sc.Slot,{scope:e.__scopeRovingFocusGroup},c.createElement(Qx,Ke({},e,{ref:t}))))),Qx=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...f}=e,d=c.useRef(null),p=rr(t,d),h=sh(i),[g=null,v]=qr({prop:a,defaultProp:s,onChange:l}),[y,m]=c.useState(!1),w=Dr(u),E=Dh(r),x=c.useRef(!1),[k,I]=c.useState(0);return c.useEffect(()=>{const S=d.current;if(S)return S.addEventListener(ic,w),()=>S.removeEventListener(ic,w)},[w]),c.createElement(Jx,{scope:r,orientation:n,dir:h,loop:o,currentTabStopId:g,onItemFocus:c.useCallback(S=>v(S),[v]),onItemShiftTab:c.useCallback(()=>m(!0),[]),onFocusableItemAdd:c.useCallback(()=>I(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>I(S=>S-1),[])},c.createElement(Ge.div,Ke({tabIndex:y||k===0?-1:0,"data-orientation":n},f,{ref:p,style:{outline:"none",...e.style},onMouseDown:ct(e.onMouseDown,()=>{x.current=!0}),onFocus:ct(e.onFocus,S=>{const C=!x.current;if(S.target===S.currentTarget&&C&&!y){const P=new CustomEvent(ic,Kx);if(S.currentTarget.dispatchEvent(P),!P.defaultPrevented){const F=E().filter(Y=>Y.focusable),D=F.find(Y=>Y.active),N=F.find(Y=>Y.id===g),K=[D,N,...F].filter(Boolean).map(Y=>Y.ref.current);Mh(K)}}x.current=!1}),onBlur:ct(e.onBlur,()=>m(!1))})))}),e2="RovingFocusGroupItem",t2=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:i,...a}=e,s=Zl(),l=i||s,u=Xx(e2,r),f=u.currentTabStopId===l,d=Dh(r),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return c.useEffect(()=>{if(n)return p(),()=>h()},[n,p,h]),c.createElement(sc.ItemSlot,{scope:r,id:l,focusable:n,active:o},c.createElement(Ge.span,Ke({tabIndex:f?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:ct(e.onMouseDown,g=>{n?u.onItemFocus(l):g.preventDefault()}),onFocus:ct(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ct(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){u.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=o2(g,u.orientation,u.dir);if(v!==void 0){g.preventDefault();let m=d().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")m.reverse();else if(v==="prev"||v==="next"){v==="prev"&&m.reverse();const w=m.indexOf(g.currentTarget);m=u.loop?i2(m,w+1):m.slice(w+1)}setTimeout(()=>Mh(m))}})})))}),r2={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function n2(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function o2(e,t,r){const n=n2(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return r2[n]}function Mh(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function i2(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const a2=Zx,s2=t2,lc="dismissableLayer.update",l2="dismissableLayer.pointerDownOutside",c2="dismissableLayer.focusOutside";let Fh;const u2=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),f2=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(u2),[d,p]=c.useState(null),h=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=c.useState({}),v=rr(t,C=>p(C)),y=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(m),E=d?y.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,k=E>=w,I=d2(C=>{const P=C.target,F=[...f.branches].some(D=>D.contains(P));!k||F||(i==null||i(C),s==null||s(C),C.defaultPrevented||l==null||l())},h),S=p2(C=>{const P=C.target;[...f.branches].some(D=>D.contains(P))||(a==null||a(C),s==null||s(C),C.defaultPrevented||l==null||l())},h);return Ex(C=>{E===f.layers.size-1&&(o==null||o(C),!C.defaultPrevented&&l&&(C.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Fh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),jh(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Fh)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),jh())},[d,f]),c.useEffect(()=>{const C=()=>g({});return document.addEventListener(lc,C),()=>document.removeEventListener(lc,C)},[]),c.createElement(Ge.div,Ke({},u,{ref:v,style:{pointerEvents:x?k?"auto":"none":void 0,...e.style},onFocusCapture:ct(e.onFocusCapture,S.onFocusCapture),onBlurCapture:ct(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:ct(e.onPointerDownCapture,I.onPointerDownCapture)}))});function d2(e,t=globalThis==null?void 0:globalThis.document){const r=Dr(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Bh(l2,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function p2(e,t=globalThis==null?void 0:globalThis.document){const r=Dr(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&Bh(c2,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function jh(){const e=new CustomEvent(lc);document.dispatchEvent(e)}function Bh(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Hd(o,i):o.dispatchEvent(i)}const cc="focusScope.autoFocusOnMount",uc="focusScope.autoFocusOnUnmount",Rh={bubbles:!1,cancelable:!0},h2=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=Dr(o),f=Dr(i),d=c.useRef(null),p=rr(t,v=>l(v)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(E){if(h.paused||!s)return;const x=E.target;s.contains(x)?d.current=x:vn(d.current,{select:!0})},y=function(E){if(h.paused||!s)return;const x=E.relatedTarget;x!==null&&(s.contains(x)||vn(d.current,{select:!0}))},m=function(E){const x=document.activeElement;for(const k of E)k.removedNodes.length>0&&(s!=null&&s.contains(x)||vn(s))};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(m);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[n,s,h.paused]),c.useEffect(()=>{if(s){Hh.add(h);const v=document.activeElement;if(!s.contains(v)){const m=new CustomEvent(cc,Rh);s.addEventListener(cc,u),s.dispatchEvent(m),m.defaultPrevented||(g2(w2(Uh(s)),{select:!0}),document.activeElement===v&&vn(s))}return()=>{s.removeEventListener(cc,u),setTimeout(()=>{const m=new CustomEvent(uc,Rh);s.addEventListener(uc,f),s.dispatchEvent(m),m.defaultPrevented||vn(v??document.body,{select:!0}),s.removeEventListener(uc,f),Hh.remove(h)},0)}}},[s,u,f,h]);const g=c.useCallback(v=>{if(!r&&!n||h.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(y&&m){const w=v.currentTarget,[E,x]=v2(w);E&&x?!v.shiftKey&&m===x?(v.preventDefault(),r&&vn(E,{select:!0})):v.shiftKey&&m===E&&(v.preventDefault(),r&&vn(x,{select:!0})):m===w&&v.preventDefault()}},[r,n,h.paused]);return c.createElement(Ge.div,Ke({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function g2(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(vn(n,{select:t}),document.activeElement!==r)return}function v2(e){const t=Uh(e),r=Wh(t,e),n=Wh(t.reverse(),e);return[r,n]}function Uh(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Wh(e,t){for(const r of e)if(!m2(r,{upTo:t}))return r}function m2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function b2(e){return e instanceof HTMLInputElement&&"select"in e}function vn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&b2(e)&&t&&e.select()}}const Hh=y2();function y2(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Vh(e,t),e.unshift(t)},remove(t){var r;e=Vh(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Vh(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function w2(e){return e.filter(t=>t.tagName!=="A")}const zh="Popper",[Gh,Kh]=kr(zh),[_2,qh]=Gh(zh),E2=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(_2,{scope:t,anchor:n,onAnchorChange:o},r)},x2="PopperAnchor",S2=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=qh(x2,r),a=c.useRef(null),s=rr(t,a);return c.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:c.createElement(Ge.div,Oe({},o,{ref:s}))}),Yh="PopperContent",[$2,C2]=Gh(Yh),A2=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:g=0,arrowPadding:v=0,collisionBoundary:y=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:k,...I}=e,S=qh(Yh,f),[C,P]=c.useState(null),F=rr(t,ne=>P(ne)),[D,N]=c.useState(null),J=Nh(D),K=(r=J==null?void 0:J.width)!==null&&r!==void 0?r:0,Y=(n=J==null?void 0:J.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(y)?y:[y],ae=le.length>0,ge={padding:oe,boundary:le.filter(P2),altBoundary:ae},{refs:ce,floatingStyles:q,placement:H,isPositioned:re,middlewareData:de}=Wx({strategy:"fixed",placement:te,whileElementsMounted:Bx,elements:{reference:S.anchor},middleware:[kx({mainAxis:p+Y,alignmentAxis:g}),x&&Nx({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?Dx():void 0,...ge}),x&&Ix({...ge}),Lx({...ge,apply:({elements:ne,rects:pe,availableWidth:me,availableHeight:Ee})=>{const{width:_e,height:ie}=pe.reference,Ne=ne.floating.style;Ne.setProperty("--radix-popper-available-width",`${me}px`),Ne.setProperty("--radix-popper-available-height",`${Ee}px`),Ne.setProperty("--radix-popper-anchor-width",`${_e}px`),Ne.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),D&&Ux({element:D,padding:v}),k2({arrowWidth:K,arrowHeight:Y}),E&&Px({strategy:"referenceHidden"})]}),[U,z]=Jh(H),M=Dr(k);mo(()=>{re&&(M==null||M())},[re,M]);const R=(o=de.arrow)===null||o===void 0?void 0:o.x,G=(i=de.arrow)===null||i===void 0?void 0:i.y,O=((a=de.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[T,Z]=c.useState();return mo(()=>{C&&Z(window.getComputedStyle(C).zIndex)},[C]),c.createElement("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:re?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T,"--radix-popper-transform-origin":[(s=de.transformOrigin)===null||s===void 0?void 0:s.x,(l=de.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement($2,{scope:f,placedSide:U,onArrowChange:N,arrowX:R,arrowY:G,shouldHideArrow:O},c.createElement(Ge.div,Oe({"data-side":U,"data-align":z},I,{ref:F,style:{...I.style,animation:re?void 0:"none",opacity:(u=de.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),O2="PopperArrow",T2={top:"bottom",right:"left",bottom:"top",left:"right"},I2=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=C2(O2,n),a=T2[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(Hx,Oe({},o,{ref:r,style:{...o.style,display:"block"}})))});function P2(e){return e!==null}const k2=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,v]=Jh(s),y={start:"0%",center:"50%",end:"100%"}[v],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return g==="bottom"?(E=d?y:`${m}px`,x=`${-h}px`):g==="top"?(E=d?y:`${m}px`,x=`${l.floating.height+h}px`):g==="right"?(E=`${-h}px`,x=d?y:`${w}px`):g==="left"&&(E=`${l.floating.width+h}px`,x=d?y:`${w}px`),{data:{x:E,y:x}}}});function Jh(e){const[t,r="center"]=e.split("-");return[t,r]}const N2=E2,D2=S2,L2=A2,M2=I2,F2=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?an.createPortal(c.createElement(Ge.div,Ke({},o,{ref:t})),n):null}),j2=["Enter"," "],B2=["ArrowDown","PageUp","Home"],Xh=["ArrowUp","PageDown","End"],R2=[...B2,...Xh],Wa="Menu",[fc,U2,W2]=ah(Wa),[Mn,Zh]=kr(Wa,[W2,Kh,Lh]),Ha=Kh(),Qh=Lh(),[H2,yi]=Mn(Wa),[V2,dc]=Mn(Wa),z2=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:i,modal:a=!0}=e,s=Ha(t),[l,u]=c.useState(null),f=c.useRef(!1),d=Dr(i),p=sh(o);return c.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),c.createElement(N2,s,c.createElement(H2,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u},c.createElement(V2,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:a},n)))},G2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ha(r);return c.createElement(D2,Ke({},o,n,{ref:t}))}),eg="MenuPortal",[K2,q2]=Mn(eg,{forceMount:void 0}),Y2=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,i=yi(eg,t);return c.createElement(K2,{scope:t,forceMount:r},c.createElement(Ra,{present:r||i.open},c.createElement(F2,{asChild:!0,container:o},n)))},mn="MenuContent",[J2,tg]=Mn(mn),X2=c.forwardRef((e,t)=>{const r=q2(mn,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=yi(mn,e.__scopeMenu),a=dc(mn,e.__scopeMenu);return c.createElement(fc.Provider,{scope:e.__scopeMenu},c.createElement(Ra,{present:n||i.open},c.createElement(fc.Slot,{scope:e.__scopeMenu},a.modal?c.createElement(Z2,Ke({},o,{ref:t})):c.createElement(Q2,Ke({},o,{ref:t})))))}),Z2=c.forwardRef((e,t)=>{const r=yi(mn,e.__scopeMenu),n=c.useRef(null),o=rr(t,n);return c.useEffect(()=>{const i=n.current;if(i)return Vp(i)},[]),c.createElement(rg,Ke({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ct(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))}),Q2=c.forwardRef((e,t)=>{const r=yi(mn,e.__scopeMenu);return c.createElement(rg,Ke({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))}),rg=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:g,...v}=e,y=yi(mn,r),m=dc(mn,r),w=Ha(r),E=Qh(r),x=U2(r),[k,I]=c.useState(null),S=c.useRef(null),C=rr(t,S,y.onContentChange),P=c.useRef(0),F=c.useRef(""),D=c.useRef(0),N=c.useRef(null),J=c.useRef("right"),K=c.useRef(0),Y=g?Wp:c.Fragment,te=g?{as:$t,allowPinchZoom:!0}:void 0,oe=ae=>{var ge,ce;const q=F.current+ae,H=x().filter(R=>!R.disabled),re=document.activeElement,de=(ge=H.find(R=>R.ref.current===re))===null||ge===void 0?void 0:ge.textValue,U=H.map(R=>R.textValue),z=dS(U,q,de),M=(ce=H.find(R=>R.textValue===z))===null||ce===void 0?void 0:ce.ref.current;(function R(G){F.current=G,window.clearTimeout(P.current),G!==""&&(P.current=window.setTimeout(()=>R(""),1e3))})(q),M&&setTimeout(()=>M.focus())};c.useEffect(()=>()=>window.clearTimeout(P.current),[]),xx();const le=c.useCallback(ae=>{var ge,ce;return J.current===((ge=N.current)===null||ge===void 0?void 0:ge.side)&&hS(ae,(ce=N.current)===null||ce===void 0?void 0:ce.area)},[]);return c.createElement(J2,{scope:r,searchRef:F,onItemEnter:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),onItemLeave:c.useCallback(ae=>{var ge;le(ae)||((ge=S.current)===null||ge===void 0||ge.focus(),I(null))},[le]),onTriggerLeave:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),pointerGraceTimerRef:D,onPointerGraceIntentChange:c.useCallback(ae=>{N.current=ae},[])},c.createElement(Y,te,c.createElement(h2,{asChild:!0,trapped:o,onMountAutoFocus:ct(i,ae=>{var ge;ae.preventDefault(),(ge=S.current)===null||ge===void 0||ge.focus()}),onUnmountAutoFocus:a},c.createElement(f2,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h},c.createElement(a2,Ke({asChild:!0},E,{dir:m.dir,orientation:"vertical",loop:n,currentTabStopId:k,onCurrentTabStopIdChange:I,onEntryFocus:ct(l,ae=>{m.isUsingKeyboardRef.current||ae.preventDefault()})}),c.createElement(L2,Ke({role:"menu","aria-orientation":"vertical","data-state":cS(y.open),"data-radix-menu-content":"",dir:m.dir},w,v,{ref:C,style:{outline:"none",...v.style},onKeyDown:ct(v.onKeyDown,ae=>{const ce=ae.target.closest("[data-radix-menu-content]")===ae.currentTarget,q=ae.ctrlKey||ae.altKey||ae.metaKey,H=ae.key.length===1;ce&&(ae.key==="Tab"&&ae.preventDefault(),!q&&H&&oe(ae.key));const re=S.current;if(ae.target!==re||!R2.includes(ae.key))return;ae.preventDefault();const U=x().filter(z=>!z.disabled).map(z=>z.ref.current);Xh.includes(ae.key)&&U.reverse(),uS(U)}),onBlur:ct(e.onBlur,ae=>{ae.currentTarget.contains(ae.target)||(window.clearTimeout(P.current),F.current="")}),onPointerMove:ct(e.onPointerMove,hc(ae=>{const ge=ae.target,ce=K.current!==ae.clientX;if(ae.currentTarget.contains(ge)&&ce){const q=ae.clientX>K.current?"right":"left";J.current=q,K.current=ae.clientX}}))})))))))}),eS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,Ke({role:"group"},n,{ref:t}))}),tS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,Ke({},n,{ref:t}))}),pc="MenuItem",ng="menu.itemSelect",og=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,i=c.useRef(null),a=dc(pc,e.__scopeMenu),s=tg(pc,e.__scopeMenu),l=rr(t,i),u=c.useRef(!1),f=()=>{const d=i.current;if(!r&&d){const p=new CustomEvent(ng,{bubbles:!0,cancelable:!0});d.addEventListener(ng,h=>n==null?void 0:n(h),{once:!0}),Hd(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return c.createElement(rS,Ke({},o,{ref:l,disabled:r,onClick:ct(e.onClick,f),onPointerDown:d=>{var p;(p=e.onPointerDown)===null||p===void 0||p.call(e,d),u.current=!0},onPointerUp:ct(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)===null||p===void 0||p.click()}),onKeyDown:ct(e.onKeyDown,d=>{const p=s.searchRef.current!=="";r||p&&d.key===" "||j2.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),rS=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...i}=e,a=tg(pc,r),s=Qh(r),l=c.useRef(null),u=rr(t,l),[f,d]=c.useState(!1),[p,h]=c.useState("");return c.useEffect(()=>{const g=l.current;if(g){var v;h(((v=g.textContent)!==null&&v!==void 0?v:"").trim())}},[i.children]),c.createElement(fc.ItemSlot,{scope:r,disabled:n,textValue:o??p},c.createElement(s2,Ke({asChild:!0},s,{focusable:!n}),c.createElement(Ge.div,Ke({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:u,onPointerMove:ct(e.onPointerMove,hc(g=>{n?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus())})),onPointerLeave:ct(e.onPointerLeave,hc(g=>a.onItemLeave(g))),onFocus:ct(e.onFocus,()=>d(!0)),onBlur:ct(e.onBlur,()=>d(!1))}))))}),nS=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return c.createElement(oS,{scope:e.__scopeMenu,checked:r},c.createElement(og,Ke({role:"menuitemcheckbox","aria-checked":Va(r)?"mixed":r},o,{ref:t,"data-state":ag(r),onSelect:ct(o.onSelect,()=>n==null?void 0:n(Va(r)?!0:!r),{checkForDefaultPrevented:!1})})))});Mn("MenuRadioGroup",{value:void 0,onValueChange:()=>{}});const ig="MenuItemIndicator",[oS,iS]=Mn(ig,{checked:!1}),aS=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,i=iS(ig,r);return c.createElement(Ra,{present:n||Va(i.checked)||i.checked===!0},c.createElement(Ge.span,Ke({},o,{ref:t,"data-state":ag(i.checked)})))}),sS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ge.div,Ke({role:"separator","aria-orientation":"horizontal"},n,{ref:t}))}),lS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ha(r);return c.createElement(M2,Ke({},o,n,{ref:t}))});Mn("MenuSub");function cS(e){return e?"open":"closed"}function Va(e){return e==="indeterminate"}function ag(e){return Va(e)?"indeterminate":e?"checked":"unchecked"}function uS(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function fS(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function dS(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=fS(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==r));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function pS(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function hS(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return pS(r,t)}function hc(e){return t=>t.pointerType==="mouse"?e(t):void 0}const gS=z2,vS=G2,mS=Y2,bS=X2,yS=eS,wS=tS,_S=og,ES=nS,xS=aS,SS=sS,$S=lS,sg="DropdownMenu",[CS,z9]=kr(sg,[Zh]),yr=Zh(),[AS,lg]=CS(sg),OS=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=yr(t),u=c.useRef(null),[f=!1,d]=qr({prop:o,defaultProp:i,onChange:a});return c.createElement(AS,{scope:t,triggerId:Zl(),triggerRef:u,contentId:Zl(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:s},c.createElement(gS,Oe({},l,{open:f,onOpenChange:d,dir:n,modal:s}),r))},TS="DropdownMenuTrigger",IS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,i=lg(TS,r),a=yr(r);return c.createElement(vS,Oe({asChild:!0},a),c.createElement(Ge.button,Oe({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":n?"":void 0,disabled:n},o,{ref:Il(t,i.triggerRef),onPointerDown:ct(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:ct(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})))}),PS=e=>{const{__scopeDropdownMenu:t,...r}=e,n=yr(t);return c.createElement(mS,Oe({},n,r))},kS="DropdownMenuContent",NS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=lg(kS,r),i=yr(r),a=c.useRef(!1);return c.createElement(bS,Oe({id:o.contentId,"aria-labelledby":o.triggerId},i,n,{ref:t,onCloseAutoFocus:ct(e.onCloseAutoFocus,s=>{var l;a.current||(l=o.triggerRef.current)===null||l===void 0||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:ct(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(a.current=!0)}),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)"}}))}),DS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.createElement(yS,Oe({},o,n,{ref:t}))}),LS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.createElement(wS,Oe({},o,n,{ref:t}))}),MS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.createElement(_S,Oe({},o,n,{ref:t}))}),FS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.createElement(ES,Oe({},o,n,{ref:t}))}),jS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.createElement(xS,Oe({},o,n,{ref:t}))}),BS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.createElement(SS,Oe({},o,n,{ref:t}))}),RS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=yr(r);return c.createElement($S,Oe({},o,n,{ref:t}))}),US=IS,WS=PS,HS=NS,VS=DS,zS=LS,GS=MS,KS=FS,qS=jS,YS=BS,JS=RS;function XS(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function cg(e){const[t,r]=c.useState(void 0);return Pr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}const ug="Checkbox",[ZS,G9]=pn(ug),[QS,e$]=ZS(ug),t$=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=Ot(t,E=>p(E)),g=c.useRef(!1),v=d?!!d.closest("form"):!0,[y=!1,m]=Sa({prop:o,defaultProp:i,onChange:u}),w=c.useRef(y);return c.useEffect(()=>{const E=d==null?void 0:d.form;if(E){const x=()=>m(w.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[d,m]),c.createElement(QS,{scope:r,state:y,disabled:s},c.createElement(dt.button,it({type:"button",role:"checkbox","aria-checked":Fn(y)?"mixed":y,"aria-required":a,"data-state":fg(y),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onKeyDown:ht(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:ht(e.onClick,E=>{m(x=>Fn(x)?!0:!x),v&&(g.current=E.isPropagationStopped(),g.current||E.stopPropagation())})})),v&&c.createElement(o$,{control:d,bubbles:!g.current,name:n,value:l,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),r$="CheckboxIndicator",n$=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,i=e$(r$,r);return c.createElement(ar,{present:n||Fn(i.state)||i.state===!0},c.createElement(dt.span,it({"data-state":fg(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),o$=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=XS(r),s=cg(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});l.indeterminate=Fn(r),d.call(l,Fn(r)?!1:r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",it({type:"checkbox","aria-hidden":!0,defaultChecked:Fn(r)?!1:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Fn(e){return e==="indeterminate"}function fg(e){return Fn(e)?"indeterminate":e?"checked":"unchecked"}const i$=t$,a$=n$;function s$(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const dg="Switch",[l$,K9]=kr(dg),[c$,u$]=l$(dg),f$=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=rr(t,w=>p(w)),g=c.useRef(!1),v=d?!!d.closest("form"):!0,[y=!1,m]=qr({prop:o,defaultProp:i,onChange:u});return c.createElement(c$,{scope:r,checked:y,disabled:s},c.createElement(Ge.button,Oe({type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":pg(y),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onClick:ct(e.onClick,w=>{m(E=>!E),v&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})})),v&&c.createElement(h$,{control:d,bubbles:!g.current,name:n,value:l,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),d$="SwitchThumb",p$=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=u$(d$,r);return c.createElement(Ge.span,Oe({"data-state":pg(o.checked),"data-disabled":o.disabled?"":void 0},n,{ref:t}))}),h$=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=s$(r),s=Nh(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",Oe({type:"checkbox","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function pg(e){return e?"checked":"unchecked"}const g$=f$,v$=p$;/*! *****************************************************************************
44
44
  Copyright (c) Microsoft Corporation.
45
45
 
46
46
  Permission to use, copy, modify, and/or distribute this software for any
@@ -53,7 +53,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
53
53
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
54
54
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
55
55
  PERFORMANCE OF THIS SOFTWARE.
56
- ***************************************************************************** */function pg(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var g$=function(e){var t,r=e.current,n=e.previous,o=e.value;if(r[0]!==r[1]||typeof r[0]!="number"||typeof r[1]!="number")return null;var i=r[0],a=r[1];return i>0&&n[0]===i&&n[1]===i+1?[i-1,a]:!((t=o[i])===null||t===void 0)&&t.length?[i,a+1]:null},hc=function(e){return[+e.selectionStart,+e.selectionEnd]},hg=[0,0],Va=function(e,t){return e[0]===t[0]&&e[1]===t[1]},v$=function(e){var t=e.inputRef,r=e.previousRef,n=e.setSelection;return c.useCallback(function(o){var i=o.type,a=t.current,s=r.current;if(!(!s||!a)){var l=a.selectionDirection,u=a.value,f=hc(a),d=function(p){Va(p,s)&&(Va(p,hg)||Va(p,hc(a)))||(r.current=p,n(function(h){return Va(h,p)?h:p}),a.setSelectionRange.apply(a,pg(pg([],p,!1),[l||void 0],!1)))};if(i==="selectionchange"&&document.activeElement!==a)return d([u.length,u.length]);d(g$({previous:s,current:f,direction:l,value:u})||f)}},[t,r,n])},m$=function(e){var t=e.inputRef,r=e.previousRef,n=e.handler;c.useLayoutEffect(function(){var o=t.current;r.current===void 0&&o&&(r.current=hc(o));var i=n;return o==null||o.addEventListener("input",i),document.addEventListener("selectionchange",i),function(){o==null||o.removeEventListener("input",i),document.removeEventListener("selectionchange",i)}},[t,n,r])},b$=function(e){var t=c.useState(hg),r=t[0],n=t[1],o=c.useRef(),i=v$({inputRef:e,previousRef:o,setSelection:n});return m$({inputRef:e,previousRef:o,handler:i}),r},gc={exports:{}},yi={};/**
56
+ ***************************************************************************** */function hg(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var m$=function(e){var t,r=e.current,n=e.previous,o=e.value;if(r[0]!==r[1]||typeof r[0]!="number"||typeof r[1]!="number")return null;var i=r[0],a=r[1];return i>0&&n[0]===i&&n[1]===i+1?[i-1,a]:!((t=o[i])===null||t===void 0)&&t.length?[i,a+1]:null},gc=function(e){return[+e.selectionStart,+e.selectionEnd]},gg=[0,0],za=function(e,t){return e[0]===t[0]&&e[1]===t[1]},b$=function(e){var t=e.inputRef,r=e.previousRef,n=e.setSelection;return c.useCallback(function(o){var i=o.type,a=t.current,s=r.current;if(!(!s||!a)){var l=a.selectionDirection,u=a.value,f=gc(a),d=function(p){za(p,s)&&(za(p,gg)||za(p,gc(a)))||(r.current=p,n(function(h){return za(h,p)?h:p}),a.setSelectionRange.apply(a,hg(hg([],p,!1),[l||void 0],!1)))};if(i==="selectionchange"&&document.activeElement!==a)return d([u.length,u.length]);d(m$({previous:s,current:f,direction:l,value:u})||f)}},[t,r,n])},y$=function(e){var t=e.inputRef,r=e.previousRef,n=e.handler;c.useLayoutEffect(function(){var o=t.current;r.current===void 0&&o&&(r.current=gc(o));var i=n;return o==null||o.addEventListener("input",i),document.addEventListener("selectionchange",i),function(){o==null||o.removeEventListener("input",i),document.removeEventListener("selectionchange",i)}},[t,n,r])},w$=function(e){var t=c.useState(gg),r=t[0],n=t[1],o=c.useRef(),i=b$({inputRef:e,previousRef:o,setSelection:n});return y$({inputRef:e,previousRef:o,handler:i}),r},vc={exports:{}},wi={};/**
57
57
  * @license React
58
58
  * react-jsx-runtime.development.js
59
59
  *
@@ -61,17 +61,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
61
61
  *
62
62
  * This source code is licensed under the MIT license found in the
63
63
  * LICENSE file in the root directory of this source tree.
64
- */var gg;function y$(){return gg||(gg=1,process.env.NODE_ENV!=="production"&&function(){var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function y(V){if(V===null||typeof V!="object")return null;var fe=g&&V[g]||V[v];return typeof fe=="function"?fe:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(V){{for(var fe=arguments.length,_e=new Array(fe>1?fe-1:0),Oe=1;Oe<fe;Oe++)_e[Oe-1]=arguments[Oe];E("error",V,_e)}}function E(V,fe,_e){{var Oe=m.ReactDebugCurrentFrame,qe=Oe.getStackAddendum();qe!==""&&(fe+="%s",_e=_e.concat([qe]));var Fe=_e.map(function(Be){return String(Be)});Fe.unshift("Warning: "+fe),Function.prototype.apply.call(console[V],console,Fe)}}var x=!1,k=!1,I=!1,S=!1,C=!1,P;P=Symbol.for("react.module.reference");function F(V){return!!(typeof V=="string"||typeof V=="function"||V===n||V===i||C||V===o||V===u||V===f||S||V===h||x||k||I||typeof V=="object"&&V!==null&&(V.$$typeof===p||V.$$typeof===d||V.$$typeof===a||V.$$typeof===s||V.$$typeof===l||V.$$typeof===P||V.getModuleId!==void 0))}function D(V,fe,_e){var Oe=V.displayName;if(Oe)return Oe;var qe=fe.displayName||fe.name||"";return qe!==""?_e+"("+qe+")":_e}function N(V){return V.displayName||"Context"}function J(V){if(V==null)return null;if(typeof V.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof V=="function")return V.displayName||V.name||null;if(typeof V=="string")return V;switch(V){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof V=="object")switch(V.$$typeof){case s:var fe=V;return N(fe)+".Consumer";case a:var _e=V;return N(_e._context)+".Provider";case l:return D(V,V.render,"ForwardRef");case d:var Oe=V.displayName||null;return Oe!==null?Oe:J(V.type)||"Memo";case p:{var qe=V,Fe=qe._payload,Be=qe._init;try{return J(Be(Fe))}catch{return null}}}return null}var K=Object.assign,Y=0,te,oe,le,ae,ge,ce,q;function H(){}H.__reactDisabledLog=!0;function re(){{if(Y===0){te=console.log,oe=console.info,le=console.warn,ae=console.error,ge=console.group,ce=console.groupCollapsed,q=console.groupEnd;var V={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:V,log:V,warn:V,error:V,group:V,groupCollapsed:V,groupEnd:V})}Y++}}function de(){{if(Y--,Y===0){var V={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},V,{value:te}),info:K({},V,{value:oe}),warn:K({},V,{value:le}),error:K({},V,{value:ae}),group:K({},V,{value:ge}),groupCollapsed:K({},V,{value:ce}),groupEnd:K({},V,{value:q})})}Y<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var U=m.ReactCurrentDispatcher,z;function M(V,fe,_e){{if(z===void 0)try{throw Error()}catch(qe){var Oe=qe.stack.trim().match(/\n( *(at )?)/);z=Oe&&Oe[1]||""}return`
65
- `+z+V}}var R=!1,G;{var O=typeof WeakMap=="function"?WeakMap:Map;G=new O}function T(V,fe){if(!V||R)return"";{var _e=G.get(V);if(_e!==void 0)return _e}var Oe;R=!0;var qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Fe;Fe=U.current,U.current=null,re();try{if(fe){var Be=function(){throw Error()};if(Object.defineProperty(Be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Be,[])}catch(Pt){Oe=Pt}Reflect.construct(V,[],Be)}else{try{Be.call()}catch(Pt){Oe=Pt}V.call(Be.prototype)}}else{try{throw Error()}catch(Pt){Oe=Pt}V()}}catch(Pt){if(Pt&&Oe&&typeof Pt.stack=="string"){for(var je=Pt.stack.split(`
66
- `),It=Oe.stack.split(`
67
- `),mt=je.length-1,yt=It.length-1;mt>=1&&yt>=0&&je[mt]!==It[yt];)yt--;for(;mt>=1&&yt>=0;mt--,yt--)if(je[mt]!==It[yt]){if(mt!==1||yt!==1)do if(mt--,yt--,yt<0||je[mt]!==It[yt]){var Ut=`
68
- `+je[mt].replace(" at new "," at ");return V.displayName&&Ut.includes("<anonymous>")&&(Ut=Ut.replace("<anonymous>",V.displayName)),typeof V=="function"&&G.set(V,Ut),Ut}while(mt>=1&&yt>=0);break}}}finally{R=!1,U.current=Fe,de(),Error.prepareStackTrace=qe}var er=V?V.displayName||V.name:"",ti=er?M(er):"";return typeof V=="function"&&G.set(V,ti),ti}function Z(V,fe,_e){return T(V,!1)}function ne(V){var fe=V.prototype;return!!(fe&&fe.isReactComponent)}function pe(V,fe,_e){if(V==null)return"";if(typeof V=="function")return T(V,ne(V));if(typeof V=="string")return M(V);switch(V){case u:return M("Suspense");case f:return M("SuspenseList")}if(typeof V=="object")switch(V.$$typeof){case l:return Z(V.render);case d:return pe(V.type,fe,_e);case p:{var Oe=V,qe=Oe._payload,Fe=Oe._init;try{return pe(Fe(qe),fe,_e)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,xe={},Ee=m.ReactDebugCurrentFrame;function ie(V){if(V){var fe=V._owner,_e=pe(V.type,V._source,fe?fe.type:null);Ee.setExtraStackFrame(_e)}else Ee.setExtraStackFrame(null)}function Ne(V,fe,_e,Oe,qe){{var Fe=Function.call.bind(me);for(var Be in V)if(Fe(V,Be)){var je=void 0;try{if(typeof V[Be]!="function"){var It=Error((Oe||"React class")+": "+_e+" type `"+Be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof V[Be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw It.name="Invariant Violation",It}je=V[Be](fe,Be,Oe,_e,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(mt){je=mt}je&&!(je instanceof Error)&&(ie(qe),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Oe||"React class",_e,Be,typeof je),ie(null)),je instanceof Error&&!(je.message in xe)&&(xe[je.message]=!0,ie(qe),w("Failed %s type: %s",_e,je.message),ie(null))}}}var dt=Array.isArray;function Te(V){return dt(V)}function Me(V){{var fe=typeof Symbol=="function"&&Symbol.toStringTag,_e=fe&&V[Symbol.toStringTag]||V.constructor.name||"Object";return _e}}function bt(V){try{return $e(V),!1}catch{return!0}}function $e(V){return""+V}function De(V){if(bt(V))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Me(V)),$e(V)}var A=m.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0},_,L,W;W={};function X(V){if(me.call(V,"ref")){var fe=Object.getOwnPropertyDescriptor(V,"ref").get;if(fe&&fe.isReactWarning)return!1}return V.ref!==void 0}function se(V){if(me.call(V,"key")){var fe=Object.getOwnPropertyDescriptor(V,"key").get;if(fe&&fe.isReactWarning)return!1}return V.key!==void 0}function Pe(V,fe){if(typeof V.ref=="string"&&A.current&&fe&&A.current.stateNode!==fe){var _e=J(A.current.type);W[_e]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',J(A.current.type),V.ref),W[_e]=!0)}}function ot(V,fe){{var _e=function(){_||(_=!0,w("%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://reactjs.org/link/special-props)",fe))};_e.isReactWarning=!0,Object.defineProperty(V,"key",{get:_e,configurable:!0})}}function Le(V,fe){{var _e=function(){L||(L=!0,w("%s: `ref` 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://reactjs.org/link/special-props)",fe))};_e.isReactWarning=!0,Object.defineProperty(V,"ref",{get:_e,configurable:!0})}}var Je=function(V,fe,_e,Oe,qe,Fe,Be){var je={$$typeof:t,type:V,key:fe,ref:_e,props:Be,_owner:Fe};return je._store={},Object.defineProperty(je._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(je,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Oe}),Object.defineProperty(je,"_source",{configurable:!1,enumerable:!1,writable:!1,value:qe}),Object.freeze&&(Object.freeze(je.props),Object.freeze(je)),je};function Ze(V,fe,_e,Oe,qe){{var Fe,Be={},je=null,It=null;_e!==void 0&&(De(_e),je=""+_e),se(fe)&&(De(fe.key),je=""+fe.key),X(fe)&&(It=fe.ref,Pe(fe,qe));for(Fe in fe)me.call(fe,Fe)&&!b.hasOwnProperty(Fe)&&(Be[Fe]=fe[Fe]);if(V&&V.defaultProps){var mt=V.defaultProps;for(Fe in mt)Be[Fe]===void 0&&(Be[Fe]=mt[Fe])}if(je||It){var yt=typeof V=="function"?V.displayName||V.name||"Unknown":V;je&&ot(Be,yt),It&&Le(Be,yt)}return Je(V,je,It,qe,Oe,A.current,Be)}}var tn=m.ReactCurrentOwner,Jo=m.ReactDebugCurrentFrame;function dr(V){if(V){var fe=V._owner,_e=pe(V.type,V._source,fe?fe.type:null);Jo.setExtraStackFrame(_e)}else Jo.setExtraStackFrame(null)}var qt;qt=!1;function to(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function Nt(){{if(tn.current){var V=J(tn.current.type);if(V)return`
64
+ */var vg;function _$(){return vg||(vg=1,process.env.NODE_ENV!=="production"&&function(){var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),g=Symbol.iterator,v="@@iterator";function y(V){if(V===null||typeof V!="object")return null;var fe=g&&V[g]||V[v];return typeof fe=="function"?fe:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(V){{for(var fe=arguments.length,we=new Array(fe>1?fe-1:0),Ae=1;Ae<fe;Ae++)we[Ae-1]=arguments[Ae];E("error",V,we)}}function E(V,fe,we){{var Ae=m.ReactDebugCurrentFrame,Ye=Ae.getStackAddendum();Ye!==""&&(fe+="%s",we=we.concat([Ye]));var Fe=we.map(function(Be){return String(Be)});Fe.unshift("Warning: "+fe),Function.prototype.apply.call(console[V],console,Fe)}}var x=!1,k=!1,I=!1,S=!1,C=!1,P;P=Symbol.for("react.module.reference");function F(V){return!!(typeof V=="string"||typeof V=="function"||V===n||V===i||C||V===o||V===u||V===f||S||V===h||x||k||I||typeof V=="object"&&V!==null&&(V.$$typeof===p||V.$$typeof===d||V.$$typeof===a||V.$$typeof===s||V.$$typeof===l||V.$$typeof===P||V.getModuleId!==void 0))}function D(V,fe,we){var Ae=V.displayName;if(Ae)return Ae;var Ye=fe.displayName||fe.name||"";return Ye!==""?we+"("+Ye+")":we}function N(V){return V.displayName||"Context"}function J(V){if(V==null)return null;if(typeof V.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof V=="function")return V.displayName||V.name||null;if(typeof V=="string")return V;switch(V){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof V=="object")switch(V.$$typeof){case s:var fe=V;return N(fe)+".Consumer";case a:var we=V;return N(we._context)+".Provider";case l:return D(V,V.render,"ForwardRef");case d:var Ae=V.displayName||null;return Ae!==null?Ae:J(V.type)||"Memo";case p:{var Ye=V,Fe=Ye._payload,Be=Ye._init;try{return J(Be(Fe))}catch{return null}}}return null}var K=Object.assign,Y=0,te,oe,le,ae,ge,ce,q;function H(){}H.__reactDisabledLog=!0;function re(){{if(Y===0){te=console.log,oe=console.info,le=console.warn,ae=console.error,ge=console.group,ce=console.groupCollapsed,q=console.groupEnd;var V={configurable:!0,enumerable:!0,value:H,writable:!0};Object.defineProperties(console,{info:V,log:V,warn:V,error:V,group:V,groupCollapsed:V,groupEnd:V})}Y++}}function de(){{if(Y--,Y===0){var V={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},V,{value:te}),info:K({},V,{value:oe}),warn:K({},V,{value:le}),error:K({},V,{value:ae}),group:K({},V,{value:ge}),groupCollapsed:K({},V,{value:ce}),groupEnd:K({},V,{value:q})})}Y<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var U=m.ReactCurrentDispatcher,z;function M(V,fe,we){{if(z===void 0)try{throw Error()}catch(Ye){var Ae=Ye.stack.trim().match(/\n( *(at )?)/);z=Ae&&Ae[1]||""}return`
65
+ `+z+V}}var R=!1,G;{var O=typeof WeakMap=="function"?WeakMap:Map;G=new O}function T(V,fe){if(!V||R)return"";{var we=G.get(V);if(we!==void 0)return we}var Ae;R=!0;var Ye=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Fe;Fe=U.current,U.current=null,re();try{if(fe){var Be=function(){throw Error()};if(Object.defineProperty(Be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Be,[])}catch(kt){Ae=kt}Reflect.construct(V,[],Be)}else{try{Be.call()}catch(kt){Ae=kt}V.call(Be.prototype)}}else{try{throw Error()}catch(kt){Ae=kt}V()}}catch(kt){if(kt&&Ae&&typeof kt.stack=="string"){for(var je=kt.stack.split(`
66
+ `),Pt=Ae.stack.split(`
67
+ `),bt=je.length-1,wt=Pt.length-1;bt>=1&&wt>=0&&je[bt]!==Pt[wt];)wt--;for(;bt>=1&&wt>=0;bt--,wt--)if(je[bt]!==Pt[wt]){if(bt!==1||wt!==1)do if(bt--,wt--,wt<0||je[bt]!==Pt[wt]){var Wt=`
68
+ `+je[bt].replace(" at new "," at ");return V.displayName&&Wt.includes("<anonymous>")&&(Wt=Wt.replace("<anonymous>",V.displayName)),typeof V=="function"&&G.set(V,Wt),Wt}while(bt>=1&&wt>=0);break}}}finally{R=!1,U.current=Fe,de(),Error.prepareStackTrace=Ye}var tr=V?V.displayName||V.name:"",ri=tr?M(tr):"";return typeof V=="function"&&G.set(V,ri),ri}function Z(V,fe,we){return T(V,!1)}function ne(V){var fe=V.prototype;return!!(fe&&fe.isReactComponent)}function pe(V,fe,we){if(V==null)return"";if(typeof V=="function")return T(V,ne(V));if(typeof V=="string")return M(V);switch(V){case u:return M("Suspense");case f:return M("SuspenseList")}if(typeof V=="object")switch(V.$$typeof){case l:return Z(V.render);case d:return pe(V.type,fe,we);case p:{var Ae=V,Ye=Ae._payload,Fe=Ae._init;try{return pe(Fe(Ye),fe,we)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,Ee={},_e=m.ReactDebugCurrentFrame;function ie(V){if(V){var fe=V._owner,we=pe(V.type,V._source,fe?fe.type:null);_e.setExtraStackFrame(we)}else _e.setExtraStackFrame(null)}function Ne(V,fe,we,Ae,Ye){{var Fe=Function.call.bind(me);for(var Be in V)if(Fe(V,Be)){var je=void 0;try{if(typeof V[Be]!="function"){var Pt=Error((Ae||"React class")+": "+we+" type `"+Be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof V[Be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Pt.name="Invariant Violation",Pt}je=V[Be](fe,Be,Ae,we,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(bt){je=bt}je&&!(je instanceof Error)&&(ie(Ye),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ae||"React class",we,Be,typeof je),ie(null)),je instanceof Error&&!(je.message in Ee)&&(Ee[je.message]=!0,ie(Ye),w("Failed %s type: %s",we,je.message),ie(null))}}}var pt=Array.isArray;function Te(V){return pt(V)}function Me(V){{var fe=typeof Symbol=="function"&&Symbol.toStringTag,we=fe&&V[Symbol.toStringTag]||V.constructor.name||"Object";return we}}function yt(V){try{return Se(V),!1}catch{return!0}}function Se(V){return""+V}function De(V){if(yt(V))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Me(V)),Se(V)}var A=m.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0},_,L,W;W={};function X(V){if(me.call(V,"ref")){var fe=Object.getOwnPropertyDescriptor(V,"ref").get;if(fe&&fe.isReactWarning)return!1}return V.ref!==void 0}function se(V){if(me.call(V,"key")){var fe=Object.getOwnPropertyDescriptor(V,"key").get;if(fe&&fe.isReactWarning)return!1}return V.key!==void 0}function Pe(V,fe){if(typeof V.ref=="string"&&A.current&&fe&&A.current.stateNode!==fe){var we=J(A.current.type);W[we]||(w('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',J(A.current.type),V.ref),W[we]=!0)}}function ot(V,fe){{var we=function(){_||(_=!0,w("%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://reactjs.org/link/special-props)",fe))};we.isReactWarning=!0,Object.defineProperty(V,"key",{get:we,configurable:!0})}}function Le(V,fe){{var we=function(){L||(L=!0,w("%s: `ref` 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://reactjs.org/link/special-props)",fe))};we.isReactWarning=!0,Object.defineProperty(V,"ref",{get:we,configurable:!0})}}var Xe=function(V,fe,we,Ae,Ye,Fe,Be){var je={$$typeof:t,type:V,key:fe,ref:we,props:Be,_owner:Fe};return je._store={},Object.defineProperty(je._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(je,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ae}),Object.defineProperty(je,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ye}),Object.freeze&&(Object.freeze(je.props),Object.freeze(je)),je};function Qe(V,fe,we,Ae,Ye){{var Fe,Be={},je=null,Pt=null;we!==void 0&&(De(we),je=""+we),se(fe)&&(De(fe.key),je=""+fe.key),X(fe)&&(Pt=fe.ref,Pe(fe,Ye));for(Fe in fe)me.call(fe,Fe)&&!b.hasOwnProperty(Fe)&&(Be[Fe]=fe[Fe]);if(V&&V.defaultProps){var bt=V.defaultProps;for(Fe in bt)Be[Fe]===void 0&&(Be[Fe]=bt[Fe])}if(je||Pt){var wt=typeof V=="function"?V.displayName||V.name||"Unknown":V;je&&ot(Be,wt),Pt&&Le(Be,wt)}return Xe(V,je,Pt,Ye,Ae,A.current,Be)}}var rn=m.ReactCurrentOwner,Xo=m.ReactDebugCurrentFrame;function pr(V){if(V){var fe=V._owner,we=pe(V.type,V._source,fe?fe.type:null);Xo.setExtraStackFrame(we)}else Xo.setExtraStackFrame(null)}var Yt;Yt=!1;function ro(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function Dt(){{if(rn.current){var V=J(rn.current.type);if(V)return`
69
69
 
70
- Check the render method of \``+V+"`."}return""}}function oa(V){{if(V!==void 0){var fe=V.fileName.replace(/^.*[\\\/]/,""),_e=V.lineNumber;return`
70
+ Check the render method of \``+V+"`."}return""}}function ia(V){{if(V!==void 0){var fe=V.fileName.replace(/^.*[\\\/]/,""),we=V.lineNumber;return`
71
71
 
72
- Check your code at `+fe+":"+_e+"."}return""}}var Xo={};function ia(V){{var fe=Nt();if(!fe){var _e=typeof V=="string"?V:V.displayName||V.name;_e&&(fe=`
72
+ Check your code at `+fe+":"+we+"."}return""}}var Zo={};function aa(V){{var fe=Dt();if(!fe){var we=typeof V=="string"?V:V.displayName||V.name;we&&(fe=`
73
73
 
74
- Check the top-level render call using <`+_e+">.")}return fe}}function Zo(V,fe){{if(!V._store||V._store.validated||V.key!=null)return;V._store.validated=!0;var _e=ia(fe);if(Xo[_e])return;Xo[_e]=!0;var Oe="";V&&V._owner&&V._owner!==tn.current&&(Oe=" It was passed a child from "+J(V._owner.type)+"."),dr(V),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',_e,Oe),dr(null)}}function Qo(V,fe){{if(typeof V!="object")return;if(Te(V))for(var _e=0;_e<V.length;_e++){var Oe=V[_e];to(Oe)&&Zo(Oe,fe)}else if(to(V))V._store&&(V._store.validated=!0);else if(V){var qe=y(V);if(typeof qe=="function"&&qe!==V.entries)for(var Fe=qe.call(V),Be;!(Be=Fe.next()).done;)to(Be.value)&&Zo(Be.value,fe)}}}function Ct(V){{var fe=V.type;if(fe==null||typeof fe=="string")return;var _e;if(typeof fe=="function")_e=fe.propTypes;else if(typeof fe=="object"&&(fe.$$typeof===l||fe.$$typeof===d))_e=fe.propTypes;else return;if(_e){var Oe=J(fe);Ne(_e,V.props,"prop",Oe,V)}else if(fe.PropTypes!==void 0&&!qt){qt=!0;var qe=J(fe);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",qe||"Unknown")}typeof fe.getDefaultProps=="function"&&!fe.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function aa(V){{for(var fe=Object.keys(V.props),_e=0;_e<fe.length;_e++){var Oe=fe[_e];if(Oe!=="children"&&Oe!=="key"){dr(V),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Oe),dr(null);break}}V.ref!==null&&(dr(V),w("Invalid attribute `ref` supplied to `React.Fragment`."),dr(null))}}function ei(V,fe,_e,Oe,qe,Fe){{var Be=F(V);if(!Be){var je="";(V===void 0||typeof V=="object"&&V!==null&&Object.keys(V).length===0)&&(je+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var It=oa(qe);It?je+=It:je+=Nt();var mt;V===null?mt="null":Te(V)?mt="array":V!==void 0&&V.$$typeof===t?(mt="<"+(J(V.type)||"Unknown")+" />",je=" Did you accidentally export a JSX literal instead of a component?"):mt=typeof V,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",mt,je)}var yt=Ze(V,fe,_e,qe,Fe);if(yt==null)return yt;if(Be){var Ut=fe.children;if(Ut!==void 0)if(Oe)if(Te(Ut)){for(var er=0;er<Ut.length;er++)Qo(Ut[er],V);Object.freeze&&Object.freeze(Ut)}else w("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 Qo(Ut,V)}return V===n?aa(yt):Ct(yt),yt}}function sa(V,fe,_e){return ei(V,fe,_e,!0)}function la(V,fe,_e){return ei(V,fe,_e,!1)}var ca=la,Yt=sa;yi.Fragment=n,yi.jsx=ca,yi.jsxs=Yt}()),yi}var wi={};/**
74
+ Check the top-level render call using <`+we+">.")}return fe}}function Qo(V,fe){{if(!V._store||V._store.validated||V.key!=null)return;V._store.validated=!0;var we=aa(fe);if(Zo[we])return;Zo[we]=!0;var Ae="";V&&V._owner&&V._owner!==rn.current&&(Ae=" It was passed a child from "+J(V._owner.type)+"."),pr(V),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',we,Ae),pr(null)}}function ei(V,fe){{if(typeof V!="object")return;if(Te(V))for(var we=0;we<V.length;we++){var Ae=V[we];ro(Ae)&&Qo(Ae,fe)}else if(ro(V))V._store&&(V._store.validated=!0);else if(V){var Ye=y(V);if(typeof Ye=="function"&&Ye!==V.entries)for(var Fe=Ye.call(V),Be;!(Be=Fe.next()).done;)ro(Be.value)&&Qo(Be.value,fe)}}}function At(V){{var fe=V.type;if(fe==null||typeof fe=="string")return;var we;if(typeof fe=="function")we=fe.propTypes;else if(typeof fe=="object"&&(fe.$$typeof===l||fe.$$typeof===d))we=fe.propTypes;else return;if(we){var Ae=J(fe);Ne(we,V.props,"prop",Ae,V)}else if(fe.PropTypes!==void 0&&!Yt){Yt=!0;var Ye=J(fe);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ye||"Unknown")}typeof fe.getDefaultProps=="function"&&!fe.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function sa(V){{for(var fe=Object.keys(V.props),we=0;we<fe.length;we++){var Ae=fe[we];if(Ae!=="children"&&Ae!=="key"){pr(V),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ae),pr(null);break}}V.ref!==null&&(pr(V),w("Invalid attribute `ref` supplied to `React.Fragment`."),pr(null))}}function ti(V,fe,we,Ae,Ye,Fe){{var Be=F(V);if(!Be){var je="";(V===void 0||typeof V=="object"&&V!==null&&Object.keys(V).length===0)&&(je+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Pt=ia(Ye);Pt?je+=Pt:je+=Dt();var bt;V===null?bt="null":Te(V)?bt="array":V!==void 0&&V.$$typeof===t?(bt="<"+(J(V.type)||"Unknown")+" />",je=" Did you accidentally export a JSX literal instead of a component?"):bt=typeof V,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",bt,je)}var wt=Qe(V,fe,we,Ye,Fe);if(wt==null)return wt;if(Be){var Wt=fe.children;if(Wt!==void 0)if(Ae)if(Te(Wt)){for(var tr=0;tr<Wt.length;tr++)ei(Wt[tr],V);Object.freeze&&Object.freeze(Wt)}else w("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 ei(Wt,V)}return V===n?sa(wt):At(wt),wt}}function la(V,fe,we){return ti(V,fe,we,!0)}function ca(V,fe,we){return ti(V,fe,we,!1)}var ua=ca,Jt=la;wi.Fragment=n,wi.jsx=ua,wi.jsxs=Jt}()),wi}var _i={};/**
75
75
  * @license React
76
76
  * react-jsx-runtime.production.min.js
77
77
  *
@@ -79,16 +79,16 @@ Check the top-level render call using <`+_e+">.")}return fe}}function Zo(V,fe){{
79
79
  *
80
80
  * This source code is licensed under the MIT license found in the
81
81
  * LICENSE file in the root directory of this source tree.
82
- */var vg;function w$(){if(vg)return wi;vg=1;var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,u){var f,d={},p=null,h=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(d[f]=l[f]);if(s&&s.defaultProps)for(f in l=s.defaultProps,l)d[f]===void 0&&(d[f]=l[f]);return{$$typeof:t,type:s,key:p,ref:h,props:d,_owner:o.current}}return wi.Fragment=r,wi.jsx=a,wi.jsxs=a,wi}process.env.NODE_ENV==="production"?gc.exports=w$():gc.exports=y$();var nr=gc.exports;const mg=c.createContext(6),bg=()=>c.useContext(mg),yg=c.createContext(null),_$=()=>c.useContext(yg),E$=e=>nr.jsx(mg.Provider,{value:e.length,children:nr.jsx(yg.Provider,{value:e.selection,children:e.children})}),x$=(e,[t,r])=>typeof t!="number"||typeof r!="number"?null:t===r&&t===e?"cursor":e>=t&&e<r?"selected":null,S$=(e,[t,r])=>e<t?-1:e>=r?1:0,$$=(e,t)=>Array(e).fill(null).map((n,o)=>({state:x$(o,t),position:S$(o,t)})),C$=e=>nr.jsx("div",{...e,"aria-hidden":!0,style:{position:"absolute",left:0,right:0,top:0,bottom:0,display:"flex",justifyContent:"space-between",zIndex:-1,...e.style}}),A$=e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.scrollTop=0,e.currentTarget.scrollLeft=0},O$=e=>nr.jsx("div",{...e,onScroll:A$,style:{...e.style,height:"100%",overflow:"hidden"}}),T$=c.forwardRef((e,t)=>{const r=bg();return nr.jsx("input",{...e,width:void 0,minLength:r,maxLength:r,ref:t,style:{...e.style,font:"inherit",letterSpacing:"inherit",textIndent:"inherit",background:"transparent",appearance:"none",display:"block",width:e.width||"200%",padding:"0",margin:"0",border:"0 solid transparent",outline:"none"}})}),I$=e=>{const t=_$(),r=bg(),n=t,i=$$(r,n).map(({state:a,position:s},l)=>e.children({index:l,state:a,position:s,selection:n}));return nr.jsx(nr.Fragment,{children:i})},P$=({renderSegment:e,length:t=6,fontFamily:r="'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', monospace",fontSize:n="2rem",padding:o="0.25rem",paddingY:i=o,paddingX:a=o,spacing:s="0.5rem",characterWidth:l="1ch",style:u,className:f,inputClassName:d,inputStyle:p,segmentWidth:h=`calc(${l} + ${a} * 2)`,inputWidth:g=`calc(100% + ${h} + ${s})`,inputRef:v,scrollWrapperClassName:y,segmentWrapperClassName:m,rootProps:w,...E})=>{const x=b$(v),k={...u,position:"relative",width:`calc(${h} * ${t} + ${s} * ${t-1})`,fontFamily:r,fontSize:n,textIndent:a,letterSpacing:`calc(${a} * 2 + ${s})`,lineHeight:`calc(${n} + ${i} * 2)`,zIndex:0},I={className:d,style:p,ref:v};return nr.jsx(E$,{length:t,selection:x,children:nr.jsxs("div",{...w,className:f,style:k,children:[nr.jsx(C$,{className:m,children:nr.jsx(I$,{children:e})}),nr.jsx(O$,{className:y,onMouseDownCapture:S=>{var N,J;if(S.button!==0||S.ctrlKey||S.shiftKey||S.metaKey||!(S.currentTarget instanceof HTMLElement)||!(v.current instanceof HTMLInputElement))return;S.stopPropagation(),S.preventDefault();const{left:C,width:P}=S.currentTarget.getBoundingClientRect(),F=S.clientX-C,D=Math.floor(F/P*t);document.activeElement!==v.current&&((N=v.current)==null||N.focus()),(J=v.current)==null||J.setSelectionRange(D,D+1)},onDoubleClickCapture:()=>{var S;(S=v.current)==null||S.setSelectionRange(0,t)},children:nr.jsx(T$,{width:g,...E,...I})})]})})},k$=e=>`calc(1ch + ${e} * 2)`;var Bt="Input",[N$,G9]=Pr(Bt,[]),[D$,or]=N$(Bt),wg=({__inputScope:e,id:t,descriptionId:r,errorMessageId:n,validationValence:o="neutral",children:i})=>{const a=Et("input",t),s=Et("input__description",r),l=Et("input__error-message",n);return c.createElement(D$,{id:a,descriptionId:s,errorMessageId:l,validationValence:o,scope:e},i)};wg.displayName=Bt;var L$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{id:i}=or(Bt,e),a=t?St:Ge.label;return c.createElement(a,{...n,htmlFor:i,ref:o},r)}),M$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=or(Bt,e),s=t?St:Ge.span;return c.createElement(s,{...n,...a==="error"&&{id:i},ref:o},r)}),F$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{errorMessageId:i}=or(Bt,e),a=t?St:Ge.span;return c.createElement(a,{...n,id:i,ref:o},r)}),j$=c.forwardRef((e,t)=>{const{__inputScope:r,asChild:n,children:o,...i}=e,{validationValence:a}=or(Bt,r);if(a==="error")return c.createElement(F$,{...e,ref:t});{const s=n?St:Ge.span;return c.createElement(s,{...i,ref:t},o)}}),B$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=or(Bt,e),s=t?St:Ge.p;return c.createElement(s,{...n,...a!=="error"&&{id:i},ref:o},r)}),R$=c.forwardRef(({__inputScope:e,segmentClassName:t,inputClassName:r,segmentPadding:n="13px",segmentHeight:o="100%",...i},a)=>{const{id:s,validationValence:l,descriptionId:u,errorMessageId:f}=or(Bt,e),d=k$(n),p=Ol(a),h=mw(p),g=c.useCallback(({state:v,index:y})=>c.createElement("div",{key:y,className:t==null?void 0:t({focused:!!(h&&v),validationValence:l}),"data-state":v,style:{width:d,height:o}}),[t,h,l]);return c.createElement(P$,{padding:"8px",spacing:"8px",fontFamily:"",spellCheck:!1,length:6,...i,id:s,"aria-describedby":u,...l==="error"&&{"aria-invalid":"true","aria-errormessage":f},inputRef:p,renderSegment:g,className:r})}),U$=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=or(Bt,e);return c.createElement(Ge.input,{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})}),W$=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=or(Bt,e);return c.createElement("textarea",{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})});const _g="Collapsible",[H$,K9]=dn(_g),[V$,vc]=H$(_g),z$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,u]=xa({prop:n,defaultProp:o,onChange:a});return c.createElement(V$,{scope:r,disabled:i,contentId:pi(),open:l,onOpenToggle:c.useCallback(()=>u(f=>!f),[u])},c.createElement(ft.div,rt({"data-state":mc(l),"data-disabled":i?"":void 0},s,{ref:t})))}),G$="CollapsibleTrigger",K$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=vc(G$,r);return c.createElement(ft.button,rt({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":mc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},n,{ref:t,onClick:pt(e.onClick,o.onOpenToggle)}))}),Eg="CollapsibleContent",q$=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=vc(Eg,e.__scopeCollapsible);return c.createElement(ir,{present:r||o.open},({present:i})=>c.createElement(Y$,rt({},n,{ref:t,present:i})))}),Y$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=vc(Eg,r),[s,l]=c.useState(n),u=c.useRef(null),f=At(t,u),d=c.useRef(0),p=d.current,h=c.useRef(0),g=h.current,v=a.open||s,y=c.useRef(v),m=c.useRef();return c.useEffect(()=>{const w=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(w)},[]),Ir(()=>{const w=u.current;if(w){m.current=m.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const E=w.getBoundingClientRect();d.current=E.height,h.current=E.width,y.current||(w.style.transitionDuration=m.current.transitionDuration,w.style.animationName=m.current.animationName),l(n)}},[a.open,n]),c.createElement(ft.div,rt({"data-state":mc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v},i,{ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style}}),v&&o)});function mc(e){return e?"open":"closed"}const J$=z$,X$=K$,Z$=q$;var za="List",[Q$,q9]=Pr(za,[]),[eC,tC]=Q$(za),xg=c.forwardRef((e,t)=>{const{__listScope:r,variant:n="ordered",selectable:o=!1,itemSizes:i,children:a,...s}=e,l=n==="ordered"?Ge.ol:Ge.ul;return c.createElement(l,{...o&&{role:"listbox","aria-multiselectable":!0},...s,ref:t},c.createElement(eC,{scope:r,variant:n,selectable:o,itemSizes:i},a))});xg.displayName=za;var _i="ListItem",[rC,Y9]=Pr(_i,[]),[nC,Sg]=rC(_i),oC=c.forwardRef(({children:e,asChild:t,__listItemScope:r,...n},o)=>{const{headingId:i}=Sg(_i,r),a=t?St:Ge.div;return c.createElement(a,{...n,id:i,ref:o},e)}),iC=X$,aC=Z$,$g=c.forwardRef((e,t)=>{const r=Et("listItem",e.id),{__listScope:n,__listItemScope:o,children:i,selected:a,defaultSelected:s,onSelectedChange:l,open:u,defaultOpen:f,onOpenChange:d,collapsible:p,labelId:h,...g}=e,{selectable:v}=tC(za,n),[y=!1,m]=Kr({prop:a,defaultProp:s,onChange:l}),[w=!1,E]=Kr({prop:u,defaultProp:f,onChange:d}),x=Et("listItem__heading",h),k=c.createElement(Ge.li,{...g,id:r,ref:t,"aria-labelledby":x,...v&&{role:"option","aria-selected":!!y},...w&&{"aria-expanded":!0}},i);return c.createElement(nC,{scope:o,headingId:x,open:w,selected:y,setSelected:m},p?c.createElement(J$,{asChild:!0,open:w,onOpenChange:E},k):k)});$g.displayName=_i;function sC(e,[t,r]){return Math.min(r,Math.max(t,e))}function lC(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Cg="ScrollArea",[Ag,J9]=dn(Cg),[cC,sr]=Ag(Cg),uC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=c.useState(null),[u,f]=c.useState(null),[d,p]=c.useState(null),[h,g]=c.useState(null),[v,y]=c.useState(null),[m,w]=c.useState(0),[E,x]=c.useState(0),[k,I]=c.useState(!1),[S,C]=c.useState(!1),P=At(t,D=>l(D)),F=R_(o);return c.createElement(cC,{scope:r,type:n,dir:F,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:f,content:d,onContentChange:p,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:k,onScrollbarXEnabledChange:I,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:S,onScrollbarYEnabledChange:C,onCornerWidthChange:w,onCornerHeightChange:x},c.createElement(ft.div,rt({dir:F},a,{ref:P,style:{position:"relative","--radix-scroll-area-corner-width":m+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})))}),fC="ScrollAreaViewport",dC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,i=sr(fC,r),a=c.useRef(null),s=At(t,a,i.onViewportChange);return c.createElement(c.Fragment,null,c.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),c.createElement(ft.div,rt({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),c.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),qr="ScrollAreaScrollbar",pC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=sr(qr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return c.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?c.createElement(hC,rt({},n,{ref:t,forceMount:r})):o.type==="scroll"?c.createElement(gC,rt({},n,{ref:t,forceMount:r})):o.type==="auto"?c.createElement(Og,rt({},n,{ref:t,forceMount:r})):o.type==="always"?c.createElement(bc,rt({},n,{ref:t})):null}),hC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=sr(qr,e.__scopeScrollArea),[i,a]=c.useState(!1);return c.useEffect(()=>{const s=o.scrollArea;let l=0;if(s){const u=()=>{window.clearTimeout(l),a(!0)},f=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),c.createElement(ir,{present:r||i},c.createElement(Og,rt({"data-state":i?"visible":"hidden"},n,{ref:t})))}),gC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=sr(qr,e.__scopeScrollArea),i=e.orientation==="horizontal",a=qa(()=>l("SCROLL_END"),100),[s,l]=lC("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,l]),c.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let d=u[f];const p=()=>{const h=u[f];d!==h&&(l("SCROLL"),a()),d=h};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,i,l,a]),c.createElement(ir,{present:r||s!=="hidden"},c.createElement(bc,rt({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:pt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:pt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),Og=c.forwardRef((e,t)=>{const r=sr(qr,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=c.useState(!1),s=e.orientation==="horizontal",l=qa(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?u:f)}},10);return wo(r.viewport,l),wo(r.content,l),c.createElement(ir,{present:n||i},c.createElement(bc,rt({"data-state":i?"visible":"hidden"},o,{ref:t})))}),bc=c.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=sr(qr,e.__scopeScrollArea),i=c.useRef(null),a=c.useRef(0),[s,l]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=kg(s.viewport,s.content),f={...n,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function d(p,h){return xC(p,a.current,s,h)}return r==="horizontal"?c.createElement(vC,rt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,h=Ng(p,s,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=d(p,o.dir))}})):r==="vertical"?c.createElement(mC,rt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,h=Ng(p,s);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=d(p))}})):null}),vC=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=sr(qr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=At(t,l,i.onScrollbarXChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Ig,rt({"data-orientation":"horizontal"},o,{ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ka(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),Lg(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ga(a.paddingLeft),paddingEnd:Ga(a.paddingRight)}})}}))}),mC=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=sr(qr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=At(t,l,i.onScrollbarYChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Ig,rt({"data-orientation":"vertical"},o,{ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ka(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),Lg(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ga(a.paddingTop),paddingEnd:Ga(a.paddingBottom)}})}}))}),[bC,Tg]=Ag(qr),Ig=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:d,...p}=e,h=sr(qr,r),[g,v]=c.useState(null),y=At(t,P=>v(P)),m=c.useRef(null),w=c.useRef(""),E=h.viewport,x=n.content-n.viewport,k=Vt(f),I=Vt(l),S=qa(d,10);function C(P){if(m.current){const F=P.clientX-m.current.left,D=P.clientY-m.current.top;u({x:F,y:D})}}return c.useEffect(()=>{const P=F=>{const D=F.target;(g==null?void 0:g.contains(D))&&k(F,x)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[E,g,x,k]),c.useEffect(I,[n,I]),wo(g,S),wo(h.content,S),c.createElement(bC,{scope:r,scrollbar:g,hasThumb:o,onThumbChange:Vt(i),onThumbPointerUp:Vt(a),onThumbPositionChange:I,onThumbPointerDown:Vt(s)},c.createElement(ft.div,rt({},p,{ref:y,style:{position:"absolute",...p.style},onPointerDown:pt(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),m.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C(P))}),onPointerMove:pt(e.onPointerMove,C),onPointerUp:pt(e.onPointerUp,P=>{const F=P.target;F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=w.current,m.current=null})})))}),yc="ScrollAreaThumb",yC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Tg(yc,e.__scopeScrollArea);return c.createElement(ir,{present:r||o.hasThumb},c.createElement(wC,rt({ref:t},n)))}),wC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=sr(yc,r),a=Tg(yc,r),{onThumbPositionChange:s}=a,l=At(t,d=>a.onThumbChange(d)),u=c.useRef(),f=qa(()=>{u.current&&(u.current(),u.current=void 0)},100);return c.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(f(),!u.current){const h=SC(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,f,s]),c.createElement(ft.div,rt({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:pt(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,v=d.clientY-h.top;a.onThumbPointerDown({x:g,y:v})}),onPointerUp:pt(e.onPointerUp,a.onThumbPointerUp)}))}),Pg="ScrollAreaCorner",_C=c.forwardRef((e,t)=>{const r=sr(Pg,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.createElement(EC,rt({},e,{ref:t})):null}),EC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=sr(Pg,r),[i,a]=c.useState(0),[s,l]=c.useState(0),u=!!(i&&s);return wo(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),wo(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),u?c.createElement(ft.div,rt({},n,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Ga(e){return e?parseInt(e,10):0}function kg(e,t){const r=e/t;return isNaN(r)?0:r}function Ka(e){const t=kg(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function xC(e,t,r,n="ltr"){const o=Ka(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return Dg([l,u],d)(e)}function Ng(e,t,r="ltr"){const n=Ka(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],u=sC(e,l);return Dg([0,a],[0,s])(u)}function Dg(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Lg(e,t){return e>0&&e<t}const SC=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function qa(e,t){const r=Vt(e),n=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(n.current),[]),c.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function wo(e,t){const r=Vt(t);Ir(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const $C=uC,CC=dC,AC=pC,OC=yC,TC=_C;function Fn(e){return e.split("-")[0]}function Ei(e){return e.split("-")[1]}function _o(e){return["top","bottom"].includes(Fn(e))?"x":"y"}function wc(e){return e==="y"?"height":"width"}function Mg(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=_o(t),l=wc(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(Fn(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(Ei(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const IC=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Mg(l,n,s),d=n,p={},h=0;for(let g=0;g<i.length;g++){const{name:v,fn:y}=i[g],{x:m,y:w,data:E,reset:x}=await y({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});u=m??u,f=w??f,p={...p,[v]:{...p[v],...E}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(l=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=Mg(l,d,s)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};function Fg(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function Ya(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function xi(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,g=Fg(h),v=s[p?d==="floating"?"reference":"floating":d],y=Ya(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=Ya(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:d==="floating"?{...a.floating,x:n,y:o}:a.reference,offsetParent:await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[d]);return{top:y.top-m.top+g.top,bottom:m.bottom-y.bottom+g.bottom,left:y.left-m.left+g.left,right:m.right-y.right+g.right}}const PC=Math.min,jn=Math.max;function _c(e,t,r){return jn(e,PC(t,r))}const jg=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e??{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(r==null)return{};const u=Fg(n),f={x:o,y:i},d=_o(a),p=Ei(a),h=wc(d),g=await l.getDimensions(r),v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=s.reference[h]+s.reference[d]-f[d]-s.floating[h],w=f[d]-s.reference[d],E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let x=E?d==="y"?E.clientHeight||0:E.clientWidth||0:0;x===0&&(x=s.floating[h]);const k=m/2-w/2,I=u[v],S=x-g[h]-u[y],C=x/2-g[h]/2+k,P=_c(I,C,S),F=(p==="start"?u[v]:u[y])>0&&C!==P&&s.reference[h]<=s.floating[h];return{[d]:f[d]-(F?C<I?I-C:S-C:0),data:{[d]:P,centerOffset:C-P}}}}),kC={left:"right",right:"left",bottom:"top",top:"bottom"};function Ja(e){return e.replace(/left|right|bottom|top/g,t=>kC[t])}function NC(e,t,r){r===void 0&&(r=!1);const n=Ei(e),o=_o(e),i=wc(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ja(a)),{main:a,cross:Ja(a)}}const DC={start:"end",end:"start"};function Bg(e){return e.replace(/start|end/g,t=>DC[t])}const Rg=["top","right","bottom","left"];Rg.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const LC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",flipAlignment:h=!0,...g}=e,v=Fn(n),y=d||(v===a||!h?[Ja(a)]:function(C){const P=Ja(C);return[Bg(C),P,Bg(P)]}(a)),m=[a,...y],w=await xi(t,g),E=[];let x=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&E.push(w[v]),f){const{main:C,cross:P}=NC(n,i,await(s.isRTL==null?void 0:s.isRTL(l.floating)));E.push(w[C],w[P])}if(x=[...x,{placement:n,overflows:E}],!E.every(C=>C<=0)){var k,I;const C=((k=(I=o.flip)==null?void 0:I.index)!=null?k:0)+1,P=m[C];if(P)return{data:{index:C,overflows:x},reset:{placement:P}};let F="bottom";switch(p){case"bestFit":{var S;const D=(S=x.map(N=>[N,N.overflows.filter(J=>J>0).reduce((J,K)=>J+K,0)]).sort((N,J)=>N[1]-J[1])[0])==null?void 0:S[0].placement;D&&(F=D);break}case"initialPlacement":F=a}if(n!==F)return{reset:{placement:F}}}return{}}}};function Ug(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Wg(e){return Rg.some(t=>e[t]>=0)}const MC=function(e){let{strategy:t="referenceHidden",...r}=e===void 0?{}:e;return{name:"hide",async fn(n){const{rects:o}=n;switch(t){case"referenceHidden":{const i=Ug(await xi(n,{...r,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Wg(i)}}}case"escaped":{const i=Ug(await xi(n,{...r,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:Wg(i)}}}default:return{}}}}},FC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=Fn(s),p=Ei(s),h=_o(s)==="x",g=["left","top"].includes(d)?-1:1,v=f&&h?-1:1,y=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*v,y:m*g}:{x:m*g,y:w*v}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function Hg(e){return e==="x"?"y":"x"}const jC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:m,y:w}=y;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await xi(t,l),d=_o(Fn(o)),p=Hg(d);let h=u[d],g=u[p];if(i){const y=d==="y"?"bottom":"right";h=_c(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";g=_c(g+f[p==="y"?"top":"left"],g,g-f[y])}const v=s.fn({...t,[d]:h,[p]:g});return{...v,data:{x:v.x-r,y:v.y-n}}}}},BC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=_o(o),p=Hg(d);let h=f[d],g=f[p];const v=typeof s=="function"?s({...i,placement:o}):s,y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const k=d==="y"?"height":"width",I=i.reference[d]-i.floating[k]+y.mainAxis,S=i.reference[d]+i.reference[k]-y.mainAxis;h<I?h=I:h>S&&(h=S)}if(u){var m,w,E,x;const k=d==="y"?"width":"height",I=["top","left"].includes(Fn(o)),S=i.reference[p]-i.floating[k]+(I&&(m=(w=a.offset)==null?void 0:w[p])!=null?m:0)+(I?0:y.crossAxis),C=i.reference[p]+i.reference[k]+(I?0:(E=(x=a.offset)==null?void 0:x[p])!=null?E:0)-(I?y.crossAxis:0);g<S?g=S:g>C&&(g=C)}return{[d]:h,[p]:g}}}},RC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a,...s}=e,l=await xi(t,s),u=Fn(r),f=Ei(r);let d,p;u==="top"||u==="bottom"?(d=u,p=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=u,d=f==="end"?"top":"bottom");const h=jn(l.left,0),g=jn(l.right,0),v=jn(l.top,0),y=jn(l.bottom,0),m={availableHeight:n.floating.height-(["left","right"].includes(r)?2*(v!==0||y!==0?v+y:jn(l.top,l.bottom)):l[d]),availableWidth:n.floating.width-(["top","bottom"].includes(r)?2*(h!==0||g!==0?h+g:jn(l.left,l.right)):l[p])},w=await o.getDimensions(i.floating);a==null||a({...t,...m});const E=await o.getDimensions(i.floating);return w.width!==E.width||w.height!==E.height?{reset:{rects:!0}}:{}}}};function Vg(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Yr(e){if(e==null)return window;if(!Vg(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Si(e){return Yr(e).getComputedStyle(e)}function Jr(e){return Vg(e)?"":e?(e.nodeName||"").toLowerCase():""}function zg(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Dr(e){return e instanceof Yr(e).HTMLElement}function mn(e){return e instanceof Yr(e).Element}function Ec(e){return typeof ShadowRoot>"u"?!1:e instanceof Yr(e).ShadowRoot||e instanceof ShadowRoot}function Xa(e){const{overflow:t,overflowX:r,overflowY:n}=Si(e);return/auto|scroll|overlay|hidden/.test(t+n+r)}function UC(e){return["table","td","th"].includes(Jr(e))}function Gg(e){const t=/firefox/i.test(zg()),r=Si(e);return r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].includes(r.willChange)||t&&r.willChange==="filter"||t&&!!r.filter&&r.filter!=="none"}function Kg(){return!/^((?!chrome|android).)*safari/i.test(zg())}const qg=Math.min,$i=Math.max,Za=Math.round;function Xr(e,t,r){var n,o,i,a;t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Dr(e)&&(l=e.offsetWidth>0&&Za(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Za(s.height)/e.offsetHeight||1);const f=mn(e)?Yr(e):window,d=!Kg()&&r,p=(s.left+(d&&(n=(o=f.visualViewport)==null?void 0:o.offsetLeft)!=null?n:0))/l,h=(s.top+(d&&(i=(a=f.visualViewport)==null?void 0:a.offsetTop)!=null?i:0))/u,g=s.width/l,v=s.height/u;return{width:g,height:v,top:h,right:p+g,bottom:h+v,left:p,x:p,y:h}}function bn(e){return(t=e,(t instanceof Yr(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Qa(e){return mn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Yg(e){return Xr(bn(e)).left+Qa(e).scrollLeft}function WC(e,t,r){const n=Dr(t),o=bn(t),i=Xr(e,n&&function(l){const u=Xr(l);return Za(u.width)!==l.offsetWidth||Za(u.height)!==l.offsetHeight}(t),r==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&r!=="fixed")if((Jr(t)!=="body"||Xa(o))&&(a=Qa(t)),Dr(t)){const l=Xr(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else o&&(s.x=Yg(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function Jg(e){return Jr(e)==="html"?e:e.assignedSlot||e.parentNode||(Ec(e)?e.host:null)||bn(e)}function Xg(e){return Dr(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function xc(e){const t=Yr(e);let r=Xg(e);for(;r&&UC(r)&&getComputedStyle(r).position==="static";)r=Xg(r);return r&&(Jr(r)==="html"||Jr(r)==="body"&&getComputedStyle(r).position==="static"&&!Gg(r))?t:r||function(n){let o=Jg(n);for(Ec(o)&&(o=o.host);Dr(o)&&!["html","body"].includes(Jr(o));){if(Gg(o))return o;o=o.parentNode}return null}(e)||t}function Zg(e){if(Dr(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Xr(e);return{width:t.width,height:t.height}}function Qg(e){const t=Jg(e);return["html","body","#document"].includes(Jr(t))?e.ownerDocument.body:Dr(t)&&Xa(t)?t:Qg(t)}function es(e,t){var r;t===void 0&&(t=[]);const n=Qg(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=Yr(n),a=o?[i].concat(i.visualViewport||[],Xa(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(es(a))}function ev(e,t,r){return t==="viewport"?Ya(function(n,o){const i=Yr(n),a=bn(n),s=i.visualViewport;let l=a.clientWidth,u=a.clientHeight,f=0,d=0;if(s){l=s.width,u=s.height;const p=Kg();(p||!p&&o==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}return{width:l,height:u,x:f,y:d}}(e,r)):mn(t)?function(n,o){const i=Xr(n,!1,o==="fixed"),a=i.top+n.clientTop,s=i.left+n.clientLeft;return{top:a,left:s,x:s,y:a,right:s+n.clientWidth,bottom:a+n.clientHeight,width:n.clientWidth,height:n.clientHeight}}(t,r):Ya(function(n){var o;const i=bn(n),a=Qa(n),s=(o=n.ownerDocument)==null?void 0:o.body,l=$i(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=$i(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let f=-a.scrollLeft+Yg(n);const d=-a.scrollTop;return Si(s||i).direction==="rtl"&&(f+=$i(i.clientWidth,s?s.clientWidth:0)-l),{width:l,height:u,x:f,y:d}}(bn(e)))}function HC(e){const t=es(e),r=["absolute","fixed"].includes(Si(e).position)&&Dr(e)?xc(e):e;return mn(r)?t.filter(n=>mn(n)&&function(o,i){const a=i.getRootNode==null?void 0:i.getRootNode();if(o.contains(i))return!0;if(a&&Ec(a)){let s=i;do{if(s&&o===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(n,r)&&Jr(n)!=="body"):[]}const VC={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?HC(t):[].concat(r),n],a=i[0],s=i.reduce((l,u)=>{const f=ev(t,u,o);return l.top=$i(f.top,l.top),l.right=qg(f.right,l.right),l.bottom=qg(f.bottom,l.bottom),l.left=$i(f.left,l.left),l},ev(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Dr(r),i=bn(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&n!=="fixed")&&((Jr(r)!=="body"||Xa(i))&&(a=Qa(r)),Dr(r))){const l=Xr(r,!0);s.x=l.x+r.clientLeft,s.y=l.y+r.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:mn,getDimensions:Zg,getOffsetParent:xc,getDocumentElement:bn,getElementRects:e=>{let{reference:t,floating:r,strategy:n}=e;return{reference:WC(t,xc(r),n),floating:{...Zg(r),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Si(e).direction==="rtl"};function zC(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o&&!s,u=i&&!s,f=l||u?[...mn(e)?es(e):[],...es(t)]:[];f.forEach(g=>{l&&g.addEventListener("scroll",r,{passive:!0}),u&&g.addEventListener("resize",r)});let d,p=null;if(a){let g=!0;p=new ResizeObserver(()=>{g||r(),g=!1}),mn(e)&&!s&&p.observe(e),p.observe(t)}let h=s?Xr(e):null;return s&&function g(){const v=Xr(e);!h||v.x===h.x&&v.y===h.y&&v.width===h.width&&v.height===h.height||r(),h=v,d=requestAnimationFrame(g)}(),r(),()=>{var g;f.forEach(v=>{l&&v.removeEventListener("scroll",r),u&&v.removeEventListener("resize",r)}),(g=p)==null||g.disconnect(),p=null,s&&cancelAnimationFrame(d)}}const GC=(e,t,r)=>IC(e,t,{platform:VC,...r});var Sc=typeof document<"u"?c.useLayoutEffect:c.useEffect;function $c(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!$c(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!$c(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function KC(e){const t=ve.useRef(e);return Sc(()=>{t.current=e}),t}function qC(e){let{middleware:t,placement:r="bottom",strategy:n="absolute",whileElementsMounted:o}=e===void 0?{}:e;const i=ve.useRef(null),a=ve.useRef(null),s=KC(o),l=ve.useRef(null),[u,f]=ve.useState({x:null,y:null,strategy:n,placement:r,middlewareData:{}}),[d,p]=ve.useState(t);$c(d==null?void 0:d.map(E=>{let{options:x}=E;return x}),t==null?void 0:t.map(E=>{let{options:x}=E;return x}))||p(t);const h=ve.useCallback(()=>{!i.current||!a.current||GC(i.current,a.current,{middleware:d,placement:r,strategy:n}).then(E=>{g.current&&Od.flushSync(()=>{f(E)})})},[d,r,n]);Sc(()=>{g.current&&h()},[h]);const g=ve.useRef(!1);Sc(()=>(g.current=!0,()=>{g.current=!1}),[]);const v=ve.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),i.current&&a.current)if(s.current){const E=s.current(i.current,a.current,h);l.current=E}else h()},[h,s]),y=ve.useCallback(E=>{i.current=E,v()},[v]),m=ve.useCallback(E=>{a.current=E,v()},[v]),w=ve.useMemo(()=>({reference:i,floating:a}),[]);return ve.useMemo(()=>({...u,update:h,refs:w,reference:y,floating:m}),[u,h,w,y,m])}const YC=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?jg({element:t.current,padding:r}).fn(o):{}:t?jg({element:t,padding:r}).fn(o):{}}}},JC=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(ft.svg,be({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))}),tv="Popper",[Cc,rv]=dn(tv),[XC,nv]=Cc(tv),ZC=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(XC,{scope:t,anchor:n,onAnchorChange:o},r)},QC="PopperAnchor",eA=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=nv(QC,r),a=c.useRef(null),s=At(t,a);return c.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:c.createElement(ft.div,be({},o,{ref:s}))}),ts="PopperContent",[tA,rA]=Cc(ts),[nA,oA]=Cc(ts,{hasParent:!1,positionUpdateFns:new Set}),iA=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:g=0,arrowPadding:v=0,collisionBoundary:y=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:k,...I}=e,S=nv(ts,f),[C,P]=c.useState(null),F=At(t,Te=>P(Te)),[D,N]=c.useState(null),J=lg(D),K=(r=J==null?void 0:J.width)!==null&&r!==void 0?r:0,Y=(n=J==null?void 0:J.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(y)?y:[y],ae=le.length>0,ge={padding:oe,boundary:le.filter(uA),altBoundary:ae},{reference:ce,floating:q,strategy:H,x:re,y:de,placement:U,middlewareData:z,update:M}=qC({strategy:"fixed",placement:te,whileElementsMounted:zC,middleware:[fA(),FC({mainAxis:p+Y,alignmentAxis:g}),x?jC({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?BC():void 0,...ge}):void 0,D?YC({element:D,padding:v}):void 0,x?LC({...ge}):void 0,RC({...ge,apply:({elements:Te,availableWidth:Me,availableHeight:bt})=>{Te.floating.style.setProperty("--radix-popper-available-width",`${Me}px`),Te.floating.style.setProperty("--radix-popper-available-height",`${bt}px`)}}),dA({arrowWidth:K,arrowHeight:Y}),E?MC({strategy:"referenceHidden"}):void 0].filter(cA)});Ir(()=>{ce(S.anchor)},[ce,S.anchor]);const R=re!==null&&de!==null,[G,O]=ov(U),T=Vt(k);Ir(()=>{R&&(T==null||T())},[R,T]);const Z=(o=z.arrow)===null||o===void 0?void 0:o.x,ne=(i=z.arrow)===null||i===void 0?void 0:i.y,pe=((a=z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[me,xe]=c.useState();Ir(()=>{C&&xe(window.getComputedStyle(C).zIndex)},[C]);const{hasParent:Ee,positionUpdateFns:ie}=oA(ts,f),Ne=!Ee;c.useLayoutEffect(()=>{if(!Ne)return ie.add(M),()=>{ie.delete(M)}},[Ne,ie,M]),Ir(()=>{Ne&&R&&Array.from(ie).reverse().forEach(Te=>requestAnimationFrame(Te))},[Ne,R,ie]);const dt={"data-side":G,"data-align":O,...I,ref:F,style:{...I.style,animation:R?void 0:"none",opacity:(s=z.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return c.createElement("div",{ref:q,"data-radix-popper-content-wrapper":"",style:{position:H,left:0,top:0,transform:R?`translate3d(${Math.round(re)}px, ${Math.round(de)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(l=z.transformOrigin)===null||l===void 0?void 0:l.x,(u=z.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},c.createElement(tA,{scope:f,placedSide:G,onArrowChange:N,arrowX:Z,arrowY:ne,shouldHideArrow:pe},Ne?c.createElement(nA,{scope:f,hasParent:!0,positionUpdateFns:ie},c.createElement(ft.div,dt)):c.createElement(ft.div,dt)))}),aA="PopperArrow",sA={top:"bottom",right:"left",bottom:"top",left:"right"},lA=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=rA(aA,n),a=sA[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(JC,be({},o,{ref:r,style:{...o.style,display:"block"}})))});function cA(e){return e!==void 0}function uA(e){return e!==null}const fA=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:r}=e,{width:n,height:o}=t.reference;return r.floating.style.setProperty("--radix-popper-anchor-width",`${n}px`),r.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),dA=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,v]=ov(s),y={start:"0%",center:"50%",end:"100%"}[v],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return g==="bottom"?(E=d?y:`${m}px`,x=`${-h}px`):g==="top"?(E=d?y:`${m}px`,x=`${l.floating.height+h}px`):g==="right"?(E=`${-h}px`,x=d?y:`${w}px`):g==="left"&&(E=`${l.floating.width+h}px`,x=d?y:`${w}px`),{data:{x:E,y:x}}}});function ov(e){const[t,r="center"]=e.split("-");return[t,r]}const pA=ZC,hA=eA,gA=iA,vA=lA,mA=c.forwardRef((e,t)=>c.createElement(ft.span,be({},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}}))),[rs,Q9]=dn("Tooltip",[rv]),ns=rv(),bA="TooltipProvider",yA=700,Ac="tooltip.open",[wA,Oc]=rs(bA),_A=e=>{const{__scopeTooltip:t,delayDuration:r=yA,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=c.useState(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),c.createElement(wA,{scope:t,isOpenDelayed:a,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(f=>{l.current=f},[]),disableHoverableContent:o},i)},Tc="Tooltip",[EA,Ci]=rs(Tc),xA=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=Oc(Tc,e.__scopeTooltip),u=ns(t),[f,d]=c.useState(null),p=pi(),h=c.useRef(0),g=a??l.disableHoverableContent,v=s??l.delayDuration,y=c.useRef(!1),[m=!1,w]=xa({prop:n,defaultProp:o,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ac))):l.onClose(),i==null||i(S)}}),E=c.useMemo(()=>m?y.current?"delayed-open":"instant-open":"closed",[m]),x=c.useCallback(()=>{window.clearTimeout(h.current),y.current=!1,w(!0)},[w]),k=c.useCallback(()=>{window.clearTimeout(h.current),w(!1)},[w]),I=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,w(!0)},v)},[v,w]);return c.useEffect(()=>()=>window.clearTimeout(h.current),[]),c.createElement(pA,u,c.createElement(EA,{scope:t,contentId:p,open:m,stateAttribute:E,trigger:f,onTriggerChange:d,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayed?I():x()},[l.isOpenDelayed,I,x]),onTriggerLeave:c.useCallback(()=>{g?k():window.clearTimeout(h.current)},[k,g]),onOpen:x,onClose:k,disableHoverableContent:g},r))},iv="TooltipTrigger",SA=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ci(iv,r),i=Oc(iv,r),a=ns(r),s=c.useRef(null),l=At(t,s,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),c.createElement(hA,be({asChild:!0},a),c.createElement(ft.button,be({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},n,{ref:l,onPointerMove:pt(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:pt(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:pt(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:pt(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:pt(e.onBlur,o.onClose),onClick:pt(e.onClick,o.onClose)})))}),av="TooltipPortal",[$A,CA]=rs(av,{forceMount:void 0}),AA=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Ci(av,t);return c.createElement($A,{scope:t,forceMount:r},c.createElement(ir,{present:r||i.open},c.createElement(Ap,{asChild:!0,container:o},n)))},Ai="TooltipContent",OA=c.forwardRef((e,t)=>{const r=CA(Ai,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Ci(Ai,e.__scopeTooltip);return c.createElement(ir,{present:n||a.open},a.disableHoverableContent?c.createElement(sv,be({side:o},i,{ref:t})):c.createElement(TA,be({side:o},i,{ref:t})))}),TA=c.forwardRef((e,t)=>{const r=Ci(Ai,e.__scopeTooltip),n=Oc(Ai,e.__scopeTooltip),o=c.useRef(null),i=At(t,o),[a,s]=c.useState(null),{trigger:l,onClose:u}=r,f=o.current,{onPointerInTransitChange:d}=n,p=c.useCallback(()=>{s(null),d(!1)},[d]),h=c.useCallback((g,v)=>{const y=g.currentTarget,m={x:g.clientX,y:g.clientY},w=DA(m,y.getBoundingClientRect()),E=w==="right"||w==="bottom"?-5:5,k=w==="right"||w==="left"?{x:g.clientX+E,y:g.clientY}:{x:g.clientX,y:g.clientY+E},I=LA(v.getBoundingClientRect()),S=FA([k,...I]);s(S),d(!0)},[d]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&f){const g=y=>h(y,f),v=y=>h(y,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",v)}}},[l,f,h,p]),c.useEffect(()=>{if(a){const g=v=>{const y=v.target,m={x:v.clientX,y:v.clientY},w=(l==null?void 0:l.contains(y))||(f==null?void 0:f.contains(y)),E=!MA(m,a);w?p():E&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,a,u,p]),c.createElement(sv,be({},e,{ref:i}))}),[IA,PA]=rs(Tc,{isInside:!1}),sv=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Ci(Ai,r),u=ns(r),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(Ac,f),()=>document.removeEventListener(Ac,f)),[f]),c.useEffect(()=>{if(l.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),c.createElement(yp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f},c.createElement(gA,be({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.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)"}}),c.createElement(Ml,null,n),c.createElement(IA,{scope:r,isInside:!0},c.createElement(mA,{id:l.contentId,role:"tooltip"},o||n))))}),kA="TooltipArrow",NA=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=ns(r);return PA(kA,r).isInside?null:c.createElement(vA,be({},o,n,{ref:t}))});function DA(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:return null}}function LA(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function MA(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function FA(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),jA(t)}function jA(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}const BA=_A,RA=xA;/*!
82
+ */var mg;function E$(){if(mg)return _i;mg=1;var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,u){var f,d={},p=null,h=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(d[f]=l[f]);if(s&&s.defaultProps)for(f in l=s.defaultProps,l)d[f]===void 0&&(d[f]=l[f]);return{$$typeof:t,type:s,key:p,ref:h,props:d,_owner:o.current}}return _i.Fragment=r,_i.jsx=a,_i.jsxs=a,_i}process.env.NODE_ENV==="production"?vc.exports=E$():vc.exports=_$();var or=vc.exports;const bg=c.createContext(6),yg=()=>c.useContext(bg),wg=c.createContext(null),x$=()=>c.useContext(wg),S$=e=>or.jsx(bg.Provider,{value:e.length,children:or.jsx(wg.Provider,{value:e.selection,children:e.children})}),$$=(e,[t,r])=>typeof t!="number"||typeof r!="number"?null:t===r&&t===e?"cursor":e>=t&&e<r?"selected":null,C$=(e,[t,r])=>e<t?-1:e>=r?1:0,A$=(e,t)=>Array(e).fill(null).map((n,o)=>({state:$$(o,t),position:C$(o,t)})),O$=e=>or.jsx("div",{...e,"aria-hidden":!0,style:{position:"absolute",left:0,right:0,top:0,bottom:0,display:"flex",justifyContent:"space-between",zIndex:-1,...e.style}}),T$=e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.scrollTop=0,e.currentTarget.scrollLeft=0},I$=e=>or.jsx("div",{...e,onScroll:T$,style:{...e.style,height:"100%",overflow:"hidden"}}),P$=c.forwardRef((e,t)=>{const r=yg();return or.jsx("input",{...e,width:void 0,minLength:r,maxLength:r,ref:t,style:{...e.style,font:"inherit",letterSpacing:"inherit",textIndent:"inherit",background:"transparent",appearance:"none",display:"block",width:e.width||"200%",padding:"0",margin:"0",border:"0 solid transparent",outline:"none"}})}),k$=e=>{const t=x$(),r=yg(),n=t,i=A$(r,n).map(({state:a,position:s},l)=>e.children({index:l,state:a,position:s,selection:n}));return or.jsx(or.Fragment,{children:i})},N$=({renderSegment:e,length:t=6,fontFamily:r="'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', monospace",fontSize:n="2rem",padding:o="0.25rem",paddingY:i=o,paddingX:a=o,spacing:s="0.5rem",characterWidth:l="1ch",style:u,className:f,inputClassName:d,inputStyle:p,segmentWidth:h=`calc(${l} + ${a} * 2)`,inputWidth:g=`calc(100% + ${h} + ${s})`,inputRef:v,scrollWrapperClassName:y,segmentWrapperClassName:m,rootProps:w,...E})=>{const x=w$(v),k={...u,position:"relative",width:`calc(${h} * ${t} + ${s} * ${t-1})`,fontFamily:r,fontSize:n,textIndent:a,letterSpacing:`calc(${a} * 2 + ${s})`,lineHeight:`calc(${n} + ${i} * 2)`,zIndex:0},I={className:d,style:p,ref:v};return or.jsx(S$,{length:t,selection:x,children:or.jsxs("div",{...w,className:f,style:k,children:[or.jsx(O$,{className:m,children:or.jsx(k$,{children:e})}),or.jsx(I$,{className:y,onMouseDownCapture:S=>{var N,J;if(S.button!==0||S.ctrlKey||S.shiftKey||S.metaKey||!(S.currentTarget instanceof HTMLElement)||!(v.current instanceof HTMLInputElement))return;S.stopPropagation(),S.preventDefault();const{left:C,width:P}=S.currentTarget.getBoundingClientRect(),F=S.clientX-C,D=Math.floor(F/P*t);document.activeElement!==v.current&&((N=v.current)==null||N.focus()),(J=v.current)==null||J.setSelectionRange(D,D+1)},onDoubleClickCapture:()=>{var S;(S=v.current)==null||S.setSelectionRange(0,t)},children:or.jsx(P$,{width:g,...E,...I})})]})})},D$=e=>`calc(1ch + ${e} * 2)`;var Rt="Input",[L$,q9]=kr(Rt,[]),[M$,ir]=L$(Rt),_g=({__inputScope:e,id:t,descriptionId:r,errorMessageId:n,validationValence:o="neutral",children:i})=>{const a=xt("input",t),s=xt("input__description",r),l=xt("input__error-message",n);return c.createElement(M$,{id:a,descriptionId:s,errorMessageId:l,validationValence:o,scope:e},i)};_g.displayName=Rt;var F$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{id:i}=ir(Rt,e),a=t?$t:Ge.label;return c.createElement(a,{...n,htmlFor:i,ref:o},r)}),j$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=ir(Rt,e),s=t?$t:Ge.span;return c.createElement(s,{...n,...a==="error"&&{id:i},ref:o},r)}),B$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{errorMessageId:i}=ir(Rt,e),a=t?$t:Ge.span;return c.createElement(a,{...n,id:i,ref:o},r)}),R$=c.forwardRef((e,t)=>{const{__inputScope:r,asChild:n,children:o,...i}=e,{validationValence:a}=ir(Rt,r);if(a==="error")return c.createElement(B$,{...e,ref:t});{const s=n?$t:Ge.span;return c.createElement(s,{...i,ref:t},o)}}),U$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=ir(Rt,e),s=t?$t:Ge.p;return c.createElement(s,{...n,...a!=="error"&&{id:i},ref:o},r)}),W$=c.forwardRef(({__inputScope:e,segmentClassName:t,inputClassName:r,segmentPadding:n="13px",segmentHeight:o="100%",...i},a)=>{const{id:s,validationValence:l,descriptionId:u,errorMessageId:f}=ir(Rt,e),d=D$(n),p=Tl(a),h=yw(p),g=c.useCallback(({state:v,index:y})=>c.createElement("div",{key:y,className:t==null?void 0:t({focused:!!(h&&v),validationValence:l}),"data-state":v,style:{width:d,height:o}}),[t,h,l]);return c.createElement(N$,{padding:"8px",spacing:"8px",fontFamily:"",spellCheck:!1,length:6,...i,id:s,"aria-describedby":u,...l==="error"&&{"aria-invalid":"true","aria-errormessage":f},inputRef:p,renderSegment:g,className:r})}),H$=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=ir(Rt,e);return c.createElement(Ge.input,{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})}),V$=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=ir(Rt,e);return c.createElement("textarea",{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})});const Eg="Collapsible",[z$,Y9]=pn(Eg),[G$,mc]=z$(Eg),K$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,u]=Sa({prop:n,defaultProp:o,onChange:a});return c.createElement(G$,{scope:r,disabled:i,contentId:hi(),open:l,onOpenToggle:c.useCallback(()=>u(f=>!f),[u])},c.createElement(dt.div,it({"data-state":bc(l),"data-disabled":i?"":void 0},s,{ref:t})))}),q$="CollapsibleTrigger",Y$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=mc(q$,r);return c.createElement(dt.button,it({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":bc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},n,{ref:t,onClick:ht(e.onClick,o.onOpenToggle)}))}),xg="CollapsibleContent",J$=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=mc(xg,e.__scopeCollapsible);return c.createElement(ar,{present:r||o.open},({present:i})=>c.createElement(X$,it({},n,{ref:t,present:i})))}),X$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=mc(xg,r),[s,l]=c.useState(n),u=c.useRef(null),f=Ot(t,u),d=c.useRef(0),p=d.current,h=c.useRef(0),g=h.current,v=a.open||s,y=c.useRef(v),m=c.useRef();return c.useEffect(()=>{const w=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(w)},[]),Pr(()=>{const w=u.current;if(w){m.current=m.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const E=w.getBoundingClientRect();d.current=E.height,h.current=E.width,y.current||(w.style.transitionDuration=m.current.transitionDuration,w.style.animationName=m.current.animationName),l(n)}},[a.open,n]),c.createElement(dt.div,it({"data-state":bc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v},i,{ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":g?`${g}px`:void 0,...e.style}}),v&&o)});function bc(e){return e?"open":"closed"}const Z$=K$,Q$=Y$,eC=J$;var Ga="List",[tC,J9]=kr(Ga,[]),[rC,nC]=tC(Ga),Sg=c.forwardRef((e,t)=>{const{__listScope:r,variant:n="ordered",selectable:o=!1,itemSizes:i,children:a,...s}=e,l=n==="ordered"?Ge.ol:Ge.ul;return c.createElement(l,{...o&&{role:"listbox","aria-multiselectable":!0},...s,ref:t},c.createElement(rC,{scope:r,variant:n,selectable:o,itemSizes:i},a))});Sg.displayName=Ga;var Ei="ListItem",[oC,X9]=kr(Ei,[]),[iC,$g]=oC(Ei),aC=c.forwardRef(({children:e,asChild:t,__listItemScope:r,...n},o)=>{const{headingId:i}=$g(Ei,r),a=t?$t:Ge.div;return c.createElement(a,{...n,id:i,ref:o},e)}),sC=Q$,lC=eC,Cg=c.forwardRef((e,t)=>{const r=xt("listItem",e.id),{__listScope:n,__listItemScope:o,children:i,selected:a,defaultSelected:s,onSelectedChange:l,open:u,defaultOpen:f,onOpenChange:d,collapsible:p,labelId:h,...g}=e,{selectable:v}=nC(Ga,n),[y=!1,m]=qr({prop:a,defaultProp:s,onChange:l}),[w=!1,E]=qr({prop:u,defaultProp:f,onChange:d}),x=xt("listItem__heading",h),k=c.createElement(Ge.li,{...g,id:r,ref:t,"aria-labelledby":x,...v&&{role:"option","aria-selected":!!y},...w&&{"aria-expanded":!0}},i);return c.createElement(iC,{scope:o,headingId:x,open:w,selected:y,setSelected:m},p?c.createElement(Z$,{asChild:!0,open:w,onOpenChange:E},k):k)});Cg.displayName=Ei;function cC(e,[t,r]){return Math.min(r,Math.max(t,e))}function uC(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ag="ScrollArea",[Og,Z9]=pn(Ag),[fC,lr]=Og(Ag),dC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=c.useState(null),[u,f]=c.useState(null),[d,p]=c.useState(null),[h,g]=c.useState(null),[v,y]=c.useState(null),[m,w]=c.useState(0),[E,x]=c.useState(0),[k,I]=c.useState(!1),[S,C]=c.useState(!1),P=Ot(t,D=>l(D)),F=W_(o);return c.createElement(fC,{scope:r,type:n,dir:F,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:f,content:d,onContentChange:p,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:k,onScrollbarXEnabledChange:I,scrollbarY:v,onScrollbarYChange:y,scrollbarYEnabled:S,onScrollbarYEnabledChange:C,onCornerWidthChange:w,onCornerHeightChange:x},c.createElement(dt.div,it({dir:F},a,{ref:P,style:{position:"relative","--radix-scroll-area-corner-width":m+"px","--radix-scroll-area-corner-height":E+"px",...e.style}})))}),pC="ScrollAreaViewport",hC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,i=lr(pC,r),a=c.useRef(null),s=Ot(t,a,i.onViewportChange);return c.createElement(c.Fragment,null,c.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),c.createElement(dt.div,it({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),c.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),Yr="ScrollAreaScrollbar",gC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=lr(Yr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return c.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?c.createElement(vC,it({},n,{ref:t,forceMount:r})):o.type==="scroll"?c.createElement(mC,it({},n,{ref:t,forceMount:r})):o.type==="auto"?c.createElement(Tg,it({},n,{ref:t,forceMount:r})):o.type==="always"?c.createElement(yc,it({},n,{ref:t})):null}),vC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=lr(Yr,e.__scopeScrollArea),[i,a]=c.useState(!1);return c.useEffect(()=>{const s=o.scrollArea;let l=0;if(s){const u=()=>{window.clearTimeout(l),a(!0)},f=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),c.createElement(ar,{present:r||i},c.createElement(Tg,it({"data-state":i?"visible":"hidden"},n,{ref:t})))}),mC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=lr(Yr,e.__scopeScrollArea),i=e.orientation==="horizontal",a=Ya(()=>l("SCROLL_END"),100),[s,l]=uC("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,l]),c.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let d=u[f];const p=()=>{const h=u[f];d!==h&&(l("SCROLL"),a()),d=h};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,i,l,a]),c.createElement(ar,{present:r||s!=="hidden"},c.createElement(yc,it({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:ht(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:ht(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),Tg=c.forwardRef((e,t)=>{const r=lr(Yr,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=c.useState(!1),s=e.orientation==="horizontal",l=Ya(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?u:f)}},10);return _o(r.viewport,l),_o(r.content,l),c.createElement(ar,{present:n||i},c.createElement(yc,it({"data-state":i?"visible":"hidden"},o,{ref:t})))}),yc=c.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=lr(Yr,e.__scopeScrollArea),i=c.useRef(null),a=c.useRef(0),[s,l]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Ng(s.viewport,s.content),f={...n,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function d(p,h){return $C(p,a.current,s,h)}return r==="horizontal"?c.createElement(bC,it({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,h=Dg(p,s,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=d(p,o.dir))}})):r==="vertical"?c.createElement(yC,it({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,h=Dg(p,s);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=d(p))}})):null}),bC=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=lr(Yr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=Ot(t,l,i.onScrollbarXChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Pg,it({"data-orientation":"horizontal"},o,{ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":qa(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),Mg(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Ka(a.paddingLeft),paddingEnd:Ka(a.paddingRight)}})}}))}),yC=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=lr(Yr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=Ot(t,l,i.onScrollbarYChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Pg,it({"data-orientation":"vertical"},o,{ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":qa(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),Mg(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Ka(a.paddingTop),paddingEnd:Ka(a.paddingBottom)}})}}))}),[wC,Ig]=Og(Yr),Pg=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:d,...p}=e,h=lr(Yr,r),[g,v]=c.useState(null),y=Ot(t,P=>v(P)),m=c.useRef(null),w=c.useRef(""),E=h.viewport,x=n.content-n.viewport,k=zt(f),I=zt(l),S=Ya(d,10);function C(P){if(m.current){const F=P.clientX-m.current.left,D=P.clientY-m.current.top;u({x:F,y:D})}}return c.useEffect(()=>{const P=F=>{const D=F.target;(g==null?void 0:g.contains(D))&&k(F,x)};return document.addEventListener("wheel",P,{passive:!1}),()=>document.removeEventListener("wheel",P,{passive:!1})},[E,g,x,k]),c.useEffect(I,[n,I]),_o(g,S),_o(h.content,S),c.createElement(wC,{scope:r,scrollbar:g,hasThumb:o,onThumbChange:zt(i),onThumbPointerUp:zt(a),onThumbPositionChange:I,onThumbPointerDown:zt(s)},c.createElement(dt.div,it({},p,{ref:y,style:{position:"absolute",...p.style},onPointerDown:ht(e.onPointerDown,P=>{P.button===0&&(P.target.setPointerCapture(P.pointerId),m.current=g.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C(P))}),onPointerMove:ht(e.onPointerMove,C),onPointerUp:ht(e.onPointerUp,P=>{const F=P.target;F.hasPointerCapture(P.pointerId)&&F.releasePointerCapture(P.pointerId),document.body.style.webkitUserSelect=w.current,m.current=null})})))}),wc="ScrollAreaThumb",_C=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ig(wc,e.__scopeScrollArea);return c.createElement(ar,{present:r||o.hasThumb},c.createElement(EC,it({ref:t},n)))}),EC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=lr(wc,r),a=Ig(wc,r),{onThumbPositionChange:s}=a,l=Ot(t,d=>a.onThumbChange(d)),u=c.useRef(),f=Ya(()=>{u.current&&(u.current(),u.current=void 0)},100);return c.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(f(),!u.current){const h=CC(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,f,s]),c.createElement(dt.div,it({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:ht(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,v=d.clientY-h.top;a.onThumbPointerDown({x:g,y:v})}),onPointerUp:ht(e.onPointerUp,a.onThumbPointerUp)}))}),kg="ScrollAreaCorner",xC=c.forwardRef((e,t)=>{const r=lr(kg,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.createElement(SC,it({},e,{ref:t})):null}),SC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=lr(kg,r),[i,a]=c.useState(0),[s,l]=c.useState(0),u=!!(i&&s);return _o(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),_o(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),u?c.createElement(dt.div,it({},n,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Ka(e){return e?parseInt(e,10):0}function Ng(e,t){const r=e/t;return isNaN(r)?0:r}function qa(e){const t=Ng(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function $C(e,t,r,n="ltr"){const o=qa(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return Lg([l,u],d)(e)}function Dg(e,t,r="ltr"){const n=qa(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],u=cC(e,l);return Lg([0,a],[0,s])(u)}function Lg(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Mg(e,t){return e>0&&e<t}const CC=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Ya(e,t){const r=zt(e),n=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(n.current),[]),c.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function _o(e,t){const r=zt(t);Pr(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const AC=dC,OC=hC,TC=gC,IC=_C,PC=xC;function jn(e){return e.split("-")[0]}function xi(e){return e.split("-")[1]}function Eo(e){return["top","bottom"].includes(jn(e))?"x":"y"}function _c(e){return e==="y"?"height":"width"}function Fg(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=Eo(t),l=_c(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(jn(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(xi(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const kC=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Fg(l,n,s),d=n,p={},h=0;for(let g=0;g<i.length;g++){const{name:v,fn:y}=i[g],{x:m,y:w,data:E,reset:x}=await y({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});u=m??u,f=w??f,p={...p,[v]:{...p[v],...E}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(l=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=Fg(l,d,s)),g=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};function jg(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function Ja(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Si(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,g=jg(h),v=s[p?d==="floating"?"reference":"floating":d],y=Ja(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(v)))==null||r?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=Ja(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:d==="floating"?{...a.floating,x:n,y:o}:a.reference,offsetParent:await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[d]);return{top:y.top-m.top+g.top,bottom:m.bottom-y.bottom+g.bottom,left:y.left-m.left+g.left,right:m.right-y.right+g.right}}const NC=Math.min,Bn=Math.max;function Ec(e,t,r){return Bn(e,NC(t,r))}const Bg=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e??{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(r==null)return{};const u=jg(n),f={x:o,y:i},d=Eo(a),p=xi(a),h=_c(d),g=await l.getDimensions(r),v=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=s.reference[h]+s.reference[d]-f[d]-s.floating[h],w=f[d]-s.reference[d],E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let x=E?d==="y"?E.clientHeight||0:E.clientWidth||0:0;x===0&&(x=s.floating[h]);const k=m/2-w/2,I=u[v],S=x-g[h]-u[y],C=x/2-g[h]/2+k,P=Ec(I,C,S),F=(p==="start"?u[v]:u[y])>0&&C!==P&&s.reference[h]<=s.floating[h];return{[d]:f[d]-(F?C<I?I-C:S-C:0),data:{[d]:P,centerOffset:C-P}}}}),DC={left:"right",right:"left",bottom:"top",top:"bottom"};function Xa(e){return e.replace(/left|right|bottom|top/g,t=>DC[t])}function LC(e,t,r){r===void 0&&(r=!1);const n=xi(e),o=Eo(e),i=_c(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Xa(a)),{main:a,cross:Xa(a)}}const MC={start:"end",end:"start"};function Rg(e){return e.replace(/start|end/g,t=>MC[t])}const Ug=["top","right","bottom","left"];Ug.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const FC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",flipAlignment:h=!0,...g}=e,v=jn(n),y=d||(v===a||!h?[Xa(a)]:function(C){const P=Xa(C);return[Rg(C),P,Rg(P)]}(a)),m=[a,...y],w=await Si(t,g),E=[];let x=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&E.push(w[v]),f){const{main:C,cross:P}=LC(n,i,await(s.isRTL==null?void 0:s.isRTL(l.floating)));E.push(w[C],w[P])}if(x=[...x,{placement:n,overflows:E}],!E.every(C=>C<=0)){var k,I;const C=((k=(I=o.flip)==null?void 0:I.index)!=null?k:0)+1,P=m[C];if(P)return{data:{index:C,overflows:x},reset:{placement:P}};let F="bottom";switch(p){case"bestFit":{var S;const D=(S=x.map(N=>[N,N.overflows.filter(J=>J>0).reduce((J,K)=>J+K,0)]).sort((N,J)=>N[1]-J[1])[0])==null?void 0:S[0].placement;D&&(F=D);break}case"initialPlacement":F=a}if(n!==F)return{reset:{placement:F}}}return{}}}};function Wg(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Hg(e){return Ug.some(t=>e[t]>=0)}const jC=function(e){let{strategy:t="referenceHidden",...r}=e===void 0?{}:e;return{name:"hide",async fn(n){const{rects:o}=n;switch(t){case"referenceHidden":{const i=Wg(await Si(n,{...r,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Hg(i)}}}case"escaped":{const i=Wg(await Si(n,{...r,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:Hg(i)}}}default:return{}}}}},BC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=jn(s),p=xi(s),h=Eo(s)==="x",g=["left","top"].includes(d)?-1:1,v=f&&h?-1:1,y=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*v,y:m*g}:{x:m*g,y:w*v}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function Vg(e){return e==="x"?"y":"x"}const RC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:m,y:w}=y;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await Si(t,l),d=Eo(jn(o)),p=Vg(d);let h=u[d],g=u[p];if(i){const y=d==="y"?"bottom":"right";h=Ec(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";g=Ec(g+f[p==="y"?"top":"left"],g,g-f[y])}const v=s.fn({...t,[d]:h,[p]:g});return{...v,data:{x:v.x-r,y:v.y-n}}}}},UC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=Eo(o),p=Vg(d);let h=f[d],g=f[p];const v=typeof s=="function"?s({...i,placement:o}):s,y=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const k=d==="y"?"height":"width",I=i.reference[d]-i.floating[k]+y.mainAxis,S=i.reference[d]+i.reference[k]-y.mainAxis;h<I?h=I:h>S&&(h=S)}if(u){var m,w,E,x;const k=d==="y"?"width":"height",I=["top","left"].includes(jn(o)),S=i.reference[p]-i.floating[k]+(I&&(m=(w=a.offset)==null?void 0:w[p])!=null?m:0)+(I?0:y.crossAxis),C=i.reference[p]+i.reference[k]+(I?0:(E=(x=a.offset)==null?void 0:x[p])!=null?E:0)-(I?y.crossAxis:0);g<S?g=S:g>C&&(g=C)}return{[d]:h,[p]:g}}}},WC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a,...s}=e,l=await Si(t,s),u=jn(r),f=xi(r);let d,p;u==="top"||u==="bottom"?(d=u,p=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=u,d=f==="end"?"top":"bottom");const h=Bn(l.left,0),g=Bn(l.right,0),v=Bn(l.top,0),y=Bn(l.bottom,0),m={availableHeight:n.floating.height-(["left","right"].includes(r)?2*(v!==0||y!==0?v+y:Bn(l.top,l.bottom)):l[d]),availableWidth:n.floating.width-(["top","bottom"].includes(r)?2*(h!==0||g!==0?h+g:Bn(l.left,l.right)):l[p])},w=await o.getDimensions(i.floating);a==null||a({...t,...m});const E=await o.getDimensions(i.floating);return w.width!==E.width||w.height!==E.height?{reset:{rects:!0}}:{}}}};function zg(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Jr(e){if(e==null)return window;if(!zg(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function $i(e){return Jr(e).getComputedStyle(e)}function Xr(e){return zg(e)?"":e?(e.nodeName||"").toLowerCase():""}function Gg(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function Lr(e){return e instanceof Jr(e).HTMLElement}function bn(e){return e instanceof Jr(e).Element}function xc(e){return typeof ShadowRoot>"u"?!1:e instanceof Jr(e).ShadowRoot||e instanceof ShadowRoot}function Za(e){const{overflow:t,overflowX:r,overflowY:n}=$i(e);return/auto|scroll|overlay|hidden/.test(t+n+r)}function HC(e){return["table","td","th"].includes(Xr(e))}function Kg(e){const t=/firefox/i.test(Gg()),r=$i(e);return r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].includes(r.willChange)||t&&r.willChange==="filter"||t&&!!r.filter&&r.filter!=="none"}function qg(){return!/^((?!chrome|android).)*safari/i.test(Gg())}const Yg=Math.min,Ci=Math.max,Qa=Math.round;function Zr(e,t,r){var n,o,i,a;t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&Lr(e)&&(l=e.offsetWidth>0&&Qa(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Qa(s.height)/e.offsetHeight||1);const f=bn(e)?Jr(e):window,d=!qg()&&r,p=(s.left+(d&&(n=(o=f.visualViewport)==null?void 0:o.offsetLeft)!=null?n:0))/l,h=(s.top+(d&&(i=(a=f.visualViewport)==null?void 0:a.offsetTop)!=null?i:0))/u,g=s.width/l,v=s.height/u;return{width:g,height:v,top:h,right:p+g,bottom:h+v,left:p,x:p,y:h}}function yn(e){return(t=e,(t instanceof Jr(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function es(e){return bn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Jg(e){return Zr(yn(e)).left+es(e).scrollLeft}function VC(e,t,r){const n=Lr(t),o=yn(t),i=Zr(e,n&&function(l){const u=Zr(l);return Qa(u.width)!==l.offsetWidth||Qa(u.height)!==l.offsetHeight}(t),r==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&r!=="fixed")if((Xr(t)!=="body"||Za(o))&&(a=es(t)),Lr(t)){const l=Zr(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else o&&(s.x=Jg(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function Xg(e){return Xr(e)==="html"?e:e.assignedSlot||e.parentNode||(xc(e)?e.host:null)||yn(e)}function Zg(e){return Lr(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function Sc(e){const t=Jr(e);let r=Zg(e);for(;r&&HC(r)&&getComputedStyle(r).position==="static";)r=Zg(r);return r&&(Xr(r)==="html"||Xr(r)==="body"&&getComputedStyle(r).position==="static"&&!Kg(r))?t:r||function(n){let o=Xg(n);for(xc(o)&&(o=o.host);Lr(o)&&!["html","body"].includes(Xr(o));){if(Kg(o))return o;o=o.parentNode}return null}(e)||t}function Qg(e){if(Lr(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Zr(e);return{width:t.width,height:t.height}}function ev(e){const t=Xg(e);return["html","body","#document"].includes(Xr(t))?e.ownerDocument.body:Lr(t)&&Za(t)?t:ev(t)}function ts(e,t){var r;t===void 0&&(t=[]);const n=ev(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=Jr(n),a=o?[i].concat(i.visualViewport||[],Za(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(ts(a))}function tv(e,t,r){return t==="viewport"?Ja(function(n,o){const i=Jr(n),a=yn(n),s=i.visualViewport;let l=a.clientWidth,u=a.clientHeight,f=0,d=0;if(s){l=s.width,u=s.height;const p=qg();(p||!p&&o==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}return{width:l,height:u,x:f,y:d}}(e,r)):bn(t)?function(n,o){const i=Zr(n,!1,o==="fixed"),a=i.top+n.clientTop,s=i.left+n.clientLeft;return{top:a,left:s,x:s,y:a,right:s+n.clientWidth,bottom:a+n.clientHeight,width:n.clientWidth,height:n.clientHeight}}(t,r):Ja(function(n){var o;const i=yn(n),a=es(n),s=(o=n.ownerDocument)==null?void 0:o.body,l=Ci(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=Ci(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let f=-a.scrollLeft+Jg(n);const d=-a.scrollTop;return $i(s||i).direction==="rtl"&&(f+=Ci(i.clientWidth,s?s.clientWidth:0)-l),{width:l,height:u,x:f,y:d}}(yn(e)))}function zC(e){const t=ts(e),r=["absolute","fixed"].includes($i(e).position)&&Lr(e)?Sc(e):e;return bn(r)?t.filter(n=>bn(n)&&function(o,i){const a=i.getRootNode==null?void 0:i.getRootNode();if(o.contains(i))return!0;if(a&&xc(a)){let s=i;do{if(s&&o===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(n,r)&&Xr(n)!=="body"):[]}const GC={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?zC(t):[].concat(r),n],a=i[0],s=i.reduce((l,u)=>{const f=tv(t,u,o);return l.top=Ci(f.top,l.top),l.right=Yg(f.right,l.right),l.bottom=Yg(f.bottom,l.bottom),l.left=Ci(f.left,l.left),l},tv(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Lr(r),i=yn(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&n!=="fixed")&&((Xr(r)!=="body"||Za(i))&&(a=es(r)),Lr(r))){const l=Zr(r,!0);s.x=l.x+r.clientLeft,s.y=l.y+r.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:bn,getDimensions:Qg,getOffsetParent:Sc,getDocumentElement:yn,getElementRects:e=>{let{reference:t,floating:r,strategy:n}=e;return{reference:VC(t,Sc(r),n),floating:{...Qg(r),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>$i(e).direction==="rtl"};function KC(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o&&!s,u=i&&!s,f=l||u?[...bn(e)?ts(e):[],...ts(t)]:[];f.forEach(g=>{l&&g.addEventListener("scroll",r,{passive:!0}),u&&g.addEventListener("resize",r)});let d,p=null;if(a){let g=!0;p=new ResizeObserver(()=>{g||r(),g=!1}),bn(e)&&!s&&p.observe(e),p.observe(t)}let h=s?Zr(e):null;return s&&function g(){const v=Zr(e);!h||v.x===h.x&&v.y===h.y&&v.width===h.width&&v.height===h.height||r(),h=v,d=requestAnimationFrame(g)}(),r(),()=>{var g;f.forEach(v=>{l&&v.removeEventListener("scroll",r),u&&v.removeEventListener("resize",r)}),(g=p)==null||g.disconnect(),p=null,s&&cancelAnimationFrame(d)}}const qC=(e,t,r)=>kC(e,t,{platform:GC,...r});var $c=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Cc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Cc(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Cc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function YC(e){const t=ve.useRef(e);return $c(()=>{t.current=e}),t}function JC(e){let{middleware:t,placement:r="bottom",strategy:n="absolute",whileElementsMounted:o}=e===void 0?{}:e;const i=ve.useRef(null),a=ve.useRef(null),s=YC(o),l=ve.useRef(null),[u,f]=ve.useState({x:null,y:null,strategy:n,placement:r,middlewareData:{}}),[d,p]=ve.useState(t);Cc(d==null?void 0:d.map(E=>{let{options:x}=E;return x}),t==null?void 0:t.map(E=>{let{options:x}=E;return x}))||p(t);const h=ve.useCallback(()=>{!i.current||!a.current||qC(i.current,a.current,{middleware:d,placement:r,strategy:n}).then(E=>{g.current&&Td.flushSync(()=>{f(E)})})},[d,r,n]);$c(()=>{g.current&&h()},[h]);const g=ve.useRef(!1);$c(()=>(g.current=!0,()=>{g.current=!1}),[]);const v=ve.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),i.current&&a.current)if(s.current){const E=s.current(i.current,a.current,h);l.current=E}else h()},[h,s]),y=ve.useCallback(E=>{i.current=E,v()},[v]),m=ve.useCallback(E=>{a.current=E,v()},[v]),w=ve.useMemo(()=>({reference:i,floating:a}),[]);return ve.useMemo(()=>({...u,update:h,refs:w,reference:y,floating:m}),[u,h,w,y,m])}const XC=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?Bg({element:t.current,padding:r}).fn(o):{}:t?Bg({element:t,padding:r}).fn(o):{}}}},ZC=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(dt.svg,Ke({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))}),rv="Popper",[Ac,nv]=pn(rv),[QC,ov]=Ac(rv),eA=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(QC,{scope:t,anchor:n,onAnchorChange:o},r)},tA="PopperAnchor",rA=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=ov(tA,r),a=c.useRef(null),s=Ot(t,a);return c.useEffect(()=>{i.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:c.createElement(dt.div,Ke({},o,{ref:s}))}),rs="PopperContent",[nA,oA]=Ac(rs),[iA,aA]=Ac(rs,{hasParent:!1,positionUpdateFns:new Set}),sA=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:g=0,arrowPadding:v=0,collisionBoundary:y=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:k,...I}=e,S=ov(rs,f),[C,P]=c.useState(null),F=Ot(t,Te=>P(Te)),[D,N]=c.useState(null),J=cg(D),K=(r=J==null?void 0:J.width)!==null&&r!==void 0?r:0,Y=(n=J==null?void 0:J.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(y)?y:[y],ae=le.length>0,ge={padding:oe,boundary:le.filter(dA),altBoundary:ae},{reference:ce,floating:q,strategy:H,x:re,y:de,placement:U,middlewareData:z,update:M}=JC({strategy:"fixed",placement:te,whileElementsMounted:KC,middleware:[pA(),BC({mainAxis:p+Y,alignmentAxis:g}),x?RC({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?UC():void 0,...ge}):void 0,D?XC({element:D,padding:v}):void 0,x?FC({...ge}):void 0,WC({...ge,apply:({elements:Te,availableWidth:Me,availableHeight:yt})=>{Te.floating.style.setProperty("--radix-popper-available-width",`${Me}px`),Te.floating.style.setProperty("--radix-popper-available-height",`${yt}px`)}}),hA({arrowWidth:K,arrowHeight:Y}),E?jC({strategy:"referenceHidden"}):void 0].filter(fA)});Pr(()=>{ce(S.anchor)},[ce,S.anchor]);const R=re!==null&&de!==null,[G,O]=iv(U),T=zt(k);Pr(()=>{R&&(T==null||T())},[R,T]);const Z=(o=z.arrow)===null||o===void 0?void 0:o.x,ne=(i=z.arrow)===null||i===void 0?void 0:i.y,pe=((a=z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[me,Ee]=c.useState();Pr(()=>{C&&Ee(window.getComputedStyle(C).zIndex)},[C]);const{hasParent:_e,positionUpdateFns:ie}=aA(rs,f),Ne=!_e;c.useLayoutEffect(()=>{if(!Ne)return ie.add(M),()=>{ie.delete(M)}},[Ne,ie,M]),Pr(()=>{Ne&&R&&Array.from(ie).reverse().forEach(Te=>requestAnimationFrame(Te))},[Ne,R,ie]);const pt={"data-side":G,"data-align":O,...I,ref:F,style:{...I.style,animation:R?void 0:"none",opacity:(s=z.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return c.createElement("div",{ref:q,"data-radix-popper-content-wrapper":"",style:{position:H,left:0,top:0,transform:R?`translate3d(${Math.round(re)}px, ${Math.round(de)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(l=z.transformOrigin)===null||l===void 0?void 0:l.x,(u=z.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},c.createElement(nA,{scope:f,placedSide:G,onArrowChange:N,arrowX:Z,arrowY:ne,shouldHideArrow:pe},Ne?c.createElement(iA,{scope:f,hasParent:!0,positionUpdateFns:ie},c.createElement(dt.div,pt)):c.createElement(dt.div,pt)))}),lA="PopperArrow",cA={top:"bottom",right:"left",bottom:"top",left:"right"},uA=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=oA(lA,n),a=cA[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(ZC,Ke({},o,{ref:r,style:{...o.style,display:"block"}})))});function fA(e){return e!==void 0}function dA(e){return e!==null}const pA=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:r}=e,{width:n,height:o}=t.reference;return r.floating.style.setProperty("--radix-popper-anchor-width",`${n}px`),r.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),hA=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[g,v]=iv(s),y={start:"0%",center:"50%",end:"100%"}[v],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return g==="bottom"?(E=d?y:`${m}px`,x=`${-h}px`):g==="top"?(E=d?y:`${m}px`,x=`${l.floating.height+h}px`):g==="right"?(E=`${-h}px`,x=d?y:`${w}px`):g==="left"&&(E=`${l.floating.width+h}px`,x=d?y:`${w}px`),{data:{x:E,y:x}}}});function iv(e){const[t,r="center"]=e.split("-");return[t,r]}const gA=eA,vA=rA,mA=sA,bA=uA,yA=c.forwardRef((e,t)=>c.createElement(dt.span,Ke({},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}}))),[ns,tj]=pn("Tooltip",[nv]),os=nv(),wA="TooltipProvider",_A=700,Oc="tooltip.open",[EA,Tc]=ns(wA),xA=e=>{const{__scopeTooltip:t,delayDuration:r=_A,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=c.useState(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),c.createElement(EA,{scope:t,isOpenDelayed:a,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(f=>{l.current=f},[]),disableHoverableContent:o},i)},Ic="Tooltip",[SA,Ai]=ns(Ic),$A=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=Tc(Ic,e.__scopeTooltip),u=os(t),[f,d]=c.useState(null),p=hi(),h=c.useRef(0),g=a??l.disableHoverableContent,v=s??l.delayDuration,y=c.useRef(!1),[m=!1,w]=Sa({prop:n,defaultProp:o,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(Oc))):l.onClose(),i==null||i(S)}}),E=c.useMemo(()=>m?y.current?"delayed-open":"instant-open":"closed",[m]),x=c.useCallback(()=>{window.clearTimeout(h.current),y.current=!1,w(!0)},[w]),k=c.useCallback(()=>{window.clearTimeout(h.current),w(!1)},[w]),I=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,w(!0)},v)},[v,w]);return c.useEffect(()=>()=>window.clearTimeout(h.current),[]),c.createElement(gA,u,c.createElement(SA,{scope:t,contentId:p,open:m,stateAttribute:E,trigger:f,onTriggerChange:d,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayed?I():x()},[l.isOpenDelayed,I,x]),onTriggerLeave:c.useCallback(()=>{g?k():window.clearTimeout(h.current)},[k,g]),onOpen:x,onClose:k,disableHoverableContent:g},r))},av="TooltipTrigger",CA=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Ai(av,r),i=Tc(av,r),a=os(r),s=c.useRef(null),l=Ot(t,s,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),c.createElement(vA,Oe({asChild:!0},a),c.createElement(dt.button,Oe({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},n,{ref:l,onPointerMove:ht(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:ht(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:ht(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:ht(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:ht(e.onBlur,o.onClose),onClick:ht(e.onClick,o.onClose)})))}),sv="TooltipPortal",[AA,OA]=ns(sv,{forceMount:void 0}),TA=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Ai(sv,t);return c.createElement(AA,{scope:t,forceMount:r},c.createElement(ar,{present:r||i.open},c.createElement(Op,{asChild:!0,container:o},n)))},Oi="TooltipContent",IA=c.forwardRef((e,t)=>{const r=OA(Oi,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Ai(Oi,e.__scopeTooltip);return c.createElement(ar,{present:n||a.open},a.disableHoverableContent?c.createElement(lv,Oe({side:o},i,{ref:t})):c.createElement(PA,Oe({side:o},i,{ref:t})))}),PA=c.forwardRef((e,t)=>{const r=Ai(Oi,e.__scopeTooltip),n=Tc(Oi,e.__scopeTooltip),o=c.useRef(null),i=Ot(t,o),[a,s]=c.useState(null),{trigger:l,onClose:u}=r,f=o.current,{onPointerInTransitChange:d}=n,p=c.useCallback(()=>{s(null),d(!1)},[d]),h=c.useCallback((g,v)=>{const y=g.currentTarget,m={x:g.clientX,y:g.clientY},w=MA(m,y.getBoundingClientRect()),E=w==="right"||w==="bottom"?-5:5,k=w==="right"||w==="left"?{x:g.clientX+E,y:g.clientY}:{x:g.clientX,y:g.clientY+E},I=FA(v.getBoundingClientRect()),S=BA([k,...I]);s(S),d(!0)},[d]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&f){const g=y=>h(y,f),v=y=>h(y,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",v)}}},[l,f,h,p]),c.useEffect(()=>{if(a){const g=v=>{const y=v.target,m={x:v.clientX,y:v.clientY},w=(l==null?void 0:l.contains(y))||(f==null?void 0:f.contains(y)),E=!jA(m,a);w?p():E&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,a,u,p]),c.createElement(lv,Oe({},e,{ref:i}))}),[kA,NA]=ns(Ic,{isInside:!1}),lv=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Ai(Oi,r),u=os(r),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(Oc,f),()=>document.removeEventListener(Oc,f)),[f]),c.useEffect(()=>{if(l.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),c.createElement(wp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f},c.createElement(mA,Oe({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.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)"}}),c.createElement(Fl,null,n),c.createElement(kA,{scope:r,isInside:!0},c.createElement(yA,{id:l.contentId,role:"tooltip"},o||n))))}),DA="TooltipArrow",LA=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=os(r);return NA(DA,r).isInside?null:c.createElement(bA,Oe({},o,n,{ref:t}))});function MA(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:return null}}function FA(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function jA(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function BA(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),RA(t)}function RA(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}const UA=xA,WA=$A;/*!
83
83
  * Copyright (c) Microsoft Corporation. All rights reserved.
84
84
  * Licensed under the MIT License.
85
- */const UA=typeof WeakRef<"u";let lv=class{constructor(t){UA&&typeof t=="object"?this._weakRef=new WeakRef(t):this._instance=t}deref(){var t,r,n;let o;return this._weakRef?(o=(t=this._weakRef)===null||t===void 0?void 0:t.deref(),o||delete this._weakRef):(o=this._instance,!((n=(r=o)===null||r===void 0?void 0:r.isDisposed)===null||n===void 0)&&n.call(r)&&delete this._instance),o}};/*!
85
+ */const HA=typeof WeakRef<"u";let cv=class{constructor(t){HA&&typeof t=="object"?this._weakRef=new WeakRef(t):this._instance=t}deref(){var t,r,n;let o;return this._weakRef?(o=(t=this._weakRef)===null||t===void 0?void 0:t.deref(),o||delete this._weakRef):(o=this._instance,!((n=(r=o)===null||r===void 0?void 0:r.isDisposed)===null||n===void 0)&&n.call(r)&&delete this._instance),o}};/*!
86
86
  * Copyright (c) Microsoft Corporation. All rights reserved.
87
87
  * Licensed under the MIT License.
88
- */const Ic="keyborg:focusin";function WA(e){const t=e.HTMLElement,r=t.prototype.focus;let n=!1;return t.prototype.focus=function(){n=!0},e.document.createElement("button").focus(),t.prototype.focus=r,n}let Pc=!1;function HA(e){const t=e;Pc||(Pc=WA(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=o;const n=t.__keyborgData={focusInHandler:i=>{var a;const s=i.target;if(!s)return;const l=document.createEvent("HTMLEvents");l.initEvent(Ic,!0,!0);const u={relatedTarget:i.relatedTarget||void 0};(Pc||n.lastFocusedProgrammatically)&&(u.isFocusedProgrammatically=s===((a=n.lastFocusedProgrammatically)===null||a===void 0?void 0:a.deref()),n.lastFocusedProgrammatically=void 0),l.details=u,s.dispatchEvent(l)}};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0);function o(){const i=t.__keyborgData;return i&&(i.lastFocusedProgrammatically=new lv(this)),r.apply(this,arguments)}o.__keyborgNativeFocus=r}function VA(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,o=t.__keyborgData;o&&(t.document.removeEventListener("focusin",o.focusInHandler,!0),delete t.__keyborgData),n&&(r.focus=n)}/*!
88
+ */const Pc="keyborg:focusin";function VA(e){const t=e.HTMLElement,r=t.prototype.focus;let n=!1;return t.prototype.focus=function(){n=!0},e.document.createElement("button").focus(),t.prototype.focus=r,n}let kc=!1;function zA(e){const t=e;kc||(kc=VA(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=o;const n=t.__keyborgData={focusInHandler:i=>{var a;const s=i.target;if(!s)return;const l=document.createEvent("HTMLEvents");l.initEvent(Pc,!0,!0);const u={relatedTarget:i.relatedTarget||void 0};(kc||n.lastFocusedProgrammatically)&&(u.isFocusedProgrammatically=s===((a=n.lastFocusedProgrammatically)===null||a===void 0?void 0:a.deref()),n.lastFocusedProgrammatically=void 0),l.details=u,s.dispatchEvent(l)}};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0);function o(){const i=t.__keyborgData;return i&&(i.lastFocusedProgrammatically=new cv(this)),r.apply(this,arguments)}o.__keyborgNativeFocus=r}function GA(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,o=t.__keyborgData;o&&(t.document.removeEventListener("focusin",o.focusInHandler,!0),delete t.__keyborgData),n&&(r.focus=n)}/*!
89
89
  * Copyright (c) Microsoft Corporation. All rights reserved.
90
90
  * Licensed under the MIT License.
91
- */const zA=500;let cv=0,GA=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(t){const r=t.id;r in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[r]=new lv(t))}remove(t){delete this.__keyborgCoreRefs[t],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(t){if(this._isNavigatingWithKeyboard!==t){this._isNavigatingWithKeyboard=t;for(const r of Object.keys(this.__keyborgCoreRefs)){const o=this.__keyborgCoreRefs[r].deref();o?o.update(t):this.remove(r)}}}getVal(){return this._isNavigatingWithKeyboard}};const Lr=new GA;let KA=class{constructor(t,r){this._isMouseUsed=!1,this._onFocusIn=o=>{if(this._isMouseUsed){this._isMouseUsed=!1;return}if(Lr.getVal())return;const i=o.details;i.relatedTarget&&(i.isFocusedProgrammatically||i.isFocusedProgrammatically===void 0||Lr.setVal(!0))},this._onMouseDown=o=>{o.buttons===0||o.clientX===0&&o.clientY===0&&o.screenX===0&&o.screenY===0||(this._isMouseUsed=!0,Lr.setVal(!1))},this._onKeyDown=o=>{var i;const a=Lr.getVal(),s=o.keyCode,l=this._triggerKeys;!a&&(!l||l.has(s))?Lr.setVal(!0):a&&(!((i=this._dismissKeys)===null||i===void 0)&&i.has(s))&&this._scheduleDismiss()},this.id="c"+ ++cv,this._win=t;const n=t.document;if(r){const o=r.triggerKeys,i=r.dismissKeys;o!=null&&o.length&&(this._triggerKeys=new Set(o)),i!=null&&i.length&&(this._dismissKeys=new Set(i))}n.addEventListener(Ic,this._onFocusIn,!0),n.addEventListener("mousedown",this._onMouseDown,!0),t.addEventListener("keydown",this._onKeyDown,!0),HA(t),Lr.add(this)}dispose(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),VA(t);const r=t.document;r.removeEventListener(Ic,this._onFocusIn,!0),r.removeEventListener("mousedown",this._onMouseDown,!0),t.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Lr.remove(this.id)}}isDisposed(){return!!this._win}update(t){var r,n;const o=(n=(r=this._win)===null||r===void 0?void 0:r.__keyborg)===null||n===void 0?void 0:n.refs;if(o)for(const i of Object.keys(o))uv.update(o[i],t)}_scheduleDismiss(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const r=t.document.activeElement;this._dismissTimer=t.setTimeout(()=>{this._dismissTimer=void 0;const n=t.document.activeElement;r&&n&&r===n&&Lr.setVal(!1)},zA)}}},uv=class j1{constructor(t,r){this._cb=[],this._id="k"+ ++cv,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new KA(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new j1(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.__keyborg;r!=null&&r.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV==="development"&&console.error("Keyborg instance "+this._id+" is being disposed incorrectly."),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Lr.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Lr.setVal(t)}};function qA(e,t){return uv.create(e,t)}var Mr=e=>{const{density:t}=c.useContext($v);return e??t},Bn=e=>{const{elevation:t}=c.useContext(vv);return e??t},fv="en-US",os="dxos-common",YA={[fv]:{[os]:{"loading translations":"Loading translations…"}}};jt.use(rw).init({resources:YA,lng:fv,defaultNS:os,interpolation:{escapeValue:!1}});var JA=c.createContext({appNs:os}),XA=({fallback:e,resourceExtensions:t,children:r,appNs:n})=>{const[o,i]=c.useState(!1);return c.useEffect(()=>{i(!1),t&&t.length&&t.forEach(a=>{Object.keys(a).forEach(s=>{Object.keys(a[s]).forEach(l=>{jt.addResourceBundle(s,l,a[s][l])})})}),i(!0)},[t]),c.createElement(JA.Provider,{value:{appNs:n??os}},c.createElement(c.Suspense,{fallback:e},o?r:e))},Ae=()=>c.useContext(Mv),ZA=e=>{const[t,r]=c.useState(null),[n,o]=c.useState(null);return c.useEffect(()=>{var a;const i=()=>{window.visualViewport&&(r(window.visualViewport.width),o(window.visualViewport.height))};return(a=window.visualViewport)==null||a.addEventListener("resize",i),i(),()=>{var s;return(s=window.visualViewport)==null?void 0:s.removeEventListener("resize",i)}},e??[]),{width:t,height:n}},QA="Avatar",[eO,Rn]=co(QA),tO=({size:e=10,variant:t="circle",status:r,animation:n,children:o,labelId:i,descriptionId:a,maskId:s,inGroup:l,color:u})=>{const f=Et("avatar__label",i),d=Et("avatar__description",a),p=Et("avatar__mask",s);return c.createElement(eO,{labelId:f,descriptionId:d,maskId:p,size:e,variant:t,status:r,animation:n,inGroup:l,color:u},o)},dv="0.25rem",rO=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{size:o,variant:i,labelId:a,descriptionId:s,maskId:l,inGroup:u,status:f,animation:d,color:p}=Rn("AvatarFrame"),{tx:h}=Ae(),g=o==="px"?1:Number(o),v=g*4,y=g>4?2:(g>3,1),m=g>12?3:g>4?2:g>3?1:0,w=v/2-m-y;return c.createElement(v_,{role:"img",...r,className:h("avatar.root","avatar",{size:o,variant:i,inGroup:u},e),ref:n,...!u&&{"aria-labelledby":a,"aria-describedby":s}},c.createElement("svg",{viewBox:`0 0 ${v} ${v}`,width:v,height:v,className:h("avatar.frame","avatar__frame",{variant:i})},c.createElement("defs",null,c.createElement("mask",{id:l},i==="circle"?c.createElement("circle",{fill:"white",cx:"50%",cy:"50%",r:w}):c.createElement("rect",{fill:"white",width:2*w,height:2*w,x:m+y,y:m+y,rx:dv}))),i==="circle"?c.createElement("circle",{className:`avatarFrameFill${p?"":" fill-[var(--surface-bg)]"}`,cx:"50%",cy:"50%",r:w,...p?{fill:p}:{}}):c.createElement("rect",{className:"avatarFrameFill fill-[var(--surface-bg)]",x:m+y,y:m+y,width:2*w,height:2*w,rx:dv}),t),c.createElement("span",{role:"none",className:h("avatar.ring","avatar__ring",{size:o,variant:i,status:f,animation:d}),style:{borderWidth:y+"px"}}))}),nO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?St:Ge.span,{tx:a}=Ae(),{labelId:s}=Rn("AvatarLabel");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.label","avatar__label",{srOnly:t},r)})}),oO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?St:Ge.span,{tx:a}=Ae(),{descriptionId:s}=Rn("AvatarDescription");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.description","avatar__description",{srOnly:t},r)})}),pv=c.forwardRef((e,t)=>{const{maskId:r}=Rn("AvatarFallback");return c.createElement("image",{width:"100%",height:"100%",...e,mask:`url(#${r})`,ref:t,preserveAspectRatio:"xMidYMid slice"})}),iO=e=>{const{maskId:t,size:r}=Rn("AvatarFallback"),{large:n}=e,o=(n?4:3)*(1/1.612),{tx:i}=Ae();return c.createElement("text",{x:"50%",y:"50%",className:i("avatar.fallbackText","avatar__fallback-text"),textAnchor:"middle",alignmentBaseline:"central",fontSize:r==="px"?"200%":r*o,mask:`url(#${t})`},e.children)},aO=c.forwardRef(({onLoadingStatusChange:e,...t},r)=>{const{size:n}=Rn("AvatarImage");return(n==="px"?1:n*4)<=20?null:c.createElement(pp,{asChild:!0},c.createElement(pv,{...t,ref:r}))}),sO=c.forwardRef(({delayMs:e,text:t,...r},n)=>{const o=!!(t&&/[0-9a-zA-Z]+/.test(t)),{size:i}=Rn("AvatarFallback"),a=i==="px"?1:Number(i);return c.createElement(pp,{delayMs:e,asChild:!0},c.createElement(c.Fragment,null,a>=6&&c.createElement(pv,{...r,ref:n}),t&&c.createElement(iO,{large:!o},t.toLocaleUpperCase())))}),lO=(e,t)=>`data:image/svg+xml;utf8,${encodeURIComponent(L_(e,t==="px"?1:t*4,{padding:0}))}`,is=(e,t)=>c.useMemo(()=>lO(e,t),[e]),Tt={Root:tO,Frame:rO,Image:aO,Fallback:sO,Label:nO,Description:oO},hv="ButtonGroup",gv="Button",[cO,uO]=co(hv,{inGroup:!1}),yr=c.forwardRef(({classNames:e,children:t,density:r,elevation:n,variant:o="default",asChild:i,...a},s)=>{const{inGroup:l}=uO(gv),{tx:u}=Ae(),f=Bn(n),d=Mr(r),p=i?St:Ge.button;return c.createElement(p,{ref:s,...a,className:u("button.root","button",{variant:o,inGroup:l,disabled:a.disabled,density:d,elevation:f},e),...a.disabled&&{disabled:!0}},t)});yr.displayName=gv;var fO=c.forwardRef(({children:e,elevation:t,classNames:r,asChild:n,...o},i)=>{const{tx:a}=Ae(),s=Bn(t),l=n?St:Ge.div;return c.createElement(l,{role:"none",...o,className:a("button.group","button-group",{elevation:s},r),ref:i},c.createElement(cO,{inGroup:!0},e))});fO.displayName=hv;var vv=c.createContext({elevation:"base"}),Oi=({elevation:e,children:t})=>c.createElement(vv.Provider,{value:{elevation:e}},t),dO=Yl,pO=Kp,hO=Jp,gO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(eh,{...r,className:o("dialog.title","dialog__title",{srOnly:t},e),ref:n})}),vO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(th,{...r,className:o("dialog.description","dialog__description",{srOnly:t},e),ref:n})}),mO=rh,mv="DialogOverlay",bv="DialogContent",[bO,yO]=co(mv,{inOverlayLayout:!1}),yv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(Xp,{...r,className:o("dialog.overlay","dialog__overlay",{},e),ref:n},c.createElement(bO,{inOverlayLayout:!0},t))});yv.displayName=mv;var wv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),{inOverlayLayout:i}=yO(bv);return c.createElement(Kl,{...r,className:o("dialog.content","dialog",{inOverlayLayout:i},e),ref:n},c.createElement(Oi,{elevation:"chrome"},t))});wv.displayName=bv;var Fr={Root:dO,Trigger:pO,Portal:hO,Overlay:yv,Content:wv,Title:gO,Description:vO,Close:mO},wO=bx,_O=ax,EO=sx,xO=mx,SO=gx,$O=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(px,{...r,className:o("dialog.title","dialog--alert__title",{srOnly:t},e),ref:n})}),CO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(hx,{...r,className:o("dialog.description","dialog--alert__description",{srOnly:t},e),ref:n})}),_v="AlertDialogOverlay",Ev="AlertDialogContent",[AO,OO]=co(_v,{inOverlayLayout:!1}),xv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(lx,{...r,className:o("dialog.overlay","dialog--alert__overlay",{},e),ref:n},c.createElement(AO,{inOverlayLayout:!0},t))});xv.displayName=_v;var Sv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),{inOverlayLayout:i}=OO(Ev);return c.createElement(fx,{...r,className:o("dialog.content","dialog--alert",{inOverlayLayout:i},e),ref:n},c.createElement(Oi,{elevation:"chrome"},t))});Sv.displayName=Ev;var Eo={Root:wO,Trigger:_O,Portal:EO,Overlay:xv,Content:Sv,Title:$O,Description:CO,Cancel:xO,Action:SO},TO=CS,IO=BS,PO=RS,kO=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae();return c.createElement(US,{sideOffset:4,collisionPadding:8,...r,className:o("menu.content","menu",{},e),ref:n},c.createElement(Oi,{elevation:"chrome"},t))}),NO=c.forwardRef(({classNames:e,asChild:t,children:r,...n},o)=>{const{tx:i}=Ae(),a=t?St:Ge.div;return c.createElement(a,{...n,className:i("menu.viewport","menu__viewport",{},e),ref:o},r)}),DO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(qS,{...t,className:n("menu.arrow","menu__arrow",{},e),ref:r})}),LO=WS,MO=GS,FO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(VS,{...t,className:n("menu.item","menu__item",{},e),ref:r})}),jO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(zS,{...t,className:n("menu.item","menu__item--checkbox",{},e),ref:r})}),BO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(KS,{...t,className:n("menu.separator","menu__item",{},e),ref:r})}),RO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(HS,{...t,className:n("menu.groupLabel","menu__group__label",{},e),ref:r})}),Un={Root:TO,Trigger:IO,Portal:PO,Content:kO,Viewport:NO,Arrow:DO,Group:LO,Item:FO,CheckboxItem:jO,ItemIndicator:MO,Separator:BO,GroupLabel:RO},UO=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae();return c.createElement(L$,{...n,className:i("input.label","input__label",{srOnly:e},t),ref:o},r)}),WO=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae();return c.createElement(M$,{...n,className:i("input.description","input__description",{srOnly:e},t),ref:o},r)}),HO=c.forwardRef(({__inputScope:e,srOnly:t,classNames:r,children:n,...o},i)=>{const{tx:a}=Ae(),{validationValence:s}=or(Bt,e);return c.createElement(j$,{...o,className:a("input.validation",`input__validation-message input__validation-message--${s}`,{srOnly:t,validationValence:s},r),ref:i},n)}),VO=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae();return c.createElement(B$,{...n,className:i("input.descriptionAndValidation","input__description-and-validation",{srOnly:e},t),ref:o},r)}),zO=c.forwardRef(({density:e,elevation:t,segmentClassName:r,inputClassName:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ae(),{tx:l}=Ae(),u=Mr(e),f=Bn(t),d=c.useCallback(({focused:p,validationValence:h})=>l("input.input","input--pin-segment",{variant:"static",focused:p,disabled:i.disabled,density:u,elevation:f,validationValence:h},r),[l,i.disabled,f,t,u]);return c.createElement(R$,{...i,segmentClassName:d,...i.autoFocus&&!s&&{autoFocus:!0},inputClassName:l("input.inputWithSegments","input input--pin",{disabled:i.disabled},n),ref:a})}),GO=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ae(),l=Ae(),u=Mr(r),f=Bn(n),{validationValence:d}=or(Bt,e),{tx:p}=l;return c.createElement(U$,{...i,className:p("input.input","input",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),KO=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ae(),{tx:l}=Ae(),u=Mr(r),f=Bn(n),{validationValence:d}=or(Bt,e);return c.createElement(W$,{...i,className:l("input.input","input--text-area",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),qO=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o,weight:i="bold",classNames:a,...s},l)=>{const[u,f]=Kr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:g}=or(Bt,e),{tx:v}=Ae(),y=u==="indeterminate"?ze.Minus:u?ze.Check:c.Fragment;return c.createElement(n$,{...s,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":g},className:v("input.checkbox","input--checkbox",{size:o},"shrink-0",a),ref:l},c.createElement(o$,{asChild:!0},c.createElement(y,u&&{weight:i,className:v("input.checkboxIndicator","input--checkbox__indicator",{size:o})})))}),YO=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o=5,classNames:i,...a},s)=>{const{tx:l}=Ae(),[u,f]=Kr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:g}=or(Bt,e);return c.createElement(p$,{...a,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":g},className:l("input.switch","input--switch",{size:o},i),ref:s},c.createElement(h$,{className:l("input.switchThumb","input--switch__thumb",{size:o})}))}),jr={Root:wg,PinInput:zO,TextInput:GO,TextArea:KO,Checkbox:qO,Switch:YO,Label:UO,Description:WO,Validation:HO,DescriptionAndValidation:VO},$v=c.createContext({density:"coarse"}),xo=({density:e,children:t})=>c.createElement($v.Provider,{value:{density:e}},t),kc=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),i=Mr(r.density);return c.createElement(xo,{density:i},c.createElement(xg,{...r,className:o("list.root","list",{},e),ref:n},t))}),JO=c.forwardRef(({children:e,classNames:t,asChild:r,...n},o)=>{const i=r?St:"div",a=Mr(),{tx:s}=Ae();return c.createElement(i,{...!r&&{role:"none"},...n,className:s("list.item.endcap","list__listItem__endcap",{density:a},t),ref:o},e)}),XO=({classNames:e,...t})=>{const r=Mr(),{tx:n}=Ae();return c.createElement("div",{role:"none",...t,className:n("list.item.openTrigger","list__listItem__openTrigger--mock",{density:r},e)})},ZO=c.forwardRef(({children:e,classNames:t,...r},n)=>{const{tx:o}=Ae(),i=Mr();return c.createElement(oC,{...r,className:o("list.item.heading","list__listItem__heading",{density:i},t),ref:n},e)}),QO=c.forwardRef(({__listItemScope:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ae(),a=Mr(),{open:s}=Sg(_i,e),l=s?ze.CaretDown:ze.CaretRight;return c.createElement(iC,{...n,className:i("list.item.openTrigger","list__listItem__openTrigger",{density:a},t),ref:o},r||c.createElement(l,{weight:"bold",className:i("list.item.openTriggerIcon","list__listItem__openTrigger__icon",{})}))}),eT=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ae(),i=Mr();return c.createElement($g,{...r,className:o("list.item.root","list__listItem",{density:i,collapsible:r.collapsible},e),ref:n},t)}),Nc={Root:eT,Endcap:JO,Heading:ZO,OpenTrigger:QO,CollapsibleContent:aC,MockOpenTrigger:XO},Cv;(function(e){e[e.IDLE=0]="IDLE",e[e.DEBOUNCING=1]="DEBOUNCING",e[e.FOLLOWING=2]="FOLLOWING"})(Cv||(Cv={}));var tT=(e,{onDismiss:t,dismissThreshold:r=64,debounceThreshold:n=8,offset:o=0})=>{const i=e.current,[a,s]=c.useState(0),[l,u]=c.useState(0),f=c.useCallback(()=>{s(0),i==null||i.style.removeProperty("inset-inline-start"),i==null||i.style.setProperty("transition-duration","200ms")},[i]),d=c.useCallback(()=>{s(2),i==null||i.style.setProperty("transition-duration","0ms")},[i]),p=c.useCallback(({screenX:v})=>{a===0&&(s(1),u(v))},[a]),h=c.useCallback(({screenX:v})=>{if(i){const y=Math.min(v-l,0);switch(a){case 2:Math.abs(y)>r?(f(),t==null||t()):i.style.setProperty("inset-inline-start",`${o+y}px`);break;case 1:Math.abs(y)>n&&d();break}}},[i,a,l]),g=c.useCallback(()=>{f()},[f]);c.useEffect(()=>(i==null||i.addEventListener("pointerdown",p),()=>{i==null||i.removeEventListener("pointerdown",p)}),[i,p]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointermove",h),()=>{document.documentElement.removeEventListener("pointermove",h)}),[i,h]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointerup",g),()=>{document.documentElement.removeEventListener("pointerup",g)}),[i,g])},Dc="NavigationSidebar",Lc="Main",[ej,Av]=co(Lc,{navigationSidebarOpen:!1,setNavigationSidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")},complementarySidebarOpen:!1,setComplementarySidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")}}),rT=e=>{!document.body.hasAttribute("data-is-keyboard")&&e.preventDefault()},nT=c.forwardRef(({classNames:e,children:t,swipeToDismiss:r,onOpenAutoFocus:n,open:o,setOpen:i,side:a,...s},l)=>{const[u]=Ud("lg",{ssr:!1}),{tx:f}=Ae(),d=Ol(l),p=c.useRef(null);tT(r?d:p,{onDismiss:()=>i(!1)});const h=u?Ge.div:Kl;return c.createElement(Yl,{open:o,modal:!1},c.createElement(h,{...!u&&{forceMount:!0,tabIndex:-1,onOpenAutoFocus:n??rT},...s,className:f("main.sidebar","main__sidebar",{isLg:u,[a==="inline-end"?"inlineEndSidebarOpen":"inlineStartSidebarOpen"]:o,side:a},e),...!o&&{inert:"true"},ref:d},c.createElement(Oi,{elevation:"group"},t)))}),Ov=c.forwardRef((e,t)=>{const{navigationSidebarOpen:r,setNavigationSidebarOpen:n}=Av(Dc);return c.createElement(nT,{...e,open:r,setOpen:n,side:"inline-start",ref:t})});Ov.displayName=Dc,Ov.displayName=Dc;var oT=c.forwardRef(({asChild:e,classNames:t,bounce:r,children:n,...o},i)=>{const[a]=Ud("lg",{ssr:!1}),{navigationSidebarOpen:s,complementarySidebarOpen:l}=Av(Lc),{tx:u}=Ae(),f=e?St:"main";return c.createElement(f,{...o,className:u("main.content","main",{isLg:a,inlineStartSidebarOpen:s,inlineEndSidebarOpen:l,bounce:r},t),ref:i},n)});oT.displayName=Lc;var Tv="Message",[iT,Iv]=co(Tv),Pv=c.forwardRef(({asChild:e,valence:t,elevation:r,className:n,titleId:o,descriptionId:i,children:a,...s},l)=>{const{tx:u}=Ae(),f=Et("message__title",o),d=Et("message__description",i),p=Bn(r),h=e?St:Ge.div;return c.createElement(iT,{titleId:f,descriptionId:d},c.createElement(h,{...s,className:u("message.root","message",{valence:t,elevation:p},n),"aria-labelledby":f,"aria-describedby":d,ref:l},a))});Pv.displayName=Tv;var kv="MessageTitle",Nv=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Ae(),{titleId:a}=Iv(kv),s=e?St:Ge.h2;return c.createElement(s,{...n,className:i("message.title","message__title",{},t),id:a,ref:o},r)});Nv.displayName=kv;var Dv="MessageBody",Lv=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Ae(),{descriptionId:a}=Iv(Dv),s=e?St:Ge.p;return c.createElement(s,{...n,className:i("message.body","message__body",{},t),id:a,ref:o},r)});Lv.displayName=Dv;var Mc={Root:Pv,Title:Nv,Body:Lv},aT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement($C,{...t,className:n("scrollArea.root","scroll-area",{},e),ref:r})}),sT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(CC,{...t,className:n("scrollArea.viewport","scroll-area",{},e),ref:r})}),lT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(AC,{...t,className:n("scrollArea.scrollbar","scroll-area__scrollbar",{},e),ref:r})}),cT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(OC,{...t,className:n("scrollArea.thumb","scroll-area__thumb",{},e),ref:r})}),uT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(TC,{...t,className:n("scrollArea.corner","scroll-area__corner",{},e),ref:r})}),as={Root:aT,Viewport:sT,Scrollbar:lT,Thumb:cT,Corner:uT},fT=BA,dT=RA,pT=AA,hT=SA,gT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(NA,{...t,className:n("tooltip.arrow","tooltip__arrow",{},e),ref:r})}),vT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ae();return c.createElement(OA,{sideOffset:4,collisionPadding:8,...t,className:n("tooltip.content","tooltip",{},e),ref:r})}),wr={Provider:fT,Root:dT,Portal:pT,Trigger:hT,Arrow:gT,Content:vT},mT=()=>!!navigator.userAgent.match(/iP(ad|od|hone).+Safari/),Mv=c.createContext({tx:(e,t,r,...n)=>t,themeMode:"dark",hasIosKeyboard:!1}),Fv=e=>{e?document.body.setAttribute("data-is-keyboard","true"):document.body.removeAttribute("data-is-keyboard")},bT=({children:e,fallback:t=null,resourceExtensions:r,appNs:n,tx:o=(l,u,f,...d)=>u,themeMode:i="dark",rootElevation:a="base",rootDensity:s="coarse"})=>(c.useEffect(()=>{if(document.defaultView){const l=qA(document.defaultView);return l.subscribe(Fv),()=>l.unsubscribe(Fv)}},[]),c.createElement(Mv.Provider,{value:{tx:o,themeMode:i,hasIosKeyboard:mT()}},c.createElement(XA,{fallback:t,resourceExtensions:r,appNs:n},c.createElement(Oi,{elevation:a},c.createElement(xo,{density:s},e))))),yT={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},Fc=yT,jc={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function wT(e){return e.trim().replace(jc.whitespace," ")}function _T(e){return encodeURIComponent(e).replace(jc.urlHexPairs,xT)}function ET(e){return Object.keys(Fc).forEach(function(t){Fc[t].test(e)&&(e=e.replace(Fc[t],t))}),e}function xT(e){switch(e){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return e.toLowerCase()}}function Bc(e){if(typeof e!="string")throw new TypeError("Expected a string, but received "+typeof e);e.charCodeAt(0)===65279&&(e=e.slice(1));var t=ET(wT(e)).replace(jc.quotes,"'");return"data:image/svg+xml,"+_T(t)}Bc.toSrcset=function(t){return Bc(t).replace(/ /g,"%20")};var ST=Bc,jv={},Bv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function t(n,o){return{handler:n,config:o}}t.withOptions=function(n,o=()=>({})){const i=function(a){return{__options:a,handler:n(a),config:o(a)}};return i.__isOptionsFunction=!0,i.__pluginFunction=n,i.__configFunction=o,i};const r=t})(Bv),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=r(Bv);function r(o){return o&&o.__esModule?o:{default:o}}const n=t.default}(jv);let Rc=jv;var Uc=(Rc.__esModule?Rc:{default:Rc}).default;const $T=sn(Uc);var Rv={},Uv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(r){return Array.isArray(r)?r.map(n=>t(n)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([n,o])=>[n,t(o)])):r}})(Uv);var CT={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:e})=>({...e("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>e("brightness"),backdropContrast:({theme:e})=>e("contrast"),backdropGrayscale:({theme:e})=>e("grayscale"),backdropHueRotate:({theme:e})=>e("hueRotate"),backdropInvert:({theme:e})=>e("invert"),backdropOpacity:({theme:e})=>e("opacity"),backdropSaturate:({theme:e})=>e("saturate"),backdropSepia:({theme:e})=>e("sepia"),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>({...e("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:e})=>e("colors"),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>e("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>({none:"none",...e("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridTemplateColumns:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))"},height:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:e})=>({...e("spacing"),none:"none",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(e("screens"))}),minHeight:{0:"0px",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",20:"0.2",25:"0.25",30:"0.3",40:"0.4",50:"0.5",60:"0.6",70:"0.7",75:"0.75",80:"0.8",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:e})=>({...e("spacing")}),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:e})=>({...e("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:e})=>({...e("spacing")}),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),width:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=Uv,r=n(CT);function n(i){return i&&i.__esModule?i:{default:i}}const o=(0,t.cloneDeep)(r.default.theme)})(Rv);let Wc=Rv;var AT=(Wc.__esModule?Wc:{default:Wc}).default,Wv={},Hv={},Hc={exports:{}},ht=String,Vv=function(){return{isColorSupported:!1,reset:ht,bold:ht,dim:ht,italic:ht,underline:ht,inverse:ht,hidden:ht,strikethrough:ht,black:ht,red:ht,green:ht,yellow:ht,blue:ht,magenta:ht,cyan:ht,white:ht,gray:ht,bgBlack:ht,bgRed:ht,bgGreen:ht,bgYellow:ht,bgBlue:ht,bgMagenta:ht,bgCyan:ht,bgWhite:ht}};Hc.exports=Vv(),Hc.exports.createColors=Vv;var OT=Hc.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var f in u)Object.defineProperty(l,f,{enumerable:!0,get:u[f]})}t(e,{dim:function(){return a},default:function(){return s}});const r=n(OT);function n(l){return l&&l.__esModule?l:{default:l}}let o=new Set;function i(l,u,f){typeof process<"u"&&process.env.JEST_WORKER_ID||f&&o.has(f)||(f&&o.add(f),console.warn(""),u.forEach(d=>console.warn(l,"-",d)))}function a(l){return r.default.dim(l)}const s={info(l,u){i(r.default.bold(r.default.cyan("info")),...Array.isArray(l)?[l]:[u,l])},warn(l,u){i(r.default.bold(r.default.yellow("warn")),...Array.isArray(l)?[l]:[u,l])},risk(l,u){i(r.default.bold(r.default.magenta("risk")),...Array.isArray(l)?[l]:[u,l])}}})(Hv),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=r(Hv);function r(i){return i&&i.__esModule?i:{default:i}}function n({version:i,from:a,to:s}){t.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${i}, \`${a}\` has been renamed to \`${s}\`.`,"Update your configuration file to silence this warning."])}const o={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return n({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return n({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return n({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return n({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return n({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}(Wv);let Vc=Wv;var TT=(Vc.__esModule?Vc:{default:Vc}).default;const ss=ST,IT=Uc,zv=AT,yn=TT,[PT,{lineHeight:kT}]=zv.fontSize.base,{spacing:Zr,borderWidth:Gv,borderRadius:Kv}=zv;IT.withOptions(function(e={strategy:void 0}){return function({addBase:t,addComponents:r,theme:n}){const o=e.strategy===void 0?["base","class"]:[e.strategy],i=[{base:["[type='text']","[type='email']","[type='url']","[type='password']","[type='number']","[type='date']","[type='datetime-local']","[type='month']","[type='search']","[type='tel']","[type='time']","[type='week']","[multiple]","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":n("colors.gray.500",yn.gray[500]),"border-width":Gv.DEFAULT,"border-radius":Kv.none,"padding-top":Zr[2],"padding-right":Zr[3],"padding-bottom":Zr[2],"padding-left":Zr[3],"font-size":PT,"line-height":kT,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",yn.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":n("colors.blue.600",yn.blue[600])}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:n("colors.gray.500",yn.gray[500]),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${ss(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${n("colors.gray.500",yn.gray[500])}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`)}")`,"background-position":`right ${Zr[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":Zr[10],"print-color-adjust":"exact"}},{base:["[multiple]"],class:null,styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":Zr[3],"print-color-adjust":"unset"}},{base:["[type='checkbox']","[type='radio']"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:Zr[4],width:Zr[4],color:n("colors.blue.600",yn.blue[600]),"background-color":"#fff","border-color":n("colors.gray.500",yn.gray[500]),"border-width":Gv.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":Kv.none}},{base:["[type='radio']"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["[type='checkbox']:focus","[type='radio']:focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",yn.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"}},{base:["[type='checkbox']:checked","[type='radio']:checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${ss('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>')}")`}},{base:["[type='radio']:checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${ss('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>')}")`}},{base:["[type='checkbox']:checked:hover","[type='checkbox']:checked:focus","[type='radio']:checked:hover","[type='radio']:checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='checkbox']:indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${ss('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:indeterminate:hover","[type='checkbox']:indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='file']"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["[type='file']:focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],a=s=>i.map(l=>l[s]===null?null:{[l[s]]:l.styles}).filter(Boolean);o.includes("base")&&t(a("base")),o.includes("class")&&r(a("class"))}});var ls={exports:{}};ls.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",v="[object Map]",y="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",k="[object Set]",I="[object String]",S="[object Undefined]",C="[object WeakMap]",P="[object ArrayBuffer]",F="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,H={};H[D]=H[N]=H[J]=H[K]=H[Y]=H[te]=H[oe]=H[le]=H[ae]=!0,H[s]=H[l]=H[P]=H[f]=H[F]=H[d]=H[p]=H[h]=H[v]=H[y]=H[w]=H[x]=H[k]=H[I]=H[C]=!1;var re=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),z=t&&!t.nodeType&&t,M=z&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===z,G=R&&re.process,O=function(){try{var j=M&&M.require&&M.require("util").types;return j||G&&G.binding&&G.binding("util")}catch{}}(),T=O&&O.isTypedArray;function Z(j,Q,$){switch($.length){case 0:return j.call(Q);case 1:return j.call(Q,$[0]);case 2:return j.call(Q,$[0],$[1]);case 3:return j.call(Q,$[0],$[1],$[2])}return j.apply(Q,$)}function ne(j,Q){for(var $=-1,B=Array(j);++$<j;)B[$]=Q($);return B}function pe(j){return function(Q){return j(Q)}}function me(j,Q){return j==null?void 0:j[Q]}function xe(j,Q){return function($){return j(Q($))}}var Ee=Array.prototype,ie=Function.prototype,Ne=Object.prototype,dt=U["__core-js_shared__"],Te=ie.toString,Me=Ne.hasOwnProperty,bt=function(){var j=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return j?"Symbol(src)_1."+j:""}(),$e=Ne.toString,De=Te.call(Object),A=RegExp("^"+Te.call(Me).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=b?b.allocUnsafe:void 0,X=xe(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,ot=Ee.splice,Le=_?_.toStringTag:void 0,Je=function(){try{var j=Tn(Object,"defineProperty");return j({},"",{}),j}catch{}}(),Ze=b?b.isBuffer:void 0,tn=Math.max,Jo=Date.now,dr=Tn(U,"Map"),qt=Tn(Object,"create"),to=function(){function j(){}return function(Q){if(!Vr(Q))return{};if(se)return se(Q);j.prototype=Q;var $=new j;return j.prototype=void 0,$}}();function Nt(j){var Q=-1,$=j==null?0:j.length;for(this.clear();++Q<$;){var B=j[Q];this.set(B[0],B[1])}}function oa(){this.__data__=qt?qt(null):{},this.size=0}function Xo(j){var Q=this.has(j)&&delete this.__data__[j];return this.size-=Q?1:0,Q}function ia(j){var Q=this.__data__;if(qt){var $=Q[j];return $===n?void 0:$}return Me.call(Q,j)?Q[j]:void 0}function Zo(j){var Q=this.__data__;return qt?Q[j]!==void 0:Me.call(Q,j)}function Qo(j,Q){var $=this.__data__;return this.size+=this.has(j)?0:1,$[j]=qt&&Q===void 0?n:Q,this}Nt.prototype.clear=oa,Nt.prototype.delete=Xo,Nt.prototype.get=ia,Nt.prototype.has=Zo,Nt.prototype.set=Qo;function Ct(j){var Q=-1,$=j==null?0:j.length;for(this.clear();++Q<$;){var B=j[Q];this.set(B[0],B[1])}}function aa(){this.__data__=[],this.size=0}function ei(j){var Q=this.__data__,$=Pt(Q,j);if($<0)return!1;var B=Q.length-1;return $==B?Q.pop():ot.call(Q,$,1),--this.size,!0}function sa(j){var Q=this.__data__,$=Pt(Q,j);return $<0?void 0:Q[$][1]}function la(j){return Pt(this.__data__,j)>-1}function ca(j,Q){var $=this.__data__,B=Pt($,j);return B<0?(++this.size,$.push([j,Q])):$[B][1]=Q,this}Ct.prototype.clear=aa,Ct.prototype.delete=ei,Ct.prototype.get=sa,Ct.prototype.has=la,Ct.prototype.set=ca;function Yt(j){var Q=-1,$=j==null?0:j.length;for(this.clear();++Q<$;){var B=j[Q];this.set(B[0],B[1])}}function V(){this.size=0,this.__data__={hash:new Nt,map:new(dr||Ct),string:new Nt}}function fe(j){var Q=no(this,j).delete(j);return this.size-=Q?1:0,Q}function _e(j){return no(this,j).get(j)}function Oe(j){return no(this,j).has(j)}function qe(j,Q){var $=no(this,j),B=$.size;return $.set(j,Q),this.size+=$.size==B?0:1,this}Yt.prototype.clear=V,Yt.prototype.delete=fe,Yt.prototype.get=_e,Yt.prototype.has=Oe,Yt.prototype.set=qe;function Fe(j){var Q=this.__data__=new Ct(j);this.size=Q.size}function Be(){this.__data__=new Ct,this.size=0}function je(j){var Q=this.__data__,$=Q.delete(j);return this.size=Q.size,$}function It(j){return this.__data__.get(j)}function mt(j){return this.__data__.has(j)}function yt(j,Q){var $=this.__data__;if($ instanceof Ct){var B=$.__data__;if(!dr||B.length<r-1)return B.push([j,Q]),this.size=++$.size,this;$=this.__data__=new Yt(B)}return $.set(j,Q),this.size=$.size,this}Fe.prototype.clear=Be,Fe.prototype.delete=je,Fe.prototype.get=It,Fe.prototype.has=mt,Fe.prototype.set=yt;function Ut(j,Q){var $=oo(j),B=!$&&In(j),ee=!$&&!B&&bl(j),he=!$&&!B&&!ee&&yl(j),Ce=$||B||ee||he,Se=Ce?ne(j.length,String):[],Ie=Se.length;for(var ke in j)(Q||Me.call(j,ke))&&!(Ce&&(ke=="length"||ee&&(ke=="offset"||ke=="parent")||he&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||hl(ke,Ie)))&&Se.push(ke);return Se}function er(j,Q,$){($!==void 0&&!ni(j[Q],$)||$===void 0&&!(Q in j))&&ro(j,Q,$)}function ti(j,Q,$){var B=j[Q];(!(Me.call(j,Q)&&ni(B,$))||$===void 0&&!(Q in j))&&ro(j,Q,$)}function Pt(j,Q){for(var $=j.length;$--;)if(ni(j[$][0],Q))return $;return-1}function ro(j,Q,$){Q=="__proto__"&&Je?Je(j,Q,{configurable:!0,enumerable:!0,value:$,writable:!0}):j[Q]=$}var od=vd();function rn(j){return j==null?j===void 0?S:m:Le&&Le in Object(j)?fa(j):wd(j)}function ua(j){return Jt(j)&&rn(j)==s}function id(j){if(!Vr(j)||yd(j))return!1;var Q=oi(j)?A:ce;return Q.test(xd(j))}function ad(j){return Jt(j)&&ii(j.length)&&!!H[rn(j)]}function sd(j){if(!Vr(j))return ml(j);var Q=vl(j),$=[];for(var B in j)B=="constructor"&&(Q||!Me.call(j,B))||$.push(B);return $}function ri(j,Q,$,B,ee){j!==Q&&od(Q,function(he,Ce){if(ee||(ee=new Fe),Vr(he))ld(j,Q,Ce,$,ri,B,ee);else{var Se=B?B(da(j,Ce),he,Ce+"",j,Q,ee):void 0;Se===void 0&&(Se=he),er(j,Ce,Se)}},_l)}function ld(j,Q,$,B,ee,he,Ce){var Se=da(j,$),Ie=da(Q,$),ke=Ce.get(Ie);if(ke){er(j,$,ke);return}var Re=he?he(Se,Ie,$+"",j,Q,Ce):void 0,Dt=Re===void 0;if(Dt){var Ft=oo(Ie),nn=!Ft&&bl(Ie),ai=!Ft&&!nn&&yl(Ie);Re=Ie,Ft||nn||ai?oo(Se)?Re=Se:ha(Se)?Re=pd(Se):nn?(Dt=!1,Re=ud(Ie,!0)):ai?(Dt=!1,Re=dd(Ie,!0)):Re=[]:ao(Ie)||In(Ie)?(Re=Se,In(Se)?Re=wl(Se):(!Vr(Se)||oi(Se))&&(Re=md(Ie))):Dt=!1}Dt&&(Ce.set(Ie,Re),ee(Re,Ie,B,he,Ce),Ce.delete(Ie)),er(j,$,Re)}function pl(j,Q){return pa(_d(j,Q,xl),j+"")}var cd=Je?function(j,Q){return Je(j,"toString",{configurable:!0,enumerable:!1,value:El(Q),writable:!0})}:xl;function ud(j,Q){if(Q)return j.slice();var $=j.length,B=W?W($):new j.constructor($);return j.copy(B),B}function fd(j){var Q=new j.constructor(j.byteLength);return new L(Q).set(new L(j)),Q}function dd(j,Q){var $=Q?fd(j.buffer):j.buffer;return new j.constructor($,j.byteOffset,j.length)}function pd(j,Q){var $=-1,B=j.length;for(Q||(Q=Array(B));++$<B;)Q[$]=j[$];return Q}function hd(j,Q,$,B){var ee=!$;$||($={});for(var he=-1,Ce=Q.length;++he<Ce;){var Se=Q[he],Ie=B?B($[Se],j[Se],Se,$,j):void 0;Ie===void 0&&(Ie=j[Se]),ee?ro($,Se,Ie):ti($,Se,Ie)}return $}function gd(j){return pl(function(Q,$){var B=-1,ee=$.length,he=ee>1?$[ee-1]:void 0,Ce=ee>2?$[2]:void 0;for(he=j.length>3&&typeof he=="function"?(ee--,he):void 0,Ce&&gl($[0],$[1],Ce)&&(he=ee<3?void 0:he,ee=1),Q=Object(Q);++B<ee;){var Se=$[B];Se&&j(Q,Se,B,he)}return Q})}function vd(j){return function(Q,$,B){for(var ee=-1,he=Object(Q),Ce=B(Q),Se=Ce.length;Se--;){var Ie=Ce[j?Se:++ee];if($(he[Ie],Ie,he)===!1)break}return Q}}function no(j,Q){var $=j.__data__;return bd(Q)?$[typeof Q=="string"?"string":"hash"]:$.map}function Tn(j,Q){var $=me(j,Q);return id($)?$:void 0}function fa(j){var Q=Me.call(j,Le),$=j[Le];try{j[Le]=void 0;var B=!0}catch{}var ee=$e.call(j);return B&&(Q?j[Le]=$:delete j[Le]),ee}function md(j){return typeof j.constructor=="function"&&!vl(j)?to(X(j)):{}}function hl(j,Q){var $=typeof j;return Q=Q??a,!!Q&&($=="number"||$!="symbol"&&q.test(j))&&j>-1&&j%1==0&&j<Q}function gl(j,Q,$){if(!Vr($))return!1;var B=typeof Q;return(B=="number"?io($)&&hl(Q,$.length):B=="string"&&Q in $)?ni($[Q],j):!1}function bd(j){var Q=typeof j;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?j!=="__proto__":j===null}function yd(j){return!!bt&&bt in j}function vl(j){var Q=j&&j.constructor,$=typeof Q=="function"&&Q.prototype||Ne;return j===$}function ml(j){var Q=[];if(j!=null)for(var $ in Object(j))Q.push($);return Q}function wd(j){return $e.call(j)}function _d(j,Q,$){return Q=tn(Q===void 0?j.length-1:Q,0),function(){for(var B=arguments,ee=-1,he=tn(B.length-Q,0),Ce=Array(he);++ee<he;)Ce[ee]=B[Q+ee];ee=-1;for(var Se=Array(Q+1);++ee<Q;)Se[ee]=B[ee];return Se[Q]=$(Ce),Z(j,this,Se)}}function da(j,Q){if(!(Q==="constructor"&&typeof j[Q]=="function")&&Q!="__proto__")return j[Q]}var pa=Ed(cd);function Ed(j){var Q=0,$=0;return function(){var B=Jo(),ee=i-(B-$);if($=B,ee>0){if(++Q>=o)return arguments[0]}else Q=0;return j.apply(void 0,arguments)}}function xd(j){if(j!=null){try{return Te.call(j)}catch{}try{return j+""}catch{}}return""}function ni(j,Q){return j===Q||j!==j&&Q!==Q}var In=ua(function(){return arguments}())?ua:function(j){return Jt(j)&&Me.call(j,"callee")&&!Pe.call(j,"callee")},oo=Array.isArray;function io(j){return j!=null&&ii(j.length)&&!oi(j)}function ha(j){return Jt(j)&&io(j)}var bl=Ze||$d;function oi(j){if(!Vr(j))return!1;var Q=rn(j);return Q==h||Q==g||Q==u||Q==E}function ii(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=a}function Vr(j){var Q=typeof j;return j!=null&&(Q=="object"||Q=="function")}function Jt(j){return j!=null&&typeof j=="object"}function ao(j){if(!Jt(j)||rn(j)!=w)return!1;var Q=X(j);if(Q===null)return!0;var $=Me.call(Q,"constructor")&&Q.constructor;return typeof $=="function"&&$ instanceof $&&Te.call($)==De}var yl=T?pe(T):ad;function wl(j){return hd(j,_l(j))}function _l(j){return io(j)?Ut(j,!0):sd(j)}var Sd=gd(function(j,Q,$){ri(j,Q,$)});function El(j){return function(){return j}}function xl(j){return j}function $d(){return!1}e.exports=Sd}(ls,ls.exports),ls.exports;var cs={},us={};Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;function qv(e,t){return{handler:e,config:t}}qv.withOptions=function(e,t=()=>({})){const r=function(n){return{__options:n,handler:e(n),config:t(n)}};return r.__isOptionsFunction=!0,r.__pluginFunction=e,r.__configFunction=t,r};var NT=qv;us.default=NT,Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;var DT=LT(us);function LT(e){return e&&e.__esModule?e:{default:e}}var MT=DT.default;cs.default=MT;let zc=cs;var FT=(zc.__esModule?zc:{default:zc}).default,jT=function({matchUtilities:e,theme:t}){e({bs:r=>({blockSize:r})},{values:t("height")})},fs={};Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;const Yv=e=>Object.assign({},...Object.entries(e??{}).flatMap(([t,r])=>typeof r=="object"?Object.entries(Yv(r)).map(([n,o])=>({[t+(n==="DEFAULT"?"":`-${n}`)]:o})):[{[`${t}`]:r}]));var BT=Yv;fs.default=BT;var Gc={};Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.default=RT;function RT(e){return typeof e=="function"?e({}):e}var ds={},ps={},UT={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]};Object.defineProperty(ps,"__esModule",{value:!0}),ps.parseColor=KT,ps.formatColor=qT;var Jv=WT(UT);function WT(e){return e&&e.__esModule?e:{default:e}}let HT=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,VT=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,hs="(?:\\d+|\\d*\\.\\d+)%?",Xv="(?:\\s*,\\s*|\\s+)",zT="\\s*[,/]\\s*",GT=new RegExp(`^(rgb|hsl)a?\\(\\s*(${hs})${Xv}(${hs})${Xv}(${hs})(?:${zT}(${hs}))?\\s*\\)$`);function KT(e){if(typeof e!="string")return null;if(e=e.trim(),e==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(e in Jv.default)return{mode:"rgb",color:Jv.default[e].map(i=>i.toString())};let t=e.replace(VT,(i,a,s,l,u)=>["#",a,a,s,s,l,l,u?u+u:""].join("")).match(HT);if(t!==null)return{mode:"rgb",color:[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)].map(i=>i.toString()),alpha:t[4]?(parseInt(t[4],16)/255).toString():void 0};let r=e.match(GT);if(r!==null){var n,o;return{mode:r[1],color:[r[2],r[3],r[4]].map(i=>i.toString()),alpha:(n=r[5])===null||n===void 0||(o=n.toString)===null||o===void 0?void 0:o.call(n)}}return null}function qT({mode:e,color:t,alpha:r}){let n=r!==void 0;return`${e}(${t.join(" ")}${n?` / ${r}`:""})`}Object.defineProperty(ds,"__esModule",{value:!0}),ds.withAlphaValue=YT,ds.default=JT;var gs=ps;function YT(e,t,r){if(typeof e=="function")return e({opacityValue:t});let n=gs.parseColor(e);return n===null?r:gs.formatColor({...n,alpha:t})}function JT({color:e,property:t,variable:r}){let n=[].concat(t);if(typeof e=="function")return{[r]:"1",...Object.fromEntries(n.map(i=>[i,e({opacityVariable:r,opacityValue:`var(${r})`})]))};const o=gs.parseColor(e);return o===null?Object.fromEntries(n.map(i=>[i,e])):o.alpha!==void 0?Object.fromEntries(n.map(i=>[i,e])):{[r]:"1",...Object.fromEntries(n.map(i=>[i,gs.formatColor({...o,alpha:`var(${r})`})]))}}const Zv=fs.default,wn=Gc.default,So=ds.default;var XT=function({corePlugins:e,matchUtilities:t,theme:r}){t({"border-lb":n=>e("borderOpacity")?So({color:n,property:["border-block-start-color","border-block-end-color"],variable:"--tw-border-opacity"}):{"border-block-start-color":wn(n),"border-block-end-color":wn(n)},"border-li":n=>e("borderOpacity")?So({color:n,property:["border-inline-start-color","border-inline-end-color"],variable:"--tw-border-opacity"}):{"border-inline-start-color":wn(n),"border-inline-end-color":wn(n)}},{values:(({DEFAULT:n,...o})=>o)(Zv(r("borderColor"))),type:"color"}),t({"border-bs":n=>e("borderOpacity")?So({color:n,property:"border-block-start-color",variable:"--tw-border-opacity"}):{"border-block-start-color":wn(n)},"border-be":n=>e("borderOpacity")?So({color:n,property:"border-block-end-color",variable:"--tw-border-opacity"}):{"border-block-end-color":wn(n)},"border-is":n=>e("borderOpacity")?So({color:n,property:"border-inline-start-color",variable:"--tw-border-opacity"}):{"border-inline-start-color":wn(n)},"border-ie":n=>e("borderOpacity")?So({color:n,property:"border-inline-end-color",variable:"--tw-border-opacity"}):{"border-inline-end-color":wn(n)}},{values:(({DEFAULT:n,...o})=>o)(Zv(r("borderColor"))),type:"color"})},ZT=function({matchUtilities:e,theme:t}){e({"rounded-bs":r=>({borderStartStartRadius:r,borderStartEndRadius:r}),"rounded-be":r=>({borderEndStartRadius:r,borderEndEndRadius:r}),"rounded-is":r=>({borderStartStartRadius:r,borderEndStartRadius:r}),"rounded-ie":r=>({borderStartEndRadius:r,borderEndEndRadius:r})},{values:t("borderRadius")}),e({"rounded-ss":r=>({borderStartStartRadius:r}),"rounded-se":r=>({borderStartEndRadius:r}),"rounded-es":r=>({borderEndStartRadius:r}),"rounded-ee":r=>({borderEndEndRadius:r})},{values:t("borderRadius")})},QT=function({matchUtilities:e,theme:t}){e({"border-lb":r=>({borderBlockStartWidth:r,borderBlockEndWidth:r}),"border-li":r=>({borderInlineStartWidth:r,borderInlineEndWidth:r})},{values:t("borderWidth")}),e({"border-bs":r=>({borderBlockStartWidth:r}),"border-be":r=>({borderBlockEndWidth:r}),"border-is":r=>({borderInlineStartWidth:r}),"border-ie":r=>({borderInlineEndWidth:r})},{values:t("borderWidth")})},e5=function({addUtilities:e}){e({".clear-start":{clear:"inline-start"},".clear-end":{clear:"inline-end"}})},t5=function({addUtilities:e,matchUtilities:t,theme:r}){t({"divide-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"0","border-block-start-width":`calc(${n} * calc(1 - var(--tw-divide-b-reverse)))`,"border-block-end-width":`calc(${n} * var(--tw-divide-b-reverse))`}}),"divide-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"0","border-inline-start-width":`calc(${n} * calc(1 - var(--tw-divide-i-reverse)))`,"border-inline-end-width":`calc(${n} * var(--tw-divide-i-reverse))`}})},{values:r("divideWidth")}),e({".divide-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"1"},".divide-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"1"}})},r5=function({addUtilities:e}){e({".float-start":{float:"inline-start"},".float-end":{float:"inline-end"}})},n5=function({matchUtilities:e,theme:t}){e({is:r=>({inlineSize:r})},{values:t("width")})},o5=function({matchUtilities:e,theme:t}){e({"inset-block":r=>({insetBlock:r}),"inset-inline":r=>({insetInline:r})},{supportsNegativeValues:!0,values:t("inset")}),e({"block-start":r=>({insetBlockStart:r}),"block-end":r=>({insetBlockEnd:r}),"inline-start":r=>({insetInlineStart:r}),"inline-end":r=>({insetInlineEnd:r})},{supportsNegativeValues:!0,values:t("inset")})},i5=function({matchUtilities:e,theme:t}){e({mlb:r=>({marginBlock:r}),mli:r=>({marginInline:r})},{supportsNegativeValues:!0,values:t("margin")}),e({mbs:r=>({marginBlockStart:r}),mbe:r=>({marginBlockEnd:r}),mis:r=>({marginInlineStart:r}),mie:r=>({marginInlineEnd:r})},{supportsNegativeValues:!0,values:t("margin")})},a5=function({matchUtilities:e,theme:t}){e({"max-bs":r=>({maxBlockSize:r})},{values:t("maxHeight")})},s5=function({matchUtilities:e,theme:t}){e({"max-is":r=>({maxInlineSize:r})},{values:t("maxWidth")})},l5=function({matchUtilities:e,theme:t}){e({"min-bs":r=>({minBlockSize:r})},{values:t("minHeight")})},c5=function({matchUtilities:e,theme:t}){e({"min-is":r=>({minInlineSize:r})},{values:t("minWidth")})},u5=function({addUtilities:e}){e({".overscroll-b-auto":{overscrollBehaviorBlock:"auto"},".overscroll-b-contain":{overscrollBehaviorBlock:"contain"},".overscroll-b-none":{overscrollBehaviorBlock:"none"},".overscroll-i-auto":{overscrollBehaviorInline:"auto"},".overscroll-i-contain":{overscrollBehaviorInline:"contain"},".overscroll-i-none":{overscrollBehaviorInline:"none"}})},f5=function({matchUtilities:e,theme:t}){e({plb:r=>({paddingBlock:r}),pli:r=>({paddingInline:r})},{values:t("padding")}),e({pbs:r=>({paddingBlockStart:r}),pbe:r=>({paddingBlockEnd:r}),pis:r=>({paddingInlineStart:r}),pie:r=>({paddingInlineEnd:r})},{values:t("padding")})},d5=function({addUtilities:e}){e({".resize-block":{resize:"block"},".resize-inline":{resize:"inline"}})},p5=function({addUtilities:e,matchUtilities:t,theme:r}){t({"space-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"0","margin-block-start":`calc(${n} * calc(1 - var(--tw-space-b-reverse)))`,"margin-block-end":`calc(${n} * var(--tw-space-b-reverse))`}}),"space-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"0","margin-inline-start":`calc(${n} * calc(1 - var(--tw-space-i-reverse)))`,"margin-inline-end":`calc(${n} * var(--tw-space-i-reverse))`}})},{supportsNegativeValues:!0,values:r("space")}),e({".space-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"1"},".space-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"1"}})},h5=function({addUtilities:e}){e({".text-start":{textAlign:"start"},".text-end":{textAlign:"end"}})};const g5=FT,v5=jT,m5=XT,b5=ZT,y5=QT,w5=e5,_5=t5,E5=r5,x5=n5,S5=o5,$5=i5,C5=a5,A5=s5,O5=l5,T5=c5,I5=u5,P5=f5,k5=d5,N5=p5,D5=h5;g5(function(e){E5(e),w5(e),D5(e),k5(e),I5(e),v5(e),O5(e),C5(e),x5(e),T5(e),A5(e),$5(e),P5(e),N5(e),S5(e),_5(e),y5(e),m5(e),b5(e)});var L5=Ye&&Ye.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const M5=L5(Uc),F5=["disabled","highlighted","placeholder"],Qv={align:["center","end","start"],state:["active","checked","closed","delayed-open","hidden","inactive","indeterminate","instant-open","off","on","open","unchecked","visible"],side:["bottom","left","right","top"],orientation:["horizontal","vertical"],motion:["from-end","from-start","to-end","to-start"],swipe:["cancel","end","move","start"],"swipe-direction":["down","left","right","up"]};M5.default.withOptions(e=>({addUtilities:t,addVariant:r,e:n})=>{e=e||{variantPrefix:"radix"};const o=e.variantPrefix===""||typeof e.variantPrefix=="boolean"&&e.variantPrefix===!1?"":`${e.variantPrefix}-`;["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.origin-${o}${u}`]:{"transform-origin":`var(--radix-${u}-content-transform-origin)`}})}),F5.forEach(u=>{let f=`${o}${u}`,d=`data-${u}`;r(`${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.${n(`${f}${h}${g}`)}[${d}]`)}),r(`group-${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.group[${d}] .${n(`group-${f}${h}${g}`)}`)}),r(`peer-${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.peer[${d}] ~ .${n(`peer-${f}${h}${g}`)}`)})}),Object.keys(Qv).forEach(u=>{Qv[u].forEach(f=>{let d=`${o}${u}-${f}`,p=`data-${u}="${f}"`;r(`${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.${n(`${d}${g}${v}`)}[${p}]`)}),r(`group-${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.group[${p}] .${n(`group-${d}${g}${v}`)}`)}),r(`peer-${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.peer[${p}] ~ .${n(`peer-${d}${g}${v}`)}`)})})}),["accordion-content","collapsible-content","navigation-menu-viewport"].forEach(u=>{t({[`.w-${o}${u}`]:{width:`var(--radix-${u}-width)`}}),t({[`.h-${o}${u}`]:{height:`var(--radix-${u}-height)`}})}),["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.w-${o}${u}-content-available-width`]:{width:`var(--radix-${u}-content-available-width)`}}),t({[`.max-w-${o}${u}-content-available-width`]:{maxWidth:`var(--radix-${u}-content-available-width)`}}),t({[`.h-${o}${u}-content-available-height`]:{height:`var(--radix-${u}-content-available-height)`}}),t({[`.max-h-${o}${u}-content-available-height`]:{maxHeight:`var(--radix-${u}-content-available-height)`}}),t({[`.w-${o}${u}-trigger-width`]:{width:`var(--radix-${u}-trigger-width)`}}),t({[`.h-${o}${u}-trigger-height`]:{height:`var(--radix-${u}-trigger-height)`}})}),["toast-swipe-end","toast-swipe-move"].forEach(u=>{t({[`.translate-x-${o}${u}-x`]:{transform:`translateX(var(--radix-${u}-x))`}}),t({[`.translate-y-${o}${u}-y`]:{transform:`translateY(var(--radix-${u}-y))`}})})});function em(e){return!Array.isArray(e[0])}function vs(e,t){const r=e.length,n=em(e)?[e]:e,o=em(t)?t.map(l=>[l]):t,i=o[0].length,a=o[0].map((l,u)=>o.map(f=>f[u]));let s=n.map(l=>a.map(u=>Array.isArray(l)?l.reduce((f,d,p)=>f+d*(u[p]||0),0):u.reduce((f,d)=>f+d*l,0)));return r===1&&(s=s[0]),i===1?s.map(l=>l[0]):s}function j5(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n<.04045?t/12.92:r*Math.pow((n+.055)/1.055,2.4)})}function tm(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n>.0031308?r*(1.055*Math.pow(n,1/2.4)-.055):12.92*t})}function B5(e){return vs([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],e)}function rm(e){return vs([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],e)}function R5(e){return vs([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],e)}function nm(e){return vs([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],e)}function U5(e){const t=.008856451679035631,r=24389/27,n=[.96422,1,.82521],i=e.map((a,s)=>a/n[s]).map(a=>a>t?Math.cbrt(a):(r*a+16)/116);return[116*i[1]-16,500*(i[0]-i[1]),200*(i[1]-i[2])]}function om(e){const t=903.2962962962963,r=216/24389,n=[.96422,1,.82521],o=[];return o[1]=(e[0]+16)/116,o[0]=e[1]/500+o[1],o[2]=o[1]-e[2]/200,[Math.pow(o[0],3)>r?Math.pow(o[0],3):(116*o[0]-16)/t,e[0]>t*r?Math.pow((e[0]+16)/116,3):e[0]/t,Math.pow(o[2],3)>r?Math.pow(o[2],3):(116*o[2]-16)/t].map((a,s)=>a*n[s])}function Kc(e){const t=Math.atan2(e[2],e[1])*180/Math.PI;return[e[0],Math.sqrt(Math.pow(e[1],2)+Math.pow(e[2],2)),t>=0?t:t+360]}function ms(e){return[e[0],e[1]*Math.cos(e[2]*Math.PI/180),e[1]*Math.sin(e[2]*Math.PI/180)]}function W5(e){return Kc(U5(R5(B5(j5(e)))))}function H5(e){return tm(rm(nm(om(ms(e)))))}function V5(e){return tm(rm(nm(om(e))))}function im(e,t,r){return H5([+e,+t,+r]).reduce((i,a)=>i&&a>=0-5e-6&&a<=1+5e-6,!0)}function z5(e){const r=Kc(e),n=r[0];let o=r[1];const i=r[2];if(im(n,o,i))return e;let a=o,s=0;for(o/=2;a-s>1e-4;)im(n,o,i)?s=o:a=o,o=(a+s)/2;return ms([n,o,i])}const G5=128;function K5(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function q5(e,t){const r=1-e;return r*r*t}function Y5(e,t){return 2*(1-e)*e*t}function J5(e,t){return e*e*t}function qc(e,t,r,n){return q5(e,t)+Y5(e,r)+J5(e,n)}function X5(e,t){const[r,n,o]=e.points;return[qc(t,r[0],n[0],o[0]),qc(t,r[1],n[1],o[1]),qc(t,r[2],n[2],o[2])]}function Z5(e,t){const r=[];for(let n=0;n<=t;n++)r.push(X5(e,n/t));return r}function Q5(e,t=G5){const r=[];let n;for(let o=0,i=e.curves;o<i.length;o++){const a=i[o],s=Z5(a,t);for(const l of s)n&&K5(n,l)||(r.push(l),n=l)}return r}const am=.75;function eI(e,t,r){const n=[],o=(t-e)/r;for(let i=0;i<r;i++)n[i]=e+o*i;return n}const tI=(e,t,r)=>{const n=e<=0?0:Math.log(e),o=Math.log(t),i=(o-n)/r,a=[Math.pow(Math.E,n)];for(let s=1;s<r;s+=1)a.push(Math.pow(Math.E,n+i*s));return a.push(Math.pow(Math.E,o)),a};function rI(e,t,r=[0,100],n=am){if(e.length<=2)return[];const o=[],i=tI(Math.log10(r[0]),Math.log10(r[1]),t),a=eI(r[0],r[1],t);let s=0;for(let l=0;l<t;l++){const u=Math.min(r[1],Math.max(r[0],i[l]*(1-n)+a[l]*n));for(;u>e[s+1][0];)s++;const[f,d,p]=e[s],[h,g,v]=e[s+1],y=(u-f)/(h-f);o[l]=[f+(h-f)*y,d+(g-d)*y,p+(v-p)*y]}return o.map(z5)}function nI(e,t=16,r=[0,100],n=am,o=24){return rI(Q5(e,Math.ceil(o*(1+Math.abs(e.torsion||1))/2)).map(i=>sI(i,e.torsion,e.torsionT0)),t,r,n)}function oI(e){return`#${e.map(t=>(t<0?0:Math.floor(t>=1?255:t*256)).toString(16).padStart(2,"0")).join("")}`}function sm(e){return oI(V5(e))}function iI(e){const t=e.match(/#?(..)(..)(..)/);return t?[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]:[0,0,0]}function aI(e){return W5(iI(e))}function sI(e,t=0,r=50){const n=e[0],[o,i,a]=Kc(e),s=t*(n-r);return ms([o,i,a+s])}function lI({keyColor:e,darkCp:t,lightCp:r,hueTorsion:n}){const o=[0,0,0],i=[100,0,0],a=ms(e),[s,l,u]=a,f=[s*(1-t),l,u],d=[s+(100-s)*r,l,u];return{curves:[{points:[o,f,a]},{points:[a,d,i]}],torsion:n,torsionT0:s}}function cI(){for(var e=0,t,r,n="";e<arguments.length;)(t=arguments[e++])&&(r=lm(t))&&(n&&(n+=" "),n+=r);return n}function lm(e){if(typeof e=="string")return e;for(var t,r="",n=0;n<e.length;n++)e[n]&&(t=lm(e[n]))&&(r&&(r+=" "),r+=t);return r}var Yc="-";function uI(e){var t=dI(e),r=e.conflictingClassGroups,n=e.conflictingClassGroupModifiers,o=n===void 0?{}:n;function i(s){var l=s.split(Yc);return l[0]===""&&l.length!==1&&l.shift(),cm(l,t)||fI(s)}function a(s,l){var u=r[s]||[];return l&&o[s]?[].concat(u,o[s]):u}return{getClassGroupId:i,getConflictingClassGroupIds:a}}function cm(e,t){var a;if(e.length===0)return t.classGroupId;var r=e[0],n=t.nextPart.get(r),o=n?cm(e.slice(1),n):void 0;if(o)return o;if(t.validators.length!==0){var i=e.join(Yc);return(a=t.validators.find(function(s){var l=s.validator;return l(i)}))==null?void 0:a.classGroupId}}var um=/^\[(.+)\]$/;function fI(e){if(um.test(e)){var t=um.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function dI(e){var t=e.theme,r=e.prefix,n={nextPart:new Map,validators:[]},o=hI(Object.entries(e.classGroups),r);return o.forEach(function(i){var a=i[0],s=i[1];Jc(s,n,a,t)}),n}function Jc(e,t,r,n){e.forEach(function(o){if(typeof o=="string"){var i=o===""?t:fm(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(pI(o)){Jc(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(function(a){var s=a[0],l=a[1];Jc(l,fm(t,s),r,n)})})}function fm(e,t){var r=e;return t.split(Yc).forEach(function(n){r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function pI(e){return e.isThemeGetter}function hI(e,t){return t?e.map(function(r){var n=r[0],o=r[1],i=o.map(function(a){return typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(function(s){var l=s[0],u=s[1];return[t+l,u]})):a});return[n,i]}):e}function gI(e){if(e<1)return{get:function(){},set:function(){}};var t=0,r=new Map,n=new Map;function o(i,a){r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)}return{get:function(a){var s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set:function(a,s){r.has(a)?r.set(a,s):o(a,s)}}}var dm="!";function vI(e){var t=e.separator||":",r=t.length===1,n=t[0],o=t.length;return function(a){for(var s=[],l=0,u=0,f,d=0;d<a.length;d++){var p=a[d];if(l===0){if(p===n&&(r||a.slice(d,d+o)===t)){s.push(a.slice(u,d)),u=d+o;continue}if(p==="/"){f=d;continue}}p==="["?l++:p==="]"&&l--}var h=s.length===0?a:a.substring(u),g=h.startsWith(dm),v=g?h.substring(1):h,y=f&&f>u?f-u:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:y}}}function mI(e){if(e.length<=1)return e;var t=[],r=[];return e.forEach(function(n){var o=n[0]==="[";o?(t.push.apply(t,r.sort().concat([n])),r=[]):r.push(n)}),t.push.apply(t,r.sort()),t}function bI(e){return{cache:gI(e.cacheSize),splitModifiers:vI(e),...uI(e)}}var yI=/\s+/;function wI(e,t){var r=t.splitModifiers,n=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(yI).map(function(a){var s=r(a),l=s.modifiers,u=s.hasImportantModifier,f=s.baseClassName,d=s.maybePostfixModifierPosition,p=n(d?f.substring(0,d):f),h=!!d;if(!p){if(!d)return{isTailwindClass:!1,originalClassName:a};if(p=n(f),!p)return{isTailwindClass:!1,originalClassName:a};h=!1}var g=mI(l).join(":"),v=u?g+dm:g;return{isTailwindClass:!0,modifierId:v,classGroupId:p,originalClassName:a,hasPostfixModifier:h}}).reverse().filter(function(a){if(!a.isTailwindClass)return!0;var s=a.modifierId,l=a.classGroupId,u=a.hasPostfixModifier,f=s+l;return i.has(f)?!1:(i.add(f),o(l,u).forEach(function(d){return i.add(s+d)}),!0)}).reverse().map(function(a){return a.originalClassName}).join(" ")}function pm(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i,a=s;function s(u){var f=t[0],d=t.slice(1),p=d.reduce(function(h,g){return g(h)},f());return n=bI(p),o=n.cache.get,i=n.cache.set,a=l,l(u)}function l(u){var f=o(u);if(f)return f;var d=wI(u,n);return i(u,d),d}return function(){return a(cI.apply(null,arguments))}}function gt(e){var t=function(n){return n[e]||[]};return t.isThemeGetter=!0,t}var hm=/^\[(?:([a-z-]+):)?(.+)\]$/i,_I=/^\d+\/\d+$/,EI=new Set(["px","full","screen"]),xI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$I=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function Zt(e){return Wn(e)||EI.has(e)||_I.test(e)||bs(e)}function bs(e){return Hn(e,"length",PI)}function CI(e){return Hn(e,"size",gm)}function AI(e){return Hn(e,"position",gm)}function OI(e){return Hn(e,"url",kI)}function Ti(e){return Hn(e,"number",Wn)}function Wn(e){return!Number.isNaN(Number(e))}function TI(e){return e.endsWith("%")&&Wn(e.slice(0,-1))}function Ii(e){return vm(e)||Hn(e,"number",vm)}function He(e){return hm.test(e)}function $o(){return!0}function _n(e){return xI.test(e)}function II(e){return Hn(e,"",NI)}function Hn(e,t,r){var n=hm.exec(e);return n?n[1]?n[1]===t:r(n[2]):!1}function PI(e){return SI.test(e)}function gm(){return!1}function kI(e){return e.startsWith("url(")}function vm(e){return Number.isInteger(Number(e))}function NI(e){return $I.test(e)}function mm(){var e=gt("colors"),t=gt("spacing"),r=gt("blur"),n=gt("brightness"),o=gt("borderColor"),i=gt("borderRadius"),a=gt("borderSpacing"),s=gt("borderWidth"),l=gt("contrast"),u=gt("grayscale"),f=gt("hueRotate"),d=gt("invert"),p=gt("gap"),h=gt("gradientColorStops"),g=gt("gradientColorStopPositions"),v=gt("inset"),y=gt("margin"),m=gt("opacity"),w=gt("padding"),E=gt("saturate"),x=gt("scale"),k=gt("sepia"),I=gt("skew"),S=gt("space"),C=gt("translate"),P=function(){return["auto","contain","none"]},F=function(){return["auto","hidden","clip","visible","scroll"]},D=function(){return["auto",He,t]},N=function(){return[He,t]},J=function(){return["",Zt]},K=function(){return["auto",Wn,He]},Y=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},te=function(){return["solid","dashed","dotted","double","none"]},oe=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},le=function(){return["start","end","center","between","around","evenly","stretch"]},ae=function(){return["","0",He]},ge=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},ce=function(){return[Wn,Ti]},q=function(){return[Wn,He]};return{cacheSize:500,theme:{colors:[$o],spacing:[Zt],blur:["none","",_n,He],brightness:ce(),borderColor:[e],borderRadius:["none","","full",_n,He],borderSpacing:N(),borderWidth:J(),contrast:ce(),grayscale:ae(),hueRotate:q(),invert:ae(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[TI,bs],inset:D(),margin:D(),opacity:ce(),padding:N(),saturate:ce(),scale:ce(),sepia:ae(),skew:q(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",He]}],container:["container"],columns:[{columns:[_n]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(Y(),[He])}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ii]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",He]}],grow:[{grow:ae()}],shrink:[{shrink:ae()}],order:[{order:["first","last","none",Ii]}],"grid-cols":[{"grid-cols":[$o]}],"col-start-end":[{col:["auto",{span:["full",Ii]},He]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[$o]}],"row-start-end":[{row:["auto",{span:[Ii]},He]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",He]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",He]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(le())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(le(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(le(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",He,t]}],"min-w":[{"min-w":["min","max","fit",He,Zt]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[_n]},_n,He]}],h:[{h:[He,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",He,Zt]}],"max-h":[{"max-h":[He,t,"min","max","fit"]}],"font-size":[{text:["base",_n,bs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ti]}],"font-family":[{font:[$o]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",He]}],"line-clamp":[{"line-clamp":["none",Wn,Ti]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",He,Zt]}],"list-image":[{"list-image":["none",He]}],"list-style-type":[{list:["none","disc","decimal",He]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(te(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",Zt]}],"underline-offset":[{"underline-offset":["auto",He,Zt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(Y(),[AI])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",CI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},OI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[].concat(te(),["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:te()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(te())}],"outline-offset":[{"outline-offset":[He,Zt]}],"outline-w":[{outline:[Zt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Zt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",_n,II]}],"shadow-color":[{shadow:[$o]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":oe()}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",_n,He]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[E]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",He]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",He]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",He]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Ii,He]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",He]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",He]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",He]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Zt,Ti]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function bm(e,t){for(var r in t)ym(e,r,t[r]);return e}var DI=Object.prototype.hasOwnProperty,LI=new Set(["string","number","boolean"]);function ym(e,t,r){if(!DI.call(e,t)||LI.has(typeof r)||r===null){e[t]=r;return}if(Array.isArray(r)&&Array.isArray(e[t])){e[t]=e[t].concat(r);return}if(typeof r=="object"&&typeof e[t]=="object"){if(e[t]===null){e[t]=r;return}for(var n in r)ym(e[t],n,r[n])}}function MI(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return typeof e=="function"?pm.apply(void 0,[mm,e].concat(r)):pm.apply(void 0,[function(){return bm(mm(),e)}].concat(r))}var FI="Expected a function",wm="__lodash_hash_undefined__",_m=1/0,jI="[object Function]",BI="[object GeneratorFunction]",RI="[object Symbol]",UI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,WI=/^\w*$/,HI=/^\./,VI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zI=/[\\^$.*+?()[\]{}|]/g,GI=/\\(\\)?/g,KI=/^\[object .+?Constructor\]$/,qI=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,YI=typeof self=="object"&&self&&self.Object===Object&&self,Xc=qI||YI||Function("return this")();function JI(e,t){return e==null?void 0:e[t]}function XI(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var ZI=Array.prototype,QI=Function.prototype,Em=Object.prototype,Zc=Xc["__core-js_shared__"],xm=function(){var e=/[^.]+$/.exec(Zc&&Zc.keys&&Zc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Sm=QI.toString,Qc=Em.hasOwnProperty,$m=Em.toString,e6=RegExp("^"+Sm.call(Qc).replace(zI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Cm=Xc.Symbol,t6=ZI.splice,r6=Tm(Xc,"Map"),Pi=Tm(Object,"create"),Am=Cm?Cm.prototype:void 0,Om=Am?Am.toString:void 0;function Vn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function n6(){this.__data__=Pi?Pi(null):{}}function o6(e){return this.has(e)&&delete this.__data__[e]}function i6(e){var t=this.__data__;if(Pi){var r=t[e];return r===wm?void 0:r}return Qc.call(t,e)?t[e]:void 0}function a6(e){var t=this.__data__;return Pi?t[e]!==void 0:Qc.call(t,e)}function s6(e,t){var r=this.__data__;return r[e]=Pi&&t===void 0?wm:t,this}Vn.prototype.clear=n6,Vn.prototype.delete=o6,Vn.prototype.get=i6,Vn.prototype.has=a6,Vn.prototype.set=s6;function Co(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function l6(){this.__data__=[]}function c6(e){var t=this.__data__,r=ys(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():t6.call(t,r,1),!0}function u6(e){var t=this.__data__,r=ys(t,e);return r<0?void 0:t[r][1]}function f6(e){return ys(this.__data__,e)>-1}function d6(e,t){var r=this.__data__,n=ys(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Co.prototype.clear=l6,Co.prototype.delete=c6,Co.prototype.get=u6,Co.prototype.has=f6,Co.prototype.set=d6;function zn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function p6(){this.__data__={hash:new Vn,map:new(r6||Co),string:new Vn}}function h6(e){return ws(this,e).delete(e)}function g6(e){return ws(this,e).get(e)}function v6(e){return ws(this,e).has(e)}function m6(e,t){return ws(this,e).set(e,t),this}zn.prototype.clear=p6,zn.prototype.delete=h6,zn.prototype.get=g6,zn.prototype.has=v6,zn.prototype.set=m6;function ys(e,t){for(var r=e.length;r--;)if(O6(e[r][0],t))return r;return-1}function b6(e,t){t=E6(t,e)?[t]:_6(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[C6(t[r++])];return r&&r==n?e:void 0}function y6(e){if(!Pm(e)||S6(e))return!1;var t=T6(e)||XI(e)?e6:KI;return t.test(A6(e))}function w6(e){if(typeof e=="string")return e;if(tu(e))return Om?Om.call(e):"";var t=e+"";return t=="0"&&1/e==-_m?"-0":t}function _6(e){return Im(e)?e:$6(e)}function ws(e,t){var r=e.__data__;return x6(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Tm(e,t){var r=JI(e,t);return y6(r)?r:void 0}function E6(e,t){if(Im(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||tu(e)?!0:WI.test(e)||!UI.test(e)||t!=null&&e in Object(t)}function x6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function S6(e){return!!xm&&xm in e}var $6=eu(function(e){e=P6(e);var t=[];return HI.test(e)&&t.push(""),e.replace(VI,function(r,n,o,i){t.push(o?i.replace(GI,"$1"):n||r)}),t});function C6(e){if(typeof e=="string"||tu(e))return e;var t=e+"";return t=="0"&&1/e==-_m?"-0":t}function A6(e){if(e!=null){try{return Sm.call(e)}catch{}try{return e+""}catch{}}return""}function eu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(FI);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(eu.Cache||zn),r}eu.Cache=zn;function O6(e,t){return e===t||e!==e&&t!==t}var Im=Array.isArray;function T6(e){var t=Pm(e)?$m.call(e):"";return t==jI||t==BI}function Pm(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function I6(e){return!!e&&typeof e=="object"}function tu(e){return typeof e=="symbol"||I6(e)&&$m.call(e)==RI}function P6(e){return e==null?"":w6(e)}function k6(e,t,r){var n=e==null?void 0:b6(e,t);return n===void 0?r:n}var N6=k6;const D6=sn(N6);var L6=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950],M6=[12,25,37,50,75,100,125,150,200,250,300,350,400,450,500,550,600,650,700,750,800,825,850,875,900,925,950,975],lr=Math.PI/180,km={red:{keyColor:"#ee003b",darkCp:1,lightCp:.13,hueTorsion:5.5*lr},orange:{keyColor:"#fa6b32",darkCp:.725,lightCp:1,hueTorsion:13*lr},amber:{keyColor:"#f08c00",darkCp:1,lightCp:1,hueTorsion:24*lr},yellow:{keyColor:"#ffd900",darkCp:1,lightCp:1,hueTorsion:32*lr},lime:{keyColor:"#99c400",darkCp:1,lightCp:1,hueTorsion:-3.5*lr},green:{keyColor:"#30a908",darkCp:.35,lightCp:.665,hueTorsion:-10.5*lr},emerald:{keyColor:"#15e066",darkCp:1,lightCp:.735,hueTorsion:-7*lr},teal:{keyColor:"#00a270",darkCp:1,lightCp:.755,hueTorsion:-12*lr},cyan:{keyColor:"#048992",darkCp:1,lightCp:.855,hueTorsion:-15*lr},sky:{keyColor:"#007bc2",darkCp:1,lightCp:.64,hueTorsion:0},blue:{keyColor:"#0058cb",darkCp:1,lightCp:.495,hueTorsion:-7*lr},indigo:{keyColor:"#1b45c5",darkCp:.495,lightCp:.55,hueTorsion:0},violet:{keyColor:"#080886",darkCp:.195,lightCp:.635,hueTorsion:-5*lr},purple:{keyColor:"#2c0073",darkCp:0,lightCp:.63,hueTorsion:0},fuchsia:{keyColor:"#6d0085",darkCp:1,lightCp:.695,hueTorsion:0},pink:{keyColor:"#a5006d",darkCp:1,lightCp:.775,hueTorsion:0},rose:{keyColor:"#d00054",darkCp:1,lightCp:1,hueTorsion:0},neutral:{keyColor:"#707076",darkCp:.8,lightCp:.88,hueTorsion:0},primary:{keyColor:"#1662d9",darkCp:.86,lightCp:1,hueTorsion:-30*lr}},it=Object.keys(km).reduce((e,t)=>{const r=t==="neutral"||t==="primary",n=km[t],o=lI({...n,keyColor:aI(n.keyColor)}),i=nI(o,21,[0,100*(22/21)],1,24).reverse(),a=s=>{if(s>999)return"#000000";if(s<1)return"#ffffff";if(s%50===0)return sm(i[s/50]);{const l=s%50/50,u=1-l,[f,d,p]=i[Math.floor(s/50)],[h,g,v]=i[Math.ceil(s/50)];return sm([f*u+h*l,d*u+g*l,p*u+v*l])}};return e[t]=(r?M6:L6).reduce((s,l)=>(s[l]=a(l),s),{}),e},{}),F6={scrim:{light:`${it.neutral[75]}A6`,dark:`${it.neutral[900]}A6`},attention:{light:"#ffffff",dark:it.neutral[900]},base:{light:it.neutral[25],dark:it.neutral[850],fg:{light:"#ffffff",dark:"#000000"}},description:{light:it.neutral[300],dark:it.neutral[500]},baseGlass:{light:`${it.neutral[25]}E6`,dark:`${it.neutral[850]}E6`},input:{light:it.neutral[50],dark:it.neutral[825]},modal:{light:"#ffffff",dark:`${it.neutral[750]}`},modalSelected:{light:it.neutral[50],dark:it.neutral[825]},hover:{light:it.neutral[37],dark:it.neutral[800]},accent:{light:it.primary[550],dark:it.primary[550],fg:{light:it.primary[550],dark:it.primary[400]}},accentHover:{light:it.primary[600],dark:it.primary[500]},unAccent:{light:it.neutral[500],dark:it.neutral[400]},unAccentHover:{light:it.neutral[400],dark:it.neutral[500]},separator:{light:it.neutral[75],dark:it.neutral[750]},inverse:{light:"#ffffff",dark:"#ffffff"},unavailable:{light:it.neutral[100],dark:it.neutral[600]}};$T(({addUtilities:e,theme:t,e:r})=>{const n=t("semanticColors"),o=Object.entries(n).map(([i,a])=>{var s,l,u,f;return{[`.fg-${r(`${i}`)}`]:{color:`${((s=a.fg)==null?void 0:s.light)??a.light}`},[`.dark .fg-${r(`${i}`)}`]:{color:`${((l=a.fg)==null?void 0:l.dark)??a.dark}`},[`.surface-${r(`${i}`)}`]:{backgroundColor:`${a.light}`},[`.dark .surface-${r(`${i}`)}`]:{backgroundColor:`${a.dark}`},[`.separator-${r(`${i}`)}`]:{borderColor:`${((u=a.fg)==null?void 0:u.light)??a.light}`},[`.dark .separator-${r(`${i}`)}`]:{borderColor:`${((f=a.fg)==null?void 0:f.dark)??a.dark}`}}});e(o)});var ru="fill-[--surface-bg] dark:fill-[--surface-bg]",j6="fill-[--surface-bg] dark:fill-[--surface-bg]",_s="min-bs-[2.5rem]",B6="pli-3",R6="pli-4",U6=`${_s} ${B6}`,W6=`${_s} ${R6}`,Es="min-bs-[2.5rem] pointer-fine:min-bs-[2rem]",H6="pli-2",V6="pli-2.5",z6=`${Es} ${H6}`,G6=`${Es} ${V6}`,Nm=(e="coarse")=>e==="fine"?Es:_s,xs="opacity-40 cursor-not-allowed shadow-none",K6="data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed",nu=({elevation:e})=>[e==="group"?"shadow-sm":e==="chrome"?"shadow-none":"shadow"],Ao=({elevation:e})=>[e==="group"?"shadow":e==="chrome"?"shadow-lg":"shadow-none"],Br="focus:outline-none focus-visible:z-[1] focus-visible:hover:outline-none dark:focus-visible:hover:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-primary-350 focus-visible:ring-offset-white dark:focus-visible:ring-primary-450 dark:focus-visible:ring-offset-black",Dm="focus:outline-none focus-visible:outline-none focus:ring-0 ring-0 focus:border-0 border-0",q6="ring-2 ring-offset-0 ring-primary-350 ring-offset-white dark:ring-primary-450 dark:ring-offset-black",Y6="transition-colors duration-100 linear hover:surface-hover",Lm="hover:surface-hover",J6="fixed inset-0 z-0 overflow-auto overscroll-auto scroll-smooth",Mm="will-change-[opacity,transform] data-[side=top]:animate-slideDownAndFade data-[side=right]:animate-slideLeftAndFade data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade",X6="will-change-[opacity,transform] animate-slideUpAndFade",Z6="separator-separator",Q6="self-stretch border-ie",Fm="self-stretch border-be",e3="data-[highlighted]:bg-primary-100 dark:data-[highlighted]:bg-primary-850 hover:data-[highlighted]:bg-primary-150 hover:dark:data-[highlighted]:bg-primary-800",t3="base-surface md:fixed-surface backdrop-blur-md dark:backdrop-blur-lg",r3="separator-separator",n3="separator-separator",Oo="modal-surface",o3=e=>{const t=()=>[Zt],r=()=>["auto",Zt],n=()=>["",Zt],o=()=>[$o],i=()=>["none","","sm","md","lg","xl","2xl","3xl","full",bs];return bm(e,{classGroups:{float:[{float:["start","end"]}],clear:[{clear:["start","end"]}],resize:[{resize:["block ","inline"]}],"text-alignment":[{text:["start","end"]}],"logical.overscroll-b":[{"overscroll-b":["auto ","contain","auto"]}],"logical.overscroll-i":[{"overscroll-b":["auto ","contain","auto"]}],"logical.bs":[{bs:t()}],"logical.min-bs":[{"min-bs":t()}],"logical.max-bs":[{"max-bs":t()}],"logical.is":[{is:t()}],"logical.min-is":[{"min-is":t()}],"logical.max-is":[{"max-is":t()}],"logical.mlb":[{mlb:t()}],"logical.mli":[{mli:t()}],"logical.mbs":[{mbs:t()}],"logical.mbe":[{mbe:t()}],"logical.mis":[{mis:t()}],"logical.mie":[{mie:t()}],"logical.plb":[{plb:t()}],"logical.pli":[{pli:t()}],"logical.pbs":[{pbs:t()}],"logical.pbe":[{pbe:t()}],"logical.pis":[{pis:t()}],"logical.pie":[{pie:t()}],"logical.space-b":[{"space-b":t()}],"logical.space-i":[{"space-i":t()}],"logical.inset-block":[{"inset-block":r()}],"logical.inset-inline":[{"inset-inline":r()}],"logical.block-start":[{"block-start":r()}],"logical.block-end":[{"block-end":r()}],"logical.inline-start":[{"inline-start":r()}],"logical.inline-end":[{"inline-end":r()}],"logical.border-bs":[{"border-bs":n()}],"logical.border-be":[{"border-be":n()}],"logical.border-is":[{"border-is":n()}],"logical.border-ie":[{"border-ie":n()}],"logical.border-color-bs":[{"border-bs":o()}],"logical.border-color-be":[{"border-be":o()}],"logical.border-color-is":[{"border-is":o()}],"logical.border-color-ie":[{"border-ie":o()}],"logical.rounded-bs":[{"rounded-bs":i()}],"logical.rounded-be":[{"rounded-be":i()}],"logical.rounded-is":[{"rounded-is":i()}],"logical.rounded-ie":[{"rounded-ie":i()}],"logical.rounded-ss":[{"rounded-ss":i()}],"logical.rounded-se":[{"rounded-se":i()}],"logical.rounded-es":[{"rounded-es":i()}],"logical.rounded-ee":[{"rounded-ee":i()}],"logical.divide-b":[{"divide-b":n()}],"logical.divide-i":[{"divide-i":n()}]},conflictingClassGroups:{"inset-block":["logical.block-start","logical.block-end"],"inset-inline":["logical.inline-start","logical.inline-end"],p:["logical.plb","logical.pli","logical.pbs","logical.pbe","logical.pis","logical.pie"],pli:["logical.pis","logical.pie"],plb:["logical.pbs","logical.pbe"],m:["logical.mlb","logical.mli","logical.mbs","logical.mbe","logical.mis","logical.mie"],mli:["logical.mis","logical.mie"],mlb:["logical.mbs","logical.mbe"],overscroll:["overscroll-i","overscroll-b"],rounded:["logical.rounded-bs","logical.rounded-be","logical.rounded-is","logical.rounded-ie","logical.rounded-ss","logical.rounded-se","logical.rounded-es","logical.rounded-ee"],"logical.rounded-bs":["logical.rounded-ss","logical.rounded-se"],"logical.rounded-be":["logical.rounded-es","logical.rounded-ee"],"logical.rounded-is":["logical.rounded-ss","logical.rounded-es"],"logical.rounded-ie":["logical.rounded-ee","logical.rounded-se"],"border-color":["logical.border-color-bs","logical.border-color-be","logical.border-color-is","logical.border-color-ie"],border:["logical.border-bs","logical.border-be","logical.border-is","logical.border-ie"]}})},ou=Object.keys(F6),ue=MI({classGroups:{fontFamily:["font-body","font-mono"],fontWeight:["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black",Ti],foreground:ou.map(e=>`fg-${e}`),surface:ou.map(e=>`surface-${e}`),separator:ou.map(e=>`separator-${e}`)}},o3),iu=new Map([[0,"is-0"],["px","is-px"],[.5,"is-0.5"],[1,"is-1"],[1.5,"is-1.5"],[2,"is-2"],[2.5,"is-2.5"],[3,"is-3"],[3.5,"is-3.5"],[4,"is-4"],[5,"is-5"],[6,"is-6"],[7,"is-7"],[8,"is-8"],[9,"is-9"],[10,"is-10"],[11,"is-11"],[12,"is-12"],[14,"is-14"],[16,"is-16"],[20,"is-20"],[24,"is-24"],[28,"is-28"],[32,"is-32"],[36,"is-36"],[40,"is-40"],[44,"is-44"],[48,"is-48"],[52,"is-52"],[56,"is-56"],[60,"is-60"],[64,"is-64"],[72,"is-72"],[80,"is-80"],[96,"is-96"]]),jm=new Map([[0,"bs-0"],["px","bs-px"],[.5,"bs-0.5"],[1,"bs-1"],[1.5,"bs-1.5"],[2,"bs-2"],[2.5,"bs-2.5"],[3,"bs-3"],[3.5,"bs-3.5"],[4,"bs-4"],[5,"bs-5"],[6,"bs-6"],[7,"bs-7"],[8,"bs-8"],[9,"bs-9"],[10,"bs-10"],[11,"bs-11"],[12,"bs-12"],[14,"bs-14"],[16,"bs-16"],[20,"bs-20"],[24,"bs-24"],[28,"bs-28"],[32,"bs-32"],[36,"bs-36"],[40,"bs-40"],[44,"bs-44"],[48,"bs-48"],[52,"bs-52"],[56,"bs-56"],[60,"bs-60"],[64,"bs-64"],[72,"bs-72"],[80,"bs-80"],[96,"bs-96"]]),ki=new Set(iu.keys()),au=jm.get.bind(jm),Bm=iu.get.bind(iu),We=e=>ue(au(e),Bm(e)),Rm=(e,t)=>{if(ki.has(e))return e;if(e<=0)return 0;if(e===1)return"px";{const r=Math.floor(e),n=Math.floor(e*2)/2,o=Math.floor(e/2)*2,i=Math.floor(e/4)*4;return ki.has(n)?n:ki.has(r)?r:ki.has(o)?o:ki.has(i)?i:t}},Um=e=>e==="px"?1:e,su="placeholder-neutral-500 dark:placeholder-neutral-400",Ot="text-xs font-normal fg-description",i3="text-xs font-normal fg-base",a3="text-xs font-normal",s3="text-xs font-medium text-success-550 dark:text-success-300",l3="text-xs font-medium text-info-550 dark:text-info-300",c3="text-xs font-medium text-warning-550 dark:text-warning-300",u3="text-xs font-medium text-error-550 dark:text-error-300",f3=e=>{switch(e){case"success":return s3;case"info":return l3;case"warning":return c3;case"error":return u3;default:return}},d3="bg-neutral-25 dark:bg-neutral-850",p3="shadow-success-500/50 dark:shadow-success-500/50 text-success-600 dark:text-success-100 bg-success-50 dark:bg-success-900",h3="shadow-info-500/50 dark:shadow-info-500/50 text-info-600 dark:text-info-100 bg-info-50 dark:bg-info-900",g3="shadow-warning-500/50 dark:shadow-warning-500/50 text-warning-600 dark:text-warning-100 bg-warning-50 dark:bg-warning-900",v3="shadow-error-500/50 dark:shadow-error-500/50 text-error-600 dark:text-error-100 bg-error-50 dark:bg-error-900",m3=e=>{switch(e){case"success":return p3;case"info":return h3;case"warning":return g3;case"error":return v3;default:return d3}},b3=(e,...t)=>ue("overflow-anchored overflow-auto",...t),y3=(e,...t)=>ue("overflow-anchor is-px bs-px",...t),w3={root:b3,anchor:y3},_3=({size:e=10,inGroup:t},...r)=>ue("relative inline-flex shrink-0",We(e),t&&(e==="px"||e<=3?"-mie-1":"-mie-2"),...r),E3=({srOnly:e},...t)=>ue(e&&"sr-only",...t),x3=({srOnly:e},...t)=>ue(Ot,e&&"sr-only",...t),S3=({variant:e},...t)=>ue("is-full bs-full bg-[--surface-bg]",e==="circle"?"rounded-full":"rounded",...t),$3=({status:e,size:t=3},...r)=>ue("absolute block-end-0 inline-end-0",We(t),e==="inactive"?"text-warning-350 dark:text-warning-250":e==="active"?"text-success-350 dark:text-success-250":"text-neutral-350 dark:text-neutral-250",...r),C3=({status:e,variant:t,animation:r},...n)=>ue("absolute inset-0 border-2",t==="circle"?"rounded-full":"rounded",e==="current"?"border-primary-400 dark:border-primary-500":e==="active"?"border-success-400 dark:border-success-400":e==="error"?"border-error-400 dark:border-error-500":e==="warning"?"border-warning-400 dark:border-warning-500":e==="inactive"?"border-neutral-400 dark:border-neutral-500":"border-[color:var(--surface-bg)]",r==="pulse"?"animate-halo-pulse":"",...n),A3=(e,...t)=>ue("fill-white",...t),O3=(e,...t)=>ue("inline-flex items-center",...t),T3=({size:e,srOnly:t},...r)=>ue(t?"sr-only":"rounded-full truncate text-sm leading-none plb-1 pli-2 relative z-[1] flex items-center justify-center",e&&au(e),...r),I3=({srOnly:e},...t)=>ue(e?"sr-only":Ot,...t),P3={root:_3,label:E3,description:x3,statusIcon:$3,frame:S3,ring:C3,fallbackText:A3,group:O3,groupLabel:T3,groupDescription:I3},k3=(e,...t)=>ue("shrink-0 flex items-center",...t),N3=(e,...t)=>ue("contents",...t),D3=(e,...t)=>ue("contents",...t),L3=(e,...t)=>ue(...t),M3=(e,...t)=>ue("opacity-50",...t),F3={root:k3,list:N3,listItem:D3,current:L3,separator:M3},j3="fg-inverse surface-accent hover:surface-accentHover aria-pressed:bg-primary-500 dark:aria-pressed:bg-primary-500 data-[state=open]:bg-primary-500 dark:data-[state=open]:bg-primary-500 aria-checked:bg-primary-500 dark:aria-checked:bg-primary-500 aria-checked:text-primary-100",B3="surface-input",R3=B3+" data-[state=open]:surface-input aria-pressed:fg-accent aria-pressed:surface-base aria-checked:fg-accent aria-checked:surface-base",U3=Lm+" hover:text-inherit data-[state=open]:surface-input aria-pressed:fg-accent aria-pressed:surface-base aria-checked:fg-accent aria-checked:surface-base",W3=(e,...t)=>{const r=e.variant??"default";return ue("font-medium text-sm shrink-0 inline-flex select-none items-center justify-center overflow-hidden","transition-color duration-100",e.density==="fine"?G6:W6,e.disabled&&xs,!e.inGroup&&"rounded-md",!e.textWrap&&"text-ellipsis whitespace-nowrap",!e.disabled&&!e.inGroup&&(r==="default"||r==="primary")&&nu({elevation:e.elevation}),!e.disabled&&Y6,r!=="outline"&&" hover:border-transparent dark:hover:border-transparent",r==="default"&&R3,!e.disabled&&r==="ghost"&&U3,r==="primary"&&j3,r==="outline"&&"border separator-base",!e.disabled&&Br,"group",...t)},H3=(e,...t)=>ue("inline-flex rounded-md [&>:first-child]:rounded-is-md [&>:last-child]:rounded-ie-md [&>button]:relative",nu({elevation:e.elevation}),...t),V3={root:W3,group:H3},z3="overflow-auto grid place-items-center p-2 md:p-4 lg:p-8",G3=(e,...t)=>ue("fixed z-20 inset-inline-0 block-start-0 bs-[100dvb] surface-scrim",z3,...t),K3=({inOverlayLayout:e,elevation:t="chrome"},...r)=>ue("flex flex-col",!e&&"fixed z-20 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]","is-[95vw] md:is-full max-is-[24rem] border rounded-lg p-4",X6,Ao({elevation:t}),"surface-baseGlass backdrop-blur",n3,Br,...r),q3=({srOnly:e},...t)=>ue("rounded shrink-0 text-xl font-medium",e&&"sr-only",...t),Y3=({srOnly:e},...t)=>ue("mlb-2",Ot,e&&"sr-only",...t),J3={overlay:G3,content:K3,title:q3,description:Y3},X3=(e,...t)=>ue("rounded-md p-1 max-bs-[--radix-dropdown-menu-content-available-height] overflow-y-auto",...t),Z3=(e,...t)=>ue("is-48 rounded-md md:is-56 z-[30]",Mm,Oo,Ao({elevation:"group"}),...t),Q3=(e,...t)=>ue("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2 text-sm","data-[highlighted]:surface-hover",Dm,K6,...t),eP=(e,...t)=>ue("mlb-1 mli-2 bs-px surface-separator",...t),tP=(e,...t)=>ue(Ot,"select-none pli-2 plb-2",...t),rP=(e,...t)=>ue(ru,...t),nP={content:Z3,viewport:X3,item:Q3,separator:eP,groupLabel:tP,arrow:rP},oP="",iP="shadow-success-500/50 dark:shadow-success-600/50",aP="shadow-info-500/50 dark:shadow-info-600/50",sP="shadow-warning-500/50 dark:shadow-warning-600/50",lP="shadow-error-500/50 dark:shadow-error-600/50",Wm="transition-colors bg-[--input-bg] focus:surface-attention border-transparent focus:border-transparent",Hm="hover:bg-[--input-bg-hover] dark:hover:bg-[--input-bg-hover] focus:hover:surface-attention",Vm="shadow-inner transition-colors surface-unAccent aria-checked:surface-accent aria-[checked=mixed]:surface-accent",zm="hover:surface-unAccentHover hover:aria-checked:surface-accentHover hover:aria-[checked=mixed]:surface-accentHover",Gm=e=>{switch(e){case"success":return iP;case"info":return aP;case"warning":return sP;case"error":return lP;default:return null}},cP=e=>["is-full bg-transparent text-current",e.density==="fine"?Es:_s,su,Dm,e.disabled&&xs],uP=e=>["is-full text-base rounded text-[color:var(--surface-text)]",Wm,su,e.density==="fine"?z6:U6,e.disabled?xs:Hm],fP=e=>["is-full text-base rounded text-[color:var(--surface-text)]",Wm,Hm,e.focused&&"surface-attention",su,Gm(e.validationValence),e.disabled&&xs,e.focused&&q6],dP=(e,...t)=>e.variant==="subdued"?ue(...cP(e),...t):e.variant==="static"?ue(...fP(e),...t):ue(...uP(e),!e.disabled&&Br,Gm(e.validationValence)||oP,...t),pP=({size:e=5,disabled:t},...r)=>ue(We(e),Vm,!t&&zm,"shrink-0 flex items-center justify-center rounded text-white",Br,...r),hP=({size:e=5},...t)=>ue(We(Rm(Um(e)*.7,4)),...t),gP=({size:e=5,disabled:t},...r)=>ue(au(e),Bm(Rm(Um(e)*1.75,9)),Vm,!t&&zm,"cursor-pointer shrink-0 rounded-full pli-1 mx-1 relative",Br,...r),vP=({size:e=5},...t)=>ue(We(e==="px"?"px":e-2),"block bg-white rounded-full separator-separator transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[100%]",...t),mP=(e,...t)=>ue("font-mono selection:bg-transparent mli-auto",e.disabled&&"cursor-not-allowed",...t),bP=(e,...t)=>ue("block text-sm font-medium",e.srOnly&&"sr-only",...t),yP=(e,...t)=>ue(Ot,e.srOnly&&"sr-only",...t),wP=(e,...t)=>ue("leading-none mlb-1",e.srOnly&&"sr-only",...t),_P=(e,...t)=>ue(Ot,e.srOnly?"sr-only":f3(e.validationValence),...t),EP={input:dP,inputWithSegments:mP,checkbox:pP,checkboxIndicator:hP,label:bP,description:yP,validation:_P,switch:gP,switchThumb:vP,descriptionAndValidation:wP},xP=(e,...t)=>ue("underline decoration-1 underline-offset-2 transition-color rounded-sm","text-primary-600 hover:text-primary-500 dark:text-primary-300 hover:dark:text-primary-200","visited:text-teal-600 visited:hover:text-teal-500 visited:dark:text-teal-300 visited:hover:dark:text-teal-200",Br,...t),SP={root:xP},$P=(e,...t)=>ue(...t),CP=({collapsible:e},...t)=>ue(!e&&"flex",...t),AP=({density:e},...t)=>ue(We(e==="fine"?8:10),"shrink-0 flex items-start justify-center",...t),OP=({density:e},...t)=>ue(Nm(e),...t),TP=(e,...t)=>ue(We(5),"mbs-2.5",...t),IP=({density:e},...t)=>ue("is-5 rounded flex justify-center items-center",Nm(e),Lm,Br,...t),PP=(e,...t)=>ue(We(5),...t),kP={root:$P,item:{root:CP,endcap:AP,heading:OP,dragHandleIcon:TP,openTrigger:IP,openTriggerIcon:PP}},To={start:{width:"sm:is-[270px]",sidebar:"sm:-inline-start-[270px]",content:"pis-[270px]"},end:{width:"sm:is-[360px]",sidebar:"sm:-inline-end-[360px]",content:"pie-[360px]"}},NP=({inlineStartSidebarOpen:e,inlineEndSidebarOpen:t,side:r},...n)=>ue("fixed block-start-0 block-end-0 is-[100vw] z-10 overscroll-contain overflow-x-hidden overflow-y-auto","transition-[inset-inline-start,inset-inline-end] duration-200 ease-in-out",r3,r==="inline-start"?To.start.width:To.end.width,r==="inline-start"?e?"inline-start-0":ue("-inline-start-[100vw]",To.start.sidebar):t?"inline-end-0":ue("-inline-end-[100vw]",To.end.sidebar),r==="inline-start"?"border-ie":"border-is",t3,...n),DP=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,bounce:n},...o)=>ue("transition-[padding-inline-start,padding-inline-end] duration-200 ease-in-out",e&&t?To.start.content:"pis-0",e&&r?To.end.content:"pie-0",n&&J6,...o),LP=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,side:n},...o)=>ue("fixed inset-0 z-[9] surface-scrim","transition-opacity duration-200 ease-in-out",!e&&(t||r)?"opacity-100":"opacity-0",!e&&(t||r)?"block":"hidden",...o),MP={content:DP,sidebar:NP,overlay:LP},FP=({valence:e,elevation:t},...r)=>ue("p-3 rounded-md max-is-full overflow-auto",nu({elevation:t}),m3(e),...r),jP=(e,...t)=>ue("text-base font-medium mb-2",...t),BP=(e,...t)=>ue(...t),RP={root:FP,title:jP,body:BP},UP=({constrainInline:e,constrainBlock:t},...r)=>ue("p-1 rounded-lg",e&&"max-is-[--radix-popover-content-available-width] overflow-x-auto",t&&"max-bs-[--radix-popover-content-available-height] overflow-y-auto",...r),WP=(e,...t)=>ue("z-[30] rounded-lg",Oo,Ao({elevation:"group"}),Br,...t),HP=(e,...t)=>ue(j6,...t),VP={content:WP,viewport:UP,arrow:HP},zP=(e,...t)=>ue("overflow-hidden",...t),GP=(e,...t)=>ue("is-full bs-full scroll-smooth","[&>div]:table-fixed [&>div]:w-full",...t),KP=(e,...t)=>ue("flex select-none touch-none p-0.5 ease-out","data-[orientation=vertical]:is-1.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:bs-1.5",...t),qP=(e,...t)=>ue("bg-neutral-500/50 flex-1 rounded-lg relative","before:content-[''] before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-[44px] before:min-h-[44px]",...t),YP=(e,...t)=>ue(...t),JP={root:zP,viewport:GP,scrollbar:KP,thumb:qP,corner:YP},XP=({elevation:e="chrome"},...t)=>ue("p-1 z-[50] rounded",Oo,Ao({elevation:e}),...t),ZP=(e,...t)=>ue("relative flex items-center pis-6 pie-3 plb-1","text-base leading-none rounded-sm select-none outline-none",e3,...t),QP=(e,...t)=>ue("absolute inline-start-0 is-6 inline-flex items-center justify-center",...t),ek=(e,...t)=>ue(ru,...t),tk=(e,...t)=>ue(Fm,...t),rk=(e,...t)=>ue(Oo,"flex items-center justify-center cursor-default bs-6 is-full",...t),nk={content:XP,item:ZP,itemIndicator:QP,arrow:ek,separator:tk,scrollButton:rk},ok=({orientation:e},...t)=>ue(e==="vertical"?Q6:Fm,Z6,...t),ik={root:ok},ak=(e,...t)=>ue("is-20 bs-1 inline-block relative bg-neutral-400/25 rounded-full overflow-hidden",...t),sk=({indeterminate:e},...t)=>ue("absolute inline-start-0 inset-block-0 inline-block bg-neutral-400 rounded-full",e&&"animate-progress-indeterminate",...t),lk={root:ak,bar:sk},ck={neutral:"bg-neutral-200 text-neutral-800 dark:bg-neutral-700 dark:text-neutral-150",red:"bg-red-200 text-red-800 dark:bg-red-700 dark:text-red-150",orange:"bg-orange-200 text-orange-800 dark:bg-orange-700 dark:text-orange-150",amber:"bg-amber-200 text-amber-800 dark:bg-amber-700 dark:text-amber-150",yellow:"bg-yellow-200 text-yellow-800 dark:bg-yellow-700 dark:text-yellow-150",lime:"bg-lime-200 text-lime-800 dark:bg-lime-700 dark:text-lime-150",green:"bg-green-200 text-green-800 dark:bg-green-700 dark:text-green-150",emerald:"bg-emerald-200 text-emerald-800 dark:bg-emerald-700 dark:text-emerald-150",teal:"bg-teal-200 text-teal-800 dark:bg-teal-700 dark:text-teal-150",cyan:"bg-cyan-200 text-cyan-800 dark:bg-cyan-700 dark:text-cyan-150",sky:"bg-sky-200 text-sky-800 dark:bg-sky-700 dark:text-sky-150",blue:"bg-blue-200 text-blue-800 dark:bg-blue-700 dark:text-blue-150",indigo:"bg-indigo-200 text-indigo-800 dark:bg-indigo-700 dark:text-indigo-150",violet:"bg-violet-200 text-violet-800 dark:bg-violet-700 dark:text-violet-150",purple:"bg-purple-200 text-purple-800 dark:bg-purple-700 dark:text-purple-150",fuchsia:"bg-fuchsia-200 text-fuchsia-800 dark:bg-fuchsia-700 dark:text-fuchsia-150",pink:"bg-pink-200 text-pink-800 dark:bg-pink-700 dark:text-pink-150",rose:"bg-rose-200 text-rose-800 dark:bg-rose-700 dark:text-rose-150",info:"bg-info-200 text-info-800 dark:bg-info-700 dark:text-info-150",success:"bg-success-200 text-success-800 dark:bg-success-700 dark:text-success-150",warning:"bg-warning-200 text-warning-800 dark:bg-warning-700 dark:text-warning-150",error:"bg-error-200 text-error-800 dark:bg-error-700 dark:text-error-150"},uk=({palette:e="neutral"},...t)=>ue("text-xs font-semibold pli-2 plb-0.5 rounded cursor-default",ck[e],...t),fk={root:uk},dk=(e,...t)=>ue("z-[70] fixed bottom-4 inset-x-4 w-auto md:top-4 md:right-4 md:left-auto md:bottom-auto md:w-full md:max-w-sm rounded-lg flex flex-col gap-2",...t),pk=(e,...t)=>ue("rounded-lg flex p-2 gap-2",Oo,Ao({elevation:"chrome"}),"radix-state-open:animate-toast-slide-in-bottom md:radix-state-open:animate-toast-slide-in-right","radix-state-closed:animate-toast-hide","radix-swipe-end:animate-toast-swipe-out","translate-x-radix-toast-swipe-move-x","radix-swipe-cancel:translate-x-0 radix-swipe-cancel:duration-200 radix-swipe-cancel:ease-[ease]",Br,...t),hk=(e,...t)=>ue("grow flex flex-col gap-1 justify-center pis-2",...t),gk=(e,...t)=>ue("shrink-0 flex flex-col gap-1 justify-center",...t),vk=({srOnly:e},...t)=>ue("shrink-0 text-md font-medium",e&&"sr-only",...t),mk=({srOnly:e},...t)=>ue(Ot,"shrink-0",e&&"sr-only",...t),bk={viewport:dk,root:pk,body:hk,title:vk,description:mk,actions:gk},yk=(e,...t)=>ue("flex items-center gap-2 is-full",...t),wk={root:yk},_k=(e,...t)=>ue("inline-flex items-center rounded-md plb-2 pli-3",Oo,Mm,Ao({elevation:"group"}),a3,...t),Ek=(e,...t)=>ue(ru,...t),xk={content:_k,arrow:Ek},Sk={themeName:()=>"default",anchoredOverflow:w3,avatar:P3,breadcrumb:F3,button:V3,dialog:J3,menu:nP,input:EP,link:SP,list:kP,main:MP,message:RP,popover:VP,select:nk,scrollArea:JP,separator:ik,status:lk,tag:fk,toast:bk,toolbar:wk,tooltip:xk},$k=e=>(t,r,n,...o)=>{const i=D6(e,t);return typeof i=="function"?i(n,...o):r},Ck=$k(Sk);const Km=c.createContext({textValue:"",setTextValue:async e=>{}}),qm=()=>c.useContext(Km),lu=({children:e})=>{const[t,r]=c.useState(""),n=c.useCallback(async o=>(await navigator.clipboard.writeText(o),r(o)),[]);return c.createElement(Km.Provider,{value:{textValue:t,setTextValue:n}},e)},Ym="invisible bs-px -mbe-px overflow-hidden",Ak=({value:e,classNames:t,iconProps:r,...n})=>{const{t:o}=tt("os"),{textValue:i,setTextValue:a}=qm(),s=i===e;return c.createElement(yr,{...n,classNames:["inline-flex flex-col justify-center",t],onClick:()=>a(e),"data-testid":"copy-invitation"},c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",s&&Ym)},c.createElement("span",{className:"pli-1"},o("copy invitation code label")),c.createElement(ze.Copy,{className:We(4),weight:"bold",...r})),c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",!s&&Ym)},c.createElement("span",{className:"pli-1"},o("copy invitation code success label")),c.createElement(ze.Check,{className:We(4),weight:"bold",...r})))},Ok=({value:e,classNames:t,iconProps:r,variant:n,...o})=>{const{t:i}=tt("os"),{textValue:a,setTextValue:s}=qm(),u=i(a===e?"copy invitation code success label":"copy invitation code label"),[f,d]=c.useState(!1);return c.createElement(wr.Root,{delayDuration:1500,open:f,onOpenChange:d},c.createElement(wr.Portal,null,c.createElement(wr.Content,{side:"bottom",sideOffset:12,classNames:"z-30"},c.createElement("span",null,u),c.createElement(wr.Arrow,null))),c.createElement(wr.Trigger,{"aria-label":u,...o,onClick:()=>s(e).then(()=>d(!0)),"data-testid":"copy-invitation",asChild:!0},c.createElement(yr,{variant:n,classNames:["inline-flex flex-col justify-center",t]},c.createElement(ze.Copy,{className:We(5),weight:"bold",...r}))))},cu=({children:e,description:t,before:r,after:n,variant:o="default",elevation:i,slots:a={},...s})=>{var g,v,y,m;const l=Et("compoundButton-label"),u=Et("compoundButton-description"),{tx:f}=Ae(),d=Bn(i),p={...s,variant:o,elevation:d,textWrap:!0},h=f("button.root","button button--compound",p,"flex items-center gap-4 plb-2.5",(g=a.root)==null?void 0:g.className);return c.createElement("button",{...s,...a.root,className:h,"aria-labelledby":l,...t&&{"aria-describedby":u}},r&&c.createElement("div",{role:"none",className:"grow-0"},r),c.createElement("div",{role:"none",...a.middle,className:ue("grow whitespace-normal flex flex-col gap-1 text-left",(v=a.middle)==null?void 0:v.className)},c.createElement("p",{...a.label,id:l,className:ue((y=a.label)==null?void 0:y.className)},e),t&&c.createElement("p",{id:u,...a.description,className:ue("text-xs mbe-1 font-normal",o==="primary"?i3:Ot,(m=a.description)==null?void 0:m.className)},t)),n&&c.createElement("div",{role:"none",className:"grow-0"},n))};var Ss={adjectives:["abundant","accessible","accomplished","accurate","achievable","adaptable","adaptive","adequate","adjustable","admirable","admiring","adorable","adored","adoring","adroit","adulatory","advanced","advantageous","adventurous","affable","affectionate","affirmative","affluent","affordable","agile","agreeable","alluring","altruistic","amazed","amazing","ambitious","amenable","amiable","amicable","ample","amusing","angelic","appealing","appreciable","appreciated","appreciative","appropriate","ardent","articulate","artistic","assuring","astonished","astonishing","astounded","astounding","athletic","attentive","attractive","audible","auspicious","authentic","autonomous","available","avid","awed","awesome","awestruck","beauteous","beautiful","believable","beloved","beneficent","beneficial","benevolent","blameless","blissful","blithe","bonny","booming","boundless","bountiful","brainiest","brainy","brave","breathtaking","bright","brighter","brightest","brilliant","brisk","brotherly","bullish","buoyant","calm","calming","capable","captivating","carefree","catchy","celebrated","celebratory","champion","charismatic","charitable","charming","chaste","cheaper","cheapest","cheerful","cheery","cherished","chivalrous","classic","classy","clean","cleaner","cleanest","cleanly","clear","cleared","clearer","clever","coherent","cohesive","colorful","comely","comfortable","comforting","comfy","commendable","commodious","compact","compatible","competitive","compliant","conciliatory","concise","confident","congenial","considerate","consistent","constructive","consummate","contrasty","convenient","convincing","cool","coolest","cooperative","correct","courageous","courteous","courtly","cozy","creative","credible","crisp","crisper","cushy","cute","daring","darling","dashing","dauntless","dazzled","dazzling","decent","decisive","dedicated","defeated","deft","delectable","delicate","delicious","delighted","delightful","dependable","deserving","desirable","desirous","detachable","devout","dexterous","dextrous","dignified","diligent","diplomatic","distinctive","diversified","divine","dominated","dumbfounded","durable","dynamic","eager","earnest","eased","easy","easygoing","ebullient","economical","ecstatic","educated","effective","efficacious","efficient","effortless","effusive","elated","elegant","elite","eloquent","eminent","enchanted","enchanting","encouraging","endearing","endorsed","energetic","engaging","engrossing","enhanced","enjoyable","enraptured","enterprising","entertaining","enthralled","enthusiastic","enticing","entranced","entrancing","enviable","envious","equitable","erudite","ethical","euphoric","evaluative","eventful","everlasting","evocative","exalted","exalting","exceeding","excellent","exceptional","excited","exciting","exemplary","exhilarating","expansive","exquisite","exuberant","exultant","fabulous","fair","faithful","famed","famous","fancier","fancy","fantastic","fascinating","fashionable","fast","faster","fastest","faultless","favorable","favored","favorite","fearless","feasible","feisty","felicitous","fertile","fervent","fervid","festive","fiery","fine","finer","finest","firmer","flashy","flatter","flattering","flawless","flexible","flourishing","fluent","fond","foolproof","foremost","formidable","fortuitous","fortunate","fragrant","free","freed","fresh","fresher","freshest","friendly","frugal","fruitful","fun","funny","futuristic","gainful","gallant","galore","generous","genial","gentle","gentlest","genuine","gifted","glad","glamorous","gleeful","glimmering","glistening","glorious","glowing","godlike","gold","golden","good","goodly","gorgeous","graceful","gracious","grand","grateful","gratified","gratifying","great","greatest","guiltless","gutsy","halcyon","hale","hallowed","handier","handsome","handy","happier","happy","hardier","hardy","harmless","harmonious","healthful","healthy","heartening","heartfelt","heartwarming","heavenly","helpful","heroic","hilarious","holy","honest","honorable","honored","hopeful","hospitable","hot","hottest","humane","humble","humorous","humourous","ideal","idolized","idyllic","illuminating","illustrious","imaginative","immaculate","immense","impartial","impassioned","impeccable","important","impressed","impressive","improved","improving","incredible","indebted","indulgent","industrious","inestimable","inexpensive","infallible","influential","ingenious","ingenuous","innocuous","innovative","insightful","inspiring","instructive","instrumental","intelligent","intelligible","interesting","intimate","intricate","intriguing","intuitive","invaluable","inventive","invigorating","invincible","inviolable","inviolate","invulnerable","irresistible","jolly","jovial","joyful","joyous","jubilant","judicious","keen","kindly","laudable","lavish","lawful","leading","lean","legendary","lighter","likable","like","liked","lionhearted","lively","logical","lovable","loved","lovely","loving","loyal","lucid","luckier","luckiest","lucky","lucrative","luminous","lush","lustrous","luxuriant","luxurious","luxury","lyrical","magic","magical","magnanimous","magnificent","majestic","manageable","marvellous","marvelous","masterful","matchless","mature","meaningful","memorable","merciful","meritorious","merry","mesmerized","mesmerizing","meticulous","mighty","miraculous","modern","modest","momentous","monumental","motivated","navigable","neat","neatest","nice","nifty","nimble","noble","noiseless","noteworthy","nourishing","observant","obtainable","optimal","optimistic","opulent","orderly","organized","outstanding","overjoyed","painless","palatial","pampered","panoramic","paramount","passionate","patient","patri","peaceable","peaceful","peerless","peppy","perfect","permissible","personalized","phenomenal","picturesque","playful","pleasant","pleased","pleasing","pleasurable","plentiful","plush","poetic","poignant","poised","polished","polite","popular","portable","posh","positive","powerful","praiseworthy","praising","precious","precise","preeminent","preferable","premier","prestigious","pretty","priceless","principled","privileged","prize","proactive","prodigious","productive","proficient","profound","progressive","prolific","prominent","promised","promising","prompt","proper","propitious","prosperous","protective","proud","proven","prudent","punctual","pure","purposeful","quaint","qualified","quicker","quiet","quieter","radiant","rapid","rapt","rapturous","rational","reachable","readable","ready","realistic","realizable","reasonable","reasoned","receptive","recommended","redeeming","refined","reformed","refreshed","refreshing","regal","rejoicing","relaxed","reliable","remarkable","renewed","renowned","replaceable","reputable","resilient","resolute","resounding","resourceful","respectable","respectful","resplendent","responsive","restful","restored","retractable","reverent","rewarding","rich","righteous","rightful","robust","romantic","roomier","rosy","safe","saintly","salutary","sane","satisfactory","satisfied","satisfying","scenic","seamless","seasoned","secure","selective","sensational","sensible","sensitive","serene","sexy","sharp","sharper","sharpest","shiny","significant","silent","simpler","simplest","simplified","sincere","skilled","skillful","sleek","slick","smart","smarter","smartest","smelly","smiling","smitten","smooth","smoother","smoothest","snappy","snazzy","sociable","soft","softer","solid","soulful","spacious","sparkling","spectacular","speedy","spellbinding","spellbound","spirited","spiritual","splendid","spontaneous","sporty","spotless","sprightly","stable","stainless","stately","statuesque","staunch","steadfast","steadiest","steady","stellar","stimulating","stimulative","streamlined","striking","strong","stronger","strongest","stunned","stunning","stupendous","sturdier","sturdy","stylish","stylized","suave","sublime","subsidized","substantive","succeeding","successful","sufficient","suitable","sumptuous","super","superb","superior","supple","supportive","supreme","surreal","sustainable","swankier","swankiest","swanky","sweeping","sweet","sweetheart","swift","talented","tantalizing","tempting","tenacious","tender","terrific","thankful","thinner","thoughtful","thrifty","thrilled","thrilling","thriving","tidy","timely","titillating","tolerable","top","topnotch","tough","tougher","toughest","tranquil","transparent","trendy","triumphal","triumphant","trusted","trusting","trustworthy","trusty","truthful","twinkly","unabashed","unaffected","unassailable","unbeatable","unbiased","unbound","undamaged","undaunted","undisputable","undisputed","unencumbered","unequivocal","unfettered","unlimited","unmatched","unparalleled","unreal","unrestricted","unrivaled","unselfish","unwavering","upbeat","upscale","usable","useful","valiant","valuable","verifiable","veritable","versatile","vibrant","victorious","viewable","vigilant","virtuous","visionary","vivacious","vivid","warm","warmer","warmhearted","wealthy","welcome","wholesome","wieldy","winning","wise","witty","wonderful","wondrous","workable","worth","worthwhile","worthy","young","youthful","zippy"],animals:["aardvark","albatross","alligator","angelfish","angora","ant","anteater","antelope","armadillo","avocet","baboon","badger","bandicoot","barnacle","barracuda","bat","beagle","bear","beaver","bee","beetle","bird","bison","bloodhound","boar","bobcat","bonobo","buffalo","bulldog","bullfrog","butterfly","buzzard","camel","cat","caterpillar","catfish","cattle","centipede","chameleon","cheetah","chicken","chihuahua","chimpanzee","chin","chinchilla","chipmunk","civet","clam","cockroach","coon","coral","corgi","cougar","cow","coyote","crab","crane","cuttlefish","dachshund","dalmatian","dane","deer","devil","dingo","dodo","dog","dogfish","dollar","dolphin","donkey","dormouse","dragon","dragonfly","duck","dugong","eagle","earwig","eel","elephant","emperor","emu","falcon","ferret","fish","flamingo","flounder","fly","forest","fowl","fox","foxhound","frog","gar","gecko","gerbil","gharial","gibbon","giraffe","goat","goose","gopher","gorilla","grasshopper","greyhound","grouse","guppy","hamster","hare","hedgehog","heron","hippopotamus","hornet","horse","hound","hummingbird","husky","hyena","hyrax","ibis","iguana","impala","insect","jackal","jaguar","jellyfish","kangaroo","kingfisher","kiwi","koala","kudu","labradoodle","ladybird","lemming","lemur","leopard","liger","lion","lionfish","lizard","llama","lobster","lynx","macaque","macaw","magpie","malamute","maltese","mammoth","manatee","mandrill","markhor","marmoset","mastiff","mayfly","meerkat","millipede","mole","mongoose","monkey","monster","moorhen","moose","moth","mouse","mule","newt","nightingale","ocelot","octopus","okapi","orangutan","ostrich","otter","owl","oyster","panda","panther","parrot","peacock","pelican","penguin","pheasant","pig","pike","piranha","platypus","pointer","poodle","porcupine","possum","prawn","puffin","pug","puma","quail","rabbit","raccoon","rat","rattlesnake","ray","reindeer","retriever","rhinoceros","robin","rottweiler","russel","salamander","scorpion","seahorse","seal","shark","sheep","sheepdog","shrew","shrimp","skater","skunk","sloth","slug","snail","snake","snowshoe","spaniel","sparrow","spider","sponge","squid","squirrel","squirt","starfish","stingray","stoat","swan","tapir","tarantula","termite","terrier","tiger","toad","tortoise","toucan","tuatara","turkey","turtle","uakari","urchin","vole","vulture","wallaby","walrus","warthog","wasp","weasel","whale","whippet","wildebeest","wolf","wolfhound","wolverine","wombat","woodlouse","woodpecker","worm","yak","zebra","zebu","zonkey","zorse"]},Jm=e=>e.charAt(0).toUpperCase()+e.slice(1),uu=e=>{const t=e.length*2/3,r=e.substring(0,t),n=e.substring(t),o=Jm(Ss.adjectives[parseInt(r,16)%Ss.adjectives.length]),i=Jm(Ss.animals[parseInt(n,16)%Ss.animals.length]);return`${o} ${i}`};const Xm=c.forwardRef(({identity:e,presence:t,onClick:r},n)=>{var l;const o=e.identityKey.toHex(),i=Et("identityListItem__label"),a=is(o??"",12),s=((l=e.profile)==null?void 0:l.displayName)??uu(e.identityKey.toHex());return c.createElement(Nc.Root,{classNames:ue("flex gap-2 pis-3 pie-1 items-center",r&&"cursor-pointer"),onClick:()=>r==null?void 0:r(),"data-testid":"identity-list-item",labelId:i,ref:n},c.createElement(Tt.Root,{status:t===ga.SpaceMember.PresenceState.ONLINE?"active":"inactive",labelId:i},c.createElement(Tt.Frame,null,c.createElement(Tt.Fallback,{href:a})),c.createElement(Tt.Label,{classNames:"text-sm truncate pli-2"},s)))}),Tk=({devices:e,onSelect:t})=>{const{t:r}=tt("os");return e.length>0?c.createElement(kc,{classNames:"flex flex-col gap-2"},e.map(n=>{var i,a,s,l,u;const o={identityKey:n.deviceKey,profile:n.profile?{displayName:`${(i=n.profile)==null?void 0:i.platform} (${(a=n.profile)==null?void 0:a.platformVersion}) on ${(s=n.profile)==null?void 0:s.os} (${(l=n.profile)==null?void 0:l.osVersion}) ${((u=n.profile)==null?void 0:u.architecture)??"Unknown"}-bit`}:void 0};return c.createElement(Xm,{key:n.deviceKey.toHex(),identity:o,onClick:t&&(()=>t(n))})})):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(Ot,"text-center is-full")},r("empty device list message")))},Ik=({spaceKey:e,includeSelf:t,onSelect:r})=>{const n=Ue.useClient(),o=ga.useMembers(e),i=c.useMemo(()=>t?o.sort(a=>a.identity.identityKey.equals(n.halo.identity.get().identityKey)?-1:1):o.filter(a=>!a.identity.identityKey.equals(n.halo.identity.get().identityKey)),[o]);return c.createElement(Pk,{members:i,onSelect:r})},Pk=({members:e,onSelect:t})=>{const{t:r}=tt("os"),n=e.filter(o=>o.identity);return n.length>0?c.createElement(kc,{classNames:"flex flex-col gap-2","data-testid":"space-members-list"},n.map(o=>c.createElement(Xm,{key:o.identity.identityKey.toHex(),identity:o.identity,presence:o.presence,onClick:t&&(()=>t(o))}))):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(Ot,"text-center is-full mlb-2")},r("empty space members message")))};var Zm;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(Zm||(Zm={}));var Qm;(function(e){(function(t){t[t.INCLUSIVE=1]="INCLUSIVE",t[t.EXPLICIT=2]="EXPLICIT"})(e.MatchingOptions||(e.MatchingOptions={}))})(Qm||(Qm={}));var eb;(function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"})(eb||(eb={}));var tb;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.TRUNCATE=1]="TRUNCATE",t[t.HUMANIZE=2]="HUMANIZE"})(e.KEY_OPTION||(e.KEY_OPTION={}))})(tb||(tb={}));var rb;(function(e){e[e.CURRENT=0]="CURRENT",e[e.TRUSTED=1]="TRUSTED"})(rb||(rb={}));var nb;(function(e){(function(t){t[t.OFFLINE=0]="OFFLINE",t[t.ONLINE=1]="ONLINE",t[t.REMOVED=2]="REMOVED"})(e.PresenceState||(e.PresenceState={}))})(nb||(nb={}));var ob;(function(e){e[e.INACTIVE=2]="INACTIVE",e[e.ACTIVE=6]="ACTIVE",e[e.CLOSED=1]="CLOSED",e[e.CONTROL_ONLY=7]="CONTROL_ONLY",e[e.INITIALIZING=4]="INITIALIZING",e[e.READY=3]="READY",e[e.ERROR=5]="ERROR"})(ob||(ob={}));var ib;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.INIT_AUTOMERGE=1]="INIT_AUTOMERGE"})(e.Migration||(e.Migration={}))})(ib||(ib={}));var we;(function(e){(function(t){t[t.INTERACTIVE=0]="INTERACTIVE",t[t.OFFLINE=1]="OFFLINE",t[t.MULTIUSE=2]="MULTIUSE"})(e.Type||(e.Type={})),function(t){t[t.DEVICE=0]="DEVICE",t[t.SPACE=1]="SPACE"}(e.Kind||(e.Kind={})),function(t){t[t.NONE=0]="NONE",t[t.SHARED_SECRET=1]="SHARED_SECRET"}(e.AuthMethod||(e.AuthMethod={})),function(t){t[t.INIT=0]="INIT",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED",t[t.READY_FOR_AUTHENTICATION=3]="READY_FOR_AUTHENTICATION",t[t.AUTHENTICATING=4]="AUTHENTICATING",t[t.SUCCESS=5]="SUCCESS",t[t.CANCELLED=6]="CANCELLED",t[t.TIMEOUT=7]="TIMEOUT",t[t.ERROR=8]="ERROR"}(e.State||(e.State={}))})(we||(we={}));var ab;(function(e){(function(t){t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED"})(e.Action||(e.Action={})),function(t){t[t.CREATED=0]="CREATED",t[t.ACCEPTED=1]="ACCEPTED"}(e.Type||(e.Type={}))})(ab||(ab={}));var sb;(function(e){e[e.OFFLINE=0]="OFFLINE",e[e.ONLINE=1]="ONLINE"})(sb||(sb={}));var kk=200,fu="__lodash_hash_undefined__",Nk=1/0,lb=9007199254740991,Dk="[object Arguments]",Lk="[object Function]",Mk="[object GeneratorFunction]",Fk="[object Symbol]",jk=/[\\^$.*+?()[\]{}|]/g,Bk=/^\[object .+?Constructor\]$/,Rk=/^(?:0|[1-9]\d*)$/,Uk=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,Wk=typeof self=="object"&&self&&self.Object===Object&&self,du=Uk||Wk||Function("return this")();function Hk(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Vk(e,t){var r=e?e.length:0;return!!r&&Kk(e,t,0)>-1}function zk(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}function cb(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function pu(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Gk(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Kk(e,t,r){if(t!==t)return Gk(e,qk,r);for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function qk(e){return e!==e}function Yk(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Jk(e){return function(t){return e(t)}}function Xk(e,t){return e.has(t)}function Zk(e,t){return e==null?void 0:e[t]}function Qk(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function ub(e,t){return function(r){return e(t(r))}}var e4=Array.prototype,t4=Function.prototype,$s=Object.prototype,hu=du["__core-js_shared__"],fb=function(){var e=/[^.]+$/.exec(hu&&hu.keys&&hu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),db=t4.toString,Io=$s.hasOwnProperty,gu=$s.toString,r4=RegExp("^"+db.call(Io).replace(jk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),pb=du.Symbol,n4=ub(Object.getPrototypeOf,Object),o4=$s.propertyIsEnumerable,i4=e4.splice,hb=pb?pb.isConcatSpreadable:void 0,vu=Object.getOwnPropertySymbols,gb=Math.max,a4=mb(du,"Map"),Ni=mb(Object,"create");function Gn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function s4(){this.__data__=Ni?Ni(null):{}}function l4(e){return this.has(e)&&delete this.__data__[e]}function c4(e){var t=this.__data__;if(Ni){var r=t[e];return r===fu?void 0:r}return Io.call(t,e)?t[e]:void 0}function u4(e){var t=this.__data__;return Ni?t[e]!==void 0:Io.call(t,e)}function f4(e,t){var r=this.__data__;return r[e]=Ni&&t===void 0?fu:t,this}Gn.prototype.clear=s4,Gn.prototype.delete=l4,Gn.prototype.get=c4,Gn.prototype.has=u4,Gn.prototype.set=f4;function Po(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function d4(){this.__data__=[]}function p4(e){var t=this.__data__,r=As(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():i4.call(t,r,1),!0}function h4(e){var t=this.__data__,r=As(t,e);return r<0?void 0:t[r][1]}function g4(e){return As(this.__data__,e)>-1}function v4(e,t){var r=this.__data__,n=As(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Po.prototype.clear=d4,Po.prototype.delete=p4,Po.prototype.get=h4,Po.prototype.has=g4,Po.prototype.set=v4;function ko(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function m4(){this.__data__={hash:new Gn,map:new(a4||Po),string:new Gn}}function b4(e){return Os(this,e).delete(e)}function y4(e){return Os(this,e).get(e)}function w4(e){return Os(this,e).has(e)}function _4(e,t){return Os(this,e).set(e,t),this}ko.prototype.clear=m4,ko.prototype.delete=b4,ko.prototype.get=y4,ko.prototype.has=w4,ko.prototype.set=_4;function Cs(e){var t=-1,r=e?e.length:0;for(this.__data__=new ko;++t<r;)this.add(e[t])}function E4(e){return this.__data__.set(e,fu),this}function x4(e){return this.__data__.has(e)}Cs.prototype.add=Cs.prototype.push=E4,Cs.prototype.has=x4;function S4(e,t){var r=mu(e)||bb(e)?Yk(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Io.call(e,i))&&!(o&&(i=="length"||M4(i,n)))&&r.push(i);return r}function As(e,t){for(var r=e.length;r--;)if(H4(e[r][0],t))return r;return-1}function $4(e,t,r,n){var o=-1,i=Vk,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=cb(t,Jk(r))),n?(i=zk,a=!1):t.length>=kk&&(i=Xk,a=!1,t=new Cs(t));e:for(;++o<s;){var f=e[o],d=r?r(f):f;if(f=n||f!==0?f:0,a&&d===d){for(var p=u;p--;)if(t[p]===d)continue e;l.push(f)}else i(t,d,n)||l.push(f)}return l}function vb(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=L4),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?vb(s,t-1,r,n,o):pu(o,s):n||(o[o.length]=s)}return o}function C4(e,t,r){var n=t(e);return mu(e)?n:pu(n,r(e))}function A4(e){if(!bu(e)||j4(e))return!1;var t=wb(e)||Qk(e)?r4:Bk;return t.test(W4(e))}function O4(e){if(!bu(e))return R4(e);var t=B4(e),r=[];for(var n in e)n=="constructor"&&(t||!Io.call(e,n))||r.push(n);return r}function T4(e,t){return e=Object(e),I4(e,t,function(r,n){return n in e})}function I4(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function P4(e,t){return t=gb(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=gb(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,Hk(e,this,a)}}function k4(e){return C4(e,K4,D4)}function Os(e,t){var r=e.__data__;return F4(t)?r[typeof t=="string"?"string":"hash"]:r.map}function mb(e,t){var r=Zk(e,t);return A4(r)?r:void 0}var N4=vu?ub(vu,Object):Eb,D4=vu?function(e){for(var t=[];e;)pu(t,N4(e)),e=n4(e);return t}:Eb;function L4(e){return mu(e)||bb(e)||!!(hb&&e&&e[hb])}function M4(e,t){return t=t??lb,!!t&&(typeof e=="number"||Rk.test(e))&&e>-1&&e%1==0&&e<t}function F4(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function j4(e){return!!fb&&fb in e}function B4(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||$s;return e===r}function R4(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}function U4(e){if(typeof e=="string"||G4(e))return e;var t=e+"";return t=="0"&&1/e==-Nk?"-0":t}function W4(e){if(e!=null){try{return db.call(e)}catch{}try{return e+""}catch{}}return""}function H4(e,t){return e===t||e!==e&&t!==t}function bb(e){return V4(e)&&Io.call(e,"callee")&&(!o4.call(e,"callee")||gu.call(e)==Dk)}var mu=Array.isArray;function yb(e){return e!=null&&z4(e.length)&&!wb(e)}function V4(e){return _b(e)&&yb(e)}function wb(e){var t=bu(e)?gu.call(e):"";return t==Lk||t==Mk}function z4(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=lb}function bu(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function _b(e){return!!e&&typeof e=="object"}function G4(e){return typeof e=="symbol"||_b(e)&&gu.call(e)==Fk}function K4(e){return yb(e)?S4(e,!0):O4(e)}P4(function(e,t){return e==null?{}:(t=cb(vb(t,1),U4),T4(e,$4(k4(e),t)))});function Eb(){return[]}var q4=1/0,Y4=9007199254740991,J4="[object Arguments]",X4="[object Function]",Z4="[object GeneratorFunction]",Q4="[object Symbol]",eN=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,tN=typeof self=="object"&&self&&self.Object===Object&&self,rN=eN||tN||Function("return this")();function nN(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function oN(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function iN(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var yu=Object.prototype,aN=yu.hasOwnProperty,wu=yu.toString,xb=rN.Symbol,sN=yu.propertyIsEnumerable,Sb=xb?xb.isConcatSpreadable:void 0,$b=Math.max;function Cb(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=fN),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?Cb(s,t-1,r,n,o):iN(o,s):n||(o[o.length]=s)}return o}function lN(e,t){return e=Object(e),cN(e,t,function(r,n){return n in e})}function cN(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function uN(e,t){return t=$b(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=$b(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,nN(e,this,a)}}function fN(e){return hN(e)||pN(e)||!!(Sb&&e&&e[Sb])}function dN(e){if(typeof e=="string"||wN(e))return e;var t=e+"";return t=="0"&&1/e==-q4?"-0":t}function pN(e){return vN(e)&&aN.call(e,"callee")&&(!sN.call(e,"callee")||wu.call(e)==J4)}var hN=Array.isArray;function gN(e){return e!=null&&bN(e.length)&&!mN(e)}function vN(e){return Ab(e)&&gN(e)}function mN(e){var t=yN(e)?wu.call(e):"";return t==X4||t==Z4}function bN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Y4}function yN(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Ab(e){return!!e&&typeof e=="object"}function wN(e){return typeof e=="symbol"||Ab(e)&&wu.call(e)==Q4}uN(function(e,t){return e==null?{}:lN(e,oN(Cb(t,1),dN))});var _N=Object.create,Ob=Object.defineProperty,EN=Object.getOwnPropertyDescriptor,Tb=Object.getOwnPropertyNames,xN=Object.getPrototypeOf,SN=Object.prototype.hasOwnProperty,Ve=(e,t)=>function(){return t||(0,e[Tb(e)[0]])((t={exports:{}}).exports,t),t.exports},$N=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Tb(t))!SN.call(e,o)&&o!==r&&Ob(e,o,{get:()=>t[o],enumerable:!(n=EN(t,o))||n.enumerable});return e},Di=(e,t,r)=>(r=e!=null?_N(xN(e)):{},$N(t||!e||!e.__esModule?Ob(r,"default",{value:e,enumerable:!0}):r,e)),Ib=Ve({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},o=Symbol("test"),i=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var a=42;n[o]=a;for(o in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var s=Object.getOwnPropertySymbols(n);if(s.length!==1||s[0]!==o||!Object.prototype.propertyIsEnumerable.call(n,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(n,o);if(l.value!==a||l.enumerable!==!0)return!1}return!0}}}),Li=Ve({"node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(e,t){var r=Ib();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),Pb=Ve({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=Ib();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),kb=Ve({"node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js"(e,t){var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}}),CN=Ve({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,o=Math.max,i="[object Function]",a=function(f,d){for(var p=[],h=0;h<f.length;h+=1)p[h]=f[h];for(var g=0;g<d.length;g+=1)p[g+f.length]=d[g];return p},s=function(f,d){for(var p=[],h=d||0,g=0;h<f.length;h+=1,g+=1)p[g]=f[h];return p},l=function(u,f){for(var d="",p=0;p<u.length;p+=1)d+=u[p],p+1<u.length&&(d+=f);return d};t.exports=function(f){var d=this;if(typeof d!="function"||n.apply(d)!==i)throw new TypeError(r+d);for(var p=s(arguments,1),h,g=function(){if(this instanceof h){var E=d.apply(this,a(p,arguments));return Object(E)===E?E:this}return d.apply(f,a(p,arguments))},v=o(0,d.length-p.length),y=[],m=0;m<v;m++)y[m]="$"+m;if(h=Function("binder","return function ("+l(y,",")+"){ return binder.apply(this,arguments); }")(g),d.prototype){var w=function(){};w.prototype=d.prototype,h.prototype=new w,w.prototype=null}return h}}}),_u=Ve({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(e,t){var r=CN();t.exports=Function.prototype.bind||r}}),AN=Ve({"node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,n=Object.prototype.hasOwnProperty,o=_u();t.exports=o.call(r,n)}}),No=Ve({"node_modules/.pnpm/get-intrinsic@1.2.2/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Pb()(),d=kb()(),p=Object.getPrototypeOf||(d?function(K){return K.__proto__}:null),h={},g=typeof Uint8Array>"u"||!p?r:p(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(K){y=p(p(K)),v["%Error.prototype%"]=y}var y,m=function K(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=K("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=K("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return v[Y]=te,te},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=_u(),x=AN(),k=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),P=E.call(Function.call,RegExp.prototype.exec),F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=C(Y,0,1),oe=C(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,F,function(ae,ge,ce,q){le[le.length]=ce?S(q,D,"$1"):ge||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(v,oe)){var ae=v[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ge=ae.name,ce=ae.value,q=!1,H=ae.alias;H&&(le=H[0],I(oe,k([0,1],H)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],z=C(U,0,1),M=C(U,-1);if((z==='"'||z==="'"||z==="`"||M==='"'||M==="'"||M==="`")&&z!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(q=!0),le+="."+U,ge="%"+le+"%",x(v,ge))ce=v[ge];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!q&&(v[ge]=ce)}}return ce}}}),Nb=Ve({"node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js"(e,t){var r=No(),n=r("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch{return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},t.exports=o}}),Eu=Ve({"node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(e,t){var r=No(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),ON=Ve({"node_modules/.pnpm/define-data-property@1.1.1/node_modules/define-data-property/index.js"(e,t){var r=Nb()(),n=No(),o=r&&n("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch{o=!1}var i=n("%SyntaxError%"),a=n("%TypeError%"),s=Eu();t.exports=function(u,f,d){if(!u||typeof u!="object"&&typeof u!="function")throw new a("`obj` must be an object or a function`");if(typeof f!="string"&&typeof f!="symbol")throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new a("`loose`, if provided, must be a boolean");var p=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,g=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,y=!!s&&s(u,f);if(o)o(u,f,{configurable:g===null&&y?y.configurable:!g,enumerable:p===null&&y?y.enumerable:!p,value:d,writable:h===null&&y?y.writable:!h});else if(v||!p&&!h&&!g)u[f]=d;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),TN=Ve({"node_modules/.pnpm/set-function-length@1.1.1/node_modules/set-function-length/index.js"(e,t){var r=No(),n=ON(),o=Nb()(),i=Eu(),a=r("%TypeError%"),s=r("%Math.floor%");t.exports=function(u,f){if(typeof u!="function")throw new a("`fn` is not a function");if(typeof f!="number"||f<0||f>4294967295||s(f)!==f)throw new a("`length` must be a positive 32-bit integer");var d=arguments.length>2&&!!arguments[2],p=!0,h=!0;if("length"in u&&i){var g=i(u,"length");g&&!g.configurable&&(p=!1),g&&!g.writable&&(h=!1)}return(p||h||!d)&&(o?n(u,"length",f,!0,!0):n(u,"length",f)),u}}}),Db=Ve({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/index.js"(e,t){var r=_u(),n=No(),o=TN(),i=n("%TypeError%"),a=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||r.call(s,a),u=n("%Object.defineProperty%",!0),f=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}t.exports=function(h){if(typeof h!="function")throw new i("a function is required");var g=l(r,s,arguments);return o(g,1+f(0,h.length-(arguments.length-1)),!0)};var d=function(){return l(r,a,arguments)};u?u(t.exports,"apply",{value:d}):t.exports.apply=d}}),Lb=Ve({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/callBound.js"(e,t){var r=No(),n=Db(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),IN=Ve({"node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js"(e,t){var r=Li()(),n=Lb(),o=n("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:o(u)==="[object Arguments]"},a=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&o(u)!=="[object Array]"&&o(u.callee)==="[object Function]"},s=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=s?i:a}}),PN=Ve({"node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js"(e,t){var r=Object.prototype.toString,n=Function.prototype.toString,o=/^\s*(?:function)?\*/,i=Li()(),a=Object.getPrototypeOf,s=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch{}},l;t.exports=function(f){if(typeof f!="function")return!1;if(o.test(n.call(f)))return!0;if(!i){var d=r.call(f);return d==="[object GeneratorFunction]"}if(!a)return!1;if(typeof l>"u"){var p=s();l=p?a(p):!1}return a(f)===l}}}),kN=Ve({"node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js"(e,t){var r=Function.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(x){x!==i&&(n=null)}else n=null;var a=/^\s*class\b/,s=function(k){try{var I=r.call(k);return a.test(I)}catch{return!1}},l=function(k){try{return s(k)?!1:(r.call(k),!0)}catch{return!1}},u=Object.prototype.toString,f="[object Object]",d="[object Function]",p="[object GeneratorFunction]",h="[object HTMLAllCollection]",g="[object HTML document.all class]",v="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),w=function(){return!1};typeof document=="object"&&(E=document.all,u.call(E)===u.call(document.all)&&(w=function(k){if((m||!k)&&(typeof k>"u"||typeof k=="object"))try{var I=u.call(k);return(I===h||I===g||I===v||I===f)&&k("")==null}catch{}return!1}));var E;t.exports=n?function(k){if(w(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{n(k,null,o)}catch(I){if(I!==i)return!1}return!s(k)&&l(k)}:function(k){if(w(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(y)return l(k);if(s(k))return!1;var I=u.call(k);return I!==d&&I!==p&&!/^\[object HTML/.test(I)?!1:l(k)}}}),xu=Ve({"node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js"(e,t){var r=kN(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(f,d,p){for(var h=0,g=f.length;h<g;h++)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},a=function(f,d,p){for(var h=0,g=f.length;h<g;h++)p==null?d(f.charAt(h),h,f):d.call(p,f.charAt(h),h,f)},s=function(f,d,p){for(var h in f)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},l=function(f,d,p){if(!r(d))throw new TypeError("iterator must be a function");var h;arguments.length>=3&&(h=p),n.call(f)==="[object Array]"?i(f,d,h):typeof f=="string"?a(f,d,h):s(f,d,h)};t.exports=l}}),Su=Ve({"node_modules/.pnpm/available-typed-arrays@1.0.5/node_modules/available-typed-arrays/index.js"(e,t){var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var i=[],a=0;a<r.length;a++)typeof n[r[a]]=="function"&&(i[i.length]=r[a]);return i}}}),NN=Ve({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var l=this;if(typeof l!="function"||o.call(l)!==i)throw new TypeError(r+l);for(var u=n.call(arguments,1),f,d=function(){if(this instanceof f){var y=l.apply(this,u.concat(n.call(arguments)));return Object(y)===y?y:this}else return l.apply(s,u.concat(n.call(arguments)))},p=Math.max(0,l.length-u.length),h=[],g=0;g<p;g++)h.push("$"+g);if(f=Function("binder","return function ("+h.join(",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var v=function(){};v.prototype=l.prototype,f.prototype=new v,v.prototype=null}return f}}}),$u=Ve({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(e,t){var r=NN();t.exports=Function.prototype.bind||r}}),DN=Ve({"node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(e,t){var r=$u();t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)}}),Cu=Ve({"node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Pb()(),d=kb()(),p=Object.getPrototypeOf||(d?function(K){return K.__proto__}:null),h={},g=typeof Uint8Array>"u"||!p?r:p(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(K){y=p(p(K)),v["%Error.prototype%"]=y}var y,m=function K(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=K("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=K("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return v[Y]=te,te},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=$u(),x=DN(),k=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),P=E.call(Function.call,RegExp.prototype.exec),F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=C(Y,0,1),oe=C(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,F,function(ae,ge,ce,q){le[le.length]=ce?S(q,D,"$1"):ge||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(v,oe)){var ae=v[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ge=ae.name,ce=ae.value,q=!1,H=ae.alias;H&&(le=H[0],I(oe,k([0,1],H)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],z=C(U,0,1),M=C(U,-1);if((z==='"'||z==="'"||z==="`"||M==='"'||M==="'"||M==="`")&&z!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(q=!0),le+="."+U,ge="%"+le+"%",x(v,ge))ce=v[ge];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!q&&(v[ge]=ce)}}return ce}}}),LN=Ve({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(e,t){var r=$u(),n=Cu(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||r.call(i,o),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(p){var h=a(r,i,arguments);if(s&&l){var g=s(h,"length");g.configurable&&l(h,"length",{value:1+u(0,p.length-(arguments.length-1))})}return h};var f=function(){return a(r,o,arguments)};l?l(t.exports,"apply",{value:f}):t.exports.apply=f}}),Mb=Ve({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(e,t){var r=Cu(),n=LN(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),Fb=Ve({"node_modules/.pnpm/es-abstract@1.20.4/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js"(e,t){var r=Cu(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),MN=Ve({"node_modules/.pnpm/which-typed-array@1.1.13/node_modules/which-typed-array/index.js"(e,t){var r=xu(),n=Su(),o=Db(),i=Lb(),a=Eu(),s=i("Object.prototype.toString"),l=Li()(),u=typeof globalThis>"u"?global:globalThis,f=n(),d=i("String.prototype.slice"),p=Object.getPrototypeOf,h=i("Array.prototype.indexOf",!0)||function(w,E){for(var x=0;x<w.length;x+=1)if(w[x]===E)return x;return-1},g={__proto__:null};l&&a&&p?r(f,function(m){var w=new u[m];if(Symbol.toStringTag in w){var E=p(w),x=a(E,Symbol.toStringTag);if(!x){var k=p(E);x=a(k,Symbol.toStringTag)}g["$"+m]=o(x.get)}}):r(f,function(m){var w=new u[m],E=w.slice||w.set;E&&(g["$"+m]=o(E))});var v=function(w){var E=!1;return r(g,function(x,k){if(!E)try{"$"+x(w)===k&&(E=d(k,1))}catch{}}),E},y=function(w){var E=!1;return r(g,function(x,k){if(!E)try{x(w),E=d(k,1)}catch{}}),E};t.exports=function(w){if(!w||typeof w!="object")return!1;if(!l){var E=d(s(w),8,-1);return h(f,E)>-1?E:E!=="Object"?!1:y(w)}return a?v(w):null}}}),FN=Ve({"node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js"(e,t){var r=MN();t.exports=function(o){return!!r(o)}}}),jN=Ve({"node_modules/.pnpm/which-typed-array@1.1.8/node_modules/which-typed-array/index.js"(e,t){var r=xu(),n=Su(),o=Mb(),i=o("Object.prototype.toString"),a=Li()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("String.prototype.slice"),f={},d=Fb(),p=Object.getPrototypeOf;a&&d&&p&&r(l,function(v){if(typeof s[v]=="function"){var y=new s[v];if(Symbol.toStringTag in y){var m=p(y),w=d(m,Symbol.toStringTag);if(!w){var E=p(m);w=d(E,Symbol.toStringTag)}f[v]=w.get}}});var h=function(y){var m=!1;return r(f,function(w,E){if(!m)try{var x=w.call(y);x===E&&(m=x)}catch{}}),m},g=FN();t.exports=function(y){return g(y)?!a||!(Symbol.toStringTag in y)?u(i(y),8,-1):h(y):!1}}}),BN=Ve({"node_modules/.pnpm/is-typed-array@1.1.9/node_modules/is-typed-array/index.js"(e,t){var r=xu(),n=Su(),o=Mb(),i=o("Object.prototype.toString"),a=Li()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("Array.prototype.indexOf",!0)||function(y,m){for(var w=0;w<y.length;w+=1)if(y[w]===m)return w;return-1},f=o("String.prototype.slice"),d={},p=Fb(),h=Object.getPrototypeOf;a&&p&&h&&r(l,function(v){var y=new s[v];if(Symbol.toStringTag in y){var m=h(y),w=p(m,Symbol.toStringTag);if(!w){var E=h(m);w=p(E,Symbol.toStringTag)}d[v]=w.get}});var g=function(y){var m=!1;return r(d,function(w,E){if(!m)try{m=w.call(y)===E}catch{}}),m};t.exports=function(y){if(!y||typeof y!="object")return!1;if(!a||!(Symbol.toStringTag in y)){var m=f(i(y),8,-1);return u(l,m)>-1}return p?g(y):!1}}}),RN=Ve({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js"(e){var t=IN(),r=PN(),n=jN(),o=BN();function i(ie){return ie.call.bind(ie)}var a=typeof BigInt<"u",s=typeof Symbol<"u",l=i(Object.prototype.toString),u=i(Number.prototype.valueOf),f=i(String.prototype.valueOf),d=i(Boolean.prototype.valueOf);a&&(p=i(BigInt.prototype.valueOf));var p;s&&(h=i(Symbol.prototype.valueOf));var h;function g(ie,Ne){if(typeof ie!="object")return!1;try{return Ne(ie),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function v(ie){return typeof Promise<"u"&&ie instanceof Promise||ie!==null&&typeof ie=="object"&&typeof ie.then=="function"&&typeof ie.catch=="function"}e.isPromise=v;function y(ie){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ie):o(ie)||H(ie)}e.isArrayBufferView=y;function m(ie){return n(ie)==="Uint8Array"}e.isUint8Array=m;function w(ie){return n(ie)==="Uint8ClampedArray"}e.isUint8ClampedArray=w;function E(ie){return n(ie)==="Uint16Array"}e.isUint16Array=E;function x(ie){return n(ie)==="Uint32Array"}e.isUint32Array=x;function k(ie){return n(ie)==="Int8Array"}e.isInt8Array=k;function I(ie){return n(ie)==="Int16Array"}e.isInt16Array=I;function S(ie){return n(ie)==="Int32Array"}e.isInt32Array=S;function C(ie){return n(ie)==="Float32Array"}e.isFloat32Array=C;function P(ie){return n(ie)==="Float64Array"}e.isFloat64Array=P;function F(ie){return n(ie)==="BigInt64Array"}e.isBigInt64Array=F;function D(ie){return n(ie)==="BigUint64Array"}e.isBigUint64Array=D;function N(ie){return l(ie)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function J(ie){return typeof Map>"u"?!1:N.working?N(ie):ie instanceof Map}e.isMap=J;function K(ie){return l(ie)==="[object Set]"}K.working=typeof Set<"u"&&K(new Set);function Y(ie){return typeof Set>"u"?!1:K.working?K(ie):ie instanceof Set}e.isSet=Y;function te(ie){return l(ie)==="[object WeakMap]"}te.working=typeof WeakMap<"u"&&te(new WeakMap);function oe(ie){return typeof WeakMap>"u"?!1:te.working?te(ie):ie instanceof WeakMap}e.isWeakMap=oe;function le(ie){return l(ie)==="[object WeakSet]"}le.working=typeof WeakSet<"u"&&le(new WeakSet);function ae(ie){return le(ie)}e.isWeakSet=ae;function ge(ie){return l(ie)==="[object ArrayBuffer]"}ge.working=typeof ArrayBuffer<"u"&&ge(new ArrayBuffer);function ce(ie){return typeof ArrayBuffer>"u"?!1:ge.working?ge(ie):ie instanceof ArrayBuffer}e.isArrayBuffer=ce;function q(ie){return l(ie)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function H(ie){return typeof DataView>"u"?!1:q.working?q(ie):ie instanceof DataView}e.isDataView=H;var re=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(ie){return l(ie)==="[object SharedArrayBuffer]"}function U(ie){return typeof re>"u"?!1:(typeof de.working>"u"&&(de.working=de(new re)),de.working?de(ie):ie instanceof re)}e.isSharedArrayBuffer=U;function z(ie){return l(ie)==="[object AsyncFunction]"}e.isAsyncFunction=z;function M(ie){return l(ie)==="[object Map Iterator]"}e.isMapIterator=M;function R(ie){return l(ie)==="[object Set Iterator]"}e.isSetIterator=R;function G(ie){return l(ie)==="[object Generator]"}e.isGeneratorObject=G;function O(ie){return l(ie)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=O;function T(ie){return g(ie,u)}e.isNumberObject=T;function Z(ie){return g(ie,f)}e.isStringObject=Z;function ne(ie){return g(ie,d)}e.isBooleanObject=ne;function pe(ie){return a&&g(ie,p)}e.isBigIntObject=pe;function me(ie){return s&&g(ie,h)}e.isSymbolObject=me;function xe(ie){return T(ie)||Z(ie)||ne(ie)||pe(ie)||me(ie)}e.isBoxedPrimitive=xe;function Ee(ie){return typeof Uint8Array<"u"&&(ce(ie)||U(ie))}e.isAnyArrayBuffer=Ee,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ie){Object.defineProperty(e,ie,{enumerable:!1,value:function(){throw new Error(ie+" is not supported in userland")}})})}}),UN=Ve({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}}}),WN=Ve({"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=function(n,o){o&&(n.super_=o,n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,o){if(o){n.super_=o;var i=function(){};i.prototype=o.prototype,n.prototype=new i,n.prototype.constructor=n}}}}),jb=Ve({"node_modules/.pnpm/util@0.12.5/node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(H){for(var re=Object.keys(H),de={},U=0;U<re.length;U++)de[re[U]]=Object.getOwnPropertyDescriptor(H,re[U]);return de},r=/%[sdj%]/g;e.format=function(q){if(!k(q)){for(var H=[],re=0;re<arguments.length;re++)H.push(a(arguments[re]));return H.join(" ")}for(var re=1,de=arguments,U=de.length,z=String(q).replace(r,function(R){if(R==="%%")return"%";if(re>=U)return R;switch(R){case"%s":return String(de[re++]);case"%d":return Number(de[re++]);case"%j":try{return JSON.stringify(de[re++])}catch{return"[Circular]"}default:return R}}),M=de[re];re<U;M=de[++re])w(M)||!P(M)?z+=" "+M:z+=" "+a(M);return z},e.deprecate=function(q,H){if(typeof process<"u"&&process.noDeprecation===!0)return q;if(typeof process>"u")return function(){return e.deprecate(q,H).apply(this,arguments)};var re=!1;function de(){if(!re){if(process.throwDeprecation)throw new Error(H);process.traceDeprecation?console.trace(H):console.error(H),re=!0}return q.apply(this,arguments)}return de};var n={},o=/^$/;process.env.NODE_DEBUG&&(i=process.env.NODE_DEBUG,i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+i+"$","i"));var i;e.debuglog=function(q){if(q=q.toUpperCase(),!n[q])if(o.test(q)){var H=process.pid;n[q]=function(){var re=e.format.apply(e,arguments);console.error("%s %d: %s",q,H,re)}}else n[q]=function(){};return n[q]};function a(q,H){var re={seen:[],stylize:l};return arguments.length>=3&&(re.depth=arguments[2]),arguments.length>=4&&(re.colors=arguments[3]),m(H)?re.showHidden=H:H&&e._extend(re,H),S(re.showHidden)&&(re.showHidden=!1),S(re.depth)&&(re.depth=2),S(re.colors)&&(re.colors=!1),S(re.customInspect)&&(re.customInspect=!0),re.colors&&(re.stylize=s),f(re,q,re.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(q,H){var re=a.styles[H];return re?"\x1B["+a.colors[re][0]+"m"+q+"\x1B["+a.colors[re][1]+"m":q}function l(q,H){return q}function u(q){var H={};return q.forEach(function(re,de){H[re]=!0}),H}function f(q,H,re){if(q.customInspect&&H&&N(H.inspect)&&H.inspect!==e.inspect&&!(H.constructor&&H.constructor.prototype===H)){var de=H.inspect(re,q);return k(de)||(de=f(q,de,re)),de}var U=d(q,H);if(U)return U;var z=Object.keys(H),M=u(z);if(q.showHidden&&(z=Object.getOwnPropertyNames(H)),D(H)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return p(H);if(z.length===0){if(N(H)){var R=H.name?": "+H.name:"";return q.stylize("[Function"+R+"]","special")}if(C(H))return q.stylize(RegExp.prototype.toString.call(H),"regexp");if(F(H))return q.stylize(Date.prototype.toString.call(H),"date");if(D(H))return p(H)}var G="",O=!1,T=["{","}"];if(y(H)&&(O=!0,T=["[","]"]),N(H)){var Z=H.name?": "+H.name:"";G=" [Function"+Z+"]"}if(C(H)&&(G=" "+RegExp.prototype.toString.call(H)),F(H)&&(G=" "+Date.prototype.toUTCString.call(H)),D(H)&&(G=" "+p(H)),z.length===0&&(!O||H.length==0))return T[0]+G+T[1];if(re<0)return C(H)?q.stylize(RegExp.prototype.toString.call(H),"regexp"):q.stylize("[Object]","special");q.seen.push(H);var ne;return O?ne=h(q,H,re,M,z):ne=z.map(function(pe){return g(q,H,re,M,pe,O)}),q.seen.pop(),v(ne,G,T)}function d(q,H){if(S(H))return q.stylize("undefined","undefined");if(k(H)){var re="'"+JSON.stringify(H).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(re,"string")}if(x(H))return q.stylize(""+H,"number");if(m(H))return q.stylize(""+H,"boolean");if(w(H))return q.stylize("null","null")}function p(q){return"["+Error.prototype.toString.call(q)+"]"}function h(q,H,re,de,U){for(var z=[],M=0,R=H.length;M<R;++M)le(H,String(M))?z.push(g(q,H,re,de,String(M),!0)):z.push("");return U.forEach(function(G){G.match(/^\d+$/)||z.push(g(q,H,re,de,G,!0))}),z}function g(q,H,re,de,U,z){var M,R,G;if(G=Object.getOwnPropertyDescriptor(H,U)||{value:H[U]},G.get?G.set?R=q.stylize("[Getter/Setter]","special"):R=q.stylize("[Getter]","special"):G.set&&(R=q.stylize("[Setter]","special")),le(de,U)||(M="["+U+"]"),R||(q.seen.indexOf(G.value)<0?(w(re)?R=f(q,G.value,null):R=f(q,G.value,re-1),R.indexOf(`
91
+ */const KA=500;let uv=0,qA=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(t){const r=t.id;r in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[r]=new cv(t))}remove(t){delete this.__keyborgCoreRefs[t],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(t){if(this._isNavigatingWithKeyboard!==t){this._isNavigatingWithKeyboard=t;for(const r of Object.keys(this.__keyborgCoreRefs)){const o=this.__keyborgCoreRefs[r].deref();o?o.update(t):this.remove(r)}}}getVal(){return this._isNavigatingWithKeyboard}};const Mr=new qA;let YA=class{constructor(t,r){this._isMouseUsed=!1,this._onFocusIn=o=>{if(this._isMouseUsed){this._isMouseUsed=!1;return}if(Mr.getVal())return;const i=o.details;i.relatedTarget&&(i.isFocusedProgrammatically||i.isFocusedProgrammatically===void 0||Mr.setVal(!0))},this._onMouseDown=o=>{o.buttons===0||o.clientX===0&&o.clientY===0&&o.screenX===0&&o.screenY===0||(this._isMouseUsed=!0,Mr.setVal(!1))},this._onKeyDown=o=>{var i;const a=Mr.getVal(),s=o.keyCode,l=this._triggerKeys;!a&&(!l||l.has(s))?Mr.setVal(!0):a&&(!((i=this._dismissKeys)===null||i===void 0)&&i.has(s))&&this._scheduleDismiss()},this.id="c"+ ++uv,this._win=t;const n=t.document;if(r){const o=r.triggerKeys,i=r.dismissKeys;o!=null&&o.length&&(this._triggerKeys=new Set(o)),i!=null&&i.length&&(this._dismissKeys=new Set(i))}n.addEventListener(Pc,this._onFocusIn,!0),n.addEventListener("mousedown",this._onMouseDown,!0),t.addEventListener("keydown",this._onKeyDown,!0),zA(t),Mr.add(this)}dispose(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),GA(t);const r=t.document;r.removeEventListener(Pc,this._onFocusIn,!0),r.removeEventListener("mousedown",this._onMouseDown,!0),t.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Mr.remove(this.id)}}isDisposed(){return!!this._win}update(t){var r,n;const o=(n=(r=this._win)===null||r===void 0?void 0:r.__keyborg)===null||n===void 0?void 0:n.refs;if(o)for(const i of Object.keys(o))fv.update(o[i],t)}_scheduleDismiss(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const r=t.document.activeElement;this._dismissTimer=t.setTimeout(()=>{this._dismissTimer=void 0;const n=t.document.activeElement;r&&n&&r===n&&Mr.setVal(!1)},KA)}}},fv=class R1{constructor(t,r){this._cb=[],this._id="k"+ ++uv,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new YA(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new R1(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.__keyborg;r!=null&&r.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV==="development"&&console.error("Keyborg instance "+this._id+" is being disposed incorrectly."),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Mr.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Mr.setVal(t)}};function JA(e,t){return fv.create(e,t)}var Fr=e=>{const{density:t}=c.useContext(Cv);return e??t},Rn=e=>{const{elevation:t}=c.useContext(mv);return e??t},dv="en-US",is="dxos-common",XA={[dv]:{[is]:{"loading translations":"Loading translations…"}}};Bt.use(ow).init({resources:XA,lng:dv,defaultNS:is,interpolation:{escapeValue:!1}});var ZA=c.createContext({appNs:is}),QA=({fallback:e,resourceExtensions:t,children:r,appNs:n})=>{const[o,i]=c.useState(!1);return c.useEffect(()=>{i(!1),t&&t.length&&t.forEach(a=>{Object.keys(a).forEach(s=>{Object.keys(a[s]).forEach(l=>{Bt.addResourceBundle(s,l,a[s][l])})})}),i(!0)},[t]),c.createElement(ZA.Provider,{value:{appNs:n??is}},c.createElement(c.Suspense,{fallback:e},o?r:e))},Ce=()=>c.useContext(Fv),eO=e=>{const[t,r]=c.useState(null),[n,o]=c.useState(null);return c.useEffect(()=>{var a;const i=()=>{window.visualViewport&&(r(window.visualViewport.width),o(window.visualViewport.height))};return(a=window.visualViewport)==null||a.addEventListener("resize",i),i(),()=>{var s;return(s=window.visualViewport)==null?void 0:s.removeEventListener("resize",i)}},e??[]),{width:t,height:n}},tO="Avatar",[rO,Un]=uo(tO),nO=({size:e=10,variant:t="circle",status:r,animation:n,children:o,labelId:i,descriptionId:a,maskId:s,inGroup:l,color:u})=>{const f=xt("avatar__label",i),d=xt("avatar__description",a),p=xt("avatar__mask",s);return c.createElement(rO,{labelId:f,descriptionId:d,maskId:p,size:e,variant:t,status:r,animation:n,inGroup:l,color:u},o)},pv="0.25rem",oO=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{size:o,variant:i,labelId:a,descriptionId:s,maskId:l,inGroup:u,status:f,animation:d,color:p}=Un("AvatarFrame"),{tx:h}=Ce(),g=o==="px"?1:Number(o),v=g*4,y=g>4?2:(g>3,1),m=g>12?3:g>4?2:g>3?1:0,w=v/2-m-y;return c.createElement(b_,{role:"img",...r,className:h("avatar.root","avatar",{size:o,variant:i,inGroup:u},e),ref:n,...!u&&{"aria-labelledby":a,"aria-describedby":s}},c.createElement("svg",{viewBox:`0 0 ${v} ${v}`,width:v,height:v,className:h("avatar.frame","avatar__frame",{variant:i})},c.createElement("defs",null,c.createElement("mask",{id:l},i==="circle"?c.createElement("circle",{fill:"white",cx:"50%",cy:"50%",r:w}):c.createElement("rect",{fill:"white",width:2*w,height:2*w,x:m+y,y:m+y,rx:pv}))),i==="circle"?c.createElement("circle",{className:`avatarFrameFill${p?"":" fill-[var(--surface-bg)]"}`,cx:"50%",cy:"50%",r:w,...p?{fill:p}:{}}):c.createElement("rect",{className:"avatarFrameFill fill-[var(--surface-bg)]",x:m+y,y:m+y,width:2*w,height:2*w,rx:pv}),t),c.createElement("span",{role:"none",className:h("avatar.ring","avatar__ring",{size:o,variant:i,status:f,animation:d}),style:{borderWidth:y+"px"}}))}),iO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?$t:Ge.span,{tx:a}=Ce(),{labelId:s}=Un("AvatarLabel");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.label","avatar__label",{srOnly:t},r)})}),aO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?$t:Ge.span,{tx:a}=Ce(),{descriptionId:s}=Un("AvatarDescription");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.description","avatar__description",{srOnly:t},r)})}),hv=c.forwardRef((e,t)=>{const{maskId:r}=Un("AvatarFallback");return c.createElement("image",{width:"100%",height:"100%",...e,mask:`url(#${r})`,ref:t,preserveAspectRatio:"xMidYMid slice"})}),sO=e=>{const{maskId:t,size:r}=Un("AvatarFallback"),{large:n}=e,o=(n?4:3)*(1/1.612),{tx:i}=Ce();return c.createElement("text",{x:"50%",y:"50%",className:i("avatar.fallbackText","avatar__fallback-text"),textAnchor:"middle",alignmentBaseline:"central",fontSize:r==="px"?"200%":r*o,mask:`url(#${t})`},e.children)},lO=c.forwardRef(({onLoadingStatusChange:e,...t},r)=>{const{size:n}=Un("AvatarImage");return(n==="px"?1:n*4)<=20?null:c.createElement(hp,{asChild:!0},c.createElement(hv,{...t,ref:r}))}),cO=c.forwardRef(({delayMs:e,text:t,...r},n)=>{const o=!!(t&&/[0-9a-zA-Z]+/.test(t)),{size:i}=Un("AvatarFallback"),a=i==="px"?1:Number(i);return c.createElement(hp,{delayMs:e,asChild:!0},c.createElement(c.Fragment,null,a>=6&&c.createElement(hv,{...r,ref:n}),t&&c.createElement(sO,{large:!o},t.toLocaleUpperCase())))}),uO=(e,t)=>`data:image/svg+xml;utf8,${encodeURIComponent(F_(e,t==="px"?1:t*4,{padding:0}))}`,as=(e,t)=>c.useMemo(()=>uO(e,t),[e]),It={Root:nO,Frame:oO,Image:lO,Fallback:cO,Label:iO,Description:aO},gv="ButtonGroup",vv="Button",[fO,dO]=uo(gv,{inGroup:!1}),wr=c.forwardRef(({classNames:e,children:t,density:r,elevation:n,variant:o="default",asChild:i,...a},s)=>{const{inGroup:l}=dO(vv),{tx:u}=Ce(),f=Rn(n),d=Fr(r),p=i?$t:Ge.button;return c.createElement(p,{ref:s,...a,className:u("button.root","button",{variant:o,inGroup:l,disabled:a.disabled,density:d,elevation:f},e),...a.disabled&&{disabled:!0}},t)});wr.displayName=vv;var pO=c.forwardRef(({children:e,elevation:t,classNames:r,asChild:n,...o},i)=>{const{tx:a}=Ce(),s=Rn(t),l=n?$t:Ge.div;return c.createElement(l,{role:"none",...o,className:a("button.group","button-group",{elevation:s},r),ref:i},c.createElement(fO,{inGroup:!0},e))});pO.displayName=gv;var mv=c.createContext({elevation:"base"}),Ti=({elevation:e,children:t})=>c.createElement(mv.Provider,{value:{elevation:e}},t),hO=Jl,gO=qp,vO=Xp,mO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ce();return c.createElement(th,{...r,className:o("dialog.title","dialog__title",{srOnly:t},e),ref:n})}),bO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ce();return c.createElement(rh,{...r,className:o("dialog.description","dialog__description",{srOnly:t},e),ref:n})}),yO=nh,bv="DialogOverlay",yv="DialogContent",[wO,_O]=uo(bv,{inOverlayLayout:!1}),wv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ce();return c.createElement(Zp,{...r,className:o("dialog.overlay","dialog__overlay",{},e),ref:n},c.createElement(wO,{inOverlayLayout:!0},t))});wv.displayName=bv;var _v=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ce(),{inOverlayLayout:i}=_O(yv);return c.createElement(ql,{...r,className:o("dialog.content","dialog",{inOverlayLayout:i},e),ref:n},c.createElement(Ti,{elevation:"chrome"},t))});_v.displayName=yv;var jr={Root:hO,Trigger:gO,Portal:vO,Overlay:wv,Content:_v,Title:mO,Description:bO,Close:yO},EO=wx,xO=lx,SO=cx,$O=yx,CO=mx,AO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ce();return c.createElement(gx,{...r,className:o("dialog.title","dialog--alert__title",{srOnly:t},e),ref:n})}),OO=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Ce();return c.createElement(vx,{...r,className:o("dialog.description","dialog--alert__description",{srOnly:t},e),ref:n})}),Ev="AlertDialogOverlay",xv="AlertDialogContent",[TO,IO]=uo(Ev,{inOverlayLayout:!1}),Sv=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ce();return c.createElement(ux,{...r,className:o("dialog.overlay","dialog--alert__overlay",{},e),ref:n},c.createElement(TO,{inOverlayLayout:!0},t))});Sv.displayName=Ev;var $v=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ce(),{inOverlayLayout:i}=IO(xv);return c.createElement(px,{...r,className:o("dialog.content","dialog--alert",{inOverlayLayout:i},e),ref:n},c.createElement(Ti,{elevation:"chrome"},t))});$v.displayName=xv;var xo={Root:EO,Trigger:xO,Portal:SO,Overlay:Sv,Content:$v,Title:AO,Description:OO,Cancel:$O,Action:CO},PO=OS,kO=US,NO=WS,DO=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ce();return c.createElement(HS,{sideOffset:4,collisionPadding:8,...r,className:o("menu.content","menu",{},e),ref:n},c.createElement(Ti,{elevation:"chrome"},t))}),LO=c.forwardRef(({classNames:e,asChild:t,children:r,...n},o)=>{const{tx:i}=Ce(),a=t?$t:Ge.div;return c.createElement(a,{...n,className:i("menu.viewport","menu__viewport",{},e),ref:o},r)}),MO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(JS,{...t,className:n("menu.arrow","menu__arrow",{},e),ref:r})}),FO=VS,jO=qS,BO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(GS,{...t,className:n("menu.item","menu__item",{},e),ref:r})}),RO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(KS,{...t,className:n("menu.item","menu__item--checkbox",{},e),ref:r})}),UO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(YS,{...t,className:n("menu.separator","menu__item",{},e),ref:r})}),WO=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(zS,{...t,className:n("menu.groupLabel","menu__group__label",{},e),ref:r})}),Wn={Root:PO,Trigger:kO,Portal:NO,Content:DO,Viewport:LO,Arrow:MO,Group:FO,Item:BO,CheckboxItem:RO,ItemIndicator:jO,Separator:UO,GroupLabel:WO},HO=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ce();return c.createElement(F$,{...n,className:i("input.label","input__label",{srOnly:e},t),ref:o},r)}),VO=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ce();return c.createElement(j$,{...n,className:i("input.description","input__description",{srOnly:e},t),ref:o},r)}),zO=c.forwardRef(({__inputScope:e,srOnly:t,classNames:r,children:n,...o},i)=>{const{tx:a}=Ce(),{validationValence:s}=ir(Rt,e);return c.createElement(R$,{...o,className:a("input.validation",`input__validation-message input__validation-message--${s}`,{srOnly:t,validationValence:s},r),ref:i},n)}),GO=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ce();return c.createElement(U$,{...n,className:i("input.descriptionAndValidation","input__description-and-validation",{srOnly:e},t),ref:o},r)}),KO=c.forwardRef(({density:e,elevation:t,segmentClassName:r,inputClassName:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ce(),{tx:l}=Ce(),u=Fr(e),f=Rn(t),d=c.useCallback(({focused:p,validationValence:h})=>l("input.input","input--pin-segment",{variant:"static",focused:p,disabled:i.disabled,density:u,elevation:f,validationValence:h},r),[l,i.disabled,f,t,u]);return c.createElement(W$,{...i,segmentClassName:d,...i.autoFocus&&!s&&{autoFocus:!0},inputClassName:l("input.inputWithSegments","input input--pin",{disabled:i.disabled},n),ref:a})}),qO=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ce(),l=Ce(),u=Fr(r),f=Rn(n),{validationValence:d}=ir(Rt,e),{tx:p}=l;return c.createElement(H$,{...i,className:p("input.input","input",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),YO=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Ce(),{tx:l}=Ce(),u=Fr(r),f=Rn(n),{validationValence:d}=ir(Rt,e);return c.createElement(V$,{...i,className:l("input.input","input--text-area",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),JO=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o,weight:i="bold",classNames:a,...s},l)=>{const[u,f]=qr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:g}=ir(Rt,e),{tx:v}=Ce(),y=u==="indeterminate"?ze.Minus:u?ze.Check:c.Fragment;return c.createElement(i$,{...s,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":g},className:v("input.checkbox","input--checkbox",{size:o},"shrink-0",a),ref:l},c.createElement(a$,{asChild:!0},c.createElement(y,u&&{weight:i,className:v("input.checkboxIndicator","input--checkbox__indicator",{size:o})})))}),XO=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o=5,classNames:i,...a},s)=>{const{tx:l}=Ce(),[u,f]=qr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:g}=ir(Rt,e);return c.createElement(g$,{...a,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":g},className:l("input.switch","input--switch",{size:o},i),ref:s},c.createElement(v$,{className:l("input.switchThumb","input--switch__thumb",{size:o})}))}),Br={Root:_g,PinInput:KO,TextInput:qO,TextArea:YO,Checkbox:JO,Switch:XO,Label:HO,Description:VO,Validation:zO,DescriptionAndValidation:GO},Cv=c.createContext({density:"coarse"}),So=({density:e,children:t})=>c.createElement(Cv.Provider,{value:{density:e}},t),Nc=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ce(),i=Fr(r.density);return c.createElement(So,{density:i},c.createElement(Sg,{...r,className:o("list.root","list",{},e),ref:n},t))}),ZO=c.forwardRef(({children:e,classNames:t,asChild:r,...n},o)=>{const i=r?$t:"div",a=Fr(),{tx:s}=Ce();return c.createElement(i,{...!r&&{role:"none"},...n,className:s("list.item.endcap","list__listItem__endcap",{density:a},t),ref:o},e)}),QO=({classNames:e,...t})=>{const r=Fr(),{tx:n}=Ce();return c.createElement("div",{role:"none",...t,className:n("list.item.openTrigger","list__listItem__openTrigger--mock",{density:r},e)})},eT=c.forwardRef(({children:e,classNames:t,...r},n)=>{const{tx:o}=Ce(),i=Fr();return c.createElement(aC,{...r,className:o("list.item.heading","list__listItem__heading",{density:i},t),ref:n},e)}),tT=c.forwardRef(({__listItemScope:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Ce(),a=Fr(),{open:s}=$g(Ei,e),l=s?ze.CaretDown:ze.CaretRight;return c.createElement(sC,{...n,className:i("list.item.openTrigger","list__listItem__openTrigger",{density:a},t),ref:o},r||c.createElement(l,{weight:"bold",className:i("list.item.openTriggerIcon","list__listItem__openTrigger__icon",{})}))}),rT=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Ce(),i=Fr();return c.createElement(Cg,{...r,className:o("list.item.root","list__listItem",{density:i,collapsible:r.collapsible},e),ref:n},t)}),Dc={Root:rT,Endcap:ZO,Heading:eT,OpenTrigger:tT,CollapsibleContent:lC,MockOpenTrigger:QO},Av;(function(e){e[e.IDLE=0]="IDLE",e[e.DEBOUNCING=1]="DEBOUNCING",e[e.FOLLOWING=2]="FOLLOWING"})(Av||(Av={}));var nT=(e,{onDismiss:t,dismissThreshold:r=64,debounceThreshold:n=8,offset:o=0})=>{const i=e.current,[a,s]=c.useState(0),[l,u]=c.useState(0),f=c.useCallback(()=>{s(0),i==null||i.style.removeProperty("inset-inline-start"),i==null||i.style.setProperty("transition-duration","200ms")},[i]),d=c.useCallback(()=>{s(2),i==null||i.style.setProperty("transition-duration","0ms")},[i]),p=c.useCallback(({screenX:v})=>{a===0&&(s(1),u(v))},[a]),h=c.useCallback(({screenX:v})=>{if(i){const y=Math.min(v-l,0);switch(a){case 2:Math.abs(y)>r?(f(),t==null||t()):i.style.setProperty("inset-inline-start",`${o+y}px`);break;case 1:Math.abs(y)>n&&d();break}}},[i,a,l]),g=c.useCallback(()=>{f()},[f]);c.useEffect(()=>(i==null||i.addEventListener("pointerdown",p),()=>{i==null||i.removeEventListener("pointerdown",p)}),[i,p]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointermove",h),()=>{document.documentElement.removeEventListener("pointermove",h)}),[i,h]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointerup",g),()=>{document.documentElement.removeEventListener("pointerup",g)}),[i,g])},Lc="NavigationSidebar",Mc="Main",[rj,Ov]=uo(Mc,{navigationSidebarOpen:!1,setNavigationSidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")},complementarySidebarOpen:!1,setComplementarySidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")}}),oT=e=>{!document.body.hasAttribute("data-is-keyboard")&&e.preventDefault()},iT=c.forwardRef(({classNames:e,children:t,swipeToDismiss:r,onOpenAutoFocus:n,open:o,setOpen:i,side:a,...s},l)=>{const[u]=Wd("lg",{ssr:!1}),{tx:f}=Ce(),d=Tl(l),p=c.useRef(null);nT(r?d:p,{onDismiss:()=>i(!1)});const h=u?Ge.div:ql;return c.createElement(Jl,{open:o,modal:!1},c.createElement(h,{...!u&&{forceMount:!0,tabIndex:-1,onOpenAutoFocus:n??oT},...s,className:f("main.sidebar","main__sidebar",{isLg:u,[a==="inline-end"?"inlineEndSidebarOpen":"inlineStartSidebarOpen"]:o,side:a},e),...!o&&{inert:"true"},ref:d},c.createElement(Ti,{elevation:"group"},t)))}),Tv=c.forwardRef((e,t)=>{const{navigationSidebarOpen:r,setNavigationSidebarOpen:n}=Ov(Lc);return c.createElement(iT,{...e,open:r,setOpen:n,side:"inline-start",ref:t})});Tv.displayName=Lc,Tv.displayName=Lc;var aT=c.forwardRef(({asChild:e,classNames:t,bounce:r,children:n,...o},i)=>{const[a]=Wd("lg",{ssr:!1}),{navigationSidebarOpen:s,complementarySidebarOpen:l}=Ov(Mc),{tx:u}=Ce(),f=e?$t:"main";return c.createElement(f,{...o,className:u("main.content","main",{isLg:a,inlineStartSidebarOpen:s,inlineEndSidebarOpen:l,bounce:r},t),ref:i},n)});aT.displayName=Mc;var Iv="Message",[sT,Pv]=uo(Iv),kv=c.forwardRef(({asChild:e,valence:t,elevation:r,className:n,titleId:o,descriptionId:i,children:a,...s},l)=>{const{tx:u}=Ce(),f=xt("message__title",o),d=xt("message__description",i),p=Rn(r),h=e?$t:Ge.div;return c.createElement(sT,{titleId:f,descriptionId:d},c.createElement(h,{...s,className:u("message.root","message",{valence:t,elevation:p},n),"aria-labelledby":f,"aria-describedby":d,ref:l},a))});kv.displayName=Iv;var Nv="MessageTitle",Dv=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Ce(),{titleId:a}=Pv(Nv),s=e?$t:Ge.h2;return c.createElement(s,{...n,className:i("message.title","message__title",{},t),id:a,ref:o},r)});Dv.displayName=Nv;var Lv="MessageBody",Mv=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Ce(),{descriptionId:a}=Pv(Lv),s=e?$t:Ge.p;return c.createElement(s,{...n,className:i("message.body","message__body",{},t),id:a,ref:o},r)});Mv.displayName=Lv;var Fc={Root:kv,Title:Dv,Body:Mv},lT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(AC,{...t,className:n("scrollArea.root","scroll-area",{},e),ref:r})}),cT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(OC,{...t,className:n("scrollArea.viewport","scroll-area",{},e),ref:r})}),uT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(TC,{...t,className:n("scrollArea.scrollbar","scroll-area__scrollbar",{},e),ref:r})}),fT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(IC,{...t,className:n("scrollArea.thumb","scroll-area__thumb",{},e),ref:r})}),dT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(PC,{...t,className:n("scrollArea.corner","scroll-area__corner",{},e),ref:r})}),ss={Root:lT,Viewport:cT,Scrollbar:uT,Thumb:fT,Corner:dT},pT=UA,hT=WA,gT=TA,vT=CA,mT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(LA,{...t,className:n("tooltip.arrow","tooltip__arrow",{},e),ref:r})}),bT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Ce();return c.createElement(IA,{sideOffset:4,collisionPadding:8,...t,className:n("tooltip.content","tooltip",{},e),ref:r})}),_r={Provider:pT,Root:hT,Portal:gT,Trigger:vT,Arrow:mT,Content:bT},yT=()=>!!navigator.userAgent.match(/iP(ad|od|hone).+Safari/),Fv=c.createContext({tx:(e,t,r,...n)=>t,themeMode:"dark",hasIosKeyboard:!1}),jv=e=>{e?document.body.setAttribute("data-is-keyboard","true"):document.body.removeAttribute("data-is-keyboard")},wT=({children:e,fallback:t=null,resourceExtensions:r,appNs:n,tx:o=(l,u,f,...d)=>u,themeMode:i="dark",rootElevation:a="base",rootDensity:s="coarse"})=>(c.useEffect(()=>{if(document.defaultView){const l=JA(document.defaultView);return l.subscribe(jv),()=>l.unsubscribe(jv)}},[]),c.createElement(Fv.Provider,{value:{tx:o,themeMode:i,hasIosKeyboard:yT()}},c.createElement(QA,{fallback:t,resourceExtensions:r,appNs:n},c.createElement(Ti,{elevation:a},c.createElement(So,{density:s},e))))),_T={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},jc=_T,Bc={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function ET(e){return e.trim().replace(Bc.whitespace," ")}function xT(e){return encodeURIComponent(e).replace(Bc.urlHexPairs,$T)}function ST(e){return Object.keys(jc).forEach(function(t){jc[t].test(e)&&(e=e.replace(jc[t],t))}),e}function $T(e){switch(e){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return e.toLowerCase()}}function Rc(e){if(typeof e!="string")throw new TypeError("Expected a string, but received "+typeof e);e.charCodeAt(0)===65279&&(e=e.slice(1));var t=ST(ET(e)).replace(Bc.quotes,"'");return"data:image/svg+xml,"+xT(t)}Rc.toSrcset=function(t){return Rc(t).replace(/ /g,"%20")};var CT=Rc,Bv={},Rv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function t(n,o){return{handler:n,config:o}}t.withOptions=function(n,o=()=>({})){const i=function(a){return{__options:a,handler:n(a),config:o(a)}};return i.__isOptionsFunction=!0,i.__pluginFunction=n,i.__configFunction=o,i};const r=t})(Rv),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=r(Rv);function r(o){return o&&o.__esModule?o:{default:o}}const n=t.default}(Bv);let Uc=Bv;var Wc=(Uc.__esModule?Uc:{default:Uc}).default;const AT=ln(Wc);var Uv={},Wv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(r){return Array.isArray(r)?r.map(n=>t(n)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([n,o])=>[n,t(o)])):r}})(Wv);var OT={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:e})=>({...e("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>e("brightness"),backdropContrast:({theme:e})=>e("contrast"),backdropGrayscale:({theme:e})=>e("grayscale"),backdropHueRotate:({theme:e})=>e("hueRotate"),backdropInvert:({theme:e})=>e("invert"),backdropOpacity:({theme:e})=>e("opacity"),backdropSaturate:({theme:e})=>e("saturate"),backdropSepia:({theme:e})=>e("sepia"),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>({...e("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:e})=>e("colors"),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>e("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>({none:"none",...e("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridTemplateColumns:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))"},height:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:e})=>({...e("spacing"),none:"none",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(e("screens"))}),minHeight:{0:"0px",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",20:"0.2",25:"0.25",30:"0.3",40:"0.4",50:"0.5",60:"0.6",70:"0.7",75:"0.75",80:"0.8",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:e})=>({...e("spacing")}),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:e})=>({...e("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:e})=>({...e("spacing")}),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),width:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=Wv,r=n(OT);function n(i){return i&&i.__esModule?i:{default:i}}const o=(0,t.cloneDeep)(r.default.theme)})(Uv);let Hc=Uv;var TT=(Hc.__esModule?Hc:{default:Hc}).default,Hv={},Vv={},Vc={exports:{}},gt=String,zv=function(){return{isColorSupported:!1,reset:gt,bold:gt,dim:gt,italic:gt,underline:gt,inverse:gt,hidden:gt,strikethrough:gt,black:gt,red:gt,green:gt,yellow:gt,blue:gt,magenta:gt,cyan:gt,white:gt,gray:gt,bgBlack:gt,bgRed:gt,bgGreen:gt,bgYellow:gt,bgBlue:gt,bgMagenta:gt,bgCyan:gt,bgWhite:gt}};Vc.exports=zv(),Vc.exports.createColors=zv;var IT=Vc.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var f in u)Object.defineProperty(l,f,{enumerable:!0,get:u[f]})}t(e,{dim:function(){return a},default:function(){return s}});const r=n(IT);function n(l){return l&&l.__esModule?l:{default:l}}let o=new Set;function i(l,u,f){typeof process<"u"&&process.env.JEST_WORKER_ID||f&&o.has(f)||(f&&o.add(f),console.warn(""),u.forEach(d=>console.warn(l,"-",d)))}function a(l){return r.default.dim(l)}const s={info(l,u){i(r.default.bold(r.default.cyan("info")),...Array.isArray(l)?[l]:[u,l])},warn(l,u){i(r.default.bold(r.default.yellow("warn")),...Array.isArray(l)?[l]:[u,l])},risk(l,u){i(r.default.bold(r.default.magenta("risk")),...Array.isArray(l)?[l]:[u,l])}}})(Vv),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=r(Vv);function r(i){return i&&i.__esModule?i:{default:i}}function n({version:i,from:a,to:s}){t.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${i}, \`${a}\` has been renamed to \`${s}\`.`,"Update your configuration file to silence this warning."])}const o={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return n({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return n({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return n({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return n({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return n({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}(Hv);let zc=Hv;var PT=(zc.__esModule?zc:{default:zc}).default;const ls=CT,kT=Wc,Gv=TT,wn=PT,[NT,{lineHeight:DT}]=Gv.fontSize.base,{spacing:Qr,borderWidth:Kv,borderRadius:qv}=Gv;kT.withOptions(function(e={strategy:void 0}){return function({addBase:t,addComponents:r,theme:n}){const o=e.strategy===void 0?["base","class"]:[e.strategy],i=[{base:["[type='text']","[type='email']","[type='url']","[type='password']","[type='number']","[type='date']","[type='datetime-local']","[type='month']","[type='search']","[type='tel']","[type='time']","[type='week']","[multiple]","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":n("colors.gray.500",wn.gray[500]),"border-width":Kv.DEFAULT,"border-radius":qv.none,"padding-top":Qr[2],"padding-right":Qr[3],"padding-bottom":Qr[2],"padding-left":Qr[3],"font-size":NT,"line-height":DT,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",wn.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":n("colors.blue.600",wn.blue[600])}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:n("colors.gray.500",wn.gray[500]),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${ls(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${n("colors.gray.500",wn.gray[500])}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`)}")`,"background-position":`right ${Qr[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":Qr[10],"print-color-adjust":"exact"}},{base:["[multiple]"],class:null,styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":Qr[3],"print-color-adjust":"unset"}},{base:["[type='checkbox']","[type='radio']"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:Qr[4],width:Qr[4],color:n("colors.blue.600",wn.blue[600]),"background-color":"#fff","border-color":n("colors.gray.500",wn.gray[500]),"border-width":Kv.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":qv.none}},{base:["[type='radio']"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["[type='checkbox']:focus","[type='radio']:focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",wn.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"}},{base:["[type='checkbox']:checked","[type='radio']:checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${ls('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>')}")`}},{base:["[type='radio']:checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${ls('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>')}")`}},{base:["[type='checkbox']:checked:hover","[type='checkbox']:checked:focus","[type='radio']:checked:hover","[type='radio']:checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='checkbox']:indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${ls('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:indeterminate:hover","[type='checkbox']:indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='file']"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["[type='file']:focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],a=s=>i.map(l=>l[s]===null?null:{[l[s]]:l.styles}).filter(Boolean);o.includes("base")&&t(a("base")),o.includes("class")&&r(a("class"))}});var cs={exports:{}};cs.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",v="[object Map]",y="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",k="[object Set]",I="[object String]",S="[object Undefined]",C="[object WeakMap]",P="[object ArrayBuffer]",F="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,H={};H[D]=H[N]=H[J]=H[K]=H[Y]=H[te]=H[oe]=H[le]=H[ae]=!0,H[s]=H[l]=H[P]=H[f]=H[F]=H[d]=H[p]=H[h]=H[v]=H[y]=H[w]=H[x]=H[k]=H[I]=H[C]=!1;var re=typeof Je=="object"&&Je&&Je.Object===Object&&Je,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),z=t&&!t.nodeType&&t,M=z&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===z,G=R&&re.process,O=function(){try{var j=M&&M.require&&M.require("util").types;return j||G&&G.binding&&G.binding("util")}catch{}}(),T=O&&O.isTypedArray;function Z(j,Q,$){switch($.length){case 0:return j.call(Q);case 1:return j.call(Q,$[0]);case 2:return j.call(Q,$[0],$[1]);case 3:return j.call(Q,$[0],$[1],$[2])}return j.apply(Q,$)}function ne(j,Q){for(var $=-1,B=Array(j);++$<j;)B[$]=Q($);return B}function pe(j){return function(Q){return j(Q)}}function me(j,Q){return j==null?void 0:j[Q]}function Ee(j,Q){return function($){return j(Q($))}}var _e=Array.prototype,ie=Function.prototype,Ne=Object.prototype,pt=U["__core-js_shared__"],Te=ie.toString,Me=Ne.hasOwnProperty,yt=function(){var j=/[^.]+$/.exec(pt&&pt.keys&&pt.keys.IE_PROTO||"");return j?"Symbol(src)_1."+j:""}(),Se=Ne.toString,De=Te.call(Object),A=RegExp("^"+Te.call(Me).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=b?b.allocUnsafe:void 0,X=Ee(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,ot=_e.splice,Le=_?_.toStringTag:void 0,Xe=function(){try{var j=In(Object,"defineProperty");return j({},"",{}),j}catch{}}(),Qe=b?b.isBuffer:void 0,rn=Math.max,Xo=Date.now,pr=In(U,"Map"),Yt=In(Object,"create"),ro=function(){function j(){}return function(Q){if(!zr(Q))return{};if(se)return se(Q);j.prototype=Q;var $=new j;return j.prototype=void 0,$}}();function Dt(j){var Q=-1,$=j==null?0:j.length;for(this.clear();++Q<$;){var B=j[Q];this.set(B[0],B[1])}}function ia(){this.__data__=Yt?Yt(null):{},this.size=0}function Zo(j){var Q=this.has(j)&&delete this.__data__[j];return this.size-=Q?1:0,Q}function aa(j){var Q=this.__data__;if(Yt){var $=Q[j];return $===n?void 0:$}return Me.call(Q,j)?Q[j]:void 0}function Qo(j){var Q=this.__data__;return Yt?Q[j]!==void 0:Me.call(Q,j)}function ei(j,Q){var $=this.__data__;return this.size+=this.has(j)?0:1,$[j]=Yt&&Q===void 0?n:Q,this}Dt.prototype.clear=ia,Dt.prototype.delete=Zo,Dt.prototype.get=aa,Dt.prototype.has=Qo,Dt.prototype.set=ei;function At(j){var Q=-1,$=j==null?0:j.length;for(this.clear();++Q<$;){var B=j[Q];this.set(B[0],B[1])}}function sa(){this.__data__=[],this.size=0}function ti(j){var Q=this.__data__,$=kt(Q,j);if($<0)return!1;var B=Q.length-1;return $==B?Q.pop():ot.call(Q,$,1),--this.size,!0}function la(j){var Q=this.__data__,$=kt(Q,j);return $<0?void 0:Q[$][1]}function ca(j){return kt(this.__data__,j)>-1}function ua(j,Q){var $=this.__data__,B=kt($,j);return B<0?(++this.size,$.push([j,Q])):$[B][1]=Q,this}At.prototype.clear=sa,At.prototype.delete=ti,At.prototype.get=la,At.prototype.has=ca,At.prototype.set=ua;function Jt(j){var Q=-1,$=j==null?0:j.length;for(this.clear();++Q<$;){var B=j[Q];this.set(B[0],B[1])}}function V(){this.size=0,this.__data__={hash:new Dt,map:new(pr||At),string:new Dt}}function fe(j){var Q=oo(this,j).delete(j);return this.size-=Q?1:0,Q}function we(j){return oo(this,j).get(j)}function Ae(j){return oo(this,j).has(j)}function Ye(j,Q){var $=oo(this,j),B=$.size;return $.set(j,Q),this.size+=$.size==B?0:1,this}Jt.prototype.clear=V,Jt.prototype.delete=fe,Jt.prototype.get=we,Jt.prototype.has=Ae,Jt.prototype.set=Ye;function Fe(j){var Q=this.__data__=new At(j);this.size=Q.size}function Be(){this.__data__=new At,this.size=0}function je(j){var Q=this.__data__,$=Q.delete(j);return this.size=Q.size,$}function Pt(j){return this.__data__.get(j)}function bt(j){return this.__data__.has(j)}function wt(j,Q){var $=this.__data__;if($ instanceof At){var B=$.__data__;if(!pr||B.length<r-1)return B.push([j,Q]),this.size=++$.size,this;$=this.__data__=new Jt(B)}return $.set(j,Q),this.size=$.size,this}Fe.prototype.clear=Be,Fe.prototype.delete=je,Fe.prototype.get=Pt,Fe.prototype.has=bt,Fe.prototype.set=wt;function Wt(j,Q){var $=io(j),B=!$&&Pn(j),ee=!$&&!B&&yl(j),he=!$&&!B&&!ee&&wl(j),$e=$||B||ee||he,xe=$e?ne(j.length,String):[],Ie=xe.length;for(var ke in j)(Q||Me.call(j,ke))&&!($e&&(ke=="length"||ee&&(ke=="offset"||ke=="parent")||he&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||gl(ke,Ie)))&&xe.push(ke);return xe}function tr(j,Q,$){($!==void 0&&!oi(j[Q],$)||$===void 0&&!(Q in j))&&no(j,Q,$)}function ri(j,Q,$){var B=j[Q];(!(Me.call(j,Q)&&oi(B,$))||$===void 0&&!(Q in j))&&no(j,Q,$)}function kt(j,Q){for(var $=j.length;$--;)if(oi(j[$][0],Q))return $;return-1}function no(j,Q,$){Q=="__proto__"&&Xe?Xe(j,Q,{configurable:!0,enumerable:!0,value:$,writable:!0}):j[Q]=$}var id=md();function nn(j){return j==null?j===void 0?S:m:Le&&Le in Object(j)?da(j):_d(j)}function fa(j){return Xt(j)&&nn(j)==s}function ad(j){if(!zr(j)||wd(j))return!1;var Q=ii(j)?A:ce;return Q.test(Sd(j))}function sd(j){return Xt(j)&&ai(j.length)&&!!H[nn(j)]}function ld(j){if(!zr(j))return bl(j);var Q=ml(j),$=[];for(var B in j)B=="constructor"&&(Q||!Me.call(j,B))||$.push(B);return $}function ni(j,Q,$,B,ee){j!==Q&&id(Q,function(he,$e){if(ee||(ee=new Fe),zr(he))cd(j,Q,$e,$,ni,B,ee);else{var xe=B?B(pa(j,$e),he,$e+"",j,Q,ee):void 0;xe===void 0&&(xe=he),tr(j,$e,xe)}},El)}function cd(j,Q,$,B,ee,he,$e){var xe=pa(j,$),Ie=pa(Q,$),ke=$e.get(Ie);if(ke){tr(j,$,ke);return}var Re=he?he(xe,Ie,$+"",j,Q,$e):void 0,Lt=Re===void 0;if(Lt){var jt=io(Ie),on=!jt&&yl(Ie),si=!jt&&!on&&wl(Ie);Re=Ie,jt||on||si?io(xe)?Re=xe:ga(xe)?Re=hd(xe):on?(Lt=!1,Re=fd(Ie,!0)):si?(Lt=!1,Re=pd(Ie,!0)):Re=[]:so(Ie)||Pn(Ie)?(Re=xe,Pn(xe)?Re=_l(xe):(!zr(xe)||ii(xe))&&(Re=bd(Ie))):Lt=!1}Lt&&($e.set(Ie,Re),ee(Re,Ie,B,he,$e),$e.delete(Ie)),tr(j,$,Re)}function hl(j,Q){return ha(Ed(j,Q,Sl),j+"")}var ud=Xe?function(j,Q){return Xe(j,"toString",{configurable:!0,enumerable:!1,value:xl(Q),writable:!0})}:Sl;function fd(j,Q){if(Q)return j.slice();var $=j.length,B=W?W($):new j.constructor($);return j.copy(B),B}function dd(j){var Q=new j.constructor(j.byteLength);return new L(Q).set(new L(j)),Q}function pd(j,Q){var $=Q?dd(j.buffer):j.buffer;return new j.constructor($,j.byteOffset,j.length)}function hd(j,Q){var $=-1,B=j.length;for(Q||(Q=Array(B));++$<B;)Q[$]=j[$];return Q}function gd(j,Q,$,B){var ee=!$;$||($={});for(var he=-1,$e=Q.length;++he<$e;){var xe=Q[he],Ie=B?B($[xe],j[xe],xe,$,j):void 0;Ie===void 0&&(Ie=j[xe]),ee?no($,xe,Ie):ri($,xe,Ie)}return $}function vd(j){return hl(function(Q,$){var B=-1,ee=$.length,he=ee>1?$[ee-1]:void 0,$e=ee>2?$[2]:void 0;for(he=j.length>3&&typeof he=="function"?(ee--,he):void 0,$e&&vl($[0],$[1],$e)&&(he=ee<3?void 0:he,ee=1),Q=Object(Q);++B<ee;){var xe=$[B];xe&&j(Q,xe,B,he)}return Q})}function md(j){return function(Q,$,B){for(var ee=-1,he=Object(Q),$e=B(Q),xe=$e.length;xe--;){var Ie=$e[j?xe:++ee];if($(he[Ie],Ie,he)===!1)break}return Q}}function oo(j,Q){var $=j.__data__;return yd(Q)?$[typeof Q=="string"?"string":"hash"]:$.map}function In(j,Q){var $=me(j,Q);return ad($)?$:void 0}function da(j){var Q=Me.call(j,Le),$=j[Le];try{j[Le]=void 0;var B=!0}catch{}var ee=Se.call(j);return B&&(Q?j[Le]=$:delete j[Le]),ee}function bd(j){return typeof j.constructor=="function"&&!ml(j)?ro(X(j)):{}}function gl(j,Q){var $=typeof j;return Q=Q??a,!!Q&&($=="number"||$!="symbol"&&q.test(j))&&j>-1&&j%1==0&&j<Q}function vl(j,Q,$){if(!zr($))return!1;var B=typeof Q;return(B=="number"?ao($)&&gl(Q,$.length):B=="string"&&Q in $)?oi($[Q],j):!1}function yd(j){var Q=typeof j;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?j!=="__proto__":j===null}function wd(j){return!!yt&&yt in j}function ml(j){var Q=j&&j.constructor,$=typeof Q=="function"&&Q.prototype||Ne;return j===$}function bl(j){var Q=[];if(j!=null)for(var $ in Object(j))Q.push($);return Q}function _d(j){return Se.call(j)}function Ed(j,Q,$){return Q=rn(Q===void 0?j.length-1:Q,0),function(){for(var B=arguments,ee=-1,he=rn(B.length-Q,0),$e=Array(he);++ee<he;)$e[ee]=B[Q+ee];ee=-1;for(var xe=Array(Q+1);++ee<Q;)xe[ee]=B[ee];return xe[Q]=$($e),Z(j,this,xe)}}function pa(j,Q){if(!(Q==="constructor"&&typeof j[Q]=="function")&&Q!="__proto__")return j[Q]}var ha=xd(ud);function xd(j){var Q=0,$=0;return function(){var B=Xo(),ee=i-(B-$);if($=B,ee>0){if(++Q>=o)return arguments[0]}else Q=0;return j.apply(void 0,arguments)}}function Sd(j){if(j!=null){try{return Te.call(j)}catch{}try{return j+""}catch{}}return""}function oi(j,Q){return j===Q||j!==j&&Q!==Q}var Pn=fa(function(){return arguments}())?fa:function(j){return Xt(j)&&Me.call(j,"callee")&&!Pe.call(j,"callee")},io=Array.isArray;function ao(j){return j!=null&&ai(j.length)&&!ii(j)}function ga(j){return Xt(j)&&ao(j)}var yl=Qe||Cd;function ii(j){if(!zr(j))return!1;var Q=nn(j);return Q==h||Q==g||Q==u||Q==E}function ai(j){return typeof j=="number"&&j>-1&&j%1==0&&j<=a}function zr(j){var Q=typeof j;return j!=null&&(Q=="object"||Q=="function")}function Xt(j){return j!=null&&typeof j=="object"}function so(j){if(!Xt(j)||nn(j)!=w)return!1;var Q=X(j);if(Q===null)return!0;var $=Me.call(Q,"constructor")&&Q.constructor;return typeof $=="function"&&$ instanceof $&&Te.call($)==De}var wl=T?pe(T):sd;function _l(j){return gd(j,El(j))}function El(j){return ao(j)?Wt(j,!0):ld(j)}var $d=vd(function(j,Q,$){ni(j,Q,$)});function xl(j){return function(){return j}}function Sl(j){return j}function Cd(){return!1}e.exports=$d}(cs,cs.exports),cs.exports;var us={},fs={};Object.defineProperty(fs,"__esModule",{value:!0}),fs.default=void 0;function Yv(e,t){return{handler:e,config:t}}Yv.withOptions=function(e,t=()=>({})){const r=function(n){return{__options:n,handler:e(n),config:t(n)}};return r.__isOptionsFunction=!0,r.__pluginFunction=e,r.__configFunction=t,r};var LT=Yv;fs.default=LT,Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;var MT=FT(fs);function FT(e){return e&&e.__esModule?e:{default:e}}var jT=MT.default;us.default=jT;let Gc=us;var BT=(Gc.__esModule?Gc:{default:Gc}).default,RT=function({matchUtilities:e,theme:t}){e({bs:r=>({blockSize:r})},{values:t("height")})},ds={};Object.defineProperty(ds,"__esModule",{value:!0}),ds.default=void 0;const Jv=e=>Object.assign({},...Object.entries(e??{}).flatMap(([t,r])=>typeof r=="object"?Object.entries(Jv(r)).map(([n,o])=>({[t+(n==="DEFAULT"?"":`-${n}`)]:o})):[{[`${t}`]:r}]));var UT=Jv;ds.default=UT;var Kc={};Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.default=WT;function WT(e){return typeof e=="function"?e({}):e}var ps={},hs={},HT={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]};Object.defineProperty(hs,"__esModule",{value:!0}),hs.parseColor=YT,hs.formatColor=JT;var Xv=VT(HT);function VT(e){return e&&e.__esModule?e:{default:e}}let zT=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,GT=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,gs="(?:\\d+|\\d*\\.\\d+)%?",Zv="(?:\\s*,\\s*|\\s+)",KT="\\s*[,/]\\s*",qT=new RegExp(`^(rgb|hsl)a?\\(\\s*(${gs})${Zv}(${gs})${Zv}(${gs})(?:${KT}(${gs}))?\\s*\\)$`);function YT(e){if(typeof e!="string")return null;if(e=e.trim(),e==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(e in Xv.default)return{mode:"rgb",color:Xv.default[e].map(i=>i.toString())};let t=e.replace(GT,(i,a,s,l,u)=>["#",a,a,s,s,l,l,u?u+u:""].join("")).match(zT);if(t!==null)return{mode:"rgb",color:[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)].map(i=>i.toString()),alpha:t[4]?(parseInt(t[4],16)/255).toString():void 0};let r=e.match(qT);if(r!==null){var n,o;return{mode:r[1],color:[r[2],r[3],r[4]].map(i=>i.toString()),alpha:(n=r[5])===null||n===void 0||(o=n.toString)===null||o===void 0?void 0:o.call(n)}}return null}function JT({mode:e,color:t,alpha:r}){let n=r!==void 0;return`${e}(${t.join(" ")}${n?` / ${r}`:""})`}Object.defineProperty(ps,"__esModule",{value:!0}),ps.withAlphaValue=XT,ps.default=ZT;var vs=hs;function XT(e,t,r){if(typeof e=="function")return e({opacityValue:t});let n=vs.parseColor(e);return n===null?r:vs.formatColor({...n,alpha:t})}function ZT({color:e,property:t,variable:r}){let n=[].concat(t);if(typeof e=="function")return{[r]:"1",...Object.fromEntries(n.map(i=>[i,e({opacityVariable:r,opacityValue:`var(${r})`})]))};const o=vs.parseColor(e);return o===null?Object.fromEntries(n.map(i=>[i,e])):o.alpha!==void 0?Object.fromEntries(n.map(i=>[i,e])):{[r]:"1",...Object.fromEntries(n.map(i=>[i,vs.formatColor({...o,alpha:`var(${r})`})]))}}const Qv=ds.default,_n=Kc.default,$o=ps.default;var QT=function({corePlugins:e,matchUtilities:t,theme:r}){t({"border-lb":n=>e("borderOpacity")?$o({color:n,property:["border-block-start-color","border-block-end-color"],variable:"--tw-border-opacity"}):{"border-block-start-color":_n(n),"border-block-end-color":_n(n)},"border-li":n=>e("borderOpacity")?$o({color:n,property:["border-inline-start-color","border-inline-end-color"],variable:"--tw-border-opacity"}):{"border-inline-start-color":_n(n),"border-inline-end-color":_n(n)}},{values:(({DEFAULT:n,...o})=>o)(Qv(r("borderColor"))),type:"color"}),t({"border-bs":n=>e("borderOpacity")?$o({color:n,property:"border-block-start-color",variable:"--tw-border-opacity"}):{"border-block-start-color":_n(n)},"border-be":n=>e("borderOpacity")?$o({color:n,property:"border-block-end-color",variable:"--tw-border-opacity"}):{"border-block-end-color":_n(n)},"border-is":n=>e("borderOpacity")?$o({color:n,property:"border-inline-start-color",variable:"--tw-border-opacity"}):{"border-inline-start-color":_n(n)},"border-ie":n=>e("borderOpacity")?$o({color:n,property:"border-inline-end-color",variable:"--tw-border-opacity"}):{"border-inline-end-color":_n(n)}},{values:(({DEFAULT:n,...o})=>o)(Qv(r("borderColor"))),type:"color"})},e5=function({matchUtilities:e,theme:t}){e({"rounded-bs":r=>({borderStartStartRadius:r,borderStartEndRadius:r}),"rounded-be":r=>({borderEndStartRadius:r,borderEndEndRadius:r}),"rounded-is":r=>({borderStartStartRadius:r,borderEndStartRadius:r}),"rounded-ie":r=>({borderStartEndRadius:r,borderEndEndRadius:r})},{values:t("borderRadius")}),e({"rounded-ss":r=>({borderStartStartRadius:r}),"rounded-se":r=>({borderStartEndRadius:r}),"rounded-es":r=>({borderEndStartRadius:r}),"rounded-ee":r=>({borderEndEndRadius:r})},{values:t("borderRadius")})},t5=function({matchUtilities:e,theme:t}){e({"border-lb":r=>({borderBlockStartWidth:r,borderBlockEndWidth:r}),"border-li":r=>({borderInlineStartWidth:r,borderInlineEndWidth:r})},{values:t("borderWidth")}),e({"border-bs":r=>({borderBlockStartWidth:r}),"border-be":r=>({borderBlockEndWidth:r}),"border-is":r=>({borderInlineStartWidth:r}),"border-ie":r=>({borderInlineEndWidth:r})},{values:t("borderWidth")})},r5=function({addUtilities:e}){e({".clear-start":{clear:"inline-start"},".clear-end":{clear:"inline-end"}})},n5=function({addUtilities:e,matchUtilities:t,theme:r}){t({"divide-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"0","border-block-start-width":`calc(${n} * calc(1 - var(--tw-divide-b-reverse)))`,"border-block-end-width":`calc(${n} * var(--tw-divide-b-reverse))`}}),"divide-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"0","border-inline-start-width":`calc(${n} * calc(1 - var(--tw-divide-i-reverse)))`,"border-inline-end-width":`calc(${n} * var(--tw-divide-i-reverse))`}})},{values:r("divideWidth")}),e({".divide-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"1"},".divide-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"1"}})},o5=function({addUtilities:e}){e({".float-start":{float:"inline-start"},".float-end":{float:"inline-end"}})},i5=function({matchUtilities:e,theme:t}){e({is:r=>({inlineSize:r})},{values:t("width")})},a5=function({matchUtilities:e,theme:t}){e({"inset-block":r=>({insetBlock:r}),"inset-inline":r=>({insetInline:r})},{supportsNegativeValues:!0,values:t("inset")}),e({"block-start":r=>({insetBlockStart:r}),"block-end":r=>({insetBlockEnd:r}),"inline-start":r=>({insetInlineStart:r}),"inline-end":r=>({insetInlineEnd:r})},{supportsNegativeValues:!0,values:t("inset")})},s5=function({matchUtilities:e,theme:t}){e({mlb:r=>({marginBlock:r}),mli:r=>({marginInline:r})},{supportsNegativeValues:!0,values:t("margin")}),e({mbs:r=>({marginBlockStart:r}),mbe:r=>({marginBlockEnd:r}),mis:r=>({marginInlineStart:r}),mie:r=>({marginInlineEnd:r})},{supportsNegativeValues:!0,values:t("margin")})},l5=function({matchUtilities:e,theme:t}){e({"max-bs":r=>({maxBlockSize:r})},{values:t("maxHeight")})},c5=function({matchUtilities:e,theme:t}){e({"max-is":r=>({maxInlineSize:r})},{values:t("maxWidth")})},u5=function({matchUtilities:e,theme:t}){e({"min-bs":r=>({minBlockSize:r})},{values:t("minHeight")})},f5=function({matchUtilities:e,theme:t}){e({"min-is":r=>({minInlineSize:r})},{values:t("minWidth")})},d5=function({addUtilities:e}){e({".overscroll-b-auto":{overscrollBehaviorBlock:"auto"},".overscroll-b-contain":{overscrollBehaviorBlock:"contain"},".overscroll-b-none":{overscrollBehaviorBlock:"none"},".overscroll-i-auto":{overscrollBehaviorInline:"auto"},".overscroll-i-contain":{overscrollBehaviorInline:"contain"},".overscroll-i-none":{overscrollBehaviorInline:"none"}})},p5=function({matchUtilities:e,theme:t}){e({plb:r=>({paddingBlock:r}),pli:r=>({paddingInline:r})},{values:t("padding")}),e({pbs:r=>({paddingBlockStart:r}),pbe:r=>({paddingBlockEnd:r}),pis:r=>({paddingInlineStart:r}),pie:r=>({paddingInlineEnd:r})},{values:t("padding")})},h5=function({addUtilities:e}){e({".resize-block":{resize:"block"},".resize-inline":{resize:"inline"}})},g5=function({addUtilities:e,matchUtilities:t,theme:r}){t({"space-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"0","margin-block-start":`calc(${n} * calc(1 - var(--tw-space-b-reverse)))`,"margin-block-end":`calc(${n} * var(--tw-space-b-reverse))`}}),"space-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"0","margin-inline-start":`calc(${n} * calc(1 - var(--tw-space-i-reverse)))`,"margin-inline-end":`calc(${n} * var(--tw-space-i-reverse))`}})},{supportsNegativeValues:!0,values:r("space")}),e({".space-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"1"},".space-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"1"}})},v5=function({addUtilities:e}){e({".text-start":{textAlign:"start"},".text-end":{textAlign:"end"}})};const m5=BT,b5=RT,y5=QT,w5=e5,_5=t5,E5=r5,x5=n5,S5=o5,$5=i5,C5=a5,A5=s5,O5=l5,T5=c5,I5=u5,P5=f5,k5=d5,N5=p5,D5=h5,L5=g5,M5=v5;m5(function(e){S5(e),E5(e),M5(e),D5(e),k5(e),b5(e),I5(e),O5(e),$5(e),P5(e),T5(e),A5(e),N5(e),L5(e),C5(e),x5(e),_5(e),y5(e),w5(e)});var F5=Je&&Je.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const j5=F5(Wc),B5=["disabled","highlighted","placeholder"],em={align:["center","end","start"],state:["active","checked","closed","delayed-open","hidden","inactive","indeterminate","instant-open","off","on","open","unchecked","visible"],side:["bottom","left","right","top"],orientation:["horizontal","vertical"],motion:["from-end","from-start","to-end","to-start"],swipe:["cancel","end","move","start"],"swipe-direction":["down","left","right","up"]};j5.default.withOptions(e=>({addUtilities:t,addVariant:r,e:n})=>{e=e||{variantPrefix:"radix"};const o=e.variantPrefix===""||typeof e.variantPrefix=="boolean"&&e.variantPrefix===!1?"":`${e.variantPrefix}-`;["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.origin-${o}${u}`]:{"transform-origin":`var(--radix-${u}-content-transform-origin)`}})}),B5.forEach(u=>{let f=`${o}${u}`,d=`data-${u}`;r(`${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.${n(`${f}${h}${g}`)}[${d}]`)}),r(`group-${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.group[${d}] .${n(`group-${f}${h}${g}`)}`)}),r(`peer-${f}`,({modifySelectors:p,separator:h})=>{p(({className:g})=>`.peer[${d}] ~ .${n(`peer-${f}${h}${g}`)}`)})}),Object.keys(em).forEach(u=>{em[u].forEach(f=>{let d=`${o}${u}-${f}`,p=`data-${u}="${f}"`;r(`${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.${n(`${d}${g}${v}`)}[${p}]`)}),r(`group-${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.group[${p}] .${n(`group-${d}${g}${v}`)}`)}),r(`peer-${d}`,({modifySelectors:h,separator:g})=>{h(({className:v})=>`.peer[${p}] ~ .${n(`peer-${d}${g}${v}`)}`)})})}),["accordion-content","collapsible-content","navigation-menu-viewport"].forEach(u=>{t({[`.w-${o}${u}`]:{width:`var(--radix-${u}-width)`}}),t({[`.h-${o}${u}`]:{height:`var(--radix-${u}-height)`}})}),["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.w-${o}${u}-content-available-width`]:{width:`var(--radix-${u}-content-available-width)`}}),t({[`.max-w-${o}${u}-content-available-width`]:{maxWidth:`var(--radix-${u}-content-available-width)`}}),t({[`.h-${o}${u}-content-available-height`]:{height:`var(--radix-${u}-content-available-height)`}}),t({[`.max-h-${o}${u}-content-available-height`]:{maxHeight:`var(--radix-${u}-content-available-height)`}}),t({[`.w-${o}${u}-trigger-width`]:{width:`var(--radix-${u}-trigger-width)`}}),t({[`.h-${o}${u}-trigger-height`]:{height:`var(--radix-${u}-trigger-height)`}})}),["toast-swipe-end","toast-swipe-move"].forEach(u=>{t({[`.translate-x-${o}${u}-x`]:{transform:`translateX(var(--radix-${u}-x))`}}),t({[`.translate-y-${o}${u}-y`]:{transform:`translateY(var(--radix-${u}-y))`}})})});function tm(e){return!Array.isArray(e[0])}function ms(e,t){const r=e.length,n=tm(e)?[e]:e,o=tm(t)?t.map(l=>[l]):t,i=o[0].length,a=o[0].map((l,u)=>o.map(f=>f[u]));let s=n.map(l=>a.map(u=>Array.isArray(l)?l.reduce((f,d,p)=>f+d*(u[p]||0),0):u.reduce((f,d)=>f+d*l,0)));return r===1&&(s=s[0]),i===1?s.map(l=>l[0]):s}function R5(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n<.04045?t/12.92:r*Math.pow((n+.055)/1.055,2.4)})}function rm(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n>.0031308?r*(1.055*Math.pow(n,1/2.4)-.055):12.92*t})}function U5(e){return ms([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],e)}function nm(e){return ms([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],e)}function W5(e){return ms([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],e)}function om(e){return ms([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],e)}function H5(e){const t=.008856451679035631,r=24389/27,n=[.96422,1,.82521],i=e.map((a,s)=>a/n[s]).map(a=>a>t?Math.cbrt(a):(r*a+16)/116);return[116*i[1]-16,500*(i[0]-i[1]),200*(i[1]-i[2])]}function im(e){const t=903.2962962962963,r=216/24389,n=[.96422,1,.82521],o=[];return o[1]=(e[0]+16)/116,o[0]=e[1]/500+o[1],o[2]=o[1]-e[2]/200,[Math.pow(o[0],3)>r?Math.pow(o[0],3):(116*o[0]-16)/t,e[0]>t*r?Math.pow((e[0]+16)/116,3):e[0]/t,Math.pow(o[2],3)>r?Math.pow(o[2],3):(116*o[2]-16)/t].map((a,s)=>a*n[s])}function qc(e){const t=Math.atan2(e[2],e[1])*180/Math.PI;return[e[0],Math.sqrt(Math.pow(e[1],2)+Math.pow(e[2],2)),t>=0?t:t+360]}function bs(e){return[e[0],e[1]*Math.cos(e[2]*Math.PI/180),e[1]*Math.sin(e[2]*Math.PI/180)]}function V5(e){return qc(H5(W5(U5(R5(e)))))}function z5(e){return rm(nm(om(im(bs(e)))))}function G5(e){return rm(nm(om(im(e))))}function am(e,t,r){return z5([+e,+t,+r]).reduce((i,a)=>i&&a>=0-5e-6&&a<=1+5e-6,!0)}function K5(e){const r=qc(e),n=r[0];let o=r[1];const i=r[2];if(am(n,o,i))return e;let a=o,s=0;for(o/=2;a-s>1e-4;)am(n,o,i)?s=o:a=o,o=(a+s)/2;return bs([n,o,i])}const q5=128;function Y5(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function J5(e,t){const r=1-e;return r*r*t}function X5(e,t){return 2*(1-e)*e*t}function Z5(e,t){return e*e*t}function Yc(e,t,r,n){return J5(e,t)+X5(e,r)+Z5(e,n)}function Q5(e,t){const[r,n,o]=e.points;return[Yc(t,r[0],n[0],o[0]),Yc(t,r[1],n[1],o[1]),Yc(t,r[2],n[2],o[2])]}function eI(e,t){const r=[];for(let n=0;n<=t;n++)r.push(Q5(e,n/t));return r}function tI(e,t=q5){const r=[];let n;for(let o=0,i=e.curves;o<i.length;o++){const a=i[o],s=eI(a,t);for(const l of s)n&&Y5(n,l)||(r.push(l),n=l)}return r}const sm=.75;function rI(e,t,r){const n=[],o=(t-e)/r;for(let i=0;i<r;i++)n[i]=e+o*i;return n}const nI=(e,t,r)=>{const n=e<=0?0:Math.log(e),o=Math.log(t),i=(o-n)/r,a=[Math.pow(Math.E,n)];for(let s=1;s<r;s+=1)a.push(Math.pow(Math.E,n+i*s));return a.push(Math.pow(Math.E,o)),a};function oI(e,t,r=[0,100],n=sm){if(e.length<=2)return[];const o=[],i=nI(Math.log10(r[0]),Math.log10(r[1]),t),a=rI(r[0],r[1],t);let s=0;for(let l=0;l<t;l++){const u=Math.min(r[1],Math.max(r[0],i[l]*(1-n)+a[l]*n));for(;u>e[s+1][0];)s++;const[f,d,p]=e[s],[h,g,v]=e[s+1],y=(u-f)/(h-f);o[l]=[f+(h-f)*y,d+(g-d)*y,p+(v-p)*y]}return o.map(K5)}function iI(e,t=16,r=[0,100],n=sm,o=24){return oI(tI(e,Math.ceil(o*(1+Math.abs(e.torsion||1))/2)).map(i=>cI(i,e.torsion,e.torsionT0)),t,r,n)}function aI(e){return`#${e.map(t=>(t<0?0:Math.floor(t>=1?255:t*256)).toString(16).padStart(2,"0")).join("")}`}function lm(e){return aI(G5(e))}function sI(e){const t=e.match(/#?(..)(..)(..)/);return t?[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]:[0,0,0]}function lI(e){return V5(sI(e))}function cI(e,t=0,r=50){const n=e[0],[o,i,a]=qc(e),s=t*(n-r);return bs([o,i,a+s])}function uI({keyColor:e,darkCp:t,lightCp:r,hueTorsion:n}){const o=[0,0,0],i=[100,0,0],a=bs(e),[s,l,u]=a,f=[s*(1-t),l,u],d=[s+(100-s)*r,l,u];return{curves:[{points:[o,f,a]},{points:[a,d,i]}],torsion:n,torsionT0:s}}function fI(){for(var e=0,t,r,n="";e<arguments.length;)(t=arguments[e++])&&(r=cm(t))&&(n&&(n+=" "),n+=r);return n}function cm(e){if(typeof e=="string")return e;for(var t,r="",n=0;n<e.length;n++)e[n]&&(t=cm(e[n]))&&(r&&(r+=" "),r+=t);return r}var Jc="-";function dI(e){var t=hI(e),r=e.conflictingClassGroups,n=e.conflictingClassGroupModifiers,o=n===void 0?{}:n;function i(s){var l=s.split(Jc);return l[0]===""&&l.length!==1&&l.shift(),um(l,t)||pI(s)}function a(s,l){var u=r[s]||[];return l&&o[s]?[].concat(u,o[s]):u}return{getClassGroupId:i,getConflictingClassGroupIds:a}}function um(e,t){var a;if(e.length===0)return t.classGroupId;var r=e[0],n=t.nextPart.get(r),o=n?um(e.slice(1),n):void 0;if(o)return o;if(t.validators.length!==0){var i=e.join(Jc);return(a=t.validators.find(function(s){var l=s.validator;return l(i)}))==null?void 0:a.classGroupId}}var fm=/^\[(.+)\]$/;function pI(e){if(fm.test(e)){var t=fm.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function hI(e){var t=e.theme,r=e.prefix,n={nextPart:new Map,validators:[]},o=vI(Object.entries(e.classGroups),r);return o.forEach(function(i){var a=i[0],s=i[1];Xc(s,n,a,t)}),n}function Xc(e,t,r,n){e.forEach(function(o){if(typeof o=="string"){var i=o===""?t:dm(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(gI(o)){Xc(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(function(a){var s=a[0],l=a[1];Xc(l,dm(t,s),r,n)})})}function dm(e,t){var r=e;return t.split(Jc).forEach(function(n){r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function gI(e){return e.isThemeGetter}function vI(e,t){return t?e.map(function(r){var n=r[0],o=r[1],i=o.map(function(a){return typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(function(s){var l=s[0],u=s[1];return[t+l,u]})):a});return[n,i]}):e}function mI(e){if(e<1)return{get:function(){},set:function(){}};var t=0,r=new Map,n=new Map;function o(i,a){r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)}return{get:function(a){var s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set:function(a,s){r.has(a)?r.set(a,s):o(a,s)}}}var pm="!";function bI(e){var t=e.separator||":",r=t.length===1,n=t[0],o=t.length;return function(a){for(var s=[],l=0,u=0,f,d=0;d<a.length;d++){var p=a[d];if(l===0){if(p===n&&(r||a.slice(d,d+o)===t)){s.push(a.slice(u,d)),u=d+o;continue}if(p==="/"){f=d;continue}}p==="["?l++:p==="]"&&l--}var h=s.length===0?a:a.substring(u),g=h.startsWith(pm),v=g?h.substring(1):h,y=f&&f>u?f-u:void 0;return{modifiers:s,hasImportantModifier:g,baseClassName:v,maybePostfixModifierPosition:y}}}function yI(e){if(e.length<=1)return e;var t=[],r=[];return e.forEach(function(n){var o=n[0]==="[";o?(t.push.apply(t,r.sort().concat([n])),r=[]):r.push(n)}),t.push.apply(t,r.sort()),t}function wI(e){return{cache:mI(e.cacheSize),splitModifiers:bI(e),...dI(e)}}var _I=/\s+/;function EI(e,t){var r=t.splitModifiers,n=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(_I).map(function(a){var s=r(a),l=s.modifiers,u=s.hasImportantModifier,f=s.baseClassName,d=s.maybePostfixModifierPosition,p=n(d?f.substring(0,d):f),h=!!d;if(!p){if(!d)return{isTailwindClass:!1,originalClassName:a};if(p=n(f),!p)return{isTailwindClass:!1,originalClassName:a};h=!1}var g=yI(l).join(":"),v=u?g+pm:g;return{isTailwindClass:!0,modifierId:v,classGroupId:p,originalClassName:a,hasPostfixModifier:h}}).reverse().filter(function(a){if(!a.isTailwindClass)return!0;var s=a.modifierId,l=a.classGroupId,u=a.hasPostfixModifier,f=s+l;return i.has(f)?!1:(i.add(f),o(l,u).forEach(function(d){return i.add(s+d)}),!0)}).reverse().map(function(a){return a.originalClassName}).join(" ")}function hm(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i,a=s;function s(u){var f=t[0],d=t.slice(1),p=d.reduce(function(h,g){return g(h)},f());return n=wI(p),o=n.cache.get,i=n.cache.set,a=l,l(u)}function l(u){var f=o(u);if(f)return f;var d=EI(u,n);return i(u,d),d}return function(){return a(fI.apply(null,arguments))}}function vt(e){var t=function(n){return n[e]||[]};return t.isThemeGetter=!0,t}var gm=/^\[(?:([a-z-]+):)?(.+)\]$/i,xI=/^\d+\/\d+$/,SI=new Set(["px","full","screen"]),$I=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,CI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,AI=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function Qt(e){return Hn(e)||SI.has(e)||xI.test(e)||ys(e)}function ys(e){return Vn(e,"length",NI)}function OI(e){return Vn(e,"size",vm)}function TI(e){return Vn(e,"position",vm)}function II(e){return Vn(e,"url",DI)}function Ii(e){return Vn(e,"number",Hn)}function Hn(e){return!Number.isNaN(Number(e))}function PI(e){return e.endsWith("%")&&Hn(e.slice(0,-1))}function Pi(e){return mm(e)||Vn(e,"number",mm)}function He(e){return gm.test(e)}function Co(){return!0}function En(e){return $I.test(e)}function kI(e){return Vn(e,"",LI)}function Vn(e,t,r){var n=gm.exec(e);return n?n[1]?n[1]===t:r(n[2]):!1}function NI(e){return CI.test(e)}function vm(){return!1}function DI(e){return e.startsWith("url(")}function mm(e){return Number.isInteger(Number(e))}function LI(e){return AI.test(e)}function bm(){var e=vt("colors"),t=vt("spacing"),r=vt("blur"),n=vt("brightness"),o=vt("borderColor"),i=vt("borderRadius"),a=vt("borderSpacing"),s=vt("borderWidth"),l=vt("contrast"),u=vt("grayscale"),f=vt("hueRotate"),d=vt("invert"),p=vt("gap"),h=vt("gradientColorStops"),g=vt("gradientColorStopPositions"),v=vt("inset"),y=vt("margin"),m=vt("opacity"),w=vt("padding"),E=vt("saturate"),x=vt("scale"),k=vt("sepia"),I=vt("skew"),S=vt("space"),C=vt("translate"),P=function(){return["auto","contain","none"]},F=function(){return["auto","hidden","clip","visible","scroll"]},D=function(){return["auto",He,t]},N=function(){return[He,t]},J=function(){return["",Qt]},K=function(){return["auto",Hn,He]},Y=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},te=function(){return["solid","dashed","dotted","double","none"]},oe=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},le=function(){return["start","end","center","between","around","evenly","stretch"]},ae=function(){return["","0",He]},ge=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},ce=function(){return[Hn,Ii]},q=function(){return[Hn,He]};return{cacheSize:500,theme:{colors:[Co],spacing:[Qt],blur:["none","",En,He],brightness:ce(),borderColor:[e],borderRadius:["none","","full",En,He],borderSpacing:N(),borderWidth:J(),contrast:ce(),grayscale:ae(),hueRotate:q(),invert:ae(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[PI,ys],inset:D(),margin:D(),opacity:ce(),padding:N(),saturate:ce(),scale:ce(),sepia:ae(),skew:q(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",He]}],container:["container"],columns:[{columns:[En]}],"break-after":[{"break-after":ge()}],"break-before":[{"break-before":ge()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(Y(),[He])}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Pi]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",He]}],grow:[{grow:ae()}],shrink:[{shrink:ae()}],order:[{order:["first","last","none",Pi]}],"grid-cols":[{"grid-cols":[Co]}],"col-start-end":[{col:["auto",{span:["full",Pi]},He]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[Co]}],"row-start-end":[{row:["auto",{span:[Pi]},He]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",He]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",He]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(le())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(le(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(le(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",He,t]}],"min-w":[{"min-w":["min","max","fit",He,Qt]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[En]},En,He]}],h:[{h:[He,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",He,Qt]}],"max-h":[{"max-h":[He,t,"min","max","fit"]}],"font-size":[{text:["base",En,ys]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ii]}],"font-family":[{font:[Co]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",He]}],"line-clamp":[{"line-clamp":["none",Hn,Ii]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",He,Qt]}],"list-image":[{"list-image":["none",He]}],"list-style-type":[{list:["none","disc","decimal",He]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(te(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",Qt]}],"underline-offset":[{"underline-offset":["auto",He,Qt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",He]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",He]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(Y(),[TI])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",OI]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},II]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[].concat(te(),["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:te()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(te())}],"outline-offset":[{"outline-offset":[He,Qt]}],"outline-w":[{outline:[Qt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Qt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",En,kI]}],"shadow-color":[{shadow:[Co]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":oe()}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",En,He]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[E]}],sepia:[{sepia:[k]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[k]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",He]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",He]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",He]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Pi,He]}],"translate-x":[{"translate-x":[C]}],"translate-y":[{"translate-y":[C]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",He]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",He]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",He]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Qt,Ii]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function ym(e,t){for(var r in t)wm(e,r,t[r]);return e}var MI=Object.prototype.hasOwnProperty,FI=new Set(["string","number","boolean"]);function wm(e,t,r){if(!MI.call(e,t)||FI.has(typeof r)||r===null){e[t]=r;return}if(Array.isArray(r)&&Array.isArray(e[t])){e[t]=e[t].concat(r);return}if(typeof r=="object"&&typeof e[t]=="object"){if(e[t]===null){e[t]=r;return}for(var n in r)wm(e[t],n,r[n])}}function jI(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return typeof e=="function"?hm.apply(void 0,[bm,e].concat(r)):hm.apply(void 0,[function(){return ym(bm(),e)}].concat(r))}var BI="Expected a function",_m="__lodash_hash_undefined__",Em=1/0,RI="[object Function]",UI="[object GeneratorFunction]",WI="[object Symbol]",HI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,VI=/^\w*$/,zI=/^\./,GI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,KI=/[\\^$.*+?()[\]{}|]/g,qI=/\\(\\)?/g,YI=/^\[object .+?Constructor\]$/,JI=typeof Je=="object"&&Je&&Je.Object===Object&&Je,XI=typeof self=="object"&&self&&self.Object===Object&&self,Zc=JI||XI||Function("return this")();function ZI(e,t){return e==null?void 0:e[t]}function QI(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var e6=Array.prototype,t6=Function.prototype,xm=Object.prototype,Qc=Zc["__core-js_shared__"],Sm=function(){var e=/[^.]+$/.exec(Qc&&Qc.keys&&Qc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),$m=t6.toString,eu=xm.hasOwnProperty,Cm=xm.toString,r6=RegExp("^"+$m.call(eu).replace(KI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Am=Zc.Symbol,n6=e6.splice,o6=Im(Zc,"Map"),ki=Im(Object,"create"),Om=Am?Am.prototype:void 0,Tm=Om?Om.toString:void 0;function zn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function i6(){this.__data__=ki?ki(null):{}}function a6(e){return this.has(e)&&delete this.__data__[e]}function s6(e){var t=this.__data__;if(ki){var r=t[e];return r===_m?void 0:r}return eu.call(t,e)?t[e]:void 0}function l6(e){var t=this.__data__;return ki?t[e]!==void 0:eu.call(t,e)}function c6(e,t){var r=this.__data__;return r[e]=ki&&t===void 0?_m:t,this}zn.prototype.clear=i6,zn.prototype.delete=a6,zn.prototype.get=s6,zn.prototype.has=l6,zn.prototype.set=c6;function Ao(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function u6(){this.__data__=[]}function f6(e){var t=this.__data__,r=ws(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():n6.call(t,r,1),!0}function d6(e){var t=this.__data__,r=ws(t,e);return r<0?void 0:t[r][1]}function p6(e){return ws(this.__data__,e)>-1}function h6(e,t){var r=this.__data__,n=ws(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Ao.prototype.clear=u6,Ao.prototype.delete=f6,Ao.prototype.get=d6,Ao.prototype.has=p6,Ao.prototype.set=h6;function Gn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function g6(){this.__data__={hash:new zn,map:new(o6||Ao),string:new zn}}function v6(e){return _s(this,e).delete(e)}function m6(e){return _s(this,e).get(e)}function b6(e){return _s(this,e).has(e)}function y6(e,t){return _s(this,e).set(e,t),this}Gn.prototype.clear=g6,Gn.prototype.delete=v6,Gn.prototype.get=m6,Gn.prototype.has=b6,Gn.prototype.set=y6;function ws(e,t){for(var r=e.length;r--;)if(I6(e[r][0],t))return r;return-1}function w6(e,t){t=S6(t,e)?[t]:x6(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[O6(t[r++])];return r&&r==n?e:void 0}function _6(e){if(!km(e)||C6(e))return!1;var t=P6(e)||QI(e)?r6:YI;return t.test(T6(e))}function E6(e){if(typeof e=="string")return e;if(ru(e))return Tm?Tm.call(e):"";var t=e+"";return t=="0"&&1/e==-Em?"-0":t}function x6(e){return Pm(e)?e:A6(e)}function _s(e,t){var r=e.__data__;return $6(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Im(e,t){var r=ZI(e,t);return _6(r)?r:void 0}function S6(e,t){if(Pm(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||ru(e)?!0:VI.test(e)||!HI.test(e)||t!=null&&e in Object(t)}function $6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function C6(e){return!!Sm&&Sm in e}var A6=tu(function(e){e=N6(e);var t=[];return zI.test(e)&&t.push(""),e.replace(GI,function(r,n,o,i){t.push(o?i.replace(qI,"$1"):n||r)}),t});function O6(e){if(typeof e=="string"||ru(e))return e;var t=e+"";return t=="0"&&1/e==-Em?"-0":t}function T6(e){if(e!=null){try{return $m.call(e)}catch{}try{return e+""}catch{}}return""}function tu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(BI);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(tu.Cache||Gn),r}tu.Cache=Gn;function I6(e,t){return e===t||e!==e&&t!==t}var Pm=Array.isArray;function P6(e){var t=km(e)?Cm.call(e):"";return t==RI||t==UI}function km(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function k6(e){return!!e&&typeof e=="object"}function ru(e){return typeof e=="symbol"||k6(e)&&Cm.call(e)==WI}function N6(e){return e==null?"":E6(e)}function D6(e,t,r){var n=e==null?void 0:w6(e,t);return n===void 0?r:n}var L6=D6;const M6=ln(L6);var F6=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950],j6=[12,25,37,50,75,100,125,150,200,250,300,350,400,450,500,550,600,650,700,750,800,825,850,875,900,925,950,975],cr=Math.PI/180,Nm={red:{keyColor:"#ee003b",darkCp:1,lightCp:.13,hueTorsion:5.5*cr},orange:{keyColor:"#fa6b32",darkCp:.725,lightCp:1,hueTorsion:13*cr},amber:{keyColor:"#f08c00",darkCp:1,lightCp:1,hueTorsion:24*cr},yellow:{keyColor:"#ffd900",darkCp:1,lightCp:1,hueTorsion:32*cr},lime:{keyColor:"#99c400",darkCp:1,lightCp:1,hueTorsion:-3.5*cr},green:{keyColor:"#30a908",darkCp:.35,lightCp:.665,hueTorsion:-10.5*cr},emerald:{keyColor:"#15e066",darkCp:1,lightCp:.735,hueTorsion:-7*cr},teal:{keyColor:"#00a270",darkCp:1,lightCp:.755,hueTorsion:-12*cr},cyan:{keyColor:"#048992",darkCp:1,lightCp:.855,hueTorsion:-15*cr},sky:{keyColor:"#007bc2",darkCp:1,lightCp:.64,hueTorsion:0},blue:{keyColor:"#0058cb",darkCp:1,lightCp:.495,hueTorsion:-7*cr},indigo:{keyColor:"#1b45c5",darkCp:.495,lightCp:.55,hueTorsion:0},violet:{keyColor:"#080886",darkCp:.195,lightCp:.635,hueTorsion:-5*cr},purple:{keyColor:"#2c0073",darkCp:0,lightCp:.63,hueTorsion:0},fuchsia:{keyColor:"#6d0085",darkCp:1,lightCp:.695,hueTorsion:0},pink:{keyColor:"#a5006d",darkCp:1,lightCp:.775,hueTorsion:0},rose:{keyColor:"#d00054",darkCp:1,lightCp:1,hueTorsion:0},neutral:{keyColor:"#707076",darkCp:.8,lightCp:.88,hueTorsion:0},primary:{keyColor:"#1662d9",darkCp:.86,lightCp:1,hueTorsion:-30*cr}},at=Object.keys(Nm).reduce((e,t)=>{const r=t==="neutral"||t==="primary",n=Nm[t],o=uI({...n,keyColor:lI(n.keyColor)}),i=iI(o,21,[0,100*(22/21)],1,24).reverse(),a=s=>{if(s>999)return"#000000";if(s<1)return"#ffffff";if(s%50===0)return lm(i[s/50]);{const l=s%50/50,u=1-l,[f,d,p]=i[Math.floor(s/50)],[h,g,v]=i[Math.ceil(s/50)];return lm([f*u+h*l,d*u+g*l,p*u+v*l])}};return e[t]=(r?j6:F6).reduce((s,l)=>(s[l]=a(l),s),{}),e},{}),B6={scrim:{light:`${at.neutral[75]}A6`,dark:`${at.neutral[900]}A6`},attention:{light:"#ffffff",dark:at.neutral[900]},base:{light:at.neutral[25],dark:at.neutral[850],fg:{light:"#ffffff",dark:"#000000"}},description:{light:at.neutral[300],dark:at.neutral[500]},baseGlass:{light:`${at.neutral[25]}E6`,dark:`${at.neutral[850]}E6`},input:{light:at.neutral[50],dark:at.neutral[825]},modal:{light:"#ffffff",dark:`${at.neutral[750]}`},modalSelected:{light:at.neutral[50],dark:at.neutral[825]},hover:{light:at.neutral[37],dark:at.neutral[800]},accent:{light:at.primary[550],dark:at.primary[550],fg:{light:at.primary[550],dark:at.primary[400]}},accentHover:{light:at.primary[600],dark:at.primary[500]},unAccent:{light:at.neutral[500],dark:at.neutral[400]},unAccentHover:{light:at.neutral[400],dark:at.neutral[500]},separator:{light:at.neutral[75],dark:at.neutral[750]},inverse:{light:"#ffffff",dark:"#ffffff"},unavailable:{light:at.neutral[100],dark:at.neutral[600]}};AT(({addUtilities:e,theme:t,e:r})=>{const n=t("semanticColors"),o=Object.entries(n).map(([i,a])=>{var s,l,u,f;return{[`.fg-${r(`${i}`)}`]:{color:`${((s=a.fg)==null?void 0:s.light)??a.light}`},[`.dark .fg-${r(`${i}`)}`]:{color:`${((l=a.fg)==null?void 0:l.dark)??a.dark}`},[`.surface-${r(`${i}`)}`]:{backgroundColor:`${a.light}`},[`.dark .surface-${r(`${i}`)}`]:{backgroundColor:`${a.dark}`},[`.separator-${r(`${i}`)}`]:{borderColor:`${((u=a.fg)==null?void 0:u.light)??a.light}`},[`.dark .separator-${r(`${i}`)}`]:{borderColor:`${((f=a.fg)==null?void 0:f.dark)??a.dark}`}}});e(o)});var nu="fill-[--surface-bg] dark:fill-[--surface-bg]",R6="fill-[--surface-bg] dark:fill-[--surface-bg]",Es="min-bs-[2.5rem]",U6="pli-3",W6="pli-4",H6=`${Es} ${U6}`,V6=`${Es} ${W6}`,xs="min-bs-[2.5rem] pointer-fine:min-bs-[2rem]",z6="pli-2",G6="pli-2.5",K6=`${xs} ${z6}`,q6=`${xs} ${G6}`,Dm=(e="coarse")=>e==="fine"?xs:Es,Ss="opacity-40 cursor-not-allowed shadow-none",Y6="data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed",ou=({elevation:e})=>[e==="group"?"shadow-sm":e==="chrome"?"shadow-none":"shadow"],Oo=({elevation:e})=>[e==="group"?"shadow":e==="chrome"?"shadow-lg":"shadow-none"],Rr="focus:outline-none focus-visible:z-[1] focus-visible:hover:outline-none dark:focus-visible:hover:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-primary-350 focus-visible:ring-offset-white dark:focus-visible:ring-primary-450 dark:focus-visible:ring-offset-black",Lm="focus:outline-none focus-visible:outline-none focus:ring-0 ring-0 focus:border-0 border-0",J6="ring-2 ring-offset-0 ring-primary-350 ring-offset-white dark:ring-primary-450 dark:ring-offset-black",X6="transition-colors duration-100 linear hover:surface-hover",Mm="hover:surface-hover",Z6="fixed inset-0 z-0 overflow-auto overscroll-auto scroll-smooth",Fm="will-change-[opacity,transform] data-[side=top]:animate-slideDownAndFade data-[side=right]:animate-slideLeftAndFade data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade",Q6="will-change-[opacity,transform] animate-slideUpAndFade",e3="separator-separator",t3="self-stretch border-ie",jm="self-stretch border-be",r3="data-[highlighted]:bg-primary-100 dark:data-[highlighted]:bg-primary-850 hover:data-[highlighted]:bg-primary-150 hover:dark:data-[highlighted]:bg-primary-800",n3="base-surface md:fixed-surface backdrop-blur-md dark:backdrop-blur-lg",o3="separator-separator",i3="separator-separator",To="modal-surface",a3=e=>{const t=()=>[Qt],r=()=>["auto",Qt],n=()=>["",Qt],o=()=>[Co],i=()=>["none","","sm","md","lg","xl","2xl","3xl","full",ys];return ym(e,{classGroups:{float:[{float:["start","end"]}],clear:[{clear:["start","end"]}],resize:[{resize:["block ","inline"]}],"text-alignment":[{text:["start","end"]}],"logical.overscroll-b":[{"overscroll-b":["auto ","contain","auto"]}],"logical.overscroll-i":[{"overscroll-b":["auto ","contain","auto"]}],"logical.bs":[{bs:t()}],"logical.min-bs":[{"min-bs":t()}],"logical.max-bs":[{"max-bs":t()}],"logical.is":[{is:t()}],"logical.min-is":[{"min-is":t()}],"logical.max-is":[{"max-is":t()}],"logical.mlb":[{mlb:t()}],"logical.mli":[{mli:t()}],"logical.mbs":[{mbs:t()}],"logical.mbe":[{mbe:t()}],"logical.mis":[{mis:t()}],"logical.mie":[{mie:t()}],"logical.plb":[{plb:t()}],"logical.pli":[{pli:t()}],"logical.pbs":[{pbs:t()}],"logical.pbe":[{pbe:t()}],"logical.pis":[{pis:t()}],"logical.pie":[{pie:t()}],"logical.space-b":[{"space-b":t()}],"logical.space-i":[{"space-i":t()}],"logical.inset-block":[{"inset-block":r()}],"logical.inset-inline":[{"inset-inline":r()}],"logical.block-start":[{"block-start":r()}],"logical.block-end":[{"block-end":r()}],"logical.inline-start":[{"inline-start":r()}],"logical.inline-end":[{"inline-end":r()}],"logical.border-bs":[{"border-bs":n()}],"logical.border-be":[{"border-be":n()}],"logical.border-is":[{"border-is":n()}],"logical.border-ie":[{"border-ie":n()}],"logical.border-color-bs":[{"border-bs":o()}],"logical.border-color-be":[{"border-be":o()}],"logical.border-color-is":[{"border-is":o()}],"logical.border-color-ie":[{"border-ie":o()}],"logical.rounded-bs":[{"rounded-bs":i()}],"logical.rounded-be":[{"rounded-be":i()}],"logical.rounded-is":[{"rounded-is":i()}],"logical.rounded-ie":[{"rounded-ie":i()}],"logical.rounded-ss":[{"rounded-ss":i()}],"logical.rounded-se":[{"rounded-se":i()}],"logical.rounded-es":[{"rounded-es":i()}],"logical.rounded-ee":[{"rounded-ee":i()}],"logical.divide-b":[{"divide-b":n()}],"logical.divide-i":[{"divide-i":n()}]},conflictingClassGroups:{"inset-block":["logical.block-start","logical.block-end"],"inset-inline":["logical.inline-start","logical.inline-end"],p:["logical.plb","logical.pli","logical.pbs","logical.pbe","logical.pis","logical.pie"],pli:["logical.pis","logical.pie"],plb:["logical.pbs","logical.pbe"],m:["logical.mlb","logical.mli","logical.mbs","logical.mbe","logical.mis","logical.mie"],mli:["logical.mis","logical.mie"],mlb:["logical.mbs","logical.mbe"],overscroll:["overscroll-i","overscroll-b"],rounded:["logical.rounded-bs","logical.rounded-be","logical.rounded-is","logical.rounded-ie","logical.rounded-ss","logical.rounded-se","logical.rounded-es","logical.rounded-ee"],"logical.rounded-bs":["logical.rounded-ss","logical.rounded-se"],"logical.rounded-be":["logical.rounded-es","logical.rounded-ee"],"logical.rounded-is":["logical.rounded-ss","logical.rounded-es"],"logical.rounded-ie":["logical.rounded-ee","logical.rounded-se"],"border-color":["logical.border-color-bs","logical.border-color-be","logical.border-color-is","logical.border-color-ie"],border:["logical.border-bs","logical.border-be","logical.border-is","logical.border-ie"]}})},iu=Object.keys(B6),ue=jI({classGroups:{fontFamily:["font-body","font-mono"],fontWeight:["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black",Ii],foreground:iu.map(e=>`fg-${e}`),surface:iu.map(e=>`surface-${e}`),separator:iu.map(e=>`separator-${e}`)}},a3),au=new Map([[0,"is-0"],["px","is-px"],[.5,"is-0.5"],[1,"is-1"],[1.5,"is-1.5"],[2,"is-2"],[2.5,"is-2.5"],[3,"is-3"],[3.5,"is-3.5"],[4,"is-4"],[5,"is-5"],[6,"is-6"],[7,"is-7"],[8,"is-8"],[9,"is-9"],[10,"is-10"],[11,"is-11"],[12,"is-12"],[14,"is-14"],[16,"is-16"],[20,"is-20"],[24,"is-24"],[28,"is-28"],[32,"is-32"],[36,"is-36"],[40,"is-40"],[44,"is-44"],[48,"is-48"],[52,"is-52"],[56,"is-56"],[60,"is-60"],[64,"is-64"],[72,"is-72"],[80,"is-80"],[96,"is-96"]]),Bm=new Map([[0,"bs-0"],["px","bs-px"],[.5,"bs-0.5"],[1,"bs-1"],[1.5,"bs-1.5"],[2,"bs-2"],[2.5,"bs-2.5"],[3,"bs-3"],[3.5,"bs-3.5"],[4,"bs-4"],[5,"bs-5"],[6,"bs-6"],[7,"bs-7"],[8,"bs-8"],[9,"bs-9"],[10,"bs-10"],[11,"bs-11"],[12,"bs-12"],[14,"bs-14"],[16,"bs-16"],[20,"bs-20"],[24,"bs-24"],[28,"bs-28"],[32,"bs-32"],[36,"bs-36"],[40,"bs-40"],[44,"bs-44"],[48,"bs-48"],[52,"bs-52"],[56,"bs-56"],[60,"bs-60"],[64,"bs-64"],[72,"bs-72"],[80,"bs-80"],[96,"bs-96"]]),Ni=new Set(au.keys()),su=Bm.get.bind(Bm),Rm=au.get.bind(au),We=e=>ue(su(e),Rm(e)),Um=(e,t)=>{if(Ni.has(e))return e;if(e<=0)return 0;if(e===1)return"px";{const r=Math.floor(e),n=Math.floor(e*2)/2,o=Math.floor(e/2)*2,i=Math.floor(e/4)*4;return Ni.has(n)?n:Ni.has(r)?r:Ni.has(o)?o:Ni.has(i)?i:t}},Wm=e=>e==="px"?1:e,lu="placeholder-neutral-500 dark:placeholder-neutral-400",Tt="text-xs font-normal fg-description",s3="text-xs font-normal fg-base",l3="text-xs font-normal",c3="text-xs font-medium text-success-550 dark:text-success-300",u3="text-xs font-medium text-info-550 dark:text-info-300",f3="text-xs font-medium text-warning-550 dark:text-warning-300",d3="text-xs font-medium text-error-550 dark:text-error-300",p3=e=>{switch(e){case"success":return c3;case"info":return u3;case"warning":return f3;case"error":return d3;default:return}},h3="bg-neutral-25 dark:bg-neutral-850",g3="shadow-success-500/50 dark:shadow-success-500/50 text-success-600 dark:text-success-100 bg-success-50 dark:bg-success-900",v3="shadow-info-500/50 dark:shadow-info-500/50 text-info-600 dark:text-info-100 bg-info-50 dark:bg-info-900",m3="shadow-warning-500/50 dark:shadow-warning-500/50 text-warning-600 dark:text-warning-100 bg-warning-50 dark:bg-warning-900",b3="shadow-error-500/50 dark:shadow-error-500/50 text-error-600 dark:text-error-100 bg-error-50 dark:bg-error-900",y3=e=>{switch(e){case"success":return g3;case"info":return v3;case"warning":return m3;case"error":return b3;default:return h3}},w3=(e,...t)=>ue("overflow-anchored overflow-auto",...t),_3=(e,...t)=>ue("overflow-anchor is-px bs-px",...t),E3={root:w3,anchor:_3},x3=({size:e=10,inGroup:t},...r)=>ue("relative inline-flex shrink-0",We(e),t&&(e==="px"||e<=3?"-mie-1":"-mie-2"),...r),S3=({srOnly:e},...t)=>ue(e&&"sr-only",...t),$3=({srOnly:e},...t)=>ue(Tt,e&&"sr-only",...t),C3=({variant:e},...t)=>ue("is-full bs-full bg-[--surface-bg]",e==="circle"?"rounded-full":"rounded",...t),A3=({status:e,size:t=3},...r)=>ue("absolute block-end-0 inline-end-0",We(t),e==="inactive"?"text-warning-350 dark:text-warning-250":e==="active"?"text-success-350 dark:text-success-250":"text-neutral-350 dark:text-neutral-250",...r),O3=({status:e,variant:t,animation:r},...n)=>ue("absolute inset-0 border-2",t==="circle"?"rounded-full":"rounded",e==="current"?"border-primary-400 dark:border-primary-500":e==="active"?"border-success-400 dark:border-success-400":e==="error"?"border-error-400 dark:border-error-500":e==="warning"?"border-warning-400 dark:border-warning-500":e==="inactive"?"border-neutral-400 dark:border-neutral-500":"border-[color:var(--surface-bg)]",r==="pulse"?"animate-halo-pulse":"",...n),T3=(e,...t)=>ue("fill-white",...t),I3=(e,...t)=>ue("inline-flex items-center",...t),P3=({size:e,srOnly:t},...r)=>ue(t?"sr-only":"rounded-full truncate text-sm leading-none plb-1 pli-2 relative z-[1] flex items-center justify-center",e&&su(e),...r),k3=({srOnly:e},...t)=>ue(e?"sr-only":Tt,...t),N3={root:x3,label:S3,description:$3,statusIcon:A3,frame:C3,ring:O3,fallbackText:T3,group:I3,groupLabel:P3,groupDescription:k3},D3=(e,...t)=>ue("shrink-0 flex items-center",...t),L3=(e,...t)=>ue("contents",...t),M3=(e,...t)=>ue("contents",...t),F3=(e,...t)=>ue(...t),j3=(e,...t)=>ue("opacity-50",...t),B3={root:D3,list:L3,listItem:M3,current:F3,separator:j3},R3="fg-inverse surface-accent hover:surface-accentHover aria-pressed:bg-primary-500 dark:aria-pressed:bg-primary-500 data-[state=open]:bg-primary-500 dark:data-[state=open]:bg-primary-500 aria-checked:bg-primary-500 dark:aria-checked:bg-primary-500 aria-checked:text-primary-100",U3="surface-input",W3=U3+" data-[state=open]:surface-input aria-pressed:fg-accent aria-pressed:surface-base aria-checked:fg-accent aria-checked:surface-base",H3=Mm+" hover:text-inherit data-[state=open]:surface-input aria-pressed:fg-accent aria-pressed:surface-base aria-checked:fg-accent aria-checked:surface-base",V3=(e,...t)=>{const r=e.variant??"default";return ue("font-medium text-sm shrink-0 inline-flex select-none items-center justify-center overflow-hidden","transition-color duration-100",e.density==="fine"?q6:V6,e.disabled&&Ss,!e.inGroup&&"rounded-md",!e.textWrap&&"text-ellipsis whitespace-nowrap",!e.disabled&&!e.inGroup&&(r==="default"||r==="primary")&&ou({elevation:e.elevation}),!e.disabled&&X6,r!=="outline"&&" hover:border-transparent dark:hover:border-transparent",r==="default"&&W3,!e.disabled&&r==="ghost"&&H3,r==="primary"&&R3,r==="outline"&&"border separator-base",!e.disabled&&Rr,"group",...t)},z3=(e,...t)=>ue("inline-flex rounded-md [&>:first-child]:rounded-is-md [&>:last-child]:rounded-ie-md [&>button]:relative",ou({elevation:e.elevation}),...t),G3={root:V3,group:z3},K3="overflow-auto grid place-items-center p-2 md:p-4 lg:p-8",q3=(e,...t)=>ue("fixed z-20 inset-inline-0 block-start-0 bs-[100dvb] surface-scrim",K3,...t),Y3=({inOverlayLayout:e,elevation:t="chrome"},...r)=>ue("flex flex-col",!e&&"fixed z-20 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]","is-[95vw] md:is-full max-is-[24rem] border rounded-lg p-4",Q6,Oo({elevation:t}),"surface-baseGlass backdrop-blur",i3,Rr,...r),J3=({srOnly:e},...t)=>ue("rounded shrink-0 text-xl font-medium",e&&"sr-only",...t),X3=({srOnly:e},...t)=>ue("mlb-2",Tt,e&&"sr-only",...t),Z3={overlay:q3,content:Y3,title:J3,description:X3},Q3=(e,...t)=>ue("rounded-md p-1 max-bs-[--radix-dropdown-menu-content-available-height] overflow-y-auto",...t),eP=(e,...t)=>ue("is-48 rounded-md md:is-56 z-[30]",Fm,To,Oo({elevation:"group"}),...t),tP=(e,...t)=>ue("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2 text-sm","data-[highlighted]:surface-hover",Lm,Y6,...t),rP=(e,...t)=>ue("mlb-1 mli-2 bs-px surface-separator",...t),nP=(e,...t)=>ue(Tt,"select-none pli-2 plb-2",...t),oP=(e,...t)=>ue(nu,...t),iP={content:eP,viewport:Q3,item:tP,separator:rP,groupLabel:nP,arrow:oP},aP="",sP="shadow-success-500/50 dark:shadow-success-600/50",lP="shadow-info-500/50 dark:shadow-info-600/50",cP="shadow-warning-500/50 dark:shadow-warning-600/50",uP="shadow-error-500/50 dark:shadow-error-600/50",Hm="transition-colors bg-[--input-bg] focus:surface-attention border-transparent focus:border-transparent",Vm="hover:bg-[--input-bg-hover] dark:hover:bg-[--input-bg-hover] focus:hover:surface-attention",zm="shadow-inner transition-colors surface-unAccent aria-checked:surface-accent aria-[checked=mixed]:surface-accent",Gm="hover:surface-unAccentHover hover:aria-checked:surface-accentHover hover:aria-[checked=mixed]:surface-accentHover",Km=e=>{switch(e){case"success":return sP;case"info":return lP;case"warning":return cP;case"error":return uP;default:return null}},fP=e=>["is-full bg-transparent text-current",e.density==="fine"?xs:Es,lu,Lm,e.disabled&&Ss],dP=e=>["is-full text-base rounded text-[color:var(--surface-text)]",Hm,lu,e.density==="fine"?K6:H6,e.disabled?Ss:Vm],pP=e=>["is-full text-base rounded text-[color:var(--surface-text)]",Hm,Vm,e.focused&&"surface-attention",lu,Km(e.validationValence),e.disabled&&Ss,e.focused&&J6],hP=(e,...t)=>e.variant==="subdued"?ue(...fP(e),...t):e.variant==="static"?ue(...pP(e),...t):ue(...dP(e),!e.disabled&&Rr,Km(e.validationValence)||aP,...t),gP=({size:e=5,disabled:t},...r)=>ue(We(e),zm,!t&&Gm,"shrink-0 flex items-center justify-center rounded text-white",Rr,...r),vP=({size:e=5},...t)=>ue(We(Um(Wm(e)*.7,4)),...t),mP=({size:e=5,disabled:t},...r)=>ue(su(e),Rm(Um(Wm(e)*1.75,9)),zm,!t&&Gm,"cursor-pointer shrink-0 rounded-full pli-1 mx-1 relative",Rr,...r),bP=({size:e=5},...t)=>ue(We(e==="px"?"px":e-2),"block bg-white rounded-full separator-separator transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[100%]",...t),yP=(e,...t)=>ue("font-mono selection:bg-transparent mli-auto",e.disabled&&"cursor-not-allowed",...t),wP=(e,...t)=>ue("block text-sm font-medium",e.srOnly&&"sr-only",...t),_P=(e,...t)=>ue(Tt,e.srOnly&&"sr-only",...t),EP=(e,...t)=>ue("leading-none mlb-1",e.srOnly&&"sr-only",...t),xP=(e,...t)=>ue(Tt,e.srOnly?"sr-only":p3(e.validationValence),...t),SP={input:hP,inputWithSegments:yP,checkbox:gP,checkboxIndicator:vP,label:wP,description:_P,validation:xP,switch:mP,switchThumb:bP,descriptionAndValidation:EP},$P=(e,...t)=>ue("underline decoration-1 underline-offset-2 transition-color rounded-sm","text-primary-600 hover:text-primary-500 dark:text-primary-300 hover:dark:text-primary-200","visited:text-teal-600 visited:hover:text-teal-500 visited:dark:text-teal-300 visited:hover:dark:text-teal-200",Rr,...t),CP={root:$P},AP=(e,...t)=>ue(...t),OP=({collapsible:e},...t)=>ue(!e&&"flex",...t),TP=({density:e},...t)=>ue(We(e==="fine"?8:10),"shrink-0 flex items-start justify-center",...t),IP=({density:e},...t)=>ue(Dm(e),...t),PP=(e,...t)=>ue(We(5),"mbs-2.5",...t),kP=({density:e},...t)=>ue("is-5 rounded flex justify-center items-center",Dm(e),Mm,Rr,...t),NP=(e,...t)=>ue(We(5),...t),DP={root:AP,item:{root:OP,endcap:TP,heading:IP,dragHandleIcon:PP,openTrigger:kP,openTriggerIcon:NP}},Io={start:{width:"sm:is-[270px]",sidebar:"sm:-inline-start-[270px]",content:"pis-[270px]"},end:{width:"sm:is-[360px]",sidebar:"sm:-inline-end-[360px]",content:"pie-[360px]"}},LP=({inlineStartSidebarOpen:e,inlineEndSidebarOpen:t,side:r},...n)=>ue("fixed block-start-0 block-end-0 is-[100vw] z-10 overscroll-contain overflow-x-hidden overflow-y-auto","transition-[inset-inline-start,inset-inline-end] duration-200 ease-in-out",o3,r==="inline-start"?Io.start.width:Io.end.width,r==="inline-start"?e?"inline-start-0":ue("-inline-start-[100vw]",Io.start.sidebar):t?"inline-end-0":ue("-inline-end-[100vw]",Io.end.sidebar),r==="inline-start"?"border-ie":"border-is",n3,...n),MP=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,bounce:n},...o)=>ue("transition-[padding-inline-start,padding-inline-end] duration-200 ease-in-out",e&&t?Io.start.content:"pis-0",e&&r?Io.end.content:"pie-0",n&&Z6,...o),FP=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,side:n},...o)=>ue("fixed inset-0 z-[9] surface-scrim","transition-opacity duration-200 ease-in-out",!e&&(t||r)?"opacity-100":"opacity-0",!e&&(t||r)?"block":"hidden",...o),jP={content:MP,sidebar:LP,overlay:FP},BP=({valence:e,elevation:t},...r)=>ue("p-3 rounded-md max-is-full overflow-auto",ou({elevation:t}),y3(e),...r),RP=(e,...t)=>ue("text-base font-medium mb-2",...t),UP=(e,...t)=>ue(...t),WP={root:BP,title:RP,body:UP},HP=({constrainInline:e,constrainBlock:t},...r)=>ue("p-1 rounded-lg",e&&"max-is-[--radix-popover-content-available-width] overflow-x-auto",t&&"max-bs-[--radix-popover-content-available-height] overflow-y-auto",...r),VP=(e,...t)=>ue("z-[30] rounded-lg",To,Oo({elevation:"group"}),Rr,...t),zP=(e,...t)=>ue(R6,...t),GP={content:VP,viewport:HP,arrow:zP},KP=(e,...t)=>ue("overflow-hidden",...t),qP=(e,...t)=>ue("is-full bs-full scroll-smooth","[&>div]:table-fixed [&>div]:w-full",...t),YP=(e,...t)=>ue("flex select-none touch-none p-0.5 ease-out","data-[orientation=vertical]:is-1.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:bs-1.5",...t),JP=(e,...t)=>ue("bg-neutral-500/50 flex-1 rounded-lg relative","before:content-[''] before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-[44px] before:min-h-[44px]",...t),XP=(e,...t)=>ue(...t),ZP={root:KP,viewport:qP,scrollbar:YP,thumb:JP,corner:XP},QP=({elevation:e="chrome"},...t)=>ue("p-1 z-[50] rounded",To,Oo({elevation:e}),...t),ek=(e,...t)=>ue("relative flex items-center pis-6 pie-3 plb-1","text-base leading-none rounded-sm select-none outline-none",r3,...t),tk=(e,...t)=>ue("absolute inline-start-0 is-6 inline-flex items-center justify-center",...t),rk=(e,...t)=>ue(nu,...t),nk=(e,...t)=>ue(jm,...t),ok=(e,...t)=>ue(To,"flex items-center justify-center cursor-default bs-6 is-full",...t),ik={content:QP,item:ek,itemIndicator:tk,arrow:rk,separator:nk,scrollButton:ok},ak=({orientation:e},...t)=>ue(e==="vertical"?t3:jm,e3,...t),sk={root:ak},lk=(e,...t)=>ue("is-20 bs-1 inline-block relative bg-neutral-400/25 rounded-full overflow-hidden",...t),ck=({indeterminate:e},...t)=>ue("absolute inline-start-0 inset-block-0 inline-block bg-neutral-400 rounded-full",e&&"animate-progress-indeterminate",...t),uk={root:lk,bar:ck},fk={neutral:"bg-neutral-200 text-neutral-800 dark:bg-neutral-700 dark:text-neutral-150",red:"bg-red-200 text-red-800 dark:bg-red-700 dark:text-red-150",orange:"bg-orange-200 text-orange-800 dark:bg-orange-700 dark:text-orange-150",amber:"bg-amber-200 text-amber-800 dark:bg-amber-700 dark:text-amber-150",yellow:"bg-yellow-200 text-yellow-800 dark:bg-yellow-700 dark:text-yellow-150",lime:"bg-lime-200 text-lime-800 dark:bg-lime-700 dark:text-lime-150",green:"bg-green-200 text-green-800 dark:bg-green-700 dark:text-green-150",emerald:"bg-emerald-200 text-emerald-800 dark:bg-emerald-700 dark:text-emerald-150",teal:"bg-teal-200 text-teal-800 dark:bg-teal-700 dark:text-teal-150",cyan:"bg-cyan-200 text-cyan-800 dark:bg-cyan-700 dark:text-cyan-150",sky:"bg-sky-200 text-sky-800 dark:bg-sky-700 dark:text-sky-150",blue:"bg-blue-200 text-blue-800 dark:bg-blue-700 dark:text-blue-150",indigo:"bg-indigo-200 text-indigo-800 dark:bg-indigo-700 dark:text-indigo-150",violet:"bg-violet-200 text-violet-800 dark:bg-violet-700 dark:text-violet-150",purple:"bg-purple-200 text-purple-800 dark:bg-purple-700 dark:text-purple-150",fuchsia:"bg-fuchsia-200 text-fuchsia-800 dark:bg-fuchsia-700 dark:text-fuchsia-150",pink:"bg-pink-200 text-pink-800 dark:bg-pink-700 dark:text-pink-150",rose:"bg-rose-200 text-rose-800 dark:bg-rose-700 dark:text-rose-150",info:"bg-info-200 text-info-800 dark:bg-info-700 dark:text-info-150",success:"bg-success-200 text-success-800 dark:bg-success-700 dark:text-success-150",warning:"bg-warning-200 text-warning-800 dark:bg-warning-700 dark:text-warning-150",error:"bg-error-200 text-error-800 dark:bg-error-700 dark:text-error-150"},dk=({palette:e="neutral"},...t)=>ue("text-xs font-semibold pli-2 plb-0.5 rounded cursor-default",fk[e],...t),pk={root:dk},hk=(e,...t)=>ue("z-[70] fixed bottom-4 inset-x-4 w-auto md:top-4 md:right-4 md:left-auto md:bottom-auto md:w-full md:max-w-sm rounded-lg flex flex-col gap-2",...t),gk=(e,...t)=>ue("rounded-lg flex p-2 gap-2",To,Oo({elevation:"chrome"}),"radix-state-open:animate-toast-slide-in-bottom md:radix-state-open:animate-toast-slide-in-right","radix-state-closed:animate-toast-hide","radix-swipe-end:animate-toast-swipe-out","translate-x-radix-toast-swipe-move-x","radix-swipe-cancel:translate-x-0 radix-swipe-cancel:duration-200 radix-swipe-cancel:ease-[ease]",Rr,...t),vk=(e,...t)=>ue("grow flex flex-col gap-1 justify-center pis-2",...t),mk=(e,...t)=>ue("shrink-0 flex flex-col gap-1 justify-center",...t),bk=({srOnly:e},...t)=>ue("shrink-0 text-md font-medium",e&&"sr-only",...t),yk=({srOnly:e},...t)=>ue(Tt,"shrink-0",e&&"sr-only",...t),wk={viewport:hk,root:gk,body:vk,title:bk,description:yk,actions:mk},_k=(e,...t)=>ue("flex items-center gap-2 is-full",...t),Ek={root:_k},xk=(e,...t)=>ue("inline-flex items-center rounded-md plb-2 pli-3",To,Fm,Oo({elevation:"group"}),l3,...t),Sk=(e,...t)=>ue(nu,...t),$k={content:xk,arrow:Sk},Ck={themeName:()=>"default",anchoredOverflow:E3,avatar:N3,breadcrumb:B3,button:G3,dialog:Z3,menu:iP,input:SP,link:CP,list:DP,main:jP,message:WP,popover:GP,select:ik,scrollArea:ZP,separator:sk,status:uk,tag:pk,toast:wk,toolbar:Ek,tooltip:$k},Ak=e=>(t,r,n,...o)=>{const i=M6(e,t);return typeof i=="function"?i(n,...o):r},Ok=Ak(Ck);const qm=c.createContext({textValue:"",setTextValue:async e=>{}}),Ym=()=>c.useContext(qm),cu=({children:e})=>{const[t,r]=c.useState(""),n=c.useCallback(async o=>(await navigator.clipboard.writeText(o),r(o)),[]);return c.createElement(qm.Provider,{value:{textValue:t,setTextValue:n}},e)},Jm="invisible bs-px -mbe-px overflow-hidden",Tk=({value:e,classNames:t,iconProps:r,...n})=>{const{t:o}=rt("os"),{textValue:i,setTextValue:a}=Ym(),s=i===e;return c.createElement(wr,{...n,classNames:["inline-flex flex-col justify-center",t],onClick:()=>a(e),"data-testid":"copy-invitation"},c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",s&&Jm)},c.createElement("span",{className:"pli-1"},o("copy invitation code label")),c.createElement(ze.Copy,{className:We(4),weight:"bold",...r})),c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",!s&&Jm)},c.createElement("span",{className:"pli-1"},o("copy invitation code success label")),c.createElement(ze.Check,{className:We(4),weight:"bold",...r})))},Ik=({value:e,classNames:t,iconProps:r,variant:n,...o})=>{const{t:i}=rt("os"),{textValue:a,setTextValue:s}=Ym(),u=i(a===e?"copy invitation code success label":"copy invitation code label"),[f,d]=c.useState(!1);return c.createElement(_r.Root,{delayDuration:1500,open:f,onOpenChange:d},c.createElement(_r.Portal,null,c.createElement(_r.Content,{side:"bottom",sideOffset:12,classNames:"z-30"},c.createElement("span",null,u),c.createElement(_r.Arrow,null))),c.createElement(_r.Trigger,{"aria-label":u,...o,onClick:()=>s(e).then(()=>d(!0)),"data-testid":"copy-invitation",asChild:!0},c.createElement(wr,{variant:n,classNames:["inline-flex flex-col justify-center",t]},c.createElement(ze.Copy,{className:We(5),weight:"bold",...r}))))},uu=({children:e,description:t,before:r,after:n,variant:o="default",elevation:i,slots:a={},...s})=>{var g,v,y,m;const l=xt("compoundButton-label"),u=xt("compoundButton-description"),{tx:f}=Ce(),d=Rn(i),p={...s,variant:o,elevation:d,textWrap:!0},h=f("button.root","button button--compound",p,"flex items-center gap-4 plb-2.5",(g=a.root)==null?void 0:g.className);return c.createElement("button",{...s,...a.root,className:h,"aria-labelledby":l,...t&&{"aria-describedby":u}},r&&c.createElement("div",{role:"none",className:"grow-0"},r),c.createElement("div",{role:"none",...a.middle,className:ue("grow whitespace-normal flex flex-col gap-1 text-left",(v=a.middle)==null?void 0:v.className)},c.createElement("p",{...a.label,id:l,className:ue((y=a.label)==null?void 0:y.className)},e),t&&c.createElement("p",{id:u,...a.description,className:ue("text-xs mbe-1 font-normal",o==="primary"?s3:Tt,(m=a.description)==null?void 0:m.className)},t)),n&&c.createElement("div",{role:"none",className:"grow-0"},n))};var $s={adjectives:["abundant","accessible","accomplished","accurate","achievable","adaptable","adaptive","adequate","adjustable","admirable","admiring","adorable","adored","adoring","adroit","adulatory","advanced","advantageous","adventurous","affable","affectionate","affirmative","affluent","affordable","agile","agreeable","alluring","altruistic","amazed","amazing","ambitious","amenable","amiable","amicable","ample","amusing","angelic","appealing","appreciable","appreciated","appreciative","appropriate","ardent","articulate","artistic","assuring","astonished","astonishing","astounded","astounding","athletic","attentive","attractive","audible","auspicious","authentic","autonomous","available","avid","awed","awesome","awestruck","beauteous","beautiful","believable","beloved","beneficent","beneficial","benevolent","blameless","blissful","blithe","bonny","booming","boundless","bountiful","brainiest","brainy","brave","breathtaking","bright","brighter","brightest","brilliant","brisk","brotherly","bullish","buoyant","calm","calming","capable","captivating","carefree","catchy","celebrated","celebratory","champion","charismatic","charitable","charming","chaste","cheaper","cheapest","cheerful","cheery","cherished","chivalrous","classic","classy","clean","cleaner","cleanest","cleanly","clear","cleared","clearer","clever","coherent","cohesive","colorful","comely","comfortable","comforting","comfy","commendable","commodious","compact","compatible","competitive","compliant","conciliatory","concise","confident","congenial","considerate","consistent","constructive","consummate","contrasty","convenient","convincing","cool","coolest","cooperative","correct","courageous","courteous","courtly","cozy","creative","credible","crisp","crisper","cushy","cute","daring","darling","dashing","dauntless","dazzled","dazzling","decent","decisive","dedicated","defeated","deft","delectable","delicate","delicious","delighted","delightful","dependable","deserving","desirable","desirous","detachable","devout","dexterous","dextrous","dignified","diligent","diplomatic","distinctive","diversified","divine","dominated","dumbfounded","durable","dynamic","eager","earnest","eased","easy","easygoing","ebullient","economical","ecstatic","educated","effective","efficacious","efficient","effortless","effusive","elated","elegant","elite","eloquent","eminent","enchanted","enchanting","encouraging","endearing","endorsed","energetic","engaging","engrossing","enhanced","enjoyable","enraptured","enterprising","entertaining","enthralled","enthusiastic","enticing","entranced","entrancing","enviable","envious","equitable","erudite","ethical","euphoric","evaluative","eventful","everlasting","evocative","exalted","exalting","exceeding","excellent","exceptional","excited","exciting","exemplary","exhilarating","expansive","exquisite","exuberant","exultant","fabulous","fair","faithful","famed","famous","fancier","fancy","fantastic","fascinating","fashionable","fast","faster","fastest","faultless","favorable","favored","favorite","fearless","feasible","feisty","felicitous","fertile","fervent","fervid","festive","fiery","fine","finer","finest","firmer","flashy","flatter","flattering","flawless","flexible","flourishing","fluent","fond","foolproof","foremost","formidable","fortuitous","fortunate","fragrant","free","freed","fresh","fresher","freshest","friendly","frugal","fruitful","fun","funny","futuristic","gainful","gallant","galore","generous","genial","gentle","gentlest","genuine","gifted","glad","glamorous","gleeful","glimmering","glistening","glorious","glowing","godlike","gold","golden","good","goodly","gorgeous","graceful","gracious","grand","grateful","gratified","gratifying","great","greatest","guiltless","gutsy","halcyon","hale","hallowed","handier","handsome","handy","happier","happy","hardier","hardy","harmless","harmonious","healthful","healthy","heartening","heartfelt","heartwarming","heavenly","helpful","heroic","hilarious","holy","honest","honorable","honored","hopeful","hospitable","hot","hottest","humane","humble","humorous","humourous","ideal","idolized","idyllic","illuminating","illustrious","imaginative","immaculate","immense","impartial","impassioned","impeccable","important","impressed","impressive","improved","improving","incredible","indebted","indulgent","industrious","inestimable","inexpensive","infallible","influential","ingenious","ingenuous","innocuous","innovative","insightful","inspiring","instructive","instrumental","intelligent","intelligible","interesting","intimate","intricate","intriguing","intuitive","invaluable","inventive","invigorating","invincible","inviolable","inviolate","invulnerable","irresistible","jolly","jovial","joyful","joyous","jubilant","judicious","keen","kindly","laudable","lavish","lawful","leading","lean","legendary","lighter","likable","like","liked","lionhearted","lively","logical","lovable","loved","lovely","loving","loyal","lucid","luckier","luckiest","lucky","lucrative","luminous","lush","lustrous","luxuriant","luxurious","luxury","lyrical","magic","magical","magnanimous","magnificent","majestic","manageable","marvellous","marvelous","masterful","matchless","mature","meaningful","memorable","merciful","meritorious","merry","mesmerized","mesmerizing","meticulous","mighty","miraculous","modern","modest","momentous","monumental","motivated","navigable","neat","neatest","nice","nifty","nimble","noble","noiseless","noteworthy","nourishing","observant","obtainable","optimal","optimistic","opulent","orderly","organized","outstanding","overjoyed","painless","palatial","pampered","panoramic","paramount","passionate","patient","patri","peaceable","peaceful","peerless","peppy","perfect","permissible","personalized","phenomenal","picturesque","playful","pleasant","pleased","pleasing","pleasurable","plentiful","plush","poetic","poignant","poised","polished","polite","popular","portable","posh","positive","powerful","praiseworthy","praising","precious","precise","preeminent","preferable","premier","prestigious","pretty","priceless","principled","privileged","prize","proactive","prodigious","productive","proficient","profound","progressive","prolific","prominent","promised","promising","prompt","proper","propitious","prosperous","protective","proud","proven","prudent","punctual","pure","purposeful","quaint","qualified","quicker","quiet","quieter","radiant","rapid","rapt","rapturous","rational","reachable","readable","ready","realistic","realizable","reasonable","reasoned","receptive","recommended","redeeming","refined","reformed","refreshed","refreshing","regal","rejoicing","relaxed","reliable","remarkable","renewed","renowned","replaceable","reputable","resilient","resolute","resounding","resourceful","respectable","respectful","resplendent","responsive","restful","restored","retractable","reverent","rewarding","rich","righteous","rightful","robust","romantic","roomier","rosy","safe","saintly","salutary","sane","satisfactory","satisfied","satisfying","scenic","seamless","seasoned","secure","selective","sensational","sensible","sensitive","serene","sexy","sharp","sharper","sharpest","shiny","significant","silent","simpler","simplest","simplified","sincere","skilled","skillful","sleek","slick","smart","smarter","smartest","smelly","smiling","smitten","smooth","smoother","smoothest","snappy","snazzy","sociable","soft","softer","solid","soulful","spacious","sparkling","spectacular","speedy","spellbinding","spellbound","spirited","spiritual","splendid","spontaneous","sporty","spotless","sprightly","stable","stainless","stately","statuesque","staunch","steadfast","steadiest","steady","stellar","stimulating","stimulative","streamlined","striking","strong","stronger","strongest","stunned","stunning","stupendous","sturdier","sturdy","stylish","stylized","suave","sublime","subsidized","substantive","succeeding","successful","sufficient","suitable","sumptuous","super","superb","superior","supple","supportive","supreme","surreal","sustainable","swankier","swankiest","swanky","sweeping","sweet","sweetheart","swift","talented","tantalizing","tempting","tenacious","tender","terrific","thankful","thinner","thoughtful","thrifty","thrilled","thrilling","thriving","tidy","timely","titillating","tolerable","top","topnotch","tough","tougher","toughest","tranquil","transparent","trendy","triumphal","triumphant","trusted","trusting","trustworthy","trusty","truthful","twinkly","unabashed","unaffected","unassailable","unbeatable","unbiased","unbound","undamaged","undaunted","undisputable","undisputed","unencumbered","unequivocal","unfettered","unlimited","unmatched","unparalleled","unreal","unrestricted","unrivaled","unselfish","unwavering","upbeat","upscale","usable","useful","valiant","valuable","verifiable","veritable","versatile","vibrant","victorious","viewable","vigilant","virtuous","visionary","vivacious","vivid","warm","warmer","warmhearted","wealthy","welcome","wholesome","wieldy","winning","wise","witty","wonderful","wondrous","workable","worth","worthwhile","worthy","young","youthful","zippy"],animals:["aardvark","albatross","alligator","angelfish","angora","ant","anteater","antelope","armadillo","avocet","baboon","badger","bandicoot","barnacle","barracuda","bat","beagle","bear","beaver","bee","beetle","bird","bison","bloodhound","boar","bobcat","bonobo","buffalo","bulldog","bullfrog","butterfly","buzzard","camel","cat","caterpillar","catfish","cattle","centipede","chameleon","cheetah","chicken","chihuahua","chimpanzee","chin","chinchilla","chipmunk","civet","clam","cockroach","coon","coral","corgi","cougar","cow","coyote","crab","crane","cuttlefish","dachshund","dalmatian","dane","deer","devil","dingo","dodo","dog","dogfish","dollar","dolphin","donkey","dormouse","dragon","dragonfly","duck","dugong","eagle","earwig","eel","elephant","emperor","emu","falcon","ferret","fish","flamingo","flounder","fly","forest","fowl","fox","foxhound","frog","gar","gecko","gerbil","gharial","gibbon","giraffe","goat","goose","gopher","gorilla","grasshopper","greyhound","grouse","guppy","hamster","hare","hedgehog","heron","hippopotamus","hornet","horse","hound","hummingbird","husky","hyena","hyrax","ibis","iguana","impala","insect","jackal","jaguar","jellyfish","kangaroo","kingfisher","kiwi","koala","kudu","labradoodle","ladybird","lemming","lemur","leopard","liger","lion","lionfish","lizard","llama","lobster","lynx","macaque","macaw","magpie","malamute","maltese","mammoth","manatee","mandrill","markhor","marmoset","mastiff","mayfly","meerkat","millipede","mole","mongoose","monkey","monster","moorhen","moose","moth","mouse","mule","newt","nightingale","ocelot","octopus","okapi","orangutan","ostrich","otter","owl","oyster","panda","panther","parrot","peacock","pelican","penguin","pheasant","pig","pike","piranha","platypus","pointer","poodle","porcupine","possum","prawn","puffin","pug","puma","quail","rabbit","raccoon","rat","rattlesnake","ray","reindeer","retriever","rhinoceros","robin","rottweiler","russel","salamander","scorpion","seahorse","seal","shark","sheep","sheepdog","shrew","shrimp","skater","skunk","sloth","slug","snail","snake","snowshoe","spaniel","sparrow","spider","sponge","squid","squirrel","squirt","starfish","stingray","stoat","swan","tapir","tarantula","termite","terrier","tiger","toad","tortoise","toucan","tuatara","turkey","turtle","uakari","urchin","vole","vulture","wallaby","walrus","warthog","wasp","weasel","whale","whippet","wildebeest","wolf","wolfhound","wolverine","wombat","woodlouse","woodpecker","worm","yak","zebra","zebu","zonkey","zorse"]},Xm=e=>e.charAt(0).toUpperCase()+e.slice(1),fu=e=>{const t=e.length*2/3,r=e.substring(0,t),n=e.substring(t),o=Xm($s.adjectives[parseInt(r,16)%$s.adjectives.length]),i=Xm($s.animals[parseInt(n,16)%$s.animals.length]);return`${o} ${i}`};const Zm=c.forwardRef(({identity:e,presence:t,onClick:r},n)=>{var l;const o=e.identityKey.toHex(),i=xt("identityListItem__label"),a=as(o??"",12),s=((l=e.profile)==null?void 0:l.displayName)??fu(e.identityKey.toHex());return c.createElement(Dc.Root,{classNames:ue("flex gap-2 pis-3 pie-1 items-center",r&&"cursor-pointer"),onClick:()=>r==null?void 0:r(),"data-testid":"identity-list-item",labelId:i,ref:n},c.createElement(It.Root,{status:t===va.SpaceMember.PresenceState.ONLINE?"active":"inactive",labelId:i},c.createElement(It.Frame,null,c.createElement(It.Fallback,{href:a})),c.createElement(It.Label,{classNames:"text-sm truncate pli-2"},s)))}),Pk=({devices:e,onSelect:t})=>{const{t:r}=rt("os");return e.length>0?c.createElement(Nc,{classNames:"flex flex-col gap-2"},e.map(n=>{var i,a,s,l,u;const o={identityKey:n.deviceKey,profile:n.profile?{displayName:`${(i=n.profile)==null?void 0:i.platform} (${(a=n.profile)==null?void 0:a.platformVersion}) on ${(s=n.profile)==null?void 0:s.os} (${(l=n.profile)==null?void 0:l.osVersion}) ${((u=n.profile)==null?void 0:u.architecture)??"Unknown"}-bit`}:void 0};return c.createElement(Zm,{key:n.deviceKey.toHex(),identity:o,onClick:t&&(()=>t(n))})})):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(Tt,"text-center is-full")},r("empty device list message")))},kk=({spaceKey:e,includeSelf:t,onSelect:r})=>{const n=Ue.useClient(),o=va.useMembers(e),i=c.useMemo(()=>t?o.sort(a=>a.identity.identityKey.equals(n.halo.identity.get().identityKey)?-1:1):o.filter(a=>!a.identity.identityKey.equals(n.halo.identity.get().identityKey)),[o]);return c.createElement(Nk,{members:i,onSelect:r})},Nk=({members:e,onSelect:t})=>{const{t:r}=rt("os"),n=e.filter(o=>o.identity);return n.length>0?c.createElement(Nc,{classNames:"flex flex-col gap-2","data-testid":"space-members-list"},n.map(o=>c.createElement(Zm,{key:o.identity.identityKey.toHex(),identity:o.identity,presence:o.presence,onClick:t&&(()=>t(o))}))):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(Tt,"text-center is-full mlb-2")},r("empty space members message")))};var Qm;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(Qm||(Qm={}));var eb;(function(e){(function(t){t[t.INCLUSIVE=1]="INCLUSIVE",t[t.EXPLICIT=2]="EXPLICIT"})(e.MatchingOptions||(e.MatchingOptions={}))})(eb||(eb={}));var tb;(function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"})(tb||(tb={}));var rb;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.TRUNCATE=1]="TRUNCATE",t[t.HUMANIZE=2]="HUMANIZE"})(e.KEY_OPTION||(e.KEY_OPTION={}))})(rb||(rb={}));var nb;(function(e){(function(t){t[t.BROWSER=0]="BROWSER",t[t.SHARED_WORKER=1]="SHARED_WORKER",t[t.NODE=2]="NODE"})(e.PLATFORM_TYPE||(e.PLATFORM_TYPE={}))})(nb||(nb={}));var ob;(function(e){e[e.CURRENT=0]="CURRENT",e[e.TRUSTED=1]="TRUSTED"})(ob||(ob={}));var ib;(function(e){(function(t){t[t.OFFLINE=0]="OFFLINE",t[t.ONLINE=1]="ONLINE",t[t.REMOVED=2]="REMOVED"})(e.PresenceState||(e.PresenceState={}))})(ib||(ib={}));var ab;(function(e){e[e.INACTIVE=2]="INACTIVE",e[e.ACTIVE=6]="ACTIVE",e[e.CLOSED=1]="CLOSED",e[e.CONTROL_ONLY=7]="CONTROL_ONLY",e[e.INITIALIZING=4]="INITIALIZING",e[e.READY=3]="READY",e[e.ERROR=5]="ERROR"})(ab||(ab={}));var sb;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.INIT_AUTOMERGE=1]="INIT_AUTOMERGE"})(e.Migration||(e.Migration={}))})(sb||(sb={}));var ye;(function(e){(function(t){t[t.INTERACTIVE=0]="INTERACTIVE",t[t.OFFLINE=1]="OFFLINE",t[t.MULTIUSE=2]="MULTIUSE"})(e.Type||(e.Type={})),function(t){t[t.DEVICE=0]="DEVICE",t[t.SPACE=1]="SPACE"}(e.Kind||(e.Kind={})),function(t){t[t.NONE=0]="NONE",t[t.SHARED_SECRET=1]="SHARED_SECRET"}(e.AuthMethod||(e.AuthMethod={})),function(t){t[t.INIT=0]="INIT",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED",t[t.READY_FOR_AUTHENTICATION=3]="READY_FOR_AUTHENTICATION",t[t.AUTHENTICATING=4]="AUTHENTICATING",t[t.SUCCESS=5]="SUCCESS",t[t.CANCELLED=6]="CANCELLED",t[t.TIMEOUT=7]="TIMEOUT",t[t.ERROR=8]="ERROR"}(e.State||(e.State={}))})(ye||(ye={}));var lb;(function(e){(function(t){t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED"})(e.Action||(e.Action={})),function(t){t[t.CREATED=0]="CREATED",t[t.ACCEPTED=1]="ACCEPTED"}(e.Type||(e.Type={}))})(lb||(lb={}));var cb;(function(e){e[e.OFFLINE=0]="OFFLINE",e[e.ONLINE=1]="ONLINE"})(cb||(cb={}));var Dk=200,du="__lodash_hash_undefined__",Lk=1/0,ub=9007199254740991,Mk="[object Arguments]",Fk="[object Function]",jk="[object GeneratorFunction]",Bk="[object Symbol]",Rk=/[\\^$.*+?()[\]{}|]/g,Uk=/^\[object .+?Constructor\]$/,Wk=/^(?:0|[1-9]\d*)$/,Hk=typeof Je=="object"&&Je&&Je.Object===Object&&Je,Vk=typeof self=="object"&&self&&self.Object===Object&&self,pu=Hk||Vk||Function("return this")();function zk(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Gk(e,t){var r=e?e.length:0;return!!r&&Yk(e,t,0)>-1}function Kk(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}function fb(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function hu(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function qk(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Yk(e,t,r){if(t!==t)return qk(e,Jk,r);for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function Jk(e){return e!==e}function Xk(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Zk(e){return function(t){return e(t)}}function Qk(e,t){return e.has(t)}function e4(e,t){return e==null?void 0:e[t]}function t4(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function db(e,t){return function(r){return e(t(r))}}var r4=Array.prototype,n4=Function.prototype,Cs=Object.prototype,gu=pu["__core-js_shared__"],pb=function(){var e=/[^.]+$/.exec(gu&&gu.keys&&gu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),hb=n4.toString,Po=Cs.hasOwnProperty,vu=Cs.toString,o4=RegExp("^"+hb.call(Po).replace(Rk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),gb=pu.Symbol,i4=db(Object.getPrototypeOf,Object),a4=Cs.propertyIsEnumerable,s4=r4.splice,vb=gb?gb.isConcatSpreadable:void 0,mu=Object.getOwnPropertySymbols,mb=Math.max,l4=yb(pu,"Map"),Di=yb(Object,"create");function Kn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function c4(){this.__data__=Di?Di(null):{}}function u4(e){return this.has(e)&&delete this.__data__[e]}function f4(e){var t=this.__data__;if(Di){var r=t[e];return r===du?void 0:r}return Po.call(t,e)?t[e]:void 0}function d4(e){var t=this.__data__;return Di?t[e]!==void 0:Po.call(t,e)}function p4(e,t){var r=this.__data__;return r[e]=Di&&t===void 0?du:t,this}Kn.prototype.clear=c4,Kn.prototype.delete=u4,Kn.prototype.get=f4,Kn.prototype.has=d4,Kn.prototype.set=p4;function ko(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function h4(){this.__data__=[]}function g4(e){var t=this.__data__,r=Os(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():s4.call(t,r,1),!0}function v4(e){var t=this.__data__,r=Os(t,e);return r<0?void 0:t[r][1]}function m4(e){return Os(this.__data__,e)>-1}function b4(e,t){var r=this.__data__,n=Os(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}ko.prototype.clear=h4,ko.prototype.delete=g4,ko.prototype.get=v4,ko.prototype.has=m4,ko.prototype.set=b4;function No(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function y4(){this.__data__={hash:new Kn,map:new(l4||ko),string:new Kn}}function w4(e){return Ts(this,e).delete(e)}function _4(e){return Ts(this,e).get(e)}function E4(e){return Ts(this,e).has(e)}function x4(e,t){return Ts(this,e).set(e,t),this}No.prototype.clear=y4,No.prototype.delete=w4,No.prototype.get=_4,No.prototype.has=E4,No.prototype.set=x4;function As(e){var t=-1,r=e?e.length:0;for(this.__data__=new No;++t<r;)this.add(e[t])}function S4(e){return this.__data__.set(e,du),this}function $4(e){return this.__data__.has(e)}As.prototype.add=As.prototype.push=S4,As.prototype.has=$4;function C4(e,t){var r=bu(e)||wb(e)?Xk(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Po.call(e,i))&&!(o&&(i=="length"||j4(i,n)))&&r.push(i);return r}function Os(e,t){for(var r=e.length;r--;)if(z4(e[r][0],t))return r;return-1}function A4(e,t,r,n){var o=-1,i=Gk,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=fb(t,Zk(r))),n?(i=Kk,a=!1):t.length>=Dk&&(i=Qk,a=!1,t=new As(t));e:for(;++o<s;){var f=e[o],d=r?r(f):f;if(f=n||f!==0?f:0,a&&d===d){for(var p=u;p--;)if(t[p]===d)continue e;l.push(f)}else i(t,d,n)||l.push(f)}return l}function bb(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=F4),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?bb(s,t-1,r,n,o):hu(o,s):n||(o[o.length]=s)}return o}function O4(e,t,r){var n=t(e);return bu(e)?n:hu(n,r(e))}function T4(e){if(!yu(e)||R4(e))return!1;var t=Eb(e)||t4(e)?o4:Uk;return t.test(V4(e))}function I4(e){if(!yu(e))return W4(e);var t=U4(e),r=[];for(var n in e)n=="constructor"&&(t||!Po.call(e,n))||r.push(n);return r}function P4(e,t){return e=Object(e),k4(e,t,function(r,n){return n in e})}function k4(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function N4(e,t){return t=mb(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=mb(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,zk(e,this,a)}}function D4(e){return O4(e,Y4,M4)}function Ts(e,t){var r=e.__data__;return B4(t)?r[typeof t=="string"?"string":"hash"]:r.map}function yb(e,t){var r=e4(e,t);return T4(r)?r:void 0}var L4=mu?db(mu,Object):Sb,M4=mu?function(e){for(var t=[];e;)hu(t,L4(e)),e=i4(e);return t}:Sb;function F4(e){return bu(e)||wb(e)||!!(vb&&e&&e[vb])}function j4(e,t){return t=t??ub,!!t&&(typeof e=="number"||Wk.test(e))&&e>-1&&e%1==0&&e<t}function B4(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function R4(e){return!!pb&&pb in e}function U4(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Cs;return e===r}function W4(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}function H4(e){if(typeof e=="string"||q4(e))return e;var t=e+"";return t=="0"&&1/e==-Lk?"-0":t}function V4(e){if(e!=null){try{return hb.call(e)}catch{}try{return e+""}catch{}}return""}function z4(e,t){return e===t||e!==e&&t!==t}function wb(e){return G4(e)&&Po.call(e,"callee")&&(!a4.call(e,"callee")||vu.call(e)==Mk)}var bu=Array.isArray;function _b(e){return e!=null&&K4(e.length)&&!Eb(e)}function G4(e){return xb(e)&&_b(e)}function Eb(e){var t=yu(e)?vu.call(e):"";return t==Fk||t==jk}function K4(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ub}function yu(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function xb(e){return!!e&&typeof e=="object"}function q4(e){return typeof e=="symbol"||xb(e)&&vu.call(e)==Bk}function Y4(e){return _b(e)?C4(e,!0):I4(e)}N4(function(e,t){return e==null?{}:(t=fb(bb(t,1),H4),P4(e,A4(D4(e),t)))});function Sb(){return[]}var J4=1/0,X4=9007199254740991,Z4="[object Arguments]",Q4="[object Function]",eN="[object GeneratorFunction]",tN="[object Symbol]",rN=typeof Je=="object"&&Je&&Je.Object===Object&&Je,nN=typeof self=="object"&&self&&self.Object===Object&&self,oN=rN||nN||Function("return this")();function iN(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function aN(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function sN(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var wu=Object.prototype,lN=wu.hasOwnProperty,_u=wu.toString,$b=oN.Symbol,cN=wu.propertyIsEnumerable,Cb=$b?$b.isConcatSpreadable:void 0,Ab=Math.max;function Ob(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=pN),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?Ob(s,t-1,r,n,o):sN(o,s):n||(o[o.length]=s)}return o}function uN(e,t){return e=Object(e),fN(e,t,function(r,n){return n in e})}function fN(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function dN(e,t){return t=Ab(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=Ab(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,iN(e,this,a)}}function pN(e){return vN(e)||gN(e)||!!(Cb&&e&&e[Cb])}function hN(e){if(typeof e=="string"||EN(e))return e;var t=e+"";return t=="0"&&1/e==-J4?"-0":t}function gN(e){return bN(e)&&lN.call(e,"callee")&&(!cN.call(e,"callee")||_u.call(e)==Z4)}var vN=Array.isArray;function mN(e){return e!=null&&wN(e.length)&&!yN(e)}function bN(e){return Tb(e)&&mN(e)}function yN(e){var t=_N(e)?_u.call(e):"";return t==Q4||t==eN}function wN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=X4}function _N(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Tb(e){return!!e&&typeof e=="object"}function EN(e){return typeof e=="symbol"||Tb(e)&&_u.call(e)==tN}dN(function(e,t){return e==null?{}:uN(e,aN(Ob(t,1),hN))});var xN=Object.create,Ib=Object.defineProperty,SN=Object.getOwnPropertyDescriptor,Pb=Object.getOwnPropertyNames,$N=Object.getPrototypeOf,CN=Object.prototype.hasOwnProperty,Ve=(e,t)=>function(){return t||(0,e[Pb(e)[0]])((t={exports:{}}).exports,t),t.exports},AN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Pb(t))!CN.call(e,o)&&o!==r&&Ib(e,o,{get:()=>t[o],enumerable:!(n=SN(t,o))||n.enumerable});return e},Li=(e,t,r)=>(r=e!=null?xN($N(e)):{},AN(t||!e||!e.__esModule?Ib(r,"default",{value:e,enumerable:!0}):r,e)),kb=Ve({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},o=Symbol("test"),i=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var a=42;n[o]=a;for(o in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var s=Object.getOwnPropertySymbols(n);if(s.length!==1||s[0]!==o||!Object.prototype.propertyIsEnumerable.call(n,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(n,o);if(l.value!==a||l.enumerable!==!0)return!1}return!0}}}),Mi=Ve({"node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(e,t){var r=kb();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),Nb=Ve({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=kb();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),Db=Ve({"node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js"(e,t){var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}}),ON=Ve({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,o=Math.max,i="[object Function]",a=function(f,d){for(var p=[],h=0;h<f.length;h+=1)p[h]=f[h];for(var g=0;g<d.length;g+=1)p[g+f.length]=d[g];return p},s=function(f,d){for(var p=[],h=d||0,g=0;h<f.length;h+=1,g+=1)p[g]=f[h];return p},l=function(u,f){for(var d="",p=0;p<u.length;p+=1)d+=u[p],p+1<u.length&&(d+=f);return d};t.exports=function(f){var d=this;if(typeof d!="function"||n.apply(d)!==i)throw new TypeError(r+d);for(var p=s(arguments,1),h,g=function(){if(this instanceof h){var E=d.apply(this,a(p,arguments));return Object(E)===E?E:this}return d.apply(f,a(p,arguments))},v=o(0,d.length-p.length),y=[],m=0;m<v;m++)y[m]="$"+m;if(h=Function("binder","return function ("+l(y,",")+"){ return binder.apply(this,arguments); }")(g),d.prototype){var w=function(){};w.prototype=d.prototype,h.prototype=new w,w.prototype=null}return h}}}),Eu=Ve({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(e,t){var r=ON();t.exports=Function.prototype.bind||r}}),TN=Ve({"node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,n=Object.prototype.hasOwnProperty,o=Eu();t.exports=o.call(r,n)}}),Do=Ve({"node_modules/.pnpm/get-intrinsic@1.2.2/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Nb()(),d=Db()(),p=Object.getPrototypeOf||(d?function(K){return K.__proto__}:null),h={},g=typeof Uint8Array>"u"||!p?r:p(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(K){y=p(p(K)),v["%Error.prototype%"]=y}var y,m=function K(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=K("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=K("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return v[Y]=te,te},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=Eu(),x=TN(),k=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),P=E.call(Function.call,RegExp.prototype.exec),F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=C(Y,0,1),oe=C(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,F,function(ae,ge,ce,q){le[le.length]=ce?S(q,D,"$1"):ge||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(v,oe)){var ae=v[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ge=ae.name,ce=ae.value,q=!1,H=ae.alias;H&&(le=H[0],I(oe,k([0,1],H)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],z=C(U,0,1),M=C(U,-1);if((z==='"'||z==="'"||z==="`"||M==='"'||M==="'"||M==="`")&&z!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(q=!0),le+="."+U,ge="%"+le+"%",x(v,ge))ce=v[ge];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!q&&(v[ge]=ce)}}return ce}}}),Lb=Ve({"node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js"(e,t){var r=Do(),n=r("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch{return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},t.exports=o}}),xu=Ve({"node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(e,t){var r=Do(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),IN=Ve({"node_modules/.pnpm/define-data-property@1.1.1/node_modules/define-data-property/index.js"(e,t){var r=Lb()(),n=Do(),o=r&&n("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch{o=!1}var i=n("%SyntaxError%"),a=n("%TypeError%"),s=xu();t.exports=function(u,f,d){if(!u||typeof u!="object"&&typeof u!="function")throw new a("`obj` must be an object or a function`");if(typeof f!="string"&&typeof f!="symbol")throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new a("`loose`, if provided, must be a boolean");var p=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,g=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,y=!!s&&s(u,f);if(o)o(u,f,{configurable:g===null&&y?y.configurable:!g,enumerable:p===null&&y?y.enumerable:!p,value:d,writable:h===null&&y?y.writable:!h});else if(v||!p&&!h&&!g)u[f]=d;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),PN=Ve({"node_modules/.pnpm/set-function-length@1.1.1/node_modules/set-function-length/index.js"(e,t){var r=Do(),n=IN(),o=Lb()(),i=xu(),a=r("%TypeError%"),s=r("%Math.floor%");t.exports=function(u,f){if(typeof u!="function")throw new a("`fn` is not a function");if(typeof f!="number"||f<0||f>4294967295||s(f)!==f)throw new a("`length` must be a positive 32-bit integer");var d=arguments.length>2&&!!arguments[2],p=!0,h=!0;if("length"in u&&i){var g=i(u,"length");g&&!g.configurable&&(p=!1),g&&!g.writable&&(h=!1)}return(p||h||!d)&&(o?n(u,"length",f,!0,!0):n(u,"length",f)),u}}}),Mb=Ve({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/index.js"(e,t){var r=Eu(),n=Do(),o=PN(),i=n("%TypeError%"),a=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||r.call(s,a),u=n("%Object.defineProperty%",!0),f=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}t.exports=function(h){if(typeof h!="function")throw new i("a function is required");var g=l(r,s,arguments);return o(g,1+f(0,h.length-(arguments.length-1)),!0)};var d=function(){return l(r,a,arguments)};u?u(t.exports,"apply",{value:d}):t.exports.apply=d}}),Fb=Ve({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/callBound.js"(e,t){var r=Do(),n=Mb(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),kN=Ve({"node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js"(e,t){var r=Mi()(),n=Fb(),o=n("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:o(u)==="[object Arguments]"},a=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&o(u)!=="[object Array]"&&o(u.callee)==="[object Function]"},s=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=s?i:a}}),NN=Ve({"node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js"(e,t){var r=Object.prototype.toString,n=Function.prototype.toString,o=/^\s*(?:function)?\*/,i=Mi()(),a=Object.getPrototypeOf,s=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch{}},l;t.exports=function(f){if(typeof f!="function")return!1;if(o.test(n.call(f)))return!0;if(!i){var d=r.call(f);return d==="[object GeneratorFunction]"}if(!a)return!1;if(typeof l>"u"){var p=s();l=p?a(p):!1}return a(f)===l}}}),DN=Ve({"node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js"(e,t){var r=Function.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(x){x!==i&&(n=null)}else n=null;var a=/^\s*class\b/,s=function(k){try{var I=r.call(k);return a.test(I)}catch{return!1}},l=function(k){try{return s(k)?!1:(r.call(k),!0)}catch{return!1}},u=Object.prototype.toString,f="[object Object]",d="[object Function]",p="[object GeneratorFunction]",h="[object HTMLAllCollection]",g="[object HTML document.all class]",v="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),w=function(){return!1};typeof document=="object"&&(E=document.all,u.call(E)===u.call(document.all)&&(w=function(k){if((m||!k)&&(typeof k>"u"||typeof k=="object"))try{var I=u.call(k);return(I===h||I===g||I===v||I===f)&&k("")==null}catch{}return!1}));var E;t.exports=n?function(k){if(w(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{n(k,null,o)}catch(I){if(I!==i)return!1}return!s(k)&&l(k)}:function(k){if(w(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(y)return l(k);if(s(k))return!1;var I=u.call(k);return I!==d&&I!==p&&!/^\[object HTML/.test(I)?!1:l(k)}}}),Su=Ve({"node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js"(e,t){var r=DN(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(f,d,p){for(var h=0,g=f.length;h<g;h++)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},a=function(f,d,p){for(var h=0,g=f.length;h<g;h++)p==null?d(f.charAt(h),h,f):d.call(p,f.charAt(h),h,f)},s=function(f,d,p){for(var h in f)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},l=function(f,d,p){if(!r(d))throw new TypeError("iterator must be a function");var h;arguments.length>=3&&(h=p),n.call(f)==="[object Array]"?i(f,d,h):typeof f=="string"?a(f,d,h):s(f,d,h)};t.exports=l}}),$u=Ve({"node_modules/.pnpm/available-typed-arrays@1.0.5/node_modules/available-typed-arrays/index.js"(e,t){var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var i=[],a=0;a<r.length;a++)typeof n[r[a]]=="function"&&(i[i.length]=r[a]);return i}}}),LN=Ve({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var l=this;if(typeof l!="function"||o.call(l)!==i)throw new TypeError(r+l);for(var u=n.call(arguments,1),f,d=function(){if(this instanceof f){var y=l.apply(this,u.concat(n.call(arguments)));return Object(y)===y?y:this}else return l.apply(s,u.concat(n.call(arguments)))},p=Math.max(0,l.length-u.length),h=[],g=0;g<p;g++)h.push("$"+g);if(f=Function("binder","return function ("+h.join(",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var v=function(){};v.prototype=l.prototype,f.prototype=new v,v.prototype=null}return f}}}),Cu=Ve({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(e,t){var r=LN();t.exports=Function.prototype.bind||r}}),MN=Ve({"node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(e,t){var r=Cu();t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)}}),Au=Ve({"node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Nb()(),d=Db()(),p=Object.getPrototypeOf||(d?function(K){return K.__proto__}:null),h={},g=typeof Uint8Array>"u"||!p?r:p(Uint8Array),v={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(K){y=p(p(K)),v["%Error.prototype%"]=y}var y,m=function K(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=K("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=K("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return v[Y]=te,te},w={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},E=Cu(),x=MN(),k=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),C=E.call(Function.call,String.prototype.slice),P=E.call(Function.call,RegExp.prototype.exec),F=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=C(Y,0,1),oe=C(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,F,function(ae,ge,ce,q){le[le.length]=ce?S(q,D,"$1"):ge||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(v,oe)){var ae=v[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ge=ae.name,ce=ae.value,q=!1,H=ae.alias;H&&(le=H[0],I(oe,k([0,1],H)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],z=C(U,0,1),M=C(U,-1);if((z==='"'||z==="'"||z==="`"||M==='"'||M==="'"||M==="`")&&z!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(q=!0),le+="."+U,ge="%"+le+"%",x(v,ge))ce=v[ge];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!q&&(v[ge]=ce)}}return ce}}}),FN=Ve({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(e,t){var r=Cu(),n=Au(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||r.call(i,o),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(p){var h=a(r,i,arguments);if(s&&l){var g=s(h,"length");g.configurable&&l(h,"length",{value:1+u(0,p.length-(arguments.length-1))})}return h};var f=function(){return a(r,o,arguments)};l?l(t.exports,"apply",{value:f}):t.exports.apply=f}}),jb=Ve({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(e,t){var r=Au(),n=FN(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),Bb=Ve({"node_modules/.pnpm/es-abstract@1.20.4/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js"(e,t){var r=Au(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),jN=Ve({"node_modules/.pnpm/which-typed-array@1.1.13/node_modules/which-typed-array/index.js"(e,t){var r=Su(),n=$u(),o=Mb(),i=Fb(),a=xu(),s=i("Object.prototype.toString"),l=Mi()(),u=typeof globalThis>"u"?global:globalThis,f=n(),d=i("String.prototype.slice"),p=Object.getPrototypeOf,h=i("Array.prototype.indexOf",!0)||function(w,E){for(var x=0;x<w.length;x+=1)if(w[x]===E)return x;return-1},g={__proto__:null};l&&a&&p?r(f,function(m){var w=new u[m];if(Symbol.toStringTag in w){var E=p(w),x=a(E,Symbol.toStringTag);if(!x){var k=p(E);x=a(k,Symbol.toStringTag)}g["$"+m]=o(x.get)}}):r(f,function(m){var w=new u[m],E=w.slice||w.set;E&&(g["$"+m]=o(E))});var v=function(w){var E=!1;return r(g,function(x,k){if(!E)try{"$"+x(w)===k&&(E=d(k,1))}catch{}}),E},y=function(w){var E=!1;return r(g,function(x,k){if(!E)try{x(w),E=d(k,1)}catch{}}),E};t.exports=function(w){if(!w||typeof w!="object")return!1;if(!l){var E=d(s(w),8,-1);return h(f,E)>-1?E:E!=="Object"?!1:y(w)}return a?v(w):null}}}),BN=Ve({"node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js"(e,t){var r=jN();t.exports=function(o){return!!r(o)}}}),RN=Ve({"node_modules/.pnpm/which-typed-array@1.1.8/node_modules/which-typed-array/index.js"(e,t){var r=Su(),n=$u(),o=jb(),i=o("Object.prototype.toString"),a=Mi()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("String.prototype.slice"),f={},d=Bb(),p=Object.getPrototypeOf;a&&d&&p&&r(l,function(v){if(typeof s[v]=="function"){var y=new s[v];if(Symbol.toStringTag in y){var m=p(y),w=d(m,Symbol.toStringTag);if(!w){var E=p(m);w=d(E,Symbol.toStringTag)}f[v]=w.get}}});var h=function(y){var m=!1;return r(f,function(w,E){if(!m)try{var x=w.call(y);x===E&&(m=x)}catch{}}),m},g=BN();t.exports=function(y){return g(y)?!a||!(Symbol.toStringTag in y)?u(i(y),8,-1):h(y):!1}}}),UN=Ve({"node_modules/.pnpm/is-typed-array@1.1.9/node_modules/is-typed-array/index.js"(e,t){var r=Su(),n=$u(),o=jb(),i=o("Object.prototype.toString"),a=Mi()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("Array.prototype.indexOf",!0)||function(y,m){for(var w=0;w<y.length;w+=1)if(y[w]===m)return w;return-1},f=o("String.prototype.slice"),d={},p=Bb(),h=Object.getPrototypeOf;a&&p&&h&&r(l,function(v){var y=new s[v];if(Symbol.toStringTag in y){var m=h(y),w=p(m,Symbol.toStringTag);if(!w){var E=h(m);w=p(E,Symbol.toStringTag)}d[v]=w.get}});var g=function(y){var m=!1;return r(d,function(w,E){if(!m)try{m=w.call(y)===E}catch{}}),m};t.exports=function(y){if(!y||typeof y!="object")return!1;if(!a||!(Symbol.toStringTag in y)){var m=f(i(y),8,-1);return u(l,m)>-1}return p?g(y):!1}}}),WN=Ve({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js"(e){var t=kN(),r=NN(),n=RN(),o=UN();function i(ie){return ie.call.bind(ie)}var a=typeof BigInt<"u",s=typeof Symbol<"u",l=i(Object.prototype.toString),u=i(Number.prototype.valueOf),f=i(String.prototype.valueOf),d=i(Boolean.prototype.valueOf);a&&(p=i(BigInt.prototype.valueOf));var p;s&&(h=i(Symbol.prototype.valueOf));var h;function g(ie,Ne){if(typeof ie!="object")return!1;try{return Ne(ie),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function v(ie){return typeof Promise<"u"&&ie instanceof Promise||ie!==null&&typeof ie=="object"&&typeof ie.then=="function"&&typeof ie.catch=="function"}e.isPromise=v;function y(ie){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ie):o(ie)||H(ie)}e.isArrayBufferView=y;function m(ie){return n(ie)==="Uint8Array"}e.isUint8Array=m;function w(ie){return n(ie)==="Uint8ClampedArray"}e.isUint8ClampedArray=w;function E(ie){return n(ie)==="Uint16Array"}e.isUint16Array=E;function x(ie){return n(ie)==="Uint32Array"}e.isUint32Array=x;function k(ie){return n(ie)==="Int8Array"}e.isInt8Array=k;function I(ie){return n(ie)==="Int16Array"}e.isInt16Array=I;function S(ie){return n(ie)==="Int32Array"}e.isInt32Array=S;function C(ie){return n(ie)==="Float32Array"}e.isFloat32Array=C;function P(ie){return n(ie)==="Float64Array"}e.isFloat64Array=P;function F(ie){return n(ie)==="BigInt64Array"}e.isBigInt64Array=F;function D(ie){return n(ie)==="BigUint64Array"}e.isBigUint64Array=D;function N(ie){return l(ie)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function J(ie){return typeof Map>"u"?!1:N.working?N(ie):ie instanceof Map}e.isMap=J;function K(ie){return l(ie)==="[object Set]"}K.working=typeof Set<"u"&&K(new Set);function Y(ie){return typeof Set>"u"?!1:K.working?K(ie):ie instanceof Set}e.isSet=Y;function te(ie){return l(ie)==="[object WeakMap]"}te.working=typeof WeakMap<"u"&&te(new WeakMap);function oe(ie){return typeof WeakMap>"u"?!1:te.working?te(ie):ie instanceof WeakMap}e.isWeakMap=oe;function le(ie){return l(ie)==="[object WeakSet]"}le.working=typeof WeakSet<"u"&&le(new WeakSet);function ae(ie){return le(ie)}e.isWeakSet=ae;function ge(ie){return l(ie)==="[object ArrayBuffer]"}ge.working=typeof ArrayBuffer<"u"&&ge(new ArrayBuffer);function ce(ie){return typeof ArrayBuffer>"u"?!1:ge.working?ge(ie):ie instanceof ArrayBuffer}e.isArrayBuffer=ce;function q(ie){return l(ie)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function H(ie){return typeof DataView>"u"?!1:q.working?q(ie):ie instanceof DataView}e.isDataView=H;var re=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(ie){return l(ie)==="[object SharedArrayBuffer]"}function U(ie){return typeof re>"u"?!1:(typeof de.working>"u"&&(de.working=de(new re)),de.working?de(ie):ie instanceof re)}e.isSharedArrayBuffer=U;function z(ie){return l(ie)==="[object AsyncFunction]"}e.isAsyncFunction=z;function M(ie){return l(ie)==="[object Map Iterator]"}e.isMapIterator=M;function R(ie){return l(ie)==="[object Set Iterator]"}e.isSetIterator=R;function G(ie){return l(ie)==="[object Generator]"}e.isGeneratorObject=G;function O(ie){return l(ie)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=O;function T(ie){return g(ie,u)}e.isNumberObject=T;function Z(ie){return g(ie,f)}e.isStringObject=Z;function ne(ie){return g(ie,d)}e.isBooleanObject=ne;function pe(ie){return a&&g(ie,p)}e.isBigIntObject=pe;function me(ie){return s&&g(ie,h)}e.isSymbolObject=me;function Ee(ie){return T(ie)||Z(ie)||ne(ie)||pe(ie)||me(ie)}e.isBoxedPrimitive=Ee;function _e(ie){return typeof Uint8Array<"u"&&(ce(ie)||U(ie))}e.isAnyArrayBuffer=_e,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ie){Object.defineProperty(e,ie,{enumerable:!1,value:function(){throw new Error(ie+" is not supported in userland")}})})}}),HN=Ve({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}}}),VN=Ve({"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=function(n,o){o&&(n.super_=o,n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,o){if(o){n.super_=o;var i=function(){};i.prototype=o.prototype,n.prototype=new i,n.prototype.constructor=n}}}}),Rb=Ve({"node_modules/.pnpm/util@0.12.5/node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(H){for(var re=Object.keys(H),de={},U=0;U<re.length;U++)de[re[U]]=Object.getOwnPropertyDescriptor(H,re[U]);return de},r=/%[sdj%]/g;e.format=function(q){if(!k(q)){for(var H=[],re=0;re<arguments.length;re++)H.push(a(arguments[re]));return H.join(" ")}for(var re=1,de=arguments,U=de.length,z=String(q).replace(r,function(R){if(R==="%%")return"%";if(re>=U)return R;switch(R){case"%s":return String(de[re++]);case"%d":return Number(de[re++]);case"%j":try{return JSON.stringify(de[re++])}catch{return"[Circular]"}default:return R}}),M=de[re];re<U;M=de[++re])w(M)||!P(M)?z+=" "+M:z+=" "+a(M);return z},e.deprecate=function(q,H){if(typeof process<"u"&&process.noDeprecation===!0)return q;if(typeof process>"u")return function(){return e.deprecate(q,H).apply(this,arguments)};var re=!1;function de(){if(!re){if(process.throwDeprecation)throw new Error(H);process.traceDeprecation?console.trace(H):console.error(H),re=!0}return q.apply(this,arguments)}return de};var n={},o=/^$/;process.env.NODE_DEBUG&&(i=process.env.NODE_DEBUG,i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+i+"$","i"));var i;e.debuglog=function(q){if(q=q.toUpperCase(),!n[q])if(o.test(q)){var H=process.pid;n[q]=function(){var re=e.format.apply(e,arguments);console.error("%s %d: %s",q,H,re)}}else n[q]=function(){};return n[q]};function a(q,H){var re={seen:[],stylize:l};return arguments.length>=3&&(re.depth=arguments[2]),arguments.length>=4&&(re.colors=arguments[3]),m(H)?re.showHidden=H:H&&e._extend(re,H),S(re.showHidden)&&(re.showHidden=!1),S(re.depth)&&(re.depth=2),S(re.colors)&&(re.colors=!1),S(re.customInspect)&&(re.customInspect=!0),re.colors&&(re.stylize=s),f(re,q,re.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(q,H){var re=a.styles[H];return re?"\x1B["+a.colors[re][0]+"m"+q+"\x1B["+a.colors[re][1]+"m":q}function l(q,H){return q}function u(q){var H={};return q.forEach(function(re,de){H[re]=!0}),H}function f(q,H,re){if(q.customInspect&&H&&N(H.inspect)&&H.inspect!==e.inspect&&!(H.constructor&&H.constructor.prototype===H)){var de=H.inspect(re,q);return k(de)||(de=f(q,de,re)),de}var U=d(q,H);if(U)return U;var z=Object.keys(H),M=u(z);if(q.showHidden&&(z=Object.getOwnPropertyNames(H)),D(H)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return p(H);if(z.length===0){if(N(H)){var R=H.name?": "+H.name:"";return q.stylize("[Function"+R+"]","special")}if(C(H))return q.stylize(RegExp.prototype.toString.call(H),"regexp");if(F(H))return q.stylize(Date.prototype.toString.call(H),"date");if(D(H))return p(H)}var G="",O=!1,T=["{","}"];if(y(H)&&(O=!0,T=["[","]"]),N(H)){var Z=H.name?": "+H.name:"";G=" [Function"+Z+"]"}if(C(H)&&(G=" "+RegExp.prototype.toString.call(H)),F(H)&&(G=" "+Date.prototype.toUTCString.call(H)),D(H)&&(G=" "+p(H)),z.length===0&&(!O||H.length==0))return T[0]+G+T[1];if(re<0)return C(H)?q.stylize(RegExp.prototype.toString.call(H),"regexp"):q.stylize("[Object]","special");q.seen.push(H);var ne;return O?ne=h(q,H,re,M,z):ne=z.map(function(pe){return g(q,H,re,M,pe,O)}),q.seen.pop(),v(ne,G,T)}function d(q,H){if(S(H))return q.stylize("undefined","undefined");if(k(H)){var re="'"+JSON.stringify(H).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(re,"string")}if(x(H))return q.stylize(""+H,"number");if(m(H))return q.stylize(""+H,"boolean");if(w(H))return q.stylize("null","null")}function p(q){return"["+Error.prototype.toString.call(q)+"]"}function h(q,H,re,de,U){for(var z=[],M=0,R=H.length;M<R;++M)le(H,String(M))?z.push(g(q,H,re,de,String(M),!0)):z.push("");return U.forEach(function(G){G.match(/^\d+$/)||z.push(g(q,H,re,de,G,!0))}),z}function g(q,H,re,de,U,z){var M,R,G;if(G=Object.getOwnPropertyDescriptor(H,U)||{value:H[U]},G.get?G.set?R=q.stylize("[Getter/Setter]","special"):R=q.stylize("[Getter]","special"):G.set&&(R=q.stylize("[Setter]","special")),le(de,U)||(M="["+U+"]"),R||(q.seen.indexOf(G.value)<0?(w(re)?R=f(q,G.value,null):R=f(q,G.value,re-1),R.indexOf(`
92
92
  `)>-1&&(z?R=R.split(`
93
93
  `).map(function(O){return" "+O}).join(`
94
94
  `).slice(2):R=`
@@ -97,64 +97,64 @@ Check the top-level render call using <`+_e+">.")}return fe}}function Zo(V,fe){{
97
97
  `))):R=q.stylize("[Circular]","special")),S(M)){if(z&&U.match(/^\d+$/))return R;M=JSON.stringify(""+U),M.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(M=M.slice(1,-1),M=q.stylize(M,"name")):(M=M.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),M=q.stylize(M,"string"))}return M+": "+R}function v(q,H,re){var de=q.reduce(function(U,z){return z.indexOf(`
98
98
  `)>=0,U+z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return de>60?re[0]+(H===""?"":H+`
99
99
  `)+" "+q.join(`,
100
- `)+" "+re[1]:re[0]+H+" "+q.join(", ")+" "+re[1]}e.types=RN();function y(q){return Array.isArray(q)}e.isArray=y;function m(q){return typeof q=="boolean"}e.isBoolean=m;function w(q){return q===null}e.isNull=w;function E(q){return q==null}e.isNullOrUndefined=E;function x(q){return typeof q=="number"}e.isNumber=x;function k(q){return typeof q=="string"}e.isString=k;function I(q){return typeof q=="symbol"}e.isSymbol=I;function S(q){return q===void 0}e.isUndefined=S;function C(q){return P(q)&&K(q)==="[object RegExp]"}e.isRegExp=C,e.types.isRegExp=C;function P(q){return typeof q=="object"&&q!==null}e.isObject=P;function F(q){return P(q)&&K(q)==="[object Date]"}e.isDate=F,e.types.isDate=F;function D(q){return P(q)&&(K(q)==="[object Error]"||q instanceof Error)}e.isError=D,e.types.isNativeError=D;function N(q){return typeof q=="function"}e.isFunction=N;function J(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}e.isPrimitive=J,e.isBuffer=UN();function K(q){return Object.prototype.toString.call(q)}function Y(q){return q<10?"0"+q.toString(10):q.toString(10)}var te=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function oe(){var q=new Date,H=[Y(q.getHours()),Y(q.getMinutes()),Y(q.getSeconds())].join(":");return[q.getDate(),te[q.getMonth()],H].join(" ")}e.log=function(){console.log("%s - %s",oe(),e.format.apply(e,arguments))},e.inherits=WN(),e._extend=function(q,H){if(!H||!P(H))return q;for(var re=Object.keys(H),de=re.length;de--;)q[re[de]]=H[re[de]];return q};function le(q,H){return Object.prototype.hasOwnProperty.call(q,H)}var ae=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(H){if(typeof H!="function")throw new TypeError('The "original" argument must be of type Function');if(ae&&H[ae]){var re=H[ae];if(typeof re!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(re,ae,{value:re,enumerable:!1,writable:!1,configurable:!0}),re}function re(){for(var de,U,z=new Promise(function(G,O){de=G,U=O}),M=[],R=0;R<arguments.length;R++)M.push(arguments[R]);M.push(function(G,O){G?U(G):de(O)});try{H.apply(this,M)}catch(G){U(G)}return z}return Object.setPrototypeOf(re,Object.getPrototypeOf(H)),ae&&Object.defineProperty(re,ae,{value:re,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(re,t(H))},e.promisify.custom=ae;function ge(q,H){if(!q){var re=new Error("Promise was rejected with a falsy value");re.reason=q,q=re}return H(q)}function ce(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');function H(){for(var re=[],de=0;de<arguments.length;de++)re.push(arguments[de]);var U=re.pop();if(typeof U!="function")throw new TypeError("The last argument must be of type Function");var z=this,M=function(){return U.apply(z,arguments)};q.apply(this,re).then(function(R){process.nextTick(M.bind(null,null,R))},function(R){process.nextTick(ge.bind(null,R,M))})}return Object.setPrototypeOf(H,Object.getPrototypeOf(q)),Object.defineProperties(H,t(q)),H}e.callbackify=ce}});function HN(e,...t){t.length>0?queueMicrotask(()=>e(...t)):queueMicrotask(e)}var VN="browser",zN="browser",GN=!0,KN={},qN=[],YN="",JN={},XN={},ZN={};function Kn(){}var QN=Kn,e8=Kn,t8=Kn,r8=Kn,n8=Kn,o8=Kn,i8=Kn;function a8(e){throw new Error("process.binding is not supported")}function s8(){return"/"}function l8(e){throw new Error("process.chdir is not supported")}function c8(){return 0}var Do=globalThis.performance||{},u8=Do.now||Do.mozNow||Do.msNow||Do.oNow||Do.webkitNow||function(){return new Date().getTime()};function f8(e){var t=u8.call(Do)*.001,r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r=r-e[0],n=n-e[1],n<0&&(r--,n+=1e9)),[r,n]}var d8=new Date;function p8(){var e=new Date,t=e-d8;return t/1e3}var Ts={nextTick:HN,title:VN,browser:GN,env:KN,argv:qN,version:YN,versions:JN,on:QN,addListener:e8,once:t8,off:r8,removeListener:n8,removeAllListeners:o8,emit:i8,binding:a8,cwd:s8,chdir:l8,umask:c8,hrtime:f8,platform:zN,release:XN,config:ZN,uptime:p8},Bb={};Object.keys(Bb).forEach(e=>{const t=e.split(".");let r=Ts;for(let n=0;n<t.length;n++){const o=t[n];n===t.length-1?r[o]=Bb[e]:r=r[o]||(r[o]={})}});var Qt={},Is={};Is.byteLength=v8,Is.toByteArray=b8,Is.fromByteArray=_8;for(var Rr=[],cr=[],h8=typeof Uint8Array<"u"?Uint8Array:Array,Au="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lo=0,g8=Au.length;Lo<g8;++Lo)Rr[Lo]=Au[Lo],cr[Au.charCodeAt(Lo)]=Lo;cr[45]=62,cr[95]=63;function Rb(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function v8(e){var t=Rb(e),r=t[0],n=t[1];return(r+n)*3/4-n}function m8(e,t,r){return(t+r)*3/4-r}function b8(e){var t,r=Rb(e),n=r[0],o=r[1],i=new h8(m8(e,n,o)),a=0,s=o>0?n-4:n,l;for(l=0;l<s;l+=4)t=cr[e.charCodeAt(l)]<<18|cr[e.charCodeAt(l+1)]<<12|cr[e.charCodeAt(l+2)]<<6|cr[e.charCodeAt(l+3)],i[a++]=t>>16&255,i[a++]=t>>8&255,i[a++]=t&255;return o===2&&(t=cr[e.charCodeAt(l)]<<2|cr[e.charCodeAt(l+1)]>>4,i[a++]=t&255),o===1&&(t=cr[e.charCodeAt(l)]<<10|cr[e.charCodeAt(l+1)]<<4|cr[e.charCodeAt(l+2)]>>2,i[a++]=t>>8&255,i[a++]=t&255),i}function y8(e){return Rr[e>>18&63]+Rr[e>>12&63]+Rr[e>>6&63]+Rr[e&63]}function w8(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),o.push(y8(n));return o.join("")}function _8(e){for(var t,r=e.length,n=r%3,o=[],i=16383,a=0,s=r-n;a<s;a+=i)o.push(w8(e,a,a+i>s?s:a+i));return n===1?(t=e[r-1],o.push(Rr[t>>2]+Rr[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(Rr[t>>10]+Rr[t>>4&63]+Rr[t<<2&63]+"=")),o.join("")}var Ou={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ou.read=function(e,t,r,n,o){var i,a,s=o*8-n-1,l=(1<<s)-1,u=l>>1,f=-7,d=r?o-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=i*256+e[t+d],d+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=a*256+e[t+d],d+=p,f-=8);if(i===0)i=1-u;else{if(i===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-u}return(h?-1:1)*a*Math.pow(2,i-n)},Ou.write=function(e,t,r,n,o,i){var a,s,l,u=i*8-o-1,f=(1<<u)-1,d=f>>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,g=n?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=p/l:t+=p*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=f?(s=0,a=f):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a=a+d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=s&255,h+=g,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[r+h]=a&255,h+=g,a/=256,u-=8);e[r+h-g]|=v*128};/*!
100
+ `)+" "+re[1]:re[0]+H+" "+q.join(", ")+" "+re[1]}e.types=WN();function y(q){return Array.isArray(q)}e.isArray=y;function m(q){return typeof q=="boolean"}e.isBoolean=m;function w(q){return q===null}e.isNull=w;function E(q){return q==null}e.isNullOrUndefined=E;function x(q){return typeof q=="number"}e.isNumber=x;function k(q){return typeof q=="string"}e.isString=k;function I(q){return typeof q=="symbol"}e.isSymbol=I;function S(q){return q===void 0}e.isUndefined=S;function C(q){return P(q)&&K(q)==="[object RegExp]"}e.isRegExp=C,e.types.isRegExp=C;function P(q){return typeof q=="object"&&q!==null}e.isObject=P;function F(q){return P(q)&&K(q)==="[object Date]"}e.isDate=F,e.types.isDate=F;function D(q){return P(q)&&(K(q)==="[object Error]"||q instanceof Error)}e.isError=D,e.types.isNativeError=D;function N(q){return typeof q=="function"}e.isFunction=N;function J(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}e.isPrimitive=J,e.isBuffer=HN();function K(q){return Object.prototype.toString.call(q)}function Y(q){return q<10?"0"+q.toString(10):q.toString(10)}var te=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function oe(){var q=new Date,H=[Y(q.getHours()),Y(q.getMinutes()),Y(q.getSeconds())].join(":");return[q.getDate(),te[q.getMonth()],H].join(" ")}e.log=function(){console.log("%s - %s",oe(),e.format.apply(e,arguments))},e.inherits=VN(),e._extend=function(q,H){if(!H||!P(H))return q;for(var re=Object.keys(H),de=re.length;de--;)q[re[de]]=H[re[de]];return q};function le(q,H){return Object.prototype.hasOwnProperty.call(q,H)}var ae=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(H){if(typeof H!="function")throw new TypeError('The "original" argument must be of type Function');if(ae&&H[ae]){var re=H[ae];if(typeof re!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(re,ae,{value:re,enumerable:!1,writable:!1,configurable:!0}),re}function re(){for(var de,U,z=new Promise(function(G,O){de=G,U=O}),M=[],R=0;R<arguments.length;R++)M.push(arguments[R]);M.push(function(G,O){G?U(G):de(O)});try{H.apply(this,M)}catch(G){U(G)}return z}return Object.setPrototypeOf(re,Object.getPrototypeOf(H)),ae&&Object.defineProperty(re,ae,{value:re,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(re,t(H))},e.promisify.custom=ae;function ge(q,H){if(!q){var re=new Error("Promise was rejected with a falsy value");re.reason=q,q=re}return H(q)}function ce(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');function H(){for(var re=[],de=0;de<arguments.length;de++)re.push(arguments[de]);var U=re.pop();if(typeof U!="function")throw new TypeError("The last argument must be of type Function");var z=this,M=function(){return U.apply(z,arguments)};q.apply(this,re).then(function(R){process.nextTick(M.bind(null,null,R))},function(R){process.nextTick(ge.bind(null,R,M))})}return Object.setPrototypeOf(H,Object.getPrototypeOf(q)),Object.defineProperties(H,t(q)),H}e.callbackify=ce}});function zN(e,...t){t.length>0?queueMicrotask(()=>e(...t)):queueMicrotask(e)}var GN="browser",KN="browser",qN=!0,YN={},JN=[],XN="",ZN={},QN={},e8={};function qn(){}var t8=qn,r8=qn,n8=qn,o8=qn,i8=qn,a8=qn,s8=qn;function l8(e){throw new Error("process.binding is not supported")}function c8(){return"/"}function u8(e){throw new Error("process.chdir is not supported")}function f8(){return 0}var Lo=globalThis.performance||{},d8=Lo.now||Lo.mozNow||Lo.msNow||Lo.oNow||Lo.webkitNow||function(){return new Date().getTime()};function p8(e){var t=d8.call(Lo)*.001,r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r=r-e[0],n=n-e[1],n<0&&(r--,n+=1e9)),[r,n]}var h8=new Date;function g8(){var e=new Date,t=e-h8;return t/1e3}var Is={nextTick:zN,title:GN,browser:qN,env:YN,argv:JN,version:XN,versions:ZN,on:t8,addListener:r8,once:n8,off:o8,removeListener:i8,removeAllListeners:a8,emit:s8,binding:l8,cwd:c8,chdir:u8,umask:f8,hrtime:p8,platform:KN,release:QN,config:e8,uptime:g8},Ub={};Object.keys(Ub).forEach(e=>{const t=e.split(".");let r=Is;for(let n=0;n<t.length;n++){const o=t[n];n===t.length-1?r[o]=Ub[e]:r=r[o]||(r[o]={})}});var er={},Ps={};Ps.byteLength=b8,Ps.toByteArray=w8,Ps.fromByteArray=x8;for(var Ur=[],ur=[],v8=typeof Uint8Array<"u"?Uint8Array:Array,Ou="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mo=0,m8=Ou.length;Mo<m8;++Mo)Ur[Mo]=Ou[Mo],ur[Ou.charCodeAt(Mo)]=Mo;ur[45]=62,ur[95]=63;function Wb(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function b8(e){var t=Wb(e),r=t[0],n=t[1];return(r+n)*3/4-n}function y8(e,t,r){return(t+r)*3/4-r}function w8(e){var t,r=Wb(e),n=r[0],o=r[1],i=new v8(y8(e,n,o)),a=0,s=o>0?n-4:n,l;for(l=0;l<s;l+=4)t=ur[e.charCodeAt(l)]<<18|ur[e.charCodeAt(l+1)]<<12|ur[e.charCodeAt(l+2)]<<6|ur[e.charCodeAt(l+3)],i[a++]=t>>16&255,i[a++]=t>>8&255,i[a++]=t&255;return o===2&&(t=ur[e.charCodeAt(l)]<<2|ur[e.charCodeAt(l+1)]>>4,i[a++]=t&255),o===1&&(t=ur[e.charCodeAt(l)]<<10|ur[e.charCodeAt(l+1)]<<4|ur[e.charCodeAt(l+2)]>>2,i[a++]=t>>8&255,i[a++]=t&255),i}function _8(e){return Ur[e>>18&63]+Ur[e>>12&63]+Ur[e>>6&63]+Ur[e&63]}function E8(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),o.push(_8(n));return o.join("")}function x8(e){for(var t,r=e.length,n=r%3,o=[],i=16383,a=0,s=r-n;a<s;a+=i)o.push(E8(e,a,a+i>s?s:a+i));return n===1?(t=e[r-1],o.push(Ur[t>>2]+Ur[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(Ur[t>>10]+Ur[t>>4&63]+Ur[t<<2&63]+"=")),o.join("")}var Tu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Tu.read=function(e,t,r,n,o){var i,a,s=o*8-n-1,l=(1<<s)-1,u=l>>1,f=-7,d=r?o-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=i*256+e[t+d],d+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=a*256+e[t+d],d+=p,f-=8);if(i===0)i=1-u;else{if(i===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-u}return(h?-1:1)*a*Math.pow(2,i-n)},Tu.write=function(e,t,r,n,o,i){var a,s,l,u=i*8-o-1,f=(1<<u)-1,d=f>>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,g=n?1:-1,v=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=p/l:t+=p*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=f?(s=0,a=f):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a=a+d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=s&255,h+=g,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[r+h]=a&255,h+=g,a/=256,u-=8);e[r+h-g]|=v*128};/*!
101
101
  * The buffer module from node.js, for the browser.
102
102
  *
103
103
  * @author Feross Aboukhadijeh <https://feross.org>
104
104
  * @license MIT
105
- */(function(e){const t=Is,r=Ou,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=w,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const A=new Uint8Array(1),b={foo:function(){return 42}};return Object.setPrototypeOf(b,Uint8Array.prototype),Object.setPrototypeOf(A,b),A.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(A){if(A>o)throw new RangeError('The value "'+A+'" is invalid for option "size"');const b=new Uint8Array(A);return Object.setPrototypeOf(b,s.prototype),b}function s(A,b,_){if(typeof A=="number"){if(typeof b=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(A)}return l(A,b,_)}s.poolSize=8192;function l(A,b,_){if(typeof A=="string")return p(A,b);if(ArrayBuffer.isView(A))return g(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(Te(A,ArrayBuffer)||A&&Te(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Te(A,SharedArrayBuffer)||A&&Te(A.buffer,SharedArrayBuffer)))return v(A,b,_);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const L=A.valueOf&&A.valueOf();if(L!=null&&L!==A)return s.from(L,b,_);const W=y(A);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return s.from(A[Symbol.toPrimitive]("string"),b,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}s.from=function(A,b,_){return l(A,b,_)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function f(A,b,_){return u(A),A<=0?a(A):b!==void 0?typeof _=="string"?a(A).fill(b,_):a(A).fill(b):a(A)}s.alloc=function(A,b,_){return f(A,b,_)};function d(A){return u(A),a(A<0?0:m(A)|0)}s.allocUnsafe=function(A){return d(A)},s.allocUnsafeSlow=function(A){return d(A)};function p(A,b){if((typeof b!="string"||b==="")&&(b="utf8"),!s.isEncoding(b))throw new TypeError("Unknown encoding: "+b);const _=E(A,b)|0;let L=a(_);const W=L.write(A,b);return W!==_&&(L=L.slice(0,W)),L}function h(A){const b=A.length<0?0:m(A.length)|0,_=a(b);for(let L=0;L<b;L+=1)_[L]=A[L]&255;return _}function g(A){if(Te(A,Uint8Array)){const b=new Uint8Array(A);return v(b.buffer,b.byteOffset,b.byteLength)}return h(A)}function v(A,b,_){if(b<0||A.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(A.byteLength<b+(_||0))throw new RangeError('"length" is outside of buffer bounds');let L;return b===void 0&&_===void 0?L=new Uint8Array(A):_===void 0?L=new Uint8Array(A,b):L=new Uint8Array(A,b,_),Object.setPrototypeOf(L,s.prototype),L}function y(A){if(s.isBuffer(A)){const b=m(A.length)|0,_=a(b);return _.length===0||A.copy(_,0,0,b),_}if(A.length!==void 0)return typeof A.length!="number"||Me(A.length)?a(0):h(A);if(A.type==="Buffer"&&Array.isArray(A.data))return h(A.data)}function m(A){if(A>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return A|0}function w(A){return+A!=A&&(A=0),s.alloc(+A)}s.isBuffer=function(b){return b!=null&&b._isBuffer===!0&&b!==s.prototype},s.compare=function(b,_){if(Te(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),Te(_,Uint8Array)&&(_=s.from(_,_.offset,_.byteLength)),!s.isBuffer(b)||!s.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(b===_)return 0;let L=b.length,W=_.length;for(let X=0,se=Math.min(L,W);X<se;++X)if(b[X]!==_[X]){L=b[X],W=_[X];break}return L<W?-1:W<L?1:0},s.isEncoding=function(b){switch(String(b).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}},s.concat=function(b,_){if(!Array.isArray(b))throw new TypeError('"list" argument must be an Array of Buffers');if(b.length===0)return s.alloc(0);let L;if(_===void 0)for(_=0,L=0;L<b.length;++L)_+=b[L].length;const W=s.allocUnsafe(_);let X=0;for(L=0;L<b.length;++L){let se=b[L];if(Te(se,Uint8Array))X+se.length>W.length?(s.isBuffer(se)||(se=s.from(se)),se.copy(W,X)):Uint8Array.prototype.set.call(W,se,X);else if(s.isBuffer(se))se.copy(W,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=se.length}return W};function E(A,b){if(s.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||Te(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);const _=A.length,L=arguments.length>2&&arguments[2]===!0;if(!L&&_===0)return 0;let W=!1;for(;;)switch(b){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return xe(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Ne(A).length;default:if(W)return L?-1:xe(A).length;b=(""+b).toLowerCase(),W=!0}}s.byteLength=E;function x(A,b,_){let L=!1;if((b===void 0||b<0)&&(b=0),b>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,b>>>=0,_<=b))return"";for(A||(A="utf8");;)switch(A){case"hex":return ae(this,b,_);case"utf8":case"utf-8":return K(this,b,_);case"ascii":return oe(this,b,_);case"latin1":case"binary":return le(this,b,_);case"base64":return J(this,b,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,b,_);default:if(L)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),L=!0}}s.prototype._isBuffer=!0;function k(A,b,_){const L=A[b];A[b]=A[_],A[_]=L}s.prototype.swap16=function(){const b=this.length;if(b%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;_<b;_+=2)k(this,_,_+1);return this},s.prototype.swap32=function(){const b=this.length;if(b%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let _=0;_<b;_+=4)k(this,_,_+3),k(this,_+1,_+2);return this},s.prototype.swap64=function(){const b=this.length;if(b%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let _=0;_<b;_+=8)k(this,_,_+7),k(this,_+1,_+6),k(this,_+2,_+5),k(this,_+3,_+4);return this},s.prototype.toString=function(){const b=this.length;return b===0?"":arguments.length===0?K(this,0,b):x.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(b){if(!s.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:s.compare(this,b)===0},s.prototype.inspect=function(){let b="";const _=e.INSPECT_MAX_BYTES;return b=this.toString("hex",0,_).replace(/(.{2})/g,"$1 ").trim(),this.length>_&&(b+=" ... "),"<Buffer "+b+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(b,_,L,W,X){if(Te(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),!s.isBuffer(b))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof b);if(_===void 0&&(_=0),L===void 0&&(L=b?b.length:0),W===void 0&&(W=0),X===void 0&&(X=this.length),_<0||L>b.length||W<0||X>this.length)throw new RangeError("out of range index");if(W>=X&&_>=L)return 0;if(W>=X)return-1;if(_>=L)return 1;if(_>>>=0,L>>>=0,W>>>=0,X>>>=0,this===b)return 0;let se=X-W,Pe=L-_;const ot=Math.min(se,Pe),Le=this.slice(W,X),Je=b.slice(_,L);for(let Ze=0;Ze<ot;++Ze)if(Le[Ze]!==Je[Ze]){se=Le[Ze],Pe=Je[Ze];break}return se<Pe?-1:Pe<se?1:0};function I(A,b,_,L,W){if(A.length===0)return-1;if(typeof _=="string"?(L=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Me(_)&&(_=W?0:A.length-1),_<0&&(_=A.length+_),_>=A.length){if(W)return-1;_=A.length-1}else if(_<0)if(W)_=0;else return-1;if(typeof b=="string"&&(b=s.from(b,L)),s.isBuffer(b))return b.length===0?-1:S(A,b,_,L,W);if(typeof b=="number")return b=b&255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(A,b,_):Uint8Array.prototype.lastIndexOf.call(A,b,_):S(A,[b],_,L,W);throw new TypeError("val must be string, number or Buffer")}function S(A,b,_,L,W){let X=1,se=A.length,Pe=b.length;if(L!==void 0&&(L=String(L).toLowerCase(),L==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(A.length<2||b.length<2)return-1;X=2,se/=2,Pe/=2,_/=2}function ot(Je,Ze){return X===1?Je[Ze]:Je.readUInt16BE(Ze*X)}let Le;if(W){let Je=-1;for(Le=_;Le<se;Le++)if(ot(A,Le)===ot(b,Je===-1?0:Le-Je)){if(Je===-1&&(Je=Le),Le-Je+1===Pe)return Je*X}else Je!==-1&&(Le-=Le-Je),Je=-1}else for(_+Pe>se&&(_=se-Pe),Le=_;Le>=0;Le--){let Je=!0;for(let Ze=0;Ze<Pe;Ze++)if(ot(A,Le+Ze)!==ot(b,Ze)){Je=!1;break}if(Je)return Le}return-1}s.prototype.includes=function(b,_,L){return this.indexOf(b,_,L)!==-1},s.prototype.indexOf=function(b,_,L){return I(this,b,_,L,!0)},s.prototype.lastIndexOf=function(b,_,L){return I(this,b,_,L,!1)};function C(A,b,_,L){_=Number(_)||0;const W=A.length-_;L?(L=Number(L),L>W&&(L=W)):L=W;const X=b.length;L>X/2&&(L=X/2);let se;for(se=0;se<L;++se){const Pe=parseInt(b.substr(se*2,2),16);if(Me(Pe))return se;A[_+se]=Pe}return se}function P(A,b,_,L){return dt(xe(b,A.length-_),A,_,L)}function F(A,b,_,L){return dt(Ee(b),A,_,L)}function D(A,b,_,L){return dt(Ne(b),A,_,L)}function N(A,b,_,L){return dt(ie(b,A.length-_),A,_,L)}s.prototype.write=function(b,_,L,W){if(_===void 0)W="utf8",L=this.length,_=0;else if(L===void 0&&typeof _=="string")W=_,L=this.length,_=0;else if(isFinite(_))_=_>>>0,isFinite(L)?(L=L>>>0,W===void 0&&(W="utf8")):(W=L,L=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const X=this.length-_;if((L===void 0||L>X)&&(L=X),b.length>0&&(L<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let se=!1;for(;;)switch(W){case"hex":return C(this,b,_,L);case"utf8":case"utf-8":return P(this,b,_,L);case"ascii":case"latin1":case"binary":return F(this,b,_,L);case"base64":return D(this,b,_,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,b,_,L);default:if(se)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),se=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(A,b,_){return b===0&&_===A.length?t.fromByteArray(A):t.fromByteArray(A.slice(b,_))}function K(A,b,_){_=Math.min(A.length,_);const L=[];let W=b;for(;W<_;){const X=A[W];let se=null,Pe=X>239?4:X>223?3:X>191?2:1;if(W+Pe<=_){let ot,Le,Je,Ze;switch(Pe){case 1:X<128&&(se=X);break;case 2:ot=A[W+1],(ot&192)===128&&(Ze=(X&31)<<6|ot&63,Ze>127&&(se=Ze));break;case 3:ot=A[W+1],Le=A[W+2],(ot&192)===128&&(Le&192)===128&&(Ze=(X&15)<<12|(ot&63)<<6|Le&63,Ze>2047&&(Ze<55296||Ze>57343)&&(se=Ze));break;case 4:ot=A[W+1],Le=A[W+2],Je=A[W+3],(ot&192)===128&&(Le&192)===128&&(Je&192)===128&&(Ze=(X&15)<<18|(ot&63)<<12|(Le&63)<<6|Je&63,Ze>65535&&Ze<1114112&&(se=Ze))}}se===null?(se=65533,Pe=1):se>65535&&(se-=65536,L.push(se>>>10&1023|55296),se=56320|se&1023),L.push(se),W+=Pe}return te(L)}const Y=4096;function te(A){const b=A.length;if(b<=Y)return String.fromCharCode.apply(String,A);let _="",L=0;for(;L<b;)_+=String.fromCharCode.apply(String,A.slice(L,L+=Y));return _}function oe(A,b,_){let L="";_=Math.min(A.length,_);for(let W=b;W<_;++W)L+=String.fromCharCode(A[W]&127);return L}function le(A,b,_){let L="";_=Math.min(A.length,_);for(let W=b;W<_;++W)L+=String.fromCharCode(A[W]);return L}function ae(A,b,_){const L=A.length;(!b||b<0)&&(b=0),(!_||_<0||_>L)&&(_=L);let W="";for(let X=b;X<_;++X)W+=bt[A[X]];return W}function ge(A,b,_){const L=A.slice(b,_);let W="";for(let X=0;X<L.length-1;X+=2)W+=String.fromCharCode(L[X]+L[X+1]*256);return W}s.prototype.slice=function(b,_){const L=this.length;b=~~b,_=_===void 0?L:~~_,b<0?(b+=L,b<0&&(b=0)):b>L&&(b=L),_<0?(_+=L,_<0&&(_=0)):_>L&&(_=L),_<b&&(_=b);const W=this.subarray(b,_);return Object.setPrototypeOf(W,s.prototype),W};function ce(A,b,_){if(A%1!==0||A<0)throw new RangeError("offset is not uint");if(A+b>_)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[b+se]*X;return W},s.prototype.readUintBE=s.prototype.readUIntBE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b+--_],X=1;for(;_>0&&(X*=256);)W+=this[b+--_]*X;return W},s.prototype.readUint8=s.prototype.readUInt8=function(b,_){return b=b>>>0,_||ce(b,1,this.length),this[b]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(b,_){return b=b>>>0,_||ce(b,2,this.length),this[b]|this[b+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(b,_){return b=b>>>0,_||ce(b,2,this.length),this[b]<<8|this[b+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),(this[b]|this[b+1]<<8|this[b+2]<<16)+this[b+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]*16777216+(this[b+1]<<16|this[b+2]<<8|this[b+3])},s.prototype.readBigUInt64LE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=_+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24,X=this[++b]+this[++b]*2**8+this[++b]*2**16+L*2**24;return BigInt(W)+(BigInt(X)<<BigInt(32))}),s.prototype.readBigUInt64BE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=_*2**24+this[++b]*2**16+this[++b]*2**8+this[++b],X=this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+L;return(BigInt(W)<<BigInt(32))+BigInt(X)}),s.prototype.readIntLE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[b+se]*X;return X*=128,W>=X&&(W-=Math.pow(2,8*_)),W},s.prototype.readIntBE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=_,X=1,se=this[b+--W];for(;W>0&&(X*=256);)se+=this[b+--W]*X;return X*=128,se>=X&&(se-=Math.pow(2,8*_)),se},s.prototype.readInt8=function(b,_){return b=b>>>0,_||ce(b,1,this.length),this[b]&128?(255-this[b]+1)*-1:this[b]},s.prototype.readInt16LE=function(b,_){b=b>>>0,_||ce(b,2,this.length);const L=this[b]|this[b+1]<<8;return L&32768?L|4294901760:L},s.prototype.readInt16BE=function(b,_){b=b>>>0,_||ce(b,2,this.length);const L=this[b+1]|this[b]<<8;return L&32768?L|4294901760:L},s.prototype.readInt32LE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]|this[b+1]<<8|this[b+2]<<16|this[b+3]<<24},s.prototype.readInt32BE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]<<24|this[b+1]<<16|this[b+2]<<8|this[b+3]},s.prototype.readBigInt64LE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=this[b+4]+this[b+5]*2**8+this[b+6]*2**16+(L<<24);return(BigInt(W)<<BigInt(32))+BigInt(_+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24)}),s.prototype.readBigInt64BE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=(_<<24)+this[++b]*2**16+this[++b]*2**8+this[++b];return(BigInt(W)<<BigInt(32))+BigInt(this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+L)}),s.prototype.readFloatLE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),r.read(this,b,!0,23,4)},s.prototype.readFloatBE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),r.read(this,b,!1,23,4)},s.prototype.readDoubleLE=function(b,_){return b=b>>>0,_||ce(b,8,this.length),r.read(this,b,!0,52,8)},s.prototype.readDoubleBE=function(b,_){return b=b>>>0,_||ce(b,8,this.length),r.read(this,b,!1,52,8)};function q(A,b,_,L,W,X){if(!s.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>W||b<X)throw new RangeError('"value" argument is out of bounds');if(_+L>A.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(b,_,L,W){if(b=+b,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;q(this,b,_,L,Pe,0)}let X=1,se=0;for(this[_]=b&255;++se<L&&(X*=256);)this[_+se]=b/X&255;return _+L},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(b,_,L,W){if(b=+b,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;q(this,b,_,L,Pe,0)}let X=L-1,se=1;for(this[_+X]=b&255;--X>=0&&(se*=256);)this[_+X]=b/se&255;return _+L},s.prototype.writeUint8=s.prototype.writeUInt8=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,1,255,0),this[_]=b&255,_+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,65535,0),this[_]=b&255,this[_+1]=b>>>8,_+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,65535,0),this[_]=b>>>8,this[_+1]=b&255,_+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,4294967295,0),this[_+3]=b>>>24,this[_+2]=b>>>16,this[_+1]=b>>>8,this[_]=b&255,_+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,4294967295,0),this[_]=b>>>24,this[_+1]=b>>>16,this[_+2]=b>>>8,this[_+3]=b&255,_+4};function H(A,b,_,L,W){T(b,L,W,A,_,7);let X=Number(b&BigInt(4294967295));A[_++]=X,X=X>>8,A[_++]=X,X=X>>8,A[_++]=X,X=X>>8,A[_++]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return A[_++]=se,se=se>>8,A[_++]=se,se=se>>8,A[_++]=se,se=se>>8,A[_++]=se,_}function re(A,b,_,L,W){T(b,L,W,A,_,7);let X=Number(b&BigInt(4294967295));A[_+7]=X,X=X>>8,A[_+6]=X,X=X>>8,A[_+5]=X,X=X>>8,A[_+4]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return A[_+3]=se,se=se>>8,A[_+2]=se,se=se>>8,A[_+1]=se,se=se>>8,A[_]=se,_+8}s.prototype.writeBigUInt64LE=$e(function(b,_=0){return H(this,b,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=$e(function(b,_=0){return re(this,b,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(b,_,L,W){if(b=+b,_=_>>>0,!W){const ot=Math.pow(2,8*L-1);q(this,b,_,L,ot-1,-ot)}let X=0,se=1,Pe=0;for(this[_]=b&255;++X<L&&(se*=256);)b<0&&Pe===0&&this[_+X-1]!==0&&(Pe=1),this[_+X]=(b/se>>0)-Pe&255;return _+L},s.prototype.writeIntBE=function(b,_,L,W){if(b=+b,_=_>>>0,!W){const ot=Math.pow(2,8*L-1);q(this,b,_,L,ot-1,-ot)}let X=L-1,se=1,Pe=0;for(this[_+X]=b&255;--X>=0&&(se*=256);)b<0&&Pe===0&&this[_+X+1]!==0&&(Pe=1),this[_+X]=(b/se>>0)-Pe&255;return _+L},s.prototype.writeInt8=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,1,127,-128),b<0&&(b=255+b+1),this[_]=b&255,_+1},s.prototype.writeInt16LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,32767,-32768),this[_]=b&255,this[_+1]=b>>>8,_+2},s.prototype.writeInt16BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,32767,-32768),this[_]=b>>>8,this[_+1]=b&255,_+2},s.prototype.writeInt32LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,2147483647,-2147483648),this[_]=b&255,this[_+1]=b>>>8,this[_+2]=b>>>16,this[_+3]=b>>>24,_+4},s.prototype.writeInt32BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,2147483647,-2147483648),b<0&&(b=4294967295+b+1),this[_]=b>>>24,this[_+1]=b>>>16,this[_+2]=b>>>8,this[_+3]=b&255,_+4},s.prototype.writeBigInt64LE=$e(function(b,_=0){return H(this,b,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=$e(function(b,_=0){return re(this,b,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(A,b,_,L,W,X){if(_+L>A.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function U(A,b,_,L,W){return b=+b,_=_>>>0,W||de(A,b,_,4),r.write(A,b,_,L,23,4),_+4}s.prototype.writeFloatLE=function(b,_,L){return U(this,b,_,!0,L)},s.prototype.writeFloatBE=function(b,_,L){return U(this,b,_,!1,L)};function z(A,b,_,L,W){return b=+b,_=_>>>0,W||de(A,b,_,8),r.write(A,b,_,L,52,8),_+8}s.prototype.writeDoubleLE=function(b,_,L){return z(this,b,_,!0,L)},s.prototype.writeDoubleBE=function(b,_,L){return z(this,b,_,!1,L)},s.prototype.copy=function(b,_,L,W){if(!s.isBuffer(b))throw new TypeError("argument should be a Buffer");if(L||(L=0),!W&&W!==0&&(W=this.length),_>=b.length&&(_=b.length),_||(_=0),W>0&&W<L&&(W=L),W===L||b.length===0||this.length===0)return 0;if(_<0)throw new RangeError("targetStart out of bounds");if(L<0||L>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),b.length-_<W-L&&(W=b.length-_+L);const X=W-L;return this===b&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(_,L,W):Uint8Array.prototype.set.call(b,this.subarray(L,W),_),X},s.prototype.fill=function(b,_,L,W){if(typeof b=="string"){if(typeof _=="string"?(W=_,_=0,L=this.length):typeof L=="string"&&(W=L,L=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!s.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(b.length===1){const se=b.charCodeAt(0);(W==="utf8"&&se<128||W==="latin1")&&(b=se)}}else typeof b=="number"?b=b&255:typeof b=="boolean"&&(b=Number(b));if(_<0||this.length<_||this.length<L)throw new RangeError("Out of range index");if(L<=_)return this;_=_>>>0,L=L===void 0?this.length:L>>>0,b||(b=0);let X;if(typeof b=="number")for(X=_;X<L;++X)this[X]=b;else{const se=s.isBuffer(b)?b:s.from(b,W),Pe=se.length;if(Pe===0)throw new TypeError('The value "'+b+'" is invalid for argument "value"');for(X=0;X<L-_;++X)this[X+_]=se[X%Pe]}return this};const M={};function R(A,b,_){M[A]=class extends _{constructor(){super(),Object.defineProperty(this,"message",{value:b.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${A}]`,this.stack,delete this.name}get code(){return A}set code(W){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:W,writable:!0})}toString(){return`${this.name} [${A}]: ${this.message}`}}}R("ERR_BUFFER_OUT_OF_BOUNDS",function(A){return A?`${A} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),R("ERR_INVALID_ARG_TYPE",function(A,b){return`The "${A}" argument must be of type number. Received type ${typeof b}`},TypeError),R("ERR_OUT_OF_RANGE",function(A,b,_){let L=`The value of "${A}" is out of range.`,W=_;return Number.isInteger(_)&&Math.abs(_)>2**32?W=G(String(_)):typeof _=="bigint"&&(W=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(W=G(W)),W+="n"),L+=` It must be ${b}. Received ${W}`,L},RangeError);function G(A){let b="",_=A.length;const L=A[0]==="-"?1:0;for(;_>=L+4;_-=3)b=`_${A.slice(_-3,_)}${b}`;return`${A.slice(0,_)}${b}`}function O(A,b,_){Z(b,"offset"),(A[b]===void 0||A[b+_]===void 0)&&ne(b,A.length-(_+1))}function T(A,b,_,L,W,X){if(A>_||A<b){const se=typeof b=="bigint"?"n":"";let Pe;throw X>3?b===0||b===BigInt(0)?Pe=`>= 0${se} and < 2${se} ** ${(X+1)*8}${se}`:Pe=`>= -(2${se} ** ${(X+1)*8-1}${se}) and < 2 ** ${(X+1)*8-1}${se}`:Pe=`>= ${b}${se} and <= ${_}${se}`,new M.ERR_OUT_OF_RANGE("value",Pe,A)}O(L,W,X)}function Z(A,b){if(typeof A!="number")throw new M.ERR_INVALID_ARG_TYPE(b,"number",A)}function ne(A,b,_){throw Math.floor(A)!==A?(Z(A,_),new M.ERR_OUT_OF_RANGE(_||"offset","an integer",A)):b<0?new M.ERR_BUFFER_OUT_OF_BOUNDS:new M.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${b}`,A)}const pe=/[^+/0-9A-Za-z-_]/g;function me(A){if(A=A.split("=")[0],A=A.trim().replace(pe,""),A.length<2)return"";for(;A.length%4!==0;)A=A+"=";return A}function xe(A,b){b=b||1/0;let _;const L=A.length;let W=null;const X=[];for(let se=0;se<L;++se){if(_=A.charCodeAt(se),_>55295&&_<57344){if(!W){if(_>56319){(b-=3)>-1&&X.push(239,191,189);continue}else if(se+1===L){(b-=3)>-1&&X.push(239,191,189);continue}W=_;continue}if(_<56320){(b-=3)>-1&&X.push(239,191,189),W=_;continue}_=(W-55296<<10|_-56320)+65536}else W&&(b-=3)>-1&&X.push(239,191,189);if(W=null,_<128){if((b-=1)<0)break;X.push(_)}else if(_<2048){if((b-=2)<0)break;X.push(_>>6|192,_&63|128)}else if(_<65536){if((b-=3)<0)break;X.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((b-=4)<0)break;X.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return X}function Ee(A){const b=[];for(let _=0;_<A.length;++_)b.push(A.charCodeAt(_)&255);return b}function ie(A,b){let _,L,W;const X=[];for(let se=0;se<A.length&&!((b-=2)<0);++se)_=A.charCodeAt(se),L=_>>8,W=_%256,X.push(W),X.push(L);return X}function Ne(A){return t.toByteArray(me(A))}function dt(A,b,_,L){let W;for(W=0;W<L&&!(W+_>=b.length||W>=A.length);++W)b[W+_]=A[W];return W}function Te(A,b){return A instanceof b||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===b.name}function Me(A){return A!==A}const bt=function(){const A="0123456789abcdef",b=new Array(256);for(let _=0;_<16;++_){const L=_*16;for(let W=0;W<16;++W)b[L+W]=A[_]+A[W]}return b}();function $e(A){return typeof BigInt>"u"?De:A}function De(){throw new Error("BigInt not supported")}})(Qt),globalThis.global=globalThis,globalThis.Buffer=Qt.Buffer,globalThis.process=Ts;var E8=Di(jb()),Tu=Di(jb());E8.default,Tu.callbackify;var _r=Tu.inspect;Tu.promisify;var Ps={exports:{}};Ps.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",v="[object Map]",y="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",k="[object Set]",I="[object String]",S="[object Undefined]",C="[object WeakMap]",P="[object ArrayBuffer]",F="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,H={};H[D]=H[N]=H[J]=H[K]=H[Y]=H[te]=H[oe]=H[le]=H[ae]=!0,H[s]=H[l]=H[P]=H[f]=H[F]=H[d]=H[p]=H[h]=H[v]=H[y]=H[w]=H[x]=H[k]=H[I]=H[C]=!1;var re=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),z=t&&!t.nodeType&&t,M=z&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===z,G=R&&re.process,O=function(){try{var $=M&&M.require&&M.require("util").types;return $||G&&G.binding&&G.binding("util")}catch{}}(),T=O&&O.isTypedArray;function Z($,B,ee){switch(ee.length){case 0:return $.call(B);case 1:return $.call(B,ee[0]);case 2:return $.call(B,ee[0],ee[1]);case 3:return $.call(B,ee[0],ee[1],ee[2])}return $.apply(B,ee)}function ne($,B){for(var ee=-1,he=Array($);++ee<$;)he[ee]=B(ee);return he}function pe($){return function(B){return $(B)}}function me($,B){return $==null?void 0:$[B]}function xe($,B){return function(ee){return $(B(ee))}}var Ee=Array.prototype,ie=Function.prototype,Ne=Object.prototype,dt=U["__core-js_shared__"],Te=ie.toString,Me=Ne.hasOwnProperty,bt=function(){var $=/[^.]+$/.exec(dt&&dt.keys&&dt.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),$e=Ne.toString,De=Te.call(Object),A=RegExp("^"+Te.call(Me).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=b?b.allocUnsafe:void 0,X=xe(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,ot=Ee.splice,Le=_?_.toStringTag:void 0,Je=function(){try{var $=fa(Object,"defineProperty");return $({},"",{}),$}catch{}}(),Ze=b?b.isBuffer:void 0,tn=Math.max,Jo=Date.now,dr=fa(U,"Map"),qt=fa(Object,"create"),to=function(){function $(){}return function(B){if(!Jt(B))return{};if(se)return se(B);$.prototype=B;var ee=new $;return $.prototype=void 0,ee}}();function Nt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function oa(){this.__data__=qt?qt(null):{},this.size=0}function Xo($){var B=this.has($)&&delete this.__data__[$];return this.size-=B?1:0,B}function ia($){var B=this.__data__;if(qt){var ee=B[$];return ee===n?void 0:ee}return Me.call(B,$)?B[$]:void 0}function Zo($){var B=this.__data__;return qt?B[$]!==void 0:Me.call(B,$)}function Qo($,B){var ee=this.__data__;return this.size+=this.has($)?0:1,ee[$]=qt&&B===void 0?n:B,this}Nt.prototype.clear=oa,Nt.prototype.delete=Xo,Nt.prototype.get=ia,Nt.prototype.has=Zo,Nt.prototype.set=Qo;function Ct($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function aa(){this.__data__=[],this.size=0}function ei($){var B=this.__data__,ee=Pt(B,$);if(ee<0)return!1;var he=B.length-1;return ee==he?B.pop():ot.call(B,ee,1),--this.size,!0}function sa($){var B=this.__data__,ee=Pt(B,$);return ee<0?void 0:B[ee][1]}function la($){return Pt(this.__data__,$)>-1}function ca($,B){var ee=this.__data__,he=Pt(ee,$);return he<0?(++this.size,ee.push([$,B])):ee[he][1]=B,this}Ct.prototype.clear=aa,Ct.prototype.delete=ei,Ct.prototype.get=sa,Ct.prototype.has=la,Ct.prototype.set=ca;function Yt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function V(){this.size=0,this.__data__={hash:new Nt,map:new(dr||Ct),string:new Nt}}function fe($){var B=Tn(this,$).delete($);return this.size-=B?1:0,B}function _e($){return Tn(this,$).get($)}function Oe($){return Tn(this,$).has($)}function qe($,B){var ee=Tn(this,$),he=ee.size;return ee.set($,B),this.size+=ee.size==he?0:1,this}Yt.prototype.clear=V,Yt.prototype.delete=fe,Yt.prototype.get=_e,Yt.prototype.has=Oe,Yt.prototype.set=qe;function Fe($){var B=this.__data__=new Ct($);this.size=B.size}function Be(){this.__data__=new Ct,this.size=0}function je($){var B=this.__data__,ee=B.delete($);return this.size=B.size,ee}function It($){return this.__data__.get($)}function mt($){return this.__data__.has($)}function yt($,B){var ee=this.__data__;if(ee instanceof Ct){var he=ee.__data__;if(!dr||he.length<r-1)return he.push([$,B]),this.size=++ee.size,this;ee=this.__data__=new Yt(he)}return ee.set($,B),this.size=ee.size,this}Fe.prototype.clear=Be,Fe.prototype.delete=je,Fe.prototype.get=It,Fe.prototype.has=mt,Fe.prototype.set=yt;function Ut($,B){var ee=io($),he=!ee&&oo($),Ce=!ee&&!he&&oi($),Se=!ee&&!he&&!Ce&&wl($),Ie=ee||he||Ce||Se,ke=Ie?ne($.length,String):[],Re=ke.length;for(var Dt in $)(B||Me.call($,Dt))&&!(Ie&&(Dt=="length"||Ce&&(Dt=="offset"||Dt=="parent")||Se&&(Dt=="buffer"||Dt=="byteLength"||Dt=="byteOffset")||gl(Dt,Re)))&&ke.push(Dt);return ke}function er($,B,ee){(ee!==void 0&&!In($[B],ee)||ee===void 0&&!(B in $))&&ro($,B,ee)}function ti($,B,ee){var he=$[B];(!(Me.call($,B)&&In(he,ee))||ee===void 0&&!(B in $))&&ro($,B,ee)}function Pt($,B){for(var ee=$.length;ee--;)if(In($[ee][0],B))return ee;return-1}function ro($,B,ee){B=="__proto__"&&Je?Je($,B,{configurable:!0,enumerable:!0,value:ee,writable:!0}):$[B]=ee}var od=vd();function rn($){return $==null?$===void 0?S:m:Le&&Le in Object($)?md($):_d($)}function ua($){return ao($)&&rn($)==s}function id($){if(!Jt($)||vl($))return!1;var B=ii($)?A:ce;return B.test(ni($))}function ad($){return ao($)&&Vr($.length)&&!!H[rn($)]}function sd($){if(!Jt($))return wd($);var B=ml($),ee=[];for(var he in $)he=="constructor"&&(B||!Me.call($,he))||ee.push(he);return ee}function ri($,B,ee,he,Ce){$!==B&&od(B,function(Se,Ie){if(Ce||(Ce=new Fe),Jt(Se))ld($,B,Ie,ee,ri,he,Ce);else{var ke=he?he(pa($,Ie),Se,Ie+"",$,B,Ce):void 0;ke===void 0&&(ke=Se),er($,Ie,ke)}},El)}function ld($,B,ee,he,Ce,Se,Ie){var ke=pa($,ee),Re=pa(B,ee),Dt=Ie.get(Re);if(Dt){er($,ee,Dt);return}var Ft=Se?Se(ke,Re,ee+"",$,B,Ie):void 0,nn=Ft===void 0;if(nn){var ai=io(Re),Cd=!ai&&oi(Re),F1=!ai&&!Cd&&wl(Re);Ft=Re,ai||Cd||F1?io(ke)?Ft=ke:bl(ke)?Ft=pd(ke):Cd?(nn=!1,Ft=ud(Re,!0)):F1?(nn=!1,Ft=dd(Re,!0)):Ft=[]:yl(Re)||oo(Re)?(Ft=ke,oo(ke)?Ft=_l(ke):(!Jt(ke)||ii(ke))&&(Ft=hl(Re))):nn=!1}nn&&(Ie.set(Re,Ft),Ce(Ft,Re,he,Se,Ie),Ie.delete(Re)),er($,ee,Ft)}function pl($,B){return Ed(da($,B,j),$+"")}var cd=Je?function($,B){return Je($,"toString",{configurable:!0,enumerable:!1,value:$d(B),writable:!0})}:j;function ud($,B){if(B)return $.slice();var ee=$.length,he=W?W(ee):new $.constructor(ee);return $.copy(he),he}function fd($){var B=new $.constructor($.byteLength);return new L(B).set(new L($)),B}function dd($,B){var ee=B?fd($.buffer):$.buffer;return new $.constructor(ee,$.byteOffset,$.length)}function pd($,B){var ee=-1,he=$.length;for(B||(B=Array(he));++ee<he;)B[ee]=$[ee];return B}function hd($,B,ee,he){var Ce=!ee;ee||(ee={});for(var Se=-1,Ie=B.length;++Se<Ie;){var ke=B[Se],Re=he?he(ee[ke],$[ke],ke,ee,$):void 0;Re===void 0&&(Re=$[ke]),Ce?ro(ee,ke,Re):ti(ee,ke,Re)}return ee}function gd($){return pl(function(B,ee){var he=-1,Ce=ee.length,Se=Ce>1?ee[Ce-1]:void 0,Ie=Ce>2?ee[2]:void 0;for(Se=$.length>3&&typeof Se=="function"?(Ce--,Se):void 0,Ie&&bd(ee[0],ee[1],Ie)&&(Se=Ce<3?void 0:Se,Ce=1),B=Object(B);++he<Ce;){var ke=ee[he];ke&&$(B,ke,he,Se)}return B})}function vd($){return function(B,ee,he){for(var Ce=-1,Se=Object(B),Ie=he(B),ke=Ie.length;ke--;){var Re=Ie[$?ke:++Ce];if(ee(Se[Re],Re,Se)===!1)break}return B}}function no($,B,ee,he,Ce,Se){return Jt($)&&Jt(B)&&(Se.set(B,$),ri($,B,void 0,no,Se),Se.delete(B)),$}function Tn($,B){var ee=$.__data__;return yd(B)?ee[typeof B=="string"?"string":"hash"]:ee.map}function fa($,B){var ee=me($,B);return id(ee)?ee:void 0}function md($){var B=Me.call($,Le),ee=$[Le];try{$[Le]=void 0;var he=!0}catch{}var Ce=$e.call($);return he&&(B?$[Le]=ee:delete $[Le]),Ce}function hl($){return typeof $.constructor=="function"&&!ml($)?to(X($)):{}}function gl($,B){var ee=typeof $;return B=B??a,!!B&&(ee=="number"||ee!="symbol"&&q.test($))&&$>-1&&$%1==0&&$<B}function bd($,B,ee){if(!Jt(ee))return!1;var he=typeof B;return(he=="number"?ha(ee)&&gl(B,ee.length):he=="string"&&B in ee)?In(ee[B],$):!1}function yd($){var B=typeof $;return B=="string"||B=="number"||B=="symbol"||B=="boolean"?$!=="__proto__":$===null}function vl($){return!!bt&&bt in $}function ml($){var B=$&&$.constructor,ee=typeof B=="function"&&B.prototype||Ne;return $===ee}function wd($){var B=[];if($!=null)for(var ee in Object($))B.push(ee);return B}function _d($){return $e.call($)}function da($,B,ee){return B=tn(B===void 0?$.length-1:B,0),function(){for(var he=arguments,Ce=-1,Se=tn(he.length-B,0),Ie=Array(Se);++Ce<Se;)Ie[Ce]=he[B+Ce];Ce=-1;for(var ke=Array(B+1);++Ce<B;)ke[Ce]=he[Ce];return ke[B]=ee(Ie),Z($,this,ke)}}function pa($,B){if(!(B==="constructor"&&typeof $[B]=="function")&&B!="__proto__")return $[B]}var Ed=xd(cd);function xd($){var B=0,ee=0;return function(){var he=Jo(),Ce=i-(he-ee);if(ee=he,Ce>0){if(++B>=o)return arguments[0]}else B=0;return $.apply(void 0,arguments)}}function ni($){if($!=null){try{return Te.call($)}catch{}try{return $+""}catch{}}return""}function In($,B){return $===B||$!==$&&B!==B}var oo=ua(function(){return arguments}())?ua:function($){return ao($)&&Me.call($,"callee")&&!Pe.call($,"callee")},io=Array.isArray;function ha($){return $!=null&&Vr($.length)&&!ii($)}function bl($){return ao($)&&ha($)}var oi=Ze||Q;function ii($){if(!Jt($))return!1;var B=rn($);return B==h||B==g||B==u||B==E}function Vr($){return typeof $=="number"&&$>-1&&$%1==0&&$<=a}function Jt($){var B=typeof $;return $!=null&&(B=="object"||B=="function")}function ao($){return $!=null&&typeof $=="object"}function yl($){if(!ao($)||rn($)!=w)return!1;var B=X($);if(B===null)return!0;var ee=Me.call(B,"constructor")&&B.constructor;return typeof ee=="function"&&ee instanceof ee&&Te.call(ee)==De}var wl=T?pe(T):ad;function _l($){return hd($,El($))}var Sd=pl(function($){return $.push(void 0,no),Z(xl,void 0,$)});function El($){return ha($)?Ut($,!0):sd($)}var xl=gd(function($,B,ee,he){ri($,B,ee,he)});function $d($){return function(){return $}}function j($){return $}function Q(){return!1}e.exports=Sd}(Ps,Ps.exports);var x8=Ps.exports;const S8=sn(x8);var Mi=(e,t,r)=>{if(e)return;let n="invariant violation";throw t&&(n+=`: ${t}`),r!=null&&r.A&&(n+=` [${r.A[0]}]`),r!=null&&r.F&&(n+=` at ${C8(r.F)}:${r.L}`),new $8(n)},$8=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},C8=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},A8=Ve({"node_modules/.pnpm/events@3.3.0/node_modules/events/events.js"(e,t){var r=typeof Reflect=="object"?Reflect:null,n=r&&typeof r.apply=="function"?r.apply:function(S,C,P){return Function.prototype.apply.call(S,C,P)},o;r&&typeof r.ownKeys=="function"?o=r.ownKeys:Object.getOwnPropertySymbols?o=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:o=function(S){return Object.getOwnPropertyNames(S)};function i(I){console&&console.warn&&console.warn(I)}var a=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}t.exports=s,t.exports.once=E,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(I){if(typeof I!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof I)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(I){if(typeof I!="number"||I<0||a(I))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+I+".");l=I}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||a(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function f(I){return I._maxListeners===void 0?s.defaultMaxListeners:I._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(S){for(var C=[],P=1;P<arguments.length;P++)C.push(arguments[P]);var F=S==="error",D=this._events;if(D!==void 0)F=F&&D.error===void 0;else if(!F)return!1;if(F){var N;if(C.length>0&&(N=C[0]),N instanceof Error)throw N;var J=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw J.context=N,J}var K=D[S];if(K===void 0)return!1;if(typeof K=="function")n(K,this,C);else for(var Y=K.length,te=y(K,Y),P=0;P<Y;++P)n(te[P],this,C);return!0};function d(I,S,C,P){var F,D,N;if(u(C),D=I._events,D===void 0?(D=I._events=Object.create(null),I._eventsCount=0):(D.newListener!==void 0&&(I.emit("newListener",S,C.listener?C.listener:C),D=I._events),N=D[S]),N===void 0)N=D[S]=C,++I._eventsCount;else if(typeof N=="function"?N=D[S]=P?[C,N]:[N,C]:P?N.unshift(C):N.push(C),F=f(I),F>0&&N.length>F&&!N.warned){N.warned=!0;var J=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");J.name="MaxListenersExceededWarning",J.emitter=I,J.type=S,J.count=N.length,i(J)}return I}s.prototype.addListener=function(S,C){return d(this,S,C,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,C){return d(this,S,C,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(I,S,C){var P={fired:!1,wrapFn:void 0,target:I,type:S,listener:C},F=p.bind(P);return F.listener=C,P.wrapFn=F,F}s.prototype.once=function(S,C){return u(C),this.on(S,h(this,S,C)),this},s.prototype.prependOnceListener=function(S,C){return u(C),this.prependListener(S,h(this,S,C)),this},s.prototype.removeListener=function(S,C){var P,F,D,N,J;if(u(C),F=this._events,F===void 0)return this;if(P=F[S],P===void 0)return this;if(P===C||P.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete F[S],F.removeListener&&this.emit("removeListener",S,P.listener||C));else if(typeof P!="function"){for(D=-1,N=P.length-1;N>=0;N--)if(P[N]===C||P[N].listener===C){J=P[N].listener,D=N;break}if(D<0)return this;D===0?P.shift():m(P,D),P.length===1&&(F[S]=P[0]),F.removeListener!==void 0&&this.emit("removeListener",S,J||C)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var C,P,F;if(P=this._events,P===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete P[S]),this;if(arguments.length===0){var D=Object.keys(P),N;for(F=0;F<D.length;++F)N=D[F],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(C=P[S],typeof C=="function")this.removeListener(S,C);else if(C!==void 0)for(F=C.length-1;F>=0;F--)this.removeListener(S,C[F]);return this};function g(I,S,C){var P=I._events;if(P===void 0)return[];var F=P[S];return F===void 0?[]:typeof F=="function"?C?[F.listener||F]:[F]:C?w(F):y(F,F.length)}s.prototype.listeners=function(S){return g(this,S,!0)},s.prototype.rawListeners=function(S){return g(this,S,!1)},s.listenerCount=function(I,S){return typeof I.listenerCount=="function"?I.listenerCount(S):v.call(I,S)},s.prototype.listenerCount=v;function v(I){var S=this._events;if(S!==void 0){var C=S[I];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function y(I,S){for(var C=new Array(S),P=0;P<S;++P)C[P]=I[P];return C}function m(I,S){for(;S+1<I.length;S++)I[S]=I[S+1];I.pop()}function w(I){for(var S=new Array(I.length),C=0;C<S.length;++C)S[C]=I[C].listener||I[C];return S}function E(I,S){return new Promise(function(C,P){function F(N){I.removeListener(S,D),P(N)}function D(){typeof I.removeListener=="function"&&I.removeListener("error",F),C([].slice.call(arguments))}k(I,S,D,{once:!0}),S!=="error"&&x(I,F,{once:!0})})}function x(I,S,C){typeof I.on=="function"&&k(I,"error",S,C)}function k(I,S,C,P){if(typeof I.on=="function")P.once?I.once(S,C):I.on(S,C);else if(typeof I.addEventListener=="function")I.addEventListener(S,function F(D){P.once&&I.removeEventListener(S,F),C(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof I)}}}),Ub=Di(A8());Ub.EventEmitter,Ub.EventEmitter;var ks=e=>{const t=Object.getPrototypeOf(e).constructor.name;return e.toJSON?`${t}(${_r(e.toJSON())})`:String(e)},Wb=e=>{throw e},Hb;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.VERBOSE=1]="VERBOSE",e[e.BOLD=2]="BOLD"})(Hb||(Hb={}));var O8=(e,t=8)=>{const r=String(e);return r.length<=t?r:r.slice(0,t)},Ns=Symbol.for("devtoolsFormatter"),T8=()=>{typeof window<"u"&&(window.devtoolsFormatters??(window.devtoolsFormatters=[])).push({header:(e,t)=>{const r=e[Ns];if(r===void 0)return null;if(typeof r!="object"||r===null||typeof r.header!="function")throw new Error(`Invalid devtools formatter for ${e.constructor.name}`);return r.header(t)},hasBody:(e,t)=>{const r=e[Ns];return!r||!r.hasBody?!1:r.hasBody(t)},body:(e,t)=>{const r=e[Ns];return!r||!r.body?null:r.body(t)}})};T8();var I8=Symbol.for("dxos.common.equals"),Iu={exports:{}},Pu={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=Qt,n=r.Buffer;function o(a,s){for(var l in a)s[l]=a[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=i);function i(a,s,l){return n(a,s,l)}i.prototype=Object.create(n.prototype),o(n,i),i.from=function(a,s,l){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,s,l)},i.alloc=function(a,s,l){if(typeof a!="number")throw new TypeError("Argument must be a number");var u=n(a);return s!==void 0?typeof l=="string"?u.fill(s,l):u.fill(s):u.fill(0),u},i.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},i.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(a)}})(Pu,Pu.exports);var Vb=Pu.exports,ku=65536,P8=4294967295;function k8(){throw new Error(`Secure random number generation is not supported by this browser.
106
- Use Chrome, Firefox or Internet Explorer 11`)}var N8=Vb.Buffer,Ds=Ye.crypto||Ye.msCrypto;Ds&&Ds.getRandomValues?Iu.exports=D8:Iu.exports=k8;function D8(e,t){if(e>P8)throw new RangeError("requested too many random bytes");var r=N8.allocUnsafe(e);if(e>0)if(e>ku)for(var n=0;n<e;n+=ku)Ds.getRandomValues(r.slice(n,n+ku));else Ds.getRandomValues(r);return typeof t=="function"?process.nextTick(function(){t(null,r)}):r}var L8=Iu.exports;const M8=sn(L8);var Nu="/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts",F8=32,zb=class Wt{static from(t){if(Mi(t,void 0,{F:Nu,L:31,S:this,A:["source",""]}),t instanceof Wt)return t;if(t instanceof Qt.Buffer)return new Wt(new Uint8Array(t.buffer,t.byteOffset,t.byteLength));if(t instanceof Uint8Array)return new Wt(t);if(t instanceof ArrayBuffer)return new Wt(new Uint8Array(t));if(typeof t=="string")return Wt.fromHex(t);if(t.asUint8Array)return new Wt(t.asUint8Array());throw new TypeError(`Unable to create PublicKey from ${t}`)}static safeFrom(t){if(t)try{return Wt.from(t)}catch{return}}static fromHex(t){t.startsWith("0x")&&(t=t.slice(2));const r=Qt.Buffer.from(t,"hex");return new Wt(new Uint8Array(r.buffer,r.byteOffset,r.byteLength))}static random(){return Wt.from(M8(F8))}static*randomSequence(){for(let t=0;t<1e4;t++)yield Wt.random();throw new Error("Too many keys requested")}static isPublicKey(t){return t instanceof Wt}static assertValidPublicKey(t){if(!this.isPublicKey(t))throw new TypeError("Invalid PublicKey")}static equals(t,r){return Wt.from(t).equals(r)}static bufferize(t){return Mi(typeof t=="string","Invalid type",{F:Nu,L:130,S:this,A:["typeof str === 'string'","'Invalid type'"]}),Qt.Buffer.from(t,"hex")}static stringify(t){return t instanceof Wt?t=t.asBuffer():t instanceof Uint8Array&&(t=Qt.Buffer.from(t.buffer,t.byteOffset,t.byteLength)),Mi(t instanceof Qt.Buffer,"Invalid type",{F:Nu,L:149,S:this,A:["key instanceof Buffer","'Invalid type'"]}),t.toString("hex")}static hash(t){return t.toHex()}constructor(t){if(this._value=t,!(t instanceof Uint8Array))throw new TypeError(`Expected Uint8Array, got: ${t}`)}toString(){return this.toHex()}toJSON(){return this.toHex()}get length(){return this._value.length}toHex(){return this.asBuffer().toString("hex")}truncate(t=void 0){return O8(this,t)}asBuffer(){return Qt.Buffer.from(this._value.buffer,this._value.byteOffset,this._value.byteLength)}asUint8Array(){return this._value}getInsecureHash(t){return Math.abs(this._value.reduce((r,n)=>r^n|0,0))%t}[_r.custom](t,r){if(!r.colors||typeof Ts.stdout.hasColors!="function"||!Ts.stdout.hasColors())return`<PublicKey ${this.truncate()}>`;const n=a=>`\x1B[${a}m`,o=["red","green","yellow","blue","magenta","cyan","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright"],i=o[this.getInsecureHash(o.length)];return`PublicKey(${n(_r.colors[i][0])}${this.truncate()}${n(_r.colors.reset[0])})`}get[Ns](){return{header:()=>{const t=["darkred","green","orange","blue","darkmagenta","darkcyan","red","green","orange","blue","magenta","darkcyan","black"],r=t[this.getInsecureHash(t.length)];return["span",{},["span",{},"PublicKey("],["span",{style:`color: ${r};`},this.truncate()],["span",{},")"]]}}}equals(t){const r=Wt.from(t);if(this._value.length!==r._value.length)return!1;let n=!0;for(let o=0;o<this._value.length;o++)n&&(n=this._value[o]===r._value[o]);return n}[I8](t){return Wt.isPublicKey(t)?this.equals(t):!1}},Gb=10;(class{constructor(e,t){if(this._projection=e,this._values=new Map,t)for(const r of t)this.add(r)}toString(){return ks(this)}toJSON(){return this._values.size>Gb?{size:this._values.size}:Array.from(this._values.values())}[_r.custom](){return ks(this)}add(e){return this._values.set(this._projection(e),e),this}clear(){this._values.clear()}delete(e){return this._values.delete(this._projection(e))}forEach(e,t){t&&(e=e.bind(t)),this._values.forEach(r=>e(r,r,this))}has(e){return this._values.has(this._projection(e))}get size(){return this._values.size}[Symbol.iterator](){return this._values.values()}*entries(){for(const e of this._values.values())yield[e,e]}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}get[Symbol.toStringTag](){return"ComplexSet"}}),class{constructor(e,t){if(this._keyProjection=e,this._keys=new Map,this._values=new Map,t)for(const[r,n]of t)this.set(r,n)}toString(){return ks(this)}toJSON(){return this._values.size>Gb?{size:this._values.size}:Array.from(this._values.values())}[_r.custom](){return ks(this)}clear(){this._keys.clear(),this._values.clear()}delete(e){const t=this._keys.delete(this._keyProjection(e)),r=this._values.delete(this._keyProjection(e));return t||r}forEach(e,t){t&&(e=e.bind(t)),this._keys.forEach((r,n)=>e(this._values.get(n)??Wb(new Error("Map corrupted.")),r,this))}get(e){return this._values.get(this._keyProjection(e))}has(e){return this._keys.has(this._keyProjection(e))}set(e,t){const r=this._keyProjection(e);return this._keys.set(r,e),this._values.set(r,t),this}get size(){return this._keys.size}*[Symbol.iterator](){for(const[e,t]of this._keys){const r=this._values.get(e)??Wb(new Error("Map corrupted."));yield[t,r]}}entries(){return this[Symbol.iterator]()}keys(){return this._keys.values()}values(){return this._values.values()}get[Symbol.toStringTag](){return"ComplexMap"}};var j8=["ack","alabama","alanine","alaska","alpha","angel","apart","april","arizona","arkansas","artist","asparagus","aspen","august","autumn","avocado","bacon","bakerloo","batman","beer","berlin","beryllium","black","blossom","blue","bluebird","bravo","bulldog","burger","butter","california","carbon","cardinal","carolina","carpet","cat","ceiling","charlie","chicken","coffee","cola","cold","colorado","comet","connecticut","crazy","cup","dakota","december","delaware","delta","diet","don","double","early","earth","east","echo","edward","eight","eighteen","eleven","emma","enemy","equal","failed","fanta","fifteen","fillet","finch","fish","five","fix","floor","florida","football","four","fourteen","foxtrot","freddie","friend","fruit","gee","georgia","glucose","golf","green","grey","hamper","happy","harry","hawaii","helium","high","hot","hotel","hydrogen","idaho","illinois","india","indigo","ink","iowa","island","item","jersey","jig","johnny","juliet","july","jupiter","kansas","kentucky","kilo","king","kitten","lactose","lake","lamp","lemon","leopard","lima","lion","lithium","london","louisiana","low","magazine","magnesium","maine","mango","march","mars","maryland","massachusetts","may","mexico","michigan","mike","minnesota","mirror","mississippi","missouri","mobile","mockingbird","monkey","montana","moon","mountain","muppet","music","nebraska","neptune","network","nevada","nine","nineteen","nitrogen","north","november","nuts","october","ohio","oklahoma","one","orange","oranges","oregon","oscar","oven","oxygen","papa","paris","pasta","pennsylvania","pip","pizza","pluto","potato","princess","purple","quebec","queen","quiet","red","river","robert","robin","romeo","rugby","sad","salami","saturn","september","seven","seventeen","shade","sierra","single","sink","six","sixteen","skylark","snake","social","sodium","solar","south","spaghetti","speaker","spring","stairway","steak","stream","summer","sweet","table","tango","ten","tennessee","tennis","texas","thirteen","three","timing","triple","twelve","twenty","two","uncle","undress","uniform","uranus","utah","vegan","venus","vermont","victor","video","violet","virginia","washington","west","whiskey","white","william","winner","winter","wisconsin","wolfram","wyoming","xray","yankee","yellow","zebra","zulu"],B8=class{constructor(e=j8){if(this.wordlist=e,e.length!==256)throw new Error("Wordlist must have exactly 256 items");this.wordlist=e}humanize(e,t=4,r="-"){const n=e.match(/(..?)/g);if(!n)throw new Error("");const o=n.map(a=>parseInt(a,16));return this._compress(o,t).map(a=>this.wordlist[a]).join(r)}_compress(e,t){const r=e.length;if(t>r)throw new Error("Fewer input bytes than requested output");const n=r/t>>0,o=[];for(let a=0;a<n*t;a+=n)o.push(e.slice(a,a+n));return o[o.length-1]=o[o.length-1].concat(e.slice(t*n)),o.map(a=>a.reduce((s,l)=>s^l))}},R8=new B8,U8=e=>(e instanceof Qt.Buffer||e instanceof Uint8Array||e instanceof ArrayBuffer?e=zb.stringify(e):e instanceof zb&&(e=e.toHex()),R8.humanize(e)),W8=e=>Qt.Buffer.from(e.buffer,e.byteOffset,e.byteLength),H8=5,Du=(e,t=0,r=new WeakSet)=>{if(t>H8)return null;if(typeof e=="function")return null;if(typeof e=="object"&&e!==null){if(r.has(e))return null;r.add(e);try{if(e instanceof Uint8Array)return W8(e).toString("hex");if(Array.isArray(e))return e.map(n=>Du(n,t+1,r));if(typeof e.toJSON=="function")return e.toJSON();{const n={};for(const o of Object.keys(e))n[o]=Du(e[o],t+1,r);return n}}finally{r.delete(e)}}else return e},V8=(e,t,r)=>{let n=e.get(t);return n===void 0&&(n=typeof r=="function"?r():r,e.set(t,n)),n},z8=()=>typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Lu=Symbol("instanceTag"),G8=e=>t=>{t.prototype[Lu]=e,Object.defineProperty(t.prototype,Symbol.hasInstance,{value:r=>(r==null?void 0:r[Lu])===e}),Object.defineProperty(t,Symbol.hasInstance,{value:r=>(r==null?void 0:r[Lu])===e})},Mu=Symbol.for("dxos.instance-contexts"),K8=globalThis[Mu]??(globalThis[Mu]=new WeakMap),q8=e=>{const t=Object.getPrototypeOf(e),r=V8(K8,t,()=>({nextId:0,instanceIds:new WeakMap}));let n=r.instanceIds.get(e);return n===void 0&&(n=r.nextId++,r.instanceIds.set(e,n)),n},Fu=()=>{throw new Error("Not available on this platform")},Y8=()=>Fu(),J8=()=>Fu(),X8=()=>Fu(),Kb=Ve({"node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"(e,t){function r(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function n(a,s){for(var l="",u=0,f=-1,d=0,p,h=0;h<=a.length;++h){if(h<a.length)p=a.charCodeAt(h);else{if(p===47)break;p=47}if(p===47){if(!(f===h-1||d===1))if(f!==h-1&&d===2){if(l.length<2||u!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var g=l.lastIndexOf("/");if(g!==l.length-1){g===-1?(l="",u=0):(l=l.slice(0,g),u=l.length-1-l.lastIndexOf("/")),f=h,d=0;continue}}else if(l.length===2||l.length===1){l="",u=0,f=h,d=0;continue}}s&&(l.length>0?l+="/..":l="..",u=2)}else l.length>0?l+="/"+a.slice(f+1,h):l=a.slice(f+1,h),u=h-f-1;f=h,d=0}else p===46&&d!==-1?++d:d=-1}return l}function o(a,s){var l=s.dir||s.root,u=s.base||(s.name||"")+(s.ext||"");return l?l===s.root?l+u:l+a+u:u}var i={resolve:function(){for(var s="",l=!1,u,f=arguments.length-1;f>=-1&&!l;f--){var d;f>=0?d=arguments[f]:(u===void 0&&(u=process.cwd()),d=u),r(d),d.length!==0&&(s=d+"/"+s,l=d.charCodeAt(0)===47)}return s=n(s,!l),l?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(r(s),s.length===0)return".";var l=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=n(s,!l),s.length===0&&!l&&(s="."),s.length>0&&u&&(s+="/"),l?"/"+s:s},isAbsolute:function(s){return r(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,l=0;l<arguments.length;++l){var u=arguments[l];r(u),u.length>0&&(s===void 0?s=u:s+="/"+u)}return s===void 0?".":i.normalize(s)},relative:function(s,l){if(r(s),r(l),s===l||(s=i.resolve(s),l=i.resolve(l),s===l))return"";for(var u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var f=s.length,d=f-u,p=1;p<l.length&&l.charCodeAt(p)===47;++p);for(var h=l.length,g=h-p,v=d<g?d:g,y=-1,m=0;m<=v;++m){if(m===v){if(g>v){if(l.charCodeAt(p+m)===47)return l.slice(p+m+1);if(m===0)return l.slice(p+m)}else d>v&&(s.charCodeAt(u+m)===47?y=m:m===0&&(y=0));break}var w=s.charCodeAt(u+m),E=l.charCodeAt(p+m);if(w!==E)break;w===47&&(y=m)}var x="";for(m=u+y+1;m<=f;++m)(m===f||s.charCodeAt(m)===47)&&(x.length===0?x+="..":x+="/..");return x.length>0?x+l.slice(p+y):(p+=y,l.charCodeAt(p)===47&&++p,l.slice(p))},_makeLong:function(s){return s},dirname:function(s){if(r(s),s.length===0)return".";for(var l=s.charCodeAt(0),u=l===47,f=-1,d=!0,p=s.length-1;p>=1;--p)if(l=s.charCodeAt(p),l===47){if(!d){f=p;break}}else d=!1;return f===-1?u?"/":".":u&&f===1?"//":s.slice(0,f)},basename:function(s,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');r(s);var u=0,f=-1,d=!0,p;if(l!==void 0&&l.length>0&&l.length<=s.length){if(l.length===s.length&&l===s)return"";var h=l.length-1,g=-1;for(p=s.length-1;p>=0;--p){var v=s.charCodeAt(p);if(v===47){if(!d){u=p+1;break}}else g===-1&&(d=!1,g=p+1),h>=0&&(v===l.charCodeAt(h)?--h===-1&&(f=p):(h=-1,f=g))}return u===f?f=g:f===-1&&(f=s.length),s.slice(u,f)}else{for(p=s.length-1;p>=0;--p)if(s.charCodeAt(p)===47){if(!d){u=p+1;break}}else f===-1&&(d=!1,f=p+1);return f===-1?"":s.slice(u,f)}},extname:function(s){r(s);for(var l=-1,u=0,f=-1,d=!0,p=0,h=s.length-1;h>=0;--h){var g=s.charCodeAt(h);if(g===47){if(!d){u=h+1;break}continue}f===-1&&(d=!1,f=h+1),g===46?l===-1?l=h:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||f===-1||p===0||p===1&&l===f-1&&l===u+1?"":s.slice(l,f)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return o("/",s)},parse:function(s){r(s);var l={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return l;var u=s.charCodeAt(0),f=u===47,d;f?(l.root="/",d=1):d=0;for(var p=-1,h=0,g=-1,v=!0,y=s.length-1,m=0;y>=d;--y){if(u=s.charCodeAt(y),u===47){if(!v){h=y+1;break}continue}g===-1&&(v=!1,g=y+1),u===46?p===-1?p=y:m!==1&&(m=1):p!==-1&&(m=-1)}return p===-1||g===-1||m===0||m===1&&p===g-1&&p===h+1?g!==-1&&(h===0&&f?l.base=l.name=s.slice(1,g):l.base=l.name=s.slice(h,g)):(h===0&&f?(l.name=s.slice(1,p),l.base=s.slice(1,g)):(l.name=s.slice(h,p),l.base=s.slice(h,g)),l.ext=s.slice(p,g)),h>0?l.dir=s.slice(0,h-1):f&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}});Di(Kb());var Ur=Di(Kb());Ur.basename;var Z8=Ur.dirname;Ur.extname,Ur.format,Ur.isAbsolute,Ur.join,Ur.normalize,Ur.parse,Ur.relative,Ur.resolve;var wt;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(wt||(wt={}));var Q8={trace:5,debug:10,info:11,warn:12,error:13},Fi;(function(e){e.CONSOLE="console",e.BROWSER="browser",e.DEBUG="debug"})(Fi||(Fi={}));var eD=Symbol("logInfoProperties"),tD=e=>{if(!e)return{};const t={},n=Object.getPrototypeOf(e)[eD]??[];for(const o of n)try{t[o]=typeof e[o]=="function"?e[o]():e[o]}catch(i){t[o]=i.message}return t},rD=(e,t,r)=>t>=e.level&&(!e.pattern||r.includes(e.pattern)),qb=(e,t)=>t===void 0?!0:t.some(r=>{var n;return rD(r,e.level,((n=e.meta)==null?void 0:n.F)??"")}),ju=e=>{let t;if(e.meta){const r=tD(e.meta.S);Object.keys(r).length>0&&(t=Object.assign(t??{},r))}if(e.context)if(e.context instanceof Error){const r=e.context.context;t=Object.assign(t??{},{error:e.context.stack,...r})}else typeof e.context=="object"&&(t=Object.assign(t??{},e.context));return t&&Object.keys(t).length>0?t:void 0},nD=0,oD=e=>(t,r,n)=>(o,i,a)=>{const s=a.value;a.value=function(...l){const u={...n??{},S:this},f=l.map(d=>_r(d,!1,1,!0)).join(", ");try{const d=performance.now(),p=s.apply(this,l);if(iD(p)){const h=nD++;e.info(`${i}(${f}) => Promise { #${h} }`,{},u),p.then(g=>{g!==void 0?e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms => ${_r(g,!1,1,!0)}`,{},u):e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms`,{},u)},g=>{e.info(`🔥 reject #${h} #${(performance.now()-d).toFixed(0)}ms => ${g}`,{},u)})}else e.info(`${i}(${f}) => ${_r(p,!1,1,!0)}`,{},u);return p}catch(d){throw e.error(`${i}(${f}) 🔥 ${d}`,{},u),d}},Object.defineProperty(a.value,"name",{value:i+"$log"})},iD=e=>e&&typeof e.then=="function",aD=e=>{try{return JSON.parse(localStorage.getItem("dxlog"))}catch{return}},Yb=()=>{},sD=(e,t)=>{console.log(_r(t,!1,null,!0))},Jb=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},Bu=typeof mochaExecutor<"u"?{useTestProcessor:!0,printFileLinks:!0}:{useTestProcessor:!1,printFileLinks:!1},lD=(e,t)=>{var u,f,d;if(!qb(t,e.filters))return;const r=e.prefix??"https://vscode.dev/github.com/dxos/dxos/blob/main/",n=[];let o="";if(t.meta){const p=Jb(t.meta.F);o=`${`${r.replace(/\/$/,"")}/${p}`}#L${t.meta.L}`}let i=[];if((u=t.meta)!=null&&u.S){const p=(f=t.meta)==null?void 0:f.S,h=Object.getPrototypeOf(p),g=q8(p);i.push(`%c${h.constructor.name}#${g}`,"color:#C026D3;font-weight:bold")}i.push(t.message);const a=ju(t);a&&i.push(a);const s={[wt.ERROR]:console.error,[wt.WARN]:console.warn,[wt.DEBUG]:console.log};(Bu.printFileLinks||z8())&&(n!=null&&n.length?i=[`%c${o}
105
+ */(function(e){const t=Ps,r=Tu,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=w,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const A=new Uint8Array(1),b={foo:function(){return 42}};return Object.setPrototypeOf(b,Uint8Array.prototype),Object.setPrototypeOf(A,b),A.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(A){if(A>o)throw new RangeError('The value "'+A+'" is invalid for option "size"');const b=new Uint8Array(A);return Object.setPrototypeOf(b,s.prototype),b}function s(A,b,_){if(typeof A=="number"){if(typeof b=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(A)}return l(A,b,_)}s.poolSize=8192;function l(A,b,_){if(typeof A=="string")return p(A,b);if(ArrayBuffer.isView(A))return g(A);if(A==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A);if(Te(A,ArrayBuffer)||A&&Te(A.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Te(A,SharedArrayBuffer)||A&&Te(A.buffer,SharedArrayBuffer)))return v(A,b,_);if(typeof A=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const L=A.valueOf&&A.valueOf();if(L!=null&&L!==A)return s.from(L,b,_);const W=y(A);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof A[Symbol.toPrimitive]=="function")return s.from(A[Symbol.toPrimitive]("string"),b,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof A)}s.from=function(A,b,_){return l(A,b,_)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(A){if(typeof A!="number")throw new TypeError('"size" argument must be of type number');if(A<0)throw new RangeError('The value "'+A+'" is invalid for option "size"')}function f(A,b,_){return u(A),A<=0?a(A):b!==void 0?typeof _=="string"?a(A).fill(b,_):a(A).fill(b):a(A)}s.alloc=function(A,b,_){return f(A,b,_)};function d(A){return u(A),a(A<0?0:m(A)|0)}s.allocUnsafe=function(A){return d(A)},s.allocUnsafeSlow=function(A){return d(A)};function p(A,b){if((typeof b!="string"||b==="")&&(b="utf8"),!s.isEncoding(b))throw new TypeError("Unknown encoding: "+b);const _=E(A,b)|0;let L=a(_);const W=L.write(A,b);return W!==_&&(L=L.slice(0,W)),L}function h(A){const b=A.length<0?0:m(A.length)|0,_=a(b);for(let L=0;L<b;L+=1)_[L]=A[L]&255;return _}function g(A){if(Te(A,Uint8Array)){const b=new Uint8Array(A);return v(b.buffer,b.byteOffset,b.byteLength)}return h(A)}function v(A,b,_){if(b<0||A.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(A.byteLength<b+(_||0))throw new RangeError('"length" is outside of buffer bounds');let L;return b===void 0&&_===void 0?L=new Uint8Array(A):_===void 0?L=new Uint8Array(A,b):L=new Uint8Array(A,b,_),Object.setPrototypeOf(L,s.prototype),L}function y(A){if(s.isBuffer(A)){const b=m(A.length)|0,_=a(b);return _.length===0||A.copy(_,0,0,b),_}if(A.length!==void 0)return typeof A.length!="number"||Me(A.length)?a(0):h(A);if(A.type==="Buffer"&&Array.isArray(A.data))return h(A.data)}function m(A){if(A>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return A|0}function w(A){return+A!=A&&(A=0),s.alloc(+A)}s.isBuffer=function(b){return b!=null&&b._isBuffer===!0&&b!==s.prototype},s.compare=function(b,_){if(Te(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),Te(_,Uint8Array)&&(_=s.from(_,_.offset,_.byteLength)),!s.isBuffer(b)||!s.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(b===_)return 0;let L=b.length,W=_.length;for(let X=0,se=Math.min(L,W);X<se;++X)if(b[X]!==_[X]){L=b[X],W=_[X];break}return L<W?-1:W<L?1:0},s.isEncoding=function(b){switch(String(b).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}},s.concat=function(b,_){if(!Array.isArray(b))throw new TypeError('"list" argument must be an Array of Buffers');if(b.length===0)return s.alloc(0);let L;if(_===void 0)for(_=0,L=0;L<b.length;++L)_+=b[L].length;const W=s.allocUnsafe(_);let X=0;for(L=0;L<b.length;++L){let se=b[L];if(Te(se,Uint8Array))X+se.length>W.length?(s.isBuffer(se)||(se=s.from(se)),se.copy(W,X)):Uint8Array.prototype.set.call(W,se,X);else if(s.isBuffer(se))se.copy(W,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=se.length}return W};function E(A,b){if(s.isBuffer(A))return A.length;if(ArrayBuffer.isView(A)||Te(A,ArrayBuffer))return A.byteLength;if(typeof A!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof A);const _=A.length,L=arguments.length>2&&arguments[2]===!0;if(!L&&_===0)return 0;let W=!1;for(;;)switch(b){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return Ee(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Ne(A).length;default:if(W)return L?-1:Ee(A).length;b=(""+b).toLowerCase(),W=!0}}s.byteLength=E;function x(A,b,_){let L=!1;if((b===void 0||b<0)&&(b=0),b>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,b>>>=0,_<=b))return"";for(A||(A="utf8");;)switch(A){case"hex":return ae(this,b,_);case"utf8":case"utf-8":return K(this,b,_);case"ascii":return oe(this,b,_);case"latin1":case"binary":return le(this,b,_);case"base64":return J(this,b,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,b,_);default:if(L)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),L=!0}}s.prototype._isBuffer=!0;function k(A,b,_){const L=A[b];A[b]=A[_],A[_]=L}s.prototype.swap16=function(){const b=this.length;if(b%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;_<b;_+=2)k(this,_,_+1);return this},s.prototype.swap32=function(){const b=this.length;if(b%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let _=0;_<b;_+=4)k(this,_,_+3),k(this,_+1,_+2);return this},s.prototype.swap64=function(){const b=this.length;if(b%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let _=0;_<b;_+=8)k(this,_,_+7),k(this,_+1,_+6),k(this,_+2,_+5),k(this,_+3,_+4);return this},s.prototype.toString=function(){const b=this.length;return b===0?"":arguments.length===0?K(this,0,b):x.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(b){if(!s.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:s.compare(this,b)===0},s.prototype.inspect=function(){let b="";const _=e.INSPECT_MAX_BYTES;return b=this.toString("hex",0,_).replace(/(.{2})/g,"$1 ").trim(),this.length>_&&(b+=" ... "),"<Buffer "+b+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(b,_,L,W,X){if(Te(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),!s.isBuffer(b))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof b);if(_===void 0&&(_=0),L===void 0&&(L=b?b.length:0),W===void 0&&(W=0),X===void 0&&(X=this.length),_<0||L>b.length||W<0||X>this.length)throw new RangeError("out of range index");if(W>=X&&_>=L)return 0;if(W>=X)return-1;if(_>=L)return 1;if(_>>>=0,L>>>=0,W>>>=0,X>>>=0,this===b)return 0;let se=X-W,Pe=L-_;const ot=Math.min(se,Pe),Le=this.slice(W,X),Xe=b.slice(_,L);for(let Qe=0;Qe<ot;++Qe)if(Le[Qe]!==Xe[Qe]){se=Le[Qe],Pe=Xe[Qe];break}return se<Pe?-1:Pe<se?1:0};function I(A,b,_,L,W){if(A.length===0)return-1;if(typeof _=="string"?(L=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Me(_)&&(_=W?0:A.length-1),_<0&&(_=A.length+_),_>=A.length){if(W)return-1;_=A.length-1}else if(_<0)if(W)_=0;else return-1;if(typeof b=="string"&&(b=s.from(b,L)),s.isBuffer(b))return b.length===0?-1:S(A,b,_,L,W);if(typeof b=="number")return b=b&255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(A,b,_):Uint8Array.prototype.lastIndexOf.call(A,b,_):S(A,[b],_,L,W);throw new TypeError("val must be string, number or Buffer")}function S(A,b,_,L,W){let X=1,se=A.length,Pe=b.length;if(L!==void 0&&(L=String(L).toLowerCase(),L==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(A.length<2||b.length<2)return-1;X=2,se/=2,Pe/=2,_/=2}function ot(Xe,Qe){return X===1?Xe[Qe]:Xe.readUInt16BE(Qe*X)}let Le;if(W){let Xe=-1;for(Le=_;Le<se;Le++)if(ot(A,Le)===ot(b,Xe===-1?0:Le-Xe)){if(Xe===-1&&(Xe=Le),Le-Xe+1===Pe)return Xe*X}else Xe!==-1&&(Le-=Le-Xe),Xe=-1}else for(_+Pe>se&&(_=se-Pe),Le=_;Le>=0;Le--){let Xe=!0;for(let Qe=0;Qe<Pe;Qe++)if(ot(A,Le+Qe)!==ot(b,Qe)){Xe=!1;break}if(Xe)return Le}return-1}s.prototype.includes=function(b,_,L){return this.indexOf(b,_,L)!==-1},s.prototype.indexOf=function(b,_,L){return I(this,b,_,L,!0)},s.prototype.lastIndexOf=function(b,_,L){return I(this,b,_,L,!1)};function C(A,b,_,L){_=Number(_)||0;const W=A.length-_;L?(L=Number(L),L>W&&(L=W)):L=W;const X=b.length;L>X/2&&(L=X/2);let se;for(se=0;se<L;++se){const Pe=parseInt(b.substr(se*2,2),16);if(Me(Pe))return se;A[_+se]=Pe}return se}function P(A,b,_,L){return pt(Ee(b,A.length-_),A,_,L)}function F(A,b,_,L){return pt(_e(b),A,_,L)}function D(A,b,_,L){return pt(Ne(b),A,_,L)}function N(A,b,_,L){return pt(ie(b,A.length-_),A,_,L)}s.prototype.write=function(b,_,L,W){if(_===void 0)W="utf8",L=this.length,_=0;else if(L===void 0&&typeof _=="string")W=_,L=this.length,_=0;else if(isFinite(_))_=_>>>0,isFinite(L)?(L=L>>>0,W===void 0&&(W="utf8")):(W=L,L=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const X=this.length-_;if((L===void 0||L>X)&&(L=X),b.length>0&&(L<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let se=!1;for(;;)switch(W){case"hex":return C(this,b,_,L);case"utf8":case"utf-8":return P(this,b,_,L);case"ascii":case"latin1":case"binary":return F(this,b,_,L);case"base64":return D(this,b,_,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,b,_,L);default:if(se)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),se=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(A,b,_){return b===0&&_===A.length?t.fromByteArray(A):t.fromByteArray(A.slice(b,_))}function K(A,b,_){_=Math.min(A.length,_);const L=[];let W=b;for(;W<_;){const X=A[W];let se=null,Pe=X>239?4:X>223?3:X>191?2:1;if(W+Pe<=_){let ot,Le,Xe,Qe;switch(Pe){case 1:X<128&&(se=X);break;case 2:ot=A[W+1],(ot&192)===128&&(Qe=(X&31)<<6|ot&63,Qe>127&&(se=Qe));break;case 3:ot=A[W+1],Le=A[W+2],(ot&192)===128&&(Le&192)===128&&(Qe=(X&15)<<12|(ot&63)<<6|Le&63,Qe>2047&&(Qe<55296||Qe>57343)&&(se=Qe));break;case 4:ot=A[W+1],Le=A[W+2],Xe=A[W+3],(ot&192)===128&&(Le&192)===128&&(Xe&192)===128&&(Qe=(X&15)<<18|(ot&63)<<12|(Le&63)<<6|Xe&63,Qe>65535&&Qe<1114112&&(se=Qe))}}se===null?(se=65533,Pe=1):se>65535&&(se-=65536,L.push(se>>>10&1023|55296),se=56320|se&1023),L.push(se),W+=Pe}return te(L)}const Y=4096;function te(A){const b=A.length;if(b<=Y)return String.fromCharCode.apply(String,A);let _="",L=0;for(;L<b;)_+=String.fromCharCode.apply(String,A.slice(L,L+=Y));return _}function oe(A,b,_){let L="";_=Math.min(A.length,_);for(let W=b;W<_;++W)L+=String.fromCharCode(A[W]&127);return L}function le(A,b,_){let L="";_=Math.min(A.length,_);for(let W=b;W<_;++W)L+=String.fromCharCode(A[W]);return L}function ae(A,b,_){const L=A.length;(!b||b<0)&&(b=0),(!_||_<0||_>L)&&(_=L);let W="";for(let X=b;X<_;++X)W+=yt[A[X]];return W}function ge(A,b,_){const L=A.slice(b,_);let W="";for(let X=0;X<L.length-1;X+=2)W+=String.fromCharCode(L[X]+L[X+1]*256);return W}s.prototype.slice=function(b,_){const L=this.length;b=~~b,_=_===void 0?L:~~_,b<0?(b+=L,b<0&&(b=0)):b>L&&(b=L),_<0?(_+=L,_<0&&(_=0)):_>L&&(_=L),_<b&&(_=b);const W=this.subarray(b,_);return Object.setPrototypeOf(W,s.prototype),W};function ce(A,b,_){if(A%1!==0||A<0)throw new RangeError("offset is not uint");if(A+b>_)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[b+se]*X;return W},s.prototype.readUintBE=s.prototype.readUIntBE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b+--_],X=1;for(;_>0&&(X*=256);)W+=this[b+--_]*X;return W},s.prototype.readUint8=s.prototype.readUInt8=function(b,_){return b=b>>>0,_||ce(b,1,this.length),this[b]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(b,_){return b=b>>>0,_||ce(b,2,this.length),this[b]|this[b+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(b,_){return b=b>>>0,_||ce(b,2,this.length),this[b]<<8|this[b+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),(this[b]|this[b+1]<<8|this[b+2]<<16)+this[b+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]*16777216+(this[b+1]<<16|this[b+2]<<8|this[b+3])},s.prototype.readBigUInt64LE=Se(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=_+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24,X=this[++b]+this[++b]*2**8+this[++b]*2**16+L*2**24;return BigInt(W)+(BigInt(X)<<BigInt(32))}),s.prototype.readBigUInt64BE=Se(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=_*2**24+this[++b]*2**16+this[++b]*2**8+this[++b],X=this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+L;return(BigInt(W)<<BigInt(32))+BigInt(X)}),s.prototype.readIntLE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[b+se]*X;return X*=128,W>=X&&(W-=Math.pow(2,8*_)),W},s.prototype.readIntBE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=_,X=1,se=this[b+--W];for(;W>0&&(X*=256);)se+=this[b+--W]*X;return X*=128,se>=X&&(se-=Math.pow(2,8*_)),se},s.prototype.readInt8=function(b,_){return b=b>>>0,_||ce(b,1,this.length),this[b]&128?(255-this[b]+1)*-1:this[b]},s.prototype.readInt16LE=function(b,_){b=b>>>0,_||ce(b,2,this.length);const L=this[b]|this[b+1]<<8;return L&32768?L|4294901760:L},s.prototype.readInt16BE=function(b,_){b=b>>>0,_||ce(b,2,this.length);const L=this[b+1]|this[b]<<8;return L&32768?L|4294901760:L},s.prototype.readInt32LE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]|this[b+1]<<8|this[b+2]<<16|this[b+3]<<24},s.prototype.readInt32BE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]<<24|this[b+1]<<16|this[b+2]<<8|this[b+3]},s.prototype.readBigInt64LE=Se(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=this[b+4]+this[b+5]*2**8+this[b+6]*2**16+(L<<24);return(BigInt(W)<<BigInt(32))+BigInt(_+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24)}),s.prototype.readBigInt64BE=Se(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=(_<<24)+this[++b]*2**16+this[++b]*2**8+this[++b];return(BigInt(W)<<BigInt(32))+BigInt(this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+L)}),s.prototype.readFloatLE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),r.read(this,b,!0,23,4)},s.prototype.readFloatBE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),r.read(this,b,!1,23,4)},s.prototype.readDoubleLE=function(b,_){return b=b>>>0,_||ce(b,8,this.length),r.read(this,b,!0,52,8)},s.prototype.readDoubleBE=function(b,_){return b=b>>>0,_||ce(b,8,this.length),r.read(this,b,!1,52,8)};function q(A,b,_,L,W,X){if(!s.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>W||b<X)throw new RangeError('"value" argument is out of bounds');if(_+L>A.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(b,_,L,W){if(b=+b,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;q(this,b,_,L,Pe,0)}let X=1,se=0;for(this[_]=b&255;++se<L&&(X*=256);)this[_+se]=b/X&255;return _+L},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(b,_,L,W){if(b=+b,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;q(this,b,_,L,Pe,0)}let X=L-1,se=1;for(this[_+X]=b&255;--X>=0&&(se*=256);)this[_+X]=b/se&255;return _+L},s.prototype.writeUint8=s.prototype.writeUInt8=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,1,255,0),this[_]=b&255,_+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,65535,0),this[_]=b&255,this[_+1]=b>>>8,_+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,65535,0),this[_]=b>>>8,this[_+1]=b&255,_+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,4294967295,0),this[_+3]=b>>>24,this[_+2]=b>>>16,this[_+1]=b>>>8,this[_]=b&255,_+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,4294967295,0),this[_]=b>>>24,this[_+1]=b>>>16,this[_+2]=b>>>8,this[_+3]=b&255,_+4};function H(A,b,_,L,W){T(b,L,W,A,_,7);let X=Number(b&BigInt(4294967295));A[_++]=X,X=X>>8,A[_++]=X,X=X>>8,A[_++]=X,X=X>>8,A[_++]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return A[_++]=se,se=se>>8,A[_++]=se,se=se>>8,A[_++]=se,se=se>>8,A[_++]=se,_}function re(A,b,_,L,W){T(b,L,W,A,_,7);let X=Number(b&BigInt(4294967295));A[_+7]=X,X=X>>8,A[_+6]=X,X=X>>8,A[_+5]=X,X=X>>8,A[_+4]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return A[_+3]=se,se=se>>8,A[_+2]=se,se=se>>8,A[_+1]=se,se=se>>8,A[_]=se,_+8}s.prototype.writeBigUInt64LE=Se(function(b,_=0){return H(this,b,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Se(function(b,_=0){return re(this,b,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(b,_,L,W){if(b=+b,_=_>>>0,!W){const ot=Math.pow(2,8*L-1);q(this,b,_,L,ot-1,-ot)}let X=0,se=1,Pe=0;for(this[_]=b&255;++X<L&&(se*=256);)b<0&&Pe===0&&this[_+X-1]!==0&&(Pe=1),this[_+X]=(b/se>>0)-Pe&255;return _+L},s.prototype.writeIntBE=function(b,_,L,W){if(b=+b,_=_>>>0,!W){const ot=Math.pow(2,8*L-1);q(this,b,_,L,ot-1,-ot)}let X=L-1,se=1,Pe=0;for(this[_+X]=b&255;--X>=0&&(se*=256);)b<0&&Pe===0&&this[_+X+1]!==0&&(Pe=1),this[_+X]=(b/se>>0)-Pe&255;return _+L},s.prototype.writeInt8=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,1,127,-128),b<0&&(b=255+b+1),this[_]=b&255,_+1},s.prototype.writeInt16LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,32767,-32768),this[_]=b&255,this[_+1]=b>>>8,_+2},s.prototype.writeInt16BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,32767,-32768),this[_]=b>>>8,this[_+1]=b&255,_+2},s.prototype.writeInt32LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,2147483647,-2147483648),this[_]=b&255,this[_+1]=b>>>8,this[_+2]=b>>>16,this[_+3]=b>>>24,_+4},s.prototype.writeInt32BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,2147483647,-2147483648),b<0&&(b=4294967295+b+1),this[_]=b>>>24,this[_+1]=b>>>16,this[_+2]=b>>>8,this[_+3]=b&255,_+4},s.prototype.writeBigInt64LE=Se(function(b,_=0){return H(this,b,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Se(function(b,_=0){return re(this,b,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(A,b,_,L,W,X){if(_+L>A.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function U(A,b,_,L,W){return b=+b,_=_>>>0,W||de(A,b,_,4),r.write(A,b,_,L,23,4),_+4}s.prototype.writeFloatLE=function(b,_,L){return U(this,b,_,!0,L)},s.prototype.writeFloatBE=function(b,_,L){return U(this,b,_,!1,L)};function z(A,b,_,L,W){return b=+b,_=_>>>0,W||de(A,b,_,8),r.write(A,b,_,L,52,8),_+8}s.prototype.writeDoubleLE=function(b,_,L){return z(this,b,_,!0,L)},s.prototype.writeDoubleBE=function(b,_,L){return z(this,b,_,!1,L)},s.prototype.copy=function(b,_,L,W){if(!s.isBuffer(b))throw new TypeError("argument should be a Buffer");if(L||(L=0),!W&&W!==0&&(W=this.length),_>=b.length&&(_=b.length),_||(_=0),W>0&&W<L&&(W=L),W===L||b.length===0||this.length===0)return 0;if(_<0)throw new RangeError("targetStart out of bounds");if(L<0||L>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),b.length-_<W-L&&(W=b.length-_+L);const X=W-L;return this===b&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(_,L,W):Uint8Array.prototype.set.call(b,this.subarray(L,W),_),X},s.prototype.fill=function(b,_,L,W){if(typeof b=="string"){if(typeof _=="string"?(W=_,_=0,L=this.length):typeof L=="string"&&(W=L,L=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!s.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(b.length===1){const se=b.charCodeAt(0);(W==="utf8"&&se<128||W==="latin1")&&(b=se)}}else typeof b=="number"?b=b&255:typeof b=="boolean"&&(b=Number(b));if(_<0||this.length<_||this.length<L)throw new RangeError("Out of range index");if(L<=_)return this;_=_>>>0,L=L===void 0?this.length:L>>>0,b||(b=0);let X;if(typeof b=="number")for(X=_;X<L;++X)this[X]=b;else{const se=s.isBuffer(b)?b:s.from(b,W),Pe=se.length;if(Pe===0)throw new TypeError('The value "'+b+'" is invalid for argument "value"');for(X=0;X<L-_;++X)this[X+_]=se[X%Pe]}return this};const M={};function R(A,b,_){M[A]=class extends _{constructor(){super(),Object.defineProperty(this,"message",{value:b.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${A}]`,this.stack,delete this.name}get code(){return A}set code(W){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:W,writable:!0})}toString(){return`${this.name} [${A}]: ${this.message}`}}}R("ERR_BUFFER_OUT_OF_BOUNDS",function(A){return A?`${A} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),R("ERR_INVALID_ARG_TYPE",function(A,b){return`The "${A}" argument must be of type number. Received type ${typeof b}`},TypeError),R("ERR_OUT_OF_RANGE",function(A,b,_){let L=`The value of "${A}" is out of range.`,W=_;return Number.isInteger(_)&&Math.abs(_)>2**32?W=G(String(_)):typeof _=="bigint"&&(W=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(W=G(W)),W+="n"),L+=` It must be ${b}. Received ${W}`,L},RangeError);function G(A){let b="",_=A.length;const L=A[0]==="-"?1:0;for(;_>=L+4;_-=3)b=`_${A.slice(_-3,_)}${b}`;return`${A.slice(0,_)}${b}`}function O(A,b,_){Z(b,"offset"),(A[b]===void 0||A[b+_]===void 0)&&ne(b,A.length-(_+1))}function T(A,b,_,L,W,X){if(A>_||A<b){const se=typeof b=="bigint"?"n":"";let Pe;throw X>3?b===0||b===BigInt(0)?Pe=`>= 0${se} and < 2${se} ** ${(X+1)*8}${se}`:Pe=`>= -(2${se} ** ${(X+1)*8-1}${se}) and < 2 ** ${(X+1)*8-1}${se}`:Pe=`>= ${b}${se} and <= ${_}${se}`,new M.ERR_OUT_OF_RANGE("value",Pe,A)}O(L,W,X)}function Z(A,b){if(typeof A!="number")throw new M.ERR_INVALID_ARG_TYPE(b,"number",A)}function ne(A,b,_){throw Math.floor(A)!==A?(Z(A,_),new M.ERR_OUT_OF_RANGE(_||"offset","an integer",A)):b<0?new M.ERR_BUFFER_OUT_OF_BOUNDS:new M.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${b}`,A)}const pe=/[^+/0-9A-Za-z-_]/g;function me(A){if(A=A.split("=")[0],A=A.trim().replace(pe,""),A.length<2)return"";for(;A.length%4!==0;)A=A+"=";return A}function Ee(A,b){b=b||1/0;let _;const L=A.length;let W=null;const X=[];for(let se=0;se<L;++se){if(_=A.charCodeAt(se),_>55295&&_<57344){if(!W){if(_>56319){(b-=3)>-1&&X.push(239,191,189);continue}else if(se+1===L){(b-=3)>-1&&X.push(239,191,189);continue}W=_;continue}if(_<56320){(b-=3)>-1&&X.push(239,191,189),W=_;continue}_=(W-55296<<10|_-56320)+65536}else W&&(b-=3)>-1&&X.push(239,191,189);if(W=null,_<128){if((b-=1)<0)break;X.push(_)}else if(_<2048){if((b-=2)<0)break;X.push(_>>6|192,_&63|128)}else if(_<65536){if((b-=3)<0)break;X.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((b-=4)<0)break;X.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return X}function _e(A){const b=[];for(let _=0;_<A.length;++_)b.push(A.charCodeAt(_)&255);return b}function ie(A,b){let _,L,W;const X=[];for(let se=0;se<A.length&&!((b-=2)<0);++se)_=A.charCodeAt(se),L=_>>8,W=_%256,X.push(W),X.push(L);return X}function Ne(A){return t.toByteArray(me(A))}function pt(A,b,_,L){let W;for(W=0;W<L&&!(W+_>=b.length||W>=A.length);++W)b[W+_]=A[W];return W}function Te(A,b){return A instanceof b||A!=null&&A.constructor!=null&&A.constructor.name!=null&&A.constructor.name===b.name}function Me(A){return A!==A}const yt=function(){const A="0123456789abcdef",b=new Array(256);for(let _=0;_<16;++_){const L=_*16;for(let W=0;W<16;++W)b[L+W]=A[_]+A[W]}return b}();function Se(A){return typeof BigInt>"u"?De:A}function De(){throw new Error("BigInt not supported")}})(er),globalThis.global=globalThis,globalThis.Buffer=er.Buffer,globalThis.process=Is;var S8=Li(Rb()),Iu=Li(Rb());S8.default,Iu.callbackify;var Er=Iu.inspect;Iu.promisify;var ks={exports:{}};ks.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",g="[object GeneratorFunction]",v="[object Map]",y="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",k="[object Set]",I="[object String]",S="[object Undefined]",C="[object WeakMap]",P="[object ArrayBuffer]",F="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,H={};H[D]=H[N]=H[J]=H[K]=H[Y]=H[te]=H[oe]=H[le]=H[ae]=!0,H[s]=H[l]=H[P]=H[f]=H[F]=H[d]=H[p]=H[h]=H[v]=H[y]=H[w]=H[x]=H[k]=H[I]=H[C]=!1;var re=typeof Je=="object"&&Je&&Je.Object===Object&&Je,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),z=t&&!t.nodeType&&t,M=z&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===z,G=R&&re.process,O=function(){try{var $=M&&M.require&&M.require("util").types;return $||G&&G.binding&&G.binding("util")}catch{}}(),T=O&&O.isTypedArray;function Z($,B,ee){switch(ee.length){case 0:return $.call(B);case 1:return $.call(B,ee[0]);case 2:return $.call(B,ee[0],ee[1]);case 3:return $.call(B,ee[0],ee[1],ee[2])}return $.apply(B,ee)}function ne($,B){for(var ee=-1,he=Array($);++ee<$;)he[ee]=B(ee);return he}function pe($){return function(B){return $(B)}}function me($,B){return $==null?void 0:$[B]}function Ee($,B){return function(ee){return $(B(ee))}}var _e=Array.prototype,ie=Function.prototype,Ne=Object.prototype,pt=U["__core-js_shared__"],Te=ie.toString,Me=Ne.hasOwnProperty,yt=function(){var $=/[^.]+$/.exec(pt&&pt.keys&&pt.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),Se=Ne.toString,De=Te.call(Object),A=RegExp("^"+Te.call(Me).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=b?b.allocUnsafe:void 0,X=Ee(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,ot=_e.splice,Le=_?_.toStringTag:void 0,Xe=function(){try{var $=da(Object,"defineProperty");return $({},"",{}),$}catch{}}(),Qe=b?b.isBuffer:void 0,rn=Math.max,Xo=Date.now,pr=da(U,"Map"),Yt=da(Object,"create"),ro=function(){function $(){}return function(B){if(!Xt(B))return{};if(se)return se(B);$.prototype=B;var ee=new $;return $.prototype=void 0,ee}}();function Dt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function ia(){this.__data__=Yt?Yt(null):{},this.size=0}function Zo($){var B=this.has($)&&delete this.__data__[$];return this.size-=B?1:0,B}function aa($){var B=this.__data__;if(Yt){var ee=B[$];return ee===n?void 0:ee}return Me.call(B,$)?B[$]:void 0}function Qo($){var B=this.__data__;return Yt?B[$]!==void 0:Me.call(B,$)}function ei($,B){var ee=this.__data__;return this.size+=this.has($)?0:1,ee[$]=Yt&&B===void 0?n:B,this}Dt.prototype.clear=ia,Dt.prototype.delete=Zo,Dt.prototype.get=aa,Dt.prototype.has=Qo,Dt.prototype.set=ei;function At($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function sa(){this.__data__=[],this.size=0}function ti($){var B=this.__data__,ee=kt(B,$);if(ee<0)return!1;var he=B.length-1;return ee==he?B.pop():ot.call(B,ee,1),--this.size,!0}function la($){var B=this.__data__,ee=kt(B,$);return ee<0?void 0:B[ee][1]}function ca($){return kt(this.__data__,$)>-1}function ua($,B){var ee=this.__data__,he=kt(ee,$);return he<0?(++this.size,ee.push([$,B])):ee[he][1]=B,this}At.prototype.clear=sa,At.prototype.delete=ti,At.prototype.get=la,At.prototype.has=ca,At.prototype.set=ua;function Jt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function V(){this.size=0,this.__data__={hash:new Dt,map:new(pr||At),string:new Dt}}function fe($){var B=In(this,$).delete($);return this.size-=B?1:0,B}function we($){return In(this,$).get($)}function Ae($){return In(this,$).has($)}function Ye($,B){var ee=In(this,$),he=ee.size;return ee.set($,B),this.size+=ee.size==he?0:1,this}Jt.prototype.clear=V,Jt.prototype.delete=fe,Jt.prototype.get=we,Jt.prototype.has=Ae,Jt.prototype.set=Ye;function Fe($){var B=this.__data__=new At($);this.size=B.size}function Be(){this.__data__=new At,this.size=0}function je($){var B=this.__data__,ee=B.delete($);return this.size=B.size,ee}function Pt($){return this.__data__.get($)}function bt($){return this.__data__.has($)}function wt($,B){var ee=this.__data__;if(ee instanceof At){var he=ee.__data__;if(!pr||he.length<r-1)return he.push([$,B]),this.size=++ee.size,this;ee=this.__data__=new Jt(he)}return ee.set($,B),this.size=ee.size,this}Fe.prototype.clear=Be,Fe.prototype.delete=je,Fe.prototype.get=Pt,Fe.prototype.has=bt,Fe.prototype.set=wt;function Wt($,B){var ee=ao($),he=!ee&&io($),$e=!ee&&!he&&ii($),xe=!ee&&!he&&!$e&&_l($),Ie=ee||he||$e||xe,ke=Ie?ne($.length,String):[],Re=ke.length;for(var Lt in $)(B||Me.call($,Lt))&&!(Ie&&(Lt=="length"||$e&&(Lt=="offset"||Lt=="parent")||xe&&(Lt=="buffer"||Lt=="byteLength"||Lt=="byteOffset")||vl(Lt,Re)))&&ke.push(Lt);return ke}function tr($,B,ee){(ee!==void 0&&!Pn($[B],ee)||ee===void 0&&!(B in $))&&no($,B,ee)}function ri($,B,ee){var he=$[B];(!(Me.call($,B)&&Pn(he,ee))||ee===void 0&&!(B in $))&&no($,B,ee)}function kt($,B){for(var ee=$.length;ee--;)if(Pn($[ee][0],B))return ee;return-1}function no($,B,ee){B=="__proto__"&&Xe?Xe($,B,{configurable:!0,enumerable:!0,value:ee,writable:!0}):$[B]=ee}var id=md();function nn($){return $==null?$===void 0?S:m:Le&&Le in Object($)?bd($):Ed($)}function fa($){return so($)&&nn($)==s}function ad($){if(!Xt($)||ml($))return!1;var B=ai($)?A:ce;return B.test(oi($))}function sd($){return so($)&&zr($.length)&&!!H[nn($)]}function ld($){if(!Xt($))return _d($);var B=bl($),ee=[];for(var he in $)he=="constructor"&&(B||!Me.call($,he))||ee.push(he);return ee}function ni($,B,ee,he,$e){$!==B&&id(B,function(xe,Ie){if($e||($e=new Fe),Xt(xe))cd($,B,Ie,ee,ni,he,$e);else{var ke=he?he(ha($,Ie),xe,Ie+"",$,B,$e):void 0;ke===void 0&&(ke=xe),tr($,Ie,ke)}},xl)}function cd($,B,ee,he,$e,xe,Ie){var ke=ha($,ee),Re=ha(B,ee),Lt=Ie.get(Re);if(Lt){tr($,ee,Lt);return}var jt=xe?xe(ke,Re,ee+"",$,B,Ie):void 0,on=jt===void 0;if(on){var si=ao(Re),Ad=!si&&ii(Re),B1=!si&&!Ad&&_l(Re);jt=Re,si||Ad||B1?ao(ke)?jt=ke:yl(ke)?jt=hd(ke):Ad?(on=!1,jt=fd(Re,!0)):B1?(on=!1,jt=pd(Re,!0)):jt=[]:wl(Re)||io(Re)?(jt=ke,io(ke)?jt=El(ke):(!Xt(ke)||ai(ke))&&(jt=gl(Re))):on=!1}on&&(Ie.set(Re,jt),$e(jt,Re,he,xe,Ie),Ie.delete(Re)),tr($,ee,jt)}function hl($,B){return xd(pa($,B,j),$+"")}var ud=Xe?function($,B){return Xe($,"toString",{configurable:!0,enumerable:!1,value:Cd(B),writable:!0})}:j;function fd($,B){if(B)return $.slice();var ee=$.length,he=W?W(ee):new $.constructor(ee);return $.copy(he),he}function dd($){var B=new $.constructor($.byteLength);return new L(B).set(new L($)),B}function pd($,B){var ee=B?dd($.buffer):$.buffer;return new $.constructor(ee,$.byteOffset,$.length)}function hd($,B){var ee=-1,he=$.length;for(B||(B=Array(he));++ee<he;)B[ee]=$[ee];return B}function gd($,B,ee,he){var $e=!ee;ee||(ee={});for(var xe=-1,Ie=B.length;++xe<Ie;){var ke=B[xe],Re=he?he(ee[ke],$[ke],ke,ee,$):void 0;Re===void 0&&(Re=$[ke]),$e?no(ee,ke,Re):ri(ee,ke,Re)}return ee}function vd($){return hl(function(B,ee){var he=-1,$e=ee.length,xe=$e>1?ee[$e-1]:void 0,Ie=$e>2?ee[2]:void 0;for(xe=$.length>3&&typeof xe=="function"?($e--,xe):void 0,Ie&&yd(ee[0],ee[1],Ie)&&(xe=$e<3?void 0:xe,$e=1),B=Object(B);++he<$e;){var ke=ee[he];ke&&$(B,ke,he,xe)}return B})}function md($){return function(B,ee,he){for(var $e=-1,xe=Object(B),Ie=he(B),ke=Ie.length;ke--;){var Re=Ie[$?ke:++$e];if(ee(xe[Re],Re,xe)===!1)break}return B}}function oo($,B,ee,he,$e,xe){return Xt($)&&Xt(B)&&(xe.set(B,$),ni($,B,void 0,oo,xe),xe.delete(B)),$}function In($,B){var ee=$.__data__;return wd(B)?ee[typeof B=="string"?"string":"hash"]:ee.map}function da($,B){var ee=me($,B);return ad(ee)?ee:void 0}function bd($){var B=Me.call($,Le),ee=$[Le];try{$[Le]=void 0;var he=!0}catch{}var $e=Se.call($);return he&&(B?$[Le]=ee:delete $[Le]),$e}function gl($){return typeof $.constructor=="function"&&!bl($)?ro(X($)):{}}function vl($,B){var ee=typeof $;return B=B??a,!!B&&(ee=="number"||ee!="symbol"&&q.test($))&&$>-1&&$%1==0&&$<B}function yd($,B,ee){if(!Xt(ee))return!1;var he=typeof B;return(he=="number"?ga(ee)&&vl(B,ee.length):he=="string"&&B in ee)?Pn(ee[B],$):!1}function wd($){var B=typeof $;return B=="string"||B=="number"||B=="symbol"||B=="boolean"?$!=="__proto__":$===null}function ml($){return!!yt&&yt in $}function bl($){var B=$&&$.constructor,ee=typeof B=="function"&&B.prototype||Ne;return $===ee}function _d($){var B=[];if($!=null)for(var ee in Object($))B.push(ee);return B}function Ed($){return Se.call($)}function pa($,B,ee){return B=rn(B===void 0?$.length-1:B,0),function(){for(var he=arguments,$e=-1,xe=rn(he.length-B,0),Ie=Array(xe);++$e<xe;)Ie[$e]=he[B+$e];$e=-1;for(var ke=Array(B+1);++$e<B;)ke[$e]=he[$e];return ke[B]=ee(Ie),Z($,this,ke)}}function ha($,B){if(!(B==="constructor"&&typeof $[B]=="function")&&B!="__proto__")return $[B]}var xd=Sd(ud);function Sd($){var B=0,ee=0;return function(){var he=Xo(),$e=i-(he-ee);if(ee=he,$e>0){if(++B>=o)return arguments[0]}else B=0;return $.apply(void 0,arguments)}}function oi($){if($!=null){try{return Te.call($)}catch{}try{return $+""}catch{}}return""}function Pn($,B){return $===B||$!==$&&B!==B}var io=fa(function(){return arguments}())?fa:function($){return so($)&&Me.call($,"callee")&&!Pe.call($,"callee")},ao=Array.isArray;function ga($){return $!=null&&zr($.length)&&!ai($)}function yl($){return so($)&&ga($)}var ii=Qe||Q;function ai($){if(!Xt($))return!1;var B=nn($);return B==h||B==g||B==u||B==E}function zr($){return typeof $=="number"&&$>-1&&$%1==0&&$<=a}function Xt($){var B=typeof $;return $!=null&&(B=="object"||B=="function")}function so($){return $!=null&&typeof $=="object"}function wl($){if(!so($)||nn($)!=w)return!1;var B=X($);if(B===null)return!0;var ee=Me.call(B,"constructor")&&B.constructor;return typeof ee=="function"&&ee instanceof ee&&Te.call(ee)==De}var _l=T?pe(T):sd;function El($){return gd($,xl($))}var $d=hl(function($){return $.push(void 0,oo),Z(Sl,void 0,$)});function xl($){return ga($)?Wt($,!0):ld($)}var Sl=vd(function($,B,ee,he){ni($,B,ee,he)});function Cd($){return function(){return $}}function j($){return $}function Q(){return!1}e.exports=$d}(ks,ks.exports);var $8=ks.exports;const C8=ln($8);var Fi=(e,t,r)=>{if(e)return;let n="invariant violation";throw t&&(n+=`: ${t}`),r!=null&&r.A&&(n+=` [${r.A[0]}]`),r!=null&&r.F&&(n+=` at ${O8(r.F)}:${r.L}`),new A8(n)},A8=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},O8=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},T8=Ve({"node_modules/.pnpm/events@3.3.0/node_modules/events/events.js"(e,t){var r=typeof Reflect=="object"?Reflect:null,n=r&&typeof r.apply=="function"?r.apply:function(S,C,P){return Function.prototype.apply.call(S,C,P)},o;r&&typeof r.ownKeys=="function"?o=r.ownKeys:Object.getOwnPropertySymbols?o=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:o=function(S){return Object.getOwnPropertyNames(S)};function i(I){console&&console.warn&&console.warn(I)}var a=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}t.exports=s,t.exports.once=E,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(I){if(typeof I!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof I)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(I){if(typeof I!="number"||I<0||a(I))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+I+".");l=I}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||a(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function f(I){return I._maxListeners===void 0?s.defaultMaxListeners:I._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(S){for(var C=[],P=1;P<arguments.length;P++)C.push(arguments[P]);var F=S==="error",D=this._events;if(D!==void 0)F=F&&D.error===void 0;else if(!F)return!1;if(F){var N;if(C.length>0&&(N=C[0]),N instanceof Error)throw N;var J=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw J.context=N,J}var K=D[S];if(K===void 0)return!1;if(typeof K=="function")n(K,this,C);else for(var Y=K.length,te=y(K,Y),P=0;P<Y;++P)n(te[P],this,C);return!0};function d(I,S,C,P){var F,D,N;if(u(C),D=I._events,D===void 0?(D=I._events=Object.create(null),I._eventsCount=0):(D.newListener!==void 0&&(I.emit("newListener",S,C.listener?C.listener:C),D=I._events),N=D[S]),N===void 0)N=D[S]=C,++I._eventsCount;else if(typeof N=="function"?N=D[S]=P?[C,N]:[N,C]:P?N.unshift(C):N.push(C),F=f(I),F>0&&N.length>F&&!N.warned){N.warned=!0;var J=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");J.name="MaxListenersExceededWarning",J.emitter=I,J.type=S,J.count=N.length,i(J)}return I}s.prototype.addListener=function(S,C){return d(this,S,C,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,C){return d(this,S,C,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(I,S,C){var P={fired:!1,wrapFn:void 0,target:I,type:S,listener:C},F=p.bind(P);return F.listener=C,P.wrapFn=F,F}s.prototype.once=function(S,C){return u(C),this.on(S,h(this,S,C)),this},s.prototype.prependOnceListener=function(S,C){return u(C),this.prependListener(S,h(this,S,C)),this},s.prototype.removeListener=function(S,C){var P,F,D,N,J;if(u(C),F=this._events,F===void 0)return this;if(P=F[S],P===void 0)return this;if(P===C||P.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete F[S],F.removeListener&&this.emit("removeListener",S,P.listener||C));else if(typeof P!="function"){for(D=-1,N=P.length-1;N>=0;N--)if(P[N]===C||P[N].listener===C){J=P[N].listener,D=N;break}if(D<0)return this;D===0?P.shift():m(P,D),P.length===1&&(F[S]=P[0]),F.removeListener!==void 0&&this.emit("removeListener",S,J||C)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var C,P,F;if(P=this._events,P===void 0)return this;if(P.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):P[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete P[S]),this;if(arguments.length===0){var D=Object.keys(P),N;for(F=0;F<D.length;++F)N=D[F],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(C=P[S],typeof C=="function")this.removeListener(S,C);else if(C!==void 0)for(F=C.length-1;F>=0;F--)this.removeListener(S,C[F]);return this};function g(I,S,C){var P=I._events;if(P===void 0)return[];var F=P[S];return F===void 0?[]:typeof F=="function"?C?[F.listener||F]:[F]:C?w(F):y(F,F.length)}s.prototype.listeners=function(S){return g(this,S,!0)},s.prototype.rawListeners=function(S){return g(this,S,!1)},s.listenerCount=function(I,S){return typeof I.listenerCount=="function"?I.listenerCount(S):v.call(I,S)},s.prototype.listenerCount=v;function v(I){var S=this._events;if(S!==void 0){var C=S[I];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function y(I,S){for(var C=new Array(S),P=0;P<S;++P)C[P]=I[P];return C}function m(I,S){for(;S+1<I.length;S++)I[S]=I[S+1];I.pop()}function w(I){for(var S=new Array(I.length),C=0;C<S.length;++C)S[C]=I[C].listener||I[C];return S}function E(I,S){return new Promise(function(C,P){function F(N){I.removeListener(S,D),P(N)}function D(){typeof I.removeListener=="function"&&I.removeListener("error",F),C([].slice.call(arguments))}k(I,S,D,{once:!0}),S!=="error"&&x(I,F,{once:!0})})}function x(I,S,C){typeof I.on=="function"&&k(I,"error",S,C)}function k(I,S,C,P){if(typeof I.on=="function")P.once?I.once(S,C):I.on(S,C);else if(typeof I.addEventListener=="function")I.addEventListener(S,function F(D){P.once&&I.removeEventListener(S,F),C(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof I)}}}),Hb=Li(T8());Hb.EventEmitter,Hb.EventEmitter;var Ns=e=>{const t=Object.getPrototypeOf(e).constructor.name;return e.toJSON?`${t}(${Er(e.toJSON())})`:String(e)},Vb=e=>{throw e},zb;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.VERBOSE=1]="VERBOSE",e[e.BOLD=2]="BOLD"})(zb||(zb={}));var I8=(e,t=8)=>{const r=String(e);return r.length<=t?r:r.slice(0,t)},Ds=Symbol.for("devtoolsFormatter"),P8=()=>{typeof window<"u"&&(window.devtoolsFormatters??(window.devtoolsFormatters=[])).push({header:(e,t)=>{const r=e[Ds];if(r===void 0)return null;if(typeof r!="object"||r===null||typeof r.header!="function")throw new Error(`Invalid devtools formatter for ${e.constructor.name}`);return r.header(t)},hasBody:(e,t)=>{const r=e[Ds];return!r||!r.hasBody?!1:r.hasBody(t)},body:(e,t)=>{const r=e[Ds];return!r||!r.body?null:r.body(t)}})};P8();var k8=Symbol.for("dxos.common.equals"),Pu={exports:{}},ku={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=er,n=r.Buffer;function o(a,s){for(var l in a)s[l]=a[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=i);function i(a,s,l){return n(a,s,l)}i.prototype=Object.create(n.prototype),o(n,i),i.from=function(a,s,l){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,s,l)},i.alloc=function(a,s,l){if(typeof a!="number")throw new TypeError("Argument must be a number");var u=n(a);return s!==void 0?typeof l=="string"?u.fill(s,l):u.fill(s):u.fill(0),u},i.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},i.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(a)}})(ku,ku.exports);var Gb=ku.exports,Nu=65536,N8=4294967295;function D8(){throw new Error(`Secure random number generation is not supported by this browser.
106
+ Use Chrome, Firefox or Internet Explorer 11`)}var L8=Gb.Buffer,Ls=Je.crypto||Je.msCrypto;Ls&&Ls.getRandomValues?Pu.exports=M8:Pu.exports=D8;function M8(e,t){if(e>N8)throw new RangeError("requested too many random bytes");var r=L8.allocUnsafe(e);if(e>0)if(e>Nu)for(var n=0;n<e;n+=Nu)Ls.getRandomValues(r.slice(n,n+Nu));else Ls.getRandomValues(r);return typeof t=="function"?process.nextTick(function(){t(null,r)}):r}var F8=Pu.exports;const j8=ln(F8);var Du="/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts",B8=32,Kb=class Ht{static from(t){if(Fi(t,void 0,{F:Du,L:31,S:this,A:["source",""]}),t instanceof Ht)return t;if(t instanceof er.Buffer)return new Ht(new Uint8Array(t.buffer,t.byteOffset,t.byteLength));if(t instanceof Uint8Array)return new Ht(t);if(t instanceof ArrayBuffer)return new Ht(new Uint8Array(t));if(typeof t=="string")return Ht.fromHex(t);if(t.asUint8Array)return new Ht(t.asUint8Array());throw new TypeError(`Unable to create PublicKey from ${t}`)}static safeFrom(t){if(t)try{return Ht.from(t)}catch{return}}static fromHex(t){t.startsWith("0x")&&(t=t.slice(2));const r=er.Buffer.from(t,"hex");return new Ht(new Uint8Array(r.buffer,r.byteOffset,r.byteLength))}static random(){return Ht.from(j8(B8))}static*randomSequence(){for(let t=0;t<1e4;t++)yield Ht.random();throw new Error("Too many keys requested")}static isPublicKey(t){return t instanceof Ht}static assertValidPublicKey(t){if(!this.isPublicKey(t))throw new TypeError("Invalid PublicKey")}static equals(t,r){return Ht.from(t).equals(r)}static bufferize(t){return Fi(typeof t=="string","Invalid type",{F:Du,L:130,S:this,A:["typeof str === 'string'","'Invalid type'"]}),er.Buffer.from(t,"hex")}static stringify(t){return t instanceof Ht?t=t.asBuffer():t instanceof Uint8Array&&(t=er.Buffer.from(t.buffer,t.byteOffset,t.byteLength)),Fi(t instanceof er.Buffer,"Invalid type",{F:Du,L:149,S:this,A:["key instanceof Buffer","'Invalid type'"]}),t.toString("hex")}static hash(t){return t.toHex()}constructor(t){if(this._value=t,!(t instanceof Uint8Array))throw new TypeError(`Expected Uint8Array, got: ${t}`)}toString(){return this.toHex()}toJSON(){return this.toHex()}get length(){return this._value.length}toHex(){return this.asBuffer().toString("hex")}truncate(t=void 0){return I8(this,t)}asBuffer(){return er.Buffer.from(this._value.buffer,this._value.byteOffset,this._value.byteLength)}asUint8Array(){return this._value}getInsecureHash(t){return Math.abs(this._value.reduce((r,n)=>r^n|0,0))%t}[Er.custom](t,r){if(!r.colors||typeof Is.stdout.hasColors!="function"||!Is.stdout.hasColors())return`<PublicKey ${this.truncate()}>`;const n=a=>`\x1B[${a}m`,o=["red","green","yellow","blue","magenta","cyan","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright"],i=o[this.getInsecureHash(o.length)];return`PublicKey(${n(Er.colors[i][0])}${this.truncate()}${n(Er.colors.reset[0])})`}get[Ds](){return{header:()=>{const t=["darkred","green","orange","blue","darkmagenta","darkcyan","red","green","orange","blue","magenta","darkcyan","black"],r=t[this.getInsecureHash(t.length)];return["span",{},["span",{},"PublicKey("],["span",{style:`color: ${r};`},this.truncate()],["span",{},")"]]}}}equals(t){const r=Ht.from(t);if(this._value.length!==r._value.length)return!1;let n=!0;for(let o=0;o<this._value.length;o++)n&&(n=this._value[o]===r._value[o]);return n}[k8](t){return Ht.isPublicKey(t)?this.equals(t):!1}},qb=10;(class{constructor(e,t){if(this._projection=e,this._values=new Map,t)for(const r of t)this.add(r)}toString(){return Ns(this)}toJSON(){return this._values.size>qb?{size:this._values.size}:Array.from(this._values.values())}[Er.custom](){return Ns(this)}add(e){return this._values.set(this._projection(e),e),this}clear(){this._values.clear()}delete(e){return this._values.delete(this._projection(e))}forEach(e,t){t&&(e=e.bind(t)),this._values.forEach(r=>e(r,r,this))}has(e){return this._values.has(this._projection(e))}get size(){return this._values.size}[Symbol.iterator](){return this._values.values()}*entries(){for(const e of this._values.values())yield[e,e]}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}get[Symbol.toStringTag](){return"ComplexSet"}}),class{constructor(e,t){if(this._keyProjection=e,this._keys=new Map,this._values=new Map,t)for(const[r,n]of t)this.set(r,n)}toString(){return Ns(this)}toJSON(){return this._values.size>qb?{size:this._values.size}:Array.from(this._values.values())}[Er.custom](){return Ns(this)}clear(){this._keys.clear(),this._values.clear()}delete(e){const t=this._keys.delete(this._keyProjection(e)),r=this._values.delete(this._keyProjection(e));return t||r}forEach(e,t){t&&(e=e.bind(t)),this._keys.forEach((r,n)=>e(this._values.get(n)??Vb(new Error("Map corrupted.")),r,this))}get(e){return this._values.get(this._keyProjection(e))}has(e){return this._keys.has(this._keyProjection(e))}set(e,t){const r=this._keyProjection(e);return this._keys.set(r,e),this._values.set(r,t),this}get size(){return this._keys.size}*[Symbol.iterator](){for(const[e,t]of this._keys){const r=this._values.get(e)??Vb(new Error("Map corrupted."));yield[t,r]}}entries(){return this[Symbol.iterator]()}keys(){return this._keys.values()}values(){return this._values.values()}get[Symbol.toStringTag](){return"ComplexMap"}};var R8=["ack","alabama","alanine","alaska","alpha","angel","apart","april","arizona","arkansas","artist","asparagus","aspen","august","autumn","avocado","bacon","bakerloo","batman","beer","berlin","beryllium","black","blossom","blue","bluebird","bravo","bulldog","burger","butter","california","carbon","cardinal","carolina","carpet","cat","ceiling","charlie","chicken","coffee","cola","cold","colorado","comet","connecticut","crazy","cup","dakota","december","delaware","delta","diet","don","double","early","earth","east","echo","edward","eight","eighteen","eleven","emma","enemy","equal","failed","fanta","fifteen","fillet","finch","fish","five","fix","floor","florida","football","four","fourteen","foxtrot","freddie","friend","fruit","gee","georgia","glucose","golf","green","grey","hamper","happy","harry","hawaii","helium","high","hot","hotel","hydrogen","idaho","illinois","india","indigo","ink","iowa","island","item","jersey","jig","johnny","juliet","july","jupiter","kansas","kentucky","kilo","king","kitten","lactose","lake","lamp","lemon","leopard","lima","lion","lithium","london","louisiana","low","magazine","magnesium","maine","mango","march","mars","maryland","massachusetts","may","mexico","michigan","mike","minnesota","mirror","mississippi","missouri","mobile","mockingbird","monkey","montana","moon","mountain","muppet","music","nebraska","neptune","network","nevada","nine","nineteen","nitrogen","north","november","nuts","october","ohio","oklahoma","one","orange","oranges","oregon","oscar","oven","oxygen","papa","paris","pasta","pennsylvania","pip","pizza","pluto","potato","princess","purple","quebec","queen","quiet","red","river","robert","robin","romeo","rugby","sad","salami","saturn","september","seven","seventeen","shade","sierra","single","sink","six","sixteen","skylark","snake","social","sodium","solar","south","spaghetti","speaker","spring","stairway","steak","stream","summer","sweet","table","tango","ten","tennessee","tennis","texas","thirteen","three","timing","triple","twelve","twenty","two","uncle","undress","uniform","uranus","utah","vegan","venus","vermont","victor","video","violet","virginia","washington","west","whiskey","white","william","winner","winter","wisconsin","wolfram","wyoming","xray","yankee","yellow","zebra","zulu"],U8=class{constructor(e=R8){if(this.wordlist=e,e.length!==256)throw new Error("Wordlist must have exactly 256 items");this.wordlist=e}humanize(e,t=4,r="-"){const n=e.match(/(..?)/g);if(!n)throw new Error("");const o=n.map(a=>parseInt(a,16));return this._compress(o,t).map(a=>this.wordlist[a]).join(r)}_compress(e,t){const r=e.length;if(t>r)throw new Error("Fewer input bytes than requested output");const n=r/t>>0,o=[];for(let a=0;a<n*t;a+=n)o.push(e.slice(a,a+n));return o[o.length-1]=o[o.length-1].concat(e.slice(t*n)),o.map(a=>a.reduce((s,l)=>s^l))}},W8=new U8,H8=e=>(e instanceof er.Buffer||e instanceof Uint8Array||e instanceof ArrayBuffer?e=Kb.stringify(e):e instanceof Kb&&(e=e.toHex()),W8.humanize(e)),V8=e=>er.Buffer.from(e.buffer,e.byteOffset,e.byteLength),z8=5,Lu=(e,t=0,r=new WeakSet)=>{if(t>z8)return null;if(typeof e=="function")return null;if(typeof e=="object"&&e!==null){if(r.has(e))return null;r.add(e);try{if(e instanceof Uint8Array)return V8(e).toString("hex");if(Array.isArray(e))return e.map(n=>Lu(n,t+1,r));if(typeof e.toJSON=="function")return e.toJSON();{const n={};for(const o of Object.keys(e))n[o]=Lu(e[o],t+1,r);return n}}finally{r.delete(e)}}else return e},G8=(e,t,r)=>{let n=e.get(t);return n===void 0&&(n=typeof r=="function"?r():r,e.set(t,n)),n},K8=()=>typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Mu=Symbol("instanceTag"),q8=e=>t=>{t.prototype[Mu]=e,Object.defineProperty(t.prototype,Symbol.hasInstance,{value:r=>(r==null?void 0:r[Mu])===e}),Object.defineProperty(t,Symbol.hasInstance,{value:r=>(r==null?void 0:r[Mu])===e})},Fu=Symbol.for("dxos.instance-contexts"),Y8=globalThis[Fu]??(globalThis[Fu]=new WeakMap),J8=e=>{const t=Object.getPrototypeOf(e),r=G8(Y8,t,()=>({nextId:0,instanceIds:new WeakMap}));let n=r.instanceIds.get(e);return n===void 0&&(n=r.nextId++,r.instanceIds.set(e,n)),n},ju=()=>{throw new Error("Not available on this platform")},X8=()=>ju(),Z8=()=>ju(),Q8=()=>ju(),Yb=Ve({"node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"(e,t){function r(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function n(a,s){for(var l="",u=0,f=-1,d=0,p,h=0;h<=a.length;++h){if(h<a.length)p=a.charCodeAt(h);else{if(p===47)break;p=47}if(p===47){if(!(f===h-1||d===1))if(f!==h-1&&d===2){if(l.length<2||u!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var g=l.lastIndexOf("/");if(g!==l.length-1){g===-1?(l="",u=0):(l=l.slice(0,g),u=l.length-1-l.lastIndexOf("/")),f=h,d=0;continue}}else if(l.length===2||l.length===1){l="",u=0,f=h,d=0;continue}}s&&(l.length>0?l+="/..":l="..",u=2)}else l.length>0?l+="/"+a.slice(f+1,h):l=a.slice(f+1,h),u=h-f-1;f=h,d=0}else p===46&&d!==-1?++d:d=-1}return l}function o(a,s){var l=s.dir||s.root,u=s.base||(s.name||"")+(s.ext||"");return l?l===s.root?l+u:l+a+u:u}var i={resolve:function(){for(var s="",l=!1,u,f=arguments.length-1;f>=-1&&!l;f--){var d;f>=0?d=arguments[f]:(u===void 0&&(u=process.cwd()),d=u),r(d),d.length!==0&&(s=d+"/"+s,l=d.charCodeAt(0)===47)}return s=n(s,!l),l?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(r(s),s.length===0)return".";var l=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=n(s,!l),s.length===0&&!l&&(s="."),s.length>0&&u&&(s+="/"),l?"/"+s:s},isAbsolute:function(s){return r(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,l=0;l<arguments.length;++l){var u=arguments[l];r(u),u.length>0&&(s===void 0?s=u:s+="/"+u)}return s===void 0?".":i.normalize(s)},relative:function(s,l){if(r(s),r(l),s===l||(s=i.resolve(s),l=i.resolve(l),s===l))return"";for(var u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var f=s.length,d=f-u,p=1;p<l.length&&l.charCodeAt(p)===47;++p);for(var h=l.length,g=h-p,v=d<g?d:g,y=-1,m=0;m<=v;++m){if(m===v){if(g>v){if(l.charCodeAt(p+m)===47)return l.slice(p+m+1);if(m===0)return l.slice(p+m)}else d>v&&(s.charCodeAt(u+m)===47?y=m:m===0&&(y=0));break}var w=s.charCodeAt(u+m),E=l.charCodeAt(p+m);if(w!==E)break;w===47&&(y=m)}var x="";for(m=u+y+1;m<=f;++m)(m===f||s.charCodeAt(m)===47)&&(x.length===0?x+="..":x+="/..");return x.length>0?x+l.slice(p+y):(p+=y,l.charCodeAt(p)===47&&++p,l.slice(p))},_makeLong:function(s){return s},dirname:function(s){if(r(s),s.length===0)return".";for(var l=s.charCodeAt(0),u=l===47,f=-1,d=!0,p=s.length-1;p>=1;--p)if(l=s.charCodeAt(p),l===47){if(!d){f=p;break}}else d=!1;return f===-1?u?"/":".":u&&f===1?"//":s.slice(0,f)},basename:function(s,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');r(s);var u=0,f=-1,d=!0,p;if(l!==void 0&&l.length>0&&l.length<=s.length){if(l.length===s.length&&l===s)return"";var h=l.length-1,g=-1;for(p=s.length-1;p>=0;--p){var v=s.charCodeAt(p);if(v===47){if(!d){u=p+1;break}}else g===-1&&(d=!1,g=p+1),h>=0&&(v===l.charCodeAt(h)?--h===-1&&(f=p):(h=-1,f=g))}return u===f?f=g:f===-1&&(f=s.length),s.slice(u,f)}else{for(p=s.length-1;p>=0;--p)if(s.charCodeAt(p)===47){if(!d){u=p+1;break}}else f===-1&&(d=!1,f=p+1);return f===-1?"":s.slice(u,f)}},extname:function(s){r(s);for(var l=-1,u=0,f=-1,d=!0,p=0,h=s.length-1;h>=0;--h){var g=s.charCodeAt(h);if(g===47){if(!d){u=h+1;break}continue}f===-1&&(d=!1,f=h+1),g===46?l===-1?l=h:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||f===-1||p===0||p===1&&l===f-1&&l===u+1?"":s.slice(l,f)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return o("/",s)},parse:function(s){r(s);var l={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return l;var u=s.charCodeAt(0),f=u===47,d;f?(l.root="/",d=1):d=0;for(var p=-1,h=0,g=-1,v=!0,y=s.length-1,m=0;y>=d;--y){if(u=s.charCodeAt(y),u===47){if(!v){h=y+1;break}continue}g===-1&&(v=!1,g=y+1),u===46?p===-1?p=y:m!==1&&(m=1):p!==-1&&(m=-1)}return p===-1||g===-1||m===0||m===1&&p===g-1&&p===h+1?g!==-1&&(h===0&&f?l.base=l.name=s.slice(1,g):l.base=l.name=s.slice(h,g)):(h===0&&f?(l.name=s.slice(1,p),l.base=s.slice(1,g)):(l.name=s.slice(h,p),l.base=s.slice(h,g)),l.ext=s.slice(p,g)),h>0?l.dir=s.slice(0,h-1):f&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}});Li(Yb());var Wr=Li(Yb());Wr.basename;var eD=Wr.dirname;Wr.extname,Wr.format,Wr.isAbsolute,Wr.join,Wr.normalize,Wr.parse,Wr.relative,Wr.resolve;var _t;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(_t||(_t={}));var tD={trace:5,debug:10,info:11,warn:12,error:13},ji;(function(e){e.CONSOLE="console",e.BROWSER="browser",e.DEBUG="debug"})(ji||(ji={}));var rD=Symbol("logInfoProperties"),nD=e=>{if(!e)return{};const t={},n=Object.getPrototypeOf(e)[rD]??[];for(const o of n)try{t[o]=typeof e[o]=="function"?e[o]():e[o]}catch(i){t[o]=i.message}return t},oD=(e,t,r)=>t>=e.level&&(!e.pattern||r.includes(e.pattern)),Jb=(e,t)=>t===void 0?!0:t.some(r=>{var n;return oD(r,e.level,((n=e.meta)==null?void 0:n.F)??"")}),Bu=e=>{let t;if(e.meta){const r=nD(e.meta.S);Object.keys(r).length>0&&(t=Object.assign(t??{},r))}if(e.context)if(e.context instanceof Error){const r=e.context.context;t=Object.assign(t??{},{error:e.context.stack,...r})}else typeof e.context=="object"&&(t=Object.assign(t??{},e.context));return t&&Object.keys(t).length>0?t:void 0},iD=0,aD=e=>(t,r,n)=>(o,i,a)=>{const s=a.value;a.value=function(...l){const u={...n??{},S:this},f=l.map(d=>Er(d,!1,1,!0)).join(", ");try{const d=performance.now(),p=s.apply(this,l);if(sD(p)){const h=iD++;e.info(`${i}(${f}) => Promise { #${h} }`,{},u),p.then(g=>{g!==void 0?e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms => ${Er(g,!1,1,!0)}`,{},u):e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms`,{},u)},g=>{e.info(`🔥 reject #${h} #${(performance.now()-d).toFixed(0)}ms => ${g}`,{},u)})}else e.info(`${i}(${f}) => ${Er(p,!1,1,!0)}`,{},u);return p}catch(d){throw e.error(`${i}(${f}) 🔥 ${d}`,{},u),d}},Object.defineProperty(a.value,"name",{value:i+"$log"})},sD=e=>e&&typeof e.then=="function",lD=e=>{try{return JSON.parse(localStorage.getItem("dxlog"))}catch{return}},Xb=()=>{},cD=(e,t)=>{console.log(Er(t,!1,null,!0))},Zb=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},Ru=typeof mochaExecutor<"u"?{useTestProcessor:!0,printFileLinks:!0}:{useTestProcessor:!1,printFileLinks:!1},uD=(e,t)=>{var u,f,d;if(!Jb(t,e.filters))return;const r=e.prefix??"https://vscode.dev/github.com/dxos/dxos/blob/main/",n=[];let o="";if(t.meta){const p=Zb(t.meta.F);o=`${`${r.replace(/\/$/,"")}/${p}`}#L${t.meta.L}`}let i=[];if((u=t.meta)!=null&&u.S){const p=(f=t.meta)==null?void 0:f.S,h=Object.getPrototypeOf(p),g=J8(p);i.push(`%c${h.constructor.name}#${g}`,"color:#C026D3;font-weight:bold")}i.push(t.message);const a=Bu(t);a&&i.push(a);const s={[_t.ERROR]:console.error,[_t.WARN]:console.warn,[_t.DEBUG]:console.log};(Ru.printFileLinks||K8())&&(n!=null&&n.length?i=[`%c${o}
107
107
  %c${i.join(" ")}`,...n]:i=[o+`
108
- `,...i]);const l=s[t.level]??console.log;typeof((d=t.meta)==null?void 0:d.C)=="function"?t.meta.C(l,i):l(...i)},cD=(e,t)=>{var s;if(!qb(t,e.filters))return;let r="";t.meta&&(r=`${Jb(t.meta.F)}:${t.meta.L}`);let n=[];n.push(t.message);const o=ju(t);o&&n.push(o);const i={[wt.ERROR]:console.error,[wt.WARN]:console.warn,[wt.DEBUG]:console.log};Bu.printFileLinks&&(n=[r,...n]);const a=i[t.level]??console.log;typeof((s=t.meta)==null?void 0:s.C)=="function"?t.meta.C(a,n):a(...n)},Xb=Bu.useTestProcessor?cD:lD,uD=({path:e,levels:t})=>{let r;return(n,o)=>{var a,s;if(!t.includes(o.level))return;if(!r){try{J8(Z8(e))}catch{}r=X8()}const i={...o,timestamp:Date.now(),meta:{file:(a=o.meta)==null?void 0:a.F,line:(s=o.meta)==null?void 0:s.L},context:Du(ju(o))};Y8(r,JSON.stringify(i)+`
109
- `)}},Zb,fD=()=>(Zb??(Zb=process.env.LOG_FILE??(process.env.HOME?`${process.env.HOME}/.dxlog/${new Date().toISOString()}.log`:void 0)),Zb);uD({path:fD(),levels:[wt.ERROR,wt.WARN,wt.INFO,wt.TRACE]});var dD={[Fi.CONSOLE]:Yb,[Fi.BROWSER]:Xb,[Fi.DEBUG]:sD},pD=typeof window<"u"||typeof navigator<"u",Ru=[pD?Xb:Yb],Qb=e=>{if(typeof e=="number")return[{level:e}];const t=(n,o=wt.WARN)=>Q8[n.toLowerCase()]??o;return(typeof e=="string"?e.split(/,\s*/):e).map(n=>{const[o,i]=n.split(":");return i?{level:t(i),pattern:o}:{level:t(o)}})},e0=e=>{const t="process"in globalThis?{file:process.env.LOG_CONFIG,filter:process.env.LOG_FILTER,processor:process.env.LOG_PROCESSOR}:void 0,r=S8({},e,t&&aD(t.file),t);return{options:r,filters:Qb(r.filter??wt.INFO),captureFilters:Qb(r.captureFilter??wt.WARN),processors:r.processor?[dD[r.processor]]:Ru,prefix:r.prefix}},hD=()=>{const e=(...r)=>t(wt.DEBUG,...r);e._config=e0(),Object.defineProperty(e,"runtimeConfig",{get:()=>e._config}),e.addProcessor=r=>{Ru.filter(n=>n===r).length===0&&Ru.push(r),e._config.processors.filter(n=>n===r).length===0&&e._config.processors.push(r)},e.config=r=>{e._config=e0(r)},e.trace=(...r)=>t(wt.TRACE,...r),e.debug=(...r)=>t(wt.DEBUG,...r),e.info=(...r)=>t(wt.INFO,...r),e.warn=(...r)=>t(wt.WARN,...r),e.error=(...r)=>t(wt.ERROR,...r),e.catch=(r,n,o)=>t(wt.ERROR,r.stack,n,o),e.break=()=>e.info("——————————————————————————————————————————————————"),e.stack=(r,n,o)=>t(wt.INFO,`${r??"Stack Dump"}
110
- ${gD()}`,n,o),e.method=oD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEach(s=>s(e._config,{level:r,message:n,context:o,meta:i,error:a}))};return e},Xe=globalThis.dx_log??(globalThis.dx_log=hD()),gD=()=>new Error().stack.split(`
108
+ `,...i]);const l=s[t.level]??console.log;typeof((d=t.meta)==null?void 0:d.C)=="function"?t.meta.C(l,i):l(...i)},fD=(e,t)=>{var s;if(!Jb(t,e.filters))return;let r="";t.meta&&(r=`${Zb(t.meta.F)}:${t.meta.L}`);let n=[];n.push(t.message);const o=Bu(t);o&&n.push(o);const i={[_t.ERROR]:console.error,[_t.WARN]:console.warn,[_t.DEBUG]:console.log};Ru.printFileLinks&&(n=[r,...n]);const a=i[t.level]??console.log;typeof((s=t.meta)==null?void 0:s.C)=="function"?t.meta.C(a,n):a(...n)},Qb=Ru.useTestProcessor?fD:uD,dD=({path:e,levels:t})=>{let r;return(n,o)=>{var a,s;if(!t.includes(o.level))return;if(!r){try{Z8(eD(e))}catch{}r=Q8()}const i={...o,timestamp:Date.now(),meta:{file:(a=o.meta)==null?void 0:a.F,line:(s=o.meta)==null?void 0:s.L},context:Lu(Bu(o))};X8(r,JSON.stringify(i)+`
109
+ `)}},e0,pD=()=>(e0??(e0=process.env.LOG_FILE??(process.env.HOME?`${process.env.HOME}/.dxlog/${new Date().toISOString()}.log`:void 0)),e0);dD({path:pD(),levels:[_t.ERROR,_t.WARN,_t.INFO,_t.TRACE]});var hD={[ji.CONSOLE]:Xb,[ji.BROWSER]:Qb,[ji.DEBUG]:cD},gD=typeof window<"u"||typeof navigator<"u",Uu=[gD?Qb:Xb],t0=e=>{if(typeof e=="number")return[{level:e}];const t=(n,o=_t.WARN)=>tD[n.toLowerCase()]??o;return(typeof e=="string"?e.split(/,\s*/):e).map(n=>{const[o,i]=n.split(":");return i?{level:t(i),pattern:o}:{level:t(o)}})},r0=e=>{const t="process"in globalThis?{file:process.env.LOG_CONFIG,filter:process.env.LOG_FILTER,processor:process.env.LOG_PROCESSOR}:void 0,r=C8({},e,t&&lD(t.file),t);return{options:r,filters:t0(r.filter??_t.INFO),captureFilters:t0(r.captureFilter??_t.WARN),processors:r.processor?[hD[r.processor]]:Uu,prefix:r.prefix}},vD=()=>{const e=(...r)=>t(_t.DEBUG,...r);e._config=r0(),Object.defineProperty(e,"runtimeConfig",{get:()=>e._config}),e.addProcessor=r=>{Uu.filter(n=>n===r).length===0&&Uu.push(r),e._config.processors.filter(n=>n===r).length===0&&e._config.processors.push(r)},e.config=r=>{e._config=r0(r)},e.trace=(...r)=>t(_t.TRACE,...r),e.debug=(...r)=>t(_t.DEBUG,...r),e.info=(...r)=>t(_t.INFO,...r),e.warn=(...r)=>t(_t.WARN,...r),e.error=(...r)=>t(_t.ERROR,...r),e.catch=(r,n,o)=>t(_t.ERROR,r.stack,n,o),e.break=()=>e.info("——————————————————————————————————————————————————"),e.stack=(r,n,o)=>t(_t.INFO,`${r??"Stack Dump"}
110
+ ${mD()}`,n,o),e.method=aD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEach(s=>s(e._config,{level:r,message:n,context:o,meta:i,error:a}))};return e},Ze=globalThis.dx_log??(globalThis.dx_log=vD()),mD=()=>new Error().stack.split(`
111
111
  `).slice(3).join(`
112
- `),vD=Symbol("kDebugInfoProperties");(class{constructor(e,t){this.constr=e,this.parent=t}getInfo(){if(!this.instance)return{};const e=this.constr.prototype[vD]??[],t={};for(const r of e)t[r]=this.instance[r];return t}[_r.custom](){return{className:this.constr.name,info:this.getInfo(),parent:this.parent}}});var mD=class extends Error{constructor(){super("Context disposed.")}};function bD(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}var Uu="/home/runner/work/dxos/dxos/packages/common/context/src/context.ts",yD=300,t0=class B1{constructor({onError:t=o=>{if(!(o instanceof mD))throw this.dispose(),o},attributes:r={},parent:n}={}){this._disposeCallbacks=[],this._isDisposed=!1,this._disposePromise=void 0,this._parent=null,this.maxSafeDisposeCallbacks=yD,this._onError=t,this._attributes=r,n!==void 0&&(this._parent=n)}get disposed(){return this._isDisposed}get disposeCallbacksLength(){return this._disposeCallbacks.length}onDispose(t){return this._isDisposed&&(async()=>{try{await t()}catch(r){Xe.catch(r,void 0,{F:Uu,L:82,S:this,C:(n,o)=>n(...o)})}})(),this._disposeCallbacks.push(t),this._disposeCallbacks.length>this.maxSafeDisposeCallbacks&&Xe.warn("Context has a large number of dispose callbacks. This might be a memory leak.",{count:this._disposeCallbacks.length,safeThreshold:this.maxSafeDisposeCallbacks},{F:Uu,L:89,S:this,C:(r,n)=>r(...n)}),()=>{const r=this._disposeCallbacks.indexOf(t);r!==-1&&this._disposeCallbacks.splice(r,1)}}dispose(){if(this._disposePromise)return this._disposePromise;this._isDisposed=!0;const t=[];for(const r of this._disposeCallbacks.reverse())t.push((async()=>{try{await r()}catch(n){Xe.catch(n,void 0,{F:Uu,L:124,S:this,C:(o,i)=>o(...i)})}})());return this._disposeCallbacks.length=0,this._disposePromise=Promise.all(t).then(()=>{})}raise(t){if(!this._isDisposed)try{this._onError(t)}catch(r){Promise.reject(r)}}derive({onError:t,attributes:r}={}){const n=new B1({onError:async i=>{if(!t)this.raise(i);else try{await t(i)}catch{this.raise(i)}},attributes:r}),o=this.onDispose(()=>n.dispose());return n.onDispose(o),n}getAttribute(t){if(t in this._attributes)return this._attributes[t];if(this._parent!==null)return this._parent.getAttribute(t)}};t0=bD([G8("Context")],t0);var Ls={};Object.defineProperty(Ls,"__esModule",{value:!0}),Ls.Observable=void 0;const r0=e=>!!Symbol[e],Wu=e=>r0(e)?Symbol[e]:"@@"+e,wD=Wu("iterator"),Hu=Wu("observable"),n0=Wu("species");function Ms(e,t){let r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function ji(e){let t=e.constructor;return t!==void 0&&(t=t[n0],t===null&&(t=void 0)),t!==void 0?t:js}function _D(e){return e instanceof js}function Mo(e){Mo.log?Mo.log(e):setTimeout(()=>{throw e})}function Fs(e){Promise.resolve().then(()=>{try{e()}catch(t){Mo(t)}})}function o0(e){let t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{let r=Ms(t,"unsubscribe");r&&r.call(t)}}catch(r){Mo(r)}}function Vu(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function ED(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(i0(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function i0(e,t,r){e._state="running";let n=e._observer;try{let o=Ms(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(Vu(e),o)o.call(n,r);else throw r;break;case"complete":Vu(e),o&&o.call(n);break}}catch(o){Mo(o)}e._state==="closed"?o0(e):e._state==="running"&&(e._state="ready")}function zu(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],Fs(()=>ED(e));return}i0(e,t,r)}}class xD{constructor(t,r){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";let n=this,o={get closed(){return n._state==="closed"},next(i){zu(n,"next",i)},error(i){zu(n,"error",i)},complete(){zu(n,"complete")}};try{this._cleanup=r.call(void 0,o)}catch(i){o.error(i)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(Vu(this),o0(this))}}let js=class Sl{constructor(t){if(!(this instanceof Sl))throw new TypeError("Observable cannot be called as a function");if(typeof t!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=t}subscribe(t){return(typeof t!="object"||t===null)&&(t={next:t,error:arguments[1],complete:arguments[2]}),new xD(t,this._subscriber)}forEach(t){return new Promise((r,n)=>{if(typeof t!="function"){n(new TypeError(t+" is not a function"));return}function o(){i.unsubscribe(),r()}let i=this.subscribe({next(a){try{t(a,o)}catch(s){n(s),i.unsubscribe()}},error:n,complete:r})})}map(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=ji(this);return new r(n=>this.subscribe({next(o){try{o=t(o)}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}filter(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=ji(this);return new r(n=>this.subscribe({next(o){try{if(!t(o))return}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}reduce(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=ji(this),n=arguments.length>1,o=!1,a=arguments[1];return new r(s=>this.subscribe({next(l){let u=!o;if(o=!0,!u||n)try{a=t(a,l)}catch(f){return s.error(f)}else a=l},error(l){s.error(l)},complete(){if(!o&&!n)return s.error(new TypeError("Cannot reduce an empty sequence"));s.next(a),s.complete()}}))}async all(){let t=[];return await this.forEach(r=>t.push(r)),t}concat(...t){let r=ji(this);return new r(n=>{let o,i=0;function a(s){o=s.subscribe({next(l){n.next(l)},error(l){n.error(l)},complete(){i===t.length?(o=void 0,n.complete()):a(r.from(t[i++]))}})}return a(this),()=>{o&&(o.unsubscribe(),o=void 0)}})}flatMap(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=ji(this);return new r(n=>{let o=[],i=this.subscribe({next(s){if(t)try{s=t(s)}catch(u){return n.error(u)}let l=r.from(s).subscribe({next(u){n.next(u)},error(u){n.error(u)},complete(){let u=o.indexOf(l);u>=0&&o.splice(u,1),a()}});o.push(l)},error(s){n.error(s)},complete(){a()}});function a(){i.closed&&o.length===0&&n.complete()}return()=>{o.forEach(s=>s.unsubscribe()),i.unsubscribe()}})}[Hu](){return this}static from(t){let r=typeof this=="function"?this:Sl;if(t==null)throw new TypeError(t+" is not an object");let n=Ms(t,Hu);if(n){let o=n.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return _D(o)&&o.constructor===r?o:new r(i=>o.subscribe(i))}if(r0("iterator")&&(n=Ms(t,wD),n))return new r(o=>{Fs(()=>{if(!o.closed){for(let i of n.call(t))if(o.next(i),o.closed)return;o.complete()}})});if(Array.isArray(t))return new r(o=>{Fs(()=>{if(!o.closed){for(let i=0;i<t.length;++i)if(o.next(t[i]),o.closed)return;o.complete()}})});throw new TypeError(t+" is not observable")}static of(...t){let r=typeof this=="function"?this:Sl;return new r(n=>{Fs(()=>{if(!n.closed){for(let o=0;o<t.length;++o)if(n.next(t[o]),n.closed)return;n.complete()}})})}static get[n0](){return this}};Ls.Observable=js,Object.defineProperty(js,Symbol("extensions"),{value:{symbol:Hu,hostReportError:Mo},configurable:!0});var SD=Ls.Observable;const Bs=sn(SD);var a0={exports:{}},Gu={exports:{}},Fo=typeof Reflect=="object"?Reflect:null,s0=Fo&&typeof Fo.apply=="function"?Fo.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Rs;Fo&&typeof Fo.ownKeys=="function"?Rs=Fo.ownKeys:Object.getOwnPropertySymbols?Rs=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Rs=function(t){return Object.getOwnPropertyNames(t)};function $D(e){console&&console.warn&&console.warn(e)}var l0=Number.isNaN||function(t){return t!==t};function ct(){ct.init.call(this)}Gu.exports=ct,Gu.exports.once=TD,ct.EventEmitter=ct,ct.prototype._events=void 0,ct.prototype._eventsCount=0,ct.prototype._maxListeners=void 0;var c0=10;function Us(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(ct,"defaultMaxListeners",{enumerable:!0,get:function(){return c0},set:function(e){if(typeof e!="number"||e<0||l0(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c0=e}}),ct.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ct.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||l0(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function u0(e){return e._maxListeners===void 0?ct.defaultMaxListeners:e._maxListeners}ct.prototype.getMaxListeners=function(){return u0(this)},ct.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var o=t==="error",i=this._events;if(i!==void 0)o=o&&i.error===void 0;else if(!o)return!1;if(o){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")s0(l,this,r);else for(var u=l.length,f=g0(l,u),n=0;n<u;++n)s0(f[n],this,r);return!0};function f0(e,t,r,n){var o,i,a;if(Us(r),i=e._events,i===void 0?(i=e._events=Object.create(null),e._eventsCount=0):(i.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),a===void 0)a=i[t]=r,++e._eventsCount;else if(typeof a=="function"?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),o=u0(e),o>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,$D(s)}return e}ct.prototype.addListener=function(t,r){return f0(this,t,r,!1)},ct.prototype.on=ct.prototype.addListener,ct.prototype.prependListener=function(t,r){return f0(this,t,r,!0)};function CD(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d0(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=CD.bind(n);return o.listener=r,n.wrapFn=o,o}ct.prototype.once=function(t,r){return Us(r),this.on(t,d0(this,t,r)),this},ct.prototype.prependOnceListener=function(t,r){return Us(r),this.prependListener(t,d0(this,t,r)),this},ct.prototype.removeListener=function(t,r){var n,o,i,a,s;if(Us(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():AD(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this},ct.prototype.off=ct.prototype.removeListener,ct.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o<i.length;++o)a=i[o],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(o=r.length-1;o>=0;o--)this.removeListener(t,r[o]);return this};function p0(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?OD(o):g0(o,o.length)}ct.prototype.listeners=function(t){return p0(this,t,!0)},ct.prototype.rawListeners=function(t){return p0(this,t,!1)},ct.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):h0.call(e,t)},ct.prototype.listenerCount=h0;function h0(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}ct.prototype.eventNames=function(){return this._eventsCount>0?Rs(this._events):[]};function g0(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function AD(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function OD(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function TD(e,t){return new Promise(function(r,n){function o(a){e.removeListener(t,i),n(a)}function i(){typeof e.removeListener=="function"&&e.removeListener("error",o),r([].slice.call(arguments))}v0(e,t,i,{once:!0}),t!=="error"&&ID(e,o,{once:!0})})}function ID(e,t,r){typeof e.on=="function"&&v0(e,"error",t,r)}function v0(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var m0=Gu.exports,b0=m0.EventEmitter;const y0=H1(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ku,w0;function PD(){if(w0)return Ku;w0=1;function e(p,h){var g=Object.keys(p);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(p);h&&(v=v.filter(function(y){return Object.getOwnPropertyDescriptor(p,y).enumerable})),g.push.apply(g,v)}return g}function t(p){for(var h=1;h<arguments.length;h++){var g=arguments[h]!=null?arguments[h]:{};h%2?e(Object(g),!0).forEach(function(v){r(p,v,g[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(g)):e(Object(g)).forEach(function(v){Object.defineProperty(p,v,Object.getOwnPropertyDescriptor(g,v))})}return p}function r(p,h,g){return h in p?Object.defineProperty(p,h,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[h]=g,p}function n(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function o(p,h){for(var g=0;g<h.length;g++){var v=h[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}function i(p,h,g){return h&&o(p.prototype,h),g&&o(p,g),p}var a=Qt,s=a.Buffer,l=y0,u=l.inspect,f=u&&u.custom||"inspect";function d(p,h,g){s.prototype.copy.call(p,h,g)}return Ku=function(){function p(){n(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(g){var v={data:g,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(g){var v={data:g,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=g+v.data;return y}},{key:"concat",value:function(g){if(this.length===0)return s.alloc(0);for(var v=s.allocUnsafe(g>>>0),y=this.head,m=0;y;)d(y.data,v,m),m+=y.data.length,y=y.next;return v}},{key:"consume",value:function(g,v){var y;return g<this.head.data.length?(y=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?y=this.shift():y=v?this._getString(g):this._getBuffer(g),y}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var v=this.head,y=1,m=v.data;for(g-=m.length;v=v.next;){var w=v.data,E=g>w.length?w.length:g;if(E===w.length?m+=w:m+=w.slice(0,g),g-=E,g===0){E===w.length?(++y,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=w.slice(E));break}++y}return this.length-=y,m}},{key:"_getBuffer",value:function(g){var v=s.allocUnsafe(g),y=this.head,m=1;for(y.data.copy(v),g-=y.data.length;y=y.next;){var w=y.data,E=g>w.length?w.length:g;if(w.copy(v,v.length-g,0,E),g-=E,g===0){E===w.length?(++m,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=w.slice(E));break}++m}return this.length-=m,v}},{key:f,value:function(g,v){return u(this,t({},v,{depth:0,customInspect:!1}))}}]),p}(),Ku}function kD(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(qu,this,e)):process.nextTick(qu,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(Ws,r):(r._writableState.errorEmitted=!0,process.nextTick(_0,r,i)):process.nextTick(_0,r,i):t?(process.nextTick(Ws,r),t(i)):process.nextTick(Ws,r)}),this)}function _0(e,t){qu(e,t),Ws(e)}function Ws(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function ND(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function qu(e,t){e.emit("error",t)}function DD(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var E0={destroy:kD,undestroy:ND,errorOrDestroy:DD},qn={};function LD(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var x0={};function ur(e,t,r){r||(r=Error);function n(i,a,s){return typeof t=="string"?t:t(i,a,s)}var o=function(i){LD(a,i);function a(s,l,u){return i.call(this,n(s,l,u))||this}return a}(r);o.prototype.name=r.name,o.prototype.code=e,x0[e]=o}function S0(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function MD(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function FD(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function jD(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}ur("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),ur("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&MD(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var o;if(FD(e," argument"))o="The ".concat(e," ").concat(n," ").concat(S0(t,"type"));else{var i=jD(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(S0(t,"type"))}return o+=". Received type ".concat(typeof r),o},TypeError),ur("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),ur("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),ur("ERR_STREAM_PREMATURE_CLOSE","Premature close"),ur("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),ur("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),ur("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),ur("ERR_STREAM_WRITE_AFTER_END","write after end"),ur("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),ur("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),ur("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),qn.codes=x0;var BD=qn.codes.ERR_INVALID_OPT_VALUE;function RD(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function UD(e,t,r,n){var o=RD(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var i=n?r:"highWaterMark";throw new BD(i,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var $0={getHighWaterMark:UD},Yu={exports:{}};typeof Object.create=="function"?Yu.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Yu.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var Bi=Yu.exports,WD=HD;function HD(e,t){if(Ju("noDeprecation"))return e;var r=!1;function n(){if(!r){if(Ju("throwDeprecation"))throw new Error(t);Ju("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function Ju(e){try{if(!Ye.localStorage)return!1}catch{return!1}var t=Ye.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var Xu,C0;function A0(){if(C0)return Xu;C0=1,Xu=C;function e(U){var z=this;this.next=null,this.entry=null,this.finish=function(){de(z,U)}}var t;C.WritableState=I;var r={deprecate:WD},n=b0,o=Qt.Buffer,i=Ye.Uint8Array||function(){};function a(U){return o.from(U)}function s(U){return o.isBuffer(U)||U instanceof i}var l=E0,u=$0,f=u.getHighWaterMark,d=qn.codes,p=d.ERR_INVALID_ARG_TYPE,h=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,v=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,E=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;Bi(C,n);function k(){}function I(U,z,M){t=t||jo(),U=U||{},typeof M!="boolean"&&(M=z instanceof t),this.objectMode=!!U.objectMode,M&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=f(this,U,"writableHighWaterMark",M),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var R=U.decodeStrings===!1;this.decodeStrings=!R,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G){te(z,G)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}I.prototype.getBuffer=function(){for(var z=this.bufferedRequest,M=[];z;)M.push(z),z=z.next;return M},function(){try{Object.defineProperty(I.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var S;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(z){return S.call(this,z)?!0:this!==C?!1:z&&z._writableState instanceof I}})):S=function(z){return z instanceof this};function C(U){t=t||jo();var z=this instanceof t;if(!z&&!S.call(C,this))return new C(U);this._writableState=new I(U,this,z),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),n.call(this)}C.prototype.pipe=function(){x(this,new v)};function P(U,z){var M=new w;x(U,M),process.nextTick(z,M)}function F(U,z,M,R){var G;return M===null?G=new m:typeof M!="string"&&!z.objectMode&&(G=new p("chunk",["string","Buffer"],M)),G?(x(U,G),process.nextTick(R,G),!1):!0}C.prototype.write=function(U,z,M){var R=this._writableState,G=!1,O=!R.objectMode&&s(U);return O&&!o.isBuffer(U)&&(U=a(U)),typeof z=="function"&&(M=z,z=null),O?z="buffer":z||(z=R.defaultEncoding),typeof M!="function"&&(M=k),R.ending?P(this,M):(O||F(this,R,U,M))&&(R.pendingcb++,G=N(this,R,O,U,z,M)),G},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&ae(this,U))},C.prototype.setDefaultEncoding=function(z){if(typeof z=="string"&&(z=z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((z+"").toLowerCase())>-1))throw new E(z);return this._writableState.defaultEncoding=z,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(U,z,M){return!U.objectMode&&U.decodeStrings!==!1&&typeof z=="string"&&(z=o.from(z,M)),z}Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(U,z,M,R,G,O){if(!M){var T=D(z,R,G);R!==T&&(M=!0,G="buffer",R=T)}var Z=z.objectMode?1:R.length;z.length+=Z;var ne=z.length<z.highWaterMark;if(ne||(z.needDrain=!0),z.writing||z.corked){var pe=z.lastBufferedRequest;z.lastBufferedRequest={chunk:R,encoding:G,isBuf:M,callback:O,next:null},pe?pe.next=z.lastBufferedRequest:z.bufferedRequest=z.lastBufferedRequest,z.bufferedRequestCount+=1}else J(U,z,!1,Z,R,G,O);return ne}function J(U,z,M,R,G,O,T){z.writelen=R,z.writecb=T,z.writing=!0,z.sync=!0,z.destroyed?z.onwrite(new y("write")):M?U._writev(G,z.onwrite):U._write(G,O,z.onwrite),z.sync=!1}function K(U,z,M,R,G){--z.pendingcb,M?(process.nextTick(G,R),process.nextTick(H,U,z),U._writableState.errorEmitted=!0,x(U,R)):(G(R),U._writableState.errorEmitted=!0,x(U,R),H(U,z))}function Y(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}function te(U,z){var M=U._writableState,R=M.sync,G=M.writecb;if(typeof G!="function")throw new g;if(Y(M),z)K(U,M,R,z,G);else{var O=ge(M)||U.destroyed;!O&&!M.corked&&!M.bufferProcessing&&M.bufferedRequest&&ae(U,M),R?process.nextTick(oe,U,M,O,G):oe(U,M,O,G)}}function oe(U,z,M,R){M||le(U,z),z.pendingcb--,R(),H(U,z)}function le(U,z){z.length===0&&z.needDrain&&(z.needDrain=!1,U.emit("drain"))}function ae(U,z){z.bufferProcessing=!0;var M=z.bufferedRequest;if(U._writev&&M&&M.next){var R=z.bufferedRequestCount,G=new Array(R),O=z.corkedRequestsFree;O.entry=M;for(var T=0,Z=!0;M;)G[T]=M,M.isBuf||(Z=!1),M=M.next,T+=1;G.allBuffers=Z,J(U,z,!0,z.length,G,"",O.finish),z.pendingcb++,z.lastBufferedRequest=null,O.next?(z.corkedRequestsFree=O.next,O.next=null):z.corkedRequestsFree=new e(z),z.bufferedRequestCount=0}else{for(;M;){var ne=M.chunk,pe=M.encoding,me=M.callback,xe=z.objectMode?1:ne.length;if(J(U,z,!1,xe,ne,pe,me),M=M.next,z.bufferedRequestCount--,z.writing)break}M===null&&(z.lastBufferedRequest=null)}z.bufferedRequest=M,z.bufferProcessing=!1}C.prototype._write=function(U,z,M){M(new h("_write()"))},C.prototype._writev=null,C.prototype.end=function(U,z,M){var R=this._writableState;return typeof U=="function"?(M=U,U=null,z=null):typeof z=="function"&&(M=z,z=null),U!=null&&this.write(U,z),R.corked&&(R.corked=1,this.uncork()),R.ending||re(this,R,M),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ge(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function ce(U,z){U._final(function(M){z.pendingcb--,M&&x(U,M),z.prefinished=!0,U.emit("prefinish"),H(U,z)})}function q(U,z){!z.prefinished&&!z.finalCalled&&(typeof U._final=="function"&&!z.destroyed?(z.pendingcb++,z.finalCalled=!0,process.nextTick(ce,U,z)):(z.prefinished=!0,U.emit("prefinish")))}function H(U,z){var M=ge(z);if(M&&(q(U,z),z.pendingcb===0&&(z.finished=!0,U.emit("finish"),z.autoDestroy))){var R=U._readableState;(!R||R.autoDestroy&&R.endEmitted)&&U.destroy()}return M}function re(U,z,M){z.ending=!0,H(U,z),M&&(z.finished?process.nextTick(M):U.once("finish",M)),z.ended=!0,U.writable=!1}function de(U,z,M){var R=U.entry;for(U.entry=null;R;){var G=R.callback;z.pendingcb--,G(M),R=R.next}z.corkedRequestsFree.next=U}return Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(z){this._writableState&&(this._writableState.destroyed=z)}}),C.prototype.destroy=l.destroy,C.prototype._undestroy=l.undestroy,C.prototype._destroy=function(U,z){z(U)},Xu}var Zu,O0;function jo(){if(O0)return Zu;O0=1;var e=Object.keys||function(u){var f=[];for(var d in u)f.push(d);return f};Zu=a;var t=M0(),r=A0();Bi(a,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var i=n[o];a.prototype[i]||(a.prototype[i]=r.prototype[i])}function a(u){if(!(this instanceof a))return new a(u);t.call(this,u),r.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(u){u.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),Zu}var Qu={},T0;function I0(){if(T0)return Qu;T0=1;var e=Vb.Buffer,t=e.isEncoding||function(m){switch(m=""+m,m&&m.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(m){if(!m)return"utf8";for(var w;;)switch(m){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return m;default:if(w)return;m=(""+m).toLowerCase(),w=!0}}function n(m){var w=r(m);if(typeof w!="string"&&(e.isEncoding===t||!t(m)))throw new Error("Unknown encoding: "+m);return w||m}Qu.StringDecoder=o;function o(m){this.encoding=n(m);var w;switch(this.encoding){case"utf16le":this.text=d,this.end=p,w=4;break;case"utf8":this.fillLast=l,w=4;break;case"base64":this.text=h,this.end=g,w=3;break;default:this.write=v,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(w)}o.prototype.write=function(m){if(m.length===0)return"";var w,E;if(this.lastNeed){if(w=this.fillLast(m),w===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<m.length?w?w+this.text(m,E):this.text(m,E):w||""},o.prototype.end=f,o.prototype.text=u,o.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length};function i(m){return m<=127?0:m>>5===6?2:m>>4===14?3:m>>3===30?4:m>>6===2?-1:-2}function a(m,w,E){var x=w.length-1;if(x<E)return 0;var k=i(w[x]);return k>=0?(k>0&&(m.lastNeed=k-1),k):--x<E||k===-2?0:(k=i(w[x]),k>=0?(k>0&&(m.lastNeed=k-2),k):--x<E||k===-2?0:(k=i(w[x]),k>=0?(k>0&&(k===2?k=0:m.lastNeed=k-3),k):0))}function s(m,w,E){if((w[0]&192)!==128)return m.lastNeed=0,"�";if(m.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return m.lastNeed=1,"�";if(m.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return m.lastNeed=2,"�"}}function l(m){var w=this.lastTotal-this.lastNeed,E=s(this,m);if(E!==void 0)return E;if(this.lastNeed<=m.length)return m.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,w,0,m.length),this.lastNeed-=m.length}function u(m,w){var E=a(this,m,w);if(!this.lastNeed)return m.toString("utf8",w);this.lastTotal=E;var x=m.length-(E-this.lastNeed);return m.copy(this.lastChar,0,x),m.toString("utf8",w,x)}function f(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+"�":w}function d(m,w){if((m.length-w)%2===0){var E=m.toString("utf16le",w);if(E){var x=E.charCodeAt(E.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",w,m.length-1)}function p(m){var w=m&&m.length?this.write(m):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,E)}return w}function h(m,w){var E=(m.length-w)%3;return E===0?m.toString("base64",w):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",w,m.length-E))}function g(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function v(m){return m.toString(this.encoding)}function y(m){return m&&m.length?this.write(m):""}return Qu}var P0=qn.codes.ERR_STREAM_PREMATURE_CLOSE;function VD(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}function zD(){}function GD(e){return e.setHeader&&typeof e.abort=="function"}function k0(e,t,r){if(typeof t=="function")return k0(e,null,t);t||(t={}),r=VD(r||zD);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,i=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){o=!1,a=!0,n||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,l=!0,o||r.call(e)},f=function(g){r.call(e,g)},d=function(){var g;if(n&&!l)return(!e._readableState||!e._readableState.ended)&&(g=new P0),r.call(e,g);if(o&&!a)return(!e._writableState||!e._writableState.ended)&&(g=new P0),r.call(e,g)},p=function(){e.req.on("finish",s)};return GD(e)?(e.on("complete",s),e.on("abort",d),e.req?p():e.on("request",p)):o&&!e._writableState&&(e.on("end",i),e.on("close",i)),e.on("end",u),e.on("finish",s),t.error!==!1&&e.on("error",f),e.on("close",d),function(){e.removeListener("complete",s),e.removeListener("abort",d),e.removeListener("request",p),e.req&&e.req.removeListener("finish",s),e.removeListener("end",i),e.removeListener("close",i),e.removeListener("finish",s),e.removeListener("end",u),e.removeListener("error",f),e.removeListener("close",d)}}var ef=k0,tf,N0;function KD(){if(N0)return tf;N0=1;var e;function t(m,w,E){return w in m?Object.defineProperty(m,w,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[w]=E,m}var r=ef,n=Symbol("lastResolve"),o=Symbol("lastReject"),i=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),l=Symbol("handlePromise"),u=Symbol("stream");function f(m,w){return{value:m,done:w}}function d(m){var w=m[n];if(w!==null){var E=m[u].read();E!==null&&(m[s]=null,m[n]=null,m[o]=null,w(f(E,!1)))}}function p(m){process.nextTick(d,m)}function h(m,w){return function(E,x){m.then(function(){if(w[a]){E(f(void 0,!0));return}w[l](E,x)},x)}}var g=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[u]},next:function(){var w=this,E=this[i];if(E!==null)return Promise.reject(E);if(this[a])return Promise.resolve(f(void 0,!0));if(this[u].destroyed)return new Promise(function(S,C){process.nextTick(function(){w[i]?C(w[i]):S(f(void 0,!0))})});var x=this[s],k;if(x)k=new Promise(h(x,this));else{var I=this[u].read();if(I!==null)return Promise.resolve(f(I,!1));k=new Promise(this[l])}return this[s]=k,k}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var w=this;return new Promise(function(E,x){w[u].destroy(null,function(k){if(k){x(k);return}E(f(void 0,!0))})})}),e),g),y=function(w){var E,x=Object.create(v,(E={},t(E,u,{value:w,writable:!0}),t(E,n,{value:null,writable:!0}),t(E,o,{value:null,writable:!0}),t(E,i,{value:null,writable:!0}),t(E,a,{value:w._readableState.endEmitted,writable:!0}),t(E,l,{value:function(I,S){var C=x[u].read();C?(x[s]=null,x[n]=null,x[o]=null,I(f(C,!1))):(x[n]=I,x[o]=S)},writable:!0}),E));return x[s]=null,r(w,function(k){if(k&&k.code!=="ERR_STREAM_PREMATURE_CLOSE"){var I=x[o];I!==null&&(x[s]=null,x[n]=null,x[o]=null,I(k)),x[i]=k;return}var S=x[n];S!==null&&(x[s]=null,x[n]=null,x[o]=null,S(f(void 0,!0))),x[a]=!0}),w.on("readable",p.bind(null,x)),x};return tf=y,tf}var rf,D0;function qD(){return D0||(D0=1,rf=function(){throw new Error("Readable.from is not available in the browser")}),rf}var nf,L0;function M0(){if(L0)return nf;L0=1,nf=P;var e;P.ReadableState=C,m0.EventEmitter;var t=function(T,Z){return T.listeners(Z).length},r=b0,n=Qt.Buffer,o=Ye.Uint8Array||function(){};function i(O){return n.from(O)}function a(O){return n.isBuffer(O)||O instanceof o}var s=y0,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var u=PD(),f=E0,d=$0,p=d.getHighWaterMark,h=qn.codes,g=h.ERR_INVALID_ARG_TYPE,v=h.ERR_STREAM_PUSH_AFTER_EOF,y=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,E,x;Bi(P,r);var k=f.errorOrDestroy,I=["error","close","destroy","pause","resume"];function S(O,T,Z){if(typeof O.prependListener=="function")return O.prependListener(T,Z);!O._events||!O._events[T]?O.on(T,Z):Array.isArray(O._events[T])?O._events[T].unshift(Z):O._events[T]=[Z,O._events[T]]}function C(O,T,Z){e=e||jo(),O=O||{},typeof Z!="boolean"&&(Z=T instanceof e),this.objectMode=!!O.objectMode,Z&&(this.objectMode=this.objectMode||!!O.readableObjectMode),this.highWaterMark=p(this,O,"readableHighWaterMark",Z),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=O.emitClose!==!1,this.autoDestroy=!!O.autoDestroy,this.destroyed=!1,this.defaultEncoding=O.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,O.encoding&&(w||(w=I0().StringDecoder),this.decoder=new w(O.encoding),this.encoding=O.encoding)}function P(O){if(e=e||jo(),!(this instanceof P))return new P(O);var T=this instanceof e;this._readableState=new C(O,this,T),this.readable=!0,O&&(typeof O.read=="function"&&(this._read=O.read),typeof O.destroy=="function"&&(this._destroy=O.destroy)),r.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(T){this._readableState&&(this._readableState.destroyed=T)}}),P.prototype.destroy=f.destroy,P.prototype._undestroy=f.undestroy,P.prototype._destroy=function(O,T){T(O)},P.prototype.push=function(O,T){var Z=this._readableState,ne;return Z.objectMode?ne=!0:typeof O=="string"&&(T=T||Z.defaultEncoding,T!==Z.encoding&&(O=n.from(O,T),T=""),ne=!0),F(this,O,T,!1,ne)},P.prototype.unshift=function(O){return F(this,O,null,!0,!1)};function F(O,T,Z,ne,pe){l("readableAddChunk",T);var me=O._readableState;if(T===null)me.reading=!1,te(O,me);else{var xe;if(pe||(xe=N(me,T)),xe)k(O,xe);else if(me.objectMode||T&&T.length>0)if(typeof T!="string"&&!me.objectMode&&Object.getPrototypeOf(T)!==n.prototype&&(T=i(T)),ne)me.endEmitted?k(O,new m):D(O,me,T,!0);else if(me.ended)k(O,new v);else{if(me.destroyed)return!1;me.reading=!1,me.decoder&&!Z?(T=me.decoder.write(T),me.objectMode||T.length!==0?D(O,me,T,!1):ae(O,me)):D(O,me,T,!1)}else ne||(me.reading=!1,ae(O,me))}return!me.ended&&(me.length<me.highWaterMark||me.length===0)}function D(O,T,Z,ne){T.flowing&&T.length===0&&!T.sync?(T.awaitDrain=0,O.emit("data",Z)):(T.length+=T.objectMode?1:Z.length,ne?T.buffer.unshift(Z):T.buffer.push(Z),T.needReadable&&oe(O)),ae(O,T)}function N(O,T){var Z;return!a(T)&&typeof T!="string"&&T!==void 0&&!O.objectMode&&(Z=new g("chunk",["string","Buffer","Uint8Array"],T)),Z}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(O){w||(w=I0().StringDecoder);var T=new w(O);this._readableState.decoder=T,this._readableState.encoding=this._readableState.decoder.encoding;for(var Z=this._readableState.buffer.head,ne="";Z!==null;)ne+=T.write(Z.data),Z=Z.next;return this._readableState.buffer.clear(),ne!==""&&this._readableState.buffer.push(ne),this._readableState.length=ne.length,this};var J=1073741824;function K(O){return O>=J?O=J:(O--,O|=O>>>1,O|=O>>>2,O|=O>>>4,O|=O>>>8,O|=O>>>16,O++),O}function Y(O,T){return O<=0||T.length===0&&T.ended?0:T.objectMode?1:O!==O?T.flowing&&T.length?T.buffer.head.data.length:T.length:(O>T.highWaterMark&&(T.highWaterMark=K(O)),O<=T.length?O:T.ended?T.length:(T.needReadable=!0,0))}P.prototype.read=function(O){l("read",O),O=parseInt(O,10);var T=this._readableState,Z=O;if(O!==0&&(T.emittedReadable=!1),O===0&&T.needReadable&&((T.highWaterMark!==0?T.length>=T.highWaterMark:T.length>0)||T.ended))return l("read: emitReadable",T.length,T.ended),T.length===0&&T.ended?M(this):oe(this),null;if(O=Y(O,T),O===0&&T.ended)return T.length===0&&M(this),null;var ne=T.needReadable;l("need readable",ne),(T.length===0||T.length-O<T.highWaterMark)&&(ne=!0,l("length less than watermark",ne)),T.ended||T.reading?(ne=!1,l("reading or ended",ne)):ne&&(l("do read"),T.reading=!0,T.sync=!0,T.length===0&&(T.needReadable=!0),this._read(T.highWaterMark),T.sync=!1,T.reading||(O=Y(Z,T)));var pe;return O>0?pe=z(O,T):pe=null,pe===null?(T.needReadable=T.length<=T.highWaterMark,O=0):(T.length-=O,T.awaitDrain=0),T.length===0&&(T.ended||(T.needReadable=!0),Z!==O&&T.ended&&M(this)),pe!==null&&this.emit("data",pe),pe};function te(O,T){if(l("onEofChunk"),!T.ended){if(T.decoder){var Z=T.decoder.end();Z&&Z.length&&(T.buffer.push(Z),T.length+=T.objectMode?1:Z.length)}T.ended=!0,T.sync?oe(O):(T.needReadable=!1,T.emittedReadable||(T.emittedReadable=!0,le(O)))}}function oe(O){var T=O._readableState;l("emitReadable",T.needReadable,T.emittedReadable),T.needReadable=!1,T.emittedReadable||(l("emitReadable",T.flowing),T.emittedReadable=!0,process.nextTick(le,O))}function le(O){var T=O._readableState;l("emitReadable_",T.destroyed,T.length,T.ended),!T.destroyed&&(T.length||T.ended)&&(O.emit("readable"),T.emittedReadable=!1),T.needReadable=!T.flowing&&!T.ended&&T.length<=T.highWaterMark,U(O)}function ae(O,T){T.readingMore||(T.readingMore=!0,process.nextTick(ge,O,T))}function ge(O,T){for(;!T.reading&&!T.ended&&(T.length<T.highWaterMark||T.flowing&&T.length===0);){var Z=T.length;if(l("maybeReadMore read 0"),O.read(0),Z===T.length)break}T.readingMore=!1}P.prototype._read=function(O){k(this,new y("_read()"))},P.prototype.pipe=function(O,T){var Z=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=O;break;case 1:ne.pipes=[ne.pipes,O];break;default:ne.pipes.push(O);break}ne.pipesCount+=1,l("pipe count=%d opts=%j",ne.pipesCount,T);var pe=(!T||T.end!==!1)&&O!==process.stdout&&O!==process.stderr,me=pe?Ee:De;ne.endEmitted?process.nextTick(me):Z.once("end",me),O.on("unpipe",xe);function xe(A,b){l("onunpipe"),A===Z&&b&&b.hasUnpiped===!1&&(b.hasUnpiped=!0,dt())}function Ee(){l("onend"),O.end()}var ie=ce(Z);O.on("drain",ie);var Ne=!1;function dt(){l("cleanup"),O.removeListener("close",bt),O.removeListener("finish",$e),O.removeListener("drain",ie),O.removeListener("error",Me),O.removeListener("unpipe",xe),Z.removeListener("end",Ee),Z.removeListener("end",De),Z.removeListener("data",Te),Ne=!0,ne.awaitDrain&&(!O._writableState||O._writableState.needDrain)&&ie()}Z.on("data",Te);function Te(A){l("ondata");var b=O.write(A);l("dest.write",b),b===!1&&((ne.pipesCount===1&&ne.pipes===O||ne.pipesCount>1&&G(ne.pipes,O)!==-1)&&!Ne&&(l("false write response, pause",ne.awaitDrain),ne.awaitDrain++),Z.pause())}function Me(A){l("onerror",A),De(),O.removeListener("error",Me),t(O,"error")===0&&k(O,A)}S(O,"error",Me);function bt(){O.removeListener("finish",$e),De()}O.once("close",bt);function $e(){l("onfinish"),O.removeListener("close",bt),De()}O.once("finish",$e);function De(){l("unpipe"),Z.unpipe(O)}return O.emit("pipe",Z),ne.flowing||(l("pipe resume"),Z.resume()),O};function ce(O){return function(){var Z=O._readableState;l("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&t(O,"data")&&(Z.flowing=!0,U(O))}}P.prototype.unpipe=function(O){var T=this._readableState,Z={hasUnpiped:!1};if(T.pipesCount===0)return this;if(T.pipesCount===1)return O&&O!==T.pipes?this:(O||(O=T.pipes),T.pipes=null,T.pipesCount=0,T.flowing=!1,O&&O.emit("unpipe",this,Z),this);if(!O){var ne=T.pipes,pe=T.pipesCount;T.pipes=null,T.pipesCount=0,T.flowing=!1;for(var me=0;me<pe;me++)ne[me].emit("unpipe",this,{hasUnpiped:!1});return this}var xe=G(T.pipes,O);return xe===-1?this:(T.pipes.splice(xe,1),T.pipesCount-=1,T.pipesCount===1&&(T.pipes=T.pipes[0]),O.emit("unpipe",this,Z),this)},P.prototype.on=function(O,T){var Z=r.prototype.on.call(this,O,T),ne=this._readableState;return O==="data"?(ne.readableListening=this.listenerCount("readable")>0,ne.flowing!==!1&&this.resume()):O==="readable"&&!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,l("on readable",ne.length,ne.reading),ne.length?oe(this):ne.reading||process.nextTick(H,this)),Z},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(O,T){var Z=r.prototype.removeListener.call(this,O,T);return O==="readable"&&process.nextTick(q,this),Z},P.prototype.removeAllListeners=function(O){var T=r.prototype.removeAllListeners.apply(this,arguments);return(O==="readable"||O===void 0)&&process.nextTick(q,this),T};function q(O){var T=O._readableState;T.readableListening=O.listenerCount("readable")>0,T.resumeScheduled&&!T.paused?T.flowing=!0:O.listenerCount("data")>0&&O.resume()}function H(O){l("readable nexttick read 0"),O.read(0)}P.prototype.resume=function(){var O=this._readableState;return O.flowing||(l("resume"),O.flowing=!O.readableListening,re(this,O)),O.paused=!1,this};function re(O,T){T.resumeScheduled||(T.resumeScheduled=!0,process.nextTick(de,O,T))}function de(O,T){l("resume",T.reading),T.reading||O.read(0),T.resumeScheduled=!1,O.emit("resume"),U(O),T.flowing&&!T.reading&&O.read(0)}P.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(O){var T=O._readableState;for(l("flow",T.flowing);T.flowing&&O.read()!==null;);}P.prototype.wrap=function(O){var T=this,Z=this._readableState,ne=!1;O.on("end",function(){if(l("wrapped end"),Z.decoder&&!Z.ended){var xe=Z.decoder.end();xe&&xe.length&&T.push(xe)}T.push(null)}),O.on("data",function(xe){if(l("wrapped data"),Z.decoder&&(xe=Z.decoder.write(xe)),!(Z.objectMode&&xe==null)&&!(!Z.objectMode&&(!xe||!xe.length))){var Ee=T.push(xe);Ee||(ne=!0,O.pause())}});for(var pe in O)this[pe]===void 0&&typeof O[pe]=="function"&&(this[pe]=function(Ee){return function(){return O[Ee].apply(O,arguments)}}(pe));for(var me=0;me<I.length;me++)O.on(I[me],this.emit.bind(this,I[me]));return this._read=function(xe){l("wrapped _read",xe),ne&&(ne=!1,O.resume())},this},typeof Symbol=="function"&&(P.prototype[Symbol.asyncIterator]=function(){return E===void 0&&(E=KD()),E(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}}),P._fromList=z,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function z(O,T){if(T.length===0)return null;var Z;return T.objectMode?Z=T.buffer.shift():!O||O>=T.length?(T.decoder?Z=T.buffer.join(""):T.buffer.length===1?Z=T.buffer.first():Z=T.buffer.concat(T.length),T.buffer.clear()):Z=T.buffer.consume(O,T.decoder),Z}function M(O){var T=O._readableState;l("endReadable",T.endEmitted),T.endEmitted||(T.ended=!0,process.nextTick(R,T,O))}function R(O,T){if(l("endReadableNT",O.endEmitted,O.length),!O.endEmitted&&O.length===0&&(O.endEmitted=!0,T.readable=!1,T.emit("end"),O.autoDestroy)){var Z=T._writableState;(!Z||Z.autoDestroy&&Z.finished)&&T.destroy()}}typeof Symbol=="function"&&(P.from=function(O,T){return x===void 0&&(x=qD()),x(P,O,T)});function G(O,T){for(var Z=0,ne=O.length;Z<ne;Z++)if(O[Z]===T)return Z;return-1}return nf}var F0=Qr,Hs=qn.codes,YD=Hs.ERR_METHOD_NOT_IMPLEMENTED,JD=Hs.ERR_MULTIPLE_CALLBACK,XD=Hs.ERR_TRANSFORM_ALREADY_TRANSFORMING,ZD=Hs.ERR_TRANSFORM_WITH_LENGTH_0,Vs=jo();Bi(Qr,Vs);function QD(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new JD);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function Qr(e){if(!(this instanceof Qr))return new Qr(e);Vs.call(this,e),this._transformState={afterTransform:QD.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",eL)}function eL(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){j0(e,t,r)}):j0(this,null,null)}Qr.prototype.push=function(e,t){return this._transformState.needTransform=!1,Vs.prototype.push.call(this,e,t)},Qr.prototype._transform=function(e,t,r){r(new YD("_transform()"))},Qr.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},Qr.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},Qr.prototype._destroy=function(e,t){Vs.prototype._destroy.call(this,e,function(r){t(r)})};function j0(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new ZD;if(e._transformState.transforming)throw new XD;return e.push(null)}var tL=Ri,B0=F0;Bi(Ri,B0);function Ri(e){if(!(this instanceof Ri))return new Ri(e);B0.call(this,e)}Ri.prototype._transform=function(e,t,r){r(null,e)};var of;function rL(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var R0=qn.codes,nL=R0.ERR_MISSING_ARGS,oL=R0.ERR_STREAM_DESTROYED;function U0(e){if(e)throw e}function iL(e){return e.setHeader&&typeof e.abort=="function"}function aL(e,t,r,n){n=rL(n);var o=!1;e.on("close",function(){o=!0}),of===void 0&&(of=ef),of(e,{readable:t,writable:r},function(a){if(a)return n(a);o=!0,n()});var i=!1;return function(a){if(!o&&!i){if(i=!0,iL(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(a||new oL("pipe"))}}}function W0(e){e()}function sL(e,t){return e.pipe(t)}function lL(e){return!e.length||typeof e[e.length-1]!="function"?U0:e.pop()}function cL(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=lL(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new nL("streams");var o,i=t.map(function(a,s){var l=s<t.length-1,u=s>0;return aL(a,l,u,function(f){o||(o=f),f&&i.forEach(W0),!l&&(i.forEach(W0),n(o))})});return t.reduce(sL)}var uL=cL;(function(e,t){t=e.exports=M0(),t.Stream=t,t.Readable=t,t.Writable=A0(),t.Duplex=jo(),t.Transform=F0,t.PassThrough=tL,t.finished=ef,t.pipeline=uL})(a0,a0.exports);var fL=e=>new Promise((t,r)=>{e((n,o)=>{n?r(n):t(o)})}),H0=class extends Error{constructor(e,t){super(e?`Timeout [${e.toLocaleString()}ms]${t===void 0?"":`: ${t}`}`:"Timeout")}},dL=async(e,t,r)=>{let n;const o=r===void 0||typeof r=="string"?new H0(t,r):r,i=new Promise((s,l)=>{n=setTimeout(()=>{l(o)},t),pL(n)}),a=typeof e=="function"?fL(e):e;return await Promise.race([a,i]).finally(()=>{clearTimeout(n)})},pL=e=>{typeof e=="object"&&"unref"in e&&e.unref()},hL=class{constructor(e={autoReset:!1}){this._options=e,this.reset()}async wait({timeout:e}={}){return e?dL(this._promise,e,new H0(e)):this._promise}wake(e){return this._wake(e),this._options.autoReset?this.reset():this}reset(){return this._promise=new Promise(e=>{this._wake=e}),this}throw(e){return this._wake(Promise.reject(e)),this._options.autoReset?this.reset():this}},gL=class Sr extends Bs{constructor(t,r){super(n=>this._subscribe(n)),this._value=r,this._observers=new Set,this._completed=new hL,this._handlers={next:n=>{this._value=n,this._observers.forEach(o=>{var i;return(i=o.next)==null?void 0:i.call(o,n)})},error:n=>{this._observers.forEach(o=>{var i;return(i=o.error)==null?void 0:i.call(o,n)})},complete:()=>{this._completed.wake(),this._observers.forEach(n=>{var o;return(o=n.complete)==null?void 0:o.call(n)})}},this._observable=typeof t=="function"?new Bs(t):t,this._observable.subscribe(this._handlers)}static from(t,r){if("emit"in t)return new Sr(o=>{t.on(i=>{o.next(i)})},r);const n=Bs.from(t);return new Sr(n,r)}static of(...t){return new Sr(Bs.of(...t.slice(1)),t[0])}static empty(){return vL}get(){if(this._value===void 0)throw new Error("MulticastObservable is not initialized.");return this._value}async wait({timeout:t}={}){return await this._completed.wait({timeout:t}),this.get()}forEach(t){return this._observable.forEach(t)}map(t){return new Sr(this._observable.map(t),this._value&&t(this._value))}filter(t){return new Sr(this._observable.filter(t),this._value&&t(this._value)?this._value:void 0)}reduce(t,r){return new Sr(r?this._observable.reduce(t,r):this._observable.reduce(t),r??this._value)}flatMap(t){return new Sr(this._observable.flatMap(t),this._value&&t(this._value).get())}concat(...t){return new Sr(this._observable.concat(...t),this._value)}losslessConcat(t,...r){const n=r.filter(i=>i instanceof Sr),o=t(this._value,n.map(i=>i.get()));return new Sr(this._observable.concat(...r),o)}_subscribe(t){var r;return this._observers.has(t)||this._observers.add(t),this._value!==void 0&&((r=t.next)==null||r.call(t,this._value)),()=>{this._observers.delete(t)}}},vL=gL.of(null),V0=typeof process<"u"&&!!process.env.DX_TRACK_LEAKS,z0=new Set,mL=()=>{if(V0){console.log(`Leaked resources ${z0.size}:`);for(const e of z0)console.log(`- ${e.name} at`),console.log(e.openStack.getStack(1)),console.log()}};V0&&(global.dxDumpLeaks=mL);var G0="/home/runner/work/dxos/dxos/packages/sdk/react-client/src/invitations/useInvitationStatus.ts",af=e=>{const[t,r]=c.useReducer((a,s)=>(Xe("useInvitationStatus",{action:s},{F:G0,L:79,S:void 0,C:(l,u)=>l(...u)}),{...a,status:s.status,result:s.status===we.State.SUCCESS?s.result:a.result,...s.status===we.State.ERROR&&{error:s.error},...(s.status===we.State.ERROR||s.status===we.State.CANCELLED||s.status===we.State.TIMEOUT)&&{haltedAt:typeof a.haltedAt>"u"?s.haltedAt:a.haltedAt},observable:s.status===we.State.CONNECTING?s.observable??a.observable:a.observable}),null,a=>({status:we.State.INIT,result:{spaceKey:null,identityKey:null,swarmKey:null,target:null},observable:e}));c.useEffect(()=>{var u,f;const a=d=>{switch(d.state){case we.State.CONNECTED:case we.State.READY_FOR_AUTHENTICATION:case we.State.AUTHENTICATING:{r({status:d.state});break}case we.State.SUCCESS:{r({status:d.state,result:{spaceKey:d.spaceKey||null,identityKey:d.identityKey||null,swarmKey:d.swarmKey||null,target:d.target||null}});break}case we.State.CANCELLED:case we.State.TIMEOUT:{r({status:d.state,haltedAt:t.status});break}}},s=(u=t.observable)==null?void 0:u.subscribe(a,d=>{r({status:we.State.ERROR,error:d,haltedAt:t.status})}),l=(f=t.observable)==null?void 0:f.get();return l&&a(l),()=>s==null?void 0:s.unsubscribe()},[t.observable,t.status]);const n=c.useCallback(a=>{r({status:we.State.CONNECTING,observable:a})},[]),o=c.useCallback(a=>(Xe("authenticating...",{authCode:a},{F:G0,L:163,S:void 0,C:(s,l)=>s(...l)}),t.observable.authenticate(a)),[t.observable]),i=c.useCallback(async()=>{var a;return(a=t.observable)==null?void 0:a.cancel()},[t.observable]);return c.useMemo(()=>{var l;const a=(l=t.observable)==null?void 0:l.get();return{status:t.status,haltedAt:t.haltedAt,result:t.result,error:t.error,cancel:i,connect:n,authenticate:o,id:a==null?void 0:a.invitationId,invitationCode:a?an.InvitationEncoder.encode(a):void 0,authCode:a==null?void 0:a.authCode,authMethod:a==null?void 0:a.authMethod,type:a==null?void 0:a.type}},[t,i,n,o])};const bL=new Map([[we.State.ERROR,-3],[we.State.TIMEOUT,-2],[we.State.CANCELLED,-1],[we.State.INIT,0],[we.State.CONNECTING,1],[we.State.CONNECTED,2],[we.State.READY_FOR_AUTHENTICATION,3],[we.State.AUTHENTICATING,4],[we.State.SUCCESS,5]]);var K0=9007199254740991,yL="[object Arguments]",wL="[object Function]",_L="[object GeneratorFunction]",sf="[object Map]",EL="[object Object]",q0="[object Promise]",lf="[object Set]",xL="[object String]",Y0="[object WeakMap]",J0="[object DataView]",SL=/[\\^$.*+?()[\]{}|]/g,$L=/^\[object .+?Constructor\]$/,CL=/^(?:0|[1-9]\d*)$/,cf="\\ud800-\\udfff",X0="\\u0300-\\u036f\\ufe20-\\ufe23",Z0="\\u20d0-\\u20f0",Q0="\\ufe0e\\ufe0f",AL="["+cf+"]",uf="["+X0+Z0+"]",ff="\\ud83c[\\udffb-\\udfff]",OL="(?:"+uf+"|"+ff+")",ey="[^"+cf+"]",ty="(?:\\ud83c[\\udde6-\\uddff]){2}",ry="[\\ud800-\\udbff][\\udc00-\\udfff]",ny="\\u200d",oy=OL+"?",iy="["+Q0+"]?",TL="(?:"+ny+"(?:"+[ey,ty,ry].join("|")+")"+iy+oy+")*",IL=iy+oy+TL,PL="(?:"+[ey+uf+"?",uf,ty,ry,AL].join("|")+")",kL=RegExp(ff+"(?="+ff+")|"+PL+IL,"g"),NL=RegExp("["+ny+cf+X0+Z0+Q0+"]"),DL=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,LL=typeof self=="object"&&self&&self.Object===Object&&self,Yn=DL||LL||Function("return this")();function ML(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function FL(e){return e.split("")}function jL(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function BL(e,t){return ML(t,function(r){return e[r]})}function RL(e,t){return e==null?void 0:e[t]}function UL(e){return NL.test(e)}function WL(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function HL(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function VL(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function zL(e,t){return function(r){return e(t(r))}}function GL(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}function KL(e){return UL(e)?qL(e):FL(e)}function qL(e){return e.match(kL)||[]}var YL=Function.prototype,zs=Object.prototype,df=Yn["__core-js_shared__"],ay=function(){var e=/[^.]+$/.exec(df&&df.keys&&df.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),sy=YL.toString,Gs=zs.hasOwnProperty,Ui=zs.toString,JL=RegExp("^"+sy.call(Gs).replace(SL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ly=Yn.Symbol,pf=ly?ly.iterator:void 0,XL=zs.propertyIsEnumerable,ZL=zL(Object.keys,Object),hf=Wi(Yn,"DataView"),gf=Wi(Yn,"Map"),vf=Wi(Yn,"Promise"),mf=Wi(Yn,"Set"),bf=Wi(Yn,"WeakMap"),QL=Xn(hf),e7=Xn(gf),t7=Xn(vf),r7=Xn(mf),n7=Xn(bf);function o7(e,t){var r=cy(e)||d7(e)?jL(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Gs.call(e,i))&&!(o&&(i=="length"||c7(i,n)))&&r.push(i);return r}function i7(e){return Ui.call(e)}function a7(e){if(!fy(e)||u7(e))return!1;var t=uy(e)||WL(e)?JL:$L;return t.test(Xn(e))}function s7(e){if(!f7(e))return ZL(e);var t=[];for(var r in Object(e))Gs.call(e,r)&&r!="constructor"&&t.push(r);return t}function l7(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Wi(e,t){var r=RL(e,t);return a7(r)?r:void 0}var Jn=i7;(hf&&Jn(new hf(new ArrayBuffer(1)))!=J0||gf&&Jn(new gf)!=sf||vf&&Jn(vf.resolve())!=q0||mf&&Jn(new mf)!=lf||bf&&Jn(new bf)!=Y0)&&(Jn=function(e){var t=Ui.call(e),r=t==EL?e.constructor:void 0,n=r?Xn(r):void 0;if(n)switch(n){case QL:return J0;case e7:return sf;case t7:return q0;case r7:return lf;case n7:return Y0}return t});function c7(e,t){return t=t??K0,!!t&&(typeof e=="number"||CL.test(e))&&e>-1&&e%1==0&&e<t}function u7(e){return!!ay&&ay in e}function f7(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||zs;return e===r}function Xn(e){if(e!=null){try{return sy.call(e)}catch{}try{return e+""}catch{}}return""}function d7(e){return p7(e)&&Gs.call(e,"callee")&&(!XL.call(e,"callee")||Ui.call(e)==yL)}var cy=Array.isArray;function yf(e){return e!=null&&h7(e.length)&&!uy(e)}function p7(e){return dy(e)&&yf(e)}function uy(e){var t=fy(e)?Ui.call(e):"";return t==wL||t==_L}function h7(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=K0}function fy(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function dy(e){return!!e&&typeof e=="object"}function g7(e){return typeof e=="string"||!cy(e)&&dy(e)&&Ui.call(e)==xL}function v7(e){if(!e)return[];if(yf(e))return g7(e)?KL(e):l7(e);if(pf&&e[pf])return HL(e[pf]());var t=Jn(e),r=t==sf?VL:t==lf?GL:b7;return r(e)}function m7(e){return yf(e)?o7(e):s7(e)}function b7(e){return e?BL(e,m7(e)):[]}var y7=v7;const py=sn(y7)("👹👻👽🤖🎃🦾🦿🦷👣👁️🧶👑🐒🦆🦉🐴🦄🐝🦋🐞🪲🐢🦎🦕🦑🦀🐠🐬🐋🦭🐅🐆🦓🦍🦧🐘🐫🦒🦘🦬🐖🐏🦌🐕🐈🐓🦚🦜🦢🦩🦦🐁🐿️🌵🌲🌳🪵🌱🍁🪺🍄🐚🪸🪨🌾🌷🌻☀️🌙🪐⭐️⚡️☄️🔥🌈☁️💧⛱️🌊🍎🍋🍉🍇🫐🍈🍒🍑🥭🍍🥥🥝🥑🌶️🌽🥕🍬🥜🫖☕️🍵🧊🧂🏔️⚓️🛟🏝️🛶🚀🛰️⛲️🏰🚲⛺️🎙️🧲⚙️🔩🔮🔭🔬🧬🌡️🧺🛎️🔑🪑🧸🎈🎀🎊♻️🎵"),wf=e=>py[parseInt(e,16)%py.length],hy=e=>{const{code:t,large:r,classNames:n}=e,o=(t==null?void 0:t.length)??0,i=t==null?void 0:t.slice(0,o/2),a=t==null?void 0:t.slice(o/2),s=()=>{navigator.clipboard.writeText(t??"")};return c.createElement("span",{className:ue(r?"text-6xl":"text-2xl","font-mono pli-2.5 flex gap-1.5 rounded cursor-pointer",n),onClick:s},c.createElement("span",null,i),c.createElement("span",null,a))},w7=e=>{const{invitation:t}=e,r=af(t);return c.createElement(E7,{...e,invitationStatus:r})},Hi={size:10,variant:"circle"},_7=({animation:e,status:t})=>{const{tx:r}=Ae();return c.createElement(c.Fragment,null,c.createElement("span",{role:"none",className:ue("absolute inline-start-1 inline-end-auto opacity-20",We(Hi.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Hi,status:t,animation:e}),style:{animationDelay:"400ms"}})),c.createElement("span",{role:"none",className:ue("absolute inline-start-2 inline-end-auto opacity-50",We(Hi.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Hi,status:t,animation:e}),style:{animationDelay:"200ms"}})))},E7=({invitation:e,invitationStatus:t,send:r,onClickRemove:n,createInvitationUrl:o})=>{const{t:i}=tt("os"),{cancel:a,status:s,invitationCode:l,authCode:u,type:f}=t,d=!([we.State.ERROR,we.State.TIMEOUT,we.State.CANCELLED].indexOf(s)>=0),p=f===we.Type.MULTIUSE||[we.State.INIT,we.State.CONNECTING,we.State.CONNECTED].indexOf(s)>=0,h=s===we.State.READY_FOR_AUTHENTICATION,g=c.useCallback(()=>n==null?void 0:n(e),[e,n]),v=l&&o(l),y=e==null?void 0:e.get().invitationId,m=[we.State.INIT,we.State.CONNECTING,we.State.CONNECTED,we.State.READY_FOR_AUTHENTICATION,we.State.AUTHENTICATING].includes(s)?"pulse":"none",w=[we.State.ERROR,we.State.TIMEOUT,we.State.CANCELLED].includes(s),E=[we.State.CONNECTED,we.State.READY_FOR_AUTHENTICATION,we.State.AUTHENTICATING,we.State.SUCCESS].includes(s),x=w?"error":E?"active":"inactive";return c.createElement(Nc.Root,{id:l,classNames:"flex gap-2 pis-3 pie-1 items-center relative"},c.createElement(Nc.Heading,{classNames:"sr-only"},i(f===we.Type.MULTIUSE?"invite many list item label":"invite one list item label")),f===we.Type.MULTIUSE&&c.createElement(_7,{status:x,animation:m}),c.createElement(wr.Root,null,c.createElement(Tt.Root,{...Hi,animation:m,status:x},c.createElement(wr.Trigger,{asChild:!0},c.createElement(Tt.Frame,{tabIndex:0,classNames:[Br,"relative rounded-full"]},c.createElement(Tt.Fallback,{text:wf(y)})))),c.createElement(wr.Portal,null,c.createElement(wr.Content,{side:"left",classNames:"z-[70]"},i(f===we.Type.MULTIUSE?"invite many qr label":"invite one qr label"),c.createElement(wr.Arrow,null)))),p&&v?c.createElement(c.Fragment,null,c.createElement(yr,{variant:"ghost",classNames:"grow justify-start font-medium",onClick:()=>r({type:"selectInvitation",invitation:e}),"data-testid":"show-qrcode"},c.createElement("span",null,i("open share panel label"))),c.createElement(Ok,{variant:"ghost",value:v})):h?c.createElement(hy,{code:u,classNames:"grow"}):s===we.State.CONNECTING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Connecting..."):s===we.State.AUTHENTICATING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Authenticating..."):s===we.State.ERROR||s===we.State.TIMEOUT?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Failed"):s===we.State.CANCELLED?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Cancelled"):s===we.State.SUCCESS?c.createElement("span",{className:"pli-2 grow truncate"},"User joined"):c.createElement("span",{className:"grow"}," "),d?c.createElement(yr,{variant:"ghost",classNames:"flex gap-1",onClick:a,"data-testid":"cancel-invitation"},c.createElement("span",{className:"sr-only"},i("cancel invitation label")),c.createElement(ze.X,{className:We(5),weight:"bold"})):c.createElement(yr,{variant:"ghost",classNames:"flex gap-1",onClick:g,"data-testid":"remove-invitation"},c.createElement("span",{className:"sr-only"},i("remove invitation label")),c.createElement(ze.X,{className:We(5),weight:"bold"})))},x7=({invitations:e,send:t,...r})=>{const{className:n,InvitationListItem:o=w7}=r;return c.createElement(kc,{classNames:ue("flex flex-col gap-2",n)},e.map(i=>{const a=i.get().invitationId;return c.createElement(o,{key:a,send:t,invitation:i,...r})}))},S7={noopAction:{label:"No-op",description:"",icon:ze.Placeholder,onClick:()=>{}}},$7=c.forwardRef((e,t)=>{const{classNames:r,variant:n,isFull:o=!0,actions:i=S7,activeAction:a,onChangeActiveAction:s,defaultActiveAction:l,...u}=e,[f=Object.keys(i)[0],d]=Kr({prop:a,onChange:s,defaultProp:l}),p=i[f]??{},{t:h}=tt("os");return c.createElement("div",{role:"none",className:ue("mbs-2 flex gap-px items-center",o&&"is-full")},c.createElement(yr,{...u,classNames:["bs-11 flex-1 min-is-0 flex gap-2 rounded-ie-none",r],ref:t,variant:n,onClick:p.onClick},p.icon&&c.createElement(p.icon,null),c.createElement("span",null,p.label)),c.createElement(Un.Root,null,c.createElement(Un.Trigger,{asChild:!0},c.createElement(yr,{classNames:["bs-11 flex-none rounded-is-none",r]},c.createElement("span",{className:"sr-only"},h("invite options label")),c.createElement(ze.CaretDown,null))),c.createElement(Un.Content,null,c.createElement(Un.Viewport,null,Object.entries(i).map(([g,v])=>c.createElement(Un.CheckboxItem,{key:g,"aria-labelledby":`${g}__label`,"aria-describedby":`${g}__description`,checked:f===g,onCheckedChange:y=>y&&d(g),classNames:"gap-2"},v.icon&&c.createElement(v.icon,{className:We(5)}),c.createElement("div",{role:"none",className:"flex-1 min-is-0 space-b-1"},c.createElement("p",{id:`${g}__label`},v.label),v.description&&c.createElement("p",{id:`${g}__description`,className:Ot},v.description)),c.createElement(Un.ItemIndicator,{asChild:!0},c.createElement(ze.Check,null))))),c.createElement(Un.Arrow,null))))}),at=c.forwardRef((e,t)=>{const{children:r,classNames:n,variant:o,isFull:i=!0,...a}=e;return c.createElement(yr,{...a,classNames:[i&&"is-full","bs-11 flex gap-2 mbs-2",n],ref:t,variant:o},r)}),zt=c.forwardRef(({classNames:e,children:t,...r},n)=>c.createElement("div",{...r,className:ue("flex flex-col gap-2 mbs-2",Array.isArray(t)&&t.length>1?"justify-between":"justify-center",e),ref:n},t)),gy=({onDone:e,...t})=>{const{t:r}=tt("os");return c.createElement(yr,{variant:"ghost",classNames:ue("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),onClick:()=>e==null?void 0:e(),...t},c.createElement(ze.X,{weight:"bold",className:We(4)}),c.createElement("span",{className:"sr-only"},r("exit label")))},_f=({text:e,className:t})=>c.createElement("div",{role:"none",className:ue(We(14),"rounded relative pointer-events-none",t)},c.createElement("svg",{viewBox:`0 0 ${14*4} ${14*4}`,width:14*4,height:14*4},c.createElement("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",baselineShift:"-0.25rem",fontSize:"2.25rem"},e))),C7=e=>{const{children:t}=e;return c.createElement("div",{role:"none",className:"absolute inset-0 flex items-center justify-center"},t)},Ef=c.forwardRef(({titleId:e,title:t,titleSrOnly:r,children:n,corner:o},i)=>c.createElement("div",{role:"none",className:"pbe-2 relative",ref:i},o,c.createElement("h1",{...!r&&{id:e},className:ue(Ot,"text-center mlb-2",r&&"invisible")},t),r&&c.createElement("span",{id:e},t),n)),vy=e=>{const{children:t}=e;return c.createElement("span",{className:ue(Ot,"text-center mli-6 whitespace-normal")},t)},Vi=({validationMessage:e,label:t,...r})=>c.createElement(jr.Root,null,c.createElement(jr.Label,null,t),c.createElement(jr.TextInput,{...r,classNames:"plb-3 mbs-2 text-center"}),c.createElement(jr.DescriptionAndValidation,null,e&&c.createElement(jr.Validation,null,e))),Er=c.forwardRef(({children:e,className:t,...r},n)=>c.createElement("h2",{...r,className:ue("font-normal text-sm mbe-4 mli-1 text-center",t),ref:n},e));var A7=typeof WeakRef<"u",my=class{constructor(e){A7&&typeof e=="object"?this._weakRef=new WeakRef(e):this._instance=e}deref(){var e,t;let r;return this._weakRef?(r=(e=this._weakRef)==null?void 0:e.deref(),r||delete this._weakRef):(r=this._instance,(t=r==null?void 0:r.isDisposed)!=null&&t.call(r)&&delete this._instance),r}},zi="keyborg:focusin";function O7(e){const t=e.HTMLElement,r=t.prototype.focus;let n=!1;return t.prototype.focus=function(){n=!0},e.document.createElement("button").focus(),t.prototype.focus=r,n}var xf=!1;function Bo(e){const t=e.focus;t.__keyborgNativeFocus?t.__keyborgNativeFocus.call(e):e.focus()}function T7(e){const t=e;xf||(xf=O7(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=a;const n=s=>{const l=s.relatedTarget,u=s.currentTarget;u.contains(l)||(u.removeEventListener("focusin",o,!0),u.removeEventListener("focusout",n,!0))},o=s=>{var l;const u=s.target;if(!u)return;if(u.shadowRoot){u.shadowRoot.addEventListener("focusin",o,!0),u.shadowRoot.addEventListener("focusout",n,!0);return}const f={relatedTarget:s.relatedTarget||void 0},d=new CustomEvent(zi,{cancelable:!0,bubbles:!0,composed:!0,detail:f});d.details=f,(xf||i.lastFocusedProgrammatically)&&(f.isFocusedProgrammatically=u===((l=i.lastFocusedProgrammatically)==null?void 0:l.deref()),i.lastFocusedProgrammatically=void 0),u.dispatchEvent(d)},i=t.__keyborgData={focusInHandler:o};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0);function a(){const s=t.__keyborgData;return s&&(s.lastFocusedProgrammatically=new my(this)),r.apply(this,arguments)}a.__keyborgNativeFocus=r}function I7(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,o=t.__keyborgData;o&&(t.document.removeEventListener("focusin",o.focusInHandler,!0),delete t.__keyborgData),n&&(r.focus=n)}var P7=500,by=0,k7=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(e){const t=e.id;t in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[t]=new my(e))}remove(e){delete this.__keyborgCoreRefs[e],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(e){if(this._isNavigatingWithKeyboard!==e){this._isNavigatingWithKeyboard=e;for(const t of Object.keys(this.__keyborgCoreRefs)){const n=this.__keyborgCoreRefs[t].deref();n?n.update(e):this.remove(t)}}}getVal(){return this._isNavigatingWithKeyboard}},Wr=new k7,N7=class{constructor(e,t){this._onFocusIn=n=>{if(this._isMouseUsedTimer||Wr.getVal())return;const o=n.detail;o.relatedTarget&&(o.isFocusedProgrammatically||o.isFocusedProgrammatically===void 0||Wr.setVal(!0))},this._onMouseDown=n=>{if(n.buttons===0||n.clientX===0&&n.clientY===0&&n.screenX===0&&n.screenY===0)return;const o=this._win;o&&(this._isMouseUsedTimer&&o.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=o.setTimeout(()=>{delete this._isMouseUsedTimer},1e3)),Wr.setVal(!1)},this._onKeyDown=n=>{Wr.getVal()?this._shouldDismissKeyboardNavigation(n)&&this._scheduleDismiss():this._shouldTriggerKeyboardNavigation(n)&&Wr.setVal(!0)},this.id="c"+ ++by,this._win=e;const r=e.document;if(t){const n=t.triggerKeys,o=t.dismissKeys;n!=null&&n.length&&(this._triggerKeys=new Set(n)),o!=null&&o.length&&(this._dismissKeys=new Set(o))}r.addEventListener(zi,this._onFocusIn,!0),r.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("keydown",this._onKeyDown,!0),T7(e),Wr.add(this)}dispose(){const e=this._win;if(e){this._isMouseUsedTimer&&(e.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=void 0),this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),I7(e);const t=e.document;t.removeEventListener(zi,this._onFocusIn,!0),t.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Wr.remove(this.id)}}isDisposed(){return!!this._win}update(e){var t,r;const n=(r=(t=this._win)==null?void 0:t.__keyborg)==null?void 0:r.refs;if(n)for(const o of Object.keys(n))Sf.update(n[o],e)}_shouldTriggerKeyboardNavigation(e){var t;if(e.key==="Tab")return!0;const r=(t=this._win)==null?void 0:t.document.activeElement,n=!this._triggerKeys||this._triggerKeys.has(e.keyCode),o=r&&(r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.isContentEditable);return n&&!o}_shouldDismissKeyboardNavigation(e){var t;return(t=this._dismissKeys)==null?void 0:t.has(e.keyCode)}_scheduleDismiss(){const e=this._win;if(e){this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const t=e.document.activeElement;this._dismissTimer=e.setTimeout(()=>{this._dismissTimer=void 0;const r=e.document.activeElement;t&&r&&t===r&&Wr.setVal(!1)},P7)}}},Sf=class R1{constructor(t,r){this._cb=[],this._id="k"+ ++by,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new N7(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new R1(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)==null?void 0:t.__keyborg;r!=null&&r.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV!=="production"&&console.error(`Keyborg instance ${this._id} is being disposed incorrectly.`),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Wr.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Wr.setVal(t)}};function D7(e,t){return Sf.create(e,t)}function L7(e){Sf.dispose(e)}/*!
112
+ `),bD=Symbol("kDebugInfoProperties");(class{constructor(e,t){this.constr=e,this.parent=t}getInfo(){if(!this.instance)return{};const e=this.constr.prototype[bD]??[],t={};for(const r of e)t[r]=this.instance[r];return t}[Er.custom](){return{className:this.constr.name,info:this.getInfo(),parent:this.parent}}});var yD=class extends Error{constructor(){super("Context disposed.")}};function wD(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}var Wu="/home/runner/work/dxos/dxos/packages/common/context/src/context.ts",_D=300,n0=class U1{constructor({onError:t=o=>{if(!(o instanceof yD))throw this.dispose(),o},attributes:r={},parent:n}={}){this._disposeCallbacks=[],this._isDisposed=!1,this._disposePromise=void 0,this._parent=null,this.maxSafeDisposeCallbacks=_D,this._onError=t,this._attributes=r,n!==void 0&&(this._parent=n)}get disposed(){return this._isDisposed}get disposeCallbacksLength(){return this._disposeCallbacks.length}onDispose(t){return this._isDisposed&&(async()=>{try{await t()}catch(r){Ze.catch(r,void 0,{F:Wu,L:82,S:this,C:(n,o)=>n(...o)})}})(),this._disposeCallbacks.push(t),this._disposeCallbacks.length>this.maxSafeDisposeCallbacks&&Ze.warn("Context has a large number of dispose callbacks. This might be a memory leak.",{count:this._disposeCallbacks.length,safeThreshold:this.maxSafeDisposeCallbacks},{F:Wu,L:89,S:this,C:(r,n)=>r(...n)}),()=>{const r=this._disposeCallbacks.indexOf(t);r!==-1&&this._disposeCallbacks.splice(r,1)}}dispose(){if(this._disposePromise)return this._disposePromise;this._isDisposed=!0;const t=[];for(const r of this._disposeCallbacks.reverse())t.push((async()=>{try{await r()}catch(n){Ze.catch(n,void 0,{F:Wu,L:124,S:this,C:(o,i)=>o(...i)})}})());return this._disposeCallbacks.length=0,this._disposePromise=Promise.all(t).then(()=>{})}raise(t){if(!this._isDisposed)try{this._onError(t)}catch(r){Promise.reject(r)}}derive({onError:t,attributes:r}={}){const n=new U1({onError:async i=>{if(!t)this.raise(i);else try{await t(i)}catch{this.raise(i)}},attributes:r}),o=this.onDispose(()=>n.dispose());return n.onDispose(o),n}getAttribute(t){if(t in this._attributes)return this._attributes[t];if(this._parent!==null)return this._parent.getAttribute(t)}};n0=wD([q8("Context")],n0);var Ms={};Object.defineProperty(Ms,"__esModule",{value:!0}),Ms.Observable=void 0;const o0=e=>!!Symbol[e],Hu=e=>o0(e)?Symbol[e]:"@@"+e,ED=Hu("iterator"),Vu=Hu("observable"),i0=Hu("species");function Fs(e,t){let r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function Bi(e){let t=e.constructor;return t!==void 0&&(t=t[i0],t===null&&(t=void 0)),t!==void 0?t:Bs}function xD(e){return e instanceof Bs}function Fo(e){Fo.log?Fo.log(e):setTimeout(()=>{throw e})}function js(e){Promise.resolve().then(()=>{try{e()}catch(t){Fo(t)}})}function a0(e){let t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{let r=Fs(t,"unsubscribe");r&&r.call(t)}}catch(r){Fo(r)}}function zu(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function SD(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(s0(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function s0(e,t,r){e._state="running";let n=e._observer;try{let o=Fs(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(zu(e),o)o.call(n,r);else throw r;break;case"complete":zu(e),o&&o.call(n);break}}catch(o){Fo(o)}e._state==="closed"?a0(e):e._state==="running"&&(e._state="ready")}function Gu(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],js(()=>SD(e));return}s0(e,t,r)}}class $D{constructor(t,r){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";let n=this,o={get closed(){return n._state==="closed"},next(i){Gu(n,"next",i)},error(i){Gu(n,"error",i)},complete(){Gu(n,"complete")}};try{this._cleanup=r.call(void 0,o)}catch(i){o.error(i)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(zu(this),a0(this))}}let Bs=class $l{constructor(t){if(!(this instanceof $l))throw new TypeError("Observable cannot be called as a function");if(typeof t!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=t}subscribe(t){return(typeof t!="object"||t===null)&&(t={next:t,error:arguments[1],complete:arguments[2]}),new $D(t,this._subscriber)}forEach(t){return new Promise((r,n)=>{if(typeof t!="function"){n(new TypeError(t+" is not a function"));return}function o(){i.unsubscribe(),r()}let i=this.subscribe({next(a){try{t(a,o)}catch(s){n(s),i.unsubscribe()}},error:n,complete:r})})}map(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Bi(this);return new r(n=>this.subscribe({next(o){try{o=t(o)}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}filter(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Bi(this);return new r(n=>this.subscribe({next(o){try{if(!t(o))return}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}reduce(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Bi(this),n=arguments.length>1,o=!1,a=arguments[1];return new r(s=>this.subscribe({next(l){let u=!o;if(o=!0,!u||n)try{a=t(a,l)}catch(f){return s.error(f)}else a=l},error(l){s.error(l)},complete(){if(!o&&!n)return s.error(new TypeError("Cannot reduce an empty sequence"));s.next(a),s.complete()}}))}async all(){let t=[];return await this.forEach(r=>t.push(r)),t}concat(...t){let r=Bi(this);return new r(n=>{let o,i=0;function a(s){o=s.subscribe({next(l){n.next(l)},error(l){n.error(l)},complete(){i===t.length?(o=void 0,n.complete()):a(r.from(t[i++]))}})}return a(this),()=>{o&&(o.unsubscribe(),o=void 0)}})}flatMap(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Bi(this);return new r(n=>{let o=[],i=this.subscribe({next(s){if(t)try{s=t(s)}catch(u){return n.error(u)}let l=r.from(s).subscribe({next(u){n.next(u)},error(u){n.error(u)},complete(){let u=o.indexOf(l);u>=0&&o.splice(u,1),a()}});o.push(l)},error(s){n.error(s)},complete(){a()}});function a(){i.closed&&o.length===0&&n.complete()}return()=>{o.forEach(s=>s.unsubscribe()),i.unsubscribe()}})}[Vu](){return this}static from(t){let r=typeof this=="function"?this:$l;if(t==null)throw new TypeError(t+" is not an object");let n=Fs(t,Vu);if(n){let o=n.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return xD(o)&&o.constructor===r?o:new r(i=>o.subscribe(i))}if(o0("iterator")&&(n=Fs(t,ED),n))return new r(o=>{js(()=>{if(!o.closed){for(let i of n.call(t))if(o.next(i),o.closed)return;o.complete()}})});if(Array.isArray(t))return new r(o=>{js(()=>{if(!o.closed){for(let i=0;i<t.length;++i)if(o.next(t[i]),o.closed)return;o.complete()}})});throw new TypeError(t+" is not observable")}static of(...t){let r=typeof this=="function"?this:$l;return new r(n=>{js(()=>{if(!n.closed){for(let o=0;o<t.length;++o)if(n.next(t[o]),n.closed)return;n.complete()}})})}static get[i0](){return this}};Ms.Observable=Bs,Object.defineProperty(Bs,Symbol("extensions"),{value:{symbol:Vu,hostReportError:Fo},configurable:!0});var CD=Ms.Observable;const Rs=ln(CD);var l0={exports:{}},Ku={exports:{}},jo=typeof Reflect=="object"?Reflect:null,c0=jo&&typeof jo.apply=="function"?jo.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Us;jo&&typeof jo.ownKeys=="function"?Us=jo.ownKeys:Object.getOwnPropertySymbols?Us=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Us=function(t){return Object.getOwnPropertyNames(t)};function AD(e){console&&console.warn&&console.warn(e)}var u0=Number.isNaN||function(t){return t!==t};function ut(){ut.init.call(this)}Ku.exports=ut,Ku.exports.once=PD,ut.EventEmitter=ut,ut.prototype._events=void 0,ut.prototype._eventsCount=0,ut.prototype._maxListeners=void 0;var f0=10;function Ws(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(ut,"defaultMaxListeners",{enumerable:!0,get:function(){return f0},set:function(e){if(typeof e!="number"||e<0||u0(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");f0=e}}),ut.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ut.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||u0(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function d0(e){return e._maxListeners===void 0?ut.defaultMaxListeners:e._maxListeners}ut.prototype.getMaxListeners=function(){return d0(this)},ut.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var o=t==="error",i=this._events;if(i!==void 0)o=o&&i.error===void 0;else if(!o)return!1;if(o){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")c0(l,this,r);else for(var u=l.length,f=m0(l,u),n=0;n<u;++n)c0(f[n],this,r);return!0};function p0(e,t,r,n){var o,i,a;if(Ws(r),i=e._events,i===void 0?(i=e._events=Object.create(null),e._eventsCount=0):(i.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),a===void 0)a=i[t]=r,++e._eventsCount;else if(typeof a=="function"?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),o=d0(e),o>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,AD(s)}return e}ut.prototype.addListener=function(t,r){return p0(this,t,r,!1)},ut.prototype.on=ut.prototype.addListener,ut.prototype.prependListener=function(t,r){return p0(this,t,r,!0)};function OD(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h0(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=OD.bind(n);return o.listener=r,n.wrapFn=o,o}ut.prototype.once=function(t,r){return Ws(r),this.on(t,h0(this,t,r)),this},ut.prototype.prependOnceListener=function(t,r){return Ws(r),this.prependListener(t,h0(this,t,r)),this},ut.prototype.removeListener=function(t,r){var n,o,i,a,s;if(Ws(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():TD(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this},ut.prototype.off=ut.prototype.removeListener,ut.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o<i.length;++o)a=i[o],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(o=r.length-1;o>=0;o--)this.removeListener(t,r[o]);return this};function g0(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?ID(o):m0(o,o.length)}ut.prototype.listeners=function(t){return g0(this,t,!0)},ut.prototype.rawListeners=function(t){return g0(this,t,!1)},ut.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):v0.call(e,t)},ut.prototype.listenerCount=v0;function v0(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}ut.prototype.eventNames=function(){return this._eventsCount>0?Us(this._events):[]};function m0(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function TD(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function ID(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function PD(e,t){return new Promise(function(r,n){function o(a){e.removeListener(t,i),n(a)}function i(){typeof e.removeListener=="function"&&e.removeListener("error",o),r([].slice.call(arguments))}b0(e,t,i,{once:!0}),t!=="error"&&kD(e,o,{once:!0})})}function kD(e,t,r){typeof e.on=="function"&&b0(e,"error",t,r)}function b0(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var y0=Ku.exports,w0=y0.EventEmitter;const _0=z1(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var qu,E0;function ND(){if(E0)return qu;E0=1;function e(p,h){var g=Object.keys(p);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(p);h&&(v=v.filter(function(y){return Object.getOwnPropertyDescriptor(p,y).enumerable})),g.push.apply(g,v)}return g}function t(p){for(var h=1;h<arguments.length;h++){var g=arguments[h]!=null?arguments[h]:{};h%2?e(Object(g),!0).forEach(function(v){r(p,v,g[v])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(g)):e(Object(g)).forEach(function(v){Object.defineProperty(p,v,Object.getOwnPropertyDescriptor(g,v))})}return p}function r(p,h,g){return h in p?Object.defineProperty(p,h,{value:g,enumerable:!0,configurable:!0,writable:!0}):p[h]=g,p}function n(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function o(p,h){for(var g=0;g<h.length;g++){var v=h[g];v.enumerable=v.enumerable||!1,v.configurable=!0,"value"in v&&(v.writable=!0),Object.defineProperty(p,v.key,v)}}function i(p,h,g){return h&&o(p.prototype,h),g&&o(p,g),p}var a=er,s=a.Buffer,l=_0,u=l.inspect,f=u&&u.custom||"inspect";function d(p,h,g){s.prototype.copy.call(p,h,g)}return qu=function(){function p(){n(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(g){var v={data:g,next:null};this.length>0?this.tail.next=v:this.head=v,this.tail=v,++this.length}},{key:"unshift",value:function(g){var v={data:g,next:this.head};this.length===0&&(this.tail=v),this.head=v,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var v=this.head,y=""+v.data;v=v.next;)y+=g+v.data;return y}},{key:"concat",value:function(g){if(this.length===0)return s.alloc(0);for(var v=s.allocUnsafe(g>>>0),y=this.head,m=0;y;)d(y.data,v,m),m+=y.data.length,y=y.next;return v}},{key:"consume",value:function(g,v){var y;return g<this.head.data.length?(y=this.head.data.slice(0,g),this.head.data=this.head.data.slice(g)):g===this.head.data.length?y=this.shift():y=v?this._getString(g):this._getBuffer(g),y}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(g){var v=this.head,y=1,m=v.data;for(g-=m.length;v=v.next;){var w=v.data,E=g>w.length?w.length:g;if(E===w.length?m+=w:m+=w.slice(0,g),g-=E,g===0){E===w.length?(++y,v.next?this.head=v.next:this.head=this.tail=null):(this.head=v,v.data=w.slice(E));break}++y}return this.length-=y,m}},{key:"_getBuffer",value:function(g){var v=s.allocUnsafe(g),y=this.head,m=1;for(y.data.copy(v),g-=y.data.length;y=y.next;){var w=y.data,E=g>w.length?w.length:g;if(w.copy(v,v.length-g,0,E),g-=E,g===0){E===w.length?(++m,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=w.slice(E));break}++m}return this.length-=m,v}},{key:f,value:function(g,v){return u(this,t({},v,{depth:0,customInspect:!1}))}}]),p}(),qu}function DD(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Yu,this,e)):process.nextTick(Yu,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(Hs,r):(r._writableState.errorEmitted=!0,process.nextTick(x0,r,i)):process.nextTick(x0,r,i):t?(process.nextTick(Hs,r),t(i)):process.nextTick(Hs,r)}),this)}function x0(e,t){Yu(e,t),Hs(e)}function Hs(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function LD(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Yu(e,t){e.emit("error",t)}function MD(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var S0={destroy:DD,undestroy:LD,errorOrDestroy:MD},Yn={};function FD(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var $0={};function fr(e,t,r){r||(r=Error);function n(i,a,s){return typeof t=="string"?t:t(i,a,s)}var o=function(i){FD(a,i);function a(s,l,u){return i.call(this,n(s,l,u))||this}return a}(r);o.prototype.name=r.name,o.prototype.code=e,$0[e]=o}function C0(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function jD(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function BD(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function RD(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}fr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),fr("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&jD(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var o;if(BD(e," argument"))o="The ".concat(e," ").concat(n," ").concat(C0(t,"type"));else{var i=RD(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(C0(t,"type"))}return o+=". Received type ".concat(typeof r),o},TypeError),fr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),fr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),fr("ERR_STREAM_PREMATURE_CLOSE","Premature close"),fr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),fr("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),fr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),fr("ERR_STREAM_WRITE_AFTER_END","write after end"),fr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),fr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),fr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Yn.codes=$0;var UD=Yn.codes.ERR_INVALID_OPT_VALUE;function WD(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function HD(e,t,r,n){var o=WD(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var i=n?r:"highWaterMark";throw new UD(i,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var A0={getHighWaterMark:HD},Ju={exports:{}};typeof Object.create=="function"?Ju.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Ju.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var Ri=Ju.exports,VD=zD;function zD(e,t){if(Xu("noDeprecation"))return e;var r=!1;function n(){if(!r){if(Xu("throwDeprecation"))throw new Error(t);Xu("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function Xu(e){try{if(!Je.localStorage)return!1}catch{return!1}var t=Je.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var Zu,O0;function T0(){if(O0)return Zu;O0=1,Zu=C;function e(U){var z=this;this.next=null,this.entry=null,this.finish=function(){de(z,U)}}var t;C.WritableState=I;var r={deprecate:VD},n=w0,o=er.Buffer,i=Je.Uint8Array||function(){};function a(U){return o.from(U)}function s(U){return o.isBuffer(U)||U instanceof i}var l=S0,u=A0,f=u.getHighWaterMark,d=Yn.codes,p=d.ERR_INVALID_ARG_TYPE,h=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,v=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,E=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;Ri(C,n);function k(){}function I(U,z,M){t=t||Bo(),U=U||{},typeof M!="boolean"&&(M=z instanceof t),this.objectMode=!!U.objectMode,M&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=f(this,U,"writableHighWaterMark",M),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var R=U.decodeStrings===!1;this.decodeStrings=!R,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G){te(z,G)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}I.prototype.getBuffer=function(){for(var z=this.bufferedRequest,M=[];z;)M.push(z),z=z.next;return M},function(){try{Object.defineProperty(I.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var S;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(C,Symbol.hasInstance,{value:function(z){return S.call(this,z)?!0:this!==C?!1:z&&z._writableState instanceof I}})):S=function(z){return z instanceof this};function C(U){t=t||Bo();var z=this instanceof t;if(!z&&!S.call(C,this))return new C(U);this._writableState=new I(U,this,z),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),n.call(this)}C.prototype.pipe=function(){x(this,new v)};function P(U,z){var M=new w;x(U,M),process.nextTick(z,M)}function F(U,z,M,R){var G;return M===null?G=new m:typeof M!="string"&&!z.objectMode&&(G=new p("chunk",["string","Buffer"],M)),G?(x(U,G),process.nextTick(R,G),!1):!0}C.prototype.write=function(U,z,M){var R=this._writableState,G=!1,O=!R.objectMode&&s(U);return O&&!o.isBuffer(U)&&(U=a(U)),typeof z=="function"&&(M=z,z=null),O?z="buffer":z||(z=R.defaultEncoding),typeof M!="function"&&(M=k),R.ending?P(this,M):(O||F(this,R,U,M))&&(R.pendingcb++,G=N(this,R,O,U,z,M)),G},C.prototype.cork=function(){this._writableState.corked++},C.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&ae(this,U))},C.prototype.setDefaultEncoding=function(z){if(typeof z=="string"&&(z=z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((z+"").toLowerCase())>-1))throw new E(z);return this._writableState.defaultEncoding=z,this},Object.defineProperty(C.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(U,z,M){return!U.objectMode&&U.decodeStrings!==!1&&typeof z=="string"&&(z=o.from(z,M)),z}Object.defineProperty(C.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(U,z,M,R,G,O){if(!M){var T=D(z,R,G);R!==T&&(M=!0,G="buffer",R=T)}var Z=z.objectMode?1:R.length;z.length+=Z;var ne=z.length<z.highWaterMark;if(ne||(z.needDrain=!0),z.writing||z.corked){var pe=z.lastBufferedRequest;z.lastBufferedRequest={chunk:R,encoding:G,isBuf:M,callback:O,next:null},pe?pe.next=z.lastBufferedRequest:z.bufferedRequest=z.lastBufferedRequest,z.bufferedRequestCount+=1}else J(U,z,!1,Z,R,G,O);return ne}function J(U,z,M,R,G,O,T){z.writelen=R,z.writecb=T,z.writing=!0,z.sync=!0,z.destroyed?z.onwrite(new y("write")):M?U._writev(G,z.onwrite):U._write(G,O,z.onwrite),z.sync=!1}function K(U,z,M,R,G){--z.pendingcb,M?(process.nextTick(G,R),process.nextTick(H,U,z),U._writableState.errorEmitted=!0,x(U,R)):(G(R),U._writableState.errorEmitted=!0,x(U,R),H(U,z))}function Y(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}function te(U,z){var M=U._writableState,R=M.sync,G=M.writecb;if(typeof G!="function")throw new g;if(Y(M),z)K(U,M,R,z,G);else{var O=ge(M)||U.destroyed;!O&&!M.corked&&!M.bufferProcessing&&M.bufferedRequest&&ae(U,M),R?process.nextTick(oe,U,M,O,G):oe(U,M,O,G)}}function oe(U,z,M,R){M||le(U,z),z.pendingcb--,R(),H(U,z)}function le(U,z){z.length===0&&z.needDrain&&(z.needDrain=!1,U.emit("drain"))}function ae(U,z){z.bufferProcessing=!0;var M=z.bufferedRequest;if(U._writev&&M&&M.next){var R=z.bufferedRequestCount,G=new Array(R),O=z.corkedRequestsFree;O.entry=M;for(var T=0,Z=!0;M;)G[T]=M,M.isBuf||(Z=!1),M=M.next,T+=1;G.allBuffers=Z,J(U,z,!0,z.length,G,"",O.finish),z.pendingcb++,z.lastBufferedRequest=null,O.next?(z.corkedRequestsFree=O.next,O.next=null):z.corkedRequestsFree=new e(z),z.bufferedRequestCount=0}else{for(;M;){var ne=M.chunk,pe=M.encoding,me=M.callback,Ee=z.objectMode?1:ne.length;if(J(U,z,!1,Ee,ne,pe,me),M=M.next,z.bufferedRequestCount--,z.writing)break}M===null&&(z.lastBufferedRequest=null)}z.bufferedRequest=M,z.bufferProcessing=!1}C.prototype._write=function(U,z,M){M(new h("_write()"))},C.prototype._writev=null,C.prototype.end=function(U,z,M){var R=this._writableState;return typeof U=="function"?(M=U,U=null,z=null):typeof z=="function"&&(M=z,z=null),U!=null&&this.write(U,z),R.corked&&(R.corked=1,this.uncork()),R.ending||re(this,R,M),this},Object.defineProperty(C.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ge(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function ce(U,z){U._final(function(M){z.pendingcb--,M&&x(U,M),z.prefinished=!0,U.emit("prefinish"),H(U,z)})}function q(U,z){!z.prefinished&&!z.finalCalled&&(typeof U._final=="function"&&!z.destroyed?(z.pendingcb++,z.finalCalled=!0,process.nextTick(ce,U,z)):(z.prefinished=!0,U.emit("prefinish")))}function H(U,z){var M=ge(z);if(M&&(q(U,z),z.pendingcb===0&&(z.finished=!0,U.emit("finish"),z.autoDestroy))){var R=U._readableState;(!R||R.autoDestroy&&R.endEmitted)&&U.destroy()}return M}function re(U,z,M){z.ending=!0,H(U,z),M&&(z.finished?process.nextTick(M):U.once("finish",M)),z.ended=!0,U.writable=!1}function de(U,z,M){var R=U.entry;for(U.entry=null;R;){var G=R.callback;z.pendingcb--,G(M),R=R.next}z.corkedRequestsFree.next=U}return Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(z){this._writableState&&(this._writableState.destroyed=z)}}),C.prototype.destroy=l.destroy,C.prototype._undestroy=l.undestroy,C.prototype._destroy=function(U,z){z(U)},Zu}var Qu,I0;function Bo(){if(I0)return Qu;I0=1;var e=Object.keys||function(u){var f=[];for(var d in u)f.push(d);return f};Qu=a;var t=j0(),r=T0();Ri(a,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var i=n[o];a.prototype[i]||(a.prototype[i]=r.prototype[i])}function a(u){if(!(this instanceof a))return new a(u);t.call(this,u),r.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(u){u.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),Qu}var ef={},P0;function k0(){if(P0)return ef;P0=1;var e=Gb.Buffer,t=e.isEncoding||function(m){switch(m=""+m,m&&m.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(m){if(!m)return"utf8";for(var w;;)switch(m){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return m;default:if(w)return;m=(""+m).toLowerCase(),w=!0}}function n(m){var w=r(m);if(typeof w!="string"&&(e.isEncoding===t||!t(m)))throw new Error("Unknown encoding: "+m);return w||m}ef.StringDecoder=o;function o(m){this.encoding=n(m);var w;switch(this.encoding){case"utf16le":this.text=d,this.end=p,w=4;break;case"utf8":this.fillLast=l,w=4;break;case"base64":this.text=h,this.end=g,w=3;break;default:this.write=v,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(w)}o.prototype.write=function(m){if(m.length===0)return"";var w,E;if(this.lastNeed){if(w=this.fillLast(m),w===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<m.length?w?w+this.text(m,E):this.text(m,E):w||""},o.prototype.end=f,o.prototype.text=u,o.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length};function i(m){return m<=127?0:m>>5===6?2:m>>4===14?3:m>>3===30?4:m>>6===2?-1:-2}function a(m,w,E){var x=w.length-1;if(x<E)return 0;var k=i(w[x]);return k>=0?(k>0&&(m.lastNeed=k-1),k):--x<E||k===-2?0:(k=i(w[x]),k>=0?(k>0&&(m.lastNeed=k-2),k):--x<E||k===-2?0:(k=i(w[x]),k>=0?(k>0&&(k===2?k=0:m.lastNeed=k-3),k):0))}function s(m,w,E){if((w[0]&192)!==128)return m.lastNeed=0,"�";if(m.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return m.lastNeed=1,"�";if(m.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return m.lastNeed=2,"�"}}function l(m){var w=this.lastTotal-this.lastNeed,E=s(this,m);if(E!==void 0)return E;if(this.lastNeed<=m.length)return m.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,w,0,m.length),this.lastNeed-=m.length}function u(m,w){var E=a(this,m,w);if(!this.lastNeed)return m.toString("utf8",w);this.lastTotal=E;var x=m.length-(E-this.lastNeed);return m.copy(this.lastChar,0,x),m.toString("utf8",w,x)}function f(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+"�":w}function d(m,w){if((m.length-w)%2===0){var E=m.toString("utf16le",w);if(E){var x=E.charCodeAt(E.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",w,m.length-1)}function p(m){var w=m&&m.length?this.write(m):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,E)}return w}function h(m,w){var E=(m.length-w)%3;return E===0?m.toString("base64",w):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",w,m.length-E))}function g(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function v(m){return m.toString(this.encoding)}function y(m){return m&&m.length?this.write(m):""}return ef}var N0=Yn.codes.ERR_STREAM_PREMATURE_CLOSE;function GD(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}function KD(){}function qD(e){return e.setHeader&&typeof e.abort=="function"}function D0(e,t,r){if(typeof t=="function")return D0(e,null,t);t||(t={}),r=GD(r||KD);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,i=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){o=!1,a=!0,n||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,l=!0,o||r.call(e)},f=function(g){r.call(e,g)},d=function(){var g;if(n&&!l)return(!e._readableState||!e._readableState.ended)&&(g=new N0),r.call(e,g);if(o&&!a)return(!e._writableState||!e._writableState.ended)&&(g=new N0),r.call(e,g)},p=function(){e.req.on("finish",s)};return qD(e)?(e.on("complete",s),e.on("abort",d),e.req?p():e.on("request",p)):o&&!e._writableState&&(e.on("end",i),e.on("close",i)),e.on("end",u),e.on("finish",s),t.error!==!1&&e.on("error",f),e.on("close",d),function(){e.removeListener("complete",s),e.removeListener("abort",d),e.removeListener("request",p),e.req&&e.req.removeListener("finish",s),e.removeListener("end",i),e.removeListener("close",i),e.removeListener("finish",s),e.removeListener("end",u),e.removeListener("error",f),e.removeListener("close",d)}}var tf=D0,rf,L0;function YD(){if(L0)return rf;L0=1;var e;function t(m,w,E){return w in m?Object.defineProperty(m,w,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[w]=E,m}var r=tf,n=Symbol("lastResolve"),o=Symbol("lastReject"),i=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),l=Symbol("handlePromise"),u=Symbol("stream");function f(m,w){return{value:m,done:w}}function d(m){var w=m[n];if(w!==null){var E=m[u].read();E!==null&&(m[s]=null,m[n]=null,m[o]=null,w(f(E,!1)))}}function p(m){process.nextTick(d,m)}function h(m,w){return function(E,x){m.then(function(){if(w[a]){E(f(void 0,!0));return}w[l](E,x)},x)}}var g=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((e={get stream(){return this[u]},next:function(){var w=this,E=this[i];if(E!==null)return Promise.reject(E);if(this[a])return Promise.resolve(f(void 0,!0));if(this[u].destroyed)return new Promise(function(S,C){process.nextTick(function(){w[i]?C(w[i]):S(f(void 0,!0))})});var x=this[s],k;if(x)k=new Promise(h(x,this));else{var I=this[u].read();if(I!==null)return Promise.resolve(f(I,!1));k=new Promise(this[l])}return this[s]=k,k}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var w=this;return new Promise(function(E,x){w[u].destroy(null,function(k){if(k){x(k);return}E(f(void 0,!0))})})}),e),g),y=function(w){var E,x=Object.create(v,(E={},t(E,u,{value:w,writable:!0}),t(E,n,{value:null,writable:!0}),t(E,o,{value:null,writable:!0}),t(E,i,{value:null,writable:!0}),t(E,a,{value:w._readableState.endEmitted,writable:!0}),t(E,l,{value:function(I,S){var C=x[u].read();C?(x[s]=null,x[n]=null,x[o]=null,I(f(C,!1))):(x[n]=I,x[o]=S)},writable:!0}),E));return x[s]=null,r(w,function(k){if(k&&k.code!=="ERR_STREAM_PREMATURE_CLOSE"){var I=x[o];I!==null&&(x[s]=null,x[n]=null,x[o]=null,I(k)),x[i]=k;return}var S=x[n];S!==null&&(x[s]=null,x[n]=null,x[o]=null,S(f(void 0,!0))),x[a]=!0}),w.on("readable",p.bind(null,x)),x};return rf=y,rf}var nf,M0;function JD(){return M0||(M0=1,nf=function(){throw new Error("Readable.from is not available in the browser")}),nf}var of,F0;function j0(){if(F0)return of;F0=1,of=P;var e;P.ReadableState=C,y0.EventEmitter;var t=function(T,Z){return T.listeners(Z).length},r=w0,n=er.Buffer,o=Je.Uint8Array||function(){};function i(O){return n.from(O)}function a(O){return n.isBuffer(O)||O instanceof o}var s=_0,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var u=ND(),f=S0,d=A0,p=d.getHighWaterMark,h=Yn.codes,g=h.ERR_INVALID_ARG_TYPE,v=h.ERR_STREAM_PUSH_AFTER_EOF,y=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,E,x;Ri(P,r);var k=f.errorOrDestroy,I=["error","close","destroy","pause","resume"];function S(O,T,Z){if(typeof O.prependListener=="function")return O.prependListener(T,Z);!O._events||!O._events[T]?O.on(T,Z):Array.isArray(O._events[T])?O._events[T].unshift(Z):O._events[T]=[Z,O._events[T]]}function C(O,T,Z){e=e||Bo(),O=O||{},typeof Z!="boolean"&&(Z=T instanceof e),this.objectMode=!!O.objectMode,Z&&(this.objectMode=this.objectMode||!!O.readableObjectMode),this.highWaterMark=p(this,O,"readableHighWaterMark",Z),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=O.emitClose!==!1,this.autoDestroy=!!O.autoDestroy,this.destroyed=!1,this.defaultEncoding=O.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,O.encoding&&(w||(w=k0().StringDecoder),this.decoder=new w(O.encoding),this.encoding=O.encoding)}function P(O){if(e=e||Bo(),!(this instanceof P))return new P(O);var T=this instanceof e;this._readableState=new C(O,this,T),this.readable=!0,O&&(typeof O.read=="function"&&(this._read=O.read),typeof O.destroy=="function"&&(this._destroy=O.destroy)),r.call(this)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(T){this._readableState&&(this._readableState.destroyed=T)}}),P.prototype.destroy=f.destroy,P.prototype._undestroy=f.undestroy,P.prototype._destroy=function(O,T){T(O)},P.prototype.push=function(O,T){var Z=this._readableState,ne;return Z.objectMode?ne=!0:typeof O=="string"&&(T=T||Z.defaultEncoding,T!==Z.encoding&&(O=n.from(O,T),T=""),ne=!0),F(this,O,T,!1,ne)},P.prototype.unshift=function(O){return F(this,O,null,!0,!1)};function F(O,T,Z,ne,pe){l("readableAddChunk",T);var me=O._readableState;if(T===null)me.reading=!1,te(O,me);else{var Ee;if(pe||(Ee=N(me,T)),Ee)k(O,Ee);else if(me.objectMode||T&&T.length>0)if(typeof T!="string"&&!me.objectMode&&Object.getPrototypeOf(T)!==n.prototype&&(T=i(T)),ne)me.endEmitted?k(O,new m):D(O,me,T,!0);else if(me.ended)k(O,new v);else{if(me.destroyed)return!1;me.reading=!1,me.decoder&&!Z?(T=me.decoder.write(T),me.objectMode||T.length!==0?D(O,me,T,!1):ae(O,me)):D(O,me,T,!1)}else ne||(me.reading=!1,ae(O,me))}return!me.ended&&(me.length<me.highWaterMark||me.length===0)}function D(O,T,Z,ne){T.flowing&&T.length===0&&!T.sync?(T.awaitDrain=0,O.emit("data",Z)):(T.length+=T.objectMode?1:Z.length,ne?T.buffer.unshift(Z):T.buffer.push(Z),T.needReadable&&oe(O)),ae(O,T)}function N(O,T){var Z;return!a(T)&&typeof T!="string"&&T!==void 0&&!O.objectMode&&(Z=new g("chunk",["string","Buffer","Uint8Array"],T)),Z}P.prototype.isPaused=function(){return this._readableState.flowing===!1},P.prototype.setEncoding=function(O){w||(w=k0().StringDecoder);var T=new w(O);this._readableState.decoder=T,this._readableState.encoding=this._readableState.decoder.encoding;for(var Z=this._readableState.buffer.head,ne="";Z!==null;)ne+=T.write(Z.data),Z=Z.next;return this._readableState.buffer.clear(),ne!==""&&this._readableState.buffer.push(ne),this._readableState.length=ne.length,this};var J=1073741824;function K(O){return O>=J?O=J:(O--,O|=O>>>1,O|=O>>>2,O|=O>>>4,O|=O>>>8,O|=O>>>16,O++),O}function Y(O,T){return O<=0||T.length===0&&T.ended?0:T.objectMode?1:O!==O?T.flowing&&T.length?T.buffer.head.data.length:T.length:(O>T.highWaterMark&&(T.highWaterMark=K(O)),O<=T.length?O:T.ended?T.length:(T.needReadable=!0,0))}P.prototype.read=function(O){l("read",O),O=parseInt(O,10);var T=this._readableState,Z=O;if(O!==0&&(T.emittedReadable=!1),O===0&&T.needReadable&&((T.highWaterMark!==0?T.length>=T.highWaterMark:T.length>0)||T.ended))return l("read: emitReadable",T.length,T.ended),T.length===0&&T.ended?M(this):oe(this),null;if(O=Y(O,T),O===0&&T.ended)return T.length===0&&M(this),null;var ne=T.needReadable;l("need readable",ne),(T.length===0||T.length-O<T.highWaterMark)&&(ne=!0,l("length less than watermark",ne)),T.ended||T.reading?(ne=!1,l("reading or ended",ne)):ne&&(l("do read"),T.reading=!0,T.sync=!0,T.length===0&&(T.needReadable=!0),this._read(T.highWaterMark),T.sync=!1,T.reading||(O=Y(Z,T)));var pe;return O>0?pe=z(O,T):pe=null,pe===null?(T.needReadable=T.length<=T.highWaterMark,O=0):(T.length-=O,T.awaitDrain=0),T.length===0&&(T.ended||(T.needReadable=!0),Z!==O&&T.ended&&M(this)),pe!==null&&this.emit("data",pe),pe};function te(O,T){if(l("onEofChunk"),!T.ended){if(T.decoder){var Z=T.decoder.end();Z&&Z.length&&(T.buffer.push(Z),T.length+=T.objectMode?1:Z.length)}T.ended=!0,T.sync?oe(O):(T.needReadable=!1,T.emittedReadable||(T.emittedReadable=!0,le(O)))}}function oe(O){var T=O._readableState;l("emitReadable",T.needReadable,T.emittedReadable),T.needReadable=!1,T.emittedReadable||(l("emitReadable",T.flowing),T.emittedReadable=!0,process.nextTick(le,O))}function le(O){var T=O._readableState;l("emitReadable_",T.destroyed,T.length,T.ended),!T.destroyed&&(T.length||T.ended)&&(O.emit("readable"),T.emittedReadable=!1),T.needReadable=!T.flowing&&!T.ended&&T.length<=T.highWaterMark,U(O)}function ae(O,T){T.readingMore||(T.readingMore=!0,process.nextTick(ge,O,T))}function ge(O,T){for(;!T.reading&&!T.ended&&(T.length<T.highWaterMark||T.flowing&&T.length===0);){var Z=T.length;if(l("maybeReadMore read 0"),O.read(0),Z===T.length)break}T.readingMore=!1}P.prototype._read=function(O){k(this,new y("_read()"))},P.prototype.pipe=function(O,T){var Z=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=O;break;case 1:ne.pipes=[ne.pipes,O];break;default:ne.pipes.push(O);break}ne.pipesCount+=1,l("pipe count=%d opts=%j",ne.pipesCount,T);var pe=(!T||T.end!==!1)&&O!==process.stdout&&O!==process.stderr,me=pe?_e:De;ne.endEmitted?process.nextTick(me):Z.once("end",me),O.on("unpipe",Ee);function Ee(A,b){l("onunpipe"),A===Z&&b&&b.hasUnpiped===!1&&(b.hasUnpiped=!0,pt())}function _e(){l("onend"),O.end()}var ie=ce(Z);O.on("drain",ie);var Ne=!1;function pt(){l("cleanup"),O.removeListener("close",yt),O.removeListener("finish",Se),O.removeListener("drain",ie),O.removeListener("error",Me),O.removeListener("unpipe",Ee),Z.removeListener("end",_e),Z.removeListener("end",De),Z.removeListener("data",Te),Ne=!0,ne.awaitDrain&&(!O._writableState||O._writableState.needDrain)&&ie()}Z.on("data",Te);function Te(A){l("ondata");var b=O.write(A);l("dest.write",b),b===!1&&((ne.pipesCount===1&&ne.pipes===O||ne.pipesCount>1&&G(ne.pipes,O)!==-1)&&!Ne&&(l("false write response, pause",ne.awaitDrain),ne.awaitDrain++),Z.pause())}function Me(A){l("onerror",A),De(),O.removeListener("error",Me),t(O,"error")===0&&k(O,A)}S(O,"error",Me);function yt(){O.removeListener("finish",Se),De()}O.once("close",yt);function Se(){l("onfinish"),O.removeListener("close",yt),De()}O.once("finish",Se);function De(){l("unpipe"),Z.unpipe(O)}return O.emit("pipe",Z),ne.flowing||(l("pipe resume"),Z.resume()),O};function ce(O){return function(){var Z=O._readableState;l("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&t(O,"data")&&(Z.flowing=!0,U(O))}}P.prototype.unpipe=function(O){var T=this._readableState,Z={hasUnpiped:!1};if(T.pipesCount===0)return this;if(T.pipesCount===1)return O&&O!==T.pipes?this:(O||(O=T.pipes),T.pipes=null,T.pipesCount=0,T.flowing=!1,O&&O.emit("unpipe",this,Z),this);if(!O){var ne=T.pipes,pe=T.pipesCount;T.pipes=null,T.pipesCount=0,T.flowing=!1;for(var me=0;me<pe;me++)ne[me].emit("unpipe",this,{hasUnpiped:!1});return this}var Ee=G(T.pipes,O);return Ee===-1?this:(T.pipes.splice(Ee,1),T.pipesCount-=1,T.pipesCount===1&&(T.pipes=T.pipes[0]),O.emit("unpipe",this,Z),this)},P.prototype.on=function(O,T){var Z=r.prototype.on.call(this,O,T),ne=this._readableState;return O==="data"?(ne.readableListening=this.listenerCount("readable")>0,ne.flowing!==!1&&this.resume()):O==="readable"&&!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,l("on readable",ne.length,ne.reading),ne.length?oe(this):ne.reading||process.nextTick(H,this)),Z},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(O,T){var Z=r.prototype.removeListener.call(this,O,T);return O==="readable"&&process.nextTick(q,this),Z},P.prototype.removeAllListeners=function(O){var T=r.prototype.removeAllListeners.apply(this,arguments);return(O==="readable"||O===void 0)&&process.nextTick(q,this),T};function q(O){var T=O._readableState;T.readableListening=O.listenerCount("readable")>0,T.resumeScheduled&&!T.paused?T.flowing=!0:O.listenerCount("data")>0&&O.resume()}function H(O){l("readable nexttick read 0"),O.read(0)}P.prototype.resume=function(){var O=this._readableState;return O.flowing||(l("resume"),O.flowing=!O.readableListening,re(this,O)),O.paused=!1,this};function re(O,T){T.resumeScheduled||(T.resumeScheduled=!0,process.nextTick(de,O,T))}function de(O,T){l("resume",T.reading),T.reading||O.read(0),T.resumeScheduled=!1,O.emit("resume"),U(O),T.flowing&&!T.reading&&O.read(0)}P.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(O){var T=O._readableState;for(l("flow",T.flowing);T.flowing&&O.read()!==null;);}P.prototype.wrap=function(O){var T=this,Z=this._readableState,ne=!1;O.on("end",function(){if(l("wrapped end"),Z.decoder&&!Z.ended){var Ee=Z.decoder.end();Ee&&Ee.length&&T.push(Ee)}T.push(null)}),O.on("data",function(Ee){if(l("wrapped data"),Z.decoder&&(Ee=Z.decoder.write(Ee)),!(Z.objectMode&&Ee==null)&&!(!Z.objectMode&&(!Ee||!Ee.length))){var _e=T.push(Ee);_e||(ne=!0,O.pause())}});for(var pe in O)this[pe]===void 0&&typeof O[pe]=="function"&&(this[pe]=function(_e){return function(){return O[_e].apply(O,arguments)}}(pe));for(var me=0;me<I.length;me++)O.on(I[me],this.emit.bind(this,I[me]));return this._read=function(Ee){l("wrapped _read",Ee),ne&&(ne=!1,O.resume())},this},typeof Symbol=="function"&&(P.prototype[Symbol.asyncIterator]=function(){return E===void 0&&(E=YD()),E(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}}),P._fromList=z,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function z(O,T){if(T.length===0)return null;var Z;return T.objectMode?Z=T.buffer.shift():!O||O>=T.length?(T.decoder?Z=T.buffer.join(""):T.buffer.length===1?Z=T.buffer.first():Z=T.buffer.concat(T.length),T.buffer.clear()):Z=T.buffer.consume(O,T.decoder),Z}function M(O){var T=O._readableState;l("endReadable",T.endEmitted),T.endEmitted||(T.ended=!0,process.nextTick(R,T,O))}function R(O,T){if(l("endReadableNT",O.endEmitted,O.length),!O.endEmitted&&O.length===0&&(O.endEmitted=!0,T.readable=!1,T.emit("end"),O.autoDestroy)){var Z=T._writableState;(!Z||Z.autoDestroy&&Z.finished)&&T.destroy()}}typeof Symbol=="function"&&(P.from=function(O,T){return x===void 0&&(x=JD()),x(P,O,T)});function G(O,T){for(var Z=0,ne=O.length;Z<ne;Z++)if(O[Z]===T)return Z;return-1}return of}var B0=en,Vs=Yn.codes,XD=Vs.ERR_METHOD_NOT_IMPLEMENTED,ZD=Vs.ERR_MULTIPLE_CALLBACK,QD=Vs.ERR_TRANSFORM_ALREADY_TRANSFORMING,eL=Vs.ERR_TRANSFORM_WITH_LENGTH_0,zs=Bo();Ri(en,zs);function tL(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new ZD);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function en(e){if(!(this instanceof en))return new en(e);zs.call(this,e),this._transformState={afterTransform:tL.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",rL)}function rL(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){R0(e,t,r)}):R0(this,null,null)}en.prototype.push=function(e,t){return this._transformState.needTransform=!1,zs.prototype.push.call(this,e,t)},en.prototype._transform=function(e,t,r){r(new XD("_transform()"))},en.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},en.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},en.prototype._destroy=function(e,t){zs.prototype._destroy.call(this,e,function(r){t(r)})};function R0(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new eL;if(e._transformState.transforming)throw new QD;return e.push(null)}var nL=Ui,U0=B0;Ri(Ui,U0);function Ui(e){if(!(this instanceof Ui))return new Ui(e);U0.call(this,e)}Ui.prototype._transform=function(e,t,r){r(null,e)};var af;function oL(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var W0=Yn.codes,iL=W0.ERR_MISSING_ARGS,aL=W0.ERR_STREAM_DESTROYED;function H0(e){if(e)throw e}function sL(e){return e.setHeader&&typeof e.abort=="function"}function lL(e,t,r,n){n=oL(n);var o=!1;e.on("close",function(){o=!0}),af===void 0&&(af=tf),af(e,{readable:t,writable:r},function(a){if(a)return n(a);o=!0,n()});var i=!1;return function(a){if(!o&&!i){if(i=!0,sL(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(a||new aL("pipe"))}}}function V0(e){e()}function cL(e,t){return e.pipe(t)}function uL(e){return!e.length||typeof e[e.length-1]!="function"?H0:e.pop()}function fL(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=uL(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new iL("streams");var o,i=t.map(function(a,s){var l=s<t.length-1,u=s>0;return lL(a,l,u,function(f){o||(o=f),f&&i.forEach(V0),!l&&(i.forEach(V0),n(o))})});return t.reduce(cL)}var dL=fL;(function(e,t){t=e.exports=j0(),t.Stream=t,t.Readable=t,t.Writable=T0(),t.Duplex=Bo(),t.Transform=B0,t.PassThrough=nL,t.finished=tf,t.pipeline=dL})(l0,l0.exports);var pL=e=>new Promise((t,r)=>{e((n,o)=>{n?r(n):t(o)})}),z0=class extends Error{constructor(e,t){super(e?`Timeout [${e.toLocaleString()}ms]${t===void 0?"":`: ${t}`}`:"Timeout")}},hL=async(e,t,r)=>{let n;const o=r===void 0||typeof r=="string"?new z0(t,r):r,i=new Promise((s,l)=>{n=setTimeout(()=>{l(o)},t),gL(n)}),a=typeof e=="function"?pL(e):e;return await Promise.race([a,i]).finally(()=>{clearTimeout(n)})},gL=e=>{typeof e=="object"&&"unref"in e&&e.unref()},vL=class{constructor(e={autoReset:!1}){this._options=e,this.reset()}async wait({timeout:e}={}){return e?hL(this._promise,e,new z0(e)):this._promise}wake(e){return this._wake(e),this._options.autoReset?this.reset():this}reset(){return this._promise=new Promise(e=>{this._wake=e}),this}throw(e){return this._wake(Promise.reject(e)),this._options.autoReset?this.reset():this}},mL=class $r extends Rs{constructor(t,r){super(n=>this._subscribe(n)),this._value=r,this._observers=new Set,this._completed=new vL,this._handlers={next:n=>{this._value=n,this._observers.forEach(o=>{var i;return(i=o.next)==null?void 0:i.call(o,n)})},error:n=>{this._observers.forEach(o=>{var i;return(i=o.error)==null?void 0:i.call(o,n)})},complete:()=>{this._completed.wake(),this._observers.forEach(n=>{var o;return(o=n.complete)==null?void 0:o.call(n)})}},this._observable=typeof t=="function"?new Rs(t):t,this._observable.subscribe(this._handlers)}static from(t,r){if("emit"in t)return new $r(o=>{t.on(i=>{o.next(i)})},r);const n=Rs.from(t);return new $r(n,r)}static of(...t){return new $r(Rs.of(...t.slice(1)),t[0])}static empty(){return bL}get(){if(this._value===void 0)throw new Error("MulticastObservable is not initialized.");return this._value}async wait({timeout:t}={}){return await this._completed.wait({timeout:t}),this.get()}forEach(t){return this._observable.forEach(t)}map(t){return new $r(this._observable.map(t),this._value&&t(this._value))}filter(t){return new $r(this._observable.filter(t),this._value&&t(this._value)?this._value:void 0)}reduce(t,r){return new $r(r?this._observable.reduce(t,r):this._observable.reduce(t),r??this._value)}flatMap(t){return new $r(this._observable.flatMap(t),this._value&&t(this._value).get())}concat(...t){return new $r(this._observable.concat(...t),this._value)}losslessConcat(t,...r){const n=r.filter(i=>i instanceof $r),o=t(this._value,n.map(i=>i.get()));return new $r(this._observable.concat(...r),o)}_subscribe(t){var r;return this._observers.has(t)||this._observers.add(t),this._value!==void 0&&((r=t.next)==null||r.call(t,this._value)),()=>{this._observers.delete(t)}}},bL=mL.of(null),G0=typeof process<"u"&&!!process.env.DX_TRACK_LEAKS,K0=new Set,yL=()=>{if(G0){console.log(`Leaked resources ${K0.size}:`);for(const e of K0)console.log(`- ${e.name} at`),console.log(e.openStack.getStack(1)),console.log()}};G0&&(global.dxDumpLeaks=yL);var q0="/home/runner/work/dxos/dxos/packages/sdk/react-client/src/invitations/useInvitationStatus.ts",sf=e=>{const[t,r]=c.useReducer((a,s)=>(Ze("useInvitationStatus",{action:s},{F:q0,L:79,S:void 0,C:(l,u)=>l(...u)}),{...a,status:s.status,result:s.status===ye.State.SUCCESS?s.result:a.result,...s.status===ye.State.ERROR&&{error:s.error},...(s.status===ye.State.ERROR||s.status===ye.State.CANCELLED||s.status===ye.State.TIMEOUT)&&{haltedAt:typeof a.haltedAt>"u"?s.haltedAt:a.haltedAt},observable:s.status===ye.State.CONNECTING?s.observable??a.observable:a.observable}),null,a=>({status:ye.State.INIT,result:{spaceKey:null,identityKey:null,swarmKey:null,target:null},observable:e}));c.useEffect(()=>{var u,f;const a=d=>{switch(d.state){case ye.State.CONNECTED:case ye.State.READY_FOR_AUTHENTICATION:case ye.State.AUTHENTICATING:{r({status:d.state});break}case ye.State.SUCCESS:{r({status:d.state,result:{spaceKey:d.spaceKey||null,identityKey:d.identityKey||null,swarmKey:d.swarmKey||null,target:d.target||null}});break}case ye.State.CANCELLED:case ye.State.TIMEOUT:{r({status:d.state,haltedAt:t.status});break}}},s=(u=t.observable)==null?void 0:u.subscribe(a,d=>{r({status:ye.State.ERROR,error:d,haltedAt:t.status})}),l=(f=t.observable)==null?void 0:f.get();return l&&a(l),()=>s==null?void 0:s.unsubscribe()},[t.observable,t.status]);const n=c.useCallback(a=>{r({status:ye.State.CONNECTING,observable:a})},[]),o=c.useCallback(a=>(Ze("authenticating...",{authCode:a},{F:q0,L:163,S:void 0,C:(s,l)=>s(...l)}),t.observable.authenticate(a)),[t.observable]),i=c.useCallback(async()=>{var a;return(a=t.observable)==null?void 0:a.cancel()},[t.observable]);return c.useMemo(()=>{var l;const a=(l=t.observable)==null?void 0:l.get();return{status:t.status,haltedAt:t.haltedAt,result:t.result,error:t.error,cancel:i,connect:n,authenticate:o,id:a==null?void 0:a.invitationId,invitationCode:a?sn.InvitationEncoder.encode(a):void 0,authCode:a==null?void 0:a.authCode,authMethod:a==null?void 0:a.authMethod,type:a==null?void 0:a.type}},[t,i,n,o])};const wL=new Map([[ye.State.ERROR,-3],[ye.State.TIMEOUT,-2],[ye.State.CANCELLED,-1],[ye.State.INIT,0],[ye.State.CONNECTING,1],[ye.State.CONNECTED,2],[ye.State.READY_FOR_AUTHENTICATION,3],[ye.State.AUTHENTICATING,4],[ye.State.SUCCESS,5]]);var Y0=9007199254740991,_L="[object Arguments]",EL="[object Function]",xL="[object GeneratorFunction]",lf="[object Map]",SL="[object Object]",J0="[object Promise]",cf="[object Set]",$L="[object String]",X0="[object WeakMap]",Z0="[object DataView]",CL=/[\\^$.*+?()[\]{}|]/g,AL=/^\[object .+?Constructor\]$/,OL=/^(?:0|[1-9]\d*)$/,uf="\\ud800-\\udfff",Q0="\\u0300-\\u036f\\ufe20-\\ufe23",ey="\\u20d0-\\u20f0",ty="\\ufe0e\\ufe0f",TL="["+uf+"]",ff="["+Q0+ey+"]",df="\\ud83c[\\udffb-\\udfff]",IL="(?:"+ff+"|"+df+")",ry="[^"+uf+"]",ny="(?:\\ud83c[\\udde6-\\uddff]){2}",oy="[\\ud800-\\udbff][\\udc00-\\udfff]",iy="\\u200d",ay=IL+"?",sy="["+ty+"]?",PL="(?:"+iy+"(?:"+[ry,ny,oy].join("|")+")"+sy+ay+")*",kL=sy+ay+PL,NL="(?:"+[ry+ff+"?",ff,ny,oy,TL].join("|")+")",DL=RegExp(df+"(?="+df+")|"+NL+kL,"g"),LL=RegExp("["+iy+uf+Q0+ey+ty+"]"),ML=typeof Je=="object"&&Je&&Je.Object===Object&&Je,FL=typeof self=="object"&&self&&self.Object===Object&&self,Jn=ML||FL||Function("return this")();function jL(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function BL(e){return e.split("")}function RL(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function UL(e,t){return jL(t,function(r){return e[r]})}function WL(e,t){return e==null?void 0:e[t]}function HL(e){return LL.test(e)}function VL(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function zL(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function GL(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function KL(e,t){return function(r){return e(t(r))}}function qL(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}function YL(e){return HL(e)?JL(e):BL(e)}function JL(e){return e.match(DL)||[]}var XL=Function.prototype,Gs=Object.prototype,pf=Jn["__core-js_shared__"],ly=function(){var e=/[^.]+$/.exec(pf&&pf.keys&&pf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),cy=XL.toString,Ks=Gs.hasOwnProperty,Wi=Gs.toString,ZL=RegExp("^"+cy.call(Ks).replace(CL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),uy=Jn.Symbol,hf=uy?uy.iterator:void 0,QL=Gs.propertyIsEnumerable,e7=KL(Object.keys,Object),gf=Hi(Jn,"DataView"),vf=Hi(Jn,"Map"),mf=Hi(Jn,"Promise"),bf=Hi(Jn,"Set"),yf=Hi(Jn,"WeakMap"),t7=Zn(gf),r7=Zn(vf),n7=Zn(mf),o7=Zn(bf),i7=Zn(yf);function a7(e,t){var r=fy(e)||h7(e)?RL(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Ks.call(e,i))&&!(o&&(i=="length"||f7(i,n)))&&r.push(i);return r}function s7(e){return Wi.call(e)}function l7(e){if(!py(e)||d7(e))return!1;var t=dy(e)||VL(e)?ZL:AL;return t.test(Zn(e))}function c7(e){if(!p7(e))return e7(e);var t=[];for(var r in Object(e))Ks.call(e,r)&&r!="constructor"&&t.push(r);return t}function u7(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Hi(e,t){var r=WL(e,t);return l7(r)?r:void 0}var Xn=s7;(gf&&Xn(new gf(new ArrayBuffer(1)))!=Z0||vf&&Xn(new vf)!=lf||mf&&Xn(mf.resolve())!=J0||bf&&Xn(new bf)!=cf||yf&&Xn(new yf)!=X0)&&(Xn=function(e){var t=Wi.call(e),r=t==SL?e.constructor:void 0,n=r?Zn(r):void 0;if(n)switch(n){case t7:return Z0;case r7:return lf;case n7:return J0;case o7:return cf;case i7:return X0}return t});function f7(e,t){return t=t??Y0,!!t&&(typeof e=="number"||OL.test(e))&&e>-1&&e%1==0&&e<t}function d7(e){return!!ly&&ly in e}function p7(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Gs;return e===r}function Zn(e){if(e!=null){try{return cy.call(e)}catch{}try{return e+""}catch{}}return""}function h7(e){return g7(e)&&Ks.call(e,"callee")&&(!QL.call(e,"callee")||Wi.call(e)==_L)}var fy=Array.isArray;function wf(e){return e!=null&&v7(e.length)&&!dy(e)}function g7(e){return hy(e)&&wf(e)}function dy(e){var t=py(e)?Wi.call(e):"";return t==EL||t==xL}function v7(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Y0}function py(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function hy(e){return!!e&&typeof e=="object"}function m7(e){return typeof e=="string"||!fy(e)&&hy(e)&&Wi.call(e)==$L}function b7(e){if(!e)return[];if(wf(e))return m7(e)?YL(e):u7(e);if(hf&&e[hf])return zL(e[hf]());var t=Xn(e),r=t==lf?GL:t==cf?qL:w7;return r(e)}function y7(e){return wf(e)?a7(e):c7(e)}function w7(e){return e?UL(e,y7(e)):[]}var _7=b7;const gy=ln(_7)("👹👻👽🤖🎃🦾🦿🦷👣👁️🧶👑🐒🦆🦉🐴🦄🐝🦋🐞🪲🐢🦎🦕🦑🦀🐠🐬🐋🦭🐅🐆🦓🦍🦧🐘🐫🦒🦘🦬🐖🐏🦌🐕🐈🐓🦚🦜🦢🦩🦦🐁🐿️🌵🌲🌳🪵🌱🍁🪺🍄🐚🪸🪨🌾🌷🌻☀️🌙🪐⭐️⚡️☄️🔥🌈☁️💧⛱️🌊🍎🍋🍉🍇🫐🍈🍒🍑🥭🍍🥥🥝🥑🌶️🌽🥕🍬🥜🫖☕️🍵🧊🧂🏔️⚓️🛟🏝️🛶🚀🛰️⛲️🏰🚲⛺️🎙️🧲⚙️🔩🔮🔭🔬🧬🌡️🧺🛎️🔑🪑🧸🎈🎀🎊♻️🎵"),_f=e=>gy[parseInt(e,16)%gy.length],vy=e=>{const{code:t,large:r,classNames:n}=e,o=(t==null?void 0:t.length)??0,i=t==null?void 0:t.slice(0,o/2),a=t==null?void 0:t.slice(o/2),s=()=>{navigator.clipboard.writeText(t??"")};return c.createElement("span",{className:ue(r?"text-6xl":"text-2xl","font-mono pli-2.5 flex gap-1.5 rounded cursor-pointer",n),onClick:s},c.createElement("span",null,i),c.createElement("span",null,a))},E7=e=>{const{invitation:t}=e,r=sf(t);return c.createElement(S7,{...e,invitationStatus:r})},Vi={size:10,variant:"circle"},x7=({animation:e,status:t})=>{const{tx:r}=Ce();return c.createElement(c.Fragment,null,c.createElement("span",{role:"none",className:ue("absolute inline-start-1 inline-end-auto opacity-20",We(Vi.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Vi,status:t,animation:e}),style:{animationDelay:"400ms"}})),c.createElement("span",{role:"none",className:ue("absolute inline-start-2 inline-end-auto opacity-50",We(Vi.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Vi,status:t,animation:e}),style:{animationDelay:"200ms"}})))},S7=({invitation:e,invitationStatus:t,send:r,onClickRemove:n,createInvitationUrl:o})=>{const{t:i}=rt("os"),{cancel:a,status:s,invitationCode:l,authCode:u,type:f}=t,d=!([ye.State.ERROR,ye.State.TIMEOUT,ye.State.CANCELLED].indexOf(s)>=0),p=f===ye.Type.MULTIUSE||[ye.State.INIT,ye.State.CONNECTING,ye.State.CONNECTED].indexOf(s)>=0,h=s===ye.State.READY_FOR_AUTHENTICATION,g=c.useCallback(()=>n==null?void 0:n(e),[e,n]),v=l&&o(l),y=e==null?void 0:e.get().invitationId,m=[ye.State.INIT,ye.State.CONNECTING,ye.State.CONNECTED,ye.State.READY_FOR_AUTHENTICATION,ye.State.AUTHENTICATING].includes(s)?"pulse":"none",w=[ye.State.ERROR,ye.State.TIMEOUT,ye.State.CANCELLED].includes(s),E=[ye.State.CONNECTED,ye.State.READY_FOR_AUTHENTICATION,ye.State.AUTHENTICATING,ye.State.SUCCESS].includes(s),x=w?"error":E?"active":"inactive";return c.createElement(Dc.Root,{id:l,classNames:"flex gap-2 pis-3 pie-1 items-center relative"},c.createElement(Dc.Heading,{classNames:"sr-only"},i(f===ye.Type.MULTIUSE?"invite many list item label":"invite one list item label")),f===ye.Type.MULTIUSE&&c.createElement(x7,{status:x,animation:m}),c.createElement(_r.Root,null,c.createElement(It.Root,{...Vi,animation:m,status:x},c.createElement(_r.Trigger,{asChild:!0},c.createElement(It.Frame,{tabIndex:0,classNames:[Rr,"relative rounded-full"]},c.createElement(It.Fallback,{text:_f(y)})))),c.createElement(_r.Portal,null,c.createElement(_r.Content,{side:"left",classNames:"z-[70]"},i(f===ye.Type.MULTIUSE?"invite many qr label":"invite one qr label"),c.createElement(_r.Arrow,null)))),p&&v?c.createElement(c.Fragment,null,c.createElement(wr,{variant:"ghost",classNames:"grow justify-start font-medium",onClick:()=>r({type:"selectInvitation",invitation:e}),"data-testid":"show-qrcode"},c.createElement("span",null,i("open share panel label"))),c.createElement(Ik,{variant:"ghost",value:v})):h?c.createElement(vy,{code:u,classNames:"grow"}):s===ye.State.CONNECTING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Connecting..."):s===ye.State.AUTHENTICATING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Authenticating..."):s===ye.State.ERROR||s===ye.State.TIMEOUT?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Failed"):s===ye.State.CANCELLED?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Cancelled"):s===ye.State.SUCCESS?c.createElement("span",{className:"pli-2 grow truncate"},"User joined"):c.createElement("span",{className:"grow"}," "),d?c.createElement(wr,{variant:"ghost",classNames:"flex gap-1",onClick:a,"data-testid":"cancel-invitation"},c.createElement("span",{className:"sr-only"},i("cancel invitation label")),c.createElement(ze.X,{className:We(5),weight:"bold"})):c.createElement(wr,{variant:"ghost",classNames:"flex gap-1",onClick:g,"data-testid":"remove-invitation"},c.createElement("span",{className:"sr-only"},i("remove invitation label")),c.createElement(ze.X,{className:We(5),weight:"bold"})))},$7=({invitations:e,send:t,...r})=>{const{className:n,InvitationListItem:o=E7}=r;return c.createElement(Nc,{classNames:ue("flex flex-col gap-2",n)},e.map(i=>{const a=i.get().invitationId;return c.createElement(o,{key:a,send:t,invitation:i,...r})}))},C7={noopAction:{label:"No-op",description:"",icon:ze.Placeholder,onClick:()=>{}}},A7=c.forwardRef((e,t)=>{const{classNames:r,variant:n,isFull:o=!0,actions:i=C7,activeAction:a,onChangeActiveAction:s,defaultActiveAction:l,...u}=e,[f=Object.keys(i)[0],d]=qr({prop:a,onChange:s,defaultProp:l}),p=i[f]??{},{t:h}=rt("os");return c.createElement("div",{role:"none",className:ue("mbs-2 flex gap-px items-center",o&&"is-full")},c.createElement(wr,{...u,classNames:["bs-11 flex-1 min-is-0 flex gap-2 rounded-ie-none",r],ref:t,variant:n,onClick:p.onClick},p.icon&&c.createElement(p.icon,null),c.createElement("span",null,p.label)),c.createElement(Wn.Root,null,c.createElement(Wn.Trigger,{asChild:!0},c.createElement(wr,{classNames:["bs-11 flex-none rounded-is-none",r]},c.createElement("span",{className:"sr-only"},h("invite options label")),c.createElement(ze.CaretDown,null))),c.createElement(Wn.Content,null,c.createElement(Wn.Viewport,null,Object.entries(i).map(([g,v])=>c.createElement(Wn.CheckboxItem,{key:g,"aria-labelledby":`${g}__label`,"aria-describedby":`${g}__description`,checked:f===g,onCheckedChange:y=>y&&d(g),classNames:"gap-2"},v.icon&&c.createElement(v.icon,{className:We(5)}),c.createElement("div",{role:"none",className:"flex-1 min-is-0 space-b-1"},c.createElement("p",{id:`${g}__label`},v.label),v.description&&c.createElement("p",{id:`${g}__description`,className:Tt},v.description)),c.createElement(Wn.ItemIndicator,{asChild:!0},c.createElement(ze.Check,null))))),c.createElement(Wn.Arrow,null))))}),st=c.forwardRef((e,t)=>{const{children:r,classNames:n,variant:o,isFull:i=!0,...a}=e;return c.createElement(wr,{...a,classNames:[i&&"is-full","bs-11 flex gap-2 mbs-2",n],ref:t,variant:o},r)}),Gt=c.forwardRef(({classNames:e,children:t,...r},n)=>c.createElement("div",{...r,className:ue("flex flex-col gap-2 mbs-2",Array.isArray(t)&&t.length>1?"justify-between":"justify-center",e),ref:n},t)),my=({onDone:e,...t})=>{const{t:r}=rt("os");return c.createElement(wr,{variant:"ghost",classNames:ue("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),onClick:()=>e==null?void 0:e(),...t},c.createElement(ze.X,{weight:"bold",className:We(4)}),c.createElement("span",{className:"sr-only"},r("exit label")))},Ef=({text:e,className:t})=>c.createElement("div",{role:"none",className:ue(We(14),"rounded relative pointer-events-none",t)},c.createElement("svg",{viewBox:`0 0 ${14*4} ${14*4}`,width:14*4,height:14*4},c.createElement("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",baselineShift:"-0.25rem",fontSize:"2.25rem"},e))),O7=e=>{const{children:t}=e;return c.createElement("div",{role:"none",className:"absolute inset-0 flex items-center justify-center"},t)},xf=c.forwardRef(({titleId:e,title:t,titleSrOnly:r,children:n,corner:o},i)=>c.createElement("div",{role:"none",className:"pbe-2 relative",ref:i},o,c.createElement("h1",{...!r&&{id:e},className:ue(Tt,"text-center mlb-2",r&&"invisible")},t),r&&c.createElement("span",{id:e},t),n)),by=e=>{const{children:t}=e;return c.createElement("span",{className:ue(Tt,"text-center mli-6 whitespace-normal")},t)},zi=({validationMessage:e,label:t,...r})=>c.createElement(Br.Root,null,c.createElement(Br.Label,null,t),c.createElement(Br.TextInput,{...r,classNames:"plb-3 mbs-2 text-center"}),c.createElement(Br.DescriptionAndValidation,null,e&&c.createElement(Br.Validation,null,e))),xr=c.forwardRef(({children:e,className:t,...r},n)=>c.createElement("h2",{...r,className:ue("font-normal text-sm mbe-4 mli-1 text-center",t),ref:n},e));var T7=typeof WeakRef<"u",yy=class{constructor(e){T7&&typeof e=="object"?this._weakRef=new WeakRef(e):this._instance=e}deref(){var e,t;let r;return this._weakRef?(r=(e=this._weakRef)==null?void 0:e.deref(),r||delete this._weakRef):(r=this._instance,(t=r==null?void 0:r.isDisposed)!=null&&t.call(r)&&delete this._instance),r}},Gi="keyborg:focusin";function I7(e){const t=e.HTMLElement,r=t.prototype.focus;let n=!1;return t.prototype.focus=function(){n=!0},e.document.createElement("button").focus(),t.prototype.focus=r,n}var Sf=!1;function Ro(e){const t=e.focus;t.__keyborgNativeFocus?t.__keyborgNativeFocus.call(e):e.focus()}function P7(e){const t=e;Sf||(Sf=I7(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=a;const n=s=>{const l=s.relatedTarget,u=s.currentTarget;u.contains(l)||(u.removeEventListener("focusin",o,!0),u.removeEventListener("focusout",n,!0))},o=s=>{var l;const u=s.target;if(!u)return;if(u.shadowRoot){u.shadowRoot.addEventListener("focusin",o,!0),u.shadowRoot.addEventListener("focusout",n,!0);return}const f={relatedTarget:s.relatedTarget||void 0},d=new CustomEvent(Gi,{cancelable:!0,bubbles:!0,composed:!0,detail:f});d.details=f,(Sf||i.lastFocusedProgrammatically)&&(f.isFocusedProgrammatically=u===((l=i.lastFocusedProgrammatically)==null?void 0:l.deref()),i.lastFocusedProgrammatically=void 0),u.dispatchEvent(d)},i=t.__keyborgData={focusInHandler:o};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0);function a(){const s=t.__keyborgData;return s&&(s.lastFocusedProgrammatically=new yy(this)),r.apply(this,arguments)}a.__keyborgNativeFocus=r}function k7(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,o=t.__keyborgData;o&&(t.document.removeEventListener("focusin",o.focusInHandler,!0),delete t.__keyborgData),n&&(r.focus=n)}var N7=500,wy=0,D7=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(e){const t=e.id;t in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[t]=new yy(e))}remove(e){delete this.__keyborgCoreRefs[e],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(e){if(this._isNavigatingWithKeyboard!==e){this._isNavigatingWithKeyboard=e;for(const t of Object.keys(this.__keyborgCoreRefs)){const n=this.__keyborgCoreRefs[t].deref();n?n.update(e):this.remove(t)}}}getVal(){return this._isNavigatingWithKeyboard}},Hr=new D7,L7=class{constructor(e,t){this._onFocusIn=n=>{if(this._isMouseUsedTimer||Hr.getVal())return;const o=n.detail;o.relatedTarget&&(o.isFocusedProgrammatically||o.isFocusedProgrammatically===void 0||Hr.setVal(!0))},this._onMouseDown=n=>{if(n.buttons===0||n.clientX===0&&n.clientY===0&&n.screenX===0&&n.screenY===0)return;const o=this._win;o&&(this._isMouseUsedTimer&&o.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=o.setTimeout(()=>{delete this._isMouseUsedTimer},1e3)),Hr.setVal(!1)},this._onKeyDown=n=>{Hr.getVal()?this._shouldDismissKeyboardNavigation(n)&&this._scheduleDismiss():this._shouldTriggerKeyboardNavigation(n)&&Hr.setVal(!0)},this.id="c"+ ++wy,this._win=e;const r=e.document;if(t){const n=t.triggerKeys,o=t.dismissKeys;n!=null&&n.length&&(this._triggerKeys=new Set(n)),o!=null&&o.length&&(this._dismissKeys=new Set(o))}r.addEventListener(Gi,this._onFocusIn,!0),r.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("keydown",this._onKeyDown,!0),P7(e),Hr.add(this)}dispose(){const e=this._win;if(e){this._isMouseUsedTimer&&(e.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=void 0),this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),k7(e);const t=e.document;t.removeEventListener(Gi,this._onFocusIn,!0),t.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Hr.remove(this.id)}}isDisposed(){return!!this._win}update(e){var t,r;const n=(r=(t=this._win)==null?void 0:t.__keyborg)==null?void 0:r.refs;if(n)for(const o of Object.keys(n))$f.update(n[o],e)}_shouldTriggerKeyboardNavigation(e){var t;if(e.key==="Tab")return!0;const r=(t=this._win)==null?void 0:t.document.activeElement,n=!this._triggerKeys||this._triggerKeys.has(e.keyCode),o=r&&(r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.isContentEditable);return n&&!o}_shouldDismissKeyboardNavigation(e){var t;return(t=this._dismissKeys)==null?void 0:t.has(e.keyCode)}_scheduleDismiss(){const e=this._win;if(e){this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const t=e.document.activeElement;this._dismissTimer=e.setTimeout(()=>{this._dismissTimer=void 0;const r=e.document.activeElement;t&&r&&t===r&&Hr.setVal(!1)},N7)}}},$f=class W1{constructor(t,r){this._cb=[],this._id="k"+ ++wy,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new L7(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new W1(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)==null?void 0:t.__keyborg;r!=null&&r.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV!=="production"&&console.error(`Keyborg instance ${this._id} is being disposed incorrectly.`),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Hr.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Hr.setVal(t)}};function M7(e,t){return $f.create(e,t)}function F7(e){$f.dispose(e)}/*!
113
113
  * Copyright (c) Microsoft Corporation. All rights reserved.
114
114
  * Licensed under the MIT License.
115
115
  *//*!
116
116
  * Copyright (c) Microsoft Corporation. All rights reserved.
117
117
  * Licensed under the MIT License.
118
- */const En="data-tabster",yy="data-tabster-dummy",M7="tabster:focusin",F7="tabster:focusout",j7="tabster:movefocus",wy=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]"].join(", "),B7={Auto:0,Inside:1,Outside:2};/*!
118
+ */const xn="data-tabster",_y="data-tabster-dummy",j7="tabster:focusin",B7="tabster:focusout",R7="tabster:movefocus",Ey=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]"].join(", "),U7={Auto:0,Inside:1,Outside:2};/*!
119
119
  * Copyright (c) Microsoft Corporation. All rights reserved.
120
120
  * Licensed under the MIT License.
121
- */function Zn(e,t){var r;return(r=e.storageEntry(t))===null||r===void 0?void 0:r.tabster}function _y(e,t,r){var n,o;const i=r||e._noop?void 0:t.getAttribute(En);let a=e.storageEntry(t),s;if(i)if(i!==((n=a==null?void 0:a.attr)===null||n===void 0?void 0:n.string))try{const d=JSON.parse(i);if(typeof d!="object")throw new Error(`Value is not a JSON object, got '${i}'.`);s={string:i,object:d}}catch(d){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${d}`,t)}else return;else if(!a)return;a||(a=e.storageEntry(t,!0)),a.tabster||(a.tabster={});const l=a.tabster||{},u=((o=a.attr)===null||o===void 0?void 0:o.object)||{},f=(s==null?void 0:s.object)||{};for(const d of Object.keys(u))if(!f[d]){if(d==="root"){const p=l[d];p&&e.root.onRoot(p,!0)}switch(d){case"deloser":case"root":case"groupper":case"modalizer":case"restorer":case"mover":const p=l[d];p&&(p.dispose(),delete l[d]);break;case"observed":delete l[d],e.observedElement&&e.observedElement.onObservedElementUpdate(t);break;case"focusable":case"outline":case"uncontrolled":case"sys":delete l[d];break}}for(const d of Object.keys(f)){const p=f.sys;switch(d){case"deloser":l.deloser?l.deloser.setProps(f.deloser):e.deloser?l.deloser=e.deloser.createDeloser(t,f.deloser):process.env.NODE_ENV==="development"&&console.error("Deloser API used before initialization, please call `getDeloser()`");break;case"root":l.root?l.root.setProps(f.root):l.root=e.root.createRoot(t,f.root,p),e.root.onRoot(l.root);break;case"modalizer":l.modalizer?l.modalizer.setProps(f.modalizer):e.modalizer?l.modalizer=e.modalizer.createModalizer(t,f.modalizer,p):process.env.NODE_ENV==="development"&&console.error("Modalizer API used before initialization, please call `getModalizer()`");break;case"restorer":l.restorer?l.restorer.setProps(f.restorer):e.restorer?f.restorer&&(l.restorer=e.restorer.createRestorer(t,f.restorer)):process.env.NODE_ENV==="development"&&console.error("Restorer API used before initialization, please call `getRestorer()`");break;case"focusable":l.focusable=f.focusable;break;case"groupper":l.groupper?l.groupper.setProps(f.groupper):e.groupper?l.groupper=e.groupper.createGroupper(t,f.groupper,p):process.env.NODE_ENV==="development"&&console.error("Groupper API used before initialization, please call `getGroupper()`");break;case"mover":l.mover?l.mover.setProps(f.mover):e.mover?l.mover=e.mover.createMover(t,f.mover,p):process.env.NODE_ENV==="development"&&console.error("Mover API used before initialization, please call `getMover()`");break;case"observed":e.observedElement?(l.observed=f.observed,e.observedElement.onObservedElementUpdate(t)):process.env.NODE_ENV==="development"&&console.error("ObservedElement API used before initialization, please call `getObservedElement()`");break;case"uncontrolled":l.uncontrolled=f.uncontrolled;break;case"outline":e.outline?l.outline=f.outline:process.env.NODE_ENV==="development"&&console.error("Outline API used before initialization, please call `getOutline()`");break;case"sys":l.sys=f.sys;break;default:console.error(`Unknown key '${d}' in data-tabster attribute value.`)}}s?a.attr=s:(Object.keys(l).length===0&&(delete a.tabster,delete a.attr),e.storageEntry(t,!1))}/*!
121
+ */function Qn(e,t){var r;return(r=e.storageEntry(t))===null||r===void 0?void 0:r.tabster}function xy(e,t,r){var n,o;const i=r||e._noop?void 0:t.getAttribute(xn);let a=e.storageEntry(t),s;if(i)if(i!==((n=a==null?void 0:a.attr)===null||n===void 0?void 0:n.string))try{const d=JSON.parse(i);if(typeof d!="object")throw new Error(`Value is not a JSON object, got '${i}'.`);s={string:i,object:d}}catch(d){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${d}`,t)}else return;else if(!a)return;a||(a=e.storageEntry(t,!0)),a.tabster||(a.tabster={});const l=a.tabster||{},u=((o=a.attr)===null||o===void 0?void 0:o.object)||{},f=(s==null?void 0:s.object)||{};for(const d of Object.keys(u))if(!f[d]){if(d==="root"){const p=l[d];p&&e.root.onRoot(p,!0)}switch(d){case"deloser":case"root":case"groupper":case"modalizer":case"restorer":case"mover":const p=l[d];p&&(p.dispose(),delete l[d]);break;case"observed":delete l[d],e.observedElement&&e.observedElement.onObservedElementUpdate(t);break;case"focusable":case"outline":case"uncontrolled":case"sys":delete l[d];break}}for(const d of Object.keys(f)){const p=f.sys;switch(d){case"deloser":l.deloser?l.deloser.setProps(f.deloser):e.deloser?l.deloser=e.deloser.createDeloser(t,f.deloser):process.env.NODE_ENV==="development"&&console.error("Deloser API used before initialization, please call `getDeloser()`");break;case"root":l.root?l.root.setProps(f.root):l.root=e.root.createRoot(t,f.root,p),e.root.onRoot(l.root);break;case"modalizer":l.modalizer?l.modalizer.setProps(f.modalizer):e.modalizer?l.modalizer=e.modalizer.createModalizer(t,f.modalizer,p):process.env.NODE_ENV==="development"&&console.error("Modalizer API used before initialization, please call `getModalizer()`");break;case"restorer":l.restorer?l.restorer.setProps(f.restorer):e.restorer?f.restorer&&(l.restorer=e.restorer.createRestorer(t,f.restorer)):process.env.NODE_ENV==="development"&&console.error("Restorer API used before initialization, please call `getRestorer()`");break;case"focusable":l.focusable=f.focusable;break;case"groupper":l.groupper?l.groupper.setProps(f.groupper):e.groupper?l.groupper=e.groupper.createGroupper(t,f.groupper,p):process.env.NODE_ENV==="development"&&console.error("Groupper API used before initialization, please call `getGroupper()`");break;case"mover":l.mover?l.mover.setProps(f.mover):e.mover?l.mover=e.mover.createMover(t,f.mover,p):process.env.NODE_ENV==="development"&&console.error("Mover API used before initialization, please call `getMover()`");break;case"observed":e.observedElement?(l.observed=f.observed,e.observedElement.onObservedElementUpdate(t)):process.env.NODE_ENV==="development"&&console.error("ObservedElement API used before initialization, please call `getObservedElement()`");break;case"uncontrolled":l.uncontrolled=f.uncontrolled;break;case"outline":e.outline?l.outline=f.outline:process.env.NODE_ENV==="development"&&console.error("Outline API used before initialization, please call `getOutline()`");break;case"sys":l.sys=f.sys;break;default:console.error(`Unknown key '${d}' in data-tabster attribute value.`)}}s?a.attr=s:(Object.keys(l).length===0&&(delete a.tabster,delete a.attr),e.storageEntry(t,!1))}/*!
122
122
  * Copyright (c) Microsoft Corporation. All rights reserved.
123
123
  * Licensed under the MIT License.
124
- */function R7(e){const t=e();try{if(t.EventTarget)return new t.EventTarget}catch(r){if(!(r instanceof TypeError))throw r}return t.document.createElement("div")}/*!
124
+ */function W7(e){const t=e();try{if(t.EventTarget)return new t.EventTarget}catch(r){if(!(r instanceof TypeError))throw r}return t.document.createElement("div")}/*!
125
125
  * Copyright (c) Microsoft Corporation. All rights reserved.
126
126
  * Licensed under the MIT License.
127
- */let $f,U7=0;try{document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT),$f=!1}catch{$f=!0}const Cf=100;function Qn(e){const t=e();let r=t.__tabsterInstanceContext;return r||(r={elementByUId:{},basics:{Promise:t.Promise||void 0,WeakRef:t.WeakRef||void 0},containerBoundingRectCache:{},lastContainerBoundingRectCacheId:0,fakeWeakRefs:[],fakeWeakRefsStarted:!1},t.__tabsterInstanceContext=r),r}function W7(e){const t=e.__tabsterInstanceContext;t&&(t.elementByUId={},delete t.WeakRef,t.containerBoundingRectCache={},t.containerBoundingRectCacheTimer&&e.clearTimeout(t.containerBoundingRectCacheTimer),t.fakeWeakRefsTimer&&e.clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefs=[],delete e.__tabsterInstanceContext)}function H7(e){const t=e.__tabsterInstanceContext;return new((t==null?void 0:t.basics.WeakMap)||WeakMap)}function V7(e){return!!e.querySelector(wy)}class Ey{constructor(t){this._target=t}deref(){return this._target}static cleanup(t,r){return t._target?r||!Af(t._target.ownerDocument,t._target)?(delete t._target,!0):!1:!0}}class xn{constructor(t,r,n){const o=Qn(t);let i;o.WeakRef?i=new o.WeakRef(r):(i=new Ey(r),o.fakeWeakRefs.push(i)),this._ref=i,this._data=n}get(){const t=this._ref;let r;return t&&(r=t.deref(),r||delete this._ref),r}getData(){return this._data}}function xy(e,t){const r=Qn(e);r.fakeWeakRefs=r.fakeWeakRefs.filter(n=>!Ey.cleanup(n,t))}function Sy(e){const t=Qn(e);t.fakeWeakRefsStarted||(t.fakeWeakRefsStarted=!0,t.WeakRef=J7(t)),t.fakeWeakRefsTimer||(t.fakeWeakRefsTimer=e().setTimeout(()=>{t.fakeWeakRefsTimer=void 0,xy(e),Sy(e)},2*60*1e3))}function z7(e){const t=Qn(e);t.fakeWeakRefsStarted=!1,t.fakeWeakRefsTimer&&(e().clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefsTimer=void 0,t.fakeWeakRefs=[])}function $y(e,t,r){if(t.nodeType!==Node.ELEMENT_NODE)return;const n=$f?r:{acceptNode:r};return e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n,!1)}function G7(e){e.__shouldIgnoreFocus=!0}function Cy(e){return!!e.__shouldIgnoreFocus}function K7(e){const t=new Uint32Array(4);if(e.crypto&&e.crypto.getRandomValues)e.crypto.getRandomValues(t);else if(e.msCrypto&&e.msCrypto.getRandomValues)e.msCrypto.getRandomValues(t);else for(let n=0;n<t.length;n++)t[n]=4294967295*Math.random();const r=[];for(let n=0;n<t.length;n++)r.push(t[n].toString(36));return r.push("|"),r.push((++U7).toString(36)),r.push("|"),r.push(Date.now().toString(36)),r.join("")}function q7(e,t){const r=Qn(e);let n=t.__tabsterElementUID;return n||(n=t.__tabsterElementUID=K7(e())),!r.elementByUId[n]&&Af(t.ownerDocument,t)&&(r.elementByUId[n]=new xn(e,t)),n}function Ay(e,t){const r=Qn(e);for(const n of Object.keys(r.elementByUId)){const o=r.elementByUId[n],i=o&&o.get();i&&t&&!t.contains(i)||delete r.elementByUId[n]}}function Af(e,t){var r;return!!(!((r=e==null?void 0:e.body)===null||r===void 0)&&r.contains(t))}function Y7(e,t){const r=e.matches||e.matchesSelector||e.msMatchesSelector||e.webkitMatchesSelector;return r&&r.call(e,t)}function J7(e){return e.basics.WeakRef}let X7=0;class Z7{constructor(t,r,n){const o=t.getWindow;this._tabster=t,this._element=new xn(o,r),this._props={...n},this.id="i"+ ++X7}getElement(){return this._element.get()}getProps(){return this._props}setProps(t){this._props={...t}}}class Ks{constructor(t,r,n,o,i){var a;this._focusIn=f=>{if(this._fixedTarget){const p=this._fixedTarget.get();p&&Bo(p);return}const d=this.input;if(this.onFocusIn&&d){const p=f.relatedTarget;this.onFocusIn(this,this._isBackward(!0,d,p),p)}},this._focusOut=f=>{if(this._fixedTarget)return;this.useDefaultAction=!1;const d=this.input;if(this.onFocusOut&&d){const p=f.relatedTarget;this.onFocusOut(this,this._isBackward(!1,d,p),p)}};const s=t(),l=s.document.createElement("i");l.tabIndex=0,l.setAttribute("role","none"),l.setAttribute(yy,""),l.setAttribute("aria-hidden","true");const u=l.style;u.position="fixed",u.width=u.height="1px",u.opacity="0.001",u.zIndex="-1",u.setProperty("content-visibility","hidden"),G7(l),this.input=l,this.isFirst=n.isFirst,this.isOutside=r,this._isPhantom=(a=n.isPhantom)!==null&&a!==void 0?a:!1,this._fixedTarget=i,l.addEventListener("focusin",this._focusIn),l.addEventListener("focusout",this._focusOut),l.__tabsterDummyContainer=o,this._isPhantom&&(this._disposeTimer=s.setTimeout(()=>{delete this._disposeTimer,this.dispose()},0),this._clearDisposeTimeout=()=>{this._disposeTimer&&(s.clearTimeout(this._disposeTimer),delete this._disposeTimer),delete this._clearDisposeTimeout})}dispose(){var t;this._clearDisposeTimeout&&this._clearDisposeTimeout();const r=this.input;r&&(delete this._fixedTarget,delete this.onFocusIn,delete this.onFocusOut,delete this.input,r.removeEventListener("focusin",this._focusIn),r.removeEventListener("focusout",this._focusOut),delete r.__tabsterDummyContainer,(t=r.parentElement)===null||t===void 0||t.removeChild(r))}setTopLeft(t,r){var n;const o=(n=this.input)===null||n===void 0?void 0:n.style;o&&(o.top=`${t}px`,o.left=`${r}px`)}_isBackward(t,r,n){return t&&!n?!this.isFirst:!!(n&&r.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)}}const Q7={Root:1,Modalizer:2,Mover:3,Groupper:4};class Of{constructor(t,r,n,o,i,a){this._element=r,this._instance=new tM(t,r,this,n,o,i,a)}_setHandlers(t,r){this._onFocusIn=t,this._onFocusOut=r}moveOut(t){var r;(r=this._instance)===null||r===void 0||r.moveOut(t)}moveOutWithDefaultAction(t,r){var n;(n=this._instance)===null||n===void 0||n.moveOutWithDefaultAction(t,r)}getHandler(t){return t?this._onFocusIn:this._onFocusOut}setTabbable(t){var r;(r=this._instance)===null||r===void 0||r.setTabbable(this,t)}dispose(){this._instance&&(this._instance.dispose(this),delete this._instance),delete this._onFocusIn,delete this._onFocusOut}static moveWithPhantomDummy(t,r,n,o,i){var a;const l=new Ks(t.getWindow,!0,{isPhantom:!0,isFirst:!0}).input;if(l){let u,f;if(r.tagName==="BODY")u=r,f=n&&o||!n&&!o?r.firstElementChild:null;else{n&&(!o||o&&!t.focusable.isFocusable(r,!1,!0,!0))?(u=r,f=o?r.firstElementChild:null):(u=r.parentElement,f=n&&o||!n&&!o?r:r.nextElementSibling);let d,p;do d=n&&o||!n&&!o?f==null?void 0:f.previousElementSibling:f,p=(a=d==null?void 0:d.__tabsterDummyContainer)===null||a===void 0?void 0:a.get(),p===r?f=n&&o||!n&&!o?d:d==null?void 0:d.nextElementSibling:p=void 0;while(p)}u&&Ki({by:"root",owner:u,next:null,relatedEvent:i})&&(u.insertBefore(l,f),Bo(l))}}static addPhantomDummyWithTarget(t,r,n,o){const a=new Ks(t.getWindow,!0,{isPhantom:!0,isFirst:!0},void 0,new xn(t.getWindow,o)).input;if(a){let s,l;V7(r)&&!n?(s=r,l=r.firstElementChild):(s=r.parentElement,l=n?r:r.nextElementSibling),s==null||s.insertBefore(a,l)}}}function Sn(e,t){var r;const n={1:"Root",2:"Modalizer",3:"Mover",4:"Groupper"};(r=e.input)===null||r===void 0||r.setAttribute(yy,[`isFirst=${e.isFirst}`,`isOutside=${e.isOutside}`,...t.map(o=>`(${n[o.priority]}, tabbable=${o.tabbable})`)].join(", "))}class eM{constructor(t){this._updateQueue=new Set,this._lastUpdateQueueTime=0,this._changedParents=new WeakSet,this._dummyElements=[],this._dummyCallbacks=new WeakMap,this._domChanged=r=>{var n;this._changedParents.has(r)||(this._changedParents.add(r),!this._updateDummyInputsTimer&&(this._updateDummyInputsTimer=(n=this._win)===null||n===void 0?void 0:n.call(this).setTimeout(()=>{delete this._updateDummyInputsTimer;for(const o of this._dummyElements){const i=o.get();if(i){const a=this._dummyCallbacks.get(i);if(a){const s=i.parentElement;(!s||this._changedParents.has(s))&&a()}}}this._changedParents=new WeakSet},Cf)))},this._win=t}add(t,r){!this._dummyCallbacks.has(t)&&this._win&&(this._dummyElements.push(new xn(this._win,t)),this._dummyCallbacks.set(t,r),this.domChanged=this._domChanged)}remove(t){this._dummyElements=this._dummyElements.filter(r=>{const n=r.get();return n&&n!==t}),this._dummyCallbacks.delete(t),this._dummyElements.length===0&&delete this.domChanged}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.call(this);this._updateTimer&&(r==null||r.clearTimeout(this._updateTimer),delete this._updateTimer),this._updateDummyInputsTimer&&(r==null||r.clearTimeout(this._updateDummyInputsTimer),delete this._updateDummyInputsTimer),this._changedParents=new WeakSet,this._dummyCallbacks=new WeakMap,this._dummyElements=[],this._updateQueue.clear(),delete this.domChanged,delete this._win}updatePositions(t){this._win&&(this._updateQueue.add(t),this._lastUpdateQueueTime=Date.now(),this._scheduledUpdatePositions())}_scheduledUpdatePositions(){var t;this._updateTimer||(this._updateTimer=(t=this._win)===null||t===void 0?void 0:t.call(this).setTimeout(()=>{if(delete this._updateTimer,this._lastUpdateQueueTime+Cf<=Date.now()){const r=new Map,n=[];for(const o of this._updateQueue)n.push(o(r));this._updateQueue.clear();for(const o of n)o();r.clear()}else this._scheduledUpdatePositions()},Cf))}}class tM{constructor(t,r,n,o,i,a,s){this._wrappers=[],this._isOutside=!1,this._transformElements=new Set,this._onFocusIn=(h,g,v)=>{this._onFocus(!0,h,g,v)},this._onFocusOut=(h,g,v)=>{this._onFocus(!1,h,g,v)},this.moveOut=h=>{var g;const v=this._firstDummy,y=this._lastDummy;if(v&&y){this._ensurePosition();const m=v.input,w=y.input,E=(g=this._element)===null||g===void 0?void 0:g.get();if(m&&w&&E){let x;h?(m.tabIndex=0,x=m):(w.tabIndex=0,x=w),x&&Bo(x)}}},this.moveOutWithDefaultAction=(h,g)=>{var v;const y=this._firstDummy,m=this._lastDummy;if(y&&m){this._ensurePosition();const w=y.input,E=m.input,x=(v=this._element)===null||v===void 0?void 0:v.get();if(w&&E&&x){let k;h?!y.isOutside&&this._tabster.focusable.isFocusable(x,!0,!0,!0)?k=x:(y.useDefaultAction=!0,w.tabIndex=0,k=w):(m.useDefaultAction=!0,E.tabIndex=0,k=E),k&&Ki({by:"root",owner:x,next:null,relatedEvent:g})&&Bo(k)}}},this.setTabbable=(h,g)=>{var v,y;for(const w of this._wrappers)if(w.manager===h){w.tabbable=g;break}const m=this._getCurrent();if(m){const w=m.tabbable?0:-1;let E=(v=this._firstDummy)===null||v===void 0?void 0:v.input;E&&(E.tabIndex=w),E=(y=this._lastDummy)===null||y===void 0?void 0:y.input,E&&(E.tabIndex=w)}process.env.NODE_ENV==="development"&&(this._firstDummy&&Sn(this._firstDummy,this._wrappers),this._lastDummy&&Sn(this._lastDummy,this._wrappers))},this._addDummyInputs=()=>{this._addTimer||(this._addTimer=this._getWindow().setTimeout(()=>{delete this._addTimer,this._ensurePosition(),process.env.NODE_ENV==="development"&&(this._firstDummy&&Sn(this._firstDummy,this._wrappers),this._lastDummy&&Sn(this._lastDummy,this._wrappers)),this._addTransformOffsets()},0))},this._addTransformOffsets=()=>{this._tabster._dummyObserver.updatePositions(this._computeTransformOffsets)},this._computeTransformOffsets=h=>{var g,v;const y=((g=this._firstDummy)===null||g===void 0?void 0:g.input)||((v=this._lastDummy)===null||v===void 0?void 0:v.input),m=this._transformElements,w=new Set;let E=0,x=0;const k=this._getWindow();for(let I=y;I&&I.nodeType===Node.ELEMENT_NODE;I=I.parentElement){let S=h.get(I);if(S===void 0){const C=k.getComputedStyle(I).transform;C&&C!=="none"&&(S={scrollTop:I.scrollTop,scrollLeft:I.scrollLeft}),h.set(I,S||null)}S&&(w.add(I),m.has(I)||I.addEventListener("scroll",this._addTransformOffsets),E+=S.scrollTop,x+=S.scrollLeft)}for(const I of m)w.has(I)||I.removeEventListener("scroll",this._addTransformOffsets);return this._transformElements=w,()=>{var I,S;(I=this._firstDummy)===null||I===void 0||I.setTopLeft(E,x),(S=this._lastDummy)===null||S===void 0||S.setTopLeft(E,x)}};const l=r.get();if(!l)throw new Error("No element");this._tabster=t,this._getWindow=t.getWindow,this._callForDefaultAction=s;const u=l.__tabsterDummy;if((u||this)._wrappers.push({manager:n,priority:o,tabbable:!0}),u)return process.env.NODE_ENV==="development"&&(this._firstDummy&&Sn(this._firstDummy,u._wrappers),this._lastDummy&&Sn(this._lastDummy,u._wrappers)),u;l.__tabsterDummy=this;const f=i==null?void 0:i.dummyInputsPosition,d=l.tagName;this._isOutside=f?f===B7.Outside:(a||d==="UL"||d==="OL"||d==="TABLE")&&!(d==="LI"||d==="TD"||d==="TH"),this._firstDummy=new Ks(this._getWindow,this._isOutside,{isFirst:!0},r),this._lastDummy=new Ks(this._getWindow,this._isOutside,{isFirst:!1},r);const p=this._firstDummy.input;p&&t._dummyObserver.add(p,this._addDummyInputs),this._firstDummy.onFocusIn=this._onFocusIn,this._firstDummy.onFocusOut=this._onFocusOut,this._lastDummy.onFocusIn=this._onFocusIn,this._lastDummy.onFocusOut=this._onFocusOut,this._element=r,this._addDummyInputs()}dispose(t,r){var n,o,i,a;const s=this._wrappers=this._wrappers.filter(l=>l.manager!==t&&!r);if(process.env.NODE_ENV==="development"&&(this._firstDummy&&Sn(this._firstDummy,s),this._lastDummy&&Sn(this._lastDummy,s)),s.length===0){delete((n=this._element)===null||n===void 0?void 0:n.get()).__tabsterDummy;for(const f of this._transformElements)f.removeEventListener("scroll",this._addTransformOffsets);this._transformElements.clear();const l=this._getWindow();this._addTimer&&(l.clearTimeout(this._addTimer),delete this._addTimer);const u=(o=this._firstDummy)===null||o===void 0?void 0:o.input;u&&this._tabster._dummyObserver.remove(u),(i=this._firstDummy)===null||i===void 0||i.dispose(),(a=this._lastDummy)===null||a===void 0||a.dispose()}}_onFocus(t,r,n,o){var i;const a=this._getCurrent();a&&(!r.useDefaultAction||this._callForDefaultAction)&&((i=a.manager.getHandler(t))===null||i===void 0||i(r,n,o))}_getCurrent(){return this._wrappers.sort((t,r)=>t.tabbable!==r.tabbable?t.tabbable?-1:1:t.priority-r.priority),this._wrappers[0]}_ensurePosition(){var t,r,n;const o=(t=this._element)===null||t===void 0?void 0:t.get(),i=(r=this._firstDummy)===null||r===void 0?void 0:r.input,a=(n=this._lastDummy)===null||n===void 0?void 0:n.input;if(!(!o||!i||!a))if(this._isOutside){const s=o.parentElement;if(s){const l=o.nextElementSibling;l!==a&&s.insertBefore(a,l),o.previousElementSibling!==i&&s.insertBefore(i,o)}}else{o.lastElementChild!==a&&o.appendChild(a);const s=o.firstElementChild;s&&s!==i&&o.insertBefore(i,s)}}}function Oy(e){let t=null;for(let r=e.lastElementChild;r;r=r.lastElementChild)t=r;return t||void 0}function Gi(e,t,r){const n=document.createEvent("HTMLEvents");return n.initEvent(t,!0,!0),n.details=r,e.dispatchEvent(n),!n.defaultPrevented}function Ki(e){return Gi(e.owner,j7,e)}/*!
127
+ */let Cf,H7=0;try{document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT),Cf=!1}catch{Cf=!0}const Af=100;function eo(e){const t=e();let r=t.__tabsterInstanceContext;return r||(r={elementByUId:{},basics:{Promise:t.Promise||void 0,WeakRef:t.WeakRef||void 0},containerBoundingRectCache:{},lastContainerBoundingRectCacheId:0,fakeWeakRefs:[],fakeWeakRefsStarted:!1},t.__tabsterInstanceContext=r),r}function V7(e){const t=e.__tabsterInstanceContext;t&&(t.elementByUId={},delete t.WeakRef,t.containerBoundingRectCache={},t.containerBoundingRectCacheTimer&&e.clearTimeout(t.containerBoundingRectCacheTimer),t.fakeWeakRefsTimer&&e.clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefs=[],delete e.__tabsterInstanceContext)}function z7(e){const t=e.__tabsterInstanceContext;return new((t==null?void 0:t.basics.WeakMap)||WeakMap)}function G7(e){return!!e.querySelector(Ey)}class Sy{constructor(t){this._target=t}deref(){return this._target}static cleanup(t,r){return t._target?r||!Of(t._target.ownerDocument,t._target)?(delete t._target,!0):!1:!0}}class Sn{constructor(t,r,n){const o=eo(t);let i;o.WeakRef?i=new o.WeakRef(r):(i=new Sy(r),o.fakeWeakRefs.push(i)),this._ref=i,this._data=n}get(){const t=this._ref;let r;return t&&(r=t.deref(),r||delete this._ref),r}getData(){return this._data}}function $y(e,t){const r=eo(e);r.fakeWeakRefs=r.fakeWeakRefs.filter(n=>!Sy.cleanup(n,t))}function Cy(e){const t=eo(e);t.fakeWeakRefsStarted||(t.fakeWeakRefsStarted=!0,t.WeakRef=Z7(t)),t.fakeWeakRefsTimer||(t.fakeWeakRefsTimer=e().setTimeout(()=>{t.fakeWeakRefsTimer=void 0,$y(e),Cy(e)},2*60*1e3))}function K7(e){const t=eo(e);t.fakeWeakRefsStarted=!1,t.fakeWeakRefsTimer&&(e().clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefsTimer=void 0,t.fakeWeakRefs=[])}function Ay(e,t,r){if(t.nodeType!==Node.ELEMENT_NODE)return;const n=Cf?r:{acceptNode:r};return e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n,!1)}function q7(e){e.__shouldIgnoreFocus=!0}function Oy(e){return!!e.__shouldIgnoreFocus}function Y7(e){const t=new Uint32Array(4);if(e.crypto&&e.crypto.getRandomValues)e.crypto.getRandomValues(t);else if(e.msCrypto&&e.msCrypto.getRandomValues)e.msCrypto.getRandomValues(t);else for(let n=0;n<t.length;n++)t[n]=4294967295*Math.random();const r=[];for(let n=0;n<t.length;n++)r.push(t[n].toString(36));return r.push("|"),r.push((++H7).toString(36)),r.push("|"),r.push(Date.now().toString(36)),r.join("")}function J7(e,t){const r=eo(e);let n=t.__tabsterElementUID;return n||(n=t.__tabsterElementUID=Y7(e())),!r.elementByUId[n]&&Of(t.ownerDocument,t)&&(r.elementByUId[n]=new Sn(e,t)),n}function Ty(e,t){const r=eo(e);for(const n of Object.keys(r.elementByUId)){const o=r.elementByUId[n],i=o&&o.get();i&&t&&!t.contains(i)||delete r.elementByUId[n]}}function Of(e,t){var r;return!!(!((r=e==null?void 0:e.body)===null||r===void 0)&&r.contains(t))}function X7(e,t){const r=e.matches||e.matchesSelector||e.msMatchesSelector||e.webkitMatchesSelector;return r&&r.call(e,t)}function Z7(e){return e.basics.WeakRef}let Q7=0;class eM{constructor(t,r,n){const o=t.getWindow;this._tabster=t,this._element=new Sn(o,r),this._props={...n},this.id="i"+ ++Q7}getElement(){return this._element.get()}getProps(){return this._props}setProps(t){this._props={...t}}}class qs{constructor(t,r,n,o,i){var a;this._focusIn=f=>{if(this._fixedTarget){const p=this._fixedTarget.get();p&&Ro(p);return}const d=this.input;if(this.onFocusIn&&d){const p=f.relatedTarget;this.onFocusIn(this,this._isBackward(!0,d,p),p)}},this._focusOut=f=>{if(this._fixedTarget)return;this.useDefaultAction=!1;const d=this.input;if(this.onFocusOut&&d){const p=f.relatedTarget;this.onFocusOut(this,this._isBackward(!1,d,p),p)}};const s=t(),l=s.document.createElement("i");l.tabIndex=0,l.setAttribute("role","none"),l.setAttribute(_y,""),l.setAttribute("aria-hidden","true");const u=l.style;u.position="fixed",u.width=u.height="1px",u.opacity="0.001",u.zIndex="-1",u.setProperty("content-visibility","hidden"),q7(l),this.input=l,this.isFirst=n.isFirst,this.isOutside=r,this._isPhantom=(a=n.isPhantom)!==null&&a!==void 0?a:!1,this._fixedTarget=i,l.addEventListener("focusin",this._focusIn),l.addEventListener("focusout",this._focusOut),l.__tabsterDummyContainer=o,this._isPhantom&&(this._disposeTimer=s.setTimeout(()=>{delete this._disposeTimer,this.dispose()},0),this._clearDisposeTimeout=()=>{this._disposeTimer&&(s.clearTimeout(this._disposeTimer),delete this._disposeTimer),delete this._clearDisposeTimeout})}dispose(){var t;this._clearDisposeTimeout&&this._clearDisposeTimeout();const r=this.input;r&&(delete this._fixedTarget,delete this.onFocusIn,delete this.onFocusOut,delete this.input,r.removeEventListener("focusin",this._focusIn),r.removeEventListener("focusout",this._focusOut),delete r.__tabsterDummyContainer,(t=r.parentElement)===null||t===void 0||t.removeChild(r))}setTopLeft(t,r){var n;const o=(n=this.input)===null||n===void 0?void 0:n.style;o&&(o.top=`${t}px`,o.left=`${r}px`)}_isBackward(t,r,n){return t&&!n?!this.isFirst:!!(n&&r.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)}}const tM={Root:1,Modalizer:2,Mover:3,Groupper:4};class Tf{constructor(t,r,n,o,i,a){this._element=r,this._instance=new nM(t,r,this,n,o,i,a)}_setHandlers(t,r){this._onFocusIn=t,this._onFocusOut=r}moveOut(t){var r;(r=this._instance)===null||r===void 0||r.moveOut(t)}moveOutWithDefaultAction(t,r){var n;(n=this._instance)===null||n===void 0||n.moveOutWithDefaultAction(t,r)}getHandler(t){return t?this._onFocusIn:this._onFocusOut}setTabbable(t){var r;(r=this._instance)===null||r===void 0||r.setTabbable(this,t)}dispose(){this._instance&&(this._instance.dispose(this),delete this._instance),delete this._onFocusIn,delete this._onFocusOut}static moveWithPhantomDummy(t,r,n,o,i){var a;const l=new qs(t.getWindow,!0,{isPhantom:!0,isFirst:!0}).input;if(l){let u,f;if(r.tagName==="BODY")u=r,f=n&&o||!n&&!o?r.firstElementChild:null;else{n&&(!o||o&&!t.focusable.isFocusable(r,!1,!0,!0))?(u=r,f=o?r.firstElementChild:null):(u=r.parentElement,f=n&&o||!n&&!o?r:r.nextElementSibling);let d,p;do d=n&&o||!n&&!o?f==null?void 0:f.previousElementSibling:f,p=(a=d==null?void 0:d.__tabsterDummyContainer)===null||a===void 0?void 0:a.get(),p===r?f=n&&o||!n&&!o?d:d==null?void 0:d.nextElementSibling:p=void 0;while(p)}u&&qi({by:"root",owner:u,next:null,relatedEvent:i})&&(u.insertBefore(l,f),Ro(l))}}static addPhantomDummyWithTarget(t,r,n,o){const a=new qs(t.getWindow,!0,{isPhantom:!0,isFirst:!0},void 0,new Sn(t.getWindow,o)).input;if(a){let s,l;G7(r)&&!n?(s=r,l=r.firstElementChild):(s=r.parentElement,l=n?r:r.nextElementSibling),s==null||s.insertBefore(a,l)}}}function $n(e,t){var r;const n={1:"Root",2:"Modalizer",3:"Mover",4:"Groupper"};(r=e.input)===null||r===void 0||r.setAttribute(_y,[`isFirst=${e.isFirst}`,`isOutside=${e.isOutside}`,...t.map(o=>`(${n[o.priority]}, tabbable=${o.tabbable})`)].join(", "))}class rM{constructor(t){this._updateQueue=new Set,this._lastUpdateQueueTime=0,this._changedParents=new WeakSet,this._dummyElements=[],this._dummyCallbacks=new WeakMap,this._domChanged=r=>{var n;this._changedParents.has(r)||(this._changedParents.add(r),!this._updateDummyInputsTimer&&(this._updateDummyInputsTimer=(n=this._win)===null||n===void 0?void 0:n.call(this).setTimeout(()=>{delete this._updateDummyInputsTimer;for(const o of this._dummyElements){const i=o.get();if(i){const a=this._dummyCallbacks.get(i);if(a){const s=i.parentElement;(!s||this._changedParents.has(s))&&a()}}}this._changedParents=new WeakSet},Af)))},this._win=t}add(t,r){!this._dummyCallbacks.has(t)&&this._win&&(this._dummyElements.push(new Sn(this._win,t)),this._dummyCallbacks.set(t,r),this.domChanged=this._domChanged)}remove(t){this._dummyElements=this._dummyElements.filter(r=>{const n=r.get();return n&&n!==t}),this._dummyCallbacks.delete(t),this._dummyElements.length===0&&delete this.domChanged}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.call(this);this._updateTimer&&(r==null||r.clearTimeout(this._updateTimer),delete this._updateTimer),this._updateDummyInputsTimer&&(r==null||r.clearTimeout(this._updateDummyInputsTimer),delete this._updateDummyInputsTimer),this._changedParents=new WeakSet,this._dummyCallbacks=new WeakMap,this._dummyElements=[],this._updateQueue.clear(),delete this.domChanged,delete this._win}updatePositions(t){this._win&&(this._updateQueue.add(t),this._lastUpdateQueueTime=Date.now(),this._scheduledUpdatePositions())}_scheduledUpdatePositions(){var t;this._updateTimer||(this._updateTimer=(t=this._win)===null||t===void 0?void 0:t.call(this).setTimeout(()=>{if(delete this._updateTimer,this._lastUpdateQueueTime+Af<=Date.now()){const r=new Map,n=[];for(const o of this._updateQueue)n.push(o(r));this._updateQueue.clear();for(const o of n)o();r.clear()}else this._scheduledUpdatePositions()},Af))}}class nM{constructor(t,r,n,o,i,a,s){this._wrappers=[],this._isOutside=!1,this._transformElements=new Set,this._onFocusIn=(h,g,v)=>{this._onFocus(!0,h,g,v)},this._onFocusOut=(h,g,v)=>{this._onFocus(!1,h,g,v)},this.moveOut=h=>{var g;const v=this._firstDummy,y=this._lastDummy;if(v&&y){this._ensurePosition();const m=v.input,w=y.input,E=(g=this._element)===null||g===void 0?void 0:g.get();if(m&&w&&E){let x;h?(m.tabIndex=0,x=m):(w.tabIndex=0,x=w),x&&Ro(x)}}},this.moveOutWithDefaultAction=(h,g)=>{var v;const y=this._firstDummy,m=this._lastDummy;if(y&&m){this._ensurePosition();const w=y.input,E=m.input,x=(v=this._element)===null||v===void 0?void 0:v.get();if(w&&E&&x){let k;h?!y.isOutside&&this._tabster.focusable.isFocusable(x,!0,!0,!0)?k=x:(y.useDefaultAction=!0,w.tabIndex=0,k=w):(m.useDefaultAction=!0,E.tabIndex=0,k=E),k&&qi({by:"root",owner:x,next:null,relatedEvent:g})&&Ro(k)}}},this.setTabbable=(h,g)=>{var v,y;for(const w of this._wrappers)if(w.manager===h){w.tabbable=g;break}const m=this._getCurrent();if(m){const w=m.tabbable?0:-1;let E=(v=this._firstDummy)===null||v===void 0?void 0:v.input;E&&(E.tabIndex=w),E=(y=this._lastDummy)===null||y===void 0?void 0:y.input,E&&(E.tabIndex=w)}process.env.NODE_ENV==="development"&&(this._firstDummy&&$n(this._firstDummy,this._wrappers),this._lastDummy&&$n(this._lastDummy,this._wrappers))},this._addDummyInputs=()=>{this._addTimer||(this._addTimer=this._getWindow().setTimeout(()=>{delete this._addTimer,this._ensurePosition(),process.env.NODE_ENV==="development"&&(this._firstDummy&&$n(this._firstDummy,this._wrappers),this._lastDummy&&$n(this._lastDummy,this._wrappers)),this._addTransformOffsets()},0))},this._addTransformOffsets=()=>{this._tabster._dummyObserver.updatePositions(this._computeTransformOffsets)},this._computeTransformOffsets=h=>{var g,v;const y=((g=this._firstDummy)===null||g===void 0?void 0:g.input)||((v=this._lastDummy)===null||v===void 0?void 0:v.input),m=this._transformElements,w=new Set;let E=0,x=0;const k=this._getWindow();for(let I=y;I&&I.nodeType===Node.ELEMENT_NODE;I=I.parentElement){let S=h.get(I);if(S===void 0){const C=k.getComputedStyle(I).transform;C&&C!=="none"&&(S={scrollTop:I.scrollTop,scrollLeft:I.scrollLeft}),h.set(I,S||null)}S&&(w.add(I),m.has(I)||I.addEventListener("scroll",this._addTransformOffsets),E+=S.scrollTop,x+=S.scrollLeft)}for(const I of m)w.has(I)||I.removeEventListener("scroll",this._addTransformOffsets);return this._transformElements=w,()=>{var I,S;(I=this._firstDummy)===null||I===void 0||I.setTopLeft(E,x),(S=this._lastDummy)===null||S===void 0||S.setTopLeft(E,x)}};const l=r.get();if(!l)throw new Error("No element");this._tabster=t,this._getWindow=t.getWindow,this._callForDefaultAction=s;const u=l.__tabsterDummy;if((u||this)._wrappers.push({manager:n,priority:o,tabbable:!0}),u)return process.env.NODE_ENV==="development"&&(this._firstDummy&&$n(this._firstDummy,u._wrappers),this._lastDummy&&$n(this._lastDummy,u._wrappers)),u;l.__tabsterDummy=this;const f=i==null?void 0:i.dummyInputsPosition,d=l.tagName;this._isOutside=f?f===U7.Outside:(a||d==="UL"||d==="OL"||d==="TABLE")&&!(d==="LI"||d==="TD"||d==="TH"),this._firstDummy=new qs(this._getWindow,this._isOutside,{isFirst:!0},r),this._lastDummy=new qs(this._getWindow,this._isOutside,{isFirst:!1},r);const p=this._firstDummy.input;p&&t._dummyObserver.add(p,this._addDummyInputs),this._firstDummy.onFocusIn=this._onFocusIn,this._firstDummy.onFocusOut=this._onFocusOut,this._lastDummy.onFocusIn=this._onFocusIn,this._lastDummy.onFocusOut=this._onFocusOut,this._element=r,this._addDummyInputs()}dispose(t,r){var n,o,i,a;const s=this._wrappers=this._wrappers.filter(l=>l.manager!==t&&!r);if(process.env.NODE_ENV==="development"&&(this._firstDummy&&$n(this._firstDummy,s),this._lastDummy&&$n(this._lastDummy,s)),s.length===0){delete((n=this._element)===null||n===void 0?void 0:n.get()).__tabsterDummy;for(const f of this._transformElements)f.removeEventListener("scroll",this._addTransformOffsets);this._transformElements.clear();const l=this._getWindow();this._addTimer&&(l.clearTimeout(this._addTimer),delete this._addTimer);const u=(o=this._firstDummy)===null||o===void 0?void 0:o.input;u&&this._tabster._dummyObserver.remove(u),(i=this._firstDummy)===null||i===void 0||i.dispose(),(a=this._lastDummy)===null||a===void 0||a.dispose()}}_onFocus(t,r,n,o){var i;const a=this._getCurrent();a&&(!r.useDefaultAction||this._callForDefaultAction)&&((i=a.manager.getHandler(t))===null||i===void 0||i(r,n,o))}_getCurrent(){return this._wrappers.sort((t,r)=>t.tabbable!==r.tabbable?t.tabbable?-1:1:t.priority-r.priority),this._wrappers[0]}_ensurePosition(){var t,r,n;const o=(t=this._element)===null||t===void 0?void 0:t.get(),i=(r=this._firstDummy)===null||r===void 0?void 0:r.input,a=(n=this._lastDummy)===null||n===void 0?void 0:n.input;if(!(!o||!i||!a))if(this._isOutside){const s=o.parentElement;if(s){const l=o.nextElementSibling;l!==a&&s.insertBefore(a,l),o.previousElementSibling!==i&&s.insertBefore(i,o)}}else{o.lastElementChild!==a&&o.appendChild(a);const s=o.firstElementChild;s&&s!==i&&o.insertBefore(i,s)}}}function Iy(e){let t=null;for(let r=e.lastElementChild;r;r=r.lastElementChild)t=r;return t||void 0}function Ki(e,t,r){const n=document.createEvent("HTMLEvents");return n.initEvent(t,!0,!0),n.details=r,e.dispatchEvent(n),!n.defaultPrevented}function qi(e){return Ki(e.owner,R7,e)}/*!
128
128
  * Copyright (c) Microsoft Corporation. All rights reserved.
129
129
  * Licensed under the MIT License.
130
- */function rM(e,t){const r=JSON.stringify(e);return t===!0?r:{[En]:r}}function nM(e,t){for(const r of Object.keys(t)){const n=t[r];n?e[r]=n:delete e[r]}}function oM(e,t,r){let n;if(r){const o=e.getAttribute(En);if(o)try{n=JSON.parse(o)}catch(i){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${i}`,e)}}n||(n={}),nM(n,t),Object.keys(n).length>0?e.setAttribute(En,rM(n,!0)):e.removeAttribute(En)}/*!
130
+ */function oM(e,t){const r=JSON.stringify(e);return t===!0?r:{[xn]:r}}function iM(e,t){for(const r of Object.keys(t)){const n=t[r];n?e[r]=n:delete e[r]}}function aM(e,t,r){let n;if(r){const o=e.getAttribute(xn);if(o)try{n=JSON.parse(o)}catch(i){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${i}`,e)}}n||(n={}),iM(n,t),Object.keys(n).length>0?e.setAttribute(xn,oM(n,!0)):e.removeAttribute(xn)}/*!
131
131
  * Copyright (c) Microsoft Corporation. All rights reserved.
132
132
  * Licensed under the MIT License.
133
- */function Ty(e,t,r){if(process.env.NODE_ENV==="development"){const n=e.get();n&&(t?n.style.removeProperty("--tabster-root"):n.style.setProperty("--tabster-root",r+","))}}class Iy extends Of{constructor(t,r,n,o){super(t,r,Q7.Root,o,void 0,!0),this._onDummyInputFocus=i=>{var a;if(i.useDefaultAction)this._setFocused(!1);else{this._tabster.keyboardNavigation.setNavigatingWithKeyboard(!0);const s=this._element.get();if(s){this._setFocused(!0);const l=this._tabster.focusedElement.getFirstOrLastTabbable(i.isFirst,{container:s,ignoreAccessibility:!0});if(l){Bo(l);return}}(a=i.input)===null||a===void 0||a.blur()}},this._setHandlers(this._onDummyInputFocus),this._tabster=t,this._setFocused=n}}class iM extends Z7{constructor(t,r,n,o,i){super(t,r,o),this._isFocused=!1,this._setFocused=l=>{var u;if(this._setFocusedTimer&&(this._tabster.getWindow().clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),this._isFocused===l)return;const f=this._element.get();f&&(l?(this._isFocused=!0,(u=this._dummyManager)===null||u===void 0||u.setTabbable(!1),Gi(this._tabster.root.eventTarget,"focus",{element:f})):this._setFocusedTimer=this._tabster.getWindow().setTimeout(()=>{var d;delete this._setFocusedTimer,this._isFocused=!1,(d=this._dummyManager)===null||d===void 0||d.setTabbable(!0),Gi(this._tabster.root.eventTarget,"blur",{element:f})},0))},this._onFocusIn=l=>{const u=this._tabster.getParent,f=this._element.get();let d=l.target;do{if(d===f){this._setFocused(!0);return}d=d&&u(d)}while(d)},this._onFocusOut=()=>{this._setFocused(!1)},this._onDispose=n;const a=t.getWindow;this.uid=q7(a,r),this._sys=i,(t.controlTab||t.rootDummyInputs)&&this.addDummyInputs();const s=a();s.document.addEventListener("focusin",this._onFocusIn),s.document.addEventListener("focusout",this._onFocusOut),this._add()}addDummyInputs(){this._dummyManager||(this._dummyManager=new Iy(this._tabster,this._element,this._setFocused,this._sys))}dispose(){var t;this._onDispose(this);const r=this._tabster.getWindow();r.document.removeEventListener("focusin",this._onFocusIn),r.document.removeEventListener("focusout",this._onFocusOut),this._setFocusedTimer&&(r.clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),(t=this._dummyManager)===null||t===void 0||t.dispose(),this._remove()}moveOutWithDefaultAction(t,r){const n=this._dummyManager;if(n)n.moveOutWithDefaultAction(t,r);else{const o=this.getElement();o&&Iy.moveWithPhantomDummy(this._tabster,o,!0,t,r)}}_add(){process.env.NODE_ENV==="development"&&Ty(this._element,!1,this.uid)}_remove(){process.env.NODE_ENV==="development"&&Ty(this._element,!0)}}class Hr{constructor(t,r){this._autoRootWaiting=!1,this._roots={},this._forceDummy=!1,this.rootById={},this._autoRootCreate=()=>{var n;const o=this._win().document,i=o.body;if(i){this._autoRootUnwait(o);const a=this._autoRoot;if(a)return oM(i,{root:a},!0),_y(this._tabster,i),(n=Zn(this._tabster,i))===null||n===void 0?void 0:n.root}else this._autoRootWaiting||(this._autoRootWaiting=!0,o.addEventListener("readystatechange",this._autoRootCreate))},this._onRootDispose=n=>{delete this._roots[n.id]},this._tabster=t,this._win=t.getWindow,this._autoRoot=r,this.eventTarget=R7(this._win),t.queueInit(()=>{this._autoRoot&&this._autoRootCreate()})}_autoRootUnwait(t){t.removeEventListener("readystatechange",this._autoRootCreate),this._autoRootWaiting=!1}dispose(){const t=this._win();this._autoRootUnwait(t.document),delete this._autoRoot,Object.keys(this._roots).forEach(r=>{this._roots[r]&&(this._roots[r].dispose(),delete this._roots[r])}),this.rootById={}}createRoot(t,r,n){process.env.NODE_ENV;const o=new iM(this._tabster,t,this._onRootDispose,r,n);return this._roots[o.id]=o,this._forceDummy&&o.addDummyInputs(),o}addDummyInputs(){this._forceDummy=!0;const t=this._roots;for(const r of Object.keys(t))t[r].addDummyInputs()}static getRootByUId(t,r){const n=t().__tabsterInstance;return n&&n.root.rootById[r]}static getTabsterContext(t,r,n){n===void 0&&(n={});var o,i,a,s;if(!r.ownerDocument)return;const{checkRtl:l,referenceElement:u}=n,f=t.getParent;t.drainInitQueue();let d,p,h,g,v=!1,y,m,w,E,x=u||r;const k={};for(;x&&(!d||l);){const S=Zn(t,x);if(l&&w===void 0){const N=x.dir;N&&(w=N.toLowerCase()==="rtl")}if(!S){x=f(x);continue}const C=x.tagName;(S.uncontrolled||C==="IFRAME"||C==="WEBVIEW")&&(E=x),!g&&(!((o=S.focusable)===null||o===void 0)&&o.excludeFromMover)&&!h&&(v=!0);const P=S.modalizer,F=S.groupper,D=S.mover;!p&&P&&(p=P),!h&&F&&(!p||P)&&(p?(!F.isActive()&&F.getProps().tabbability&&p.userId!==((i=t.modalizer)===null||i===void 0?void 0:i.activeId)&&(p=void 0,h=F),m=F):h=F),!g&&D&&(!p||P)&&(!F||x!==r)&&(g=D,y=!!h&&h!==F),S.root&&(d=S.root),!((a=S.focusable)===null||a===void 0)&&a.ignoreKeydown&&Object.assign(k,S.focusable.ignoreKeydown),x=f(x)}if(!d){const S=t.root;S._autoRoot&&!((s=r.ownerDocument)===null||s===void 0)&&s.body&&(d=S._autoRootCreate())}return h&&!g&&(y=!0),process.env.NODE_ENV==="development"&&!d&&(p||h||g)&&console.error("Tabster Root is required for Mover, Groupper and Modalizer to work."),d?{root:d,modalizer:p,groupper:h,mover:g,groupperBeforeMover:y,modalizerInGroupper:m,rtl:l?!!w:void 0,uncontrolled:E,excludedFromMover:v,ignoreKeydown:S=>!!k[S.key]}:void 0}static getRoot(t,r){var n;const o=t.getParent;for(let i=r;i;i=o(i)){const a=(n=Zn(t,i))===null||n===void 0?void 0:n.root;if(a)return a}}onRoot(t,r){r?delete this.rootById[t.uid]:this.rootById[t.uid]=t}}/*!
133
+ */function Py(e,t,r){if(process.env.NODE_ENV==="development"){const n=e.get();n&&(t?n.style.removeProperty("--tabster-root"):n.style.setProperty("--tabster-root",r+","))}}class ky extends Tf{constructor(t,r,n,o){super(t,r,tM.Root,o,void 0,!0),this._onDummyInputFocus=i=>{var a;if(i.useDefaultAction)this._setFocused(!1);else{this._tabster.keyboardNavigation.setNavigatingWithKeyboard(!0);const s=this._element.get();if(s){this._setFocused(!0);const l=this._tabster.focusedElement.getFirstOrLastTabbable(i.isFirst,{container:s,ignoreAccessibility:!0});if(l){Ro(l);return}}(a=i.input)===null||a===void 0||a.blur()}},this._setHandlers(this._onDummyInputFocus),this._tabster=t,this._setFocused=n}}class sM extends eM{constructor(t,r,n,o,i){super(t,r,o),this._isFocused=!1,this._setFocused=l=>{var u;if(this._setFocusedTimer&&(this._tabster.getWindow().clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),this._isFocused===l)return;const f=this._element.get();f&&(l?(this._isFocused=!0,(u=this._dummyManager)===null||u===void 0||u.setTabbable(!1),Ki(this._tabster.root.eventTarget,"focus",{element:f})):this._setFocusedTimer=this._tabster.getWindow().setTimeout(()=>{var d;delete this._setFocusedTimer,this._isFocused=!1,(d=this._dummyManager)===null||d===void 0||d.setTabbable(!0),Ki(this._tabster.root.eventTarget,"blur",{element:f})},0))},this._onFocusIn=l=>{const u=this._tabster.getParent,f=this._element.get();let d=l.target;do{if(d===f){this._setFocused(!0);return}d=d&&u(d)}while(d)},this._onFocusOut=()=>{this._setFocused(!1)},this._onDispose=n;const a=t.getWindow;this.uid=J7(a,r),this._sys=i,(t.controlTab||t.rootDummyInputs)&&this.addDummyInputs();const s=a();s.document.addEventListener("focusin",this._onFocusIn),s.document.addEventListener("focusout",this._onFocusOut),this._add()}addDummyInputs(){this._dummyManager||(this._dummyManager=new ky(this._tabster,this._element,this._setFocused,this._sys))}dispose(){var t;this._onDispose(this);const r=this._tabster.getWindow();r.document.removeEventListener("focusin",this._onFocusIn),r.document.removeEventListener("focusout",this._onFocusOut),this._setFocusedTimer&&(r.clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),(t=this._dummyManager)===null||t===void 0||t.dispose(),this._remove()}moveOutWithDefaultAction(t,r){const n=this._dummyManager;if(n)n.moveOutWithDefaultAction(t,r);else{const o=this.getElement();o&&ky.moveWithPhantomDummy(this._tabster,o,!0,t,r)}}_add(){process.env.NODE_ENV==="development"&&Py(this._element,!1,this.uid)}_remove(){process.env.NODE_ENV==="development"&&Py(this._element,!0)}}class Vr{constructor(t,r){this._autoRootWaiting=!1,this._roots={},this._forceDummy=!1,this.rootById={},this._autoRootCreate=()=>{var n;const o=this._win().document,i=o.body;if(i){this._autoRootUnwait(o);const a=this._autoRoot;if(a)return aM(i,{root:a},!0),xy(this._tabster,i),(n=Qn(this._tabster,i))===null||n===void 0?void 0:n.root}else this._autoRootWaiting||(this._autoRootWaiting=!0,o.addEventListener("readystatechange",this._autoRootCreate))},this._onRootDispose=n=>{delete this._roots[n.id]},this._tabster=t,this._win=t.getWindow,this._autoRoot=r,this.eventTarget=W7(this._win),t.queueInit(()=>{this._autoRoot&&this._autoRootCreate()})}_autoRootUnwait(t){t.removeEventListener("readystatechange",this._autoRootCreate),this._autoRootWaiting=!1}dispose(){const t=this._win();this._autoRootUnwait(t.document),delete this._autoRoot,Object.keys(this._roots).forEach(r=>{this._roots[r]&&(this._roots[r].dispose(),delete this._roots[r])}),this.rootById={}}createRoot(t,r,n){process.env.NODE_ENV;const o=new sM(this._tabster,t,this._onRootDispose,r,n);return this._roots[o.id]=o,this._forceDummy&&o.addDummyInputs(),o}addDummyInputs(){this._forceDummy=!0;const t=this._roots;for(const r of Object.keys(t))t[r].addDummyInputs()}static getRootByUId(t,r){const n=t().__tabsterInstance;return n&&n.root.rootById[r]}static getTabsterContext(t,r,n){n===void 0&&(n={});var o,i,a,s;if(!r.ownerDocument)return;const{checkRtl:l,referenceElement:u}=n,f=t.getParent;t.drainInitQueue();let d,p,h,g,v=!1,y,m,w,E,x=u||r;const k={};for(;x&&(!d||l);){const S=Qn(t,x);if(l&&w===void 0){const N=x.dir;N&&(w=N.toLowerCase()==="rtl")}if(!S){x=f(x);continue}const C=x.tagName;(S.uncontrolled||C==="IFRAME"||C==="WEBVIEW")&&(E=x),!g&&(!((o=S.focusable)===null||o===void 0)&&o.excludeFromMover)&&!h&&(v=!0);const P=S.modalizer,F=S.groupper,D=S.mover;!p&&P&&(p=P),!h&&F&&(!p||P)&&(p?(!F.isActive()&&F.getProps().tabbability&&p.userId!==((i=t.modalizer)===null||i===void 0?void 0:i.activeId)&&(p=void 0,h=F),m=F):h=F),!g&&D&&(!p||P)&&(!F||x!==r)&&(g=D,y=!!h&&h!==F),S.root&&(d=S.root),!((a=S.focusable)===null||a===void 0)&&a.ignoreKeydown&&Object.assign(k,S.focusable.ignoreKeydown),x=f(x)}if(!d){const S=t.root;S._autoRoot&&!((s=r.ownerDocument)===null||s===void 0)&&s.body&&(d=S._autoRootCreate())}return h&&!g&&(y=!0),process.env.NODE_ENV==="development"&&!d&&(p||h||g)&&console.error("Tabster Root is required for Mover, Groupper and Modalizer to work."),d?{root:d,modalizer:p,groupper:h,mover:g,groupperBeforeMover:y,modalizerInGroupper:m,rtl:l?!!w:void 0,uncontrolled:E,excludedFromMover:v,ignoreKeydown:S=>!!k[S.key]}:void 0}static getRoot(t,r){var n;const o=t.getParent;for(let i=r;i;i=o(i)){const a=(n=Qn(t,i))===null||n===void 0?void 0:n.root;if(a)return a}}onRoot(t,r){r?delete this.rootById[t.uid]:this.rootById[t.uid]=t}}/*!
134
134
  * Copyright (c) Microsoft Corporation. All rights reserved.
135
135
  * Licensed under the MIT License.
136
- */class Py{constructor(){this._callbacks=[]}dispose(){this._callbacks=[],delete this._val}subscribe(t){const r=this._callbacks;r.indexOf(t)<0&&r.push(t)}subscribeFirst(t){const r=this._callbacks,n=r.indexOf(t);n>=0&&r.splice(n,1),r.unshift(t)}unsubscribe(t){const r=this._callbacks.indexOf(t);r>=0&&this._callbacks.splice(r,1)}setVal(t,r){this._val!==t&&(this._val=t,this._callCallbacks(t,r))}getVal(){return this._val}trigger(t,r){this._callCallbacks(t,r)}_callCallbacks(t,r){this._callbacks.forEach(n=>n(t,r))}}/*!
136
+ */class Ny{constructor(){this._callbacks=[]}dispose(){this._callbacks=[],delete this._val}subscribe(t){const r=this._callbacks;r.indexOf(t)<0&&r.push(t)}subscribeFirst(t){const r=this._callbacks,n=r.indexOf(t);n>=0&&r.splice(n,1),r.unshift(t)}unsubscribe(t){const r=this._callbacks.indexOf(t);r>=0&&this._callbacks.splice(r,1)}setVal(t,r){this._val!==t&&(this._val=t,this._callCallbacks(t,r))}getVal(){return this._val}trigger(t,r){this._callCallbacks(t,r)}_callCallbacks(t,r){this._callbacks.forEach(n=>n(t,r))}}/*!
137
137
  * Copyright (c) Microsoft Corporation. All rights reserved.
138
138
  * Licensed under the MIT License.
139
- */class aM{constructor(t){this._tabster=t}dispose(){}getProps(t){const r=Zn(this._tabster,t);return r&&r.focusable||{}}isFocusable(t,r,n,o){return Y7(t,wy)&&(r||t.tabIndex!==-1)?(n||this.isVisible(t))&&(o||this.isAccessible(t)):!1}isVisible(t){if(!t.ownerDocument||t.nodeType!==Node.ELEMENT_NODE||t.offsetParent===null&&t.ownerDocument.body!==t)return!1;const r=t.ownerDocument.defaultView;if(!r)return!1;const n=t.ownerDocument.body.getBoundingClientRect();return!(n.width===0&&n.height===0||r.getComputedStyle(t).visibility==="hidden")}isAccessible(t){var r;for(let n=t;n;n=n.parentElement){const o=Zn(this._tabster,n);if(this._isHidden(n)||!((r=o==null?void 0:o.focusable)===null||r===void 0?void 0:r.ignoreAriaDisabled)&&this._isDisabled(n))return!1}return!0}_isDisabled(t){return t.hasAttribute("disabled")}_isHidden(t){var r;const n=t.getAttribute("aria-hidden");return!!(n&&n.toLowerCase()==="true"&&!(!((r=this._tabster.modalizer)===null||r===void 0)&&r.isAugmented(t)))}findFirst(t,r){return this.findElement({...t},r)}findLast(t,r){return this.findElement({isBackward:!0,...t},r)}findNext(t,r){return this.findElement({...t},r)}findPrev(t,r){return this.findElement({...t,isBackward:!0},r)}findDefault(t,r){return this.findElement({...t,acceptCondition:n=>this.isFocusable(n,t.includeProgrammaticallyFocusable)&&!!this.getProps(n).isDefault},r)||null}findAll(t){return this._findElements(!0,t)||[]}findElement(t,r){const n=this._findElements(!1,t,r);return n&&n[0]}_findElements(t,r,n){var o,i,a;const{container:s,currentElement:l=null,includeProgrammaticallyFocusable:u,useActiveModalizer:f,ignoreAccessibility:d,modalizerId:p,isBackward:h,onElement:g}=r;n||(n={});const v=[];let{acceptCondition:y}=r;const m=!!y;if(!s)return null;y||(y=k=>this.isFocusable(k,u,!1,d));const w={container:s,modalizerUserId:p===void 0&&f?(o=this._tabster.modalizer)===null||o===void 0?void 0:o.activeId:p||((a=(i=Hr.getTabsterContext(this._tabster,s))===null||i===void 0?void 0:i.modalizer)===null||a===void 0?void 0:a.userId),from:l||s,isBackward:h,acceptCondition:y,hasCustomCondition:m,includeProgrammaticallyFocusable:u,ignoreAccessibility:d,cachedGrouppers:{}},E=$y(s.ownerDocument,s,k=>this._acceptElement(k,w));if(!E)return null;const x=k=>{var I,S;const C=(I=w.foundElement)!==null&&I!==void 0?I:w.foundBackward;return C&&v.push(C),t?C&&(w.found=!1,delete w.foundElement,delete w.foundBackward,delete w.fromCtx,w.from=C,g&&!g(C))?!1:!!(C||k):(C&&n&&(n.uncontrolled=(S=Hr.getTabsterContext(this._tabster,C))===null||S===void 0?void 0:S.uncontrolled),!!(k&&!C))};if(l||(n.outOfDOMOrder=!0),l)E.currentNode=l;else if(h){const k=Oy(s);if(!k)return null;if(this._acceptElement(k,w)===NodeFilter.FILTER_ACCEPT&&!x(!0))return w.skippedFocusable&&(n.outOfDOMOrder=!0),v;E.currentNode=k}do h?E.previousNode():E.nextNode();while(x());return w.skippedFocusable&&(n.outOfDOMOrder=!0),v.length?v:null}_acceptElement(t,r){var n,o,i,a;if(r.found)return NodeFilter.FILTER_ACCEPT;const s=r.foundBackward;if(s&&(t===s||!s.contains(t)))return r.found=!0,r.foundElement=s,NodeFilter.FILTER_ACCEPT;const l=r.container;if(t===l)return NodeFilter.FILTER_SKIP;if(!l.contains(t)||t.__tabsterDummyContainer||!((n=r.rejectElementsFrom)===null||n===void 0)&&n.contains(t))return NodeFilter.FILTER_REJECT;const u=r.currentCtx=Hr.getTabsterContext(this._tabster,t);if(!u)return NodeFilter.FILTER_SKIP;if(Cy(t))return this.isFocusable(t,void 0,!0,!0)&&(r.skippedFocusable=!0),NodeFilter.FILTER_SKIP;if(!r.hasCustomCondition&&(t.tagName==="IFRAME"||t.tagName==="WEBVIEW"))return((o=u.modalizer)===null||o===void 0?void 0:o.userId)===((i=this._tabster.modalizer)===null||i===void 0?void 0:i.activeId)?(r.found=!0,r.rejectElementsFrom=r.foundElement=t,NodeFilter.FILTER_ACCEPT):NodeFilter.FILTER_REJECT;if(!r.ignoreAccessibility&&!this.isAccessible(t))return this.isFocusable(t,!1,!0,!0)&&(r.skippedFocusable=!0),NodeFilter.FILTER_REJECT;let f,d=r.fromCtx;d||(d=r.fromCtx=Hr.getTabsterContext(this._tabster,r.from));const p=d==null?void 0:d.mover;let h=u.groupper,g=u.mover;if(f=(a=this._tabster.modalizer)===null||a===void 0?void 0:a.acceptElement(t,r),f!==void 0&&(r.skippedFocusable=!0),f===void 0&&(h||g||p)){const v=h==null?void 0:h.getElement(),y=p==null?void 0:p.getElement();let m=g==null?void 0:g.getElement();m&&(y!=null&&y.contains(m))&&l.contains(y)&&(!v||!g||y.contains(v))&&(g=p,m=y),v&&(v===l||!l.contains(v))&&(h=void 0),m&&!l.contains(m)&&(g=void 0),h&&g&&(m&&v&&!v.contains(m)?g=void 0:h=void 0),h&&(f=h.acceptElement(t,r)),g&&(f=g.acceptElement(t,r))}return f===void 0&&(f=r.acceptCondition(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,f===NodeFilter.FILTER_SKIP&&this.isFocusable(t,!1,!0,!0)&&(r.skippedFocusable=!0)),f===NodeFilter.FILTER_ACCEPT&&!r.found&&(r.isBackward?(r.foundBackward=t,f=NodeFilter.FILTER_SKIP):(r.found=!0,r.foundElement=t)),f}}/*!
139
+ */class lM{constructor(t){this._tabster=t}dispose(){}getProps(t){const r=Qn(this._tabster,t);return r&&r.focusable||{}}isFocusable(t,r,n,o){return X7(t,Ey)&&(r||t.tabIndex!==-1)?(n||this.isVisible(t))&&(o||this.isAccessible(t)):!1}isVisible(t){if(!t.ownerDocument||t.nodeType!==Node.ELEMENT_NODE||t.offsetParent===null&&t.ownerDocument.body!==t)return!1;const r=t.ownerDocument.defaultView;if(!r)return!1;const n=t.ownerDocument.body.getBoundingClientRect();return!(n.width===0&&n.height===0||r.getComputedStyle(t).visibility==="hidden")}isAccessible(t){var r;for(let n=t;n;n=n.parentElement){const o=Qn(this._tabster,n);if(this._isHidden(n)||!((r=o==null?void 0:o.focusable)===null||r===void 0?void 0:r.ignoreAriaDisabled)&&this._isDisabled(n))return!1}return!0}_isDisabled(t){return t.hasAttribute("disabled")}_isHidden(t){var r;const n=t.getAttribute("aria-hidden");return!!(n&&n.toLowerCase()==="true"&&!(!((r=this._tabster.modalizer)===null||r===void 0)&&r.isAugmented(t)))}findFirst(t,r){return this.findElement({...t},r)}findLast(t,r){return this.findElement({isBackward:!0,...t},r)}findNext(t,r){return this.findElement({...t},r)}findPrev(t,r){return this.findElement({...t,isBackward:!0},r)}findDefault(t,r){return this.findElement({...t,acceptCondition:n=>this.isFocusable(n,t.includeProgrammaticallyFocusable)&&!!this.getProps(n).isDefault},r)||null}findAll(t){return this._findElements(!0,t)||[]}findElement(t,r){const n=this._findElements(!1,t,r);return n&&n[0]}_findElements(t,r,n){var o,i,a;const{container:s,currentElement:l=null,includeProgrammaticallyFocusable:u,useActiveModalizer:f,ignoreAccessibility:d,modalizerId:p,isBackward:h,onElement:g}=r;n||(n={});const v=[];let{acceptCondition:y}=r;const m=!!y;if(!s)return null;y||(y=k=>this.isFocusable(k,u,!1,d));const w={container:s,modalizerUserId:p===void 0&&f?(o=this._tabster.modalizer)===null||o===void 0?void 0:o.activeId:p||((a=(i=Vr.getTabsterContext(this._tabster,s))===null||i===void 0?void 0:i.modalizer)===null||a===void 0?void 0:a.userId),from:l||s,isBackward:h,acceptCondition:y,hasCustomCondition:m,includeProgrammaticallyFocusable:u,ignoreAccessibility:d,cachedGrouppers:{}},E=Ay(s.ownerDocument,s,k=>this._acceptElement(k,w));if(!E)return null;const x=k=>{var I,S;const C=(I=w.foundElement)!==null&&I!==void 0?I:w.foundBackward;return C&&v.push(C),t?C&&(w.found=!1,delete w.foundElement,delete w.foundBackward,delete w.fromCtx,w.from=C,g&&!g(C))?!1:!!(C||k):(C&&n&&(n.uncontrolled=(S=Vr.getTabsterContext(this._tabster,C))===null||S===void 0?void 0:S.uncontrolled),!!(k&&!C))};if(l||(n.outOfDOMOrder=!0),l)E.currentNode=l;else if(h){const k=Iy(s);if(!k)return null;if(this._acceptElement(k,w)===NodeFilter.FILTER_ACCEPT&&!x(!0))return w.skippedFocusable&&(n.outOfDOMOrder=!0),v;E.currentNode=k}do h?E.previousNode():E.nextNode();while(x());return w.skippedFocusable&&(n.outOfDOMOrder=!0),v.length?v:null}_acceptElement(t,r){var n,o,i,a;if(r.found)return NodeFilter.FILTER_ACCEPT;const s=r.foundBackward;if(s&&(t===s||!s.contains(t)))return r.found=!0,r.foundElement=s,NodeFilter.FILTER_ACCEPT;const l=r.container;if(t===l)return NodeFilter.FILTER_SKIP;if(!l.contains(t)||t.__tabsterDummyContainer||!((n=r.rejectElementsFrom)===null||n===void 0)&&n.contains(t))return NodeFilter.FILTER_REJECT;const u=r.currentCtx=Vr.getTabsterContext(this._tabster,t);if(!u)return NodeFilter.FILTER_SKIP;if(Oy(t))return this.isFocusable(t,void 0,!0,!0)&&(r.skippedFocusable=!0),NodeFilter.FILTER_SKIP;if(!r.hasCustomCondition&&(t.tagName==="IFRAME"||t.tagName==="WEBVIEW"))return((o=u.modalizer)===null||o===void 0?void 0:o.userId)===((i=this._tabster.modalizer)===null||i===void 0?void 0:i.activeId)?(r.found=!0,r.rejectElementsFrom=r.foundElement=t,NodeFilter.FILTER_ACCEPT):NodeFilter.FILTER_REJECT;if(!r.ignoreAccessibility&&!this.isAccessible(t))return this.isFocusable(t,!1,!0,!0)&&(r.skippedFocusable=!0),NodeFilter.FILTER_REJECT;let f,d=r.fromCtx;d||(d=r.fromCtx=Vr.getTabsterContext(this._tabster,r.from));const p=d==null?void 0:d.mover;let h=u.groupper,g=u.mover;if(f=(a=this._tabster.modalizer)===null||a===void 0?void 0:a.acceptElement(t,r),f!==void 0&&(r.skippedFocusable=!0),f===void 0&&(h||g||p)){const v=h==null?void 0:h.getElement(),y=p==null?void 0:p.getElement();let m=g==null?void 0:g.getElement();m&&(y!=null&&y.contains(m))&&l.contains(y)&&(!v||!g||y.contains(v))&&(g=p,m=y),v&&(v===l||!l.contains(v))&&(h=void 0),m&&!l.contains(m)&&(g=void 0),h&&g&&(m&&v&&!v.contains(m)?g=void 0:h=void 0),h&&(f=h.acceptElement(t,r)),g&&(f=g.acceptElement(t,r))}return f===void 0&&(f=r.acceptCondition(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,f===NodeFilter.FILTER_SKIP&&this.isFocusable(t,!1,!0,!0)&&(r.skippedFocusable=!0)),f===NodeFilter.FILTER_ACCEPT&&!r.found&&(r.isBackward?(r.foundBackward=t,f=NodeFilter.FILTER_SKIP):(r.found=!0,r.foundElement=t)),f}}/*!
140
140
  * Copyright (c) Microsoft Corporation. All rights reserved.
141
141
  * Licensed under the MIT License.
142
- */const sM={Tab:9,Enter:13,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40};/*!
142
+ */const cM={Tab:9,Enter:13,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40};/*!
143
143
  * Copyright (c) Microsoft Corporation. All rights reserved.
144
144
  * Licensed under the MIT License.
145
- */function lM(e,t){var r;const n=e.getParent;let o=t;do{const i=(r=Zn(e,o))===null||r===void 0?void 0:r.uncontrolled;if(i&&e.uncontrolled.isUncontrolledCompletely(o,!!i.completely))return o;o=n(o)}while(o)}class kt extends Py{constructor(t,r){super(),this._init=()=>{const n=this._win(),o=n.document;o.addEventListener(zi,this._onFocusIn,!0),o.addEventListener("focusout",this._onFocusOut,!0),n.addEventListener("keydown",this._onKeyDown,!0);const i=o.activeElement;i&&i!==o.body&&this._setFocusedElement(i),this.subscribe(this._onChanged)},this._onFocusIn=n=>{this._setFocusedElement(n.target,n.details.relatedTarget,n.details.isFocusedProgrammatically)},this._onFocusOut=n=>{this._setFocusedElement(void 0,n.relatedTarget)},this._validateFocusedElement=n=>{},this._onKeyDown=n=>{if(n.keyCode!==sM.Tab||n.ctrlKey)return;const o=this.getVal();if(!o||!o.ownerDocument||o.contentEditable==="true")return;const i=this._tabster,a=i.controlTab,s=Hr.getTabsterContext(i,o);if(!s||s.ignoreKeydown(n))return;const l=n.shiftKey,u=kt.findNextTabbable(i,s,void 0,o,void 0,l,!0),f=s.root.getElement();if(!f)return;const d=u==null?void 0:u.element,p=lM(i,o);if(d){const h=u.uncontrolled;if(s.uncontrolled||h!=null&&h.contains(o)){if(!u.outOfDOMOrder&&h===s.uncontrolled||p&&!p.contains(d))return;Of.addPhantomDummyWithTarget(i,o,l,d);return}if(h||d.tagName==="IFRAME"){Ki({by:"root",owner:f,next:d,relatedEvent:n})&&Of.moveWithPhantomDummy(this._tabster,h??d,!1,l,n);return}(a||u!=null&&u.outOfDOMOrder)&&Ki({by:"root",owner:f,next:d,relatedEvent:n})&&(n.preventDefault(),n.stopImmediatePropagation(),Bo(d))}else!p&&Ki({by:"root",owner:f,next:null,relatedEvent:n})&&s.root.moveOutWithDefaultAction(l,n)},this._onChanged=(n,o)=>{var i,a;if(n)Gi(n,M7,o);else{const s=(i=this._lastVal)===null||i===void 0?void 0:i.get();if(s){const l={...o},u=Hr.getTabsterContext(this._tabster,s),f=(a=u==null?void 0:u.modalizer)===null||a===void 0?void 0:a.userId;f&&(l.modalizerId=f),Gi(s,F7,l)}}},this._tabster=t,this._win=r,t.queueInit(this._init)}dispose(){super.dispose();const t=this._win();t.document.removeEventListener(zi,this._onFocusIn,!0),t.document.removeEventListener("focusout",this._onFocusOut,!0),t.removeEventListener("keydown",this._onKeyDown,!0),this.unsubscribe(this._onChanged),delete kt._lastResetElement,delete this._nextVal,delete this._lastVal}static forgetMemorized(t,r){var n,o;let i=kt._lastResetElement,a=i&&i.get();a&&r.contains(a)&&delete kt._lastResetElement,a=(o=(n=t._nextVal)===null||n===void 0?void 0:n.element)===null||o===void 0?void 0:o.get(),a&&r.contains(a)&&delete t._nextVal,i=t._lastVal,a=i&&i.get(),a&&r.contains(a)&&delete t._lastVal}getFocusedElement(){return this.getVal()}getLastFocusedElement(){var t;let r=(t=this._lastVal)===null||t===void 0?void 0:t.get();return(!r||r&&!Af(r.ownerDocument,r))&&(this._lastVal=r=void 0),r}focus(t,r,n){return this._tabster.focusable.isFocusable(t,r,!1,n)?(t.focus(),!0):!1}focusDefault(t){const r=this._tabster.focusable.findDefault({container:t});return r?(this._tabster.focusedElement.focus(r),!0):!1}getFirstOrLastTabbable(t,r){var n;const{container:o,ignoreAccessibility:i}=r;let a;if(o){const s=Hr.getTabsterContext(this._tabster,o);s&&(a=(n=kt.findNextTabbable(this._tabster,s,o,void 0,void 0,!t,i))===null||n===void 0?void 0:n.element)}return a&&!(o!=null&&o.contains(a))&&(a=void 0),a||void 0}_focusFirstOrLast(t,r){const n=this.getFirstOrLastTabbable(t,r);return n?(this.focus(n,!1,!0),!0):!1}focusFirst(t){return this._focusFirstOrLast(!0,t)}focusLast(t){return this._focusFirstOrLast(!1,t)}resetFocus(t){if(!this._tabster.focusable.isVisible(t))return!1;if(this._tabster.focusable.isFocusable(t,!0,!0,!0))this.focus(t);else{const r=t.getAttribute("tabindex"),n=t.getAttribute("aria-hidden");t.tabIndex=-1,t.setAttribute("aria-hidden","true"),kt._lastResetElement=new xn(this._win,t),this.focus(t,!0,!0),this._setOrRemoveAttribute(t,"tabindex",r),this._setOrRemoveAttribute(t,"aria-hidden",n)}return!0}_setOrRemoveAttribute(t,r,n){n===null?t.removeAttribute(r):t.setAttribute(r,n)}_setFocusedElement(t,r,n){var o,i;if(this._tabster._noop)return;const a={relatedTarget:r};if(t){const l=(o=kt._lastResetElement)===null||o===void 0?void 0:o.get();if(kt._lastResetElement=void 0,l===t||Cy(t))return;a.isFocusedProgrammatically=n;const u=Hr.getTabsterContext(this._tabster,t),f=(i=u==null?void 0:u.modalizer)===null||i===void 0?void 0:i.userId;f&&(a.modalizerId=f)}const s=this._nextVal={element:t?new xn(this._win,t):void 0,details:a};t&&t!==this._val&&this._validateFocusedElement(t),this._nextVal===s&&this.setVal(t,a),this._nextVal=void 0}setVal(t,r){super.setVal(t,r),t&&(this._lastVal=new xn(this._win,t))}static findNextTabbable(t,r,n,o,i,a,s){const l=n||r.root.getElement();if(!l)return null;let u=null;const f=kt._isTabbingTimer,d=t.getWindow();f&&d.clearTimeout(f),kt.isTabbing=!0,kt._isTabbingTimer=d.setTimeout(()=>{delete kt._isTabbingTimer,kt.isTabbing=!1},0);const p=r.modalizer,h=r.groupper,g=r.mover,v=y=>{var m;if(u=y.findNextTabbable(o,i,a,s),o&&!(u!=null&&u.element)){const w=y!==p&&((m=y.getElement())===null||m===void 0?void 0:m.parentElement);if(w){const E=Hr.getTabsterContext(t,o,{referenceElement:w});if(E){const x=y.getElement(),k=a?x:x&&Oy(x)||x;k&&(u=kt.findNextTabbable(t,E,n,k,w,a,s),u&&(u.outOfDOMOrder=!0))}}}};if(h&&g)v(r.groupperBeforeMover?h:g);else if(h)v(h);else if(g)v(g);else if(p)v(p);else{const y={container:l,currentElement:o,referenceElement:i,ignoreAccessibility:s,useActiveModalizer:!0},m={};u={element:t.focusable[a?"findPrev":"findNext"](y,m),outOfDOMOrder:m.outOfDOMOrder,uncontrolled:m.uncontrolled}}return u}}kt.isTabbing=!1;/*!
145
+ */function uM(e,t){var r;const n=e.getParent;let o=t;do{const i=(r=Qn(e,o))===null||r===void 0?void 0:r.uncontrolled;if(i&&e.uncontrolled.isUncontrolledCompletely(o,!!i.completely))return o;o=n(o)}while(o)}class Nt extends Ny{constructor(t,r){super(),this._init=()=>{const n=this._win(),o=n.document;o.addEventListener(Gi,this._onFocusIn,!0),o.addEventListener("focusout",this._onFocusOut,!0),n.addEventListener("keydown",this._onKeyDown,!0);const i=o.activeElement;i&&i!==o.body&&this._setFocusedElement(i),this.subscribe(this._onChanged)},this._onFocusIn=n=>{this._setFocusedElement(n.target,n.details.relatedTarget,n.details.isFocusedProgrammatically)},this._onFocusOut=n=>{this._setFocusedElement(void 0,n.relatedTarget)},this._validateFocusedElement=n=>{},this._onKeyDown=n=>{if(n.keyCode!==cM.Tab||n.ctrlKey)return;const o=this.getVal();if(!o||!o.ownerDocument||o.contentEditable==="true")return;const i=this._tabster,a=i.controlTab,s=Vr.getTabsterContext(i,o);if(!s||s.ignoreKeydown(n))return;const l=n.shiftKey,u=Nt.findNextTabbable(i,s,void 0,o,void 0,l,!0),f=s.root.getElement();if(!f)return;const d=u==null?void 0:u.element,p=uM(i,o);if(d){const h=u.uncontrolled;if(s.uncontrolled||h!=null&&h.contains(o)){if(!u.outOfDOMOrder&&h===s.uncontrolled||p&&!p.contains(d))return;Tf.addPhantomDummyWithTarget(i,o,l,d);return}if(h||d.tagName==="IFRAME"){qi({by:"root",owner:f,next:d,relatedEvent:n})&&Tf.moveWithPhantomDummy(this._tabster,h??d,!1,l,n);return}(a||u!=null&&u.outOfDOMOrder)&&qi({by:"root",owner:f,next:d,relatedEvent:n})&&(n.preventDefault(),n.stopImmediatePropagation(),Ro(d))}else!p&&qi({by:"root",owner:f,next:null,relatedEvent:n})&&s.root.moveOutWithDefaultAction(l,n)},this._onChanged=(n,o)=>{var i,a;if(n)Ki(n,j7,o);else{const s=(i=this._lastVal)===null||i===void 0?void 0:i.get();if(s){const l={...o},u=Vr.getTabsterContext(this._tabster,s),f=(a=u==null?void 0:u.modalizer)===null||a===void 0?void 0:a.userId;f&&(l.modalizerId=f),Ki(s,B7,l)}}},this._tabster=t,this._win=r,t.queueInit(this._init)}dispose(){super.dispose();const t=this._win();t.document.removeEventListener(Gi,this._onFocusIn,!0),t.document.removeEventListener("focusout",this._onFocusOut,!0),t.removeEventListener("keydown",this._onKeyDown,!0),this.unsubscribe(this._onChanged),delete Nt._lastResetElement,delete this._nextVal,delete this._lastVal}static forgetMemorized(t,r){var n,o;let i=Nt._lastResetElement,a=i&&i.get();a&&r.contains(a)&&delete Nt._lastResetElement,a=(o=(n=t._nextVal)===null||n===void 0?void 0:n.element)===null||o===void 0?void 0:o.get(),a&&r.contains(a)&&delete t._nextVal,i=t._lastVal,a=i&&i.get(),a&&r.contains(a)&&delete t._lastVal}getFocusedElement(){return this.getVal()}getLastFocusedElement(){var t;let r=(t=this._lastVal)===null||t===void 0?void 0:t.get();return(!r||r&&!Of(r.ownerDocument,r))&&(this._lastVal=r=void 0),r}focus(t,r,n){return this._tabster.focusable.isFocusable(t,r,!1,n)?(t.focus(),!0):!1}focusDefault(t){const r=this._tabster.focusable.findDefault({container:t});return r?(this._tabster.focusedElement.focus(r),!0):!1}getFirstOrLastTabbable(t,r){var n;const{container:o,ignoreAccessibility:i}=r;let a;if(o){const s=Vr.getTabsterContext(this._tabster,o);s&&(a=(n=Nt.findNextTabbable(this._tabster,s,o,void 0,void 0,!t,i))===null||n===void 0?void 0:n.element)}return a&&!(o!=null&&o.contains(a))&&(a=void 0),a||void 0}_focusFirstOrLast(t,r){const n=this.getFirstOrLastTabbable(t,r);return n?(this.focus(n,!1,!0),!0):!1}focusFirst(t){return this._focusFirstOrLast(!0,t)}focusLast(t){return this._focusFirstOrLast(!1,t)}resetFocus(t){if(!this._tabster.focusable.isVisible(t))return!1;if(this._tabster.focusable.isFocusable(t,!0,!0,!0))this.focus(t);else{const r=t.getAttribute("tabindex"),n=t.getAttribute("aria-hidden");t.tabIndex=-1,t.setAttribute("aria-hidden","true"),Nt._lastResetElement=new Sn(this._win,t),this.focus(t,!0,!0),this._setOrRemoveAttribute(t,"tabindex",r),this._setOrRemoveAttribute(t,"aria-hidden",n)}return!0}_setOrRemoveAttribute(t,r,n){n===null?t.removeAttribute(r):t.setAttribute(r,n)}_setFocusedElement(t,r,n){var o,i;if(this._tabster._noop)return;const a={relatedTarget:r};if(t){const l=(o=Nt._lastResetElement)===null||o===void 0?void 0:o.get();if(Nt._lastResetElement=void 0,l===t||Oy(t))return;a.isFocusedProgrammatically=n;const u=Vr.getTabsterContext(this._tabster,t),f=(i=u==null?void 0:u.modalizer)===null||i===void 0?void 0:i.userId;f&&(a.modalizerId=f)}const s=this._nextVal={element:t?new Sn(this._win,t):void 0,details:a};t&&t!==this._val&&this._validateFocusedElement(t),this._nextVal===s&&this.setVal(t,a),this._nextVal=void 0}setVal(t,r){super.setVal(t,r),t&&(this._lastVal=new Sn(this._win,t))}static findNextTabbable(t,r,n,o,i,a,s){const l=n||r.root.getElement();if(!l)return null;let u=null;const f=Nt._isTabbingTimer,d=t.getWindow();f&&d.clearTimeout(f),Nt.isTabbing=!0,Nt._isTabbingTimer=d.setTimeout(()=>{delete Nt._isTabbingTimer,Nt.isTabbing=!1},0);const p=r.modalizer,h=r.groupper,g=r.mover,v=y=>{var m;if(u=y.findNextTabbable(o,i,a,s),o&&!(u!=null&&u.element)){const w=y!==p&&((m=y.getElement())===null||m===void 0?void 0:m.parentElement);if(w){const E=Vr.getTabsterContext(t,o,{referenceElement:w});if(E){const x=y.getElement(),k=a?x:x&&Iy(x)||x;k&&(u=Nt.findNextTabbable(t,E,n,k,w,a,s),u&&(u.outOfDOMOrder=!0))}}}};if(h&&g)v(r.groupperBeforeMover?h:g);else if(h)v(h);else if(g)v(g);else if(p)v(p);else{const y={container:l,currentElement:o,referenceElement:i,ignoreAccessibility:s,useActiveModalizer:!0},m={};u={element:t.focusable[a?"findPrev":"findNext"](y,m),outOfDOMOrder:m.outOfDOMOrder,uncontrolled:m.uncontrolled}}return u}}Nt.isTabbing=!1;/*!
146
146
  * Copyright (c) Microsoft Corporation. All rights reserved.
147
147
  * Licensed under the MIT License.
148
- */class cM extends Py{constructor(t){super(),this._onChange=r=>{this.setVal(r,void 0)},this._keyborg=D7(t()),this._keyborg.subscribe(this._onChange)}dispose(){super.dispose(),this._keyborg&&(this._keyborg.unsubscribe(this._onChange),L7(this._keyborg),delete this._keyborg)}setNavigatingWithKeyboard(t){var r;(r=this._keyborg)===null||r===void 0||r.setVal(t)}isNavigatingWithKeyboard(){var t;return!!(!((t=this._keyborg)===null||t===void 0)&&t.isNavigatingWithKeyboard())}}/*!
148
+ */class fM extends Ny{constructor(t){super(),this._onChange=r=>{this.setVal(r,void 0)},this._keyborg=M7(t()),this._keyborg.subscribe(this._onChange)}dispose(){super.dispose(),this._keyborg&&(this._keyborg.unsubscribe(this._onChange),F7(this._keyborg),delete this._keyborg)}setNavigatingWithKeyboard(t){var r;(r=this._keyborg)===null||r===void 0||r.setVal(t)}isNavigatingWithKeyboard(){var t;return!!(!((t=this._keyborg)===null||t===void 0)&&t.isNavigatingWithKeyboard())}}/*!
149
149
  * Copyright (c) Microsoft Corporation. All rights reserved.
150
150
  * Licensed under the MIT License.
151
- */function uM(e,t,r,n){if(typeof MutationObserver>"u")return()=>{};const o=t.getWindow;let i;const a=f=>{var d,p,h,g,v;for(const y of f){const m=y.target,w=y.removedNodes,E=y.addedNodes;if(y.type==="attributes")y.attributeName===En&&r(t,m);else{for(let x=0;x<w.length;x++)s(w[x],!0),(p=(d=t._dummyObserver).domChanged)===null||p===void 0||p.call(d,m);for(let x=0;x<E.length;x++)s(E[x]),(g=(h=t._dummyObserver).domChanged)===null||g===void 0||g.call(h,m)}}(v=t.modalizer)===null||v===void 0||v.hiddenUpdate()};function s(f,d){i||(i=Qn(o).elementByUId),l(f,d);const p=$y(e,f,h=>l(h,d));if(p)for(;p.nextNode(););}function l(f,d){var p;if(!f.getAttribute)return NodeFilter.FILTER_SKIP;const h=f.__tabsterElementUID;return h&&i&&(d?delete i[h]:(p=i[h])!==null&&p!==void 0||(i[h]=new xn(o,f))),(Zn(t,f)||f.hasAttribute(En))&&r(t,f,d),NodeFilter.FILTER_SKIP}const u=new MutationObserver(a);return n&&s(o().document.body),u.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[En]}),()=>{u.disconnect()}}/*!
151
+ */function dM(e,t,r,n){if(typeof MutationObserver>"u")return()=>{};const o=t.getWindow;let i;const a=f=>{var d,p,h,g,v;for(const y of f){const m=y.target,w=y.removedNodes,E=y.addedNodes;if(y.type==="attributes")y.attributeName===xn&&r(t,m);else{for(let x=0;x<w.length;x++)s(w[x],!0),(p=(d=t._dummyObserver).domChanged)===null||p===void 0||p.call(d,m);for(let x=0;x<E.length;x++)s(E[x]),(g=(h=t._dummyObserver).domChanged)===null||g===void 0||g.call(h,m)}}(v=t.modalizer)===null||v===void 0||v.hiddenUpdate()};function s(f,d){i||(i=eo(o).elementByUId),l(f,d);const p=Ay(e,f,h=>l(h,d));if(p)for(;p.nextNode(););}function l(f,d){var p;if(!f.getAttribute)return NodeFilter.FILTER_SKIP;const h=f.__tabsterElementUID;return h&&i&&(d?delete i[h]:(p=i[h])!==null&&p!==void 0||(i[h]=new Sn(o,f))),(Qn(t,f)||f.hasAttribute(xn))&&r(t,f,d),NodeFilter.FILTER_SKIP}const u=new MutationObserver(a);return n&&s(o().document.body),u.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[xn]}),()=>{u.disconnect()}}/*!
152
152
  * Copyright (c) Microsoft Corporation. All rights reserved.
153
153
  * Licensed under the MIT License.
154
- */class fM{constructor(t){this._isUncontrolledCompletely=t}isUncontrolledCompletely(t,r){var n;const o=(n=this._isUncontrolledCompletely)===null||n===void 0?void 0:n.call(this,t,r);return o===void 0?r:o}}/*!
154
+ */class pM{constructor(t){this._isUncontrolledCompletely=t}isUncontrolledCompletely(t,r){var n;const o=(n=this._isUncontrolledCompletely)===null||n===void 0?void 0:n.call(this,t,r);return o===void 0?r:o}}/*!
155
155
  * Copyright (c) Microsoft Corporation. All rights reserved.
156
156
  * Licensed under the MIT License.
157
- */class dM{constructor(t){this.keyboardNavigation=t.keyboardNavigation,this.focusedElement=t.focusedElement,this.focusable=t.focusable,this.root=t.root,this.uncontrolled=t.uncontrolled,this.core=t}}class pM{constructor(t,r){var n,o;this._forgetMemorizedElements=[],this._wrappers=new Set,this._initQueue=[],this._version="5.2.0",this._noop=!1,this.getWindow=()=>{if(!this._win)throw new Error("Using disposed Tabster.");return this._win},this._storage=H7(t),this._win=t;const i=this.getWindow;this.keyboardNavigation=new cM(i),this.focusedElement=new kt(this,i),this.focusable=new aM(this),this.root=new Hr(this,r==null?void 0:r.autoRoot),this.uncontrolled=new fM((r==null?void 0:r.checkUncontrolledCompletely)||(r==null?void 0:r.checkUncontrolledTrappingFocus)),this.controlTab=(n=r==null?void 0:r.controlTab)!==null&&n!==void 0?n:!0,this.rootDummyInputs=!!(r!=null&&r.rootDummyInputs),this._dummyObserver=new eM(i),this.getParent=(o=r==null?void 0:r.getParent)!==null&&o!==void 0?o:a=>a.parentElement,this.internal={stopObserver:()=>{this._unobserve&&(this._unobserve(),delete this._unobserve)},resumeObserver:a=>{if(!this._unobserve){const s=i().document;this._unobserve=uM(s,this,_y,a)}}},Sy(i),this.queueInit(()=>{this.internal.resumeObserver(!0)})}_mergeProps(t){var r;t&&(this.getParent=(r=t.getParent)!==null&&r!==void 0?r:this.getParent)}createTabster(t,r){const n=new dM(this);return t||this._wrappers.add(n),this._mergeProps(r),n}disposeTabster(t,r){r?this._wrappers.clear():this._wrappers.delete(t),this._wrappers.size===0&&this.dispose()}dispose(){var t,r,n,o,i,a,s,l;this.internal.stopObserver();const u=this._win;u==null||u.clearTimeout(this._initTimer),delete this._initTimer,this._initQueue=[],this._forgetMemorizedElements=[],u&&this._forgetMemorizedTimer&&(u.clearTimeout(this._forgetMemorizedTimer),delete this._forgetMemorizedTimer),(t=this.outline)===null||t===void 0||t.dispose(),(r=this.crossOrigin)===null||r===void 0||r.dispose(),(n=this.deloser)===null||n===void 0||n.dispose(),(o=this.groupper)===null||o===void 0||o.dispose(),(i=this.mover)===null||i===void 0||i.dispose(),(a=this.modalizer)===null||a===void 0||a.dispose(),(s=this.observedElement)===null||s===void 0||s.dispose(),(l=this.restorer)===null||l===void 0||l.dispose(),this.keyboardNavigation.dispose(),this.focusable.dispose(),this.focusedElement.dispose(),this.root.dispose(),this._dummyObserver.dispose(),z7(this.getWindow),Ay(this.getWindow),this._storage=new WeakMap,this._wrappers.clear(),u&&(W7(u),delete u.__tabsterInstance,delete this._win)}storageEntry(t,r){const n=this._storage;let o=n.get(t);return o?r===!1&&Object.keys(o).length===0&&n.delete(t):r===!0&&(o={},n.set(t,o)),o}forceCleanup(){this._win&&(this._forgetMemorizedElements.push(this._win.document.body),!this._forgetMemorizedTimer&&(this._forgetMemorizedTimer=this._win.setTimeout(()=>{delete this._forgetMemorizedTimer;for(let t=this._forgetMemorizedElements.shift();t;t=this._forgetMemorizedElements.shift())Ay(this.getWindow,t),kt.forgetMemorized(this.focusedElement,t)},0),xy(this.getWindow,!0)))}queueInit(t){var r;this._win&&(this._initQueue.push(t),this._initTimer||(this._initTimer=(r=this._win)===null||r===void 0?void 0:r.setTimeout(()=>{delete this._initTimer,this.drainInitQueue()},0)))}drainInitQueue(){if(!this._win)return;const t=this._initQueue;this._initQueue=[],t.forEach(r=>r())}}function hM(e,t){let r=vM(e);return r?r.createTabster(!1,t):(r=new pM(e,t),e.__tabsterInstance=r,r.createTabster())}function gM(e,t){e.core.disposeTabster(e,t)}function vM(e){return e.__tabsterInstance}const ky=ve.createContext(void 0),mM={targetDocument:typeof document=="object"?document:void 0,dir:"ltr"};ky.Provider;function Ny(){var e;return(e=ve.useContext(ky))!==null&&e!==void 0?e:mM}function bM(){return typeof window<"u"&&!!(window.document&&window.document.createElement)}const yM=bM()?ve.useLayoutEffect:ve.useEffect;function wM(e){return e&&!!e._virtual}function _M(e){return wM(e)&&e._virtual.parent||null}function EM(e,t={}){if(!e)return null;if(!t.skipVirtual){const r=_M(e);if(r)return r}return(e==null?void 0:e.parentNode)||null}const xM=()=>{const{targetDocument:e}=Ny(),t=(e==null?void 0:e.defaultView)||void 0,r=ve.useMemo(()=>t?hM(t,{autoRoot:{},controlTab:!1,getParent:EM,checkUncontrolledTrappingFocus:n=>{var o;return!!(!((o=n.firstElementChild)===null||o===void 0)&&o.hasAttribute("data-is-focus-trap-zone-bumper"))}}):null,[t]);return yM(()=>()=>{r&&gM(r)},[r]),r},SM=()=>{const e=xM(),{targetDocument:t}=Ny(),r=ve.useCallback((s,l)=>(e==null?void 0:e.focusable.findAll({container:s,acceptCondition:l}))||[],[e]),n=ve.useCallback(s=>e==null?void 0:e.focusable.findFirst({container:s}),[e]),o=ve.useCallback(s=>e==null?void 0:e.focusable.findLast({container:s}),[e]),i=ve.useCallback((s,l={})=>{if(!e||!t)return null;const{container:u=t.body}=l;return e.focusable.findNext({currentElement:s,container:u})},[e,t]),a=ve.useCallback((s,l={})=>{if(!e||!t)return null;const{container:u=t.body}=l;return e.focusable.findPrev({currentElement:s,container:u})},[e,t]);return{findAllFocusable:r,findFirstFocusable:n,findLastFocusable:o,findNextFocusable:i,findPrevFocusable:a}},Tf="Viewport",$M="ViewportViews",Dy="ViewportView",[CM,oj]=Pr(Tf,[]),[AM,OM]=CM(Tf),Ly=({__viewportScope:e,classNames:t,children:r,defaultActiveView:n,activeView:o,focusManaged:i=!1,onActiveViewChange:a,...s})=>{const[l="never",u]=Kr({prop:o,defaultProp:n,onChange:a});return c.createElement(AM,{focusManaged:i,activeView:l,setActiveView:u,scope:e},c.createElement("div",{role:"region","aria-live":"polite",...s,className:ue("is-full overflow-hidden",t)},r))};Ly.displayName=Tf;const My=({classNames:e,children:t,...r})=>{const n={inlineSize:`${Math.ceil(t.length)*100}%`};return c.createElement("div",{role:"none",style:n,...r,className:ue("flex",e)},t)};My.displayName=$M;const Fy=c.forwardRef(({__viewportScope:e,classNames:t,children:r,id:n,...o},i)=>{const{activeView:a,focusManaged:s}=OM(Dy,e),l=n===a,u=Ol(i),{findFirstFocusable:f}=SM();return c.useEffect(()=>{var d;!s&&l&&document.body.hasAttribute("data-is-keyboard")&&u.current&&((d=f(u.current))==null||d.focus())},[s,u.current,l]),c.createElement("section",{...o,...!l&&{"aria-hidden":!0},className:ue("min-is-0 flex-1 flex flex-col",l?"order-2":"order-4 invisible",t),ref:u},r)});Fy.displayName=Dy;const st={Root:Ly,Views:My,View:Fy};c.forwardRef(({space:e,onClick:t},r)=>{const n=e.key.toHex(),o=Et("identityListItem__label"),i=is(n??"",12),a=e.properties.name??U8(e.key.toHex());return c.createElement("li",{className:ue("flex gap-2 items-center mbe-2",t&&"cursor-pointer"),onClick:()=>t==null?void 0:t(),ref:r,"data-testid":"space-list-item"},c.createElement(Tt.Root,{labelId:o},c.createElement(Tt.Frame,null,c.createElement(Tt.Fallback,{href:i})),c.createElement(Tt.Label,{classNames:"text-sm truncate"},a)))});var If={exports:{}},Pf={},qs={exports:{}},kf={};/**
157
+ */class hM{constructor(t){this.keyboardNavigation=t.keyboardNavigation,this.focusedElement=t.focusedElement,this.focusable=t.focusable,this.root=t.root,this.uncontrolled=t.uncontrolled,this.core=t}}class gM{constructor(t,r){var n,o;this._forgetMemorizedElements=[],this._wrappers=new Set,this._initQueue=[],this._version="5.2.0",this._noop=!1,this.getWindow=()=>{if(!this._win)throw new Error("Using disposed Tabster.");return this._win},this._storage=z7(t),this._win=t;const i=this.getWindow;this.keyboardNavigation=new fM(i),this.focusedElement=new Nt(this,i),this.focusable=new lM(this),this.root=new Vr(this,r==null?void 0:r.autoRoot),this.uncontrolled=new pM((r==null?void 0:r.checkUncontrolledCompletely)||(r==null?void 0:r.checkUncontrolledTrappingFocus)),this.controlTab=(n=r==null?void 0:r.controlTab)!==null&&n!==void 0?n:!0,this.rootDummyInputs=!!(r!=null&&r.rootDummyInputs),this._dummyObserver=new rM(i),this.getParent=(o=r==null?void 0:r.getParent)!==null&&o!==void 0?o:a=>a.parentElement,this.internal={stopObserver:()=>{this._unobserve&&(this._unobserve(),delete this._unobserve)},resumeObserver:a=>{if(!this._unobserve){const s=i().document;this._unobserve=dM(s,this,xy,a)}}},Cy(i),this.queueInit(()=>{this.internal.resumeObserver(!0)})}_mergeProps(t){var r;t&&(this.getParent=(r=t.getParent)!==null&&r!==void 0?r:this.getParent)}createTabster(t,r){const n=new hM(this);return t||this._wrappers.add(n),this._mergeProps(r),n}disposeTabster(t,r){r?this._wrappers.clear():this._wrappers.delete(t),this._wrappers.size===0&&this.dispose()}dispose(){var t,r,n,o,i,a,s,l;this.internal.stopObserver();const u=this._win;u==null||u.clearTimeout(this._initTimer),delete this._initTimer,this._initQueue=[],this._forgetMemorizedElements=[],u&&this._forgetMemorizedTimer&&(u.clearTimeout(this._forgetMemorizedTimer),delete this._forgetMemorizedTimer),(t=this.outline)===null||t===void 0||t.dispose(),(r=this.crossOrigin)===null||r===void 0||r.dispose(),(n=this.deloser)===null||n===void 0||n.dispose(),(o=this.groupper)===null||o===void 0||o.dispose(),(i=this.mover)===null||i===void 0||i.dispose(),(a=this.modalizer)===null||a===void 0||a.dispose(),(s=this.observedElement)===null||s===void 0||s.dispose(),(l=this.restorer)===null||l===void 0||l.dispose(),this.keyboardNavigation.dispose(),this.focusable.dispose(),this.focusedElement.dispose(),this.root.dispose(),this._dummyObserver.dispose(),K7(this.getWindow),Ty(this.getWindow),this._storage=new WeakMap,this._wrappers.clear(),u&&(V7(u),delete u.__tabsterInstance,delete this._win)}storageEntry(t,r){const n=this._storage;let o=n.get(t);return o?r===!1&&Object.keys(o).length===0&&n.delete(t):r===!0&&(o={},n.set(t,o)),o}forceCleanup(){this._win&&(this._forgetMemorizedElements.push(this._win.document.body),!this._forgetMemorizedTimer&&(this._forgetMemorizedTimer=this._win.setTimeout(()=>{delete this._forgetMemorizedTimer;for(let t=this._forgetMemorizedElements.shift();t;t=this._forgetMemorizedElements.shift())Ty(this.getWindow,t),Nt.forgetMemorized(this.focusedElement,t)},0),$y(this.getWindow,!0)))}queueInit(t){var r;this._win&&(this._initQueue.push(t),this._initTimer||(this._initTimer=(r=this._win)===null||r===void 0?void 0:r.setTimeout(()=>{delete this._initTimer,this.drainInitQueue()},0)))}drainInitQueue(){if(!this._win)return;const t=this._initQueue;this._initQueue=[],t.forEach(r=>r())}}function vM(e,t){let r=bM(e);return r?r.createTabster(!1,t):(r=new gM(e,t),e.__tabsterInstance=r,r.createTabster())}function mM(e,t){e.core.disposeTabster(e,t)}function bM(e){return e.__tabsterInstance}const Dy=ve.createContext(void 0),yM={targetDocument:typeof document=="object"?document:void 0,dir:"ltr"};Dy.Provider;function Ly(){var e;return(e=ve.useContext(Dy))!==null&&e!==void 0?e:yM}function wM(){return typeof window<"u"&&!!(window.document&&window.document.createElement)}const _M=wM()?ve.useLayoutEffect:ve.useEffect;function EM(e){return e&&!!e._virtual}function xM(e){return EM(e)&&e._virtual.parent||null}function SM(e,t={}){if(!e)return null;if(!t.skipVirtual){const r=xM(e);if(r)return r}return(e==null?void 0:e.parentNode)||null}const $M=()=>{const{targetDocument:e}=Ly(),t=(e==null?void 0:e.defaultView)||void 0,r=ve.useMemo(()=>t?vM(t,{autoRoot:{},controlTab:!1,getParent:SM,checkUncontrolledTrappingFocus:n=>{var o;return!!(!((o=n.firstElementChild)===null||o===void 0)&&o.hasAttribute("data-is-focus-trap-zone-bumper"))}}):null,[t]);return _M(()=>()=>{r&&mM(r)},[r]),r},CM=()=>{const e=$M(),{targetDocument:t}=Ly(),r=ve.useCallback((s,l)=>(e==null?void 0:e.focusable.findAll({container:s,acceptCondition:l}))||[],[e]),n=ve.useCallback(s=>e==null?void 0:e.focusable.findFirst({container:s}),[e]),o=ve.useCallback(s=>e==null?void 0:e.focusable.findLast({container:s}),[e]),i=ve.useCallback((s,l={})=>{if(!e||!t)return null;const{container:u=t.body}=l;return e.focusable.findNext({currentElement:s,container:u})},[e,t]),a=ve.useCallback((s,l={})=>{if(!e||!t)return null;const{container:u=t.body}=l;return e.focusable.findPrev({currentElement:s,container:u})},[e,t]);return{findAllFocusable:r,findFirstFocusable:n,findLastFocusable:o,findNextFocusable:i,findPrevFocusable:a}},If="Viewport",AM="ViewportViews",My="ViewportView",[OM,aj]=kr(If,[]),[TM,IM]=OM(If),Fy=({__viewportScope:e,classNames:t,children:r,defaultActiveView:n,activeView:o,focusManaged:i=!1,onActiveViewChange:a,...s})=>{const[l="never",u]=qr({prop:o,defaultProp:n,onChange:a});return c.createElement(TM,{focusManaged:i,activeView:l,setActiveView:u,scope:e},c.createElement("div",{role:"region","aria-live":"polite",...s,className:ue("is-full overflow-hidden",t)},r))};Fy.displayName=If;const jy=({classNames:e,children:t,...r})=>{const n={inlineSize:`${Math.ceil(t.length)*100}%`};return c.createElement("div",{role:"none",style:n,...r,className:ue("flex",e)},t)};jy.displayName=AM;const By=c.forwardRef(({__viewportScope:e,classNames:t,children:r,id:n,...o},i)=>{const{activeView:a,focusManaged:s}=IM(My,e),l=n===a,u=Tl(i),{findFirstFocusable:f}=CM();return c.useEffect(()=>{var d;!s&&l&&document.body.hasAttribute("data-is-keyboard")&&u.current&&((d=f(u.current))==null||d.focus())},[s,u.current,l]),c.createElement("section",{...o,...!l&&{"aria-hidden":!0},className:ue("min-is-0 flex-1 flex flex-col",l?"order-2":"order-4 invisible",t),ref:u},r)});By.displayName=My;const lt={Root:Fy,Views:jy,View:By};c.forwardRef(({space:e,onClick:t},r)=>{const n=e.key.toHex(),o=xt("identityListItem__label"),i=as(n??"",12),a=e.properties.name??H8(e.key.toHex());return c.createElement("li",{className:ue("flex gap-2 items-center mbe-2",t&&"cursor-pointer"),onClick:()=>t==null?void 0:t(),ref:r,"data-testid":"space-list-item"},c.createElement(It.Root,{labelId:o},c.createElement(It.Frame,null,c.createElement(It.Fallback,{href:i})),c.createElement(It.Label,{classNames:"text-sm truncate"},a)))});var Pf={exports:{}},kf={},Ys={exports:{}},Nf={};/**
158
158
  * @license React
159
159
  * use-sync-external-store-shim.development.js
160
160
  *
@@ -162,7 +162,7 @@ ${gD()}`,n,o),e.method=oD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
162
162
  *
163
163
  * This source code is licensed under the MIT license found in the
164
164
  * LICENSE file in the root directory of this source tree.
165
- */var jy;function TM(){return jy||(jy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=c,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(E){{for(var x=arguments.length,k=new Array(x>1?x-1:0),I=1;I<x;I++)k[I-1]=arguments[I];n("error",E,k)}}function n(E,x,k){{var I=t.ReactDebugCurrentFrame,S=I.getStackAddendum();S!==""&&(x+="%s",k=k.concat([S]));var C=k.map(function(P){return String(P)});C.unshift("Warning: "+x),Function.prototype.apply.call(console[E],console,C)}}function o(E,x){return E===x&&(E!==0||1/E===1/x)||E!==E&&x!==x}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,f=!1,d=!1;function p(E,x,k){f||e.startTransition!==void 0&&(f=!0,r("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 I=x();if(!d){var S=x();i(I,S)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var C=a({inst:{value:I,getSnapshot:x}}),P=C[0].inst,F=C[1];return l(function(){P.value=I,P.getSnapshot=x,h(P)&&F({inst:P})},[E,I,x]),s(function(){h(P)&&F({inst:P});var D=function(){h(P)&&F({inst:P})};return E(D)},[E]),u(I),I}function h(E){var x=E.getSnapshot,k=E.value;try{var I=x();return!i(k,I)}catch{return!0}}function g(E,x,k){return x()}var v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!v,m=y?g:p,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m;kf.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),kf}var Nf={};/**
165
+ */var Ry;function PM(){return Ry||(Ry=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=c,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(E){{for(var x=arguments.length,k=new Array(x>1?x-1:0),I=1;I<x;I++)k[I-1]=arguments[I];n("error",E,k)}}function n(E,x,k){{var I=t.ReactDebugCurrentFrame,S=I.getStackAddendum();S!==""&&(x+="%s",k=k.concat([S]));var C=k.map(function(P){return String(P)});C.unshift("Warning: "+x),Function.prototype.apply.call(console[E],console,C)}}function o(E,x){return E===x&&(E!==0||1/E===1/x)||E!==E&&x!==x}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,f=!1,d=!1;function p(E,x,k){f||e.startTransition!==void 0&&(f=!0,r("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 I=x();if(!d){var S=x();i(I,S)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var C=a({inst:{value:I,getSnapshot:x}}),P=C[0].inst,F=C[1];return l(function(){P.value=I,P.getSnapshot=x,h(P)&&F({inst:P})},[E,I,x]),s(function(){h(P)&&F({inst:P});var D=function(){h(P)&&F({inst:P})};return E(D)},[E]),u(I),I}function h(E){var x=E.getSnapshot,k=E.value;try{var I=x();return!i(k,I)}catch{return!0}}function g(E,x,k){return x()}var v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!v,m=y?g:p,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m;Nf.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Nf}var Df={};/**
166
166
  * @license React
167
167
  * use-sync-external-store-shim.production.min.js
168
168
  *
@@ -170,7 +170,7 @@ ${gD()}`,n,o),e.method=oD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
170
170
  *
171
171
  * This source code is licensed under the MIT license found in the
172
172
  * LICENSE file in the root directory of this source tree.
173
- */var By;function IM(){if(By)return Nf;By=1;var e=c;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var h=p(),g=n({inst:{value:h,getSnapshot:p}}),v=g[0].inst,y=g[1];return i(function(){v.value=h,v.getSnapshot=p,l(v)&&y({inst:v})},[d,h,p]),o(function(){return l(v)&&y({inst:v}),d(function(){l(v)&&y({inst:v})})},[d]),a(h),h}function l(d){var p=d.getSnapshot;d=d.value;try{var h=p();return!r(d,h)}catch{return!0}}function u(d,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Nf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Nf}var Ry;function Uy(){return Ry||(Ry=1,process.env.NODE_ENV==="production"?qs.exports=IM():qs.exports=TM()),qs.exports}/**
173
+ */var Uy;function kM(){if(Uy)return Df;Uy=1;var e=c;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var h=p(),g=n({inst:{value:h,getSnapshot:p}}),v=g[0].inst,y=g[1];return i(function(){v.value=h,v.getSnapshot=p,l(v)&&y({inst:v})},[d,h,p]),o(function(){return l(v)&&y({inst:v}),d(function(){l(v)&&y({inst:v})})},[d]),a(h),h}function l(d){var p=d.getSnapshot;d=d.value;try{var h=p();return!r(d,h)}catch{return!0}}function u(d,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Df.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Df}var Wy;function Hy(){return Wy||(Wy=1,process.env.NODE_ENV==="production"?Ys.exports=kM():Ys.exports=PM()),Ys.exports}/**
174
174
  * @license React
175
175
  * use-sync-external-store-shim/with-selector.development.js
176
176
  *
@@ -178,7 +178,7 @@ ${gD()}`,n,o),e.method=oD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
178
178
  *
179
179
  * This source code is licensed under the MIT license found in the
180
180
  * LICENSE file in the root directory of this source tree.
181
- */var Wy;function PM(){return Wy||(Wy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=c,t=Uy();function r(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(f,d,p,h,g){var v=i(null),y;v.current===null?(y={hasValue:!1,value:null},v.current=y):y=v.current;var m=s(function(){var k=!1,I,S,C=function(N){if(!k){k=!0,I=N;var J=h(N);if(g!==void 0&&y.hasValue){var K=y.value;if(g(K,J))return S=K,K}return S=J,J}var Y=I,te=S;if(n(Y,N))return te;var oe=h(N);return g!==void 0&&g(te,oe)?te:(I=N,S=oe,oe)},P=p===void 0?null:p,F=function(){return C(d())},D=P===null?void 0:function(){return C(P())};return[F,D]},[d,p,h,g]),w=m[0],E=m[1],x=o(f,w,E);return a(function(){y.hasValue=!0,y.value=x},[x]),l(x),x}Pf.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Pf}var Df={};/**
181
+ */var Vy;function NM(){return Vy||(Vy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=c,t=Hy();function r(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(f,d,p,h,g){var v=i(null),y;v.current===null?(y={hasValue:!1,value:null},v.current=y):y=v.current;var m=s(function(){var k=!1,I,S,C=function(N){if(!k){k=!0,I=N;var J=h(N);if(g!==void 0&&y.hasValue){var K=y.value;if(g(K,J))return S=K,K}return S=J,J}var Y=I,te=S;if(n(Y,N))return te;var oe=h(N);return g!==void 0&&g(te,oe)?te:(I=N,S=oe,oe)},P=p===void 0?null:p,F=function(){return C(d())},D=P===null?void 0:function(){return C(P())};return[F,D]},[d,p,h,g]),w=m[0],E=m[1],x=o(f,w,E);return a(function(){y.hasValue=!0,y.value=x},[x]),l(x),x}kf.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),kf}var Lf={};/**
182
182
  * @license React
183
183
  * use-sync-external-store-shim/with-selector.production.min.js
184
184
  *
@@ -186,7 +186,7 @@ ${gD()}`,n,o),e.method=oD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
186
186
  *
187
187
  * This source code is licensed under the MIT license found in the
188
188
  * LICENSE file in the root directory of this source tree.
189
- */var Hy;function kM(){if(Hy)return Df;Hy=1;var e=c,t=Uy();function r(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Df.useSyncExternalStoreWithSelector=function(u,f,d,p,h){var g=i(null);if(g.current===null){var v={hasValue:!1,value:null};g.current=v}else v=g.current;g=s(function(){function m(I){if(!w){if(w=!0,E=I,I=p(I),h!==void 0&&v.hasValue){var S=v.value;if(h(S,I))return x=S}return x=I}if(S=x,n(E,I))return S;var C=p(I);return h!==void 0&&h(S,C)?S:(E=I,x=C)}var w=!1,E,x,k=d===void 0?null:d;return[function(){return m(f())},k===null?void 0:function(){return m(k())}]},[f,d,p,h]);var y=o(u,g[0],g[1]);return a(function(){v.hasValue=!0,v.value=y},[y]),l(y),y},Df}process.env.NODE_ENV==="production"?If.exports=kM():If.exports=PM();var NM=If.exports;/*! *****************************************************************************
189
+ */var zy;function DM(){if(zy)return Lf;zy=1;var e=c,t=Hy();function r(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Lf.useSyncExternalStoreWithSelector=function(u,f,d,p,h){var g=i(null);if(g.current===null){var v={hasValue:!1,value:null};g.current=v}else v=g.current;g=s(function(){function m(I){if(!w){if(w=!0,E=I,I=p(I),h!==void 0&&v.hasValue){var S=v.value;if(h(S,I))return x=S}return x=I}if(S=x,n(E,I))return S;var C=p(I);return h!==void 0&&h(S,C)?S:(E=I,x=C)}var w=!1,E,x,k=d===void 0?null:d;return[function(){return m(f())},k===null?void 0:function(){return m(k())}]},[f,d,p,h]);var y=o(u,g[0],g[1]);return a(function(){v.hasValue=!0,v.value=y},[y]),l(y),y},Lf}process.env.NODE_ENV==="production"?Pf.exports=DM():Pf.exports=NM();var LM=Pf.exports;/*! *****************************************************************************
190
190
  Copyright (c) Microsoft Corporation.
191
191
 
192
192
  Permission to use, copy, modify, and/or distribute this software for any
@@ -199,12 +199,12 @@ ${gD()}`,n,o),e.method=oD(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEa
199
199
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
200
200
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
201
201
  PERFORMANCE OF THIS SOFTWARE.
202
- ***************************************************************************** */var ye=function(){return ye=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ye.apply(this,arguments)};function Lf(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Ke(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Qe(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function vt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var ut;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(ut||(ut={}));var Ro;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(Ro||(Ro={}));var Mf=ut.Start,Ff=ut.Stop,qi=ut.Raise,Ys=ut.Send,Vy=ut.Cancel,DM=ut.NullEvent,jf=ut.Assign;ut.After,ut.DoneState;var zy=ut.Log,LM=ut.Init,Bf=ut.Invoke;ut.ErrorExecution;var Gy=ut.ErrorPlatform,MM=ut.ErrorCustom,Ky=ut.Update,FM=ut.Choose,jM=ut.Pure,qy=".",Yy={},Rf="xstate.guard",BM="",$t=process.env.NODE_ENV==="production",Js;function Uf(e,t,r){r===void 0&&(r=qy);var n=Yi(e,r),o=Yi(t,r);return et(o)?et(n)?o===n:!1:et(n)?n in o:Object.keys(n).every(function(i){return i in o?Uf(n[i],o[i]):!1})}function Jy(e){try{return et(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Wf(e,t){try{return Uo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function RM(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Yi(e,t){if(RM(e))return e.value;if(Uo(e))return Xs(e);if(typeof e!="string")return e;var r=Wf(e,t);return Xs(r)}function Xs(e){if(e.length===1)return e[0];for(var t={},r=t,n=0;n<e.length-1;n++)n===e.length-2?r[e[n]]=e[n+1]:(r[e[n]]={},r=r[e[n]]);return t}function Ji(e,t){for(var r={},n=Object.keys(e),o=0;o<n.length;o++){var i=n[o];r[i]=t(e[i],i,e,o)}return r}function Xy(e,t,r){var n,o,i={};try{for(var a=Ke(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];r(u)&&(i[l]=t(u,l,e))}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}var UM=function(e){return function(t){var r,n,o=t;try{for(var i=Ke(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}};function WM(e,t){return function(r){var n,o,i=r;try{for(var a=Ke(e),s=a.next();!s.done;s=a.next()){var l=s.value;i=i[t][l]}}catch(u){n={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}}function Zs(e){if(!e)return[[]];if(et(e))return[[e]];var t=_t(Object.keys(e).map(function(r){var n=e[r];return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:Zs(e[r]).map(function(o){return[r].concat(o)})}));return t}function _t(e){var t;return(t=[]).concat.apply(t,vt([],Qe(e),!1))}function Zy(e){return Uo(e)?e:[e]}function xr(e){return e===void 0?[]:Zy(e)}function Qs(e,t,r){var n,o;if(nt(e))return e(t,r.data);var i={};try{for(var a=Ke(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];nt(u)?i[l]=u(t,r.data):i[l]=u}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}function HM(e){return/^(done|error)\./.test(e)}function Qy(e){return!!(e instanceof Promise||e!==null&&(nt(e)||typeof e=="object")&&nt(e.then))}function VM(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function zM(e,t){var r,n,o=Qe([[],[]],2),i=o[0],a=o[1];try{for(var s=Ke(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?i.push(u):a.push(u)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[i,a]}function e1(e,t){return Ji(e.states,function(r,n){if(r){var o=(et(t)?void 0:t[n])||(r?r.current:void 0);if(o)return{current:o,states:e1(r,o)}}})}function GM(e,t){return{current:t,states:e1(e,t)}}function t1(e,t,r,n){$t||Lt(!!e,"Attempting to update undefined context");var o=e&&r.reduce(function(i,a){var s,l,u=a.assignment,f={state:n,action:a,_event:t},d={};if(nt(u))d=u(i,t.data,f);else try{for(var p=Ke(Object.keys(u)),h=p.next();!h.done;h=p.next()){var g=h.value,v=u[g];d[g]=nt(v)?v(i,t.data,f):v}}catch(y){s={error:y}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}return Object.assign({},i,d)},e);return o}var Lt=function(){};$t||(Lt=function(e,t){var r=e instanceof Error?e:void 0;if(!(!r&&e)&&console!==void 0){var n=["Warning: ".concat(t)];r&&n.push(r),console.warn.apply(console,n)}});function Uo(e){return Array.isArray(e)}function nt(e){return typeof e=="function"}function et(e){return typeof e=="string"}function r1(e,t){if(e)return et(e)?{type:Rf,name:e,predicate:t?t[e]:void 0}:nt(e)?{type:Rf,name:e.name,predicate:e}:e}function KM(e){try{return"subscribe"in e&&nt(e.subscribe)}catch{return!1}}var $n=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Js={},Js[$n]=function(){return this},Js[Symbol.observable]=function(){return this};function eo(e){return!!e&&"__xstatenode"in e}function qM(e){return!!e&&typeof e.send=="function"}function el(e,t){return et(e)||typeof e=="number"?ye({type:e},t):e}function Mt(e,t){if(!et(e)&&"$$type"in e&&e.$$type==="scxml")return e;var r=el(e);return ye({name:r.type,data:r,$$type:"scxml",type:"external"},t)}function Wo(e,t){var r=Zy(t).map(function(n){return typeof n>"u"||typeof n=="string"||eo(n)?{target:n,event:e}:ye(ye({},n),{event:e})});return r}function YM(e){if(!(e===void 0||e===BM))return xr(e)}function JM(e,t,r){if(!$t){var n=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(r,"', error was '").concat(e,"'.").concat(n));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(r,"'. ")+"Original error: '".concat(e,"'. ").concat(n," Current error is '").concat(t,"'.").concat(o))}}}function n1(e,t,r,n,o){var i=e.options.guards,a={state:o,cond:t,_event:n};if(t.type===Rf)return((i==null?void 0:i[t.name])||t.predicate)(r,n.data,a);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(r,n.data,a)}function o1(e){return typeof e=="string"?{type:e}:e}function tl(e,t,r){var n=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||n).bind(i),error:((o?e.error:t)||n).bind(i),complete:((o?e.complete:r)||n).bind(i)}}function rl(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Hf(e){return(e.type===qi||e.type===Ys&&e.to===Ro.Internal)&&typeof e.delay!="number"}var Ho=Mt({type:LM});function Vf(e,t){return t&&t[e]||void 0}function Xi(e,t){var r;if(et(e)||typeof e=="number"){var n=Vf(e,t);nt(n)?r={type:e,exec:n}:n?r=n:r={type:e,exec:void 0}}else if(nt(e))r={type:e.name||e.toString(),exec:e};else{var n=Vf(e.type,t);if(nt(n))r=ye(ye({},e),{exec:n});else if(n){var o=n.type||e.type;r=ye(ye(ye({},n),e),{type:o})}else r=e}return r}var Cn=function(e,t){if(!e)return[];var r=Uo(e)?e:[e];return r.map(function(n){return Xi(n,t)})};function zf(e){var t=Xi(e);return ye(ye({id:et(e)?e:t.id},t),{type:t.type})}function XM(e,t){return{type:qi,event:typeof e=="function"?e:el(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function ZM(e,t,r,n){var o={_event:r},i=Mt(nt(e.event)?e.event(t,r.data,o):e.event),a;if(et(e.delay)){var s=n&&n[e.delay];a=nt(s)?s(t,r.data,o):s}else a=nt(e.delay)?e.delay(t,r.data,o):e.delay;return ye(ye({},e),{type:qi,_event:i,delay:a})}function QM(e,t){return{to:t?t.to:void 0,type:Ys,event:nt(e)?e:el(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:nt(e)?e.name:Jy(e)}}function eF(e,t,r,n){var o={_event:r},i=Mt(nt(e.event)?e.event(t,r.data,o):e.event),a;if(et(e.delay)){var s=n&&n[e.delay];a=nt(s)?s(t,r.data,o):s}else a=nt(e.delay)?e.delay(t,r.data,o):e.delay;var l=nt(e.to)?e.to(t,r.data,o):e.to;return ye(ye({},e),{to:l,_event:i,event:i.data,delay:a})}var tF=function(e,t,r){return ye(ye({},e),{value:et(e.expr)?e.expr:e.expr(t,r.data,{_event:r})})},rF=function(e){return{type:Vy,sendId:e}};function nF(e){var t=zf(e);return{type:ut.Start,activity:t,exec:void 0}}function oF(e){var t=nt(e)?e:zf(e);return{type:ut.Stop,activity:t,exec:void 0}}function iF(e,t,r){var n=nt(e.activity)?e.activity(t,r.data):e.activity,o=typeof n=="string"?{id:n}:n,i={type:ut.Stop,activity:o};return i}var aF=function(e){return{type:jf,assignment:e}};function sF(e,t){var r=t?"#".concat(t):"";return"".concat(ut.After,"(").concat(e,")").concat(r)}function nl(e,t){var r="".concat(ut.DoneState,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function ol(e,t){var r="".concat(ut.DoneInvoke,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function Zi(e,t){var r="".concat(ut.ErrorPlatform,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}var lF=function(e){var t,r,n=[];try{for(var o=Ke(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===jf){n.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n};function il(e,t,r,n,o,i,a){a===void 0&&(a=!1);var s=a?[]:lF(o),l=s.length?t1(r,n,s,t):r,u=a?[r]:void 0,f=[];function d(g,v){var y;switch(v.type){case qi:{var m=ZM(v,l,n,e.options.delays);return i&&typeof m.delay=="number"&&i(m,l,n),m}case Ys:var w=eF(v,l,n,e.options.delays);if(!$t){var E=v.delay;Lt(!et(E)||typeof w.delay=="number","No delay reference for delay expression '".concat(E,"' was found on machine '").concat(e.id,"'"))}return i&&w.to!==Ro.Internal&&(g==="entry"?f.push(w):i(w,l,n)),w;case zy:{var x=tF(v,l,n);return i==null||i(x,l,n),x}case FM:{var k=v,I=(y=k.conds.find(function(oe){var le=r1(oe.cond,e.options.guards);return!le||n1(e,le,l,n,i?void 0:t)}))===null||y===void 0?void 0:y.actions;if(!I)return[];var S=Qe(il(e,t,l,n,[{type:g,actions:Cn(xr(I),e.options.actions)}],i,a),2),C=S[0],P=S[1];return l=P,u==null||u.push(l),C}case jM:{var I=v.get(l,n.data);if(!I)return[];var F=Qe(il(e,t,l,n,[{type:g,actions:Cn(xr(I),e.options.actions)}],i,a),2),D=F[0],N=F[1];return l=N,u==null||u.push(l),D}case Ff:{var x=iF(v,l,n);return i==null||i(x,r,n),x}case jf:{l=t1(l,n,[v],i?void 0:t),u==null||u.push(l);break}default:var J=Xi(v,e.options.actions),K=J.exec;if(i)i(J,l,n);else if(K&&u){var Y=u.length-1,te=ye(ye({},J),{exec:function(oe){for(var le=[],ae=1;ae<arguments.length;ae++)le[ae-1]=arguments[ae];K.apply(void 0,vt([u[Y]],Qe(le),!1))}});J=te}return J}}function p(g){var v,y,m=[];try{for(var w=Ke(g.actions),E=w.next();!E.done;E=w.next()){var x=E.value,k=d(g.type,x);k&&(m=m.concat(k))}}catch(I){v={error:I}}finally{try{E&&!E.done&&(y=w.return)&&y.call(w)}finally{if(v)throw v.error}}return f.forEach(function(I){i(I,l,n)}),f.length=0,m}var h=_t(o.map(p));return[h,l]}var i1=[],Vo=function(e,t){i1.push(e);var r=t(e);return i1.pop(),r};function a1(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[$n]=function(){return this},t}function cF(e,t,r,n){var o,i=o1(e.src),a=(o=t==null?void 0:t.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?Qs(e.data,r,n):void 0,l=a?s1(a,e.id,s):a1(e.id);return l.meta=e,l}function s1(e,t,r){var n=a1(t);if(n.deferred=!0,eo(e)){var o=n.state=Vo(void 0,function(){return(r?e.withContext(r):e).initialState});n.getSnapshot=function(){return o}}return n}function uF(e){try{return typeof e.send=="function"}catch{return!1}}function fF(e){return uF(e)&&"id"in e}function dF(e){var t;return ye((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[$n]=function(){return this},t),e)}var al=function(e){return e.type==="atomic"||e.type==="final"};function l1(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function Qi(e){return l1(e).filter(function(t){return t.type!=="history"})}function c1(e){var t=[e];return al(e)?t:t.concat(_t(Qi(e).map(c1)))}function ea(e,t){var r,n,o,i,a,s,l,u,f=new Set(e),d=Gf(f),p=new Set(t);try{for(var h=Ke(p),g=h.next();!g.done;g=h.next())for(var v=g.value,y=v.parent;y&&!p.has(y);)p.add(y),y=y.parent}catch(P){r={error:P}}finally{try{g&&!g.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}var m=Gf(p);try{for(var w=Ke(p),E=w.next();!E.done;E=w.next()){var v=E.value;if(v.type==="compound"&&(!m.get(v)||!m.get(v).length))d.get(v)?d.get(v).forEach(function(F){return p.add(F)}):v.initialStateNodes.forEach(function(F){return p.add(F)});else if(v.type==="parallel")try{for(var x=(a=void 0,Ke(Qi(v))),k=x.next();!k.done;k=x.next()){var I=k.value;p.has(I)||(p.add(I),d.get(I)?d.get(I).forEach(function(F){return p.add(F)}):I.initialStateNodes.forEach(function(F){return p.add(F)}))}}catch(F){a={error:F}}finally{try{k&&!k.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}}}catch(P){o={error:P}}finally{try{E&&!E.done&&(i=w.return)&&i.call(w)}finally{if(o)throw o.error}}try{for(var S=Ke(p),C=S.next();!C.done;C=S.next())for(var v=C.value,y=v.parent;y&&!p.has(y);)p.add(y),y=y.parent}catch(P){l={error:P}}finally{try{C&&!C.done&&(u=S.return)&&u.call(S)}finally{if(l)throw l.error}}return p}function u1(e,t){var r=t.get(e);if(!r)return{};if(e.type==="compound"){var n=r[0];if(n){if(al(n))return n.key}else return{}}var o={};return r.forEach(function(i){o[i.key]=u1(i,t)}),o}function Gf(e){var t,r,n=new Map;try{for(var o=Ke(e),i=o.next();!i.done;i=o.next()){var a=i.value;n.has(a)||n.set(a,[]),a.parent&&(n.has(a.parent)||n.set(a.parent,[]),n.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}function pF(e,t){var r=ea([e],t);return u1(e,Gf(r))}function ta(e,t){return Array.isArray(e)?e.some(function(r){return r===t}):e instanceof Set?e.has(t):!1}function hF(e){return vt([],Qe(new Set(_t(vt([],Qe(e.map(function(t){return t.ownEvents})),!1)))),!1)}function sl(e,t){return t.type==="compound"?Qi(t).some(function(r){return r.type==="final"&&ta(e,r)}):t.type==="parallel"?Qi(t).every(function(r){return sl(e,r)}):!1}function gF(e){return e===void 0&&(e=[]),e.reduce(function(t,r){return r.meta!==void 0&&(t[r.id]=r.meta),t},{})}function f1(e){return new Set(_t(e.map(function(t){return t.tags})))}function d1(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(et(e)||et(t))return e===t;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(o){return d1(e[o],t[o])})}function vF(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function mF(e,t){var r=e.exec,n=ye(ye({},e),{exec:r!==void 0?function(){return r(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return n}var fr=function(){function e(t){var r=this,n;this.actions=[],this.activities=Yy,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Yy,this.meta=gF(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(n=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&n!==void 0?n:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return hF(r.configuration)}})}return e.from=function(t,r){if(t instanceof e)return t.context!==r?new e({value:t.value,context:r,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var n=Ho;return new e({value:t,context:r,_event:n,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,r){if(t instanceof e){if(!t.actions.length)return t;var n=Ho;return new e({value:t.value,context:r,_event:n,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,r)},e.prototype.toStrings=function(t,r){var n=this;if(t===void 0&&(t=this.value),r===void 0&&(r="."),et(t))return[t];var o=Object.keys(t);return o.concat.apply(o,vt([],Qe(o.map(function(i){return n.toStrings(t[i],r).map(function(a){return i+r+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var r=t.tags;t.machine;var n=Lf(t,["configuration","transitions","tags","machine"]);return ye(ye({},n),{tags:Array.from(r)})},e.prototype.matches=function(t){return Uf(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var r;$t&&Lt(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!(n!=null&&n.transitions.length)&&n.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),bF={deferEvents:!1},p1=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ye(ye({},bF),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(r){throw this.clear(),r}finally{this.processingEvent=!1}},e}(),Kf=new Map,yF=0,ra={bookId:function(){return"x:".concat(yF++)},register:function(e,t){return Kf.set(e,t),e},get:function(e){return Kf.get(e)},free:function(e){Kf.delete(e)}};function qf(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;$t||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function wF(){var e=qf();if(e&&"__xstate__"in e)return e.__xstate__}function _F(e){if(qf()){var t=wF();t&&t.register(e)}}function EF(e,t){t===void 0&&(t={});var r=e.initialState,n=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();r=e.transition(r,u,l),n.forEach(function(f){return f.next(r)})}i=!1}},s=dF({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return r},subscribe:function(u,f,d){var p=tl(u,f,d);return n.add(p),p.next(r),{unsubscribe:function(){n.delete(p)}}}}),l={parent:t.parent,self:s,id:t.id||"anonymous",observers:n};return r=e.start?e.start(l):r,s}var xF={sync:!1,autoForward:!1},xt;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(xt||(xt={}));var SF=function(){function e(t,r){r===void 0&&(r=e.defaultOptions);var n=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=xt.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(Uo(f))return n.batch(f),n.state;var p=Mt(el(f,d));if(n.status===xt.Stopped)return $t||Lt(!1,'Event "'.concat(p.name,'" was sent to stopped service "').concat(n.machine.id,`". This service has already reached its final state, and will not transition.
203
- Event: `).concat(JSON.stringify(p.data))),n.state;if(n.status!==xt.Running&&!n.options.deferEvents)throw new Error('Event "'.concat(p.name,'" was sent to uninitialized service "').concat(n.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
204
- Event: `).concat(JSON.stringify(p.data)));return n.scheduler.schedule(function(){n.forward(p);var h=n._nextState(p);n.update(h,p)}),n._state},this.sendTo=function(f,d,p){var h=n.parent&&(d===Ro.Parent||n.parent.id===d),g=h?n.parent:et(d)?d===Ro.Internal?n:n.children.get(d)||ra.get(d):qM(d)?d:void 0;if(!g){if(!h)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(n.id,"'."));$t||Lt(!1,"Service '".concat(n.id,"' has no parent: unable to send event ").concat(f.type));return}if("machine"in g){if(n.status!==xt.Stopped||n.parent!==g||n.state.done){var v=ye(ye({},f),{name:f.name===MM?"".concat(Zi(n.id)):f.name,origin:n.sessionId});!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([g,v]):g.send(v)}}else!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([g,f.data]):g.send(f.data)},this._exec=function(f,d,p,h){h===void 0&&(h=n.machine.options.actions);var g=f.exec||Vf(f.type,h),v=nt(g)?g:g?g.exec:f.exec;if(v)try{return v(d,p.data,n.machine.config.predictableActionArguments?{action:f,_event:p}:{action:f,state:n.state,_event:p})}catch(K){throw n.parent&&n.parent.send({type:"xstate.error",data:K}),K}switch(f.type){case qi:{var y=f;n.defer(y);break}case Ys:var m=f;if(typeof m.delay=="number"){n.defer(m);return}else m.to?n.sendTo(m._event,m.to,p===Ho):n.send(m._event);break;case Vy:n.cancel(f.sendId);break;case Mf:{if(n.status!==xt.Running)return;var w=f.activity;if(!n.machine.config.predictableActionArguments&&!n.state.activities[w.id||w.type])break;if(w.type===ut.Invoke){var E=o1(w.src),x=n.machine.options.services?n.machine.options.services[E.type]:void 0,k=w.id,I=w.data;$t||Lt(!("forward"in w),"`forward` property is deprecated (found in invocation of '".concat(w.src,"' in in machine '").concat(n.machine.id,"'). ")+"Please use `autoForward` instead.");var S="autoForward"in w?w.autoForward:!!w.forward;if(!x){$t||Lt(!1,"No service found for invocation '".concat(w.src,"' in machine '").concat(n.machine.id,"'."));return}var C=I?Qs(I,d,p):void 0;if(typeof x=="string")return;var P=nt(x)?x(d,p.data,{data:C,src:E,meta:w.meta}):x;if(!P)return;var F=void 0;eo(P)&&(P=C?P.withContext(C):P,F={autoForward:S}),n.spawn(P,k,F)}else n.spawnActivity(w);break}case Ff:{n.stopChild(f.activity.id);break}case zy:var D=f,N=D.label,J=D.value;N?n.logger(N,J):n.logger(J);break;default:$t||Lt(!1,"No implementation found for action type '".concat(f.type,"'"));break}};var o=ye(ye({},e.defaultOptions),r),i=o.clock,a=o.logger,s=o.parent,l=o.id,u=l!==void 0?l:t.id;this.id=u,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new p1({deferEvents:this.options.deferEvents}),this.sessionId=ra.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:Vo(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return $t||Lt(this.status!==xt.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,r){var n,o;try{for(var i=Ke(t.actions),a=i.next();!a.done;a=i.next()){var s=a.value;this.exec(s,t,r)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(t,r){var n,o,i,a,s,l,u,f,d=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||r===Ho)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(P){d.state.children[P.id]=P}),this.devTools&&this.devTools.send(r.data,t),t.event)try{for(var h=Ke(this.eventListeners),g=h.next();!g.done;g=h.next()){var v=g.value;v(t.event)}}catch(P){n={error:P}}finally{try{g&&!g.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}try{for(var y=Ke(this.listeners),m=y.next();!m.done;m=y.next()){var v=m.value;v(t,t.event)}}catch(P){i={error:P}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}try{for(var w=Ke(this.contextListeners),E=w.next();!E.done;E=w.next()){var x=E.value;x(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){s={error:P}}finally{try{E&&!E.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}if(this.state.done){var k=t.configuration.find(function(P){return P.type==="final"&&P.parent===d.machine}),I=k&&k.doneData?Qs(k.doneData,t.context,r):void 0;this._doneEvent=ol(this.id,I);try{for(var S=Ke(this.doneListeners),C=S.next();!C.done;C=S.next()){var v=C.value;v(this._doneEvent)}}catch(P){u={error:P}}finally{try{C&&!C.done&&(f=S.return)&&f.call(S)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),ra.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===xt.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,r,n){var o=this,i=tl(t,r,n);this.listeners.add(i.next),this.status!==xt.NotStarted&&i.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),i.complete()};return this.status===xt.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(i.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===xt.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var r=this;if(this.status===xt.Running)return this;this.machine._init(),ra.register(this.sessionId,this),this.initialized=!0,this.status=xt.Running;var n=t===void 0?this.initialState:Vo(this,function(){return vF(t)?r.machine.resolveState(t):r.machine.resolveState(fr.from(t,r.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){r.update(n,Ho)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){nt(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,r,n,o,i,a,s,l,u,f;try{for(var d=Ke(this.listeners),p=d.next();!p.done;p=d.next()){var h=p.value;this.listeners.delete(h)}}catch(S){t={error:S}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var g=Ke(this.stopListeners),v=g.next();!v.done;v=g.next()){var h=v.value;h(),this.stopListeners.delete(h)}}catch(S){n={error:S}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(n)throw n.error}}try{for(var y=Ke(this.contextListeners),m=y.next();!m.done;m=y.next()){var h=m.value;this.contextListeners.delete(h)}}catch(S){i={error:S}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}try{for(var w=Ke(this.doneListeners),E=w.next();!E.done;E=w.next()){var h=E.value;this.doneListeners.delete(h)}}catch(S){s={error:S}}finally{try{E&&!E.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=xt.Stopped,this._initialState=void 0;try{for(var x=Ke(Object.keys(this.delayedEventsMap)),k=x.next();!k.done;k=x.next()){var I=k.value;this.clock.clearTimeout(this.delayedEventsMap[I])}}catch(S){u={error:S}}finally{try{k&&!k.done&&(f=x.return)&&f.call(x)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new p1({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,r=this.scheduler;return this._stop(),r.schedule(function(){var n=Mt({type:"xstate.stop"}),o=Vo(t,function(){var i=_t(vt([],Qe(t.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return Cn(f.onExit,t.machine.options.actions)})),a=Qe(il(t.machine,t.state,t.state.context,n,[{type:"exit",actions:i}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],l=a[1],u=new fr({value:t.state.value,context:l,_event:n,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(f){return!Hf(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(o,n),t._stopChildren(),ra.free(t.sessionId)}),this},e.prototype.batch=function(t){var r=this;if(this.status===xt.NotStarted&&this.options.deferEvents)$t||Lt(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
205
- Event: `).concat(JSON.stringify(event)));else if(this.status!==xt.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=r.state,s=!1,l=[],u=function(h){var g=Mt(h);r.forward(g),a=Vo(r,function(){return r.machine.transition(a,g,void 0,n||void 0)}),l.push.apply(l,vt([],Qe(r.machine.config.predictableActionArguments?a.actions:a.actions.map(function(v){return mF(v,a)})),!1)),s=s||!!a.changed};try{for(var f=Ke(t),d=f.next();!d.done;d=f.next()){var p=d.value;u(p)}}catch(h){o={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}a.changed=s,a.actions=l,r.update(a,Mt(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,r){var n=this;r===void 0&&(r=!!this.machine.config.predictableActionArguments&&this._exec);var o=Mt(t);if(o.name.indexOf(Gy)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Gy)===0}))throw o.data.data;var i=Vo(this,function(){return n.machine.transition(n.state,o,void 0,r||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var r,n;try{for(var o=Ke(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(l){r={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.defer=function(t){var r=this,n=this.clock.setTimeout(function(){"to"in t&&t.to?r.sendTo(t._event,t.to,!0):r.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=n)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,r,n){n===void 0&&(n=this.machine.options.actions),this._exec(t,r.context,r._event,n)},e.prototype.removeChild=function(t){var r;this.children.delete(t),this.forwardTo.delete(t),(r=this.state)===null||r===void 0||delete r.children[t]},e.prototype.stopChild=function(t){var r=this.children.get(t);r&&(this.removeChild(t),nt(r.stop)&&r.stop())},e.prototype.spawn=function(t,r,n){if(this.status!==xt.Running)return s1(t,r);if(Qy(t))return this.spawnPromise(Promise.resolve(t),r);if(nt(t))return this.spawnCallback(t,r);if(fF(t))return this.spawnActor(t,r);if(KM(t))return this.spawnObservable(t,r);if(eo(t))return this.spawnMachine(t,ye(ye({},n),{id:r}));if(VM(t))return this.spawnBehavior(t,r);throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,r){var n=this;r===void 0&&(r={});var o=new e(t,ye(ye({},this.options),{parent:this,id:r.id||t.id})),i=ye(ye({},xF),r);i.sync&&o.onTransition(function(s){n.send(Ky,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){n.removeChild(o.id),n.send(Mt(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,r){var n=EF(t,{id:r,parent:this});return this.children.set(r,n),n},e.prototype.spawnPromise=function(t,r){var n,o=this,i=!1,a;t.then(function(l){i||(a=l,o.removeChild(r),o.send(Mt(ol(r,l),{origin:r})))},function(l){if(!i){o.removeChild(r);var u=Zi(r,l);try{o.send(Mt(u,{origin:r}))}catch(f){JM(l,f,r),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(n={id:r,send:function(){},subscribe:function(l,u,f){var d=tl(l,u,f),p=!1;return t.then(function(h){p||(d.next(h),!p&&d.complete())},function(h){p||d.error(h)}),{unsubscribe:function(){return p=!0}}},stop:function(){i=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return a}},n[$n]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnCallback=function(t,r){var n,o=this,i=!1,a=new Set,s=new Set,l,u=function(p){l=p,s.forEach(function(h){return h(p)}),!i&&o.send(Mt(p,{origin:r}))},f;try{f=t(u,function(p){a.add(p)})}catch(p){this.send(Zi(r,p))}if(Qy(f))return this.spawnPromise(f,r);var d=(n={id:r,send:function(p){return a.forEach(function(h){return h(p)})},subscribe:function(p){var h=tl(p);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,nt(f)&&f()},toJSON:function(){return{id:r}},getSnapshot:function(){return l}},n[$n]=function(){return this},n);return this.children.set(r,d),d},e.prototype.spawnObservable=function(t,r){var n,o=this,i,a=t.subscribe(function(l){i=l,o.send(Mt(l,{origin:r}))},function(l){o.removeChild(r),o.send(Mt(Zi(r,l),{origin:r}))},function(){o.removeChild(r),o.send(Mt(ol(r),{origin:r}))}),s=(n={id:r,send:function(){},subscribe:function(l,u,f){return t.subscribe(l,u,f)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:r}}},n[$n]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnActor=function(t,r){return this.children.set(r,t),t},e.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!r){$t||Lt(!1,"No implementation found for activity '".concat(t.type,"'"));return}var n=r(this.state.context,t);this.spawnEffect(t.id,n)},e.prototype.spawnEffect=function(t,r){var n;this.children.set(t,(n={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},n[$n]=function(){return this},n))},e.prototype.attachDev=function(){var t=qf();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(ye(ye({name:this.id,autoPause:!0,stateSanitizer:function(n){return{value:n.value,context:n.context,actions:n.actions}}},r),{features:ye({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}_F(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[$n]=function(){return this},e.prototype.getSnapshot=function(){return this.status===xt.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=h1,e}();function h1(e,t){var r=new SF(e,t);return r}function $F(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function ll(e){return ye(ye({type:Bf},e),{toJSON:function(){e.onDone,e.onError;var t=Lf(e,["onDone","onError"]);return ye(ye({},t),{type:Bf,src:$F(e.src)})}})}var zo="",Yf="#",na="*",Go={},Ko=function(e){return e[0]===Yf},CF=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},AF=function(e,t,r){var n=r.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(et(i.target)||eo(i.target))}),o=t===zo?"the transient event":"event '".concat(t,"'");Lt(!n,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},OF=function(){function e(t,r,n,o){n===void 0&&(n="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=n,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(CF(),r),this.parent=o==null?void 0:o.parent,this.key=this.config.key||(o==null?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:qy),this.id=this.config.id||vt([this.machine.key],Qe(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,$t||Lt(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Ji(this.config.states,function(u,f){var d,p=new e(u,{},void 0,{parent:i,key:f});return Object.assign(i.idMap,ye((d={},d[p.id]=p,d),p.idMap)),p}):Go;var s=0;function l(u){var f,d;u.order=s++;try{for(var p=Ke(l1(u)),h=p.next();!h.done;h=p.next()){var g=h.value;l(g)}}catch(v){f={error:v}}finally{try{h&&!h.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var f=u.event;return f===zo}):zo in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=xr(this.config.entry||this.config.onEntry).map(function(u){return Xi(u)}),this.onExit=xr(this.config.exit||this.config.onExit).map(function(u){return Xi(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=xr(this.config.invoke).map(function(u,f){var d,p;if(eo(u)){var h=rl(i.id,f);return i.machine.options.services=ye((d={},d[h]=u,d),i.machine.options.services),ll({src:h,id:h})}else if(et(u.src)){var h=u.id||rl(i.id,f);return ll(ye(ye({},u),{id:h,src:u.src}))}else if(eo(u.src)||nt(u.src)){var h=u.id||rl(i.id,f);return i.machine.options.services=ye((p={},p[h]=u.src,p),i.machine.options.services),ll(ye(ye({id:h},u),{src:h}))}else{var g=u.src;return ll(ye(ye({id:rl(i.id,f)},u),{src:g}))}}),this.activities=xr(this.config.activities).concat(this.invoke).map(function(u){return zf(u)}),this.transition=this.transition.bind(this),this.tags=xr(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||c1(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,r){var n=this.options,o=n.actions,i=n.activities,a=n.guards,s=n.services,l=n.delays;return new e(this.config,{actions:ye(ye({},o),t.actions),activities:ye(ye({},i),t.activities),guards:ye(ye({},a),t.guards),services:ye(ye({},s),t.services),delays:ye(ye({},l),t.delays)},r??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return nt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Ji(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(r,n){return r[n.eventType]=r[n.eventType]||[],r[n.eventType].push(n),r},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var r=t===zo,n=this.transitions.filter(function(o){var i=o.eventType===t;return r?i:i||o.eventType===na});return this.__cache.candidates[t]=n,n},e.prototype.getDelayedTransitions=function(){var t=this,r=this.config.after;if(!r)return[];var n=function(i,a){var s=nt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,l=sF(s,t.id);return t.onEntry.push(QM(l,{delay:i})),t.onExit.push(rF(l)),l},o=Uo(r)?r.map(function(i,a){var s=n(i.delay,a);return ye(ye({},i),{event:s})}):_t(Object.keys(r).map(function(i,a){var s=r[i],l=et(s)?{target:s}:s,u=isNaN(+i)?i:+i,f=n(u,a);return xr(l).map(function(d){return ye(ye({},d),{event:f,delay:u})})}));return o.map(function(i){var a=i.delay;return ye(ye({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var r,n=this;if(!t)return[];var o=t instanceof fr?t.value:Yi(t,this.delimiter);if(et(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((r={},r[o]=i,r)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,vt([],Qe(_t(a.map(function(l){return n.getStateNode(l).getStateNodes(o[l])}))),!1)),s},e.prototype.handles=function(t){var r=Jy(t);return this.events.includes(r)},e.prototype.resolveState=function(t){var r=t instanceof fr?t:fr.create(t),n=Array.from(ea([],this.getStateNodes(r.value)));return new fr(ye(ye({},r),{value:this.resolve(r.value),configuration:n,done:sl(n,this),tags:f1(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,r,n){var o=this.getStateNode(t),i=o.next(r,n);return!i||!i.transitions.length?this.next(r,n):i},e.prototype.transitionCompoundNode=function(t,r,n){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],r,n);return!a||!a.transitions.length?this.next(r,n):a},e.prototype.transitionParallelNode=function(t,r,n){var o,i,a={};try{for(var s=Ke(Object.keys(t)),l=s.next();!l.done;l=s.next()){var u=l.value,f=t[u];if(f){var d=this.getStateNode(u),p=d._transition(f,r,n);p&&(a[u]=p)}}}catch(m){o={error:m}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var h=Object.keys(a).map(function(m){return a[m]}),g=_t(h.map(function(m){return m.transitions})),v=h.some(function(m){return m.transitions.length>0});if(!v)return this.next(r,n);var y=_t(Object.keys(a).map(function(m){return a[m].configuration}));return{transitions:g,exitSet:_t(h.map(function(m){return m.exitSet})),configuration:y,source:r,actions:_t(Object.keys(a).map(function(m){return a[m].actions}))}},e.prototype._transition=function(t,r,n){return et(t)?this.transitionLeafNode(t,r,n):Object.keys(t).length===1?this.transitionCompoundNode(t,r,n):this.transitionParallelNode(t,r,n)},e.prototype.getTransitionData=function(t,r){return this._transition(t.value,t,Mt(r))},e.prototype.next=function(t,r){var n,o,i=this,a=r.name,s=[],l=[],u;try{for(var f=Ke(this.getCandidates(a)),d=f.next();!d.done;d=f.next()){var p=d.value,h=p.cond,g=p.in,v=t.context,y=g?et(g)&&Ko(g)?t.matches(Yi(this.getStateNodeById(g).path,this.delimiter)):Uf(Yi(g,this.delimiter),UM(this.path.slice(0,-2))(t.value)):!0,m=!1;try{m=!h||n1(this.machine,h,v,r,t)}catch(x){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
206
- `).concat(x.message))}if(m&&y){p.target!==void 0&&(l=p.target),s.push.apply(s,vt([],Qe(p.actions),!1)),u=p;break}}}catch(x){n={error:x}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var w=_t(l.map(function(x){return i.getRelativeStateNodes(x,t.historyValue)})),E=!!u.internal;return{transitions:[u],exitSet:E?[]:_t(l.map(function(x){return i.getPotentiallyReenteringNodes(x)})),configuration:w,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var r=[],n=this,o=t;n&&n!==o;)r.push(n),n=n.parent;return n!==o?[]:(r.push(o),r)},e.prototype.getActions=function(t,r,n,o,i,a,s){var l,u,f,d,p=this,h=a?ea([],this.getStateNodes(a.value)):[],g=new Set;try{for(var v=Ke(Array.from(t).sort(function(D,N){return D.order-N.order})),y=v.next();!y.done;y=v.next()){var m=y.value;(!ta(h,m)||ta(n.exitSet,m)||m.parent&&g.has(m.parent))&&g.add(m)}}catch(D){l={error:D}}finally{try{y&&!y.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}try{for(var w=Ke(h),E=w.next();!E.done;E=w.next()){var m=E.value;(!ta(t,m)||ta(n.exitSet,m.parent))&&n.exitSet.push(m)}}catch(D){f={error:D}}finally{try{E&&!E.done&&(d=w.return)&&d.call(w)}finally{if(f)throw f.error}}n.exitSet.sort(function(D,N){return N.order-D.order});var x=Array.from(g).sort(function(D,N){return D.order-N.order}),k=new Set(n.exitSet),I=_t(x.map(function(D){var N=[];if(D.type!=="final")return N;var J=D.parent;if(!J.parent)return N;N.push(nl(D.id,D.doneData),nl(J.id,D.doneData?Qs(D.doneData,o,i):void 0));var K=J.parent;return K.type==="parallel"&&Qi(K).every(function(Y){return sl(n.configuration,Y)})&&N.push(nl(K.id)),N})),S=x.map(function(D){var N=D.onEntry,J=D.activities.map(function(K){return nF(K)});return{type:"entry",actions:Cn(s?vt(vt([],Qe(N),!1),Qe(J),!1):vt(vt([],Qe(J),!1),Qe(N),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:I.map(function(D){return XM(D)})}),C=Array.from(k).map(function(D){return{type:"exit",actions:Cn(vt(vt([],Qe(D.onExit),!1),Qe(D.activities.map(function(N){return oF(N)})),!1),p.machine.options.actions)}}),P=C.concat({type:"transition",actions:Cn(n.actions,this.machine.options.actions)}).concat(S);if(r){var F=Cn(_t(vt([],Qe(t),!1).sort(function(D,N){return N.order-D.order}).map(function(D){return D.onExit})),this.machine.options.actions).filter(function(D){return!Hf(D)});return P.concat({type:"stop",actions:F})}return P},e.prototype.transition=function(t,r,n,o){t===void 0&&(t=this.initialState);var i=Mt(r),a;if(t instanceof fr)a=n===void 0?t:this.resolveState(fr.from(t,n));else{var s=et(t)?this.resolve(Xs(this.getResolvedPath(t))):this.resolve(t),l=n??this.machine.context;a=this.resolveState(fr.from(s,l))}if(!$t&&i.name===na)throw new Error("An event cannot have the wildcard type ('".concat(na,"')"));if(this.strict&&!this.events.includes(i.name)&&!HM(i.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var u=this._transition(a.value,a,i)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},f=ea([],this.getStateNodes(a.value)),d=u.configuration.length?ea(f,u.configuration):f;return u.configuration=vt([],Qe(d),!1),this.resolveTransition(u,a,a.context,o,i)},e.prototype.resolveRaisedTransition=function(t,r,n,o){var i,a=t.actions;return t=this.transition(t,r,void 0,o),t._event=n,t.event=n.data,(i=t.actions).unshift.apply(i,vt([],Qe(a),!1)),t},e.prototype.resolveTransition=function(t,r,n,o,i){var a,s,l,u,f=this;i===void 0&&(i=Ho);var d=t.configuration,p=!r||t.transitions.length>0,h=p?t.configuration:r?r.configuration:[],g=sl(h,this),v=p?pF(this.machine,d):void 0,y=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):void 0:void 0,m=this.getActions(new Set(h),g,t,n,i,r,o),w=r?ye({},r.activities):{};try{for(var E=Ke(m),x=E.next();!x.done;x=E.next()){var k=x.value;try{for(var I=(l=void 0,Ke(k.actions)),S=I.next();!S.done;S=I.next()){var C=S.value;C.type===Mf?w[C.activity.id||C.activity.type]=C:C.type===Ff&&(w[C.activity.id||C.activity.type]=!1)}}catch(re){l={error:re}}finally{try{S&&!S.done&&(u=I.return)&&u.call(I)}finally{if(l)throw l.error}}}}catch(re){a={error:re}}finally{try{x&&!x.done&&(s=E.return)&&s.call(E)}finally{if(a)throw a.error}}var P=Qe(il(this,r,n,i,m,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),F=P[0],D=P[1],N=Qe(zM(F,Hf),2),J=N[0],K=N[1],Y=F.filter(function(re){var de;return re.type===Mf&&((de=re.activity)===null||de===void 0?void 0:de.type)===Bf}),te=Y.reduce(function(re,de){return re[de.activity.id]=cF(de.activity,f.machine,D,i),re},r?ye({},r.children):{}),oe=new fr({value:v||r.value,context:D,_event:i,_sessionid:r?r._sessionid:null,historyValue:v?y?GM(y,v):void 0:r?r.historyValue:void 0,history:!v||t.source?r:void 0,actions:v?K:[],activities:v?w:r?r.activities:{},events:[],configuration:h,transitions:t.transitions,children:te,done:g,tags:f1(h),machine:this}),le=n!==D;oe.changed=i.name===Ky||le;var ae=oe.history;ae&&delete ae.history;var ge=!g&&(this._transient||d.some(function(re){return re._transient}));if(!p&&(!ge||i.name===zo))return oe;var ce=oe;if(!g)for(ge&&(ce=this.resolveRaisedTransition(ce,{type:DM},i,o));J.length;){var q=J.shift();ce=this.resolveRaisedTransition(ce,q._event,i,o)}var H=ce.changed||(ae?!!ce.actions.length||le||typeof ae.value!=typeof ce.value||!d1(ce.value,ae.value):void 0);return ce.changed=H,ce.history=ae,ce},e.prototype.getStateNode=function(t){if(Ko(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var r=this.states[t];if(!r)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return r},e.prototype.getStateNodeById=function(t){var r=Ko(t)?t.slice(Yf.length):t;if(r===this.id)return this;var n=this.machine.idMap[r];if(!n)throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Ko(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var r=Wf(t,this.delimiter).slice(),n=this;r.length;){var o=r.shift();if(!o.length)break;n=n.getStateNode(o)}return n},e.prototype.resolve=function(t){var r,n=this;if(!t)return this.initialStateValue||Go;switch(this.type){case"parallel":return Ji(this.initialStateValue,function(i,a){return i?n.getStateNode(a).resolve(t[a]||i):Go});case"compound":if(et(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(r={},r[t]=o.initialStateValue,r):t}return Object.keys(t).length?Ji(t,function(i,a){return i?n.getStateNode(a).resolve(i):Go}):this.initialStateValue||{};default:return t||Go}},e.prototype.getResolvedPath=function(t){if(Ko(t)){var r=this.machine.idMap[t.slice(Yf.length)];if(!r)throw new Error("Unable to find state node '".concat(t,"'"));return r.path}return Wf(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var r;if(this.type==="parallel")r=Xy(this.states,function(n){return n.initialStateValue||Go},function(n){return n.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));r=al(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else r={};return this.__cache.initialStateValue=r,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,r){this._init();var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,r??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var r=this.config;et(r.target)?t=Ko(r.target)?Xs(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target:t=r.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,r,n){return n===void 0&&(n=!0),n?t.type==="history"?t.resolveHistory(r):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(al(this))return[this];if(this.type==="compound"&&!this.initial)return $t||Lt(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var r=Zs(this.initialStateValue);return _t(r.map(function(n){return t.getFromRelativePath(n)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var r=Qe(t),n=r[0],o=r.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var i=this.getStateNode(n);if(i.type==="history")return i.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Xy(this.states,function(r,n){if(!t)return r.historyValue();var o=et(t)?void 0:t[n];return r.historyValue(o||r.initialStateValue)},function(r){return!r.history})}},e.prototype.resolveHistory=function(t){var r=this;if(this.type!=="history")return[this];var n=this.parent;if(!t){var o=this.target;return o?_t(Zs(o).map(function(a){return n.getFromRelativePath(a)})):n.initialStateNodes}var i=WM(n.path,"states")(t).current;return et(i)?[n.getStateNode(i)]:_t(Zs(i).map(function(a){return r.history==="deep"?n.getFromRelativePath(a):[n.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,r=_t(Object.keys(this.states).map(function(n){return t.states[n].stateIds}));return[this.id].concat(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,r,n,o;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var s=Ke(Object.keys(i)),l=s.next();!l.done;l=s.next()){var u=l.value,f=i[u];if(f.states)try{for(var d=(n=void 0,Ke(f.events)),p=d.next();!p.done;p=d.next()){var h=p.value;a.add("".concat(h))}}catch(g){n={error:g}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}}catch(g){t={error:g}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(r){return!(!r.target&&!r.actions.length&&r.internal)}).map(function(r){return r.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var r=this;if(t!==void 0)return t.map(function(n){if(!et(n))return n;var o=n[0]===r.delimiter;if(o&&!r.parent)return r.getStateNodeByPath(n.slice(1));var i=o?r.key+n:n;if(r.parent)try{var a=r.parent.getStateNodeByPath(i);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(r.id,`':
207
- `).concat(s.message))}else return r.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var r=this,n=YM(t.target),o="internal"in t?t.internal:n?n.some(function(l){return et(l)&&l[0]===r.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(n),s=ye(ye({},t),{actions:Cn(xr(t.actions)),cond:r1(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return ye(ye({},s),{target:s.target?s.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(r.id)})}});return s},e.prototype.formatTransitions=function(){var t,r,n=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=na,s=i[a],l=s===void 0?[]:s,u=Lf(i,[typeof a=="symbol"?a:a+""]);o=_t(Object.keys(u).map(function(w){!$t&&w===zo&&Lt(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(n.id,'".'));var E=Wo(w,u[w]);return $t||AF(n,w,E),E}).concat(Wo(na,l)))}var f=this.config.always?Wo("",this.config.always):[],d=this.config.onDone?Wo(String(nl(this.id)),this.config.onDone):[];$t||Lt(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var p=_t(this.invoke.map(function(w){var E=[];return w.onDone&&E.push.apply(E,vt([],Qe(Wo(String(ol(w.id)),w.onDone)),!1)),w.onError&&E.push.apply(E,vt([],Qe(Wo(String(Zi(w.id)),w.onError)),!1)),E})),h=this.after,g=_t(vt(vt(vt(vt([],Qe(d),!1),Qe(p),!1),Qe(o),!1),Qe(f),!1).map(function(w){return xr(w).map(function(E){return n.formatTransition(E)})}));try{for(var v=Ke(h),y=v.next();!y.done;y=v.next()){var m=y.value;g.push(m)}}catch(w){t={error:w}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}return g},e}(),g1=!1;function Jf(e,t){return!$t&&!("predictableActionArguments"in e)&&!g1&&(g1=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new OF(e,t)}var Gt=aF,TF=c.useLayoutEffect;function v1(e){var t=ve.useRef();return t.current||(t.current={v:e()}),t.current.v}var cl=function(){return cl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},cl.apply(this,arguments)},IF=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},PF=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function kF(e,t){var r=v1(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var n=PF(c.useState(r),1),o=n[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var i=t.context,a=t.guards,s=t.actions,l=t.activities,u=t.services,f=t.delays;t.state;var d=IF(t,["context","guards","actions","activities","services","delays","state"]),p=v1(function(){var h={context:i,guards:a,actions:s,activities:l,services:u,delays:f},g=r.withConfig(h,function(){return cl(cl({},r.context),i)});return h1(g,d)});return TF(function(){Object.assign(p.machine.options.actions,s),Object.assign(p.machine.options.guards,a),Object.assign(p.machine.options.activities,l),Object.assign(p.machine.options.services,u),Object.assign(p.machine.options.delays,f)},[s,a,l,u,f]),p}function NF(e,t,r){if(e.status===xt.NotStarted)return!0;var n=r.changed===void 0&&(Object.keys(r.children).length>0||typeof t.changed=="boolean");return!(r.changed||n)}var DF=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function LF(e){return e}function Xf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=DF(t,1),o=n[0],i=o===void 0?{}:o,a=kF(e,i),s=c.useCallback(function(){return a.status===xt.NotStarted?i.state?fr.create(i.state):a.machine.initialState:a.getSnapshot()},[a]),l=c.useCallback(function(d,p){return NF(a,d,p)},[a]),u=c.useCallback(function(d){var p=a.subscribe(d).unsubscribe;return p},[a]),f=NM.useSyncExternalStoreWithSelector(u,s,s,LF,l);return c.useEffect(function(){var d=i.state;return a.start(d?fr.create(d):void 0),function(){a.stop(),a.status=xt.NotStarted}},[]),[f,a.send,a]}const MF=Jf({id:"identity",predictableActionArguments:!0,context:{identity:null,identitySubscribable:null},initial:"choosingAction",invoke:{src:e=>e.identitySubscribable},states:{choosingAction:{},managingDeviceInvitation:{},managingAgent:{initial:"idle",states:{idle:{},pending:{}}},managingDevices:{},managingProfile:{initial:"idle",states:{idle:{},pending:{}},on:{setIdentity:{target:"choosingAction",actions:["setIdentity","log"]},updateProfile:{target:".pending",actions:"log"}}},signingOut:{}},on:{unchooseAction:{target:".choosingAction",actions:["unsetInvitation","log"]},deselectInvitation:{target:".choosingAction",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingDeviceInvitation",actions:["setInvitation","log"]},chooseDevices:{target:".managingDevices",actions:"log"},chooseProfile:{target:".managingProfile",actions:"log"},chooseSignOut:{target:".signingOut",actions:"log"},chooseAgent:{target:".managingAgent",actions:"log"}}},{actions:{setIdentity:Gt({identity:(e,t)=>(t==null?void 0:t.identity)??null}),setInvitation:Gt({invitation:(e,t)=>(t==null?void 0:t.invitation)??null}),unsetInvitation:Gt({invitation:()=>{}}),log:(e,t)=>{Xe("[transition]",{event:t,context:e})}}}),FF=(e,t)=>Xf(MF,{...t,context:{...t==null?void 0:t.context,identity:e.halo.identity.get(),identitySubscribable:e.halo.identity.map(r=>({type:"setIdentity",identity:r}))}}),jF=e=>{const{active:t,onAgentCreate:r,onAgentDestroy:n,send:o,validationMessage:i,agentStatus:a,agentActive:s,agentProviderDisabled:l}=e,u=!t,{t:f}=tt("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Vi,{validationMessage:i,label:c.createElement(Er,null,"Agent Status"),disabled:u,"data-testid":"agent-status",value:a})),c.createElement(zt,null,c.createElement(at,{disabled:s||l,onClick:()=>r==null?void 0:r(),"data-testid":"create-agent"},"Create Agent"),c.createElement(at,{disabled:!s||l,onClick:()=>n==null?void 0:n(),"data-testid":"destroy-agent"},"Destroy Agent"),c.createElement(at,{disabled:u,onClick:()=>o==null?void 0:o({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},f("back label"))))},BF=({devices:e,active:t,send:r})=>{const{t:n}=tt("os"),o=!t;return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow"},c.createElement(Tk,{devices:e})),c.createElement(zt,null,c.createElement(at,{variant:"ghost",disabled:o,onClick:()=>r==null?void 0:r({type:"unchooseAction"}),"data-testid":"manage-devices-back"},n("back label"))))},RF=e=>{const{send:t}=e,r=Ue.useClient(),n=si.useHaloInvitations(),o=c.useCallback(a=>{const s=an.InvitationEncoder.encode(a);a.state===we.State.CONNECTING&&console.log(JSON.stringify({invitationCode:s,authCode:a.authCode}))},[]),i=a=>{const s=a.altKey&&a.shiftKey;n.forEach(u=>u.cancel());const l=r.halo.share(s?{type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE}:void 0);process.env.NODE_ENV!=="production"&&l.subscribe(o),t==null||t({type:"selectInvitation",invitation:l})};return c.createElement(UF,{...e,onCreateInvitationClick:a=>i(a)})},UF=({onCreateInvitationClick:e,active:t,send:r,onDone:n,doneActionParent:o})=>{const{t:i}=tt("os");return c.createElement("div",{role:"none",className:"grow flex flex-col gap-1"},c.createElement(xo,{density:"coarse"},c.createElement("div",{className:"grow justify-center flex flex-col gap-1"},c.createElement(at,{"data-testid":"manage-agent",onClick:()=>r==null?void 0:r({type:"chooseAgent"}),classNames:"plb-4"},c.createElement(ze.HardDrive,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},"Manage Agent"),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(at,{disabled:!t,"data-testid":"devices-panel.create-invitation",onClick:e,classNames:"plb-4"},c.createElement(ze.Plus,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose add device label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(at,{"data-testid":"manage-devices",onClick:()=>r==null?void 0:r({type:"chooseDevices"}),classNames:"plb-4"},c.createElement(ze.Devices,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose devices label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(at,{"data-testid":"manage-profile",onClick:()=>r==null?void 0:r({type:"chooseProfile"}),classNames:"plb-4"},c.createElement(ze.UserGear,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose profile label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(at,{"data-testid":"devices-panel.sign-out",onClick:()=>r==null?void 0:r({type:"chooseSignOut"}),classNames:"plb-4"},c.createElement(ze.Power,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose sign out label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})))))},WF=e=>{const{onUpdateProfile:t}=e,{t:r}=tt("os"),[n,o]=c.useState(""),i=async a=>{await(t==null?void 0:t(a).catch(s=>{Xe.catch(s),o(r("failed to update profile message"))}))};return c.createElement(HF,{...e,onUpdateProfile:i,validationMessage:n})},HF=e=>{const{active:t,profile:r,send:n,onUpdateProfile:o,validationMessage:i}=e,a=!t,{t:s}=tt("os"),[l,u]=c.useState((r==null?void 0:r.displayName)??"");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Vi,{validationMessage:i,label:c.createElement(Er,null,s("display name input label")),disabled:a,"data-testid":"display-name-input",placeholder:s("display name input placeholder"),value:l,onChange:({target:{value:f}})=>u(f),onKeyDown:({key:f})=>f==="Enter"&&(o==null?void 0:o({displayName:l}))})),c.createElement(zt,null,c.createElement(at,{variant:"ghost",disabled:a,onClick:()=>n==null?void 0:n({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},s("back label")),c.createElement(at,{variant:"primary",disabled:a,onClick:()=>o==null?void 0:o({displayName:l}),"data-testid":"update-profile-form-continue"},s("done label"))))},VF=e=>{const{t}=tt("os"),r=()=>{var n;window.confirm(t("reset device confirm message"))&&((n=e.onResetDevice)==null||n.call(e))};return c.createElement(zF,{disabled:!e.active,onBack:()=>{var n;return(n=e.send)==null?void 0:n.call(e,{type:"unchooseAction"})},onResetDevice:r,onJoinNewIdentity:e.onJoinNewIdentity})},zF=({disabled:e,onResetDevice:t,onJoinNewIdentity:r,onBack:n})=>{const{t:o}=tt("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Mc.Root,{valence:"error"},c.createElement(Mc.Title,null,c.createElement(ze.Warning,{className:ue(We(6),"inline mie-2")}),o("sign out chooser title")),c.createElement(Mc.Body,null,o("sign out chooser message")))),c.createElement(zt,null,c.createElement(at,{disabled:e,onClick:n},o("back label")),c.createElement(at,{variant:"primary","data-testid":"sign-out.join-new-identity",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:r},o("join new identity label")),c.createElement(at,{variant:"primary","data-testid":"sign-out.reset-device",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:t},o("reset device label"))))},GF=({client:e,invitations:t,identity:r})=>{const[n,o]=c.useState(""),[i,a]=c.useState(""),[s,l]=c.useState(!1),u=Ue.useAgentHostingProviderClient(e.config);c.useEffect(()=>{(async()=>{if(u){const g=await(u==null?void 0:u.getAgent((r==null?void 0:r.identityKey.truncate())??"foo"));g?(l(!0),a(g)):(l(!1),o("No agent deployed via provider."))}else o("No agent provider configured.")})()},[]);const f=c.useCallback(async h=>{const g=an.InvitationEncoder.encode(h);if(h.state===we.State.CONNECTING&&(console.log(JSON.stringify({invitationCode:g,authCode:h.authCode})),Mi(r,"Identity not found"),u))try{const v=await(u==null?void 0:u.createAgent(g,r.identityKey.truncate()));a(v),l(!0),o("")}catch(v){o(`error creating agent: ${v.message}`)}},[]);return{onAgentCreate:async()=>{t.forEach(g=>g.cancel()),e.halo.share({type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE}).subscribe(f)},onAgentDestroy:async()=>{const h=e.halo.identity.get();Mi(h,"Identity not found");try{await(u==null?void 0:u.destroyAgent(h.identityKey.truncate())),o("No agent deployed via provider."),a(""),l(!1)}catch(g){o(`error destroying agent: ${g.message}`)}},validationMessage:n,agentStatus:i,agentActive:s}};var m1={exports:{}};(function(e,t){var r=function(){var n=function(k,I){var S=236,C=17,P=k,F=i[I],D=null,N=0,J=null,K=[],Y={},te=function(M,R){N=P*4+17,D=function(G){for(var O=new Array(G),T=0;T<G;T+=1){O[T]=new Array(G);for(var Z=0;Z<G;Z+=1)O[T][Z]=null}return O}(N),oe(0,0),oe(N-7,0),oe(0,N-7),ge(),ae(),q(M,R),P>=7&&ce(M),J==null&&(J=de(P,F,K)),H(J,R)},oe=function(M,R){for(var G=-1;G<=7;G+=1)if(!(M+G<=-1||N<=M+G))for(var O=-1;O<=7;O+=1)R+O<=-1||N<=R+O||(0<=G&&G<=6&&(O==0||O==6)||0<=O&&O<=6&&(G==0||G==6)||2<=G&&G<=4&&2<=O&&O<=4?D[M+G][R+O]=!0:D[M+G][R+O]=!1)},le=function(){for(var M=0,R=0,G=0;G<8;G+=1){te(!0,G);var O=s.getLostPoint(Y);(G==0||M>O)&&(M=O,R=G)}return R},ae=function(){for(var M=8;M<N-8;M+=1)D[M][6]==null&&(D[M][6]=M%2==0);for(var R=8;R<N-8;R+=1)D[6][R]==null&&(D[6][R]=R%2==0)},ge=function(){for(var M=s.getPatternPosition(P),R=0;R<M.length;R+=1)for(var G=0;G<M.length;G+=1){var O=M[R],T=M[G];if(D[O][T]==null)for(var Z=-2;Z<=2;Z+=1)for(var ne=-2;ne<=2;ne+=1)Z==-2||Z==2||ne==-2||ne==2||Z==0&&ne==0?D[O+Z][T+ne]=!0:D[O+Z][T+ne]=!1}},ce=function(M){for(var R=s.getBCHTypeNumber(P),G=0;G<18;G+=1){var O=!M&&(R>>G&1)==1;D[Math.floor(G/3)][G%3+N-8-3]=O}for(var G=0;G<18;G+=1){var O=!M&&(R>>G&1)==1;D[G%3+N-8-3][Math.floor(G/3)]=O}},q=function(M,R){for(var G=F<<3|R,O=s.getBCHTypeInfo(G),T=0;T<15;T+=1){var Z=!M&&(O>>T&1)==1;T<6?D[T][8]=Z:T<8?D[T+1][8]=Z:D[N-15+T][8]=Z}for(var T=0;T<15;T+=1){var Z=!M&&(O>>T&1)==1;T<8?D[8][N-T-1]=Z:T<9?D[8][15-T-1+1]=Z:D[8][15-T-1]=Z}D[N-8][8]=!M},H=function(M,R){for(var G=-1,O=N-1,T=7,Z=0,ne=s.getMaskFunction(R),pe=N-1;pe>0;pe-=2)for(pe==6&&(pe-=1);;){for(var me=0;me<2;me+=1)if(D[O][pe-me]==null){var xe=!1;Z<M.length&&(xe=(M[Z]>>>T&1)==1);var Ee=ne(O,pe-me);Ee&&(xe=!xe),D[O][pe-me]=xe,T-=1,T==-1&&(Z+=1,T=7)}if(O+=G,O<0||N<=O){O-=G,G=-G;break}}},re=function(M,R){for(var G=0,O=0,T=0,Z=new Array(R.length),ne=new Array(R.length),pe=0;pe<R.length;pe+=1){var me=R[pe].dataCount,xe=R[pe].totalCount-me;O=Math.max(O,me),T=Math.max(T,xe),Z[pe]=new Array(me);for(var Ee=0;Ee<Z[pe].length;Ee+=1)Z[pe][Ee]=255&M.getBuffer()[Ee+G];G+=me;var ie=s.getErrorCorrectPolynomial(xe),Ne=u(Z[pe],ie.getLength()-1),dt=Ne.mod(ie);ne[pe]=new Array(ie.getLength()-1);for(var Ee=0;Ee<ne[pe].length;Ee+=1){var Te=Ee+dt.getLength()-ne[pe].length;ne[pe][Ee]=Te>=0?dt.getAt(Te):0}}for(var Me=0,Ee=0;Ee<R.length;Ee+=1)Me+=R[Ee].totalCount;for(var bt=new Array(Me),$e=0,Ee=0;Ee<O;Ee+=1)for(var pe=0;pe<R.length;pe+=1)Ee<Z[pe].length&&(bt[$e]=Z[pe][Ee],$e+=1);for(var Ee=0;Ee<T;Ee+=1)for(var pe=0;pe<R.length;pe+=1)Ee<ne[pe].length&&(bt[$e]=ne[pe][Ee],$e+=1);return bt},de=function(M,R,G){for(var O=f.getRSBlocks(M,R),T=d(),Z=0;Z<G.length;Z+=1){var ne=G[Z];T.put(ne.getMode(),4),T.put(ne.getLength(),s.getLengthInBits(ne.getMode(),M)),ne.write(T)}for(var pe=0,Z=0;Z<O.length;Z+=1)pe+=O[Z].dataCount;if(T.getLengthInBits()>pe*8)throw"code length overflow. ("+T.getLengthInBits()+">"+pe*8+")";for(T.getLengthInBits()+4<=pe*8&&T.put(0,4);T.getLengthInBits()%8!=0;)T.putBit(!1);for(;!(T.getLengthInBits()>=pe*8||(T.put(S,8),T.getLengthInBits()>=pe*8));)T.put(C,8);return re(T,O)};Y.addData=function(M,R){R=R||"Byte";var G=null;switch(R){case"Numeric":G=p(M);break;case"Alphanumeric":G=h(M);break;case"Byte":G=g(M);break;case"Kanji":G=v(M);break;default:throw"mode:"+R}K.push(G),J=null},Y.isDark=function(M,R){if(M<0||N<=M||R<0||N<=R)throw M+","+R;return D[M][R]},Y.getModuleCount=function(){return N},Y.make=function(){if(P<1){for(var M=1;M<40;M++){for(var R=f.getRSBlocks(M,F),G=d(),O=0;O<K.length;O++){var T=K[O];G.put(T.getMode(),4),G.put(T.getLength(),s.getLengthInBits(T.getMode(),M)),T.write(G)}for(var Z=0,O=0;O<R.length;O++)Z+=R[O].dataCount;if(G.getLengthInBits()<=Z*8)break}P=M}te(!1,le())},Y.createTableTag=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var G="";G+='<table style="',G+=" border-width: 0px; border-style: none;",G+=" border-collapse: collapse;",G+=" padding: 0px; margin: "+R+"px;",G+='">',G+="<tbody>";for(var O=0;O<Y.getModuleCount();O+=1){G+="<tr>";for(var T=0;T<Y.getModuleCount();T+=1)G+='<td style="',G+=" border-width: 0px; border-style: none;",G+=" border-collapse: collapse;",G+=" padding: 0px; margin: 0px;",G+=" width: "+M+"px;",G+=" height: "+M+"px;",G+=" background-color: ",G+=Y.isDark(O,T)?"#000000":"#ffffff",G+=";",G+='"/>';G+="</tr>"}return G+="</tbody>",G+="</table>",G},Y.createSvgTag=function(M,R,G,O){var T={};typeof arguments[0]=="object"&&(T=arguments[0],M=T.cellSize,R=T.margin,G=T.alt,O=T.title),M=M||2,R=typeof R>"u"?M*4:R,G=typeof G=="string"?{text:G}:G||{},G.text=G.text||null,G.id=G.text?G.id||"qrcode-description":null,O=typeof O=="string"?{text:O}:O||{},O.text=O.text||null,O.id=O.text?O.id||"qrcode-title":null;var Z=Y.getModuleCount()*M+R*2,ne,pe,me,xe,Ee="",ie;for(ie="l"+M+",0 0,"+M+" -"+M+",0 0,-"+M+"z ",Ee+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',Ee+=T.scalable?"":' width="'+Z+'px" height="'+Z+'px"',Ee+=' viewBox="0 0 '+Z+" "+Z+'" ',Ee+=' preserveAspectRatio="xMinYMin meet"',Ee+=O.text||G.text?' role="img" aria-labelledby="'+U([O.id,G.id].join(" ").trim())+'"':"",Ee+=">",Ee+=O.text?'<title id="'+U(O.id)+'">'+U(O.text)+"</title>":"",Ee+=G.text?'<description id="'+U(G.id)+'">'+U(G.text)+"</description>":"",Ee+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',Ee+='<path d="',me=0;me<Y.getModuleCount();me+=1)for(xe=me*M+R,ne=0;ne<Y.getModuleCount();ne+=1)Y.isDark(me,ne)&&(pe=ne*M+R,Ee+="M"+pe+","+xe+ie);return Ee+='" stroke="transparent" fill="black"/>',Ee+="</svg>",Ee},Y.createDataURL=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var G=Y.getModuleCount()*M+R*2,O=R,T=G-R;return x(G,G,function(Z,ne){if(O<=Z&&Z<T&&O<=ne&&ne<T){var pe=Math.floor((Z-O)/M),me=Math.floor((ne-O)/M);return Y.isDark(me,pe)?0:1}else return 1})},Y.createImgTag=function(M,R,G){M=M||2,R=typeof R>"u"?M*4:R;var O=Y.getModuleCount()*M+R*2,T="";return T+="<img",T+=' src="',T+=Y.createDataURL(M,R),T+='"',T+=' width="',T+=O,T+='"',T+=' height="',T+=O,T+='"',G&&(T+=' alt="',T+=U(G),T+='"'),T+="/>",T};var U=function(M){for(var R="",G=0;G<M.length;G+=1){var O=M.charAt(G);switch(O){case"<":R+="&lt;";break;case">":R+="&gt;";break;case"&":R+="&amp;";break;case'"':R+="&quot;";break;default:R+=O;break}}return R},z=function(M){var R=1;M=typeof M>"u"?R*2:M;var G=Y.getModuleCount()*R+M*2,O=M,T=G-M,Z,ne,pe,me,xe,Ee={"██":"█","█ ":"▀"," █":"▄"," ":" "},ie={"██":"▀","█ ":"▀"," █":" "," ":" "},Ne="";for(Z=0;Z<G;Z+=2){for(pe=Math.floor((Z-O)/R),me=Math.floor((Z+1-O)/R),ne=0;ne<G;ne+=1)xe="█",O<=ne&&ne<T&&O<=Z&&Z<T&&Y.isDark(pe,Math.floor((ne-O)/R))&&(xe=" "),O<=ne&&ne<T&&O<=Z+1&&Z+1<T&&Y.isDark(me,Math.floor((ne-O)/R))?xe+=" ":xe+="█",Ne+=M<1&&Z+1>=T?ie[xe]:Ee[xe];Ne+=`
208
- `}return G%2&&M>0?Ne.substring(0,Ne.length-G-1)+Array(G+1).join("▀"):Ne.substring(0,Ne.length-1)};return Y.createASCII=function(M,R){if(M=M||1,M<2)return z(R);M-=1,R=typeof R>"u"?M*2:R;var G=Y.getModuleCount()*M+R*2,O=R,T=G-R,Z,ne,pe,me,xe=Array(M+1).join("██"),Ee=Array(M+1).join(" "),ie="",Ne="";for(Z=0;Z<G;Z+=1){for(pe=Math.floor((Z-O)/M),Ne="",ne=0;ne<G;ne+=1)me=1,O<=ne&&ne<T&&O<=Z&&Z<T&&Y.isDark(pe,Math.floor((ne-O)/M))&&(me=0),Ne+=me?xe:Ee;for(pe=0;pe<M;pe+=1)ie+=Ne+`
209
- `}return ie.substring(0,ie.length-1)},Y.renderTo2dContext=function(M,R){R=R||2;for(var G=Y.getModuleCount(),O=0;O<G;O++)for(var T=0;T<G;T++)M.fillStyle=Y.isDark(O,T)?"black":"white",M.fillRect(O*R,T*R,R,R)},Y};n.stringToBytesFuncs={default:function(k){for(var I=[],S=0;S<k.length;S+=1){var C=k.charCodeAt(S);I.push(C&255)}return I}},n.stringToBytes=n.stringToBytesFuncs.default,n.createStringToBytes=function(k,I){var S=function(){for(var P=w(k),F=function(){var ae=P.read();if(ae==-1)throw"eof";return ae},D=0,N={};;){var J=P.read();if(J==-1)break;var K=F(),Y=F(),te=F(),oe=String.fromCharCode(J<<8|K),le=Y<<8|te;N[oe]=le,D+=1}if(D!=I)throw D+" != "+I;return N}(),C=63;return function(P){for(var F=[],D=0;D<P.length;D+=1){var N=P.charCodeAt(D);if(N<128)F.push(N);else{var J=S[P.charAt(D)];typeof J=="number"?(J&255)==J?F.push(J):(F.push(J>>>8),F.push(J&255)):F.push(C)}}return F}};var o={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},i={L:1,M:0,Q:3,H:2},a={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var k=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],I=1335,S=7973,C=21522,P={},F=function(D){for(var N=0;D!=0;)N+=1,D>>>=1;return N};return P.getBCHTypeInfo=function(D){for(var N=D<<10;F(N)-F(I)>=0;)N^=I<<F(N)-F(I);return(D<<10|N)^C},P.getBCHTypeNumber=function(D){for(var N=D<<12;F(N)-F(S)>=0;)N^=S<<F(N)-F(S);return D<<12|N},P.getPatternPosition=function(D){return k[D-1]},P.getMaskFunction=function(D){switch(D){case a.PATTERN000:return function(N,J){return(N+J)%2==0};case a.PATTERN001:return function(N,J){return N%2==0};case a.PATTERN010:return function(N,J){return J%3==0};case a.PATTERN011:return function(N,J){return(N+J)%3==0};case a.PATTERN100:return function(N,J){return(Math.floor(N/2)+Math.floor(J/3))%2==0};case a.PATTERN101:return function(N,J){return N*J%2+N*J%3==0};case a.PATTERN110:return function(N,J){return(N*J%2+N*J%3)%2==0};case a.PATTERN111:return function(N,J){return(N*J%3+(N+J)%2)%2==0};default:throw"bad maskPattern:"+D}},P.getErrorCorrectPolynomial=function(D){for(var N=u([1],0),J=0;J<D;J+=1)N=N.multiply(u([1,l.gexp(J)],0));return N},P.getLengthInBits=function(D,N){if(1<=N&&N<10)switch(D){case o.MODE_NUMBER:return 10;case o.MODE_ALPHA_NUM:return 9;case o.MODE_8BIT_BYTE:return 8;case o.MODE_KANJI:return 8;default:throw"mode:"+D}else if(N<27)switch(D){case o.MODE_NUMBER:return 12;case o.MODE_ALPHA_NUM:return 11;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 10;default:throw"mode:"+D}else if(N<41)switch(D){case o.MODE_NUMBER:return 14;case o.MODE_ALPHA_NUM:return 13;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 12;default:throw"mode:"+D}else throw"type:"+N},P.getLostPoint=function(D){for(var N=D.getModuleCount(),J=0,K=0;K<N;K+=1)for(var Y=0;Y<N;Y+=1){for(var te=0,oe=D.isDark(K,Y),le=-1;le<=1;le+=1)if(!(K+le<0||N<=K+le))for(var ae=-1;ae<=1;ae+=1)Y+ae<0||N<=Y+ae||le==0&&ae==0||oe==D.isDark(K+le,Y+ae)&&(te+=1);te>5&&(J+=3+te-5)}for(var K=0;K<N-1;K+=1)for(var Y=0;Y<N-1;Y+=1){var ge=0;D.isDark(K,Y)&&(ge+=1),D.isDark(K+1,Y)&&(ge+=1),D.isDark(K,Y+1)&&(ge+=1),D.isDark(K+1,Y+1)&&(ge+=1),(ge==0||ge==4)&&(J+=3)}for(var K=0;K<N;K+=1)for(var Y=0;Y<N-6;Y+=1)D.isDark(K,Y)&&!D.isDark(K,Y+1)&&D.isDark(K,Y+2)&&D.isDark(K,Y+3)&&D.isDark(K,Y+4)&&!D.isDark(K,Y+5)&&D.isDark(K,Y+6)&&(J+=40);for(var Y=0;Y<N;Y+=1)for(var K=0;K<N-6;K+=1)D.isDark(K,Y)&&!D.isDark(K+1,Y)&&D.isDark(K+2,Y)&&D.isDark(K+3,Y)&&D.isDark(K+4,Y)&&!D.isDark(K+5,Y)&&D.isDark(K+6,Y)&&(J+=40);for(var ce=0,Y=0;Y<N;Y+=1)for(var K=0;K<N;K+=1)D.isDark(K,Y)&&(ce+=1);var q=Math.abs(100*ce/N/N-50)/5;return J+=q*10,J},P}(),l=function(){for(var k=new Array(256),I=new Array(256),S=0;S<8;S+=1)k[S]=1<<S;for(var S=8;S<256;S+=1)k[S]=k[S-4]^k[S-5]^k[S-6]^k[S-8];for(var S=0;S<255;S+=1)I[k[S]]=S;var C={};return C.glog=function(P){if(P<1)throw"glog("+P+")";return I[P]},C.gexp=function(P){for(;P<0;)P+=255;for(;P>=256;)P-=255;return k[P]},C}();function u(k,I){if(typeof k.length>"u")throw k.length+"/"+I;var S=function(){for(var P=0;P<k.length&&k[P]==0;)P+=1;for(var F=new Array(k.length-P+I),D=0;D<k.length-P;D+=1)F[D]=k[D+P];return F}(),C={};return C.getAt=function(P){return S[P]},C.getLength=function(){return S.length},C.multiply=function(P){for(var F=new Array(C.getLength()+P.getLength()-1),D=0;D<C.getLength();D+=1)for(var N=0;N<P.getLength();N+=1)F[D+N]^=l.gexp(l.glog(C.getAt(D))+l.glog(P.getAt(N)));return u(F,0)},C.mod=function(P){if(C.getLength()-P.getLength()<0)return C;for(var F=l.glog(C.getAt(0))-l.glog(P.getAt(0)),D=new Array(C.getLength()),N=0;N<C.getLength();N+=1)D[N]=C.getAt(N);for(var N=0;N<P.getLength();N+=1)D[N]^=l.gexp(l.glog(P.getAt(N))+F);return u(D,0).mod(P)},C}var f=function(){var k=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],I=function(P,F){var D={};return D.totalCount=P,D.dataCount=F,D},S={},C=function(P,F){switch(F){case i.L:return k[(P-1)*4+0];case i.M:return k[(P-1)*4+1];case i.Q:return k[(P-1)*4+2];case i.H:return k[(P-1)*4+3];default:return}};return S.getRSBlocks=function(P,F){var D=C(P,F);if(typeof D>"u")throw"bad rs block @ typeNumber:"+P+"/errorCorrectionLevel:"+F;for(var N=D.length/3,J=[],K=0;K<N;K+=1)for(var Y=D[K*3+0],te=D[K*3+1],oe=D[K*3+2],le=0;le<Y;le+=1)J.push(I(te,oe));return J},S}(),d=function(){var k=[],I=0,S={};return S.getBuffer=function(){return k},S.getAt=function(C){var P=Math.floor(C/8);return(k[P]>>>7-C%8&1)==1},S.put=function(C,P){for(var F=0;F<P;F+=1)S.putBit((C>>>P-F-1&1)==1)},S.getLengthInBits=function(){return I},S.putBit=function(C){var P=Math.floor(I/8);k.length<=P&&k.push(0),C&&(k[P]|=128>>>I%8),I+=1},S},p=function(k){var I=o.MODE_NUMBER,S=k,C={};C.getMode=function(){return I},C.getLength=function(D){return S.length},C.write=function(D){for(var N=S,J=0;J+2<N.length;)D.put(P(N.substring(J,J+3)),10),J+=3;J<N.length&&(N.length-J==1?D.put(P(N.substring(J,J+1)),4):N.length-J==2&&D.put(P(N.substring(J,J+2)),7))};var P=function(D){for(var N=0,J=0;J<D.length;J+=1)N=N*10+F(D.charAt(J));return N},F=function(D){if("0"<=D&&D<="9")return D.charCodeAt(0)-48;throw"illegal char :"+D};return C},h=function(k){var I=o.MODE_ALPHA_NUM,S=k,C={};C.getMode=function(){return I},C.getLength=function(F){return S.length},C.write=function(F){for(var D=S,N=0;N+1<D.length;)F.put(P(D.charAt(N))*45+P(D.charAt(N+1)),11),N+=2;N<D.length&&F.put(P(D.charAt(N)),6)};var P=function(F){if("0"<=F&&F<="9")return F.charCodeAt(0)-48;if("A"<=F&&F<="Z")return F.charCodeAt(0)-65+10;switch(F){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+F}};return C},g=function(k){var I=o.MODE_8BIT_BYTE,S=n.stringToBytes(k),C={};return C.getMode=function(){return I},C.getLength=function(P){return S.length},C.write=function(P){for(var F=0;F<S.length;F+=1)P.put(S[F],8)},C},v=function(k){var I=o.MODE_KANJI,S=n.stringToBytesFuncs.SJIS;if(!S)throw"sjis not supported.";(function(F,D){var N=S(F);if(N.length!=2||(N[0]<<8|N[1])!=D)throw"sjis not supported."})("友",38726);var C=S(k),P={};return P.getMode=function(){return I},P.getLength=function(F){return~~(C.length/2)},P.write=function(F){for(var D=C,N=0;N+1<D.length;){var J=(255&D[N])<<8|255&D[N+1];if(33088<=J&&J<=40956)J-=33088;else if(57408<=J&&J<=60351)J-=49472;else throw"illegal char at "+(N+1)+"/"+J;J=(J>>>8&255)*192+(J&255),F.put(J,13),N+=2}if(N<D.length)throw"illegal char at "+(N+1)},P},y=function(){var k=[],I={};return I.writeByte=function(S){k.push(S&255)},I.writeShort=function(S){I.writeByte(S),I.writeByte(S>>>8)},I.writeBytes=function(S,C,P){C=C||0,P=P||S.length;for(var F=0;F<P;F+=1)I.writeByte(S[F+C])},I.writeString=function(S){for(var C=0;C<S.length;C+=1)I.writeByte(S.charCodeAt(C))},I.toByteArray=function(){return k},I.toString=function(){var S="";S+="[";for(var C=0;C<k.length;C+=1)C>0&&(S+=","),S+=k[C];return S+="]",S},I},m=function(){var k=0,I=0,S=0,C="",P={},F=function(N){C+=String.fromCharCode(D(N&63))},D=function(N){if(!(N<0)){if(N<26)return 65+N;if(N<52)return 97+(N-26);if(N<62)return 48+(N-52);if(N==62)return 43;if(N==63)return 47}throw"n:"+N};return P.writeByte=function(N){for(k=k<<8|N&255,I+=8,S+=1;I>=6;)F(k>>>I-6),I-=6},P.flush=function(){if(I>0&&(F(k<<6-I),k=0,I=0),S%3!=0)for(var N=3-S%3,J=0;J<N;J+=1)C+="="},P.toString=function(){return C},P},w=function(k){var I=k,S=0,C=0,P=0,F={};F.read=function(){for(;P<8;){if(S>=I.length){if(P==0)return-1;throw"unexpected end of file./"+P}var N=I.charAt(S);if(S+=1,N=="=")return P=0,-1;if(N.match(/^\s$/))continue;C=C<<6|D(N.charCodeAt(0)),P+=6}var J=C>>>P-8&255;return P-=8,J};var D=function(N){if(65<=N&&N<=90)return N-65;if(97<=N&&N<=122)return N-97+26;if(48<=N&&N<=57)return N-48+52;if(N==43)return 62;if(N==47)return 63;throw"c:"+N};return F},E=function(k,I){var S=k,C=I,P=new Array(k*I),F={};F.setPixel=function(K,Y,te){P[Y*S+K]=te},F.write=function(K){K.writeString("GIF87a"),K.writeShort(S),K.writeShort(C),K.writeByte(128),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(255),K.writeByte(255),K.writeByte(255),K.writeString(","),K.writeShort(0),K.writeShort(0),K.writeShort(S),K.writeShort(C),K.writeByte(0);var Y=2,te=N(Y);K.writeByte(Y);for(var oe=0;te.length-oe>255;)K.writeByte(255),K.writeBytes(te,oe,255),oe+=255;K.writeByte(te.length-oe),K.writeBytes(te,oe,te.length-oe),K.writeByte(0),K.writeString(";")};var D=function(K){var Y=K,te=0,oe=0,le={};return le.write=function(ae,ge){if(ae>>>ge)throw"length over";for(;te+ge>=8;)Y.writeByte(255&(ae<<te|oe)),ge-=8-te,ae>>>=8-te,oe=0,te=0;oe=ae<<te|oe,te=te+ge},le.flush=function(){te>0&&Y.writeByte(oe)},le},N=function(K){for(var Y=1<<K,te=(1<<K)+1,oe=K+1,le=J(),ae=0;ae<Y;ae+=1)le.add(String.fromCharCode(ae));le.add(String.fromCharCode(Y)),le.add(String.fromCharCode(te));var ge=y(),ce=D(ge);ce.write(Y,oe);var q=0,H=String.fromCharCode(P[q]);for(q+=1;q<P.length;){var re=String.fromCharCode(P[q]);q+=1,le.contains(H+re)?H=H+re:(ce.write(le.indexOf(H),oe),le.size()<4095&&(le.size()==1<<oe&&(oe+=1),le.add(H+re)),H=re)}return ce.write(le.indexOf(H),oe),ce.write(te,oe),ce.flush(),ge.toByteArray()},J=function(){var K={},Y=0,te={};return te.add=function(oe){if(te.contains(oe))throw"dup key:"+oe;K[oe]=Y,Y+=1},te.size=function(){return Y},te.indexOf=function(oe){return K[oe]},te.contains=function(oe){return typeof K[oe]<"u"},te};return F},x=function(k,I,S){for(var C=E(k,I),P=0;P<I;P+=1)for(var F=0;F<k;F+=1)C.setPixel(F,P,S(F,P));var D=y();C.write(D);for(var N=m(),J=D.toByteArray(),K=0;K<J.length;K+=1)N.writeByte(J[K]);return N.flush(),"data:image/gif;base64,"+N};return n}();(function(){r.stringToBytesFuncs["UTF-8"]=function(n){function o(i){for(var a=[],s=0;s<i.length;s++){var l=i.charCodeAt(s);l<128?a.push(l):l<2048?a.push(192|l>>6,128|l&63):l<55296||l>=57344?a.push(224|l>>12,128|l>>6&63,128|l&63):(s++,l=65536+((l&1023)<<10|i.charCodeAt(s)&1023),a.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return a}return o(n)}})(),function(n){e.exports=n()}(function(){return r})})(m1);var KF=m1.exports;const Zf=sn(KF);var qF=Object.defineProperty,ul=Object.getOwnPropertySymbols,b1=Object.prototype.hasOwnProperty,y1=Object.prototype.propertyIsEnumerable,w1=(e,t,r)=>t in e?qF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,YF=(e,t)=>{for(var r in t||(t={}))b1.call(t,r)&&w1(e,r,t[r]);if(ul)for(var r of ul(t))y1.call(t,r)&&w1(e,r,t[r]);return e},JF=(e,t)=>{var r={};for(var n in e)b1.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ul)for(var n of ul(e))t.indexOf(n)<0&&y1.call(e,n)&&(r[n]=e[n]);return r},en=1e3,XF=/code length overflow/i;Zf.stringToBytes=Zf.stringToBytesFuncs["UTF-8"];var ZF=(e,t,r)=>{r=Math.max(1,r);for(let n=r;n<=40;n+=1)try{const o=Zf(n,t);o.addData(e),o.make();const i=o.getModuleCount();return{text:e,level:t,version:n,moduleCount:i,isDark:(s,l)=>s>=0&&s<i&&l>=0&&l<i&&o.isDark(s,l)}}catch(o){if(!(n<40&&XF.test(String(o))))throw o}return null},An=Math.round,qo=(e,t)=>`M ${An(e)} ${An(t)}`,Rt=(e,t)=>`L ${An(e)} ${An(t)}`,On=(e,t,r)=>`A ${An(r)} ${An(r)} 0 0 1 ${An(e)} ${An(t)}`,QF=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i?u.push(qo(e+o,t)):u.push(qo(e,t)),a?u.push(Rt(r-o,t),On(r,t+o,o)):u.push(Rt(r,t)),s?u.push(Rt(r,n-o),On(r-o,n,o)):u.push(Rt(r,n)),l?u.push(Rt(e+o,n),On(e,n-o,o)):u.push(Rt(e,n)),i?u.push(Rt(e,t+o),On(e+o,t,o)):u.push(Rt(e,t)),u.join(" ")},e9=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i&&u.push(qo(e+o,t),Rt(e,t),Rt(e,t+o),On(e+o,t,o)),a&&u.push(qo(r,t+o),Rt(r,t),Rt(r-o,t),On(r,t+o,o)),s&&u.push(qo(r-o,n),Rt(r,n),Rt(r,n-o),On(r-o,n,o)),l&&u.push(qo(e,n-o),Rt(e,n),Rt(e+o,n),On(e,n-o,o)),u.join(" ")},t9=(e,t,r,n,o)=>{const i=o*r,a=n*r,s=i+r,l=a+r,u=t*.005*r,f=e.isDark,d=n-1,p=n+1,h=o-1,g=o+1,v=f(n,o),y=f(d,h),m=f(d,o),w=f(d,g),E=f(n,g),x=f(p,g),k=f(p,o),I=f(p,h),S=f(n,h);return v?QF(i,a,s,l,u,!m&&!S,!m&&!E,!k&&!E,!k&&!S):e9(i,a,s,l,u,m&&S&&y,m&&E&&w,k&&E&&x,k&&S&&I)},r9=(e,t)=>{if(!e)return"";const r=e.moduleCount,n=en/r,o=[];for(let i=0;i<r;i+=1)for(let a=0;a<r;a+=1)o.push(t9(e,t,n,i,a));return o.join(" ")},n9=e=>{var t=e,{color:r="#000",backgroundColor:n,cutout:o=!1,cutoutElement:i,errorCorrectionLevel:a="Q",rounding:s=0,children:l}=t,u=JF(t,["color","backgroundColor","cutout","cutoutElement","errorCorrectionLevel","rounding","children"]),f,d;const p=c.useMemo(()=>ZF(l,a,1),[l,a]);if(!p)return null;const h=(f=p==null?void 0:p.moduleCount)!=null?f:1,v=en/((d=p==null?void 0:p.moduleCount)!=null?d:1)*(Math.floor(h*.18)*2-1)+2,y=(en-v)/2;return ve.createElement("svg",YF({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${en} ${en}`},u),o?ve.createElement("mask",{id:"react-qr-rounded__mask"},ve.createElement("rect",{x:"0",y:"0",width:en,height:en,fill:"#fff"}),ve.createElement("rect",{x:y,y,width:v,height:v,rx:s,ry:s,fill:"#000"})):null,n?ve.createElement("rect",{x:"0",y:"0",width:en,height:en,fill:n}):null,ve.createElement("path",{fill:r,d:r9(p,s),mask:o?"url(#react-qr-rounded__mask)":void 0}),i?ve.createElement("foreignObject",{x:y,y,width:v,height:v},ve.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",overflow:"hidden",borderRadius:s}},i)):null)};const Qf=({children:e,...t})=>c.createElement(st.View,{...t,classNames:"grow flex flex-col justify-around items-center"},e),_1=({invitationUrl:e,active:t,send:r,status:n,type:o,authCode:i,id:a})=>{const{t:s}=tt("os"),l=Et("invitation-manager__qr-code"),u=o===we.Type.MULTIUSE?0:bL.get(n)??0,f=u===3,d=wf(a??""),p=c.useMemo(()=>{switch(!0){case u===5:case u<0:return"showing final";case u===3:return"showing auth code";default:return"showing qr"}},[u]);return c.createElement(c.Fragment,null,c.createElement(st.Root,{activeView:p,classNames:"grow plb-1"},c.createElement(st.Views,null,c.createElement(Qf,{id:"showing qr",emoji:d},c.createElement("p",{className:"text-sm mlb-1 font-normal text-center"},s(o===we.Type.MULTIUSE?"invite many qr label":"invite one qr label")),c.createElement("div",{role:"none",className:ue(Ot,"is-full max-is-[14rem] relative")},c.createElement(n9,{rounding:100,backgroundColor:"transparent",color:"currentColor",className:ue("is-full bs-full p-2",f&&"invisible"),"aria-labelledby":l,errorCorrectionLevel:"Q",cutout:!0},e??"never"),c.createElement(C7,null,c.createElement(_f,{text:d}))),c.createElement("span",{id:l,className:"sr-only"},s("qr label")),c.createElement(Ak,{variant:"ghost",value:e??"never"})),c.createElement(Qf,{id:"showing auth code"},c.createElement(vy,null,s("auth code message")),c.createElement(hy,{code:i,large:!0,classNames:"text-black dark:text-white"}),c.createElement(vy,null,"Be sure the other device is showing this symbol:"),d&&c.createElement(_f,{text:d})),c.createElement(Qf,{id:"showing final"},u>0?c.createElement(ze.Check,{className:ue("m-1.5",We(6))}):c.createElement(ze.X,{className:ue("m-1.5",We(6))})))),c.createElement(zt,{classNames:"mbs-4"},c.createElement(at,{disabled:!t,onClick:()=>r==null?void 0:r({type:"deselectInvitation"})},s("back label"))))},Yo="pbs-1 pbe-3 pli-3",o9=({titleId:e,title:t,identity:r,onDone:n})=>{var i;const o=is(r.identityKey.toHex(),12);return c.createElement(Ef,{titleId:e,title:t,corner:c.createElement(gy,{onDone:n})},c.createElement(Tt.Root,{size:12,variant:"circle",status:"active"},c.createElement(Tt.Frame,{classNames:"block mbs-4 mbe-2 mli-auto chromatic-ignore"},c.createElement(Tt.Fallback,{href:o})),c.createElement(Tt.Label,{classNames:"block text-center font-light text-xl","data-testid":"identityHeading.displayName"},((i=r.profile)==null?void 0:i.displayName)??uu(r.identityKey.toHex()))))},E1=e=>{const{identity:t,titleId:r,activeView:n,onUpdateProfile:o,onResetDevice:i,onJoinNewIdentity:a,IdentityActionChooser:s=RF,InvitationManager:l=_1,onDone:u,...f}=e,{t:d}=tt("os"),p=c.useMemo(()=>{switch(n){case"agent manager":return"Manage Agent";case"device invitation manager":return d("choose add device label");default:return d("identity heading")}},[n,d]);return c.createElement(xo,{density:"fine"},c.createElement(o9,{identity:t,titleId:r,title:p,onDone:u}),c.createElement(st.Root,{activeView:n},c.createElement(st.Views,null,c.createElement(st.View,{id:"identity action chooser",classNames:Yo},c.createElement(s,{active:n==="identity action chooser",...f})),c.createElement(st.View,{id:"device invitation manager",classNames:Yo},c.createElement(l,{active:n==="device invitation manager",...f,invitationUrl:f.createInvitationUrl(f.invitationCode)})),c.createElement(st.View,{id:"device manager",classNames:Yo},c.createElement(BF,{active:n==="device manager",...f})),c.createElement(st.View,{classNames:Yo,id:"update profile form"},c.createElement(WF,{send:f.send,active:n==="update profile form",profile:t.profile,onUpdateProfile:o})),c.createElement(st.View,{classNames:Yo,id:"signing out"},c.createElement(VF,{send:f.send,active:n==="signing out",onResetDevice:i,onJoinNewIdentity:a})),c.createElement(st.View,{classNames:Yo,id:"agent manager"},c.createElement(jF,{send:f.send,active:n==="agent manager",...f})))))},i9=({invitation:e,...t})=>{const r=af(e);return c.createElement(E1,{...t,...r})},a9=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=Et("identityPanel__heading",e),o=Ue.useClient(),i=si.useDevices(),a=si.useIdentity(),s=si.useHaloInvitations(),l=GF({client:o,identity:a,invitations:s});if(!a)return console.error("IdentityPanel rendered with no active identity."),null;const[u,f,d]=FF(o);c.useEffect(()=>d.subscribe(y=>{Xe("[state]",y)}).unsubscribe,[d]);const p=c.useMemo(()=>{switch(!0){case u.matches("choosingAction"):return"identity action chooser";case u.matches("managingDeviceInvitation"):return"device invitation manager";case u.matches("managingDevices"):return"device manager";case[{managingProfile:"idle"},{managingProfile:"pending"}].some(u.matches):return"update profile form";case u.matches("signingOut"):return"signing out";case[{managingAgent:"idle"},{managingAgent:"pending"}].some(u.matches):return"agent manager";default:return"identity action chooser"}},[u]),g={...r,identity:a,devices:i,activeView:p,send:f,titleId:n,createInvitationUrl:t,onUpdateProfile:async v=>{f({type:"updateProfile"}),await o.halo.updateProfile(v)},...l};return u.context.invitation?c.createElement(i9,{...g,invitation:u.context.invitation}):c.createElement(E1,{...g})},s9=c.forwardRef(({mode:e,titleId:t,onExit:r,exitActionParent:n},o)=>{const{t:i}=tt("os"),a=c.createElement(yr,{variant:"ghost",...r&&{onClick:r},classNames:ue(Ot,"plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),"data-testid":"join-exit"},c.createElement(ze.X,{weight:"bold",className:We(4)}),c.createElement("span",{className:"sr-only"},i("exit label")));return c.createElement(Ef,{ref:o,titleId:t,title:i(e==="halo-only"?"selecting identity heading":"joining space heading"),...e==="halo-only"?{titleSrOnly:!0}:{corner:n?c.cloneElement(n,{},a):a},titleSrOnly:e==="halo-only"})}),x1=(e,t)=>(Xe("[subscribing to invitation]",t),{subscribe:(r,n,o)=>t.subscribe(i=>{switch(i.state){case we.State.CONNECTING:return Xe("[invitation connecting]",{Kind:e,invitation:i}),r({type:`connecting${e}Invitation`,invitation:i});case we.State.CONNECTED:return Xe("[invitation connected]",{Kind:e,invitation:i}),r({type:`connected${e}Invitation`,invitation:i});case we.State.READY_FOR_AUTHENTICATION:return Xe("[invitation ready for authentication]",{Kind:e,invitation:i}),r({type:`readyForAuthentication${e}Invitation`,invitation:i});case we.State.AUTHENTICATING:return Xe("[invitation authenticating]",{Kind:e,invitation:i}),r({type:`authenticating${e}Invitation`,invitation:i});case we.State.SUCCESS:return Xe("[invitation success]",{Kind:e,invitation:i}),r({type:`success${e}Invitation`,invitation:i}),o==null?void 0:o();case we.State.CANCELLED:return Xe.warn("[invitation cancelled]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"cancelled"});case we.State.TIMEOUT:return Xe.error("[invitation timeout]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"timeout"})}},i=>i instanceof Ue.AlreadyJoinedError?(Xe("[already joined]",{Kind:e,error:i}),r({type:`success${e}Invitation`,invitation:t.get()}),o==null?void 0:o()):(Xe.error("[invitation errored]",{Kind:e,error:i}),r({type:`fail${e}Invitation`,reason:"error"}),n==null?void 0:n(i)))}),S1=(e,t)=>({initial:`unknown${e}`,states:{[`unknown${e}`]:{always:[{cond:({mode:n})=>n==="halo-only"&&e==="Space",target:"#join.finishingJoiningHalo"},{cond:n=>!!n[e.toLowerCase()].unredeemedCode,target:`acceptingRedeemed${e}Invitation`,actions:[`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]},{target:`inputting${e}InvitationCode`,actions:"log"}]},[`inputting${e}InvitationCode`]:{},[`acceptingRedeemed${e}Invitation`]:{invoke:{src:n=>n[e.toLowerCase()].invitationSubscribable},initial:`unknown${e}Invitation`,states:{[`unknown${e}Invitation`]:{always:[{cond:n=>{var o,i;if(e!=="Space")return!1;{const a=(i=(o=n.space.invitation)==null?void 0:o.spaceKey)==null?void 0:i.toHex(),s=n.space.succeededKeys;return a?!!(s!=null&&s.has(a)):!1}},target:t,actions:"log"},{cond:n=>{const o=n[e.toLowerCase()].invitation;return!o||(o==null?void 0:o.state)===we.State.CONNECTING},target:`connecting${e}Invitation`,actions:"log"},{target:`inputting${e}VerificationCode`,actions:"log"}]},[`connecting${e}Invitation`]:{},[`inputting${e}VerificationCode`]:{},[`authenticating${e}VerificationCode`]:{on:{[`readyForAuthentication${e}Invitation`]:{target:`authenticationFailing${e}VerificationCode`,actions:["setInvitation","log"]}}},[`authenticationFailing${e}VerificationCode`]:{},[`failing${e}Invitation`]:{},[`success${e}Invitation`]:{}},on:{[`reset${e}Invitation`]:{target:`#join${e==="Halo"?".choosingIdentity":""}.accepting${e}Invitation.unknown${e}`,actions:["resetInvitation","log"]},[`connecting${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`connected${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`readyForAuthentication${e}Invitation`]:{target:`.inputting${e}VerificationCode`,actions:["setInvitation","log"]},[`authenticating${e}Invitation`]:{target:`.authenticating${e}VerificationCode`,actions:["setInvitation","log"]},[`success${e}Invitation`]:{target:t,actions:["setInvitation","log"]},[`fail${e}Invitation`]:{target:`.failing${e}Invitation`,actions:[Gt({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],failReason:o.reason})}),"log"]}}}},on:{[`set${e}InvitationCode`]:{target:`.acceptingRedeemed${e}Invitation`,actions:[Gt({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],unredeemedCode:o.code,succeededKeys:o.succeededKeys})}),`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]}}}),l9=Jf({id:"join",predictableActionArguments:!0,context:{mode:"default",identity:null,halo:{},space:{}},initial:"unknown",states:{unknown:{always:[{cond:"existingIdentity",target:"resettingIdentity",actions:"log"},{cond:"noSelectedIdentity",target:"choosingIdentity",actions:"log"},{target:"acceptingSpaceInvitation",actions:"log"}]},choosingIdentity:{initial:"unknownAuthMethod",states:{unknownAuthMethod:{always:[{cond:"hasHaloUnredeemedCode",target:"acceptingHaloInvitation",actions:"log"},{target:"choosingAuthMethod",actions:"log"}]},choosingAuthMethod:{},recoveringIdentity:{},creatingIdentity:{},acceptingHaloInvitation:S1("Halo","#join.acceptingSpaceInvitation"),confirmingAddedIdentity:{}},on:{recoverIdentity:{target:".recoveringIdentity",actions:"log"},createIdentity:{target:".creatingIdentity",actions:"log"},acceptHaloInvitation:{target:".acceptingHaloInvitation",actions:"log"},addIdentity:{target:".confirmingAddedIdentity",actions:"log"},selectIdentity:{target:"acceptingSpaceInvitation",actions:["setIdentity","log"]},deselectAuthMethod:{target:".choosingAuthMethod",actions:"log"}}},resettingIdentity:{},acceptingSpaceInvitation:S1("Space","#join.finishingJoiningSpace"),finishingJoiningSpace:{type:"final"},finishingJoiningHalo:{type:"final"}},on:{resetIdentity:{target:"choosingIdentity",actions:"unsetIdentity"}}},{guards:{existingIdentity:({identity:e,mode:t},r)=>t==="halo-only"&&!!e,noSelectedIdentity:({identity:e},t)=>!e,hasHaloUnredeemedCode:({halo:e},t)=>!!e.unredeemedCode,noSpaceInvitation:({space:e},t)=>!e.invitation&&!e.unredeemedCode},actions:{setIdentity:Gt({identity:(e,t)=>t.identity}),unsetIdentity:Gt({identity:()=>null}),resetInvitation:Gt({halo:(e,t)=>t.type!=="resetHaloInvitation"?e.halo:(e.halo.invitationObservable&&e.halo.invitationObservable.cancel(),{...e.halo,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0}),space:(e,t)=>t.type!=="resetSpaceInvitation"?e.space:(e.space.invitationObservable&&e.space.invitationObservable.cancel(),{...e.space,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0})}),setInvitation:Gt({halo:(e,t)=>t.type.includes("Halo")?{...e.halo,invitation:t.invitation}:e.halo,space:(e,t)=>t.type.includes("Space")?{...e.space,invitation:t.invitation}:e.space}),log:(e,t)=>{Xe("[transition]",{event:t,haloInvitation:e.halo.invitation,spaceInvitation:e.space.invitation})}}}),$1=(e,t)=>{try{const r=new URLSearchParams(t.substring(t.lastIndexOf("?")));return r.get(`${e}InvitationCode`)??r.get(`${e}Invitation`)??r.get("invitationCode")??r.get("invitation")??t}catch(r){return Xe.catch(r),t}},c9=(e,t)=>{const r=c.useCallback(({halo:a})=>{if(a.unredeemedCode)try{const s=an.InvitationEncoder.decode($1("halo",a.unredeemedCode)),l=e.halo.join(s);return{...a,invitationObservable:l,invitationSubscribable:x1("Halo",l)}}catch(s){return Xe.error("Could not redeem device invitation code",s),a}else return a},[e]),n=c.useCallback(({space:a})=>{if(a.unredeemedCode)try{const s=an.InvitationEncoder.decode($1("space",a.unredeemedCode)),l=e.spaces.join(s);return{...a,invitationObservable:l,invitationSubscribable:x1("Space",l)}}catch(s){return Xe.error("Could not redeem space invitation code",s),a}else return a},[e]),o=c.useCallback(({halo:a})=>{var s;return a.unredeemedCode?((s=t==null?void 0:t.onInvalidateInvitationCode)==null||s.call(t,a.unredeemedCode),{...a,unredeemedCode:void 0}):a},[t==null?void 0:t.onInvalidateInvitationCode]),i=c.useCallback(({space:a})=>{var s;return a.unredeemedCode?((s=t==null?void 0:t.onInvalidateInvitationCode)==null||s.call(t,a.unredeemedCode),{...a,unredeemedCode:void 0}):a},[t==null?void 0:t.onInvalidateInvitationCode]);return Xf(l9,{...t,actions:{...t==null?void 0:t.actions,redeemHaloInvitationCode:Gt({halo:r}),redeemSpaceInvitationCode:Gt({space:n}),invalidateHaloInvitationCode:Gt({halo:o}),invalidateSpaceInvitationCode:Gt({space:i})}})},u9=e=>{const t=!e.active,{send:r}=e,{t:n}=tt("os"),o={disabled:t,after:c.createElement(ze.CaretRight,{className:We(4),weight:"bold"}),slots:{label:{className:"text-sm"}}};return c.createElement(c.Fragment,null,c.createElement(Er,null,n("addition method chooser title")),c.createElement("div",{role:"none",className:"flex flex-col gap-1 grow"},c.createElement(cu,{...o,description:n("create identity description"),before:c.createElement(ze.Plus,{className:We(6)}),onClick:()=>r({type:"createIdentity"}),"data-autofocus":"choosingAuthMethod","data-testid":"identity-chooser.create-identity"},n("create identity label")),c.createElement(cu,{...o,description:n("join identity description"),before:c.createElement(ze.QrCode,{className:We(6)}),onClick:()=>r({type:"acceptHaloInvitation"}),"data-testid":"identity-chooser.join-identity"},n("join identity label")),c.createElement(cu,{...o,disabled:!0,description:n("recover identity description"),before:c.createElement(ze.Textbox,{className:We(6)}),onClick:()=>r({type:"recoverIdentity"}),"data-testid":"identity-chooser.recover-identity"},n("recover identity label"))))},f9=e=>{var g,v;const{mode:t,addedIdentity:r,active:n,send:o,onDone:i,doneActionParent:a}=e,s=!n,{t:l}=tt("os"),u=r==null?void 0:r.identityKey.toHex(),f=Et("identityListItem__label"),d=is(u??"",12),p=((g=r==null?void 0:r.profile)==null?void 0:g.displayName)??(r&&uu(r==null?void 0:r.identityKey.toHex())),h=c.createElement(at,{...i&&{onClick:()=>i(null)},disabled:s,"data-autofocus":"confirmingAddedIdentity","data-testid":"identity-added-done"},c.createElement("span",null,l("done label")));return c.createElement(c.Fragment,null,c.createElement(Er,null,l("identity added label")),c.createElement("div",{role:"none",className:"grow flex flex-col items-center justify-center text-center gap-2"},c.createElement(Tt.Root,{status:"active",labelId:f},c.createElement(Tt.Frame,null,c.createElement(Tt.Fallback,{href:d})),c.createElement(Tt.Label,{classNames:ue("text-lg truncate",!((v=r==null?void 0:r.profile)!=null&&v.displayName)&&"font-mono")},p))),c.createElement(zt,null,t==="halo-only"?a?c.cloneElement(a,{},h):h:c.createElement(at,{variant:"primary",disabled:s||!r,onClick:()=>r&&o({type:"selectIdentity",identity:r}),"data-autofocus":"confirmingAddedIdentity"},l("continue label"))))},d9=e=>{const{send:t,method:r}=e,n=r==="recover identity",o=Ue.useClient(),{t:i}=tt("os"),[a,s]=c.useState(""),l=u=>{o.halo.createIdentity({[n?"seedphrase":"displayName"]:u}).then(f=>{t==null||t({type:"selectIdentity",identity:f})},f=>{Xe.catch(f),s(i(n?"failed to recover identity message":"failed to create identity message"))})};return c.createElement(p9,{...e,onDisplayNameConfirm:l,validationMessage:a})},p9=e=>{const{method:t,send:r,active:n,onDisplayNameConfirm:o,validationMessage:i}=e,a=!n,{t:s}=tt("os"),[l,u]=c.useState(""),f=t==="recover identity";return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Vi,{validationMessage:i,label:c.createElement(Er,null,s(f?"recover identity input label":"new identity input label")),disabled:a,"data-testid":"identity-input",placeholder:f?"Type your recovery phrase":"Type a display name",onChange:({target:{value:d}})=>u(d)})),c.createElement(zt,null,c.createElement(at,{variant:"ghost",disabled:a,onClick:()=>r==null?void 0:r({type:"deselectAuthMethod"}),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-back`},s("back label")),c.createElement(at,{variant:"primary",disabled:a,onClick:()=>o==null?void 0:o(l),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-continue`},s("continue label"))))},C1=e=>{const{active:t,Kind:r,doneActionParent:n,onDone:o}=e,i=!t,{t:a}=tt("os"),s=c.createElement(at,{variant:"primary",onClick:o,disabled:i,"data-autofocus":`success${r}Invitation finishingJoining${r}`,"data-testid":`${r.toLowerCase()}-invitation-accepted-done`},a("done label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement("p",{className:"text-center text-sm font-normal"},a("welcome message"))),c.createElement(zt,null,n?c.cloneElement(n,{},s):s))},h9=e=>{try{const t=new URLSearchParams(e.substring(e.lastIndexOf("?")));return t.get("spaceInvitationCode")??t.get("deviceInvitationCode")??e}catch(t){return Xe.catch(t),e}},A1=e=>{const{Kind:t,active:r,send:n,unredeemedCode:o,onExit:i,exitActionParent:a,onDone:s,doneActionParent:l,succeededKeys:u}=e,f=!r,{t:d}=tt("os"),[p,h]=c.useState(o??"");c.useEffect(()=>{o&&h(o??"")},[o]);const g=()=>{p.trim().length!==0&&n({type:`set${t}InvitationCode`,code:h9(p),...t==="Space"&&{succeededKeys:u}})},v=c.createElement(at,{variant:"ghost",disabled:f,...i?{onClick:()=>i()}:{onClick:()=>s==null?void 0:s(null)},"data-testid":"join-exit"},d("cancel label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Vi,{label:c.createElement(Er,null,d("invitation input label")),placeholder:"Type an invitation code",disabled:f,value:p,onChange:({target:{value:y}})=>h(y),"data-autofocus":`inputting${t}InvitationCode`,"data-testid":`${t.toLowerCase()}-invitation-input`,onKeyUp:({key:y})=>y==="Enter"&&g()})),c.createElement(zt,null,t==="Halo"?c.createElement(at,{variant:"ghost",disabled:f,onClick:()=>n({type:"deselectAuthMethod"}),"data-testid":`${t.toLowerCase()}-invitation-input-back`},d("back label")):a?c.cloneElement(a,{},v):l?c.cloneElement(l,{},v):v,c.createElement(at,{variant:"primary",disabled:f,onClick:g,"data-testid":`${t.toLowerCase()}-invitation-input-continue`},d("continue label"))))},g9=({invitationState:e,onInvitationCancel:t,active:r,send:n,Kind:o,failReason:i})=>{const{t:a}=tt("os");return i?c.createElement(c.Fragment,null,c.createElement(Er,{className:Ot},a(i==="timeout"?"timeout status label":i==="cancelled"?"cancelled status label":"error status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(zt,null,c.createElement(at,{disabled:!r,onClick:()=>n({type:`reset${o}Invitation`}),"data-testid":"invitation-rescuer-reset"},a("reset label")))):c.createElement(c.Fragment,null,c.createElement(Er,{className:Ot},a("connecting status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(zt,null,c.createElement(at,{disabled:!0,classNames:"order-2","data-testid":"next"},a("next label")),c.createElement(at,{disabled:!r,onClick:t,"data-testid":"invitation-rescuer-cancel"},a("cancel label"))))},O1=e=>{const{Kind:t,invitationState:r,active:n,send:o}=e,{t:i}=tt("os");return c.createElement(c.Fragment,null,typeof r>"u"?c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Er,{className:Ot},"There was a problem joining the space")),c.createElement(zt,null,c.createElement(at,{disabled:!n,"data-testid":"invitation-rescuer-blank-reset",onClick:()=>o({type:`reset${t}Invitation`})},i("reset label")))):c.createElement(g9,{...e}))},T1=6,I1=({failed:e,Kind:t,active:r,pending:n,invitationId:o,onInvitationAuthenticate:i,onInvitationCancel:a})=>{const s=!r||n,{t:l}=tt("os"),u=t.toLowerCase(),[f,d]=c.useState(""),p=({target:{value:h}})=>{var g;d(h),h.length===T1&&((g=document.querySelector(`[data-autofocus-pinlength="${u}"]`))==null||g.focus())};return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},o&&c.createElement(_f,{text:wf(o)}),c.createElement(jr.Root,{...e&&{validationValence:"error"}},c.createElement(jr.Label,{asChild:!0},c.createElement(Er,null,l("auth code input label"))),c.createElement(jr.PinInput,{disabled:s,length:T1,onChange:p,inputMode:"numeric",autoComplete:"off",pattern:"\\d*","data-autofocus":`connecting${t}Invitation inputting${t}VerificationCode authenticationFailing${t}VerificationCode authenticating${t}VerificationCode`,"data-prevent-ios-autofocus":!0,"data-testid":`${u}-auth-code-input`,"data-1p-ignore":!0}),e&&c.createElement(jr.DescriptionAndValidation,{classNames:"text-center"},c.createElement(jr.Validation,null,l("failed to authenticate message"))))),c.createElement(zt,null,c.createElement(at,{variant:"ghost",disabled:s,onClick:()=>a==null?void 0:a(),"data-testid":`${u}-invitation-authenticator-cancel`},l("cancel label")),c.createElement(at,{variant:"primary",disabled:s,onClick:()=>i==null?void 0:i(f),"data-autofocus-pinlength":u,"data-testid":`${u}-invitation-authenticator-next`},l("next label"))))},v9=({send:e,active:t})=>{const r=Ue.useClient(),{t:n}=tt("os"),[o,i]=c.useState(""),a=()=>{r.reset().then(()=>e==null?void 0:e({type:"resetIdentity"}),s=>{Xe.catch(s),i(n("failed to reset identity message"))})};return c.createElement(m9,{disabled:!t,validationMessage:o,onConfirm:()=>a()})},m9=({disabled:e,validationMessage:t,onConfirm:r})=>{const{t:n}=tt("os"),o=n("confirmation value"),[i,a]=c.useState("");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Vi,{validationMessage:t,label:c.createElement(Er,null,n("reset identity input label",{confirmationValue:o})),disabled:e,"data-testid":"reset-identity-input",placeholder:o,onChange:({target:{value:s}})=>a(s)})),c.createElement(zt,null,c.createElement(at,{variant:"primary",disabled:e||i!==o,onClick:()=>r==null?void 0:r(),"data-testid":"reset-identity-input-confirm"},n("confirm label"))))},Kt="pbs-1 pbe-3 pli-3",b9=e=>{const{titleId:t,send:r,activeView:n,failed:o,mode:i,unredeemedCodes:a,invitationStates:s,succeededKeys:l,failReasons:u,onExit:f,onHaloDone:d,onSpaceDone:p,exitActionParent:h,doneActionParent:g,onHaloInvitationCancel:v,onSpaceInvitationCancel:y,onHaloInvitationAuthenticate:m,onSpaceInvitationAuthenticate:w,IdentityInput:E=d9,ResetIdentity:x=v9}=e;return c.createElement(xo,{density:"fine"},i!=="halo-only"&&c.createElement(s9,{titleId:t,mode:i,onExit:f,exitActionParent:h}),c.createElement(st.Root,{focusManaged:!0,activeView:n},c.createElement(st.Views,null,c.createElement(st.View,{classNames:Kt,id:"addition method chooser"},c.createElement(u9,{send:r,active:n==="addition method chooser"})),c.createElement(st.View,{classNames:Kt,id:"reset identity confirmation"},c.createElement(x,{send:r,method:"reset identity",active:n==="reset identity confirmation"})),c.createElement(st.View,{classNames:Kt,id:"create identity input"},c.createElement(E,{send:r,method:"create identity",active:n==="create identity input"})),c.createElement(st.View,{classNames:Kt,id:"recover identity input"},c.createElement(E,{send:r,method:"recover identity",active:n==="recover identity input"})),c.createElement(st.View,{classNames:Kt,id:"halo invitation input"},c.createElement(A1,{send:r,Kind:"Halo",active:n==="halo invitation input",...(a==null?void 0:a.Halo)&&{unredeemedCode:a.Halo},...(l==null?void 0:l.Halo)&&{succeededKeys:l.Halo}})),c.createElement(st.View,{classNames:Kt,id:"halo invitation rescuer"},c.createElement(O1,{send:r,Kind:"Halo",active:n==="halo invitation rescuer",invitationState:s==null?void 0:s.Halo,onInvitationCancel:v,failReason:u==null?void 0:u.Halo})),c.createElement(st.View,{classNames:Kt,id:"halo invitation authenticator"},c.createElement(I1,{send:r,Kind:"Halo",active:n==="halo invitation authenticator",onInvitationCancel:v,onInvitationAuthenticate:m,...o.has("Halo")&&{failed:!0}})),c.createElement(st.View,{classNames:Kt,id:"halo invitation accepted"},c.createElement(C1,{send:r,Kind:"Halo",active:n==="halo invitation accepted",doneActionParent:g,onDone:d})),c.createElement(st.View,{classNames:Kt,id:"identity added"},c.createElement(f9,{send:r,mode:i,active:n==="identity added",doneActionParent:g,onDone:d})),c.createElement(st.View,{classNames:Kt,id:"space invitation input"},c.createElement(A1,{send:r,Kind:"Space",active:n==="space invitation input",...(a==null?void 0:a.Space)&&{unredeemedCode:a.Space},...(l==null?void 0:l.Space)&&{succeededKeys:l.Space},onExit:f,exitActionParent:h})),c.createElement(st.View,{classNames:Kt,id:"space invitation rescuer"},c.createElement(O1,{send:r,Kind:"Space",active:n==="space invitation rescuer",invitationState:s==null?void 0:s.Space,onInvitationCancel:y,failReason:u==null?void 0:u.Space})),c.createElement(st.View,{classNames:Kt,id:"space invitation authenticator"},c.createElement(I1,{send:r,Kind:"Space",active:n==="space invitation authenticator",onInvitationCancel:y,onInvitationAuthenticate:w,...o.has("Space")&&{failed:!0}})),c.createElement(st.View,{classNames:Kt,id:"space invitation accepted"},c.createElement(C1,{send:r,Kind:"Space",active:n==="space invitation accepted",doneActionParent:g,onDone:p})))))},y9=({titleId:e,mode:t="default",initialInvitationCode:r,exitActionParent:n,onExit:o,doneActionParent:i,onDone:a})=>{const s=Ue.useClient(),l=si.useIdentity(),{hasIosKeyboard:u}=Ae(),f=Et("joinPanel__heading",e),[d,p,h]=c9(s,{context:{mode:t,identity:l,...r&&{[t==="halo-only"?"halo":"space"]:{unredeemedCode:r}}}});c.useEffect(()=>h.subscribe(C=>{Xe("[state]",C)}).unsubscribe,[h]),c.useEffect(()=>{const S=d.configuration[0].id.split("."),C=S[S.length-1],P=C==="finishingJoining"?"successSpaceInvitation":C,F=document.querySelector(`[data-autofocus~="${P}"]`);F&&!(u&&F.hasAttribute("data-prevent-ios-autofocus"))&&F.focus()},[d.value,u]);const g=c.useMemo(()=>{switch(!0){case d.matches({choosingIdentity:"choosingAuthMethod"}):return"addition method chooser";case d.matches("resettingIdentity"):return"reset identity confirmation";case d.matches({choosingIdentity:"creatingIdentity"}):return"create identity input";case d.matches({choosingIdentity:"recoveringIdentity"}):return"recover identity input";case d.matches({choosingIdentity:{acceptingHaloInvitation:"inputtingHaloInvitationCode"}}):return"halo invitation input";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"connectingHaloInvitation"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"failingHaloInvitation"}}}].some(d.matches):return"halo invitation rescuer";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"inputtingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticatingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}].some(d.matches):return"halo invitation authenticator";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"successHaloInvitation"}}},"finishingJoiningHalo"].some(d.matches):return"halo invitation accepted";case d.matches({choosingIdentity:"confirmingAddedIdentity"}):return"identity added";case d.matches({acceptingSpaceInvitation:"inputtingSpaceInvitationCode"}):return"space invitation input";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"connectingSpaceInvitation"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"failingSpaceInvitation"}}].some(d.matches):return"space invitation rescuer";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"inputtingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticatingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}].some(d.matches):return"space invitation authenticator";case d.matches("finishingJoiningSpace"):return"space invitation accepted";default:return"never"}},[d]),v=c.useMemo(()=>{const S=new Set;switch(!0){case d.matches({choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}):S.add("Halo");break;case d.matches({acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}):S.add("Space");break}return S},[d]),y=c.useMemo(()=>({Halo:d.context.halo.unredeemedCode,Space:d.context.space.unredeemedCode}),[d]),m=Ue.useMulticastObservable(s.spaces),w=c.useMemo(()=>({Space:m?new Set(m.map(({key:S})=>S.toHex())):void 0}),[m]),E=c.useMemo(()=>{var S,C;return{Halo:(S=d.context.halo.invitationObservable)==null?void 0:S.get().state,Space:(C=d.context.space.invitationObservable)==null?void 0:C.get().state}},[d]),x=c.useMemo(()=>({Halo:d.context.halo.failReason,Space:d.context.space.failReason}),[d]),k=c.useCallback(()=>{var S,C,P,F;a==null||a({identityKey:((S=d.context.halo.invitation)==null?void 0:S.identityKey)??null,swarmKey:((C=d.context.halo.invitation)==null?void 0:C.swarmKey)??null,spaceKey:((P=d.context.halo.invitation)==null?void 0:P.spaceKey)??null,target:((F=d.context.halo.invitation)==null?void 0:F.target)??null})},[d,a]),I=c.useCallback(()=>{var S,C,P,F;a==null||a({identityKey:((S=d.context.space.invitation)==null?void 0:S.identityKey)??null,swarmKey:((C=d.context.space.invitation)==null?void 0:C.swarmKey)??null,spaceKey:((P=d.context.space.invitation)==null?void 0:P.spaceKey)??null,target:((F=d.context.space.invitation)==null?void 0:F.target)??null})},[d,a]);return c.createElement(b9,{titleId:f,mode:t,send:p,activeView:g,failed:v,failReasons:x,pending:["connecting","authenticating"].some(S=>d==null?void 0:d.configuration[0].id.includes(S)),unredeemedCodes:y,invitationStates:E,succeededKeys:w,identity:l,onExit:o,exitActionParent:n,doneActionParent:i,onHaloDone:k,onSpaceDone:I,onHaloInvitationCancel:()=>{var S;return(S=d.context.halo.invitationObservable)==null?void 0:S.cancel()},onSpaceInvitationCancel:()=>{var S;return(S=d.context.space.invitationObservable)==null?void 0:S.cancel()},onHaloInvitationAuthenticate:S=>{var C;return p({type:"authenticateHaloVerificationCode"}),(C=d.context.halo.invitationObservable)==null?void 0:C.authenticate(S)},onSpaceInvitationAuthenticate:S=>{var C;return p({type:"authenticateSpaceVerificationCode"}),(C=d.context.space.invitationObservable)==null?void 0:C.authenticate(S)}})},w9=Jf({id:"space",predictableActionArguments:!0,context:{space:null},initial:"managingSpace",states:{managingSpace:{},managingSpaceInvitation:{}},on:{deselectInvitation:{target:".managingSpace",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingSpaceInvitation",actions:["setInvitation","log"]}}},{actions:{setInvitation:Gt({invitation:(e,t)=>(t==null?void 0:t.invitation)??null}),unsetInvitation:Gt({invitation:()=>{}}),log:(e,t)=>{Xe("[transition]",{event:t,context:e})}}}),_9=e=>Xf(w9,{...e,context:{...e==null?void 0:e.context}}),P1="dxos:react-shell/space-manager/active-action",E9=e=>{const{space:t,target:r}=e,{t:n}=tt("os"),o=Ue.useConfig(),i=ga.useSpaceInvitations(t==null?void 0:t.key),a=c.useCallback(l=>{const u=an.InvitationEncoder.encode(l);l.state===we.State.CONNECTING&&console.log(JSON.stringify({invitationCode:u,authCode:l.authCode}))},[]),s={inviteOne:{label:n("invite one label"),description:n("invite one description"),icon:ze.UserPlus,onClick:c.useCallback(()=>{var u,f,d,p;const l=(u=t.share)==null?void 0:u.call(t,{type:we.Type.INTERACTIVE,authMethod:we.AuthMethod.SHARED_SECRET,target:r});l&&((p=(d=(f=o.values.runtime)==null?void 0:f.app)==null?void 0:d.env)==null?void 0:p.DX_ENVIRONMENT)!=="production"&&l.subscribe(a)},[t])},inviteMany:{label:n("invite many label"),description:n("invite many description"),icon:ze.UsersThree,onClick:c.useCallback(()=>{var u,f,d,p;const l=(u=t.share)==null?void 0:u.call(t,{type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE,target:r});l&&((p=(d=(f=o.values.runtime)==null?void 0:f.app)==null?void 0:d.env)==null?void 0:p.DX_ENVIRONMENT)!=="production"&&l.subscribe(a)},[t])}};return c.createElement(x9,{...e,invitations:i,inviteActions:s})},k1="pis-3 pie-1 plb-1 mbe-1 font-medium",x9=e=>{const{active:t,space:r,createInvitationUrl:n,send:o,inviteActions:i,invitations:a,showInactiveInvitations:s,SpaceMemberList:l=Ik,InvitationList:u=x7}=e,{t:f}=tt("os"),d=i??{noopInvite:{label:f("create space invitation label"),description:"",icon:ze.Placeholder,onClick:()=>{}}},[p,h]=c.useState(localStorage.getItem(P1)??"inviteOne"),g=y=>{h(y),localStorage.setItem(P1,y)},v=s?a:a==null?void 0:a.filter(y=>![we.State.CANCELLED].includes(y.get().state));return c.createElement(c.Fragment,null,c.createElement(as.Root,{classNames:"grow shrink basis-28 -mli-2"},c.createElement(as.Viewport,{classNames:"is-full pie-2"},!!(v!=null&&v.length)&&c.createElement(c.Fragment,null,c.createElement("h3",{className:ue(k1,Ot)},f("invitation list heading")),c.createElement(u,{className:"mb-2",send:o,invitations:v??[],onClickRemove:y=>y.cancel(),createInvitationUrl:n}),c.createElement("h3",{className:ue(k1,Ot,"mbs-2")},f("space member list heading"))),c.createElement(l,{spaceKey:r.key,includeSelf:!0})),c.createElement(as.Scrollbar,{orientation:"vertical"},c.createElement(as.Thumb,null))),c.createElement(zt,null,c.createElement($7,{disabled:!t,actions:d,activeAction:p,onChangeActiveAction:g,"data-testid":"spaces-panel.create-invitation"})))},S9=({titleId:e,space:t,onDone:r})=>{const{t:n}=tt("os"),o=t.properties.name;return c.createElement(Ef,{titleId:e,title:n("space panel heading"),corner:c.createElement(gy,{"data-testid":"identity-panel-done",onDone:r})},c.createElement("div",{role:"none",className:"flex gap-4 items-center justify-center mlb-4"},c.createElement(ze.Planet,{size:32}),c.createElement("div",{className:"block text-start font-light text-xl"},o??t.key.truncate())))},N1=e=>{const{titleId:t,activeView:r,space:n,target:o,SpaceManager:i=E9,InvitationManager:a=_1,...s}=e;return c.createElement(xo,{density:"fine"},c.createElement(S9,{...s,titleId:t,space:n}),c.createElement(st.Root,{activeView:r},c.createElement(st.Views,null,c.createElement(st.View,{id:"space manager",classNames:Kt},c.createElement(i,{active:r==="space manager",space:n,target:o,...s})),c.createElement(st.View,{id:"space invitation manager",classNames:Kt},c.createElement(a,{active:r==="space invitation manager",...s,invitationUrl:e.invitationUrl})))))},$9=({invitation:e,...t})=>{const r=af(e);return c.createElement(N1,{...t,...r,invitationUrl:t.createInvitationUrl(r.invitationCode)})},C9=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=Et("spacePanel__heading",e),[o,i,a]=_9({context:{space:r.space}});c.useEffect(()=>a.subscribe(f=>{Xe("[state]",f)}).unsubscribe,[a]);const s=c.useMemo(()=>{switch(!0){case o.matches("managingSpace"):return"space manager";case o.matches("managingSpaceInvitation"):return"space invitation manager";default:return"never"}},[o]),l={...r,activeView:s,send:i,titleId:n,createInvitationUrl:t};return o.context.invitation?c.createElement($9,{...l,invitation:o.context.invitation}):c.createElement(N1,{...l})},A9=e=>{const t=Et("spaceDialog__title");return c.createElement(Fr.Root,{defaultOpen:!0,onOpenChange:r=>{var n;return r||((n=e.onDone)==null?void 0:n.call(e))}},c.createElement(Fr.Portal,null,c.createElement(Fr.Overlay,null,c.createElement(Fr.Content,{"aria-labelledby":t,onOpenAutoFocus:r=>r.preventDefault()},c.createElement(lu,null,c.createElement(a9,{...e,titleId:t,doneActionParent:c.createElement(Fr.Close,{asChild:!0})}))))))},D1=e=>{const t=Et("joinDialog__title"),{height:r}=ZA();return c.createElement(Eo.Root,{defaultOpen:!0,onOpenChange:n=>{var o;return n||(e.onExit?e.onExit():(o=e.onDone)==null?void 0:o.call(e,null))}},c.createElement(Eo.Portal,null,c.createElement(Eo.Overlay,{classNames:"backdrop-blur",...r&&{style:{blockSize:`${r}px`}}},c.createElement(Eo.Content,{"aria-labelledby":t},c.createElement(y9,{...e,titleId:t,exitActionParent:c.createElement(Eo.Cancel,{asChild:!0}),doneActionParent:c.createElement(Eo.Action,{asChild:!0})})))))};var ed,fl=on;if(process.env.NODE_ENV==="production")ed=fl.createRoot,fl.hydrateRoot;else{var L1=fl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;ed=function(e,t){L1.usingClientEntryPoint=!0;try{return fl.createRoot(e,t)}finally{L1.usingClientEntryPoint=!1}}}var td={exports:{}};(function(e,t){(function(r,n){var o="1.0.35",i="",a="?",s="function",l="undefined",u="object",f="string",d="major",p="model",h="name",g="type",v="vendor",y="version",m="architecture",w="console",E="mobile",x="tablet",k="smarttv",I="wearable",S="embedded",C=350,P="Amazon",F="Apple",D="ASUS",N="BlackBerry",J="Browser",K="Chrome",Y="Edge",te="Firefox",oe="Google",le="Huawei",ae="LG",ge="Microsoft",ce="Motorola",q="Opera",H="Samsung",re="Sharp",de="Sony",U="Xiaomi",z="Zebra",M="Facebook",R="Chromium OS",G="Mac OS",O=function($e,De){var A={};for(var b in $e)De[b]&&De[b].length%2===0?A[b]=De[b].concat($e[b]):A[b]=$e[b];return A},T=function($e){for(var De={},A=0;A<$e.length;A++)De[$e[A].toUpperCase()]=$e[A];return De},Z=function($e,De){return typeof $e===f?ne(De).indexOf(ne($e))!==-1:!1},ne=function($e){return $e.toLowerCase()},pe=function($e){return typeof $e===f?$e.replace(/[^\d\.]/g,i).split(".")[0]:n},me=function($e,De){if(typeof $e===f)return $e=$e.replace(/^\s\s*/,i),typeof De===l?$e:$e.substring(0,C)},xe=function($e,De){for(var A=0,b,_,L,W,X,se;A<De.length&&!X;){var Pe=De[A],ot=De[A+1];for(b=_=0;b<Pe.length&&!X&&Pe[b];)if(X=Pe[b++].exec($e),X)for(L=0;L<ot.length;L++)se=X[++_],W=ot[L],typeof W===u&&W.length>0?W.length===2?typeof W[1]==s?this[W[0]]=W[1].call(this,se):this[W[0]]=W[1]:W.length===3?typeof W[1]===s&&!(W[1].exec&&W[1].test)?this[W[0]]=se?W[1].call(this,se,W[2]):n:this[W[0]]=se?se.replace(W[1],W[2]):n:W.length===4&&(this[W[0]]=se?W[3].call(this,se.replace(W[1],W[2])):n):this[W]=se||n;A+=2}},Ee=function($e,De){for(var A in De)if(typeof De[A]===u&&De[A].length>0){for(var b=0;b<De[A].length;b++)if(Z(De[A][b],$e))return A===a?n:A}else if(Z(De[A],$e))return A===a?n:A;return $e},ie={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ne={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},dt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,y],[/opios[\/ ]+([\w\.]+)/i],[y,[h,q+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[h,q]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[h,"UC"+J]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[y,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+J],y],[/\bfocus\/([\w\.]+)/i],[y,[h,te+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[h,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[h,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[h,"MIUI "+J]],[/fxios\/([-\w\.]+)/i],[y,[h,te]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+J]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+J],y],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,M],y],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[h,K+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,K+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[h,"Android "+J]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[y,Ee,ie]],[/(webkit|khtml)\/([\w\.]+)/i],[h,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[h,te+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[h,y],[/(cobalt)\/([\w\.]+)/i],[h,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,ne]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,i,ne]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,ne]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[v,H],[g,x]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[p,[v,H],[g,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[v,F],[g,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[v,F],[g,x]],[/(macintosh);/i],[p,[v,F]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[v,re],[g,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[v,le],[g,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[v,le],[g,E]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[p,/_/g," "],[v,U],[g,E]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[v,U],[g,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[v,"OPPO"],[g,E]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[v,"Vivo"],[g,E]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[p,[v,"Realme"],[g,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[v,ce],[g,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[v,ce],[g,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[v,ae],[g,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[v,ae],[g,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[v,"Lenovo"],[g,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[v,"Nokia"],[g,E]],[/(pixel c)\b/i],[p,[v,oe],[g,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[v,oe],[g,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[v,de],[g,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[v,de],[g,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[v,"OnePlus"],[g,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[v,P],[g,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[v,P],[g,E]],[/(playbook);[-\w\),; ]+(rim)/i],[p,v,[g,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[v,N],[g,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[v,D],[g,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[v,D],[g,E]],[/(nexus 9)/i],[p,[v,"HTC"],[g,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[p,/_/g," "],[g,E]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[v,"Acer"],[g,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[v,"Meizu"],[g,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,p,[g,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,p,[g,x]],[/(surface duo)/i],[p,[v,ge],[g,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[v,"Fairphone"],[g,E]],[/(u304aa)/i],[p,[v,"AT&T"],[g,E]],[/\bsie-(\w*)/i],[p,[v,"Siemens"],[g,E]],[/\b(rct\w+) b/i],[p,[v,"RCA"],[g,x]],[/\b(venue[\d ]{2,7}) b/i],[p,[v,"Dell"],[g,x]],[/\b(q(?:mv|ta)\w+) b/i],[p,[v,"Verizon"],[g,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[v,"Barnes & Noble"],[g,x]],[/\b(tm\d{3}\w+) b/i],[p,[v,"NuVision"],[g,x]],[/\b(k88) b/i],[p,[v,"ZTE"],[g,x]],[/\b(nx\d{3}j) b/i],[p,[v,"ZTE"],[g,E]],[/\b(gen\d{3}) b.+49h/i],[p,[v,"Swiss"],[g,E]],[/\b(zur\d{3}) b/i],[p,[v,"Swiss"],[g,x]],[/\b((zeki)?tb.*\b) b/i],[p,[v,"Zeki"],[g,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],p,[g,x]],[/\b(ns-?\w{0,9}) b/i],[p,[v,"Insignia"],[g,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[v,"NextBook"],[g,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],p,[g,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],p,[g,E]],[/\b(ph-1) /i],[p,[v,"Essential"],[g,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[v,"Envizen"],[g,x]],[/\b(trio[-\w\. ]+) b/i],[p,[v,"MachSpeed"],[g,x]],[/\btu_(1491) b/i],[p,[v,"Rotor"],[g,x]],[/(shield[\w ]+) b/i],[p,[v,"Nvidia"],[g,x]],[/(sprint) (\w+)/i],[v,p,[g,E]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[v,ge],[g,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[v,z],[g,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[v,z],[g,E]],[/smart-tv.+(samsung)/i],[v,[g,k]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[v,H],[g,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,ae],[g,k]],[/(apple) ?tv/i],[v,[p,F+" TV"],[g,k]],[/crkey/i],[[p,K+"cast"],[v,oe],[g,k]],[/droid.+aft(\w)( bui|\))/i],[p,[v,P],[g,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[v,re],[g,k]],[/(bravia[\w ]+)( bui|\))/i],[p,[v,de],[g,k]],[/(mitv-\w{5}) bui/i],[p,[v,U],[g,k]],[/Hbbtv.*(technisat) (.*);/i],[v,p,[g,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,me],[p,me],[g,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,p,[g,w]],[/droid.+; (shield) bui/i],[p,[v,"Nvidia"],[g,w]],[/(playstation [345portablevi]+)/i],[p,[v,de],[g,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[v,ge],[g,w]],[/((pebble))app/i],[v,p,[g,I]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[v,F],[g,I]],[/droid.+; (glass) \d/i],[p,[v,oe],[g,I]],[/droid.+; (wt63?0{2,3})\)/i],[p,[v,z],[g,I]],[/(quest( 2| pro)?)/i],[p,[v,M],[g,I]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[g,S]],[/(aeobc)\b/i],[p,[v,P],[g,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[p,[g,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[g,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,E]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[h,Y+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[y,Ee,Ne]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[y,Ee,Ne]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,G],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,y],[/\(bb(10);/i],[y,[h,N]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[h,te+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[h,K+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,R],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,y],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,y]]},Te=function($e,De){if(typeof $e===u&&(De=$e,$e=n),!(this instanceof Te))return new Te($e,De).getResult();var A=typeof r!==l&&r.navigator?r.navigator:n,b=$e||(A&&A.userAgent?A.userAgent:i),_=A&&A.userAgentData?A.userAgentData:n,L=De?O(dt,De):dt,W=A&&A.userAgent==b;return this.getBrowser=function(){var X={};return X[h]=n,X[y]=n,xe.call(X,b,L.browser),X[d]=pe(X[y]),W&&A&&A.brave&&typeof A.brave.isBrave==s&&(X[h]="Brave"),X},this.getCPU=function(){var X={};return X[m]=n,xe.call(X,b,L.cpu),X},this.getDevice=function(){var X={};return X[v]=n,X[p]=n,X[g]=n,xe.call(X,b,L.device),W&&!X[g]&&_&&_.mobile&&(X[g]=E),W&&X[p]=="Macintosh"&&A&&typeof A.standalone!==l&&A.maxTouchPoints&&A.maxTouchPoints>2&&(X[p]="iPad",X[g]=x),X},this.getEngine=function(){var X={};return X[h]=n,X[y]=n,xe.call(X,b,L.engine),X},this.getOS=function(){var X={};return X[h]=n,X[y]=n,xe.call(X,b,L.os),W&&!X[h]&&_&&_.platform!="Unknown"&&(X[h]=_.platform.replace(/chrome os/i,R).replace(/macos/i,G)),X},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(X){return b=typeof X===f&&X.length>C?me(X,C):X,this},this.setUA(b),this};Te.VERSION=o,Te.BROWSER=T([h,y,d]),Te.CPU=T([m]),Te.DEVICE=T([p,v,g,w,E,k,x,I,S]),Te.ENGINE=Te.OS=T([h,y]),e.exports&&(t=e.exports=Te),t.UAParser=Te;var Me=typeof r!==l&&(r.jQuery||r.Zepto);if(Me&&!Me.ua){var bt=new Te;Me.ua=bt.getResult(),Me.ua.get=function(){return bt.getUA()},Me.ua.set=function($e){bt.setUA($e);var De=bt.getResult();for(var A in De)Me.ua[A]=De[A]}}})(typeof window=="object"?window:Ye)})(td,td.exports);var O9=td.exports,dl="/home/runner/work/dxos/dxos/packages/core/mesh/rpc-tunnel/src/ports/iframe.ts",rd,nd;if(typeof navigator<"u"){const e=new O9.UAParser(navigator.userAgent);rd=e.getBrowser().name,nd=e.getOS().name}var T9=(e,t,r)=>{if(!e.contentWindow){Xe("IFrame content window missing",{origin:t},{F:dl,L:24,S:void 0,C:(n,o)=>n(...o)});return}rd==="Chrome"&&nd==="iOS"?e.contentWindow.postMessage(r,t):e.contentWindow.postMessage(r,t,[r.payload])},I9=(e,t)=>{rd==="Chrome"&&nd==="iOS"?window.parent.postMessage(t,e):window.parent.postMessage(t,e,[t.payload])},M1=({channel:e,iframe:t,origin:r,onOrigin:n})=>({send:async o=>{if(!r){Xe("no origin set",{channel:e},{F:dl,L:62,S:void 0,C:(s,l)=>s(...l)});return}Xe("sending",{channel:e,data:o.length},{F:dl,L:66,S:void 0,C:(s,l)=>s(...l)});const i=o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength),a={channel:e,payload:i};t?T9(t,r,a):I9(r,a)},subscribe:o=>{const i=a=>{if(!t&&a.source!==window.parent)return;if(t&&a.source!==t.contentWindow)return;const l=a.data&&typeof a.data=="object"&&"channel"in a.data&&"payload"in a.data?a.data:void 0;(l==null?void 0:l.channel)===e&&(r||(r=a.origin,n==null||n(r)),Xe("received",l,{F:dl,L:98,S:void 0,C:(u,f)=>u(...f)}),o(new Uint8Array(l.payload)))};return window.addEventListener("message",i),()=>window.removeEventListener("message",i)}});const P9=e=>{const t=Et("spaceDialog__title");return c.createElement(Fr.Root,{defaultOpen:!0,onOpenChange:r=>{var n;return r||((n=e.onDone)==null?void 0:n.call(e))}},c.createElement(Fr.Portal,null,c.createElement(Fr.Overlay,null,c.createElement(Fr.Content,{"aria-labelledby":t},c.createElement(lu,null,c.createElement(C9,{...e,titleId:t,doneActionParent:c.createElement(Fr.Close,{asChild:!0})}))))))},k9=({runtime:e,origin:t})=>{const[{layout:r,invitationCode:n,spaceKey:o,target:i},a]=c.useState({layout:e.layout,invitationCode:e.invitationCode,spaceKey:e.spaceKey,target:e.target}),s=Ue.useClient(),l=ga.useSpace(o);switch(c.useEffect(()=>e.layoutUpdate.on(u=>a(u)),[e]),c.useEffect(()=>{if(r===Ue.ShellLayout.SPACE&&!l){Xe.warn("No space found for shell space invitations.");const u=setTimeout(async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})});return()=>clearTimeout(u)}},[e,r,l]),r){case Ue.ShellLayout.INITIALIZE_IDENTITY:return c.createElement(D1,{mode:"halo-only",initialInvitationCode:n,onDone:()=>{e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}});case Ue.ShellLayout.IDENTITY:case Ue.ShellLayout.SHARE_IDENTITY:case Ue.ShellLayout.EDIT_PROFILE:return c.createElement(A9,{createInvitationUrl:u=>`${t}?deviceInvitationCode=${u}`,onResetDevice:async()=>{await s.reset(),await e.setAppContext({display:Ue.ShellDisplay.NONE,reload:!0})},onJoinNewIdentity:()=>e.setLayout({layout:Ue.ShellLayout.INITIALIZE_IDENTITY}),onDone:async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}});case Ue.ShellLayout.SPACE:return l?c.createElement(P9,{space:l,target:i,createInvitationUrl:u=>`${t}?spaceInvitationCode=${u}`,onDone:async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}}):null;case Ue.ShellLayout.JOIN_SPACE:return c.createElement(D1,{initialInvitationCode:n,onDone:async u=>{const f=(u==null?void 0:u.target)??void 0;await e.setAppContext({display:Ue.ShellDisplay.NONE,spaceKey:(u==null?void 0:u.spaceKey)??void 0,target:f}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})},onExit:async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}});default:return null}},N9={"en-US":Object.freeze(Object.defineProperty({__proto__:null,os:{"manage profile label":"Manage identity","identity offline description":"Offline","sidebar label":"DXOS sidebar","copy invitation code label":"Copy URL","copy invitation code success label":"Copied","open share panel label":"View QR code","joining space heading":"Joining space","join space heading":"Enter space invitation","halo heading":"Initialize device identity","exit label":"Exit","identity selector title":"Join as","identity radio group title":"Select an identity you’ve associated with this device already","add identity label":"Add","continue label":"Continue","back label":"Back","next label":"Next","close label":"Close","auth choices label":"Choose an identity","create identity label":"Create an identity","create identity description":"Create a new identity.","recover identity label":"Use a seed phrase","recover identity description":"Enter your seed phrase to log in manually.","join identity label":"Use another device","join identity description":"Add this device to an identity you’re already logged into on another device.","deselect identity label":"Back to identities","addition method chooser title":"An identity is required to continue","new identity input label":"Set display name","recover identity input label":"Type or paste your seed phrase","failed to create identity message":"Failed to create an identity.","failed to recover identity message":"Failed to recover an identity from the provided seed phrase.","failed to authenticate message":"Incorrect PIN.","identity added label":"Created identity & added to this device:","join space as identity heading":"<part>as </part><part><icon/><label>{{labelValue}}</label></part>","error status label":"Failed","timeout status label":"Timed out","cancelled status label":"Cancelled","init status label":"Ready to connect","connecting status label":"Connecting…","connected status label":"Enter confirmation PIN","authenticating status label":"Enter confirmation PIN","success status label":"Success","connect label":"Connect","reconnect label":"Reconnect","cancel label":"Cancel","done label":"Done","reset label":"Start over","auth code input label":"Enter the verification code","invitation input label":"Paste an invitation code or URL","create device invitation label":"Add device","create space invitation label":"Invite","qr label":"Scan to accept invitation","empty invitations message":"No pending invitations","empty device list message":"No devices authenticated other than this device.","show all spaces label":"All spaces","all spaces label":"All spaces","create space label":"Create a new space","join space label":"Join a space","show current space label":"Current space","view space invitations label":"View space invitations","toggle sidebar label":"Open/close sidebar","open sidebar label":"Open sidebar","close sidebar label":"Close sidebar","welcome message":"Welcome","selecting identity heading":"Selecting identity","devices heading":"Devices","identity heading":"Profile settings","choose add device label":"Add device","choose devices label":"Manage devices","choose profile label":"Edit profile","choose sign out label":"Sign out","empty space members message":"There is nobody in this space yet.","back to all invitations label":"Back to all invitations","invitation heading":"Invitation","invitation list heading":"Invitations","device invitation list heading":"Pending device invitations","space invitation list heading":"Pending invitations","device list heading":"Devices","space member list heading":"Members","space panel heading":"Space membership","auth code message":"Enter the following auth code on the joining device.","display name input label":"Display name","display name input placeholder":"Enter a display name","invite one label":"Invite one","invite one description":"Only one user may join.","invite one qr label":"Single-use","invite one list item label":"Active single-use invitation","invite many label":"Invite many","invite many description":"Anyone with the link can join.","invite many qr label":"Multiple-use","invite many list item label":"Active multiple-use invitation","invite options label":"Change the active invite option.","confirm label":"Confirm","reset identity input label":"This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.","failed to reset identity message":"Failed to reset identity.","confirmation value":"CONFIRM","sign out chooser title":"DANGER ZONE","sign out chooser message":"Proceeding with either action below will erase all data on this device.","join new identity label":"Join a new identity","reset device label":"Reset device","reset device confirm message":"Are you sure you want to reset your device? All data will be lost."}},Symbol.toStringTag,{value:"Module"}))},D9=async(e=new Ue.Config)=>{const t=new Ue.ClientServicesProxy(M1({channel:an.DEFAULT_CLIENT_CHANNEL})),r=new Ue.Client({config:e,services:t}),n=new U1.ShellRuntimeImpl(M1({channel:an.DEFAULT_SHELL_CHANNEL}));await Promise.all([n.open(),r.initialize()]),ed(document.getElementById("root")).render(c.createElement(c.StrictMode,null,c.createElement(bT,{tx:Ck,resourceExtensions:[N9]},c.createElement(Ue.ClientContext.Provider,{value:{client:r,status:Ue.SystemStatus.ACTIVE}},c.createElement(lu,null,c.createElement(wr.Provider,null,c.createElement(k9,{runtime:n,origin:location.origin})))))))};c.createContext({}),Xt.runShell=D9,Object.defineProperty(Xt,Symbol.toStringTag,{value:"Module"})});
202
+ ***************************************************************************** */var be=function(){return be=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},be.apply(this,arguments)};function Mf(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function qe(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function et(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function mt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var ft;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(ft||(ft={}));var Uo;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(Uo||(Uo={}));var Ff=ft.Start,jf=ft.Stop,Yi=ft.Raise,Js=ft.Send,Gy=ft.Cancel,MM=ft.NullEvent,Bf=ft.Assign;ft.After,ft.DoneState;var Ky=ft.Log,FM=ft.Init,Rf=ft.Invoke;ft.ErrorExecution;var qy=ft.ErrorPlatform,jM=ft.ErrorCustom,Yy=ft.Update,BM=ft.Choose,RM=ft.Pure,Jy=".",Xy={},Uf="xstate.guard",UM="",Ct=process.env.NODE_ENV==="production",Xs;function Wf(e,t,r){r===void 0&&(r=Jy);var n=Ji(e,r),o=Ji(t,r);return tt(o)?tt(n)?o===n:!1:tt(n)?n in o:Object.keys(n).every(function(i){return i in o?Wf(n[i],o[i]):!1})}function Zy(e){try{return tt(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Hf(e,t){try{return Wo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function WM(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function Ji(e,t){if(WM(e))return e.value;if(Wo(e))return Zs(e);if(typeof e!="string")return e;var r=Hf(e,t);return Zs(r)}function Zs(e){if(e.length===1)return e[0];for(var t={},r=t,n=0;n<e.length-1;n++)n===e.length-2?r[e[n]]=e[n+1]:(r[e[n]]={},r=r[e[n]]);return t}function Xi(e,t){for(var r={},n=Object.keys(e),o=0;o<n.length;o++){var i=n[o];r[i]=t(e[i],i,e,o)}return r}function Qy(e,t,r){var n,o,i={};try{for(var a=qe(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];r(u)&&(i[l]=t(u,l,e))}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}var HM=function(e){return function(t){var r,n,o=t;try{for(var i=qe(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}};function VM(e,t){return function(r){var n,o,i=r;try{for(var a=qe(e),s=a.next();!s.done;s=a.next()){var l=s.value;i=i[t][l]}}catch(u){n={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}}function Qs(e){if(!e)return[[]];if(tt(e))return[[e]];var t=Et(Object.keys(e).map(function(r){var n=e[r];return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:Qs(e[r]).map(function(o){return[r].concat(o)})}));return t}function Et(e){var t;return(t=[]).concat.apply(t,mt([],et(e),!1))}function e1(e){return Wo(e)?e:[e]}function Sr(e){return e===void 0?[]:e1(e)}function el(e,t,r){var n,o;if(nt(e))return e(t,r.data);var i={};try{for(var a=qe(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];nt(u)?i[l]=u(t,r.data):i[l]=u}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}function zM(e){return/^(done|error)\./.test(e)}function t1(e){return!!(e instanceof Promise||e!==null&&(nt(e)||typeof e=="object")&&nt(e.then))}function GM(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function KM(e,t){var r,n,o=et([[],[]],2),i=o[0],a=o[1];try{for(var s=qe(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?i.push(u):a.push(u)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[i,a]}function r1(e,t){return Xi(e.states,function(r,n){if(r){var o=(tt(t)?void 0:t[n])||(r?r.current:void 0);if(o)return{current:o,states:r1(r,o)}}})}function qM(e,t){return{current:t,states:r1(e,t)}}function n1(e,t,r,n){Ct||Mt(!!e,"Attempting to update undefined context");var o=e&&r.reduce(function(i,a){var s,l,u=a.assignment,f={state:n,action:a,_event:t},d={};if(nt(u))d=u(i,t.data,f);else try{for(var p=qe(Object.keys(u)),h=p.next();!h.done;h=p.next()){var g=h.value,v=u[g];d[g]=nt(v)?v(i,t.data,f):v}}catch(y){s={error:y}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}return Object.assign({},i,d)},e);return o}var Mt=function(){};Ct||(Mt=function(e,t){var r=e instanceof Error?e:void 0;if(!(!r&&e)&&console!==void 0){var n=["Warning: ".concat(t)];r&&n.push(r),console.warn.apply(console,n)}});function Wo(e){return Array.isArray(e)}function nt(e){return typeof e=="function"}function tt(e){return typeof e=="string"}function o1(e,t){if(e)return tt(e)?{type:Uf,name:e,predicate:t?t[e]:void 0}:nt(e)?{type:Uf,name:e.name,predicate:e}:e}function YM(e){try{return"subscribe"in e&&nt(e.subscribe)}catch{return!1}}var Cn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();Xs={},Xs[Cn]=function(){return this},Xs[Symbol.observable]=function(){return this};function to(e){return!!e&&"__xstatenode"in e}function JM(e){return!!e&&typeof e.send=="function"}function tl(e,t){return tt(e)||typeof e=="number"?be({type:e},t):e}function Ft(e,t){if(!tt(e)&&"$$type"in e&&e.$$type==="scxml")return e;var r=tl(e);return be({name:r.type,data:r,$$type:"scxml",type:"external"},t)}function Ho(e,t){var r=e1(t).map(function(n){return typeof n>"u"||typeof n=="string"||to(n)?{target:n,event:e}:be(be({},n),{event:e})});return r}function XM(e){if(!(e===void 0||e===UM))return Sr(e)}function ZM(e,t,r){if(!Ct){var n=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(r,"', error was '").concat(e,"'.").concat(n));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(r,"'. ")+"Original error: '".concat(e,"'. ").concat(n," Current error is '").concat(t,"'.").concat(o))}}}function i1(e,t,r,n,o){var i=e.options.guards,a={state:o,cond:t,_event:n};if(t.type===Uf)return((i==null?void 0:i[t.name])||t.predicate)(r,n.data,a);var s=i==null?void 0:i[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(r,n.data,a)}function a1(e){return typeof e=="string"?{type:e}:e}function rl(e,t,r){var n=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||n).bind(i),error:((o?e.error:t)||n).bind(i),complete:((o?e.complete:r)||n).bind(i)}}function nl(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Vf(e){return(e.type===Yi||e.type===Js&&e.to===Uo.Internal)&&typeof e.delay!="number"}var Vo=Ft({type:FM});function zf(e,t){return t&&t[e]||void 0}function Zi(e,t){var r;if(tt(e)||typeof e=="number"){var n=zf(e,t);nt(n)?r={type:e,exec:n}:n?r=n:r={type:e,exec:void 0}}else if(nt(e))r={type:e.name||e.toString(),exec:e};else{var n=zf(e.type,t);if(nt(n))r=be(be({},e),{exec:n});else if(n){var o=n.type||e.type;r=be(be(be({},n),e),{type:o})}else r=e}return r}var An=function(e,t){if(!e)return[];var r=Wo(e)?e:[e];return r.map(function(n){return Zi(n,t)})};function Gf(e){var t=Zi(e);return be(be({id:tt(e)?e:t.id},t),{type:t.type})}function QM(e,t){return{type:Yi,event:typeof e=="function"?e:tl(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function eF(e,t,r,n){var o={_event:r},i=Ft(nt(e.event)?e.event(t,r.data,o):e.event),a;if(tt(e.delay)){var s=n&&n[e.delay];a=nt(s)?s(t,r.data,o):s}else a=nt(e.delay)?e.delay(t,r.data,o):e.delay;return be(be({},e),{type:Yi,_event:i,delay:a})}function tF(e,t){return{to:t?t.to:void 0,type:Js,event:nt(e)?e:tl(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:nt(e)?e.name:Zy(e)}}function rF(e,t,r,n){var o={_event:r},i=Ft(nt(e.event)?e.event(t,r.data,o):e.event),a;if(tt(e.delay)){var s=n&&n[e.delay];a=nt(s)?s(t,r.data,o):s}else a=nt(e.delay)?e.delay(t,r.data,o):e.delay;var l=nt(e.to)?e.to(t,r.data,o):e.to;return be(be({},e),{to:l,_event:i,event:i.data,delay:a})}var nF=function(e,t,r){return be(be({},e),{value:tt(e.expr)?e.expr:e.expr(t,r.data,{_event:r})})},oF=function(e){return{type:Gy,sendId:e}};function iF(e){var t=Gf(e);return{type:ft.Start,activity:t,exec:void 0}}function aF(e){var t=nt(e)?e:Gf(e);return{type:ft.Stop,activity:t,exec:void 0}}function sF(e,t,r){var n=nt(e.activity)?e.activity(t,r.data):e.activity,o=typeof n=="string"?{id:n}:n,i={type:ft.Stop,activity:o};return i}var lF=function(e){return{type:Bf,assignment:e}};function cF(e,t){var r=t?"#".concat(t):"";return"".concat(ft.After,"(").concat(e,")").concat(r)}function ol(e,t){var r="".concat(ft.DoneState,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function il(e,t){var r="".concat(ft.DoneInvoke,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function Qi(e,t){var r="".concat(ft.ErrorPlatform,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}var uF=function(e){var t,r,n=[];try{for(var o=qe(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Bf){n.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n};function al(e,t,r,n,o,i,a){a===void 0&&(a=!1);var s=a?[]:uF(o),l=s.length?n1(r,n,s,t):r,u=a?[r]:void 0,f=[];function d(g,v){var y;switch(v.type){case Yi:{var m=eF(v,l,n,e.options.delays);return i&&typeof m.delay=="number"&&i(m,l,n),m}case Js:var w=rF(v,l,n,e.options.delays);if(!Ct){var E=v.delay;Mt(!tt(E)||typeof w.delay=="number","No delay reference for delay expression '".concat(E,"' was found on machine '").concat(e.id,"'"))}return i&&w.to!==Uo.Internal&&(g==="entry"?f.push(w):i(w,l,n)),w;case Ky:{var x=nF(v,l,n);return i==null||i(x,l,n),x}case BM:{var k=v,I=(y=k.conds.find(function(oe){var le=o1(oe.cond,e.options.guards);return!le||i1(e,le,l,n,i?void 0:t)}))===null||y===void 0?void 0:y.actions;if(!I)return[];var S=et(al(e,t,l,n,[{type:g,actions:An(Sr(I),e.options.actions)}],i,a),2),C=S[0],P=S[1];return l=P,u==null||u.push(l),C}case RM:{var I=v.get(l,n.data);if(!I)return[];var F=et(al(e,t,l,n,[{type:g,actions:An(Sr(I),e.options.actions)}],i,a),2),D=F[0],N=F[1];return l=N,u==null||u.push(l),D}case jf:{var x=sF(v,l,n);return i==null||i(x,r,n),x}case Bf:{l=n1(l,n,[v],i?void 0:t),u==null||u.push(l);break}default:var J=Zi(v,e.options.actions),K=J.exec;if(i)i(J,l,n);else if(K&&u){var Y=u.length-1,te=be(be({},J),{exec:function(oe){for(var le=[],ae=1;ae<arguments.length;ae++)le[ae-1]=arguments[ae];K.apply(void 0,mt([u[Y]],et(le),!1))}});J=te}return J}}function p(g){var v,y,m=[];try{for(var w=qe(g.actions),E=w.next();!E.done;E=w.next()){var x=E.value,k=d(g.type,x);k&&(m=m.concat(k))}}catch(I){v={error:I}}finally{try{E&&!E.done&&(y=w.return)&&y.call(w)}finally{if(v)throw v.error}}return f.forEach(function(I){i(I,l,n)}),f.length=0,m}var h=Et(o.map(p));return[h,l]}var s1=[],zo=function(e,t){s1.push(e);var r=t(e);return s1.pop(),r};function l1(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[Cn]=function(){return this},t}function fF(e,t,r,n){var o,i=a1(e.src),a=(o=t==null?void 0:t.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?el(e.data,r,n):void 0,l=a?c1(a,e.id,s):l1(e.id);return l.meta=e,l}function c1(e,t,r){var n=l1(t);if(n.deferred=!0,to(e)){var o=n.state=zo(void 0,function(){return(r?e.withContext(r):e).initialState});n.getSnapshot=function(){return o}}return n}function dF(e){try{return typeof e.send=="function"}catch{return!1}}function pF(e){return dF(e)&&"id"in e}function hF(e){var t;return be((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[Cn]=function(){return this},t),e)}var sl=function(e){return e.type==="atomic"||e.type==="final"};function u1(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function ea(e){return u1(e).filter(function(t){return t.type!=="history"})}function f1(e){var t=[e];return sl(e)?t:t.concat(Et(ea(e).map(f1)))}function ta(e,t){var r,n,o,i,a,s,l,u,f=new Set(e),d=Kf(f),p=new Set(t);try{for(var h=qe(p),g=h.next();!g.done;g=h.next())for(var v=g.value,y=v.parent;y&&!p.has(y);)p.add(y),y=y.parent}catch(P){r={error:P}}finally{try{g&&!g.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}var m=Kf(p);try{for(var w=qe(p),E=w.next();!E.done;E=w.next()){var v=E.value;if(v.type==="compound"&&(!m.get(v)||!m.get(v).length))d.get(v)?d.get(v).forEach(function(F){return p.add(F)}):v.initialStateNodes.forEach(function(F){return p.add(F)});else if(v.type==="parallel")try{for(var x=(a=void 0,qe(ea(v))),k=x.next();!k.done;k=x.next()){var I=k.value;p.has(I)||(p.add(I),d.get(I)?d.get(I).forEach(function(F){return p.add(F)}):I.initialStateNodes.forEach(function(F){return p.add(F)}))}}catch(F){a={error:F}}finally{try{k&&!k.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}}}catch(P){o={error:P}}finally{try{E&&!E.done&&(i=w.return)&&i.call(w)}finally{if(o)throw o.error}}try{for(var S=qe(p),C=S.next();!C.done;C=S.next())for(var v=C.value,y=v.parent;y&&!p.has(y);)p.add(y),y=y.parent}catch(P){l={error:P}}finally{try{C&&!C.done&&(u=S.return)&&u.call(S)}finally{if(l)throw l.error}}return p}function d1(e,t){var r=t.get(e);if(!r)return{};if(e.type==="compound"){var n=r[0];if(n){if(sl(n))return n.key}else return{}}var o={};return r.forEach(function(i){o[i.key]=d1(i,t)}),o}function Kf(e){var t,r,n=new Map;try{for(var o=qe(e),i=o.next();!i.done;i=o.next()){var a=i.value;n.has(a)||n.set(a,[]),a.parent&&(n.has(a.parent)||n.set(a.parent,[]),n.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}function gF(e,t){var r=ta([e],t);return d1(e,Kf(r))}function ra(e,t){return Array.isArray(e)?e.some(function(r){return r===t}):e instanceof Set?e.has(t):!1}function vF(e){return mt([],et(new Set(Et(mt([],et(e.map(function(t){return t.ownEvents})),!1)))),!1)}function ll(e,t){return t.type==="compound"?ea(t).some(function(r){return r.type==="final"&&ra(e,r)}):t.type==="parallel"?ea(t).every(function(r){return ll(e,r)}):!1}function mF(e){return e===void 0&&(e=[]),e.reduce(function(t,r){return r.meta!==void 0&&(t[r.id]=r.meta),t},{})}function p1(e){return new Set(Et(e.map(function(t){return t.tags})))}function h1(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(tt(e)||tt(t))return e===t;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(o){return h1(e[o],t[o])})}function bF(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function yF(e,t){var r=e.exec,n=be(be({},e),{exec:r!==void 0?function(){return r(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return n}var dr=function(){function e(t){var r=this,n;this.actions=[],this.activities=Xy,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Xy,this.meta=mF(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(n=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&n!==void 0?n:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return vF(r.configuration)}})}return e.from=function(t,r){if(t instanceof e)return t.context!==r?new e({value:t.value,context:r,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var n=Vo;return new e({value:t,context:r,_event:n,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,r){if(t instanceof e){if(!t.actions.length)return t;var n=Vo;return new e({value:t.value,context:r,_event:n,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,r)},e.prototype.toStrings=function(t,r){var n=this;if(t===void 0&&(t=this.value),r===void 0&&(r="."),tt(t))return[t];var o=Object.keys(t);return o.concat.apply(o,mt([],et(o.map(function(i){return n.toStrings(t[i],r).map(function(a){return i+r+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var r=t.tags;t.machine;var n=Mf(t,["configuration","transitions","tags","machine"]);return be(be({},n),{tags:Array.from(r)})},e.prototype.matches=function(t){return Wf(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var r;Ct&&Mt(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!(n!=null&&n.transitions.length)&&n.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),wF={deferEvents:!1},g1=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=be(be({},wF),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(r){throw this.clear(),r}finally{this.processingEvent=!1}},e}(),qf=new Map,_F=0,na={bookId:function(){return"x:".concat(_F++)},register:function(e,t){return qf.set(e,t),e},get:function(e){return qf.get(e)},free:function(e){qf.delete(e)}};function Yf(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;Ct||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function EF(){var e=Yf();if(e&&"__xstate__"in e)return e.__xstate__}function xF(e){if(Yf()){var t=EF();t&&t.register(e)}}function SF(e,t){t===void 0&&(t={});var r=e.initialState,n=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();r=e.transition(r,u,l),n.forEach(function(f){return f.next(r)})}i=!1}},s=hF({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return r},subscribe:function(u,f,d){var p=rl(u,f,d);return n.add(p),p.next(r),{unsubscribe:function(){n.delete(p)}}}}),l={parent:t.parent,self:s,id:t.id||"anonymous",observers:n};return r=e.start?e.start(l):r,s}var $F={sync:!1,autoForward:!1},St;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(St||(St={}));var CF=function(){function e(t,r){r===void 0&&(r=e.defaultOptions);var n=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=St.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(Wo(f))return n.batch(f),n.state;var p=Ft(tl(f,d));if(n.status===St.Stopped)return Ct||Mt(!1,'Event "'.concat(p.name,'" was sent to stopped service "').concat(n.machine.id,`". This service has already reached its final state, and will not transition.
203
+ Event: `).concat(JSON.stringify(p.data))),n.state;if(n.status!==St.Running&&!n.options.deferEvents)throw new Error('Event "'.concat(p.name,'" was sent to uninitialized service "').concat(n.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
204
+ Event: `).concat(JSON.stringify(p.data)));return n.scheduler.schedule(function(){n.forward(p);var h=n._nextState(p);n.update(h,p)}),n._state},this.sendTo=function(f,d,p){var h=n.parent&&(d===Uo.Parent||n.parent.id===d),g=h?n.parent:tt(d)?d===Uo.Internal?n:n.children.get(d)||na.get(d):JM(d)?d:void 0;if(!g){if(!h)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(n.id,"'."));Ct||Mt(!1,"Service '".concat(n.id,"' has no parent: unable to send event ").concat(f.type));return}if("machine"in g){if(n.status!==St.Stopped||n.parent!==g||n.state.done){var v=be(be({},f),{name:f.name===jM?"".concat(Qi(n.id)):f.name,origin:n.sessionId});!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([g,v]):g.send(v)}}else!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([g,f.data]):g.send(f.data)},this._exec=function(f,d,p,h){h===void 0&&(h=n.machine.options.actions);var g=f.exec||zf(f.type,h),v=nt(g)?g:g?g.exec:f.exec;if(v)try{return v(d,p.data,n.machine.config.predictableActionArguments?{action:f,_event:p}:{action:f,state:n.state,_event:p})}catch(K){throw n.parent&&n.parent.send({type:"xstate.error",data:K}),K}switch(f.type){case Yi:{var y=f;n.defer(y);break}case Js:var m=f;if(typeof m.delay=="number"){n.defer(m);return}else m.to?n.sendTo(m._event,m.to,p===Vo):n.send(m._event);break;case Gy:n.cancel(f.sendId);break;case Ff:{if(n.status!==St.Running)return;var w=f.activity;if(!n.machine.config.predictableActionArguments&&!n.state.activities[w.id||w.type])break;if(w.type===ft.Invoke){var E=a1(w.src),x=n.machine.options.services?n.machine.options.services[E.type]:void 0,k=w.id,I=w.data;Ct||Mt(!("forward"in w),"`forward` property is deprecated (found in invocation of '".concat(w.src,"' in in machine '").concat(n.machine.id,"'). ")+"Please use `autoForward` instead.");var S="autoForward"in w?w.autoForward:!!w.forward;if(!x){Ct||Mt(!1,"No service found for invocation '".concat(w.src,"' in machine '").concat(n.machine.id,"'."));return}var C=I?el(I,d,p):void 0;if(typeof x=="string")return;var P=nt(x)?x(d,p.data,{data:C,src:E,meta:w.meta}):x;if(!P)return;var F=void 0;to(P)&&(P=C?P.withContext(C):P,F={autoForward:S}),n.spawn(P,k,F)}else n.spawnActivity(w);break}case jf:{n.stopChild(f.activity.id);break}case Ky:var D=f,N=D.label,J=D.value;N?n.logger(N,J):n.logger(J);break;default:Ct||Mt(!1,"No implementation found for action type '".concat(f.type,"'"));break}};var o=be(be({},e.defaultOptions),r),i=o.clock,a=o.logger,s=o.parent,l=o.id,u=l!==void 0?l:t.id;this.id=u,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new g1({deferEvents:this.options.deferEvents}),this.sessionId=na.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:zo(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return Ct||Mt(this.status!==St.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,r){var n,o;try{for(var i=qe(t.actions),a=i.next();!a.done;a=i.next()){var s=a.value;this.exec(s,t,r)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(t,r){var n,o,i,a,s,l,u,f,d=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||r===Vo)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(P){d.state.children[P.id]=P}),this.devTools&&this.devTools.send(r.data,t),t.event)try{for(var h=qe(this.eventListeners),g=h.next();!g.done;g=h.next()){var v=g.value;v(t.event)}}catch(P){n={error:P}}finally{try{g&&!g.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}try{for(var y=qe(this.listeners),m=y.next();!m.done;m=y.next()){var v=m.value;v(t,t.event)}}catch(P){i={error:P}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}try{for(var w=qe(this.contextListeners),E=w.next();!E.done;E=w.next()){var x=E.value;x(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(P){s={error:P}}finally{try{E&&!E.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}if(this.state.done){var k=t.configuration.find(function(P){return P.type==="final"&&P.parent===d.machine}),I=k&&k.doneData?el(k.doneData,t.context,r):void 0;this._doneEvent=il(this.id,I);try{for(var S=qe(this.doneListeners),C=S.next();!C.done;C=S.next()){var v=C.value;v(this._doneEvent)}}catch(P){u={error:P}}finally{try{C&&!C.done&&(f=S.return)&&f.call(S)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),na.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===St.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,r,n){var o=this,i=rl(t,r,n);this.listeners.add(i.next),this.status!==St.NotStarted&&i.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),i.complete()};return this.status===St.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(i.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===St.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var r=this;if(this.status===St.Running)return this;this.machine._init(),na.register(this.sessionId,this),this.initialized=!0,this.status=St.Running;var n=t===void 0?this.initialState:zo(this,function(){return bF(t)?r.machine.resolveState(t):r.machine.resolveState(dr.from(t,r.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){r.update(n,Vo)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){nt(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,r,n,o,i,a,s,l,u,f;try{for(var d=qe(this.listeners),p=d.next();!p.done;p=d.next()){var h=p.value;this.listeners.delete(h)}}catch(S){t={error:S}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var g=qe(this.stopListeners),v=g.next();!v.done;v=g.next()){var h=v.value;h(),this.stopListeners.delete(h)}}catch(S){n={error:S}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(n)throw n.error}}try{for(var y=qe(this.contextListeners),m=y.next();!m.done;m=y.next()){var h=m.value;this.contextListeners.delete(h)}}catch(S){i={error:S}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}try{for(var w=qe(this.doneListeners),E=w.next();!E.done;E=w.next()){var h=E.value;this.doneListeners.delete(h)}}catch(S){s={error:S}}finally{try{E&&!E.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=St.Stopped,this._initialState=void 0;try{for(var x=qe(Object.keys(this.delayedEventsMap)),k=x.next();!k.done;k=x.next()){var I=k.value;this.clock.clearTimeout(this.delayedEventsMap[I])}}catch(S){u={error:S}}finally{try{k&&!k.done&&(f=x.return)&&f.call(x)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new g1({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,r=this.scheduler;return this._stop(),r.schedule(function(){var n=Ft({type:"xstate.stop"}),o=zo(t,function(){var i=Et(mt([],et(t.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return An(f.onExit,t.machine.options.actions)})),a=et(al(t.machine,t.state,t.state.context,n,[{type:"exit",actions:i}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],l=a[1],u=new dr({value:t.state.value,context:l,_event:n,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(f){return!Vf(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(o,n),t._stopChildren(),na.free(t.sessionId)}),this},e.prototype.batch=function(t){var r=this;if(this.status===St.NotStarted&&this.options.deferEvents)Ct||Mt(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
205
+ Event: `).concat(JSON.stringify(event)));else if(this.status!==St.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=r.state,s=!1,l=[],u=function(h){var g=Ft(h);r.forward(g),a=zo(r,function(){return r.machine.transition(a,g,void 0,n||void 0)}),l.push.apply(l,mt([],et(r.machine.config.predictableActionArguments?a.actions:a.actions.map(function(v){return yF(v,a)})),!1)),s=s||!!a.changed};try{for(var f=qe(t),d=f.next();!d.done;d=f.next()){var p=d.value;u(p)}}catch(h){o={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}a.changed=s,a.actions=l,r.update(a,Ft(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,r){var n=this;r===void 0&&(r=!!this.machine.config.predictableActionArguments&&this._exec);var o=Ft(t);if(o.name.indexOf(qy)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(qy)===0}))throw o.data.data;var i=zo(this,function(){return n.machine.transition(n.state,o,void 0,r||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var r,n;try{for(var o=qe(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(l){r={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.defer=function(t){var r=this,n=this.clock.setTimeout(function(){"to"in t&&t.to?r.sendTo(t._event,t.to,!0):r.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=n)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,r,n){n===void 0&&(n=this.machine.options.actions),this._exec(t,r.context,r._event,n)},e.prototype.removeChild=function(t){var r;this.children.delete(t),this.forwardTo.delete(t),(r=this.state)===null||r===void 0||delete r.children[t]},e.prototype.stopChild=function(t){var r=this.children.get(t);r&&(this.removeChild(t),nt(r.stop)&&r.stop())},e.prototype.spawn=function(t,r,n){if(this.status!==St.Running)return c1(t,r);if(t1(t))return this.spawnPromise(Promise.resolve(t),r);if(nt(t))return this.spawnCallback(t,r);if(pF(t))return this.spawnActor(t,r);if(YM(t))return this.spawnObservable(t,r);if(to(t))return this.spawnMachine(t,be(be({},n),{id:r}));if(GM(t))return this.spawnBehavior(t,r);throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,r){var n=this;r===void 0&&(r={});var o=new e(t,be(be({},this.options),{parent:this,id:r.id||t.id})),i=be(be({},$F),r);i.sync&&o.onTransition(function(s){n.send(Yy,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){n.removeChild(o.id),n.send(Ft(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,r){var n=SF(t,{id:r,parent:this});return this.children.set(r,n),n},e.prototype.spawnPromise=function(t,r){var n,o=this,i=!1,a;t.then(function(l){i||(a=l,o.removeChild(r),o.send(Ft(il(r,l),{origin:r})))},function(l){if(!i){o.removeChild(r);var u=Qi(r,l);try{o.send(Ft(u,{origin:r}))}catch(f){ZM(l,f,r),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(n={id:r,send:function(){},subscribe:function(l,u,f){var d=rl(l,u,f),p=!1;return t.then(function(h){p||(d.next(h),!p&&d.complete())},function(h){p||d.error(h)}),{unsubscribe:function(){return p=!0}}},stop:function(){i=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return a}},n[Cn]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnCallback=function(t,r){var n,o=this,i=!1,a=new Set,s=new Set,l,u=function(p){l=p,s.forEach(function(h){return h(p)}),!i&&o.send(Ft(p,{origin:r}))},f;try{f=t(u,function(p){a.add(p)})}catch(p){this.send(Qi(r,p))}if(t1(f))return this.spawnPromise(f,r);var d=(n={id:r,send:function(p){return a.forEach(function(h){return h(p)})},subscribe:function(p){var h=rl(p);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,nt(f)&&f()},toJSON:function(){return{id:r}},getSnapshot:function(){return l}},n[Cn]=function(){return this},n);return this.children.set(r,d),d},e.prototype.spawnObservable=function(t,r){var n,o=this,i,a=t.subscribe(function(l){i=l,o.send(Ft(l,{origin:r}))},function(l){o.removeChild(r),o.send(Ft(Qi(r,l),{origin:r}))},function(){o.removeChild(r),o.send(Ft(il(r),{origin:r}))}),s=(n={id:r,send:function(){},subscribe:function(l,u,f){return t.subscribe(l,u,f)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:r}}},n[Cn]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnActor=function(t,r){return this.children.set(r,t),t},e.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!r){Ct||Mt(!1,"No implementation found for activity '".concat(t.type,"'"));return}var n=r(this.state.context,t);this.spawnEffect(t.id,n)},e.prototype.spawnEffect=function(t,r){var n;this.children.set(t,(n={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},n[Cn]=function(){return this},n))},e.prototype.attachDev=function(){var t=Yf();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(be(be({name:this.id,autoPause:!0,stateSanitizer:function(n){return{value:n.value,context:n.context,actions:n.actions}}},r),{features:be({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}xF(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[Cn]=function(){return this},e.prototype.getSnapshot=function(){return this.status===St.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=v1,e}();function v1(e,t){var r=new CF(e,t);return r}function AF(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function cl(e){return be(be({type:Rf},e),{toJSON:function(){e.onDone,e.onError;var t=Mf(e,["onDone","onError"]);return be(be({},t),{type:Rf,src:AF(e.src)})}})}var Go="",Jf="#",oa="*",Ko={},qo=function(e){return e[0]===Jf},OF=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},TF=function(e,t,r){var n=r.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(tt(i.target)||to(i.target))}),o=t===Go?"the transient event":"event '".concat(t,"'");Mt(!n,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},IF=function(){function e(t,r,n,o){n===void 0&&(n="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=n,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(OF(),r),this.parent=o==null?void 0:o.parent,this.key=this.config.key||(o==null?void 0:o.key)||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Jy),this.id=this.config.id||mt([this.machine.key],et(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,Ct||Mt(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Xi(this.config.states,function(u,f){var d,p=new e(u,{},void 0,{parent:i,key:f});return Object.assign(i.idMap,be((d={},d[p.id]=p,d),p.idMap)),p}):Ko;var s=0;function l(u){var f,d;u.order=s++;try{for(var p=qe(u1(u)),h=p.next();!h.done;h=p.next()){var g=h.value;l(g)}}catch(v){f={error:v}}finally{try{h&&!h.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var f=u.event;return f===Go}):Go in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Sr(this.config.entry||this.config.onEntry).map(function(u){return Zi(u)}),this.onExit=Sr(this.config.exit||this.config.onExit).map(function(u){return Zi(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=Sr(this.config.invoke).map(function(u,f){var d,p;if(to(u)){var h=nl(i.id,f);return i.machine.options.services=be((d={},d[h]=u,d),i.machine.options.services),cl({src:h,id:h})}else if(tt(u.src)){var h=u.id||nl(i.id,f);return cl(be(be({},u),{id:h,src:u.src}))}else if(to(u.src)||nt(u.src)){var h=u.id||nl(i.id,f);return i.machine.options.services=be((p={},p[h]=u.src,p),i.machine.options.services),cl(be(be({id:h},u),{src:h}))}else{var g=u.src;return cl(be(be({id:nl(i.id,f)},u),{src:g}))}}),this.activities=Sr(this.config.activities).concat(this.invoke).map(function(u){return Gf(u)}),this.transition=this.transition.bind(this),this.tags=Sr(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||f1(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,r){var n=this.options,o=n.actions,i=n.activities,a=n.guards,s=n.services,l=n.delays;return new e(this.config,{actions:be(be({},o),t.actions),activities:be(be({},i),t.activities),guards:be(be({},a),t.guards),services:be(be({},s),t.services),delays:be(be({},l),t.delays)},r??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return nt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Xi(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(r,n){return r[n.eventType]=r[n.eventType]||[],r[n.eventType].push(n),r},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var r=t===Go,n=this.transitions.filter(function(o){var i=o.eventType===t;return r?i:i||o.eventType===oa});return this.__cache.candidates[t]=n,n},e.prototype.getDelayedTransitions=function(){var t=this,r=this.config.after;if(!r)return[];var n=function(i,a){var s=nt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,l=cF(s,t.id);return t.onEntry.push(tF(l,{delay:i})),t.onExit.push(oF(l)),l},o=Wo(r)?r.map(function(i,a){var s=n(i.delay,a);return be(be({},i),{event:s})}):Et(Object.keys(r).map(function(i,a){var s=r[i],l=tt(s)?{target:s}:s,u=isNaN(+i)?i:+i,f=n(u,a);return Sr(l).map(function(d){return be(be({},d),{event:f,delay:u})})}));return o.map(function(i){var a=i.delay;return be(be({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var r,n=this;if(!t)return[];var o=t instanceof dr?t.value:Ji(t,this.delimiter);if(tt(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((r={},r[o]=i,r)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,mt([],et(Et(a.map(function(l){return n.getStateNode(l).getStateNodes(o[l])}))),!1)),s},e.prototype.handles=function(t){var r=Zy(t);return this.events.includes(r)},e.prototype.resolveState=function(t){var r=t instanceof dr?t:dr.create(t),n=Array.from(ta([],this.getStateNodes(r.value)));return new dr(be(be({},r),{value:this.resolve(r.value),configuration:n,done:ll(n,this),tags:p1(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,r,n){var o=this.getStateNode(t),i=o.next(r,n);return!i||!i.transitions.length?this.next(r,n):i},e.prototype.transitionCompoundNode=function(t,r,n){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],r,n);return!a||!a.transitions.length?this.next(r,n):a},e.prototype.transitionParallelNode=function(t,r,n){var o,i,a={};try{for(var s=qe(Object.keys(t)),l=s.next();!l.done;l=s.next()){var u=l.value,f=t[u];if(f){var d=this.getStateNode(u),p=d._transition(f,r,n);p&&(a[u]=p)}}}catch(m){o={error:m}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var h=Object.keys(a).map(function(m){return a[m]}),g=Et(h.map(function(m){return m.transitions})),v=h.some(function(m){return m.transitions.length>0});if(!v)return this.next(r,n);var y=Et(Object.keys(a).map(function(m){return a[m].configuration}));return{transitions:g,exitSet:Et(h.map(function(m){return m.exitSet})),configuration:y,source:r,actions:Et(Object.keys(a).map(function(m){return a[m].actions}))}},e.prototype._transition=function(t,r,n){return tt(t)?this.transitionLeafNode(t,r,n):Object.keys(t).length===1?this.transitionCompoundNode(t,r,n):this.transitionParallelNode(t,r,n)},e.prototype.getTransitionData=function(t,r){return this._transition(t.value,t,Ft(r))},e.prototype.next=function(t,r){var n,o,i=this,a=r.name,s=[],l=[],u;try{for(var f=qe(this.getCandidates(a)),d=f.next();!d.done;d=f.next()){var p=d.value,h=p.cond,g=p.in,v=t.context,y=g?tt(g)&&qo(g)?t.matches(Ji(this.getStateNodeById(g).path,this.delimiter)):Wf(Ji(g,this.delimiter),HM(this.path.slice(0,-2))(t.value)):!0,m=!1;try{m=!h||i1(this.machine,h,v,r,t)}catch(x){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
206
+ `).concat(x.message))}if(m&&y){p.target!==void 0&&(l=p.target),s.push.apply(s,mt([],et(p.actions),!1)),u=p;break}}}catch(x){n={error:x}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var w=Et(l.map(function(x){return i.getRelativeStateNodes(x,t.historyValue)})),E=!!u.internal;return{transitions:[u],exitSet:E?[]:Et(l.map(function(x){return i.getPotentiallyReenteringNodes(x)})),configuration:w,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var r=[],n=this,o=t;n&&n!==o;)r.push(n),n=n.parent;return n!==o?[]:(r.push(o),r)},e.prototype.getActions=function(t,r,n,o,i,a,s){var l,u,f,d,p=this,h=a?ta([],this.getStateNodes(a.value)):[],g=new Set;try{for(var v=qe(Array.from(t).sort(function(D,N){return D.order-N.order})),y=v.next();!y.done;y=v.next()){var m=y.value;(!ra(h,m)||ra(n.exitSet,m)||m.parent&&g.has(m.parent))&&g.add(m)}}catch(D){l={error:D}}finally{try{y&&!y.done&&(u=v.return)&&u.call(v)}finally{if(l)throw l.error}}try{for(var w=qe(h),E=w.next();!E.done;E=w.next()){var m=E.value;(!ra(t,m)||ra(n.exitSet,m.parent))&&n.exitSet.push(m)}}catch(D){f={error:D}}finally{try{E&&!E.done&&(d=w.return)&&d.call(w)}finally{if(f)throw f.error}}n.exitSet.sort(function(D,N){return N.order-D.order});var x=Array.from(g).sort(function(D,N){return D.order-N.order}),k=new Set(n.exitSet),I=Et(x.map(function(D){var N=[];if(D.type!=="final")return N;var J=D.parent;if(!J.parent)return N;N.push(ol(D.id,D.doneData),ol(J.id,D.doneData?el(D.doneData,o,i):void 0));var K=J.parent;return K.type==="parallel"&&ea(K).every(function(Y){return ll(n.configuration,Y)})&&N.push(ol(K.id)),N})),S=x.map(function(D){var N=D.onEntry,J=D.activities.map(function(K){return iF(K)});return{type:"entry",actions:An(s?mt(mt([],et(N),!1),et(J),!1):mt(mt([],et(J),!1),et(N),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:I.map(function(D){return QM(D)})}),C=Array.from(k).map(function(D){return{type:"exit",actions:An(mt(mt([],et(D.onExit),!1),et(D.activities.map(function(N){return aF(N)})),!1),p.machine.options.actions)}}),P=C.concat({type:"transition",actions:An(n.actions,this.machine.options.actions)}).concat(S);if(r){var F=An(Et(mt([],et(t),!1).sort(function(D,N){return N.order-D.order}).map(function(D){return D.onExit})),this.machine.options.actions).filter(function(D){return!Vf(D)});return P.concat({type:"stop",actions:F})}return P},e.prototype.transition=function(t,r,n,o){t===void 0&&(t=this.initialState);var i=Ft(r),a;if(t instanceof dr)a=n===void 0?t:this.resolveState(dr.from(t,n));else{var s=tt(t)?this.resolve(Zs(this.getResolvedPath(t))):this.resolve(t),l=n??this.machine.context;a=this.resolveState(dr.from(s,l))}if(!Ct&&i.name===oa)throw new Error("An event cannot have the wildcard type ('".concat(oa,"')"));if(this.strict&&!this.events.includes(i.name)&&!zM(i.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var u=this._transition(a.value,a,i)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},f=ta([],this.getStateNodes(a.value)),d=u.configuration.length?ta(f,u.configuration):f;return u.configuration=mt([],et(d),!1),this.resolveTransition(u,a,a.context,o,i)},e.prototype.resolveRaisedTransition=function(t,r,n,o){var i,a=t.actions;return t=this.transition(t,r,void 0,o),t._event=n,t.event=n.data,(i=t.actions).unshift.apply(i,mt([],et(a),!1)),t},e.prototype.resolveTransition=function(t,r,n,o,i){var a,s,l,u,f=this;i===void 0&&(i=Vo);var d=t.configuration,p=!r||t.transitions.length>0,h=p?t.configuration:r?r.configuration:[],g=ll(h,this),v=p?gF(this.machine,d):void 0,y=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):void 0:void 0,m=this.getActions(new Set(h),g,t,n,i,r,o),w=r?be({},r.activities):{};try{for(var E=qe(m),x=E.next();!x.done;x=E.next()){var k=x.value;try{for(var I=(l=void 0,qe(k.actions)),S=I.next();!S.done;S=I.next()){var C=S.value;C.type===Ff?w[C.activity.id||C.activity.type]=C:C.type===jf&&(w[C.activity.id||C.activity.type]=!1)}}catch(re){l={error:re}}finally{try{S&&!S.done&&(u=I.return)&&u.call(I)}finally{if(l)throw l.error}}}}catch(re){a={error:re}}finally{try{x&&!x.done&&(s=E.return)&&s.call(E)}finally{if(a)throw a.error}}var P=et(al(this,r,n,i,m,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),F=P[0],D=P[1],N=et(KM(F,Vf),2),J=N[0],K=N[1],Y=F.filter(function(re){var de;return re.type===Ff&&((de=re.activity)===null||de===void 0?void 0:de.type)===Rf}),te=Y.reduce(function(re,de){return re[de.activity.id]=fF(de.activity,f.machine,D,i),re},r?be({},r.children):{}),oe=new dr({value:v||r.value,context:D,_event:i,_sessionid:r?r._sessionid:null,historyValue:v?y?qM(y,v):void 0:r?r.historyValue:void 0,history:!v||t.source?r:void 0,actions:v?K:[],activities:v?w:r?r.activities:{},events:[],configuration:h,transitions:t.transitions,children:te,done:g,tags:p1(h),machine:this}),le=n!==D;oe.changed=i.name===Yy||le;var ae=oe.history;ae&&delete ae.history;var ge=!g&&(this._transient||d.some(function(re){return re._transient}));if(!p&&(!ge||i.name===Go))return oe;var ce=oe;if(!g)for(ge&&(ce=this.resolveRaisedTransition(ce,{type:MM},i,o));J.length;){var q=J.shift();ce=this.resolveRaisedTransition(ce,q._event,i,o)}var H=ce.changed||(ae?!!ce.actions.length||le||typeof ae.value!=typeof ce.value||!h1(ce.value,ae.value):void 0);return ce.changed=H,ce.history=ae,ce},e.prototype.getStateNode=function(t){if(qo(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var r=this.states[t];if(!r)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return r},e.prototype.getStateNodeById=function(t){var r=qo(t)?t.slice(Jf.length):t;if(r===this.id)return this;var n=this.machine.idMap[r];if(!n)throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&qo(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var r=Hf(t,this.delimiter).slice(),n=this;r.length;){var o=r.shift();if(!o.length)break;n=n.getStateNode(o)}return n},e.prototype.resolve=function(t){var r,n=this;if(!t)return this.initialStateValue||Ko;switch(this.type){case"parallel":return Xi(this.initialStateValue,function(i,a){return i?n.getStateNode(a).resolve(t[a]||i):Ko});case"compound":if(tt(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(r={},r[t]=o.initialStateValue,r):t}return Object.keys(t).length?Xi(t,function(i,a){return i?n.getStateNode(a).resolve(i):Ko}):this.initialStateValue||{};default:return t||Ko}},e.prototype.getResolvedPath=function(t){if(qo(t)){var r=this.machine.idMap[t.slice(Jf.length)];if(!r)throw new Error("Unable to find state node '".concat(t,"'"));return r.path}return Hf(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var r;if(this.type==="parallel")r=Qy(this.states,function(n){return n.initialStateValue||Ko},function(n){return n.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));r=sl(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else r={};return this.__cache.initialStateValue=r,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,r){this._init();var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,r??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var r=this.config;tt(r.target)?t=qo(r.target)?Zs(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target:t=r.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,r,n){return n===void 0&&(n=!0),n?t.type==="history"?t.resolveHistory(r):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(sl(this))return[this];if(this.type==="compound"&&!this.initial)return Ct||Mt(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var r=Qs(this.initialStateValue);return Et(r.map(function(n){return t.getFromRelativePath(n)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var r=et(t),n=r[0],o=r.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var i=this.getStateNode(n);if(i.type==="history")return i.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:Qy(this.states,function(r,n){if(!t)return r.historyValue();var o=tt(t)?void 0:t[n];return r.historyValue(o||r.initialStateValue)},function(r){return!r.history})}},e.prototype.resolveHistory=function(t){var r=this;if(this.type!=="history")return[this];var n=this.parent;if(!t){var o=this.target;return o?Et(Qs(o).map(function(a){return n.getFromRelativePath(a)})):n.initialStateNodes}var i=VM(n.path,"states")(t).current;return tt(i)?[n.getStateNode(i)]:Et(Qs(i).map(function(a){return r.history==="deep"?n.getFromRelativePath(a):[n.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,r=Et(Object.keys(this.states).map(function(n){return t.states[n].stateIds}));return[this.id].concat(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,r,n,o;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var s=qe(Object.keys(i)),l=s.next();!l.done;l=s.next()){var u=l.value,f=i[u];if(f.states)try{for(var d=(n=void 0,qe(f.events)),p=d.next();!p.done;p=d.next()){var h=p.value;a.add("".concat(h))}}catch(g){n={error:g}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}}catch(g){t={error:g}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(r){return!(!r.target&&!r.actions.length&&r.internal)}).map(function(r){return r.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var r=this;if(t!==void 0)return t.map(function(n){if(!tt(n))return n;var o=n[0]===r.delimiter;if(o&&!r.parent)return r.getStateNodeByPath(n.slice(1));var i=o?r.key+n:n;if(r.parent)try{var a=r.parent.getStateNodeByPath(i);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(r.id,`':
207
+ `).concat(s.message))}else return r.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var r=this,n=XM(t.target),o="internal"in t?t.internal:n?n.some(function(l){return tt(l)&&l[0]===r.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(n),s=be(be({},t),{actions:An(Sr(t.actions)),cond:o1(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return be(be({},s),{target:s.target?s.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(r.id)})}});return s},e.prototype.formatTransitions=function(){var t,r,n=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=oa,s=i[a],l=s===void 0?[]:s,u=Mf(i,[typeof a=="symbol"?a:a+""]);o=Et(Object.keys(u).map(function(w){!Ct&&w===Go&&Mt(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(n.id,'".'));var E=Ho(w,u[w]);return Ct||TF(n,w,E),E}).concat(Ho(oa,l)))}var f=this.config.always?Ho("",this.config.always):[],d=this.config.onDone?Ho(String(ol(this.id)),this.config.onDone):[];Ct||Mt(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var p=Et(this.invoke.map(function(w){var E=[];return w.onDone&&E.push.apply(E,mt([],et(Ho(String(il(w.id)),w.onDone)),!1)),w.onError&&E.push.apply(E,mt([],et(Ho(String(Qi(w.id)),w.onError)),!1)),E})),h=this.after,g=Et(mt(mt(mt(mt([],et(d),!1),et(p),!1),et(o),!1),et(f),!1).map(function(w){return Sr(w).map(function(E){return n.formatTransition(E)})}));try{for(var v=qe(h),y=v.next();!y.done;y=v.next()){var m=y.value;g.push(m)}}catch(w){t={error:w}}finally{try{y&&!y.done&&(r=v.return)&&r.call(v)}finally{if(t)throw t.error}}return g},e}(),m1=!1;function Xf(e,t){return!Ct&&!("predictableActionArguments"in e)&&!m1&&(m1=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new IF(e,t)}var Kt=lF,PF=c.useLayoutEffect;function b1(e){var t=ve.useRef();return t.current||(t.current={v:e()}),t.current.v}var ul=function(){return ul=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},ul.apply(this,arguments)},kF=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},NF=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function DF(e,t){var r=b1(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var n=NF(c.useState(r),1),o=n[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var i=t.context,a=t.guards,s=t.actions,l=t.activities,u=t.services,f=t.delays;t.state;var d=kF(t,["context","guards","actions","activities","services","delays","state"]),p=b1(function(){var h={context:i,guards:a,actions:s,activities:l,services:u,delays:f},g=r.withConfig(h,function(){return ul(ul({},r.context),i)});return v1(g,d)});return PF(function(){Object.assign(p.machine.options.actions,s),Object.assign(p.machine.options.guards,a),Object.assign(p.machine.options.activities,l),Object.assign(p.machine.options.services,u),Object.assign(p.machine.options.delays,f)},[s,a,l,u,f]),p}function LF(e,t,r){if(e.status===St.NotStarted)return!0;var n=r.changed===void 0&&(Object.keys(r.children).length>0||typeof t.changed=="boolean");return!(r.changed||n)}var MF=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function FF(e){return e}function Zf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=MF(t,1),o=n[0],i=o===void 0?{}:o,a=DF(e,i),s=c.useCallback(function(){return a.status===St.NotStarted?i.state?dr.create(i.state):a.machine.initialState:a.getSnapshot()},[a]),l=c.useCallback(function(d,p){return LF(a,d,p)},[a]),u=c.useCallback(function(d){var p=a.subscribe(d).unsubscribe;return p},[a]),f=LM.useSyncExternalStoreWithSelector(u,s,s,FF,l);return c.useEffect(function(){var d=i.state;return a.start(d?dr.create(d):void 0),function(){a.stop(),a.status=St.NotStarted}},[]),[f,a.send,a]}const jF=Xf({id:"identity",predictableActionArguments:!0,context:{identity:null,identitySubscribable:null},initial:"choosingAction",invoke:{src:e=>e.identitySubscribable},states:{choosingAction:{},managingDeviceInvitation:{},managingAgent:{initial:"idle",states:{idle:{},pending:{}}},managingDevices:{},managingProfile:{initial:"idle",states:{idle:{},pending:{}},on:{setIdentity:{target:"choosingAction",actions:["setIdentity","log"]},updateProfile:{target:".pending",actions:"log"}}},signingOut:{}},on:{unchooseAction:{target:".choosingAction",actions:["unsetInvitation","log"]},deselectInvitation:{target:".choosingAction",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingDeviceInvitation",actions:["setInvitation","log"]},chooseDevices:{target:".managingDevices",actions:"log"},chooseProfile:{target:".managingProfile",actions:"log"},chooseSignOut:{target:".signingOut",actions:"log"},chooseAgent:{target:".managingAgent",actions:"log"}}},{actions:{setIdentity:Kt({identity:(e,t)=>(t==null?void 0:t.identity)??null}),setInvitation:Kt({invitation:(e,t)=>(t==null?void 0:t.invitation)??null}),unsetInvitation:Kt({invitation:()=>{}}),log:(e,t)=>{Ze("[transition]",{event:t,context:e})}}}),BF=(e,t)=>Zf(jF,{...t,context:{...t==null?void 0:t.context,identity:e.halo.identity.get(),identitySubscribable:e.halo.identity.map(r=>({type:"setIdentity",identity:r}))}}),RF=e=>{const{active:t,onAgentCreate:r,onAgentDestroy:n,send:o,validationMessage:i,agentStatus:a,agentActive:s,agentProviderDisabled:l}=e,u=!t,{t:f}=rt("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(zi,{validationMessage:i,label:c.createElement(xr,null,"Agent Status"),disabled:u,"data-testid":"agent-status",value:a})),c.createElement(Gt,null,c.createElement(st,{disabled:s||l,onClick:()=>r==null?void 0:r(),"data-testid":"create-agent"},"Create Agent"),c.createElement(st,{disabled:!s||l,onClick:()=>n==null?void 0:n(),"data-testid":"destroy-agent"},"Destroy Agent"),c.createElement(st,{disabled:u,onClick:()=>o==null?void 0:o({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},f("back label"))))},UF=({devices:e,active:t,send:r})=>{const{t:n}=rt("os"),o=!t;return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow"},c.createElement(Pk,{devices:e})),c.createElement(Gt,null,c.createElement(st,{variant:"ghost",disabled:o,onClick:()=>r==null?void 0:r({type:"unchooseAction"}),"data-testid":"manage-devices-back"},n("back label"))))},WF=e=>{const{send:t}=e,r=Ue.useClient(),n=li.useHaloInvitations(),o=c.useCallback(a=>{const s=sn.InvitationEncoder.encode(a);a.state===ye.State.CONNECTING&&console.log(JSON.stringify({invitationCode:s,authCode:a.authCode}))},[]),i=a=>{const s=a.altKey&&a.shiftKey;n.forEach(u=>u.cancel());const l=r.halo.share(s?{type:ye.Type.MULTIUSE,authMethod:ye.AuthMethod.NONE}:void 0);process.env.NODE_ENV!=="production"&&l.subscribe(o),t==null||t({type:"selectInvitation",invitation:l})};return c.createElement(HF,{...e,onCreateInvitationClick:a=>i(a)})},HF=({onCreateInvitationClick:e,active:t,send:r,onDone:n,doneActionParent:o})=>{const{t:i}=rt("os");return c.createElement("div",{role:"none",className:"grow flex flex-col gap-1"},c.createElement(So,{density:"coarse"},c.createElement("div",{className:"grow justify-center flex flex-col gap-1"},c.createElement(st,{"data-testid":"manage-agent",onClick:()=>r==null?void 0:r({type:"chooseAgent"}),classNames:"plb-4"},c.createElement(ze.HardDrive,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},"Manage Agent"),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(st,{disabled:!t,"data-testid":"devices-panel.create-invitation",onClick:e,classNames:"plb-4"},c.createElement(ze.Plus,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose add device label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(st,{"data-testid":"manage-devices",onClick:()=>r==null?void 0:r({type:"chooseDevices"}),classNames:"plb-4"},c.createElement(ze.Devices,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose devices label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(st,{"data-testid":"manage-profile",onClick:()=>r==null?void 0:r({type:"chooseProfile"}),classNames:"plb-4"},c.createElement(ze.UserGear,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose profile label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})),c.createElement(st,{"data-testid":"devices-panel.sign-out",onClick:()=>r==null?void 0:r({type:"chooseSignOut"}),classNames:"plb-4"},c.createElement(ze.Power,{className:We(6)}),c.createElement("span",{className:"grow mli-3"},i("choose sign out label")),c.createElement(ze.CaretRight,{weight:"bold",className:We(4)})))))},VF=e=>{const{onUpdateProfile:t}=e,{t:r}=rt("os"),[n,o]=c.useState(""),i=async a=>{await(t==null?void 0:t(a).catch(s=>{Ze.catch(s),o(r("failed to update profile message"))}))};return c.createElement(zF,{...e,onUpdateProfile:i,validationMessage:n})},zF=e=>{const{active:t,profile:r,send:n,onUpdateProfile:o,validationMessage:i}=e,a=!t,{t:s}=rt("os"),[l,u]=c.useState((r==null?void 0:r.displayName)??"");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(zi,{validationMessage:i,label:c.createElement(xr,null,s("display name input label")),disabled:a,"data-testid":"display-name-input",placeholder:s("display name input placeholder"),value:l,onChange:({target:{value:f}})=>u(f),onKeyDown:({key:f})=>f==="Enter"&&(o==null?void 0:o({displayName:l}))})),c.createElement(Gt,null,c.createElement(st,{variant:"ghost",disabled:a,onClick:()=>n==null?void 0:n({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},s("back label")),c.createElement(st,{variant:"primary",disabled:a,onClick:()=>o==null?void 0:o({displayName:l}),"data-testid":"update-profile-form-continue"},s("done label"))))},GF=e=>{const{t}=rt("os"),r=()=>{var n;window.confirm(t("reset device confirm message"))&&((n=e.onResetDevice)==null||n.call(e))};return c.createElement(KF,{disabled:!e.active,onBack:()=>{var n;return(n=e.send)==null?void 0:n.call(e,{type:"unchooseAction"})},onResetDevice:r,onJoinNewIdentity:e.onJoinNewIdentity})},KF=({disabled:e,onResetDevice:t,onJoinNewIdentity:r,onBack:n})=>{const{t:o}=rt("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Fc.Root,{valence:"error"},c.createElement(Fc.Title,null,c.createElement(ze.Warning,{className:ue(We(6),"inline mie-2")}),o("sign out chooser title")),c.createElement(Fc.Body,null,o("sign out chooser message")))),c.createElement(Gt,null,c.createElement(st,{disabled:e,onClick:n},o("back label")),c.createElement(st,{variant:"primary","data-testid":"sign-out.join-new-identity",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:r},o("join new identity label")),c.createElement(st,{variant:"primary","data-testid":"sign-out.reset-device",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:t},o("reset device label"))))},qF=({client:e,invitations:t,identity:r})=>{const[n,o]=c.useState(""),[i,a]=c.useState(""),[s,l]=c.useState(!1),u=Ue.useAgentHostingProviderClient(e.config);c.useEffect(()=>{(async()=>{if(u){const g=await(u==null?void 0:u.getAgent((r==null?void 0:r.identityKey.truncate())??"foo"));g?(l(!0),a(g)):(l(!1),o("No agent deployed via provider."))}else o("No agent provider configured.")})()},[]);const f=c.useCallback(async h=>{const g=sn.InvitationEncoder.encode(h);if(h.state===ye.State.CONNECTING&&(console.log(JSON.stringify({invitationCode:g,authCode:h.authCode})),Fi(r,"Identity not found"),u))try{const v=await(u==null?void 0:u.createAgent(g,r.identityKey.truncate()));a(v),l(!0),o("")}catch(v){o(`error creating agent: ${v.message}`)}},[]);return{onAgentCreate:async()=>{t.forEach(g=>g.cancel()),e.halo.share({type:ye.Type.MULTIUSE,authMethod:ye.AuthMethod.NONE}).subscribe(f)},onAgentDestroy:async()=>{const h=e.halo.identity.get();Fi(h,"Identity not found");try{await(u==null?void 0:u.destroyAgent(h.identityKey.truncate())),o("No agent deployed via provider."),a(""),l(!1)}catch(g){o(`error destroying agent: ${g.message}`)}},validationMessage:n,agentStatus:i,agentActive:s}};var y1={exports:{}};(function(e,t){var r=function(){var n=function(k,I){var S=236,C=17,P=k,F=i[I],D=null,N=0,J=null,K=[],Y={},te=function(M,R){N=P*4+17,D=function(G){for(var O=new Array(G),T=0;T<G;T+=1){O[T]=new Array(G);for(var Z=0;Z<G;Z+=1)O[T][Z]=null}return O}(N),oe(0,0),oe(N-7,0),oe(0,N-7),ge(),ae(),q(M,R),P>=7&&ce(M),J==null&&(J=de(P,F,K)),H(J,R)},oe=function(M,R){for(var G=-1;G<=7;G+=1)if(!(M+G<=-1||N<=M+G))for(var O=-1;O<=7;O+=1)R+O<=-1||N<=R+O||(0<=G&&G<=6&&(O==0||O==6)||0<=O&&O<=6&&(G==0||G==6)||2<=G&&G<=4&&2<=O&&O<=4?D[M+G][R+O]=!0:D[M+G][R+O]=!1)},le=function(){for(var M=0,R=0,G=0;G<8;G+=1){te(!0,G);var O=s.getLostPoint(Y);(G==0||M>O)&&(M=O,R=G)}return R},ae=function(){for(var M=8;M<N-8;M+=1)D[M][6]==null&&(D[M][6]=M%2==0);for(var R=8;R<N-8;R+=1)D[6][R]==null&&(D[6][R]=R%2==0)},ge=function(){for(var M=s.getPatternPosition(P),R=0;R<M.length;R+=1)for(var G=0;G<M.length;G+=1){var O=M[R],T=M[G];if(D[O][T]==null)for(var Z=-2;Z<=2;Z+=1)for(var ne=-2;ne<=2;ne+=1)Z==-2||Z==2||ne==-2||ne==2||Z==0&&ne==0?D[O+Z][T+ne]=!0:D[O+Z][T+ne]=!1}},ce=function(M){for(var R=s.getBCHTypeNumber(P),G=0;G<18;G+=1){var O=!M&&(R>>G&1)==1;D[Math.floor(G/3)][G%3+N-8-3]=O}for(var G=0;G<18;G+=1){var O=!M&&(R>>G&1)==1;D[G%3+N-8-3][Math.floor(G/3)]=O}},q=function(M,R){for(var G=F<<3|R,O=s.getBCHTypeInfo(G),T=0;T<15;T+=1){var Z=!M&&(O>>T&1)==1;T<6?D[T][8]=Z:T<8?D[T+1][8]=Z:D[N-15+T][8]=Z}for(var T=0;T<15;T+=1){var Z=!M&&(O>>T&1)==1;T<8?D[8][N-T-1]=Z:T<9?D[8][15-T-1+1]=Z:D[8][15-T-1]=Z}D[N-8][8]=!M},H=function(M,R){for(var G=-1,O=N-1,T=7,Z=0,ne=s.getMaskFunction(R),pe=N-1;pe>0;pe-=2)for(pe==6&&(pe-=1);;){for(var me=0;me<2;me+=1)if(D[O][pe-me]==null){var Ee=!1;Z<M.length&&(Ee=(M[Z]>>>T&1)==1);var _e=ne(O,pe-me);_e&&(Ee=!Ee),D[O][pe-me]=Ee,T-=1,T==-1&&(Z+=1,T=7)}if(O+=G,O<0||N<=O){O-=G,G=-G;break}}},re=function(M,R){for(var G=0,O=0,T=0,Z=new Array(R.length),ne=new Array(R.length),pe=0;pe<R.length;pe+=1){var me=R[pe].dataCount,Ee=R[pe].totalCount-me;O=Math.max(O,me),T=Math.max(T,Ee),Z[pe]=new Array(me);for(var _e=0;_e<Z[pe].length;_e+=1)Z[pe][_e]=255&M.getBuffer()[_e+G];G+=me;var ie=s.getErrorCorrectPolynomial(Ee),Ne=u(Z[pe],ie.getLength()-1),pt=Ne.mod(ie);ne[pe]=new Array(ie.getLength()-1);for(var _e=0;_e<ne[pe].length;_e+=1){var Te=_e+pt.getLength()-ne[pe].length;ne[pe][_e]=Te>=0?pt.getAt(Te):0}}for(var Me=0,_e=0;_e<R.length;_e+=1)Me+=R[_e].totalCount;for(var yt=new Array(Me),Se=0,_e=0;_e<O;_e+=1)for(var pe=0;pe<R.length;pe+=1)_e<Z[pe].length&&(yt[Se]=Z[pe][_e],Se+=1);for(var _e=0;_e<T;_e+=1)for(var pe=0;pe<R.length;pe+=1)_e<ne[pe].length&&(yt[Se]=ne[pe][_e],Se+=1);return yt},de=function(M,R,G){for(var O=f.getRSBlocks(M,R),T=d(),Z=0;Z<G.length;Z+=1){var ne=G[Z];T.put(ne.getMode(),4),T.put(ne.getLength(),s.getLengthInBits(ne.getMode(),M)),ne.write(T)}for(var pe=0,Z=0;Z<O.length;Z+=1)pe+=O[Z].dataCount;if(T.getLengthInBits()>pe*8)throw"code length overflow. ("+T.getLengthInBits()+">"+pe*8+")";for(T.getLengthInBits()+4<=pe*8&&T.put(0,4);T.getLengthInBits()%8!=0;)T.putBit(!1);for(;!(T.getLengthInBits()>=pe*8||(T.put(S,8),T.getLengthInBits()>=pe*8));)T.put(C,8);return re(T,O)};Y.addData=function(M,R){R=R||"Byte";var G=null;switch(R){case"Numeric":G=p(M);break;case"Alphanumeric":G=h(M);break;case"Byte":G=g(M);break;case"Kanji":G=v(M);break;default:throw"mode:"+R}K.push(G),J=null},Y.isDark=function(M,R){if(M<0||N<=M||R<0||N<=R)throw M+","+R;return D[M][R]},Y.getModuleCount=function(){return N},Y.make=function(){if(P<1){for(var M=1;M<40;M++){for(var R=f.getRSBlocks(M,F),G=d(),O=0;O<K.length;O++){var T=K[O];G.put(T.getMode(),4),G.put(T.getLength(),s.getLengthInBits(T.getMode(),M)),T.write(G)}for(var Z=0,O=0;O<R.length;O++)Z+=R[O].dataCount;if(G.getLengthInBits()<=Z*8)break}P=M}te(!1,le())},Y.createTableTag=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var G="";G+='<table style="',G+=" border-width: 0px; border-style: none;",G+=" border-collapse: collapse;",G+=" padding: 0px; margin: "+R+"px;",G+='">',G+="<tbody>";for(var O=0;O<Y.getModuleCount();O+=1){G+="<tr>";for(var T=0;T<Y.getModuleCount();T+=1)G+='<td style="',G+=" border-width: 0px; border-style: none;",G+=" border-collapse: collapse;",G+=" padding: 0px; margin: 0px;",G+=" width: "+M+"px;",G+=" height: "+M+"px;",G+=" background-color: ",G+=Y.isDark(O,T)?"#000000":"#ffffff",G+=";",G+='"/>';G+="</tr>"}return G+="</tbody>",G+="</table>",G},Y.createSvgTag=function(M,R,G,O){var T={};typeof arguments[0]=="object"&&(T=arguments[0],M=T.cellSize,R=T.margin,G=T.alt,O=T.title),M=M||2,R=typeof R>"u"?M*4:R,G=typeof G=="string"?{text:G}:G||{},G.text=G.text||null,G.id=G.text?G.id||"qrcode-description":null,O=typeof O=="string"?{text:O}:O||{},O.text=O.text||null,O.id=O.text?O.id||"qrcode-title":null;var Z=Y.getModuleCount()*M+R*2,ne,pe,me,Ee,_e="",ie;for(ie="l"+M+",0 0,"+M+" -"+M+",0 0,-"+M+"z ",_e+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',_e+=T.scalable?"":' width="'+Z+'px" height="'+Z+'px"',_e+=' viewBox="0 0 '+Z+" "+Z+'" ',_e+=' preserveAspectRatio="xMinYMin meet"',_e+=O.text||G.text?' role="img" aria-labelledby="'+U([O.id,G.id].join(" ").trim())+'"':"",_e+=">",_e+=O.text?'<title id="'+U(O.id)+'">'+U(O.text)+"</title>":"",_e+=G.text?'<description id="'+U(G.id)+'">'+U(G.text)+"</description>":"",_e+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',_e+='<path d="',me=0;me<Y.getModuleCount();me+=1)for(Ee=me*M+R,ne=0;ne<Y.getModuleCount();ne+=1)Y.isDark(me,ne)&&(pe=ne*M+R,_e+="M"+pe+","+Ee+ie);return _e+='" stroke="transparent" fill="black"/>',_e+="</svg>",_e},Y.createDataURL=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var G=Y.getModuleCount()*M+R*2,O=R,T=G-R;return x(G,G,function(Z,ne){if(O<=Z&&Z<T&&O<=ne&&ne<T){var pe=Math.floor((Z-O)/M),me=Math.floor((ne-O)/M);return Y.isDark(me,pe)?0:1}else return 1})},Y.createImgTag=function(M,R,G){M=M||2,R=typeof R>"u"?M*4:R;var O=Y.getModuleCount()*M+R*2,T="";return T+="<img",T+=' src="',T+=Y.createDataURL(M,R),T+='"',T+=' width="',T+=O,T+='"',T+=' height="',T+=O,T+='"',G&&(T+=' alt="',T+=U(G),T+='"'),T+="/>",T};var U=function(M){for(var R="",G=0;G<M.length;G+=1){var O=M.charAt(G);switch(O){case"<":R+="&lt;";break;case">":R+="&gt;";break;case"&":R+="&amp;";break;case'"':R+="&quot;";break;default:R+=O;break}}return R},z=function(M){var R=1;M=typeof M>"u"?R*2:M;var G=Y.getModuleCount()*R+M*2,O=M,T=G-M,Z,ne,pe,me,Ee,_e={"██":"█","█ ":"▀"," █":"▄"," ":" "},ie={"██":"▀","█ ":"▀"," █":" "," ":" "},Ne="";for(Z=0;Z<G;Z+=2){for(pe=Math.floor((Z-O)/R),me=Math.floor((Z+1-O)/R),ne=0;ne<G;ne+=1)Ee="█",O<=ne&&ne<T&&O<=Z&&Z<T&&Y.isDark(pe,Math.floor((ne-O)/R))&&(Ee=" "),O<=ne&&ne<T&&O<=Z+1&&Z+1<T&&Y.isDark(me,Math.floor((ne-O)/R))?Ee+=" ":Ee+="█",Ne+=M<1&&Z+1>=T?ie[Ee]:_e[Ee];Ne+=`
208
+ `}return G%2&&M>0?Ne.substring(0,Ne.length-G-1)+Array(G+1).join("▀"):Ne.substring(0,Ne.length-1)};return Y.createASCII=function(M,R){if(M=M||1,M<2)return z(R);M-=1,R=typeof R>"u"?M*2:R;var G=Y.getModuleCount()*M+R*2,O=R,T=G-R,Z,ne,pe,me,Ee=Array(M+1).join("██"),_e=Array(M+1).join(" "),ie="",Ne="";for(Z=0;Z<G;Z+=1){for(pe=Math.floor((Z-O)/M),Ne="",ne=0;ne<G;ne+=1)me=1,O<=ne&&ne<T&&O<=Z&&Z<T&&Y.isDark(pe,Math.floor((ne-O)/M))&&(me=0),Ne+=me?Ee:_e;for(pe=0;pe<M;pe+=1)ie+=Ne+`
209
+ `}return ie.substring(0,ie.length-1)},Y.renderTo2dContext=function(M,R){R=R||2;for(var G=Y.getModuleCount(),O=0;O<G;O++)for(var T=0;T<G;T++)M.fillStyle=Y.isDark(O,T)?"black":"white",M.fillRect(O*R,T*R,R,R)},Y};n.stringToBytesFuncs={default:function(k){for(var I=[],S=0;S<k.length;S+=1){var C=k.charCodeAt(S);I.push(C&255)}return I}},n.stringToBytes=n.stringToBytesFuncs.default,n.createStringToBytes=function(k,I){var S=function(){for(var P=w(k),F=function(){var ae=P.read();if(ae==-1)throw"eof";return ae},D=0,N={};;){var J=P.read();if(J==-1)break;var K=F(),Y=F(),te=F(),oe=String.fromCharCode(J<<8|K),le=Y<<8|te;N[oe]=le,D+=1}if(D!=I)throw D+" != "+I;return N}(),C=63;return function(P){for(var F=[],D=0;D<P.length;D+=1){var N=P.charCodeAt(D);if(N<128)F.push(N);else{var J=S[P.charAt(D)];typeof J=="number"?(J&255)==J?F.push(J):(F.push(J>>>8),F.push(J&255)):F.push(C)}}return F}};var o={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},i={L:1,M:0,Q:3,H:2},a={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var k=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],I=1335,S=7973,C=21522,P={},F=function(D){for(var N=0;D!=0;)N+=1,D>>>=1;return N};return P.getBCHTypeInfo=function(D){for(var N=D<<10;F(N)-F(I)>=0;)N^=I<<F(N)-F(I);return(D<<10|N)^C},P.getBCHTypeNumber=function(D){for(var N=D<<12;F(N)-F(S)>=0;)N^=S<<F(N)-F(S);return D<<12|N},P.getPatternPosition=function(D){return k[D-1]},P.getMaskFunction=function(D){switch(D){case a.PATTERN000:return function(N,J){return(N+J)%2==0};case a.PATTERN001:return function(N,J){return N%2==0};case a.PATTERN010:return function(N,J){return J%3==0};case a.PATTERN011:return function(N,J){return(N+J)%3==0};case a.PATTERN100:return function(N,J){return(Math.floor(N/2)+Math.floor(J/3))%2==0};case a.PATTERN101:return function(N,J){return N*J%2+N*J%3==0};case a.PATTERN110:return function(N,J){return(N*J%2+N*J%3)%2==0};case a.PATTERN111:return function(N,J){return(N*J%3+(N+J)%2)%2==0};default:throw"bad maskPattern:"+D}},P.getErrorCorrectPolynomial=function(D){for(var N=u([1],0),J=0;J<D;J+=1)N=N.multiply(u([1,l.gexp(J)],0));return N},P.getLengthInBits=function(D,N){if(1<=N&&N<10)switch(D){case o.MODE_NUMBER:return 10;case o.MODE_ALPHA_NUM:return 9;case o.MODE_8BIT_BYTE:return 8;case o.MODE_KANJI:return 8;default:throw"mode:"+D}else if(N<27)switch(D){case o.MODE_NUMBER:return 12;case o.MODE_ALPHA_NUM:return 11;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 10;default:throw"mode:"+D}else if(N<41)switch(D){case o.MODE_NUMBER:return 14;case o.MODE_ALPHA_NUM:return 13;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 12;default:throw"mode:"+D}else throw"type:"+N},P.getLostPoint=function(D){for(var N=D.getModuleCount(),J=0,K=0;K<N;K+=1)for(var Y=0;Y<N;Y+=1){for(var te=0,oe=D.isDark(K,Y),le=-1;le<=1;le+=1)if(!(K+le<0||N<=K+le))for(var ae=-1;ae<=1;ae+=1)Y+ae<0||N<=Y+ae||le==0&&ae==0||oe==D.isDark(K+le,Y+ae)&&(te+=1);te>5&&(J+=3+te-5)}for(var K=0;K<N-1;K+=1)for(var Y=0;Y<N-1;Y+=1){var ge=0;D.isDark(K,Y)&&(ge+=1),D.isDark(K+1,Y)&&(ge+=1),D.isDark(K,Y+1)&&(ge+=1),D.isDark(K+1,Y+1)&&(ge+=1),(ge==0||ge==4)&&(J+=3)}for(var K=0;K<N;K+=1)for(var Y=0;Y<N-6;Y+=1)D.isDark(K,Y)&&!D.isDark(K,Y+1)&&D.isDark(K,Y+2)&&D.isDark(K,Y+3)&&D.isDark(K,Y+4)&&!D.isDark(K,Y+5)&&D.isDark(K,Y+6)&&(J+=40);for(var Y=0;Y<N;Y+=1)for(var K=0;K<N-6;K+=1)D.isDark(K,Y)&&!D.isDark(K+1,Y)&&D.isDark(K+2,Y)&&D.isDark(K+3,Y)&&D.isDark(K+4,Y)&&!D.isDark(K+5,Y)&&D.isDark(K+6,Y)&&(J+=40);for(var ce=0,Y=0;Y<N;Y+=1)for(var K=0;K<N;K+=1)D.isDark(K,Y)&&(ce+=1);var q=Math.abs(100*ce/N/N-50)/5;return J+=q*10,J},P}(),l=function(){for(var k=new Array(256),I=new Array(256),S=0;S<8;S+=1)k[S]=1<<S;for(var S=8;S<256;S+=1)k[S]=k[S-4]^k[S-5]^k[S-6]^k[S-8];for(var S=0;S<255;S+=1)I[k[S]]=S;var C={};return C.glog=function(P){if(P<1)throw"glog("+P+")";return I[P]},C.gexp=function(P){for(;P<0;)P+=255;for(;P>=256;)P-=255;return k[P]},C}();function u(k,I){if(typeof k.length>"u")throw k.length+"/"+I;var S=function(){for(var P=0;P<k.length&&k[P]==0;)P+=1;for(var F=new Array(k.length-P+I),D=0;D<k.length-P;D+=1)F[D]=k[D+P];return F}(),C={};return C.getAt=function(P){return S[P]},C.getLength=function(){return S.length},C.multiply=function(P){for(var F=new Array(C.getLength()+P.getLength()-1),D=0;D<C.getLength();D+=1)for(var N=0;N<P.getLength();N+=1)F[D+N]^=l.gexp(l.glog(C.getAt(D))+l.glog(P.getAt(N)));return u(F,0)},C.mod=function(P){if(C.getLength()-P.getLength()<0)return C;for(var F=l.glog(C.getAt(0))-l.glog(P.getAt(0)),D=new Array(C.getLength()),N=0;N<C.getLength();N+=1)D[N]=C.getAt(N);for(var N=0;N<P.getLength();N+=1)D[N]^=l.gexp(l.glog(P.getAt(N))+F);return u(D,0).mod(P)},C}var f=function(){var k=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],I=function(P,F){var D={};return D.totalCount=P,D.dataCount=F,D},S={},C=function(P,F){switch(F){case i.L:return k[(P-1)*4+0];case i.M:return k[(P-1)*4+1];case i.Q:return k[(P-1)*4+2];case i.H:return k[(P-1)*4+3];default:return}};return S.getRSBlocks=function(P,F){var D=C(P,F);if(typeof D>"u")throw"bad rs block @ typeNumber:"+P+"/errorCorrectionLevel:"+F;for(var N=D.length/3,J=[],K=0;K<N;K+=1)for(var Y=D[K*3+0],te=D[K*3+1],oe=D[K*3+2],le=0;le<Y;le+=1)J.push(I(te,oe));return J},S}(),d=function(){var k=[],I=0,S={};return S.getBuffer=function(){return k},S.getAt=function(C){var P=Math.floor(C/8);return(k[P]>>>7-C%8&1)==1},S.put=function(C,P){for(var F=0;F<P;F+=1)S.putBit((C>>>P-F-1&1)==1)},S.getLengthInBits=function(){return I},S.putBit=function(C){var P=Math.floor(I/8);k.length<=P&&k.push(0),C&&(k[P]|=128>>>I%8),I+=1},S},p=function(k){var I=o.MODE_NUMBER,S=k,C={};C.getMode=function(){return I},C.getLength=function(D){return S.length},C.write=function(D){for(var N=S,J=0;J+2<N.length;)D.put(P(N.substring(J,J+3)),10),J+=3;J<N.length&&(N.length-J==1?D.put(P(N.substring(J,J+1)),4):N.length-J==2&&D.put(P(N.substring(J,J+2)),7))};var P=function(D){for(var N=0,J=0;J<D.length;J+=1)N=N*10+F(D.charAt(J));return N},F=function(D){if("0"<=D&&D<="9")return D.charCodeAt(0)-48;throw"illegal char :"+D};return C},h=function(k){var I=o.MODE_ALPHA_NUM,S=k,C={};C.getMode=function(){return I},C.getLength=function(F){return S.length},C.write=function(F){for(var D=S,N=0;N+1<D.length;)F.put(P(D.charAt(N))*45+P(D.charAt(N+1)),11),N+=2;N<D.length&&F.put(P(D.charAt(N)),6)};var P=function(F){if("0"<=F&&F<="9")return F.charCodeAt(0)-48;if("A"<=F&&F<="Z")return F.charCodeAt(0)-65+10;switch(F){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+F}};return C},g=function(k){var I=o.MODE_8BIT_BYTE,S=n.stringToBytes(k),C={};return C.getMode=function(){return I},C.getLength=function(P){return S.length},C.write=function(P){for(var F=0;F<S.length;F+=1)P.put(S[F],8)},C},v=function(k){var I=o.MODE_KANJI,S=n.stringToBytesFuncs.SJIS;if(!S)throw"sjis not supported.";(function(F,D){var N=S(F);if(N.length!=2||(N[0]<<8|N[1])!=D)throw"sjis not supported."})("友",38726);var C=S(k),P={};return P.getMode=function(){return I},P.getLength=function(F){return~~(C.length/2)},P.write=function(F){for(var D=C,N=0;N+1<D.length;){var J=(255&D[N])<<8|255&D[N+1];if(33088<=J&&J<=40956)J-=33088;else if(57408<=J&&J<=60351)J-=49472;else throw"illegal char at "+(N+1)+"/"+J;J=(J>>>8&255)*192+(J&255),F.put(J,13),N+=2}if(N<D.length)throw"illegal char at "+(N+1)},P},y=function(){var k=[],I={};return I.writeByte=function(S){k.push(S&255)},I.writeShort=function(S){I.writeByte(S),I.writeByte(S>>>8)},I.writeBytes=function(S,C,P){C=C||0,P=P||S.length;for(var F=0;F<P;F+=1)I.writeByte(S[F+C])},I.writeString=function(S){for(var C=0;C<S.length;C+=1)I.writeByte(S.charCodeAt(C))},I.toByteArray=function(){return k},I.toString=function(){var S="";S+="[";for(var C=0;C<k.length;C+=1)C>0&&(S+=","),S+=k[C];return S+="]",S},I},m=function(){var k=0,I=0,S=0,C="",P={},F=function(N){C+=String.fromCharCode(D(N&63))},D=function(N){if(!(N<0)){if(N<26)return 65+N;if(N<52)return 97+(N-26);if(N<62)return 48+(N-52);if(N==62)return 43;if(N==63)return 47}throw"n:"+N};return P.writeByte=function(N){for(k=k<<8|N&255,I+=8,S+=1;I>=6;)F(k>>>I-6),I-=6},P.flush=function(){if(I>0&&(F(k<<6-I),k=0,I=0),S%3!=0)for(var N=3-S%3,J=0;J<N;J+=1)C+="="},P.toString=function(){return C},P},w=function(k){var I=k,S=0,C=0,P=0,F={};F.read=function(){for(;P<8;){if(S>=I.length){if(P==0)return-1;throw"unexpected end of file./"+P}var N=I.charAt(S);if(S+=1,N=="=")return P=0,-1;if(N.match(/^\s$/))continue;C=C<<6|D(N.charCodeAt(0)),P+=6}var J=C>>>P-8&255;return P-=8,J};var D=function(N){if(65<=N&&N<=90)return N-65;if(97<=N&&N<=122)return N-97+26;if(48<=N&&N<=57)return N-48+52;if(N==43)return 62;if(N==47)return 63;throw"c:"+N};return F},E=function(k,I){var S=k,C=I,P=new Array(k*I),F={};F.setPixel=function(K,Y,te){P[Y*S+K]=te},F.write=function(K){K.writeString("GIF87a"),K.writeShort(S),K.writeShort(C),K.writeByte(128),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(255),K.writeByte(255),K.writeByte(255),K.writeString(","),K.writeShort(0),K.writeShort(0),K.writeShort(S),K.writeShort(C),K.writeByte(0);var Y=2,te=N(Y);K.writeByte(Y);for(var oe=0;te.length-oe>255;)K.writeByte(255),K.writeBytes(te,oe,255),oe+=255;K.writeByte(te.length-oe),K.writeBytes(te,oe,te.length-oe),K.writeByte(0),K.writeString(";")};var D=function(K){var Y=K,te=0,oe=0,le={};return le.write=function(ae,ge){if(ae>>>ge)throw"length over";for(;te+ge>=8;)Y.writeByte(255&(ae<<te|oe)),ge-=8-te,ae>>>=8-te,oe=0,te=0;oe=ae<<te|oe,te=te+ge},le.flush=function(){te>0&&Y.writeByte(oe)},le},N=function(K){for(var Y=1<<K,te=(1<<K)+1,oe=K+1,le=J(),ae=0;ae<Y;ae+=1)le.add(String.fromCharCode(ae));le.add(String.fromCharCode(Y)),le.add(String.fromCharCode(te));var ge=y(),ce=D(ge);ce.write(Y,oe);var q=0,H=String.fromCharCode(P[q]);for(q+=1;q<P.length;){var re=String.fromCharCode(P[q]);q+=1,le.contains(H+re)?H=H+re:(ce.write(le.indexOf(H),oe),le.size()<4095&&(le.size()==1<<oe&&(oe+=1),le.add(H+re)),H=re)}return ce.write(le.indexOf(H),oe),ce.write(te,oe),ce.flush(),ge.toByteArray()},J=function(){var K={},Y=0,te={};return te.add=function(oe){if(te.contains(oe))throw"dup key:"+oe;K[oe]=Y,Y+=1},te.size=function(){return Y},te.indexOf=function(oe){return K[oe]},te.contains=function(oe){return typeof K[oe]<"u"},te};return F},x=function(k,I,S){for(var C=E(k,I),P=0;P<I;P+=1)for(var F=0;F<k;F+=1)C.setPixel(F,P,S(F,P));var D=y();C.write(D);for(var N=m(),J=D.toByteArray(),K=0;K<J.length;K+=1)N.writeByte(J[K]);return N.flush(),"data:image/gif;base64,"+N};return n}();(function(){r.stringToBytesFuncs["UTF-8"]=function(n){function o(i){for(var a=[],s=0;s<i.length;s++){var l=i.charCodeAt(s);l<128?a.push(l):l<2048?a.push(192|l>>6,128|l&63):l<55296||l>=57344?a.push(224|l>>12,128|l>>6&63,128|l&63):(s++,l=65536+((l&1023)<<10|i.charCodeAt(s)&1023),a.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return a}return o(n)}})(),function(n){e.exports=n()}(function(){return r})})(y1);var YF=y1.exports;const Qf=ln(YF);var JF=Object.defineProperty,fl=Object.getOwnPropertySymbols,w1=Object.prototype.hasOwnProperty,_1=Object.prototype.propertyIsEnumerable,E1=(e,t,r)=>t in e?JF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,XF=(e,t)=>{for(var r in t||(t={}))w1.call(t,r)&&E1(e,r,t[r]);if(fl)for(var r of fl(t))_1.call(t,r)&&E1(e,r,t[r]);return e},ZF=(e,t)=>{var r={};for(var n in e)w1.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&fl)for(var n of fl(e))t.indexOf(n)<0&&_1.call(e,n)&&(r[n]=e[n]);return r},tn=1e3,QF=/code length overflow/i;Qf.stringToBytes=Qf.stringToBytesFuncs["UTF-8"];var e9=(e,t,r)=>{r=Math.max(1,r);for(let n=r;n<=40;n+=1)try{const o=Qf(n,t);o.addData(e),o.make();const i=o.getModuleCount();return{text:e,level:t,version:n,moduleCount:i,isDark:(s,l)=>s>=0&&s<i&&l>=0&&l<i&&o.isDark(s,l)}}catch(o){if(!(n<40&&QF.test(String(o))))throw o}return null},On=Math.round,Yo=(e,t)=>`M ${On(e)} ${On(t)}`,Ut=(e,t)=>`L ${On(e)} ${On(t)}`,Tn=(e,t,r)=>`A ${On(r)} ${On(r)} 0 0 1 ${On(e)} ${On(t)}`,t9=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i?u.push(Yo(e+o,t)):u.push(Yo(e,t)),a?u.push(Ut(r-o,t),Tn(r,t+o,o)):u.push(Ut(r,t)),s?u.push(Ut(r,n-o),Tn(r-o,n,o)):u.push(Ut(r,n)),l?u.push(Ut(e+o,n),Tn(e,n-o,o)):u.push(Ut(e,n)),i?u.push(Ut(e,t+o),Tn(e+o,t,o)):u.push(Ut(e,t)),u.join(" ")},r9=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i&&u.push(Yo(e+o,t),Ut(e,t),Ut(e,t+o),Tn(e+o,t,o)),a&&u.push(Yo(r,t+o),Ut(r,t),Ut(r-o,t),Tn(r,t+o,o)),s&&u.push(Yo(r-o,n),Ut(r,n),Ut(r,n-o),Tn(r-o,n,o)),l&&u.push(Yo(e,n-o),Ut(e,n),Ut(e+o,n),Tn(e,n-o,o)),u.join(" ")},n9=(e,t,r,n,o)=>{const i=o*r,a=n*r,s=i+r,l=a+r,u=t*.005*r,f=e.isDark,d=n-1,p=n+1,h=o-1,g=o+1,v=f(n,o),y=f(d,h),m=f(d,o),w=f(d,g),E=f(n,g),x=f(p,g),k=f(p,o),I=f(p,h),S=f(n,h);return v?t9(i,a,s,l,u,!m&&!S,!m&&!E,!k&&!E,!k&&!S):r9(i,a,s,l,u,m&&S&&y,m&&E&&w,k&&E&&x,k&&S&&I)},o9=(e,t)=>{if(!e)return"";const r=e.moduleCount,n=tn/r,o=[];for(let i=0;i<r;i+=1)for(let a=0;a<r;a+=1)o.push(n9(e,t,n,i,a));return o.join(" ")},i9=e=>{var t=e,{color:r="#000",backgroundColor:n,cutout:o=!1,cutoutElement:i,errorCorrectionLevel:a="Q",rounding:s=0,children:l}=t,u=ZF(t,["color","backgroundColor","cutout","cutoutElement","errorCorrectionLevel","rounding","children"]),f,d;const p=c.useMemo(()=>e9(l,a,1),[l,a]);if(!p)return null;const h=(f=p==null?void 0:p.moduleCount)!=null?f:1,v=tn/((d=p==null?void 0:p.moduleCount)!=null?d:1)*(Math.floor(h*.18)*2-1)+2,y=(tn-v)/2;return ve.createElement("svg",XF({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${tn} ${tn}`},u),o?ve.createElement("mask",{id:"react-qr-rounded__mask"},ve.createElement("rect",{x:"0",y:"0",width:tn,height:tn,fill:"#fff"}),ve.createElement("rect",{x:y,y,width:v,height:v,rx:s,ry:s,fill:"#000"})):null,n?ve.createElement("rect",{x:"0",y:"0",width:tn,height:tn,fill:n}):null,ve.createElement("path",{fill:r,d:o9(p,s),mask:o?"url(#react-qr-rounded__mask)":void 0}),i?ve.createElement("foreignObject",{x:y,y,width:v,height:v},ve.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",overflow:"hidden",borderRadius:s}},i)):null)};const ed=({children:e,...t})=>c.createElement(lt.View,{...t,classNames:"grow flex flex-col justify-around items-center"},e),x1=({invitationUrl:e,active:t,send:r,status:n,type:o,authCode:i,id:a})=>{const{t:s}=rt("os"),l=xt("invitation-manager__qr-code"),u=o===ye.Type.MULTIUSE?0:wL.get(n)??0,f=u===3,d=_f(a??""),p=c.useMemo(()=>{switch(!0){case u===5:case u<0:return"showing final";case u===3:return"showing auth code";default:return"showing qr"}},[u]);return c.createElement(c.Fragment,null,c.createElement(lt.Root,{activeView:p,classNames:"grow plb-1"},c.createElement(lt.Views,null,c.createElement(ed,{id:"showing qr",emoji:d},c.createElement("p",{className:"text-sm mlb-1 font-normal text-center"},s(o===ye.Type.MULTIUSE?"invite many qr label":"invite one qr label")),c.createElement("div",{role:"none",className:ue(Tt,"is-full max-is-[14rem] relative")},c.createElement(i9,{rounding:100,backgroundColor:"transparent",color:"currentColor",className:ue("is-full bs-full p-2",f&&"invisible"),"aria-labelledby":l,errorCorrectionLevel:"Q",cutout:!0},e??"never"),c.createElement(O7,null,c.createElement(Ef,{text:d}))),c.createElement("span",{id:l,className:"sr-only"},s("qr label")),c.createElement(Tk,{variant:"ghost",value:e??"never"})),c.createElement(ed,{id:"showing auth code"},c.createElement(by,null,s("auth code message")),c.createElement(vy,{code:i,large:!0,classNames:"text-black dark:text-white"}),c.createElement(by,null,"Be sure the other device is showing this symbol:"),d&&c.createElement(Ef,{text:d})),c.createElement(ed,{id:"showing final"},u>0?c.createElement(ze.Check,{className:ue("m-1.5",We(6))}):c.createElement(ze.X,{className:ue("m-1.5",We(6))})))),c.createElement(Gt,{classNames:"mbs-4"},c.createElement(st,{disabled:!t,onClick:()=>r==null?void 0:r({type:"deselectInvitation"})},s("back label"))))},Jo="pbs-1 pbe-3 pli-3",a9=({titleId:e,title:t,identity:r,onDone:n})=>{var i;const o=as(r.identityKey.toHex(),12);return c.createElement(xf,{titleId:e,title:t,corner:c.createElement(my,{onDone:n})},c.createElement(It.Root,{size:12,variant:"circle",status:"active"},c.createElement(It.Frame,{classNames:"block mbs-4 mbe-2 mli-auto chromatic-ignore"},c.createElement(It.Fallback,{href:o})),c.createElement(It.Label,{classNames:"block text-center font-light text-xl","data-testid":"identityHeading.displayName"},((i=r.profile)==null?void 0:i.displayName)??fu(r.identityKey.toHex()))))},S1=e=>{const{identity:t,titleId:r,activeView:n,onUpdateProfile:o,onResetDevice:i,onJoinNewIdentity:a,IdentityActionChooser:s=WF,InvitationManager:l=x1,onDone:u,...f}=e,{t:d}=rt("os"),p=c.useMemo(()=>{switch(n){case"agent manager":return"Manage Agent";case"device invitation manager":return d("choose add device label");default:return d("identity heading")}},[n,d]);return c.createElement(So,{density:"fine"},c.createElement(a9,{identity:t,titleId:r,title:p,onDone:u}),c.createElement(lt.Root,{activeView:n},c.createElement(lt.Views,null,c.createElement(lt.View,{id:"identity action chooser",classNames:Jo},c.createElement(s,{active:n==="identity action chooser",...f})),c.createElement(lt.View,{id:"device invitation manager",classNames:Jo},c.createElement(l,{active:n==="device invitation manager",...f,invitationUrl:f.createInvitationUrl(f.invitationCode)})),c.createElement(lt.View,{id:"device manager",classNames:Jo},c.createElement(UF,{active:n==="device manager",...f})),c.createElement(lt.View,{classNames:Jo,id:"update profile form"},c.createElement(VF,{send:f.send,active:n==="update profile form",profile:t.profile,onUpdateProfile:o})),c.createElement(lt.View,{classNames:Jo,id:"signing out"},c.createElement(GF,{send:f.send,active:n==="signing out",onResetDevice:i,onJoinNewIdentity:a})),c.createElement(lt.View,{classNames:Jo,id:"agent manager"},c.createElement(RF,{send:f.send,active:n==="agent manager",...f})))))},s9=({invitation:e,...t})=>{const r=sf(e);return c.createElement(S1,{...t,...r})},l9=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=xt("identityPanel__heading",e),o=Ue.useClient(),i=li.useDevices(),a=li.useIdentity(),s=li.useHaloInvitations(),l=qF({client:o,identity:a,invitations:s});if(!a)return console.error("IdentityPanel rendered with no active identity."),null;const[u,f,d]=BF(o);c.useEffect(()=>d.subscribe(y=>{Ze("[state]",y)}).unsubscribe,[d]);const p=c.useMemo(()=>{switch(!0){case u.matches("choosingAction"):return"identity action chooser";case u.matches("managingDeviceInvitation"):return"device invitation manager";case u.matches("managingDevices"):return"device manager";case[{managingProfile:"idle"},{managingProfile:"pending"}].some(u.matches):return"update profile form";case u.matches("signingOut"):return"signing out";case[{managingAgent:"idle"},{managingAgent:"pending"}].some(u.matches):return"agent manager";default:return"identity action chooser"}},[u]),g={...r,identity:a,devices:i,activeView:p,send:f,titleId:n,createInvitationUrl:t,onUpdateProfile:async v=>{f({type:"updateProfile"}),await o.halo.updateProfile(v)},...l};return u.context.invitation?c.createElement(s9,{...g,invitation:u.context.invitation}):c.createElement(S1,{...g})},c9=c.forwardRef(({mode:e,titleId:t,onExit:r,exitActionParent:n},o)=>{const{t:i}=rt("os"),a=c.createElement(wr,{variant:"ghost",...r&&{onClick:r},classNames:ue(Tt,"plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),"data-testid":"join-exit"},c.createElement(ze.X,{weight:"bold",className:We(4)}),c.createElement("span",{className:"sr-only"},i("exit label")));return c.createElement(xf,{ref:o,titleId:t,title:i(e==="halo-only"?"selecting identity heading":"joining space heading"),...e==="halo-only"?{titleSrOnly:!0}:{corner:n?c.cloneElement(n,{},a):a},titleSrOnly:e==="halo-only"})}),$1=(e,t)=>(Ze("[subscribing to invitation]",t),{subscribe:(r,n,o)=>t.subscribe(i=>{switch(i.state){case ye.State.CONNECTING:return Ze("[invitation connecting]",{Kind:e,invitation:i}),r({type:`connecting${e}Invitation`,invitation:i});case ye.State.CONNECTED:return Ze("[invitation connected]",{Kind:e,invitation:i}),r({type:`connected${e}Invitation`,invitation:i});case ye.State.READY_FOR_AUTHENTICATION:return Ze("[invitation ready for authentication]",{Kind:e,invitation:i}),r({type:`readyForAuthentication${e}Invitation`,invitation:i});case ye.State.AUTHENTICATING:return Ze("[invitation authenticating]",{Kind:e,invitation:i}),r({type:`authenticating${e}Invitation`,invitation:i});case ye.State.SUCCESS:return Ze("[invitation success]",{Kind:e,invitation:i}),r({type:`success${e}Invitation`,invitation:i}),o==null?void 0:o();case ye.State.CANCELLED:return Ze.warn("[invitation cancelled]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"cancelled"});case ye.State.TIMEOUT:return Ze.error("[invitation timeout]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"timeout"})}},i=>i instanceof Ue.AlreadyJoinedError?(Ze("[already joined]",{Kind:e,error:i}),r({type:`success${e}Invitation`,invitation:t.get()}),o==null?void 0:o()):(Ze.error("[invitation errored]",{Kind:e,error:i}),r({type:`fail${e}Invitation`,reason:"error"}),n==null?void 0:n(i)))}),C1=(e,t)=>({initial:`unknown${e}`,states:{[`unknown${e}`]:{always:[{cond:({mode:n})=>n==="halo-only"&&e==="Space",target:"#join.finishingJoiningHalo"},{cond:n=>!!n[e.toLowerCase()].unredeemedCode,target:`acceptingRedeemed${e}Invitation`,actions:[`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]},{target:`inputting${e}InvitationCode`,actions:"log"}]},[`inputting${e}InvitationCode`]:{},[`acceptingRedeemed${e}Invitation`]:{invoke:{src:n=>n[e.toLowerCase()].invitationSubscribable},initial:`unknown${e}Invitation`,states:{[`unknown${e}Invitation`]:{always:[{cond:n=>{var o,i;if(e!=="Space")return!1;{const a=(i=(o=n.space.invitation)==null?void 0:o.spaceKey)==null?void 0:i.toHex(),s=n.space.succeededKeys;return a?!!(s!=null&&s.has(a)):!1}},target:t,actions:"log"},{cond:n=>{const o=n[e.toLowerCase()].invitation;return!o||(o==null?void 0:o.state)===ye.State.CONNECTING},target:`connecting${e}Invitation`,actions:"log"},{target:`inputting${e}VerificationCode`,actions:"log"}]},[`connecting${e}Invitation`]:{},[`inputting${e}VerificationCode`]:{},[`authenticating${e}VerificationCode`]:{on:{[`readyForAuthentication${e}Invitation`]:{target:`authenticationFailing${e}VerificationCode`,actions:["setInvitation","log"]}}},[`authenticationFailing${e}VerificationCode`]:{},[`failing${e}Invitation`]:{},[`success${e}Invitation`]:{}},on:{[`reset${e}Invitation`]:{target:`#join${e==="Halo"?".choosingIdentity":""}.accepting${e}Invitation.unknown${e}`,actions:["resetInvitation","log"]},[`connecting${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`connected${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`readyForAuthentication${e}Invitation`]:{target:`.inputting${e}VerificationCode`,actions:["setInvitation","log"]},[`authenticating${e}Invitation`]:{target:`.authenticating${e}VerificationCode`,actions:["setInvitation","log"]},[`success${e}Invitation`]:{target:t,actions:["setInvitation","log"]},[`fail${e}Invitation`]:{target:`.failing${e}Invitation`,actions:[Kt({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],failReason:o.reason})}),"log"]}}}},on:{[`set${e}InvitationCode`]:{target:`.acceptingRedeemed${e}Invitation`,actions:[Kt({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],unredeemedCode:o.code,succeededKeys:o.succeededKeys})}),`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]}}}),u9=Xf({id:"join",predictableActionArguments:!0,context:{mode:"default",identity:null,halo:{},space:{}},initial:"unknown",states:{unknown:{always:[{cond:"existingIdentity",target:"resettingIdentity",actions:"log"},{cond:"noSelectedIdentity",target:"choosingIdentity",actions:"log"},{target:"acceptingSpaceInvitation",actions:"log"}]},choosingIdentity:{initial:"unknownAuthMethod",states:{unknownAuthMethod:{always:[{cond:"hasHaloUnredeemedCode",target:"acceptingHaloInvitation",actions:"log"},{target:"choosingAuthMethod",actions:"log"}]},choosingAuthMethod:{},recoveringIdentity:{},creatingIdentity:{},acceptingHaloInvitation:C1("Halo","#join.acceptingSpaceInvitation"),confirmingAddedIdentity:{}},on:{recoverIdentity:{target:".recoveringIdentity",actions:"log"},createIdentity:{target:".creatingIdentity",actions:"log"},acceptHaloInvitation:{target:".acceptingHaloInvitation",actions:"log"},addIdentity:{target:".confirmingAddedIdentity",actions:"log"},selectIdentity:{target:"acceptingSpaceInvitation",actions:["setIdentity","log"]},deselectAuthMethod:{target:".choosingAuthMethod",actions:"log"}}},resettingIdentity:{},acceptingSpaceInvitation:C1("Space","#join.finishingJoiningSpace"),finishingJoiningSpace:{type:"final"},finishingJoiningHalo:{type:"final"}},on:{resetIdentity:{target:"choosingIdentity",actions:"unsetIdentity"}}},{guards:{existingIdentity:({identity:e,mode:t},r)=>t==="halo-only"&&!!e,noSelectedIdentity:({identity:e},t)=>!e,hasHaloUnredeemedCode:({halo:e},t)=>!!e.unredeemedCode,noSpaceInvitation:({space:e},t)=>!e.invitation&&!e.unredeemedCode},actions:{setIdentity:Kt({identity:(e,t)=>t.identity}),unsetIdentity:Kt({identity:()=>null}),resetInvitation:Kt({halo:(e,t)=>t.type!=="resetHaloInvitation"?e.halo:(e.halo.invitationObservable&&e.halo.invitationObservable.cancel(),{...e.halo,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0}),space:(e,t)=>t.type!=="resetSpaceInvitation"?e.space:(e.space.invitationObservable&&e.space.invitationObservable.cancel(),{...e.space,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0})}),setInvitation:Kt({halo:(e,t)=>t.type.includes("Halo")?{...e.halo,invitation:t.invitation}:e.halo,space:(e,t)=>t.type.includes("Space")?{...e.space,invitation:t.invitation}:e.space}),log:(e,t)=>{Ze("[transition]",{event:t,haloInvitation:e.halo.invitation,spaceInvitation:e.space.invitation})}}}),A1=(e,t)=>{try{const r=new URLSearchParams(t.substring(t.lastIndexOf("?")));return r.get(`${e}InvitationCode`)??r.get(`${e}Invitation`)??r.get("invitationCode")??r.get("invitation")??t}catch(r){return Ze.catch(r),t}},f9=(e,t)=>{const r=c.useCallback(({halo:a})=>{if(a.unredeemedCode)try{const s=sn.InvitationEncoder.decode(A1("halo",a.unredeemedCode)),l=e.halo.join(s);return{...a,invitationObservable:l,invitationSubscribable:$1("Halo",l)}}catch(s){return Ze.error("Could not redeem device invitation code",s),a}else return a},[e]),n=c.useCallback(({space:a})=>{if(a.unredeemedCode)try{const s=sn.InvitationEncoder.decode(A1("space",a.unredeemedCode)),l=e.spaces.join(s);return{...a,invitationObservable:l,invitationSubscribable:$1("Space",l)}}catch(s){return Ze.error("Could not redeem space invitation code",s),a}else return a},[e]),o=c.useCallback(({halo:a})=>{var s;return a.unredeemedCode?((s=t==null?void 0:t.onInvalidateInvitationCode)==null||s.call(t,a.unredeemedCode),{...a,unredeemedCode:void 0}):a},[t==null?void 0:t.onInvalidateInvitationCode]),i=c.useCallback(({space:a})=>{var s;return a.unredeemedCode?((s=t==null?void 0:t.onInvalidateInvitationCode)==null||s.call(t,a.unredeemedCode),{...a,unredeemedCode:void 0}):a},[t==null?void 0:t.onInvalidateInvitationCode]);return Zf(u9,{...t,actions:{...t==null?void 0:t.actions,redeemHaloInvitationCode:Kt({halo:r}),redeemSpaceInvitationCode:Kt({space:n}),invalidateHaloInvitationCode:Kt({halo:o}),invalidateSpaceInvitationCode:Kt({space:i})}})},d9=e=>{const t=!e.active,{send:r}=e,{t:n}=rt("os"),o={disabled:t,after:c.createElement(ze.CaretRight,{className:We(4),weight:"bold"}),slots:{label:{className:"text-sm"}}};return c.createElement(c.Fragment,null,c.createElement(xr,null,n("addition method chooser title")),c.createElement("div",{role:"none",className:"flex flex-col gap-1 grow"},c.createElement(uu,{...o,description:n("create identity description"),before:c.createElement(ze.Plus,{className:We(6)}),onClick:()=>r({type:"createIdentity"}),"data-autofocus":"choosingAuthMethod","data-testid":"identity-chooser.create-identity"},n("create identity label")),c.createElement(uu,{...o,description:n("join identity description"),before:c.createElement(ze.QrCode,{className:We(6)}),onClick:()=>r({type:"acceptHaloInvitation"}),"data-testid":"identity-chooser.join-identity"},n("join identity label")),c.createElement(uu,{...o,disabled:!0,description:n("recover identity description"),before:c.createElement(ze.Textbox,{className:We(6)}),onClick:()=>r({type:"recoverIdentity"}),"data-testid":"identity-chooser.recover-identity"},n("recover identity label"))))},p9=e=>{var g,v;const{mode:t,addedIdentity:r,active:n,send:o,onDone:i,doneActionParent:a}=e,s=!n,{t:l}=rt("os"),u=r==null?void 0:r.identityKey.toHex(),f=xt("identityListItem__label"),d=as(u??"",12),p=((g=r==null?void 0:r.profile)==null?void 0:g.displayName)??(r&&fu(r==null?void 0:r.identityKey.toHex())),h=c.createElement(st,{...i&&{onClick:()=>i(null)},disabled:s,"data-autofocus":"confirmingAddedIdentity","data-testid":"identity-added-done"},c.createElement("span",null,l("done label")));return c.createElement(c.Fragment,null,c.createElement(xr,null,l("identity added label")),c.createElement("div",{role:"none",className:"grow flex flex-col items-center justify-center text-center gap-2"},c.createElement(It.Root,{status:"active",labelId:f},c.createElement(It.Frame,null,c.createElement(It.Fallback,{href:d})),c.createElement(It.Label,{classNames:ue("text-lg truncate",!((v=r==null?void 0:r.profile)!=null&&v.displayName)&&"font-mono")},p))),c.createElement(Gt,null,t==="halo-only"?a?c.cloneElement(a,{},h):h:c.createElement(st,{variant:"primary",disabled:s||!r,onClick:()=>r&&o({type:"selectIdentity",identity:r}),"data-autofocus":"confirmingAddedIdentity"},l("continue label"))))},h9=e=>{const{send:t,method:r}=e,n=r==="recover identity",o=Ue.useClient(),{t:i}=rt("os"),[a,s]=c.useState(""),l=u=>{o.halo.createIdentity({[n?"seedphrase":"displayName"]:u}).then(f=>{t==null||t({type:"selectIdentity",identity:f})},f=>{Ze.catch(f),s(i(n?"failed to recover identity message":"failed to create identity message"))})};return c.createElement(g9,{...e,onDisplayNameConfirm:l,validationMessage:a})},g9=e=>{const{method:t,send:r,active:n,onDisplayNameConfirm:o,validationMessage:i}=e,a=!n,{t:s}=rt("os"),[l,u]=c.useState(""),f=t==="recover identity";return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(zi,{validationMessage:i,label:c.createElement(xr,null,s(f?"recover identity input label":"new identity input label")),disabled:a,"data-testid":"identity-input",placeholder:f?"Type your recovery phrase":"Type a display name",onChange:({target:{value:d}})=>u(d)})),c.createElement(Gt,null,c.createElement(st,{variant:"ghost",disabled:a,onClick:()=>r==null?void 0:r({type:"deselectAuthMethod"}),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-back`},s("back label")),c.createElement(st,{variant:"primary",disabled:a,onClick:()=>o==null?void 0:o(l),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-continue`},s("continue label"))))},O1=e=>{const{active:t,Kind:r,doneActionParent:n,onDone:o}=e,i=!t,{t:a}=rt("os"),s=c.createElement(st,{variant:"primary",onClick:o,disabled:i,"data-autofocus":`success${r}Invitation finishingJoining${r}`,"data-testid":`${r.toLowerCase()}-invitation-accepted-done`},a("done label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement("p",{className:"text-center text-sm font-normal"},a("welcome message"))),c.createElement(Gt,null,n?c.cloneElement(n,{},s):s))},v9=e=>{try{const t=new URLSearchParams(e.substring(e.lastIndexOf("?")));return t.get("spaceInvitationCode")??t.get("deviceInvitationCode")??e}catch(t){return Ze.catch(t),e}},T1=e=>{const{Kind:t,active:r,send:n,unredeemedCode:o,onExit:i,exitActionParent:a,onDone:s,doneActionParent:l,succeededKeys:u}=e,f=!r,{t:d}=rt("os"),[p,h]=c.useState(o??"");c.useEffect(()=>{o&&h(o??"")},[o]);const g=()=>{p.trim().length!==0&&n({type:`set${t}InvitationCode`,code:v9(p),...t==="Space"&&{succeededKeys:u}})},v=c.createElement(st,{variant:"ghost",disabled:f,...i?{onClick:()=>i()}:{onClick:()=>s==null?void 0:s(null)},"data-testid":"join-exit"},d("cancel label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(zi,{label:c.createElement(xr,null,d("invitation input label")),placeholder:"Type an invitation code",disabled:f,value:p,onChange:({target:{value:y}})=>h(y),"data-autofocus":`inputting${t}InvitationCode`,"data-testid":`${t.toLowerCase()}-invitation-input`,onKeyUp:({key:y})=>y==="Enter"&&g()})),c.createElement(Gt,null,t==="Halo"?c.createElement(st,{variant:"ghost",disabled:f,onClick:()=>n({type:"deselectAuthMethod"}),"data-testid":`${t.toLowerCase()}-invitation-input-back`},d("back label")):a?c.cloneElement(a,{},v):l?c.cloneElement(l,{},v):v,c.createElement(st,{variant:"primary",disabled:f,onClick:g,"data-testid":`${t.toLowerCase()}-invitation-input-continue`},d("continue label"))))},m9=({invitationState:e,onInvitationCancel:t,active:r,send:n,Kind:o,failReason:i})=>{const{t:a}=rt("os");return i?c.createElement(c.Fragment,null,c.createElement(xr,{className:Tt},a(i==="timeout"?"timeout status label":i==="cancelled"?"cancelled status label":"error status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(Gt,null,c.createElement(st,{disabled:!r,onClick:()=>n({type:`reset${o}Invitation`}),"data-testid":"invitation-rescuer-reset"},a("reset label")))):c.createElement(c.Fragment,null,c.createElement(xr,{className:Tt},a("connecting status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(Gt,null,c.createElement(st,{disabled:!0,classNames:"order-2","data-testid":"next"},a("next label")),c.createElement(st,{disabled:!r,onClick:t,"data-testid":"invitation-rescuer-cancel"},a("cancel label"))))},I1=e=>{const{Kind:t,invitationState:r,active:n,send:o}=e,{t:i}=rt("os");return c.createElement(c.Fragment,null,typeof r>"u"?c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(xr,{className:Tt},"There was a problem joining the space")),c.createElement(Gt,null,c.createElement(st,{disabled:!n,"data-testid":"invitation-rescuer-blank-reset",onClick:()=>o({type:`reset${t}Invitation`})},i("reset label")))):c.createElement(m9,{...e}))},P1=6,k1=({failed:e,Kind:t,active:r,pending:n,invitationId:o,onInvitationAuthenticate:i,onInvitationCancel:a})=>{const s=!r||n,{t:l}=rt("os"),u=t.toLowerCase(),[f,d]=c.useState(""),p=({target:{value:h}})=>{var g;d(h),h.length===P1&&((g=document.querySelector(`[data-autofocus-pinlength="${u}"]`))==null||g.focus())};return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},o&&c.createElement(Ef,{text:_f(o)}),c.createElement(Br.Root,{...e&&{validationValence:"error"}},c.createElement(Br.Label,{asChild:!0},c.createElement(xr,null,l("auth code input label"))),c.createElement(Br.PinInput,{disabled:s,length:P1,onChange:p,inputMode:"numeric",autoComplete:"off",pattern:"\\d*","data-autofocus":`connecting${t}Invitation inputting${t}VerificationCode authenticationFailing${t}VerificationCode authenticating${t}VerificationCode`,"data-prevent-ios-autofocus":!0,"data-testid":`${u}-auth-code-input`,"data-1p-ignore":!0}),e&&c.createElement(Br.DescriptionAndValidation,{classNames:"text-center"},c.createElement(Br.Validation,null,l("failed to authenticate message"))))),c.createElement(Gt,null,c.createElement(st,{variant:"ghost",disabled:s,onClick:()=>a==null?void 0:a(),"data-testid":`${u}-invitation-authenticator-cancel`},l("cancel label")),c.createElement(st,{variant:"primary",disabled:s,onClick:()=>i==null?void 0:i(f),"data-autofocus-pinlength":u,"data-testid":`${u}-invitation-authenticator-next`},l("next label"))))},b9=({send:e,active:t})=>{const r=Ue.useClient(),{t:n}=rt("os"),[o,i]=c.useState(""),a=()=>{r.reset().then(()=>e==null?void 0:e({type:"resetIdentity"}),s=>{Ze.catch(s),i(n("failed to reset identity message"))})};return c.createElement(y9,{disabled:!t,validationMessage:o,onConfirm:()=>a()})},y9=({disabled:e,validationMessage:t,onConfirm:r})=>{const{t:n}=rt("os"),o=n("confirmation value"),[i,a]=c.useState("");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(zi,{validationMessage:t,label:c.createElement(xr,null,n("reset identity input label",{confirmationValue:o})),disabled:e,"data-testid":"reset-identity-input",placeholder:o,onChange:({target:{value:s}})=>a(s)})),c.createElement(Gt,null,c.createElement(st,{variant:"primary",disabled:e||i!==o,onClick:()=>r==null?void 0:r(),"data-testid":"reset-identity-input-confirm"},n("confirm label"))))},qt="pbs-1 pbe-3 pli-3",w9=e=>{const{titleId:t,send:r,activeView:n,failed:o,mode:i,unredeemedCodes:a,invitationStates:s,succeededKeys:l,failReasons:u,onExit:f,onHaloDone:d,onSpaceDone:p,exitActionParent:h,doneActionParent:g,onHaloInvitationCancel:v,onSpaceInvitationCancel:y,onHaloInvitationAuthenticate:m,onSpaceInvitationAuthenticate:w,IdentityInput:E=h9,ResetIdentity:x=b9}=e;return c.createElement(So,{density:"fine"},i!=="halo-only"&&c.createElement(c9,{titleId:t,mode:i,onExit:f,exitActionParent:h}),c.createElement(lt.Root,{focusManaged:!0,activeView:n},c.createElement(lt.Views,null,c.createElement(lt.View,{classNames:qt,id:"addition method chooser"},c.createElement(d9,{send:r,active:n==="addition method chooser"})),c.createElement(lt.View,{classNames:qt,id:"reset identity confirmation"},c.createElement(x,{send:r,method:"reset identity",active:n==="reset identity confirmation"})),c.createElement(lt.View,{classNames:qt,id:"create identity input"},c.createElement(E,{send:r,method:"create identity",active:n==="create identity input"})),c.createElement(lt.View,{classNames:qt,id:"recover identity input"},c.createElement(E,{send:r,method:"recover identity",active:n==="recover identity input"})),c.createElement(lt.View,{classNames:qt,id:"halo invitation input"},c.createElement(T1,{send:r,Kind:"Halo",active:n==="halo invitation input",...(a==null?void 0:a.Halo)&&{unredeemedCode:a.Halo},...(l==null?void 0:l.Halo)&&{succeededKeys:l.Halo}})),c.createElement(lt.View,{classNames:qt,id:"halo invitation rescuer"},c.createElement(I1,{send:r,Kind:"Halo",active:n==="halo invitation rescuer",invitationState:s==null?void 0:s.Halo,onInvitationCancel:v,failReason:u==null?void 0:u.Halo})),c.createElement(lt.View,{classNames:qt,id:"halo invitation authenticator"},c.createElement(k1,{send:r,Kind:"Halo",active:n==="halo invitation authenticator",onInvitationCancel:v,onInvitationAuthenticate:m,...o.has("Halo")&&{failed:!0}})),c.createElement(lt.View,{classNames:qt,id:"halo invitation accepted"},c.createElement(O1,{send:r,Kind:"Halo",active:n==="halo invitation accepted",doneActionParent:g,onDone:d})),c.createElement(lt.View,{classNames:qt,id:"identity added"},c.createElement(p9,{send:r,mode:i,active:n==="identity added",doneActionParent:g,onDone:d})),c.createElement(lt.View,{classNames:qt,id:"space invitation input"},c.createElement(T1,{send:r,Kind:"Space",active:n==="space invitation input",...(a==null?void 0:a.Space)&&{unredeemedCode:a.Space},...(l==null?void 0:l.Space)&&{succeededKeys:l.Space},onExit:f,exitActionParent:h})),c.createElement(lt.View,{classNames:qt,id:"space invitation rescuer"},c.createElement(I1,{send:r,Kind:"Space",active:n==="space invitation rescuer",invitationState:s==null?void 0:s.Space,onInvitationCancel:y,failReason:u==null?void 0:u.Space})),c.createElement(lt.View,{classNames:qt,id:"space invitation authenticator"},c.createElement(k1,{send:r,Kind:"Space",active:n==="space invitation authenticator",onInvitationCancel:y,onInvitationAuthenticate:w,...o.has("Space")&&{failed:!0}})),c.createElement(lt.View,{classNames:qt,id:"space invitation accepted"},c.createElement(O1,{send:r,Kind:"Space",active:n==="space invitation accepted",doneActionParent:g,onDone:p})))))},_9=({titleId:e,mode:t="default",initialInvitationCode:r,exitActionParent:n,onExit:o,doneActionParent:i,onDone:a})=>{const s=Ue.useClient(),l=li.useIdentity(),{hasIosKeyboard:u}=Ce(),f=xt("joinPanel__heading",e),[d,p,h]=f9(s,{context:{mode:t,identity:l,...r&&{[t==="halo-only"?"halo":"space"]:{unredeemedCode:r}}}});c.useEffect(()=>h.subscribe(C=>{Ze("[state]",C)}).unsubscribe,[h]),c.useEffect(()=>{const S=d.configuration[0].id.split("."),C=S[S.length-1],P=C==="finishingJoining"?"successSpaceInvitation":C,F=document.querySelector(`[data-autofocus~="${P}"]`);F&&!(u&&F.hasAttribute("data-prevent-ios-autofocus"))&&F.focus()},[d.value,u]);const g=c.useMemo(()=>{switch(!0){case d.matches({choosingIdentity:"choosingAuthMethod"}):return"addition method chooser";case d.matches("resettingIdentity"):return"reset identity confirmation";case d.matches({choosingIdentity:"creatingIdentity"}):return"create identity input";case d.matches({choosingIdentity:"recoveringIdentity"}):return"recover identity input";case d.matches({choosingIdentity:{acceptingHaloInvitation:"inputtingHaloInvitationCode"}}):return"halo invitation input";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"connectingHaloInvitation"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"failingHaloInvitation"}}}].some(d.matches):return"halo invitation rescuer";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"inputtingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticatingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}].some(d.matches):return"halo invitation authenticator";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"successHaloInvitation"}}},"finishingJoiningHalo"].some(d.matches):return"halo invitation accepted";case d.matches({choosingIdentity:"confirmingAddedIdentity"}):return"identity added";case d.matches({acceptingSpaceInvitation:"inputtingSpaceInvitationCode"}):return"space invitation input";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"connectingSpaceInvitation"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"failingSpaceInvitation"}}].some(d.matches):return"space invitation rescuer";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"inputtingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticatingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}].some(d.matches):return"space invitation authenticator";case d.matches("finishingJoiningSpace"):return"space invitation accepted";default:return"never"}},[d]),v=c.useMemo(()=>{const S=new Set;switch(!0){case d.matches({choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}):S.add("Halo");break;case d.matches({acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}):S.add("Space");break}return S},[d]),y=c.useMemo(()=>({Halo:d.context.halo.unredeemedCode,Space:d.context.space.unredeemedCode}),[d]),m=Ue.useMulticastObservable(s.spaces),w=c.useMemo(()=>({Space:m?new Set(m.map(({key:S})=>S.toHex())):void 0}),[m]),E=c.useMemo(()=>{var S,C;return{Halo:(S=d.context.halo.invitationObservable)==null?void 0:S.get().state,Space:(C=d.context.space.invitationObservable)==null?void 0:C.get().state}},[d]),x=c.useMemo(()=>({Halo:d.context.halo.failReason,Space:d.context.space.failReason}),[d]),k=c.useCallback(()=>{var S,C,P,F;a==null||a({identityKey:((S=d.context.halo.invitation)==null?void 0:S.identityKey)??null,swarmKey:((C=d.context.halo.invitation)==null?void 0:C.swarmKey)??null,spaceKey:((P=d.context.halo.invitation)==null?void 0:P.spaceKey)??null,target:((F=d.context.halo.invitation)==null?void 0:F.target)??null})},[d,a]),I=c.useCallback(()=>{var S,C,P,F;a==null||a({identityKey:((S=d.context.space.invitation)==null?void 0:S.identityKey)??null,swarmKey:((C=d.context.space.invitation)==null?void 0:C.swarmKey)??null,spaceKey:((P=d.context.space.invitation)==null?void 0:P.spaceKey)??null,target:((F=d.context.space.invitation)==null?void 0:F.target)??null})},[d,a]);return c.createElement(w9,{titleId:f,mode:t,send:p,activeView:g,failed:v,failReasons:x,pending:["connecting","authenticating"].some(S=>d==null?void 0:d.configuration[0].id.includes(S)),unredeemedCodes:y,invitationStates:E,succeededKeys:w,identity:l,onExit:o,exitActionParent:n,doneActionParent:i,onHaloDone:k,onSpaceDone:I,onHaloInvitationCancel:()=>{var S;return(S=d.context.halo.invitationObservable)==null?void 0:S.cancel()},onSpaceInvitationCancel:()=>{var S;return(S=d.context.space.invitationObservable)==null?void 0:S.cancel()},onHaloInvitationAuthenticate:S=>{var C;return p({type:"authenticateHaloVerificationCode"}),(C=d.context.halo.invitationObservable)==null?void 0:C.authenticate(S)},onSpaceInvitationAuthenticate:S=>{var C;return p({type:"authenticateSpaceVerificationCode"}),(C=d.context.space.invitationObservable)==null?void 0:C.authenticate(S)}})},E9=Xf({id:"space",predictableActionArguments:!0,context:{space:null},initial:"managingSpace",states:{managingSpace:{},managingSpaceInvitation:{}},on:{deselectInvitation:{target:".managingSpace",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingSpaceInvitation",actions:["setInvitation","log"]}}},{actions:{setInvitation:Kt({invitation:(e,t)=>(t==null?void 0:t.invitation)??null}),unsetInvitation:Kt({invitation:()=>{}}),log:(e,t)=>{Ze("[transition]",{event:t,context:e})}}}),x9=e=>Zf(E9,{...e,context:{...e==null?void 0:e.context}}),N1="dxos:react-shell/space-manager/active-action",S9=e=>{const{space:t,target:r}=e,{t:n}=rt("os"),o=Ue.useConfig(),i=va.useSpaceInvitations(t==null?void 0:t.key),a=c.useCallback(l=>{const u=sn.InvitationEncoder.encode(l);l.state===ye.State.CONNECTING&&console.log(JSON.stringify({invitationCode:u,authCode:l.authCode}))},[]),s={inviteOne:{label:n("invite one label"),description:n("invite one description"),icon:ze.UserPlus,onClick:c.useCallback(()=>{var u,f,d,p;const l=(u=t.share)==null?void 0:u.call(t,{type:ye.Type.INTERACTIVE,authMethod:ye.AuthMethod.SHARED_SECRET,target:r});l&&((p=(d=(f=o.values.runtime)==null?void 0:f.app)==null?void 0:d.env)==null?void 0:p.DX_ENVIRONMENT)!=="production"&&l.subscribe(a)},[t])},inviteMany:{label:n("invite many label"),description:n("invite many description"),icon:ze.UsersThree,onClick:c.useCallback(()=>{var u,f,d,p;const l=(u=t.share)==null?void 0:u.call(t,{type:ye.Type.MULTIUSE,authMethod:ye.AuthMethod.NONE,target:r});l&&((p=(d=(f=o.values.runtime)==null?void 0:f.app)==null?void 0:d.env)==null?void 0:p.DX_ENVIRONMENT)!=="production"&&l.subscribe(a)},[t])}};return c.createElement($9,{...e,invitations:i,inviteActions:s})},D1="pis-3 pie-1 plb-1 mbe-1 font-medium",$9=e=>{const{active:t,space:r,createInvitationUrl:n,send:o,inviteActions:i,invitations:a,showInactiveInvitations:s,SpaceMemberList:l=kk,InvitationList:u=$7}=e,{t:f}=rt("os"),d=i??{noopInvite:{label:f("create space invitation label"),description:"",icon:ze.Placeholder,onClick:()=>{}}},[p,h]=c.useState(localStorage.getItem(N1)??"inviteOne"),g=y=>{h(y),localStorage.setItem(N1,y)},v=s?a:a==null?void 0:a.filter(y=>![ye.State.CANCELLED].includes(y.get().state));return c.createElement(c.Fragment,null,c.createElement(ss.Root,{classNames:"grow shrink basis-28 -mli-2"},c.createElement(ss.Viewport,{classNames:"is-full pie-2"},!!(v!=null&&v.length)&&c.createElement(c.Fragment,null,c.createElement("h3",{className:ue(D1,Tt)},f("invitation list heading")),c.createElement(u,{className:"mb-2",send:o,invitations:v??[],onClickRemove:y=>y.cancel(),createInvitationUrl:n}),c.createElement("h3",{className:ue(D1,Tt,"mbs-2")},f("space member list heading"))),c.createElement(l,{spaceKey:r.key,includeSelf:!0})),c.createElement(ss.Scrollbar,{orientation:"vertical"},c.createElement(ss.Thumb,null))),c.createElement(Gt,null,c.createElement(A7,{disabled:!t,actions:d,activeAction:p,onChangeActiveAction:g,"data-testid":"spaces-panel.create-invitation"})))},C9=({titleId:e,space:t,onDone:r})=>{const{t:n}=rt("os"),o=t.properties.name;return c.createElement(xf,{titleId:e,title:n("space panel heading"),corner:c.createElement(my,{"data-testid":"identity-panel-done",onDone:r})},c.createElement("div",{role:"none",className:"flex gap-4 items-center justify-center mlb-4"},c.createElement(ze.Planet,{size:32}),c.createElement("div",{className:"block text-start font-light text-xl"},o??t.key.truncate())))},L1=e=>{const{titleId:t,activeView:r,space:n,target:o,SpaceManager:i=S9,InvitationManager:a=x1,...s}=e;return c.createElement(So,{density:"fine"},c.createElement(C9,{...s,titleId:t,space:n}),c.createElement(lt.Root,{activeView:r},c.createElement(lt.Views,null,c.createElement(lt.View,{id:"space manager",classNames:qt},c.createElement(i,{active:r==="space manager",space:n,target:o,...s})),c.createElement(lt.View,{id:"space invitation manager",classNames:qt},c.createElement(a,{active:r==="space invitation manager",...s,invitationUrl:e.invitationUrl})))))},A9=({invitation:e,...t})=>{const r=sf(e);return c.createElement(L1,{...t,...r,invitationUrl:t.createInvitationUrl(r.invitationCode)})},O9=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=xt("spacePanel__heading",e),[o,i,a]=x9({context:{space:r.space}});c.useEffect(()=>a.subscribe(f=>{Ze("[state]",f)}).unsubscribe,[a]);const s=c.useMemo(()=>{switch(!0){case o.matches("managingSpace"):return"space manager";case o.matches("managingSpaceInvitation"):return"space invitation manager";default:return"never"}},[o]),l={...r,activeView:s,send:i,titleId:n,createInvitationUrl:t};return o.context.invitation?c.createElement(A9,{...l,invitation:o.context.invitation}):c.createElement(L1,{...l})},T9=e=>{const t=xt("spaceDialog__title");return c.createElement(jr.Root,{defaultOpen:!0,onOpenChange:r=>{var n;return r||((n=e.onDone)==null?void 0:n.call(e))}},c.createElement(jr.Portal,null,c.createElement(jr.Overlay,null,c.createElement(jr.Content,{"aria-labelledby":t,onOpenAutoFocus:r=>r.preventDefault()},c.createElement(cu,null,c.createElement(l9,{...e,titleId:t,doneActionParent:c.createElement(jr.Close,{asChild:!0})}))))))},M1=e=>{const t=xt("joinDialog__title"),{height:r}=eO();return c.createElement(xo.Root,{defaultOpen:!0,onOpenChange:n=>{var o;return n||(e.onExit?e.onExit():(o=e.onDone)==null?void 0:o.call(e,null))}},c.createElement(xo.Portal,null,c.createElement(xo.Overlay,{classNames:"backdrop-blur",...r&&{style:{blockSize:`${r}px`}}},c.createElement(xo.Content,{"aria-labelledby":t},c.createElement(_9,{...e,titleId:t,exitActionParent:c.createElement(xo.Cancel,{asChild:!0}),doneActionParent:c.createElement(xo.Action,{asChild:!0})})))))};var td,dl=an;if(process.env.NODE_ENV==="production")td=dl.createRoot,dl.hydrateRoot;else{var F1=dl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;td=function(e,t){F1.usingClientEntryPoint=!0;try{return dl.createRoot(e,t)}finally{F1.usingClientEntryPoint=!1}}}var rd={exports:{}};(function(e,t){(function(r,n){var o="1.0.35",i="",a="?",s="function",l="undefined",u="object",f="string",d="major",p="model",h="name",g="type",v="vendor",y="version",m="architecture",w="console",E="mobile",x="tablet",k="smarttv",I="wearable",S="embedded",C=350,P="Amazon",F="Apple",D="ASUS",N="BlackBerry",J="Browser",K="Chrome",Y="Edge",te="Firefox",oe="Google",le="Huawei",ae="LG",ge="Microsoft",ce="Motorola",q="Opera",H="Samsung",re="Sharp",de="Sony",U="Xiaomi",z="Zebra",M="Facebook",R="Chromium OS",G="Mac OS",O=function(Se,De){var A={};for(var b in Se)De[b]&&De[b].length%2===0?A[b]=De[b].concat(Se[b]):A[b]=Se[b];return A},T=function(Se){for(var De={},A=0;A<Se.length;A++)De[Se[A].toUpperCase()]=Se[A];return De},Z=function(Se,De){return typeof Se===f?ne(De).indexOf(ne(Se))!==-1:!1},ne=function(Se){return Se.toLowerCase()},pe=function(Se){return typeof Se===f?Se.replace(/[^\d\.]/g,i).split(".")[0]:n},me=function(Se,De){if(typeof Se===f)return Se=Se.replace(/^\s\s*/,i),typeof De===l?Se:Se.substring(0,C)},Ee=function(Se,De){for(var A=0,b,_,L,W,X,se;A<De.length&&!X;){var Pe=De[A],ot=De[A+1];for(b=_=0;b<Pe.length&&!X&&Pe[b];)if(X=Pe[b++].exec(Se),X)for(L=0;L<ot.length;L++)se=X[++_],W=ot[L],typeof W===u&&W.length>0?W.length===2?typeof W[1]==s?this[W[0]]=W[1].call(this,se):this[W[0]]=W[1]:W.length===3?typeof W[1]===s&&!(W[1].exec&&W[1].test)?this[W[0]]=se?W[1].call(this,se,W[2]):n:this[W[0]]=se?se.replace(W[1],W[2]):n:W.length===4&&(this[W[0]]=se?W[3].call(this,se.replace(W[1],W[2])):n):this[W]=se||n;A+=2}},_e=function(Se,De){for(var A in De)if(typeof De[A]===u&&De[A].length>0){for(var b=0;b<De[A].length;b++)if(Z(De[A][b],Se))return A===a?n:A}else if(Z(De[A],Se))return A===a?n:A;return Se},ie={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ne={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},pt={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,y],[/opios[\/ ]+([\w\.]+)/i],[y,[h,q+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[h,q]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[h,"UC"+J]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[y,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+J],y],[/\bfocus\/([\w\.]+)/i],[y,[h,te+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[h,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[h,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[h,"MIUI "+J]],[/fxios\/([-\w\.]+)/i],[y,[h,te]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+J]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+J],y],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,M],y],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[h,K+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,K+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[h,"Android "+J]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[y,_e,ie]],[/(webkit|khtml)\/([\w\.]+)/i],[h,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[h,te+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[h,y],[/(cobalt)\/([\w\.]+)/i],[h,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,ne]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,i,ne]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,ne]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[v,H],[g,x]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[p,[v,H],[g,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[v,F],[g,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[v,F],[g,x]],[/(macintosh);/i],[p,[v,F]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[v,re],[g,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[v,le],[g,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[v,le],[g,E]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[p,/_/g," "],[v,U],[g,E]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[v,U],[g,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[v,"OPPO"],[g,E]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[v,"Vivo"],[g,E]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[p,[v,"Realme"],[g,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[v,ce],[g,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[v,ce],[g,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[v,ae],[g,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[v,ae],[g,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[v,"Lenovo"],[g,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[v,"Nokia"],[g,E]],[/(pixel c)\b/i],[p,[v,oe],[g,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[v,oe],[g,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[v,de],[g,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[v,de],[g,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[v,"OnePlus"],[g,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[v,P],[g,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[v,P],[g,E]],[/(playbook);[-\w\),; ]+(rim)/i],[p,v,[g,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[v,N],[g,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[v,D],[g,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[v,D],[g,E]],[/(nexus 9)/i],[p,[v,"HTC"],[g,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[v,[p,/_/g," "],[g,E]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[v,"Acer"],[g,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[v,"Meizu"],[g,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[v,p,[g,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[v,p,[g,x]],[/(surface duo)/i],[p,[v,ge],[g,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[v,"Fairphone"],[g,E]],[/(u304aa)/i],[p,[v,"AT&T"],[g,E]],[/\bsie-(\w*)/i],[p,[v,"Siemens"],[g,E]],[/\b(rct\w+) b/i],[p,[v,"RCA"],[g,x]],[/\b(venue[\d ]{2,7}) b/i],[p,[v,"Dell"],[g,x]],[/\b(q(?:mv|ta)\w+) b/i],[p,[v,"Verizon"],[g,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[v,"Barnes & Noble"],[g,x]],[/\b(tm\d{3}\w+) b/i],[p,[v,"NuVision"],[g,x]],[/\b(k88) b/i],[p,[v,"ZTE"],[g,x]],[/\b(nx\d{3}j) b/i],[p,[v,"ZTE"],[g,E]],[/\b(gen\d{3}) b.+49h/i],[p,[v,"Swiss"],[g,E]],[/\b(zur\d{3}) b/i],[p,[v,"Swiss"],[g,x]],[/\b((zeki)?tb.*\b) b/i],[p,[v,"Zeki"],[g,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[v,"Dragon Touch"],p,[g,x]],[/\b(ns-?\w{0,9}) b/i],[p,[v,"Insignia"],[g,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[v,"NextBook"],[g,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[v,"Voice"],p,[g,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[v,"LvTel"],p,[g,E]],[/\b(ph-1) /i],[p,[v,"Essential"],[g,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[v,"Envizen"],[g,x]],[/\b(trio[-\w\. ]+) b/i],[p,[v,"MachSpeed"],[g,x]],[/\btu_(1491) b/i],[p,[v,"Rotor"],[g,x]],[/(shield[\w ]+) b/i],[p,[v,"Nvidia"],[g,x]],[/(sprint) (\w+)/i],[v,p,[g,E]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[v,ge],[g,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[v,z],[g,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[v,z],[g,E]],[/smart-tv.+(samsung)/i],[v,[g,k]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[v,H],[g,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[v,ae],[g,k]],[/(apple) ?tv/i],[v,[p,F+" TV"],[g,k]],[/crkey/i],[[p,K+"cast"],[v,oe],[g,k]],[/droid.+aft(\w)( bui|\))/i],[p,[v,P],[g,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[v,re],[g,k]],[/(bravia[\w ]+)( bui|\))/i],[p,[v,de],[g,k]],[/(mitv-\w{5}) bui/i],[p,[v,U],[g,k]],[/Hbbtv.*(technisat) (.*);/i],[v,p,[g,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[v,me],[p,me],[g,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[g,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[v,p,[g,w]],[/droid.+; (shield) bui/i],[p,[v,"Nvidia"],[g,w]],[/(playstation [345portablevi]+)/i],[p,[v,de],[g,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[v,ge],[g,w]],[/((pebble))app/i],[v,p,[g,I]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[v,F],[g,I]],[/droid.+; (glass) \d/i],[p,[v,oe],[g,I]],[/droid.+; (wt63?0{2,3})\)/i],[p,[v,z],[g,I]],[/(quest( 2| pro)?)/i],[p,[v,M],[g,I]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[v,[g,S]],[/(aeobc)\b/i],[p,[v,P],[g,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[p,[g,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[g,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[g,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[g,E]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[v,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[h,Y+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[y,_e,Ne]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[y,_e,Ne]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,G],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,y],[/\(bb(10);/i],[y,[h,N]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[h,te+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[h,K+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,R],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,y],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,y]]},Te=function(Se,De){if(typeof Se===u&&(De=Se,Se=n),!(this instanceof Te))return new Te(Se,De).getResult();var A=typeof r!==l&&r.navigator?r.navigator:n,b=Se||(A&&A.userAgent?A.userAgent:i),_=A&&A.userAgentData?A.userAgentData:n,L=De?O(pt,De):pt,W=A&&A.userAgent==b;return this.getBrowser=function(){var X={};return X[h]=n,X[y]=n,Ee.call(X,b,L.browser),X[d]=pe(X[y]),W&&A&&A.brave&&typeof A.brave.isBrave==s&&(X[h]="Brave"),X},this.getCPU=function(){var X={};return X[m]=n,Ee.call(X,b,L.cpu),X},this.getDevice=function(){var X={};return X[v]=n,X[p]=n,X[g]=n,Ee.call(X,b,L.device),W&&!X[g]&&_&&_.mobile&&(X[g]=E),W&&X[p]=="Macintosh"&&A&&typeof A.standalone!==l&&A.maxTouchPoints&&A.maxTouchPoints>2&&(X[p]="iPad",X[g]=x),X},this.getEngine=function(){var X={};return X[h]=n,X[y]=n,Ee.call(X,b,L.engine),X},this.getOS=function(){var X={};return X[h]=n,X[y]=n,Ee.call(X,b,L.os),W&&!X[h]&&_&&_.platform!="Unknown"&&(X[h]=_.platform.replace(/chrome os/i,R).replace(/macos/i,G)),X},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(X){return b=typeof X===f&&X.length>C?me(X,C):X,this},this.setUA(b),this};Te.VERSION=o,Te.BROWSER=T([h,y,d]),Te.CPU=T([m]),Te.DEVICE=T([p,v,g,w,E,k,x,I,S]),Te.ENGINE=Te.OS=T([h,y]),e.exports&&(t=e.exports=Te),t.UAParser=Te;var Me=typeof r!==l&&(r.jQuery||r.Zepto);if(Me&&!Me.ua){var yt=new Te;Me.ua=yt.getResult(),Me.ua.get=function(){return yt.getUA()},Me.ua.set=function(Se){yt.setUA(Se);var De=yt.getResult();for(var A in De)Me.ua[A]=De[A]}}})(typeof window=="object"?window:Je)})(rd,rd.exports);var I9=rd.exports,pl="/home/runner/work/dxos/dxos/packages/core/mesh/rpc-tunnel/src/ports/iframe.ts",nd,od;if(typeof navigator<"u"){const e=new I9.UAParser(navigator.userAgent);nd=e.getBrowser().name,od=e.getOS().name}var P9=(e,t,r)=>{if(!e.contentWindow){Ze("IFrame content window missing",{origin:t},{F:pl,L:24,S:void 0,C:(n,o)=>n(...o)});return}nd==="Chrome"&&od==="iOS"?e.contentWindow.postMessage(r,t):e.contentWindow.postMessage(r,t,[r.payload])},k9=(e,t)=>{nd==="Chrome"&&od==="iOS"?window.parent.postMessage(t,e):window.parent.postMessage(t,e,[t.payload])},j1=({channel:e,iframe:t,origin:r,onOrigin:n})=>({send:async o=>{if(!r){Ze("no origin set",{channel:e},{F:pl,L:62,S:void 0,C:(s,l)=>s(...l)});return}Ze("sending",{channel:e,data:o.length},{F:pl,L:66,S:void 0,C:(s,l)=>s(...l)});const i=o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength),a={channel:e,payload:i};t?P9(t,r,a):k9(r,a)},subscribe:o=>{const i=a=>{if(!t&&a.source!==window.parent)return;if(t&&a.source!==t.contentWindow)return;const l=a.data&&typeof a.data=="object"&&"channel"in a.data&&"payload"in a.data?a.data:void 0;(l==null?void 0:l.channel)===e&&(r||(r=a.origin,n==null||n(r)),Ze("received",l,{F:pl,L:98,S:void 0,C:(u,f)=>u(...f)}),o(new Uint8Array(l.payload)))};return window.addEventListener("message",i),()=>window.removeEventListener("message",i)}});const N9=e=>{const t=xt("spaceDialog__title");return c.createElement(jr.Root,{defaultOpen:!0,onOpenChange:r=>{var n;return r||((n=e.onDone)==null?void 0:n.call(e))}},c.createElement(jr.Portal,null,c.createElement(jr.Overlay,null,c.createElement(jr.Content,{"aria-labelledby":t},c.createElement(cu,null,c.createElement(O9,{...e,titleId:t,doneActionParent:c.createElement(jr.Close,{asChild:!0})}))))))},D9=({runtime:e,origin:t})=>{const[{layout:r,invitationCode:n,spaceKey:o,target:i},a]=c.useState({layout:e.layout,invitationCode:e.invitationCode,spaceKey:e.spaceKey,target:e.target}),s=Ue.useClient(),l=va.useSpace(o);switch(c.useEffect(()=>e.layoutUpdate.on(u=>a(u)),[e]),c.useEffect(()=>{if(r===Ue.ShellLayout.SPACE&&!l){Ze.warn("No space found for shell space invitations.");const u=setTimeout(async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})});return()=>clearTimeout(u)}},[e,r,l]),r){case Ue.ShellLayout.INITIALIZE_IDENTITY:return c.createElement(M1,{mode:"halo-only",initialInvitationCode:n,onDone:()=>{e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}});case Ue.ShellLayout.IDENTITY:case Ue.ShellLayout.SHARE_IDENTITY:case Ue.ShellLayout.EDIT_PROFILE:return c.createElement(T9,{createInvitationUrl:u=>`${t}?deviceInvitationCode=${u}`,onResetDevice:async()=>{await s.reset(),await e.setAppContext({display:Ue.ShellDisplay.NONE,reload:!0})},onJoinNewIdentity:()=>e.setLayout({layout:Ue.ShellLayout.INITIALIZE_IDENTITY}),onDone:async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}});case Ue.ShellLayout.SPACE:return l?c.createElement(N9,{space:l,target:i,createInvitationUrl:u=>`${t}?spaceInvitationCode=${u}`,onDone:async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}}):null;case Ue.ShellLayout.JOIN_SPACE:return c.createElement(M1,{initialInvitationCode:n,onDone:async u=>{const f=(u==null?void 0:u.target)??void 0;await e.setAppContext({display:Ue.ShellDisplay.NONE,spaceKey:(u==null?void 0:u.spaceKey)??void 0,target:f}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})},onExit:async()=>{await e.setAppContext({display:Ue.ShellDisplay.NONE}),e.setLayout({layout:Ue.ShellLayout.DEFAULT})}});default:return null}},L9={"en-US":Object.freeze(Object.defineProperty({__proto__:null,os:{"manage profile label":"Manage identity","identity offline description":"Offline","sidebar label":"DXOS sidebar","copy invitation code label":"Copy URL","copy invitation code success label":"Copied","open share panel label":"View QR code","joining space heading":"Joining space","join space heading":"Enter space invitation","halo heading":"Initialize device identity","exit label":"Exit","identity selector title":"Join as","identity radio group title":"Select an identity you’ve associated with this device already","add identity label":"Add","continue label":"Continue","back label":"Back","next label":"Next","close label":"Close","auth choices label":"Choose an identity","create identity label":"Create an identity","create identity description":"Create a new identity.","recover identity label":"Use a seed phrase","recover identity description":"Enter your seed phrase to log in manually.","join identity label":"Use another device","join identity description":"Add this device to an identity you’re already logged into on another device.","deselect identity label":"Back to identities","addition method chooser title":"An identity is required to continue","new identity input label":"Set display name","recover identity input label":"Type or paste your seed phrase","failed to create identity message":"Failed to create an identity.","failed to recover identity message":"Failed to recover an identity from the provided seed phrase.","failed to authenticate message":"Incorrect PIN.","identity added label":"Created identity & added to this device:","join space as identity heading":"<part>as </part><part><icon/><label>{{labelValue}}</label></part>","error status label":"Failed","timeout status label":"Timed out","cancelled status label":"Cancelled","init status label":"Ready to connect","connecting status label":"Connecting…","connected status label":"Enter confirmation PIN","authenticating status label":"Enter confirmation PIN","success status label":"Success","connect label":"Connect","reconnect label":"Reconnect","cancel label":"Cancel","done label":"Done","reset label":"Start over","auth code input label":"Enter the verification code","invitation input label":"Paste an invitation code or URL","create device invitation label":"Add device","create space invitation label":"Invite","qr label":"Scan to accept invitation","empty invitations message":"No pending invitations","empty device list message":"No devices authenticated other than this device.","show all spaces label":"All spaces","all spaces label":"All spaces","create space label":"Create a new space","join space label":"Join a space","show current space label":"Current space","view space invitations label":"View space invitations","toggle sidebar label":"Open/close sidebar","open sidebar label":"Open sidebar","close sidebar label":"Close sidebar","welcome message":"Welcome","selecting identity heading":"Selecting identity","devices heading":"Devices","identity heading":"Profile settings","choose add device label":"Add device","choose devices label":"Manage devices","choose profile label":"Edit profile","choose sign out label":"Sign out","empty space members message":"There is nobody in this space yet.","back to all invitations label":"Back to all invitations","invitation heading":"Invitation","invitation list heading":"Invitations","device invitation list heading":"Pending device invitations","space invitation list heading":"Pending invitations","device list heading":"Devices","space member list heading":"Members","space panel heading":"Space membership","auth code message":"Enter the following auth code on the joining device.","display name input label":"Display name","display name input placeholder":"Enter a display name","invite one label":"Invite one","invite one description":"Only one user may join.","invite one qr label":"Single-use","invite one list item label":"Active single-use invitation","invite many label":"Invite many","invite many description":"Anyone with the link can join.","invite many qr label":"Multiple-use","invite many list item label":"Active multiple-use invitation","invite options label":"Change the active invite option.","confirm label":"Confirm","reset identity input label":"This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.","failed to reset identity message":"Failed to reset identity.","confirmation value":"CONFIRM","sign out chooser title":"DANGER ZONE","sign out chooser message":"Proceeding with either action below will erase all data on this device.","join new identity label":"Join a new identity","reset device label":"Reset device","reset device confirm message":"Are you sure you want to reset your device? All data will be lost."}},Symbol.toStringTag,{value:"Module"}))},M9=async(e=new Ue.Config)=>{const t=new Ue.ClientServicesProxy(j1({channel:sn.DEFAULT_CLIENT_CHANNEL})),r=new Ue.Client({config:e,services:t}),n=new H1.ShellRuntimeImpl(j1({channel:sn.DEFAULT_SHELL_CHANNEL}));await Promise.all([n.open(),r.initialize()]),td(document.getElementById("root")).render(c.createElement(c.StrictMode,null,c.createElement(wT,{tx:Ok,resourceExtensions:[L9]},c.createElement(Ue.ClientContext.Provider,{value:{client:r,status:Ue.SystemStatus.ACTIVE}},c.createElement(cu,null,c.createElement(_r.Provider,null,c.createElement(D9,{runtime:n,origin:location.origin})))))))};c.createContext({}),Zt.runShell=M9,Object.defineProperty(Zt,Symbol.toStringTag,{value:"Module"})});
210
210
  //# sourceMappingURL=shell.umd.js.map