@dxos/shell 0.4.1 → 0.4.2-main.16babdb

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.
@@ -0,0 +1,216 @@
1
+ (function(er,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):(er=typeof globalThis<"u"?globalThis:er||self,c(er.Shell={},er.React,er.$7SXl2$reactdom,er.react,er.echo,er.reactClient,er.clientProtocol,er.halo,er.clientServices))})(this,function(er,c,sn,Ye,Ca,Ke,ln,vo,aw){"use strict";function Wd(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=Wd(c),zd=Wd(sn);function yo(e){"@babel/helpers - typeof";return yo=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},yo(e)}function sw(e,t){if(yo(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(yo(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hd(e){var t=sw(e,"string");return yo(t)==="symbol"?t:String(t)}function Vd(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}var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function lw(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 i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return e[n]}})}),r}function cw(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Gd(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 uw(e,t,r){return t&&Gd(e.prototype,t),r&&Gd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var fw=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,dw={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},pw=function(t){return dw[t]},hw=function(t){return t.replace(fw,pw)};function Kd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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){Vd(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 Fl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:hw},Yd,gw=c.createContext();function mw(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fl=qd(qd({},Fl),e)}function vw(){return Fl}var yw=function(){function e(){cw(this,e),this.usedNamespaces={}}return uw(e,[{key:"addUsedNamespaces",value:function(r){var n=this;r.forEach(function(i){n.usedNamespaces[i]||(n.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function bw(e){Yd=e}function ww(){return Yd}var Ew={type:"3rdParty",init:function(t){mw(t.options.react),bw(t)}};function _w(){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 Jd={};function Bl(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];typeof t[0]=="string"&&Jd[t[0]]||(typeof t[0]=="string"&&(Jd[t[0]]=new Date),_w.apply(void 0,t))}function Xd(e,t,r){e.loadNamespaces(t,function(){if(e.isInitialized)r();else{var n=function i(){setTimeout(function(){e.off("initialized",i)},0),r()};e.on("initialized",n)}})}function xw(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var a=function(l,u){var d=t.services.backendConnector.state["".concat(l,"|").concat(u)];return d===-1||d===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)&&(!i||a(o,e)))}function Sw(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return Bl("i18n.languages were undefined or empty",t.languages),!0;var n=t.options.ignoreJSONStructure!==void 0;return n?t.hasLoadedNamespace(e,{precheck:function(o,a){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):xw(e,t,r)}function $w(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,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(d){u=!0,i=d}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}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 Aw(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 Ow(){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 Tw(e,t){return $w(e)||Cw(e,t)||Aw(e,t)||Ow()}function Qd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jl(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){Vd(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}var Iw=function(t,r){var n=c.useRef();return c.useEffect(function(){n.current=r?n.current:t},[t,r]),n.current};function Pw(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=c.useContext(gw)||{},i=n.i18n,o=n.defaultNS,a=r||i||ww();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new yw),!a){Bl("You will need to pass in an i18next instance by using initReactI18next");var s=function(D){return Array.isArray(D)?D[D.length-1]:D},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&Bl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=jl(jl(jl({},vw()),a.options.react),t),d=u.useSuspense,p=u.keyPrefix,h=e||o||a.options&&a.options.defaultNS;h=typeof h=="string"?[h]:h||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(h);var m=(a.isInitialized||a.initializedStoreOnce)&&h.every(function(T){return Sw(T,a,u)});function v(){return a.getFixedT(null,u.nsMode==="fallback"?h:h[0],p)}var y=c.useState(v),w=Tw(y,2),E=w[0],_=w[1],S=h.join(),$=Iw(S),k=c.useRef(!0);c.useEffect(function(){var T=u.bindI18n,D=u.bindI18nStore;k.current=!0,!m&&!d&&Xd(a,h,function(){k.current&&_(v)}),m&&$&&$!==S&&k.current&&_(v);function j(){k.current&&_(v)}return T&&a&&a.on(T,j),D&&a&&a.store.on(D,j),function(){k.current=!1,T&&a&&T.split(" ").forEach(function(F){return a.off(F,j)}),D&&a&&D.split(" ").forEach(function(F){return a.store.off(F,j)})}},[a,S]);var P=c.useRef(!0);c.useEffect(function(){k.current&&!P.current&&_(v),P.current=!1},[a,p]);var C=[E,a,m];if(C.t=E,C.i18n=a,C.ready=m,m||!m&&!d)return C;throw new Promise(function(T){Xd(a,h,function(){T()})})}var ep={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(et,function(){return r.importState=function(i){var o=new r;return o.importState(i),o},r;function r(){return function(i){var o=0,a=0,s=0,l=1;i.length==0&&(i=[+new Date]);var u=n();o=u(" "),a=u(" "),s=u(" ");for(var d=0;d<i.length;d++)o-=u(i[d]),o<0&&(o+=1),a-=u(i[d]),a<0&&(a+=1),s-=u(i[d]),s<0&&(s+=1);u=null;var p=function(){var h=2091639*o+l*23283064365386963e-26;return o=a,a=s,s=h-(l=h|0)};return p.next=p,p.uint32=function(){return p()*4294967296},p.fract53=function(){return p()+(p()*2097152|0)*11102230246251565e-32},p.version="Alea 0.9",p.args=i,p.exportState=function(){return[o,a,s,l]},p.importState=function(h){o=+h[0]||0,a=+h[1]||0,s=+h[2]||0,l=+h[3]||0},p}(Array.prototype.slice.call(arguments))}function n(){var i=4022871197,o=function(a){a=a.toString();for(var s=0;s<a.length;s++){i+=a.charCodeAt(s);var l=.02519603282416938*i;i=l>>>0,l-=i,l*=i,i=l>>>0,l-=i,i+=l*4294967296}return(i>>>0)*23283064365386963e-26};return o.version="Mash 0.9",o}})})(ep);var kw=ep.exports;const Nw=cn(kw);var Rl=e=>{const t=c.useRef(null);return c.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t},Dw=Nw,Lw=new Dw("@dxos/react-hooks"),Mw=(e=4)=>Lw().toString(16).slice(2,e+2),St=(e,t,r)=>c.useMemo(()=>t??`${e}-${Mw((r==null?void 0:r.n)??4)}`,[t]),Fw=e=>{const[t,r]=c.useState(void 0),n=c.useRef(t);return n.current=t,c.useEffect(()=>{const i=e.current;if(!i)return;const o=()=>r(!0),a=()=>r(!1);return i.addEventListener("focus",o),i.addEventListener("blur",a),n.current===void 0&&r(document.activeElement===i),()=>{i.removeEventListener("focus",o),i.removeEventListener("blur",a)}},[e,r]),t},tp={sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)"},rp=(e,t={})=>{const{ssr:r=!0,fallback:n}=t,i=(Array.isArray(e)?e:[e]).map(l=>l in tp?tp[l]:l);let o=Array.isArray(n)?n:[n];o=o.filter(l=>l!=null);const[a,s]=c.useState(()=>i.map((l,u)=>{var d;return{media:l,matches:r?!!o[u]:(d=document.defaultView)==null?void 0:d.matchMedia(l).matches}}));return c.useEffect(()=>{s(i.map(d=>{var p;return{media:d,matches:(p=document.defaultView)==null?void 0:p.matchMedia(d).matches}}));const l=i.map(d=>{var p;return(p=document.defaultView)==null?void 0:p.matchMedia(d)}),u=d=>{s(p=>p.slice().map(h=>h.media===d.media?{...h,matches:d.matches}:h))};return l.forEach(d=>{typeof(d==null?void 0:d.addListener)=="function"?d==null||d.addListener(u):d==null||d.addEventListener("change",u)}),()=>{l.forEach(d=>{typeof(d==null?void 0:d.removeListener)=="function"?d==null||d.removeListener(u):d==null||d.removeEventListener("change",u)})}},[document.defaultView]),a.map(l=>!!l.matches)};function Ul(){return Ul=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},Ul.apply(this,arguments)}function ut(){return ut=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},ut.apply(this,arguments)}function Bw(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Wl(...e){return t=>e.forEach(r=>Bw(r,t))}function rr(...e){return c.useCallback(Wl(...e),e)}const Ct=c.forwardRef((e,t)=>{const{children:r,...n}=e,i=c.Children.toArray(r),o=i.find(Rw);if(o){const a=o.props.children,s=i.map(l=>l===o?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(zl,ut({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(zl,ut({},n,{ref:t}),r)});Ct.displayName="Slot";const zl=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...Uw(n,r.props),ref:t?Wl(t,r.ref):r.ref}):c.Children.count(r)>1?c.Children.only(null):null});zl.displayName="SlotClone";const jw=({children:e})=>c.createElement(c.Fragment,null,e);function Rw(e){return c.isValidElement(e)&&e.type===jw}function Uw(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...s)=>{o(...s),i(...s)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}const Je=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,i)=>{const{asChild:o,...a}=n,s=o?Ct:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,Ul({},a,{ref:i}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function np(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}function Hl(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}function bo(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let i;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=r!=null&&r.width?String(r.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=r!=null&&r.width?String(r.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}function wo(e){return(t,r={})=>{const n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?zw(s,p=>p.test(a)):Ww(s,p=>p.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function Ww(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function zw(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function Hw(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const i=n[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=r.valueCallback?r.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const Vw={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Gw=(e,t,r)=>{let n;const i=Vw[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n},Kw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},qw=(e,t,r,n)=>Kw[e],Yw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Jw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xw={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Zw={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Qw={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},eE={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},tE={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:bo({values:Yw,defaultWidth:"wide"}),quarter:bo({values:Jw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:bo({values:Xw,defaultWidth:"wide"}),day:bo({values:Zw,defaultWidth:"wide"}),dayPeriod:bo({values:Qw,defaultWidth:"wide",formattingValues:eE,defaultFormattingWidth:"wide"})},rE=/^(\d+)(th|st|nd|rd)?/i,nE=/\d+/i,iE={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},oE={any:[/^b/i,/^(a|c)/i]},aE={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sE={any:[/1/i,/2/i,/3/i,/4/i]},lE={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},cE={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},uE={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fE={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},dE={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},pE={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},hE={ordinalNumber:Hw({matchPattern:rE,parsePattern:nE,valueCallback:e=>parseInt(e,10)}),era:wo({matchPatterns:iE,defaultMatchWidth:"wide",parsePatterns:oE,defaultParseWidth:"any"}),quarter:wo({matchPatterns:aE,defaultMatchWidth:"wide",parsePatterns:sE,defaultParseWidth:"any",valueCallback:e=>e+1}),month:wo({matchPatterns:lE,defaultMatchWidth:"wide",parsePatterns:cE,defaultParseWidth:"any"}),day:wo({matchPatterns:uE,defaultMatchWidth:"wide",parsePatterns:fE,defaultParseWidth:"any"}),dayPeriod:wo({matchPatterns:dE,defaultMatchWidth:"any",parsePatterns:pE,defaultParseWidth:"any"})},gE={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mE={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},vE={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yE={date:Hl({formats:gE,defaultWidth:"full"}),time:Hl({formats:mE,defaultWidth:"full"}),dateTime:Hl({formats:vE,defaultWidth:"full"})},bE={code:"en-US",formatDistance:Gw,formatLong:yE,formatRelative:qw,localize:tE,match:hE,options:{weekStartsOn:0,firstWeekContainsDate:1}};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 wE(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 ip(e){var t=wE(e,"string");return hr(t)==="symbol"?t:String(t)}function op(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,ip(n.key),n)}}function Ar(e,t,r){return t&&op(e.prototype,t),r&&op(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function un(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vl(e,t){return Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Vl(e,t)}function Aa(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&&Vl(e,t)}function Eo(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 un(e)}function Or(e){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Or(e)}function fn(e,t,r){return t=ip(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EE(e){if(Array.isArray(e))return e}function _E(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ap(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 xE(e,t){if(e){if(typeof e=="string")return ap(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 ap(e,t)}}function SE(){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 $E(e){return EE(e)||_E(e)||xE(e)||SE()}function sp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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){fn(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}var CE={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)}},AE=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||CE,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),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,i,o){return o&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(i).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new e(this.logger,lp(lp({},{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 AE,dn=function(){function e(){Cr(this,e),this.observers={}}return Ar(e,[{key:"on",value:function(r,n){var i=this;return r.split(" ").forEach(function(o){i.observers[o]=i.observers[o]||[],i.observers[o].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(i){return i!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,i=new Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];if(this.observers[r]){var a=[].concat(this.observers[r]);a.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[r].concat(i))})}}}]),e}();function _o(){var e,t,r=new Promise(function(n,i){e=n,t=i});return r.resolve=e,r.reject=t,r}function cp(e){return e==null?"":""+e}function OE(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function Gl(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=n(o.shift());!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:n(o.shift())}}function up(e,t,r){var n=Gl(e,t,Object),i=n.obj,o=n.k;i[o]=r}function TE(e,t,r,n){var i=Gl(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],n&&(o[a]=o[a].concat(r)),n||o[a].push(r)}function Oa(e,t){var r=Gl(e,t),n=r.obj,i=r.k;if(n)return n[i]}function fp(e,t,r){var n=Oa(e,r);return n!==void 0?n:Oa(t,r)}function dp(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]):dp(e[n],t[n],r):e[n]=t[n]);return e}function pi(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var IE={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function PE(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return IE[t]}):e}var Ta=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,kE=[" ",",","?","!",";"];function NE(e,t,r){t=t||"",r=r||"";var n=kE.filter(function(s){return t.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var i=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(r);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function pp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ia(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pp(Object(r),!0).forEach(function(n){fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DE(e){var t=LE();return function(){var n=Or(e),i;if(t){var o=Or(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Eo(this,i)}}function LE(){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 hp(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),i=e,o=0;o<n.length;++o){if(!i||typeof i[n[o]]=="string"&&o+1<n.length)return;if(i[n[o]]===void 0){for(var a=2,s=n.slice(o,o+a).join(r),l=i[s];l===void 0&&n.length>o+a;)a++,s=n.slice(o,o+a).join(r),l=i[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(o+a).join(r);return u?hp(l,u,r):void 0}i=i[n[o]]}return i}}var ME=function(e){Aa(r,e);var t=DE(r);function r(n){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Cr(this,r),i=t.call(this),Ta&&dn.call(un(i)),i.data=n||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return Ar(r,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,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,d=[i,o];a&&typeof a!="string"&&(d=d.concat(a)),a&&typeof a=="string"&&(d=d.concat(l?a.split(l):a)),i.indexOf(".")>-1&&(d=i.split("."));var p=Oa(this.data,d);return p||!u||typeof a!="string"?p:hp(this.data&&this.data[i]&&this.data[i][o],a,l)}},{key:"addResource",value:function(i,o,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var d=[i,o];a&&(d=d.concat(u?a.split(u):a)),i.indexOf(".")>-1&&(d=i.split("."),s=o,o=d[1]),this.addNamespaces(o),up(this.data,d,s),l.silent||this.emit("added",i,o,a,s)}},{key:"addResources",value:function(i,o,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(i,o,l,a[l],{silent:!0});s.silent||this.emit("added",i,o,a)}},{key:"addResourceBundle",value:function(i,o,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},d=[i,o];i.indexOf(".")>-1&&(d=i.split("."),s=a,a=o,o=d[1]),this.addNamespaces(o);var p=Oa(this.data,d)||{};s?dp(p,a,l):p=Ia(Ia({},p),a),up(this.data,d,p),u.silent||this.emit("added",i,o,a)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Ia(Ia({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(dn),gp={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,i,o){var a=this;return t.forEach(function(s){a.processors[s]&&(r=a.processors[s].process(r,n,i,o))}),r}};function mp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Gt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mp(Object(r),!0).forEach(function(n){fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function FE(e){var t=BE();return function(){var n=Or(e),i;if(t){var o=Or(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Eo(this,i)}}function BE(){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 vp={},yp=function(e){Aa(r,e);var t=FE(r);function r(n){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Cr(this,r),i=t.call(this),Ta&&dn.call(un(i)),OE(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,un(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Tr.create("translator"),i}return Ar(r,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],u=a&&i.indexOf(a)>-1,d=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!NE(i,a,s);if(u&&!d){var p=i.match(this.interpolator.nestingRegexp);if(p&&p.length>0)return{key:i,namespaces:l};var h=i.split(a);(a!==s||a===s&&this.options.ns.indexOf(h[0])>-1)&&(l=h.shift()),i=h.join(s)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,a){var s=this;if(hr(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,d=this.extractFromKey(i[i.length-1],o),p=d.key,h=d.namespaces,m=h[h.length-1],v=o.lng||this.language,y=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(y){var w=o.nsSeparator||this.options.nsSeparator;return l?(E.res="".concat(m).concat(w).concat(p),E):"".concat(m).concat(w).concat(p)}return l?(E.res=p,E):p}var E=this.resolve(i,o),_=E&&E.res,S=E&&E.usedKey||p,$=E&&E.exactUsedKey||p,k=Object.prototype.toString.apply(_),P=["[object Number]","[object Function]","[object RegExp]"],C=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,D=typeof _!="string"&&typeof _!="boolean"&&typeof _!="number";if(T&&_&&D&&P.indexOf(k)<0&&!(typeof C=="string"&&k==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(S,_,Gt(Gt({},o),{},{ns:h})):"key '".concat(p," (").concat(this.language,")' returned an object instead of string.");return l?(E.res=j,E):j}if(u){var F=k==="[object Array]",M=F?[]:{},Z=F?$:S;for(var Y in _)if(Object.prototype.hasOwnProperty.call(_,Y)){var X="".concat(Z).concat(u).concat(Y);M[Y]=this.translate(X,Gt(Gt({},o),{joinArrays:!1,ns:h})),M[Y]===X&&(M[Y]=_[Y])}_=M}}else if(T&&typeof C=="string"&&k==="[object Array]")_=_.join(C),_&&(_=this.extendTranslation(_,i,o,a));else{var ne=!1,oe=!1,ce=o.count!==void 0&&typeof o.count!="string",se=r.hasDefaultValue(o),ge=ce?this.pluralResolver.getSuffix(v,o.count,o):"",le=o["defaultValue".concat(ge)]||o.defaultValue;!this.isValidLookup(_)&&se&&(ne=!0,_=le),this.isValidLookup(_)||(oe=!0,_=p);var V=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,J=V&&oe?void 0:_,re=se&&le!==_&&this.options.updateMissing;if(oe||ne||re){if(this.logger.log(re?"updateKey":"missingKey",v,m,p,re?le:_),u){var de=this.resolve(p,Gt(Gt({},o),{},{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 H=[],G=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&G&&G[0])for(var B=0;B<G.length;B++)H.push(G[B]);else this.options.saveMissingTo==="all"?H=this.languageUtils.toResolveHierarchy(o.lng||this.language):H.push(o.lng||this.language);var z=function(I,N,Q){var ie=se&&Q!==_?Q:J;s.options.missingKeyHandler?s.options.missingKeyHandler(I,m,N,ie,re,o):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(I,m,N,ie,re,o),s.emit("missingKey",I,m,N,_)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ce?H.forEach(function(K){s.pluralResolver.getSuffixes(K,o).forEach(function(I){z([K],p+I,o["defaultValue".concat(I)]||le)})}):z(H,p,le))}_=this.extendTranslation(_,i,o,E,a),oe&&_===p&&this.options.appendNamespaceToMissingKey&&(_="".concat(m,":").concat(p)),(oe||ne)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?_=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(m,":").concat(p):p,ne?_:void 0):_=this.options.parseMissingKeyHandler(_))}return l?(E.res=_,E):_}},{key:"extendTranslation",value:function(i,o,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,Gt(Gt({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(Gt(Gt({},a),{interpolation:Gt(Gt({},this.options.interpolation),a.interpolation)}));var d=typeof i=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),p;if(d){var h=i.match(this.interpolator.nestingRegexp);p=h&&h.length}var m=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(m=Gt(Gt({},this.options.interpolation.defaultVariables),m)),i=this.interpolator.interpolate(i,m,a.lng||this.language,a),d){var v=i.match(this.interpolator.nestingRegexp),y=v&&v.length;p<y&&(a.nest=!1)}a.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var _=arguments.length,S=new Array(_),$=0;$<_;$++)S[$]=arguments[$];return l&&l[0]===S[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(S[0]," in key: ").concat(o[0])),null):u.translate.apply(u,S.concat([o]))},a)),a.interpolation&&this.interpolator.reset()}var w=a.postProcess||this.options.postProcess,E=typeof w=="string"?[w]:w;return i!=null&&E&&E.length&&a.applyPostProcessor!==!1&&(i=gp.handle(E,i,o,this.options&&this.options.postProcessPassResolved?Gt({i18nResolved:s},a):a,this)),i}},{key:"resolve",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,d,p;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!o.isValidLookup(s)){var m=o.extractFromKey(h,a),v=m.key;l=v;var y=m.namespaces;o.options.fallbackNS&&(y=y.concat(o.options.fallbackNS));var w=a.count!==void 0&&typeof a.count!="string",E=w&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),_=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",S=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);y.forEach(function($){o.isValidLookup(s)||(p=$,!vp["".concat(S[0],"-").concat($)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(p)&&(vp["".concat(S[0],"-").concat($)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(S.join(", "),`" won't get resolved as namespace "`).concat(p,'" 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!!!")),S.forEach(function(k){if(!o.isValidLookup(s)){d=k;var P=[v];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(P,v,k,$,a);else{var C;w&&(C=o.pluralResolver.getSuffix(k,a.count,a));var T="".concat(o.options.pluralSeparator,"zero");if(w&&(P.push(v+C),E&&P.push(v+T)),_){var D="".concat(v).concat(o.options.contextSeparator).concat(a.context);P.push(D),w&&(P.push(D+C),E&&P.push(D+T))}}for(var j;j=P.pop();)o.isValidLookup(s)||(u=j,s=o.getResource(k,$,j,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:d,usedNS:p}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,a,s):this.resourceStore.getResource(i,o,a,s)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&o===a.substring(0,o.length)&&i[a]!==void 0)return!0;return!1}}]),r}(dn);function Kl(e){return e.charAt(0).toUpperCase()+e.slice(1)}var jE=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"],i=r.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Kl(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Kl(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Kl(i[2].toLowerCase()))),i.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 i;return r.forEach(function(o){if(!i){var a=n.formatLanguageCode(o);(!n.options.supportedLngs||n.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&r.forEach(function(o){if(!i){var a=n.getLanguagePartFromCode(o);if(n.isSupportedCode(a))return i=a;i=n.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{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 i=r[n];return i||(i=r[this.getScriptPartFromCode(n)]),i||(i=r[this.formatLanguageCode(n)]),i||(i=r[this.getLanguagePartFromCode(n)]),i||(i=r.default),i||[]}},{key:"toResolveHierarchy",value:function(r,n){var i=this,o=this.getFallbackCodes(n||this.options.fallbackLng||[],r),a=[],s=function(u){u&&(i.isSupportedCode(u)?a.push(u):i.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)),o.forEach(function(l){a.indexOf(l)<0&&s(i.formatLanguageCode(l))}),a}}]),e}(),RE=[{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}],UE={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}},WE=["v1","v2","v3"],bp={zero:0,one:1,two:2,few:3,many:4,other:5};function zE(){var e={};return RE.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:UE[t.fc]}})}),e}var HE=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=zE()}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]:{},i=this.getRule(r,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,i).map(function(o){return"".concat(n).concat(o)})}},{key:"getSuffixes",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(r,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return bp[a]-bp[s]}).map(function(a){return"".concat(n.options.prepend).concat(a)}):o.numbers.map(function(a){return n.getSuffix(r,a,i)}):[]}},{key:"getSuffix",value:function(r,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(r,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(n)):this.getSuffixRetroCompatible(o,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var i=this,o=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),a=r.numbers[o];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return i.options.prepend&&a.toString()?i.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&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!WE.includes(this.options.compatibilityJSON)}}]),e}();function wp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?wp(Object(r),!0).forEach(function(n){fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var VE=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:PE,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?pi(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?pi(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?pi(n.nestingPrefix):n.nestingPrefixEscaped||pi("$t("),this.nestingSuffix=n.nestingSuffix?pi(n.nestingSuffix):n.nestingSuffixEscaped||pi(")"),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 i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(r,n,i,o){var a=this,s,l,u,d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function p(w){return w.replace(/\$/g,"$$$$")}var h=function(E){if(E.indexOf(a.formatSeparator)<0){var _=fp(n,d,E);return a.alwaysFormat?a.format(_,void 0,i,gr(gr(gr({},o),n),{},{interpolationkey:E})):_}var S=E.split(a.formatSeparator),$=S.shift().trim(),k=S.join(a.formatSeparator).trim();return a.format(fp(n,d,$),k,i,gr(gr(gr({},o),n),{},{interpolationkey:$}))};this.resetRegExp();var m=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,v=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,y=[{regex:this.regexpUnescape,safeValue:function(E){return p(E)}},{regex:this.regexp,safeValue:function(E){return a.escapeValue?p(a.escape(E)):p(E)}}];return y.forEach(function(w){for(u=0;s=w.regex.exec(r);){var E=s[1].trim();if(l=h(E),l===void 0)if(typeof m=="function"){var _=m(r,s,o);l=typeof _=="string"?_:""}else if(o&&o.hasOwnProperty(E))l="";else if(v){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(E," for interpolating ").concat(r)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=cp(l));var S=w.safeValue(l);if(r=r.replace(s[0],S),v?(w.regex.lastIndex+=l.length,w.regex.lastIndex-=s[0].length):w.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l=gr({},o);l.applyPostProcessor=!1,delete l.defaultValue;function u(m,v){var y=this.nestingOptionsSeparator;if(m.indexOf(y)<0)return m;var w=m.split(new RegExp("".concat(y,"[ ]*{"))),E="{".concat(w[1]);m=w[0],E=this.interpolate(E,l);var _=E.match(/'/g),S=E.match(/"/g);(_&&_.length%2===0&&!S||S.length%2!==0)&&(E=E.replace(/'/g,'"'));try{l=JSON.parse(E),v&&(l=gr(gr({},v),l))}catch($){return this.logger.warn("failed parsing options string in nesting for key ".concat(m),$),"".concat(m).concat(y).concat(E)}return delete l.defaultValue,m}for(;a=this.nestingRegexp.exec(r);){var d=[],p=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var h=a[1].split(this.formatSeparator).map(function(m){return m.trim()});a[1]=h.shift(),d=h,p=!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=cp(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(r)),s=""),p&&(s=d.reduce(function(m,v){return i.format(m,v,o.lng,gr(gr({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),r=r.replace(a[0],s),this.regexp.lastIndex=0}return r}}]),e}();function Ep(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function pn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ep(Object(r),!0).forEach(function(n){fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ep(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function GE(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var i=n[1].substring(0,n[1].length-1);if(t==="currency"&&i.indexOf(":")<0)r.currency||(r.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)r.range||(r.range=i.trim());else{var o=i.split(";");o.forEach(function(a){if(a){var s=a.split(":"),l=$E(s),u=l[0],d=l.slice(1),p=d.join(":").trim().replace(/^'+|'+$/g,"");r[u.trim()]||(r[u.trim()]=p),p==="false"&&(r[u.trim()]=!1),p==="true"&&(r[u.trim()]=!0),isNaN(p)||(r[u.trim()]=parseInt(p,10))}})}}return{formatName:t,formatOptions:r}}function hi(e){var t={};return function(n,i,o){var a=i+JSON.stringify(o),s=t[a];return s||(s=e(i,o),t[a]=s),s(n)}}var KE=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:hi(function(r,n){var i=new Intl.NumberFormat(r,n);return function(o){return i.format(o)}}),currency:hi(function(r,n){var i=new Intl.NumberFormat(r,pn(pn({},n),{},{style:"currency"}));return function(o){return i.format(o)}}),datetime:hi(function(r,n){var i=new Intl.DateTimeFormat(r,pn({},n));return function(o){return i.format(o)}}),relativetime:hi(function(r,n){var i=new Intl.RelativeTimeFormat(r,pn({},n));return function(o){return i.format(o,n.range||"day")}}),list:hi(function(r,n){var i=new Intl.ListFormat(r,pn({},n));return function(o){return i.format(o)}})},this.init(t)}return Ar(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=n.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=hi(n)}},{key:"format",value:function(r,n,i,o){var a=this,s=n.split(this.formatSeparator),l=s.reduce(function(u,d){var p=GE(d),h=p.formatName,m=p.formatOptions;if(a.formats[h]){var v=u;try{var y=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},w=y.locale||y.lng||o.locale||o.lng||i;v=a.formats[h](u,w,pn(pn(pn({},m),o),y))}catch(E){a.logger.warn(E)}return v}else a.logger.warn("there was no format function for ".concat(h));return u},r);return l}}]),e}();function _p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xp(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_p(Object(r),!0).forEach(function(n){fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_p(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qE(e){var t=YE();return function(){var n=Or(e),i;if(t){var o=Or(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Eo(this,i)}}function YE(){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 JE(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var XE=function(e){Aa(r,e);var t=qE(r);function r(n,i,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Cr(this,r),a=t.call(this),Ta&&dn.call(un(a)),a.backend=n,a.store=i,a.services=o,a.languageUtils=o.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(o,s.backend,s),a}return Ar(r,[{key:"queueLoad",value:function(i,o,a,s){var l=this,u={},d={},p={},h={};return i.forEach(function(m){var v=!0;o.forEach(function(y){var w="".concat(m,"|").concat(y);!a.reload&&l.store.hasResourceBundle(m,y)?l.state[w]=2:l.state[w]<0||(l.state[w]===1?d[w]===void 0&&(d[w]=!0):(l.state[w]=1,v=!1,d[w]===void 0&&(d[w]=!0),u[w]===void 0&&(u[w]=!0),h[y]===void 0&&(h[y]=!0)))}),v||(p[m]=!0)}),(Object.keys(u).length||Object.keys(d).length)&&this.queue.push({pending:d,pendingCount:Object.keys(d).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(d),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,o,a){var s=i.split("|"),l=s[0],u=s[1];o&&this.emit("failedLoading",l,u,o),a&&this.store.addResourceBundle(l,u,a),this.state[i]=o?-1:2;var d={};this.queue.forEach(function(p){TE(p.loaded,[l],u),JE(p,i),o&&p.errors.push(o),p.pendingCount===0&&!p.done&&(Object.keys(p.loaded).forEach(function(h){d[h]||(d[h]={});var m=p.loaded[h];m.length&&m.forEach(function(v){d[h][v]===void 0&&(d[h][v]=!0)})}),p.done=!0,p.errors.length?p.callback(p.errors):p.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(function(p){return!p.done})}},{key:"read",value:function(i,o,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,d=arguments.length>5?arguments[5]:void 0;if(!i.length)return d(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:a,tried:l,wait:u,callback:d});return}return this.readingCalls++,this.backend[a](i,o,function(p,h){if(s.readingCalls--,s.waitingReads.length>0){var m=s.waitingReads.shift();s.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(p&&h&&l<s.maxRetries){setTimeout(function(){s.read.call(s,i,o,a,l+1,u*2,d)},u);return}d(p,h)})}},{key:"prepareLoading",value:function(i,o){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 i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(d){a.loadOne(d)})}},{key:"load",value:function(i,o,a){this.prepareLoading(i,o,{},a)}},{key:"reload",value:function(i,o,a){this.prepareLoading(i,o,{reload:!0},a)}},{key:"loadOne",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(d,p){d&&o.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),d),!d&&p&&o.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),p),o.loaded(i,d,p)})}},{key:"saveMissing",value:function(i,o,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(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" 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(i,o,a,s,null,xp(xp({},u),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],o,a,s))}}]),r}(dn);function ZE(){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(i){r[i]=n[i]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Sp(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 $p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).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?$p(Object(r),!0).forEach(function(n){fn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$p(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function QE(e){var t=e_();return function(){var n=Or(e),i;if(t){var o=Or(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return Eo(this,i)}}function e_(){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 Pa(){}function t_(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var ka=function(e){Aa(r,e);var t=QE(r);function r(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(Cr(this,r),n=t.call(this),Ta&&dn.call(un(n)),n.options=Sp(i),n.services={},n.logger=Tr,n.modules={external:[]},t_(un(n)),o&&!n.isInitialized&&!i.isClone){if(!n.options.initImmediate)return n.init(i,o),Eo(n,un(n));setTimeout(function(){n.init(i,o)},0)}return n}return Ar(r,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=ZE();this.options=Ir(Ir(Ir({},s),this.options),Sp(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Ir(Ir({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(E){return E?typeof E=="function"?new E:E: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=KE);var d=new jE(this.options);this.store=new ME(this.options.resources,this.options);var p=this.services;p.logger=Tr,p.resourceStore=this.store,p.languageUtils=d,p.pluralResolver=new HE(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(p.formatter=l(u),p.formatter.init(p,this.options),this.options.interpolation.format=p.formatter.format.bind(p.formatter)),p.interpolator=new VE(this.options),p.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},p.backendConnector=new XE(l(this.modules.backend),p.resourceStore,p,this.options),p.backendConnector.on("*",function(E){for(var _=arguments.length,S=new Array(_>1?_-1:0),$=1;$<_;$++)S[$-1]=arguments[$];i.emit.apply(i,[E].concat(S))}),this.modules.languageDetector&&(p.languageDetector=l(this.modules.languageDetector),p.languageDetector.init(p,this.options.detection,this.options)),this.modules.i18nFormat&&(p.i18nFormat=l(this.modules.i18nFormat),p.i18nFormat.init&&p.i18nFormat.init(this)),this.translator=new yp(this.services,this.options),this.translator.on("*",function(E){for(var _=arguments.length,S=new Array(_>1?_-1:0),$=1;$<_;$++)S[$-1]=arguments[$];i.emit.apply(i,[E].concat(S))}),this.modules.external.forEach(function(E){E.init&&E.init(i)})}if(this.format=this.options.interpolation.format,a||(a=Pa),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var m=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];m.forEach(function(E){i[E]=function(){var _;return(_=i.store)[E].apply(_,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(E){i[E]=function(){var _;return(_=i.store)[E].apply(_,arguments),i}});var y=_o(),w=function(){var _=function($,k){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),y.resolve(k),a($,k)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return _(null,i.t.bind(i));i.changeLanguage(i.options.lng,_)};return this.options.resources||!this.options.initImmediate?w():setTimeout(w,0),y}},{key:"loadResources",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pa,s=a,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],d=function(m){if(m){var v=o.services.languageUtils.toResolveHierarchy(m);v.forEach(function(y){u.indexOf(y)<0&&u.push(y)})}};if(l)d(l);else{var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.forEach(function(h){return d(h)})}this.options.preload&&this.options.preload.forEach(function(h){return d(h)}),this.services.backendConnector.load(u,this.options.ns,function(h){!h&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(h)})}else s(null)}},{key:"reloadResources",value:function(i,o,a){var s=_o();return i||(i=this.languages),o||(o=this.options.ns),a||(a=Pa),this.services.backendConnector.reload(i,o,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&gp.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o<this.languages.length;o++){var a=this.languages[o];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,o){var a=this;this.isLanguageChangingTo=i;var s=_o();this.emit("languageChanging",i);var l=function(h){a.language=h,a.languages=a.services.languageUtils.toResolveHierarchy(h),a.resolvedLanguage=void 0,a.setResolvedLanguage(h)},u=function(h,m){m?(l(m),a.translator.changeLanguage(m),a.isLanguageChangingTo=void 0,a.emit("languageChanged",m),a.logger.log("languageChanged",m)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(h,function(){return a.t.apply(a,arguments)})},d=function(h){!i&&!h&&a.services.languageDetector&&(h=[]);var m=typeof h=="string"?h:a.services.languageUtils.getBestMatchFromCodes(h);m&&(a.language||l(m),a.translator.language||a.translator.changeLanguage(m),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(m)),a.loadResources(m,function(v){u(v,m)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?d(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(d):d(i),s}},{key:"getFixedT",value:function(i,o,a){var s=this,l=function u(d,p){var h;if(hr(p)!=="object"){for(var m=arguments.length,v=new Array(m>2?m-2:0),y=2;y<m;y++)v[y-2]=arguments[y];h=s.options.overloadTranslationOptionHandler([d,p].concat(v))}else h=Ir({},p);h.lng=h.lng||u.lng,h.lngs=h.lngs||u.lngs,h.ns=h.ns||u.ns,h.keyPrefix=h.keyPrefix||a||u.keyPrefix;var w=s.options.keySeparator||".",E=h.keyPrefix?"".concat(h.keyPrefix).concat(w).concat(d):d;return s.t(E,h)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=o,l.keyPrefix=a,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var o=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 d=function(m,v){var y=o.services.backendConnector.state["".concat(m,"|").concat(v)];return y===-1||y===2};if(a.precheck){var p=a.precheck(this,d);if(p!==void 0)return p}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||d(s,i)&&(!l||d(u,i)))}},{key:"loadNamespaces",value:function(i,o){var a=this,s=_o();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),o&&o(l)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var a=_o();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],l=i.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),o&&o(u)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["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 o.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pa,s=Ir(Ir(Ir({},this.options),o),{isClone:!0}),l=new r(s);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var u=["store","services","language"];return u.forEach(function(d){l[d]=i[d]}),l.services=Ir({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new yp(l.services,l.options),l.translator.on("*",function(d){for(var p=arguments.length,h=new Array(p>1?p-1:0),m=1;m<p;m++)h[m-1]=arguments[m];l.emit.apply(l,[d].concat(h))}),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}(dn);fn(ka,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ka(e,t)});var Rt=ka.createInstance();Rt.createInstance=ka.createInstance,Rt.createInstance,Rt.init,Rt.loadResources,Rt.reloadResources,Rt.use,Rt.changeLanguage,Rt.getFixedT,Rt.t,Rt.exists,Rt.setDefaultNamespace,Rt.hasLoadedNamespace,Rt.loadNamespaces,Rt.loadLanguages;function De(){return De=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},De.apply(this,arguments)}function r_(e,t){const r=c.createContext(t);function n(o){const{children:a,...s}=o,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function i(o){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,i]}function hn(e,t=[]){let r=[];function n(o,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(p){const{scope:h,children:m,...v}=p,y=(h==null?void 0:h[e][l])||s,w=c.useMemo(()=>v,Object.values(v));return c.createElement(y.Provider,{value:w},m)}function d(p,h){const m=(h==null?void 0:h[e][l])||s,v=c.useContext(m);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=r.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,n_(i,...t)]}function n_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Kt(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 Xe(){return Xe=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},Xe.apply(this,arguments)}function i_(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Cp(...e){return t=>e.forEach(r=>i_(r,t))}function Tt(...e){return c.useCallback(Cp(...e),e)}const ql=c.forwardRef((e,t)=>{const{children:r,...n}=e,i=c.Children.toArray(r),o=i.find(o_);if(o){const a=o.props.children,s=i.map(l=>l===o?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Yl,Xe({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Yl,Xe({},n,{ref:t}),r)});ql.displayName="Slot";const Yl=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...a_(n,r.props),ref:Cp(t,r.ref)}):c.Children.count(r)>1?c.Children.only(null):null});Yl.displayName="SlotClone";const Jl=({children:e})=>c.createElement(c.Fragment,null,e);function o_(e){return c.isValidElement(e)&&e.type===Jl}function a_(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...s)=>{o(...s),i(...s)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}const ht=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,i)=>{const{asChild:o,...a}=n,s=o?ql:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,Xe({},a,{ref:i}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function s_(e,t){e&&sn.flushSync(()=>e.dispatchEvent(t))}const Ap="Avatar",[l_,SB]=hn(Ap),[c_,u_]=l_(Ap),f_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[i,o]=c.useState("idle");return c.createElement(c_,{scope:r,imageLoadingStatus:i,onImageLoadingStatusChange:o},c.createElement(ht.span,De({},n,{ref:t})))}),d_="AvatarFallback",p_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...i}=e,o=u_(d_,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&&o.imageLoadingStatus!=="loaded"?c.createElement(ht.span,De({},i,{ref:t})):null}),h_=f_,Op=p_;function gi(e,t){const r=c.createContext(t);function n(o){const{children:a,...s}=o,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function i(o){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,i]}function kr(e,t=[]){let r=[];function n(o,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(p){const{scope:h,children:m,...v}=p,y=(h==null?void 0:h[e][l])||s,w=c.useMemo(()=>v,Object.values(v));return c.createElement(y.Provider,{value:w},m)}function d(p,h){const m=(h==null?void 0:h[e][l])||s,v=c.useContext(m);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${p}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=r.map(a=>c.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[n,g_(i,...t)]}function g_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const p=l(o)[`__scope${u}`];return{...s,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function xo(e,t,r){return parseInt(e.substr(t,r),16)}function Tp(e){return e|=0,e<0?"00":e<16?"0"+e.toString(16):e<256?e.toString(16):"ff"}function Xl(e,t,r){return r=r<0?r+6:r>6?r-6:r,Tp(255*(r<1?e+(t-e)*r:r<3?t:r<4?e+(t-e)*(4-r):e))}function m_(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t;const r=e.length;if(r<6){const n=e[1],i=e[2],o=e[3],a=e[4]||"";t="#"+n+n+i+i+o+o+a+a}return(r==7||r>8)&&(t=e),t}}function v_(e,t,r){let n;if(t==0){const i=Tp(r*255);n=i+i+i}else{const i=r<=.5?r*(t+1):r+t-r*t,o=r*2-i;n=Xl(o,i,e*6+2)+Xl(o,i,e*6)+Xl(o,i,e*6-2)}return"#"+n}function So(e,t,r){const n=[.55,.5,.5,.46,.6,.55,.55],i=n[e*6+.5|0];return r=r<.5?r*i*2:i+(r-.5)*(1-i)*2,v_(e,t,r)}const y_=typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{},Ip={V:"jdenticon_config",n:"config"};var b_={};function w_(e,t){const r=typeof e=="object"&&e||b_[Ip.n]||y_[Ip.V]||{},n=r.lightness||{},i=r.saturation||{},o="color"in i?i.color:i,a=i.grayscale,s=r.backColor,l=r.padding;function u(p,h){let m=n[p];return m&&m.length>1||(m=h),function(v){return v=m[0]+v*(m[1]-m[0]),v<0?0:v>1?1:v}}function d(p){const h=r.hues;let m;return h&&h.length>0&&(m=h[0|.999*p*h.length]),typeof m=="number"?(m/360%1+1)%1:p}return{W:d,o:typeof o=="number"?o:.5,D:typeof a=="number"?a:0,p:u("color",[.4,.8]),F:u("grayscale",[.3,.9]),G:m_(s),X:typeof e=="number"?e:typeof l=="number"?l:t}}class Na{constructor(t,r){this.x=t,this.y=r}}let Pp=class{constructor(t,r,n,i){this.q=t,this.t=r,this.H=n,this.Y=i}I(t,r,n,i){const o=this.q+this.H,a=this.t+this.H,s=this.Y;return s===1?new Na(o-r-(i||0),this.t+t):s===2?new Na(o-t-(n||0),a-r-(i||0)):s===3?new Na(this.q+r,a-t-(n||0)):new Na(this.q+t,this.t+r)}};const E_=new Pp(0,0,0,0);class __{constructor(t){this.J=t,this.u=E_}g(t,r){const n=r?-2:2,i=[];for(let o=r?t.length-2:0;o<t.length&&o>=0;o+=n)i.push(this.u.I(t[o],t[o+1]));this.J.g(i)}h(t,r,n,i){const o=this.u.I(t,r,n,n);this.J.h(o,n,i)}i(t,r,n,i,o){this.g([t,r,t+n,r,t+n,r+i,t,r+i],o)}j(t,r,n,i,o,a){const s=[t+n,r,t+n,r+i,t,r+i,t,r];s.splice((o||0)%4*2,2),this.g(s,a)}K(t,r,n,i,o){this.g([t+n/2,r,t+n,r+i/2,t+n/2,r+i,t,r+i/2],o)}}function x_(e,t,r,n){e=e%14;let i,o,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?(o=0|r*.15,a=0|r*.5,t.h(r-a-o,r-a-o,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?(o=r*.25,t.i(0,0,r,r),t.K(o,o,r-o,r-o,!0)):!n&&(o=r*.4,a=r*1.2,t.h(o,o,a)):(i=r*.42,t.g([0,0,r,0,r,r-i*2,r-i,r,0,r]))}function kp(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 S_(e,t){return e=t.W(e),[So(e,t.D,t.F(0)),So(e,t.o,t.p(.5)),So(e,t.D,t.F(1)),So(e,t.o,t.p(1)),So(e,t.o,t.p(0))]}function $_(e,t,r){const n=w_(r,.08);n.G&&e.m(n.G);let i=e.k;const o=.5+i*n.X|0;i-=o*2;const a=new __(e),s=0|i/4,l=0|o+i/2-s*2,u=0|o+i/2-s*2;function d(w,E,_,S,$){const k=xo(t,_,1);let P=S?xo(t,S,1):0;e.L(h[m[w]]);for(let C=0;C<$.length;C++)a.u=new Pp(l+$[C][0]*s,u+$[C][1]*s,s,P++%4),E(k,a,s,C);e.M()}const p=xo(t,-7)/268435455,h=S_(p,n),m=[];let v;function y(w){if(w.indexOf(v)>=0){for(let E=0;E<w.length;E++)if(m.indexOf(w[E])>=0)return!0}}for(let w=0;w<3;w++)v=xo(t,8+w,1)%h.length,(y([0,4])||y([2,3]))&&(v=1),m.push(v);d(0,kp,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),d(1,kp,4,5,[[0,0],[3,0],[3,3],[0,3]]),d(2,x_,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function C_(e){var n=0,i=0,o=encodeURI(e)+"%80",a=[],s,l=[],u=1732584193,d=4023233417,p=~u,h=~d,m=3285377520,v=[u,d,p,h,m],y=0,w="";function E(_,S){return _<<S|_>>>32-S}for(;n<o.length;i++)a[i>>2]=a[i>>2]|(o[n]=="%"?parseInt(o.substring(n+1,n+=3),16):o.charCodeAt(n++))<<(3-(i&3))*8;for(s=((i+7>>6)+1)*16,a[s-1]=i*8-8;y<s;y+=16){for(n=0;n<80;n++)i=E(u,5)+m+(n<20?(d&p^~d&h)+1518500249:n<40?(d^p^h)+1859775393:n<60?(d&p^d&h^p&h)+2400959708:(d^p^h)+3395469782)+(l[n]=n<16?a[y+n]|0:E(l[n-3]^l[n-8]^l[n-14]^l[n-16],1)),m=h,h=p,p=E(d,30),d=u,u=i;v[0]=u=v[0]+u|0,v[1]=d=v[1]+d|0,v[2]=p=v[2]+p|0,v[3]=h=v[3]+h|0,v[4]=m=v[4]+m|0}for(n=0;n<40;n++)w+=(v[n>>3]>>>(7-(n&7))*4&15).toString(16);return w}function A_(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function O_(e){return C_(e==null?"":""+e)}function mi(e){return(e*10+.5|0)/10}class T_{constructor(){this.v=""}g(t){let r="";for(let n=0;n<t.length;n++)r+=(n?"L":"M")+mi(t[n].x)+" "+mi(t[n].y);this.v+=r+"Z"}h(t,r,n){const i=n?0:1,o=mi(r/2),a=mi(r),s="a"+o+","+o+" 0 1,"+i+" ";this.v+="M"+mi(t.x)+" "+mi(t.y+r/2)+s+a+",0"+s+-a+",0"}}class I_{constructor(t){this.A,this.B={},this.N=t,this.k=t.k}m(t){const r=/^(#......)(..)?/.exec(t),n=r[2]?xo(r[2],0)/255:1;this.N.m(r[1],n)}L(t){this.A=this.B[t]||(this.B[t]=new T_)}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 P_={P:"http://www.w3.org/2000/svg",R:"width",S:"height"};class k_{constructor(t){this.k=t,this.C='<svg xmlns="'+P_.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 N_(e,t,r){const n=new k_(t);return $_(new I_(n),A_(e)||O_(e),r),n.toString()}typeof document<"u"&&document.querySelectorAll.bind(document);function mt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Da({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=D_({defaultProp:t,onChange:r}),o=e!==void 0,a=o?e:n,s=Kt(r),l=c.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function D_({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,i=c.useRef(n),o=Kt(t);return c.useEffect(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}const L_=ve.useId||(()=>{});let M_=0;function $o(e){const[t,r]=ve.useState(L_());return Pr(()=>{e||r(n=>n??String(M_++))},[e]),e||(t?`radix-${t}`:"")}const F_=c.createContext(void 0);function B_(e){const t=c.useContext(F_);return e||t||"ltr"}function j_(e,t=globalThis==null?void 0:globalThis.document){const r=Kt(e);c.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Zl="dismissableLayer.update",R_="dismissableLayer.pointerDownOutside",U_="dismissableLayer.focusOutside";let Np;const W_=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Dp=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,d=c.useContext(W_),[p,h]=c.useState(null),m=(r=p==null?void 0:p.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=c.useState({}),y=Tt(t,T=>h(T)),w=Array.from(d.layers),[E]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=w.indexOf(E),S=p?w.indexOf(p):-1,$=d.layersWithOutsidePointerEventsDisabled.size>0,k=S>=_,P=z_(T=>{const D=T.target,j=[...d.branches].some(F=>F.contains(D));!k||j||(o==null||o(T),s==null||s(T),T.defaultPrevented||l==null||l())},m),C=H_(T=>{const D=T.target;[...d.branches].some(F=>F.contains(D))||(a==null||a(T),s==null||s(T),T.defaultPrevented||l==null||l())},m);return j_(T=>{S===d.layers.size-1&&(i==null||i(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},m),c.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Np=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),Lp(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Np)}},[p,m,n,d]),c.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),Lp())},[p,d]),c.useEffect(()=>{const T=()=>v({});return document.addEventListener(Zl,T),()=>document.removeEventListener(Zl,T)},[]),c.createElement(ht.div,Xe({},u,{ref:y,style:{pointerEvents:$?k?"auto":"none":void 0,...e.style},onFocusCapture:mt(e.onFocusCapture,C.onFocusCapture),onBlurCapture:mt(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:mt(e.onPointerDownCapture,P.onPointerDownCapture)}))});function z_(e,t=globalThis==null?void 0:globalThis.document){const r=Kt(e),n=c.useRef(!1),i=c.useRef(()=>{});return c.useEffect(()=>{const o=s=>{if(s.target&&!n.current){let u=function(){Mp(R_,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function H_(e,t=globalThis==null?void 0:globalThis.document){const r=Kt(e),n=c.useRef(!1);return c.useEffect(()=>{const i=o=>{o.target&&!n.current&&Mp(U_,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Lp(){const e=new CustomEvent(Zl);document.dispatchEvent(e)}function Mp(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?s_(i,o):i.dispatchEvent(o)}const Ql="focusScope.autoFocusOnMount",ec="focusScope.autoFocusOnUnmount",Fp={bubbles:!1,cancelable:!0},V_=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=c.useState(null),u=Kt(i),d=Kt(o),p=c.useRef(null),h=Tt(t,y=>l(y)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let y=function(E){if(m.paused||!s)return;const _=E.target;s.contains(_)?p.current=_:Mn(p.current,{select:!0})},w=function(E){m.paused||!s||s.contains(E.relatedTarget)||Mn(p.current,{select:!0})};return document.addEventListener("focusin",y),document.addEventListener("focusout",w),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w)}}},[n,s,m.paused]),c.useEffect(()=>{if(s){Rp.add(m);const y=document.activeElement;if(!s.contains(y)){const E=new CustomEvent(Ql,Fp);s.addEventListener(Ql,u),s.dispatchEvent(E),E.defaultPrevented||(G_(X_(Bp(s)),{select:!0}),document.activeElement===y&&Mn(s))}return()=>{s.removeEventListener(Ql,u),setTimeout(()=>{const E=new CustomEvent(ec,Fp);s.addEventListener(ec,d),s.dispatchEvent(E),E.defaultPrevented||Mn(y??document.body,{select:!0}),s.removeEventListener(ec,d),Rp.remove(m)},0)}}},[s,u,d,m]);const v=c.useCallback(y=>{if(!r&&!n||m.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,E=document.activeElement;if(w&&E){const _=y.currentTarget,[S,$]=K_(_);S&&$?!y.shiftKey&&E===$?(y.preventDefault(),r&&Mn(S,{select:!0})):y.shiftKey&&E===S&&(y.preventDefault(),r&&Mn($,{select:!0})):E===_&&y.preventDefault()}},[r,n,m.paused]);return c.createElement(ht.div,Xe({tabIndex:-1},a,{ref:h,onKeyDown:v}))});function G_(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Mn(n,{select:t}),document.activeElement!==r)return}function K_(e){const t=Bp(e),r=jp(t,e),n=jp(t.reverse(),e);return[r,n]}function Bp(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function jp(e,t){for(const r of e)if(!q_(r,{upTo:t}))return r}function q_(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 Y_(e){return e instanceof HTMLInputElement&&"select"in e}function Mn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Y_(e)&&t&&e.select()}}const Rp=J_();function J_(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Up(e,t),e.unshift(t)},remove(t){var r;e=Up(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Up(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function X_(e){return e.filter(t=>t.tagName!=="A")}const Wp=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=e;return n?sn.createPortal(c.createElement(ht.div,Xe({},i,{ref:t})),n):null});function Z_(e,t){return c.useReducer((r,n)=>{const i=t[r][n];return i??r},e)}const ar=e=>{const{present:t,children:r}=e,n=Q_(t),i=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),o=Tt(n.ref,i.ref);return typeof r=="function"||n.isPresent?c.cloneElement(i,{ref:o}):null};ar.displayName="Presence";function Q_(e){const[t,r]=c.useState(),n=c.useRef({}),i=c.useRef(e),o=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Z_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=La(n.current);o.current=s==="mounted"?u:"none"},[s]),Pr(()=>{const u=n.current,d=i.current;if(d!==e){const h=o.current,m=La(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Pr(()=>{if(t){const u=p=>{const m=La(n.current).includes(p.animationName);p.target===t&&m&&sn.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===t&&(o.current=La(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),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 La(e){return(e==null?void 0:e.animationName)||"none"}let tc=0;function ex(){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:zp()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:zp()),tc++,()=>{tc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),tc--}},[])}function zp(){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,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Nr.apply(this,arguments)};function Hp(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function tx(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ma="right-scroll-bar-position",Fa="width-before-scroll-bar",rx="with-scroll-bars-hidden",nx="--removed-body-scroll-bar-size";function ix(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ox(e,t){var r=c.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}function ax(e,t){return ox(t||null,function(r){return e.forEach(function(n){return ix(n,r)})})}function sx(e){return e}function lx(e,t){t===void 0&&(t=sx);var r=[],n=!1,i={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(o){var a=t(o,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(n=!0;r.length;){var a=r;r=[],a.forEach(o)}r={push:function(s){return o(s)},filter:function(){return r}}},assignMedium:function(o){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(o),a=r}var l=function(){var d=a;a=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),r}}}};return i}function cx(e){e===void 0&&(e={});var t=lx(null);return t.options=Nr({async:!0,ssr:!1},e),t}var Vp=function(e){var t=e.sideCar,r=Hp(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))};Vp.isSideCarExport=!0;function ux(e,t){return e.useMedium(t),Vp}var Gp=cx(),rc=function(){},Ba=ve.forwardRef(function(e,t){var r=ve.useRef(null),n=ve.useState({onScrollCapture:rc,onWheelCapture:rc,onTouchMoveCapture:rc}),i=n[0],o=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,p=e.shards,h=e.sideCar,m=e.noIsolation,v=e.inert,y=e.allowPinchZoom,w=e.as,E=w===void 0?"div":w,_=Hp(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,$=ax([r,t]),k=Nr(Nr({},_),i);return ve.createElement(ve.Fragment,null,d&&ve.createElement(S,{sideCar:Gp,removeScrollBar:u,shards:p,noIsolation:m,inert:v,setCallbacks:o,allowPinchZoom:!!y,lockRef:r}),a?ve.cloneElement(ve.Children.only(s),Nr(Nr({},k),{ref:$})):ve.createElement(E,Nr({},k,{className:l,ref:$}),s))});Ba.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ba.classNames={fullWidth:Fa,zeroRight:Ma};var fx=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function dx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=fx();return t&&e.setAttribute("nonce",t),e}function px(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function hx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var gx=function(){var e=0,t=null;return{add:function(r){e==0&&(t=dx())&&(px(t,r),hx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mx=function(){var e=gx();return function(t,r){ve.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Kp=function(){var e=mx(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},vx={left:0,top:0,right:0,gap:0},nc=function(e){return parseInt(e||"",10)||0},yx=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[nc(r),nc(n),nc(i)]},bx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return vx;var t=yx(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])}},wx=Kp(),Ex=function(e,t,r,n){var i=e.left,o=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
4
+ .`.concat(rx,` {
5
+ overflow: hidden `).concat(n,`;
6
+ padding-right: `).concat(s,"px ").concat(n,`;
7
+ }
8
+ body {
9
+ overflow: hidden `).concat(n,`;
10
+ overscroll-behavior: contain;
11
+ `).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
12
+ padding-left: `.concat(i,`px;
13
+ padding-top: `).concat(o,`px;
14
+ padding-right: `).concat(a,`px;
15
+ margin-left:0;
16
+ margin-top:0;
17
+ margin-right: `).concat(s,"px ").concat(n,`;
18
+ `),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
19
+ }
20
+
21
+ .`).concat(Ma,` {
22
+ right: `).concat(s,"px ").concat(n,`;
23
+ }
24
+
25
+ .`).concat(Fa,` {
26
+ margin-right: `).concat(s,"px ").concat(n,`;
27
+ }
28
+
29
+ .`).concat(Ma," .").concat(Ma,` {
30
+ right: 0 `).concat(n,`;
31
+ }
32
+
33
+ .`).concat(Fa," .").concat(Fa,` {
34
+ margin-right: 0 `).concat(n,`;
35
+ }
36
+
37
+ body {
38
+ `).concat(nx,": ").concat(s,`px;
39
+ }
40
+ `)},_x=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,i=n===void 0?"margin":n,o=ve.useMemo(function(){return bx(i)},[i]);return ve.createElement(wx,{styles:Ex(o,!t,i,r?"":"!important")})},ic=!1;if(typeof window<"u")try{var ja=Object.defineProperty({},"passive",{get:function(){return ic=!0,!0}});window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch{ic=!1}var vi=ic?{passive:!1}:!1,xx=function(e){return e.tagName==="TEXTAREA"},qp=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!xx(e)&&r[t]==="visible")},Sx=function(e){return qp(e,"overflowY")},$x=function(e){return qp(e,"overflowX")},Yp=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=Jp(e,r);if(n){var i=Xp(e,r),o=i[1],a=i[2];if(o>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Cx=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Ax=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Jp=function(e,t){return e==="v"?Sx(t):$x(t)},Xp=function(e,t){return e==="v"?Cx(t):Ax(t)},Ox=function(e,t){return e==="h"&&t==="rtl"?-1:1},Tx=function(e,t,r,n,i){var o=Ox(e,window.getComputedStyle(t).direction),a=o*n,s=r.target,l=t.contains(s),u=!1,d=a>0,p=0,h=0;do{var m=Xp(e,s),v=m[0],y=m[1],w=m[2],E=y-w-o*v;(v||E)&&Jp(e,s)&&(p+=E,h+=v),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(d&&(i&&p===0||!i&&a>p)||!d&&(i&&h===0||!i&&-a>h))&&(u=!0),u},Ra=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zp=function(e){return[e.deltaX,e.deltaY]},Qp=function(e){return e&&"current"in e?e.current:e},Ix=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Px=function(e){return`
41
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
42
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
43
+ `)},kx=0,yi=[];function Nx(e){var t=ve.useRef([]),r=ve.useRef([0,0]),n=ve.useRef(),i=ve.useState(kx++)[0],o=ve.useState(function(){return Kp()})[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(i));var y=tx([e.lockRef.current],(e.shards||[]).map(Qp),!0).filter(Boolean);return y.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),y.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ve.useCallback(function(y,w){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var E=Ra(y),_=r.current,S="deltaX"in y?y.deltaX:_[0]-E[0],$="deltaY"in y?y.deltaY:_[1]-E[1],k,P=y.target,C=Math.abs(S)>Math.abs($)?"h":"v";if("touches"in y&&C==="h"&&P.type==="range")return!1;var T=Yp(C,P);if(!T)return!0;if(T?k=C:(k=C==="v"?"h":"v",T=Yp(C,P)),!T)return!1;if(!n.current&&"changedTouches"in y&&(S||$)&&(n.current=k),!k)return!0;var D=n.current||k;return Tx(D,w,y,D==="h"?S:$,!0)},[]),l=ve.useCallback(function(y){var w=y;if(!(!yi.length||yi[yi.length-1]!==o)){var E="deltaY"in w?Zp(w):Ra(w),_=t.current.filter(function(k){return k.name===w.type&&k.target===w.target&&Ix(k.delta,E)})[0];if(_&&_.should){w.cancelable&&w.preventDefault();return}if(!_){var S=(a.current.shards||[]).map(Qp).filter(Boolean).filter(function(k){return k.contains(w.target)}),$=S.length>0?s(w,S[0]):!a.current.noIsolation;$&&w.cancelable&&w.preventDefault()}}},[]),u=ve.useCallback(function(y,w,E,_){var S={name:y,delta:w,target:E,should:_};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function($){return $!==S})},1)},[]),d=ve.useCallback(function(y){r.current=Ra(y),n.current=void 0},[]),p=ve.useCallback(function(y){u(y.type,Zp(y),y.target,s(y,e.lockRef.current))},[]),h=ve.useCallback(function(y){u(y.type,Ra(y),y.target,s(y,e.lockRef.current))},[]);ve.useEffect(function(){return yi.push(o),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",l,vi),document.addEventListener("touchmove",l,vi),document.addEventListener("touchstart",d,vi),function(){yi=yi.filter(function(y){return y!==o}),document.removeEventListener("wheel",l,vi),document.removeEventListener("touchmove",l,vi),document.removeEventListener("touchstart",d,vi)}},[]);var m=e.removeScrollBar,v=e.inert;return ve.createElement(ve.Fragment,null,v?ve.createElement(o,{styles:Px(i)}):null,m?ve.createElement(_x,{gapMode:"margin"}):null)}const Dx=ux(Gp,Nx);var eh=ve.forwardRef(function(e,t){return ve.createElement(Ba,Nr({},e,{ref:t,sideCar:Dx}))});eh.classNames=Ba.classNames;const th=eh;var Lx=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},bi=new WeakMap,Ua=new WeakMap,Wa={},oc=0,rh=function(e){return e&&(e.host||rh(e.parentNode))},Mx=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=rh(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})},Fx=function(e,t,r,n){var i=Mx(t,Array.isArray(e)?e:[e]);Wa[r]||(Wa[r]=new WeakMap);var o=Wa[r],a=[],s=new Set,l=new Set(i),u=function(p){!p||s.has(p)||(s.add(p),u(p.parentNode))};i.forEach(u);var d=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(h){if(s.has(h))d(h);else{var m=h.getAttribute(n),v=m!==null&&m!=="false",y=(bi.get(h)||0)+1,w=(o.get(h)||0)+1;bi.set(h,y),o.set(h,w),a.push(h),y===1&&v&&Ua.set(h,!0),w===1&&h.setAttribute(r,"true"),v||h.setAttribute(n,"true")}})};return d(t),s.clear(),oc++,function(){a.forEach(function(p){var h=bi.get(p)-1,m=o.get(p)-1;bi.set(p,h),o.set(p,m),h||(Ua.has(p)||p.removeAttribute(n),Ua.delete(p)),m||p.removeAttribute(r)}),oc--,oc||(bi=new WeakMap,bi=new WeakMap,Ua=new WeakMap,Wa={})}},nh=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||Lx(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),Fx(n,i,r,"aria-hidden")):function(){return null}};const ih="Dialog",[oh,ah]=hn(ih),[Bx,mr]=oh(ih),jx=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=c.useRef(null),l=c.useRef(null),[u=!1,d]=Da({prop:n,defaultProp:i,onChange:o});return c.createElement(Bx,{scope:t,triggerRef:s,contentRef:l,contentId:$o(),titleId:$o(),descriptionId:$o(),open:u,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:a},r)},Rx="DialogTrigger",sh=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=mr(Rx,r),o=Tt(t,i.triggerRef);return c.createElement(ht.button,De({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":fc(i.open)},n,{ref:o,onClick:mt(e.onClick,i.onOpenToggle)}))}),lh="DialogPortal",[Ux,ch]=oh(lh,{forceMount:void 0}),uh=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,o=mr(lh,t);return c.createElement(Ux,{scope:t,forceMount:r},c.Children.map(n,a=>c.createElement(ar,{present:r||o.open},c.createElement(Wp,{asChild:!0,container:i},a))))},ac="DialogOverlay",fh=c.forwardRef((e,t)=>{const r=ch(ac,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=mr(ac,e.__scopeDialog);return o.modal?c.createElement(ar,{present:n||o.open},c.createElement(Wx,De({},i,{ref:t}))):null}),Wx=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=mr(ac,r);return c.createElement(th,{as:ql,allowPinchZoom:!0,shards:[i.contentRef]},c.createElement(ht.div,De({"data-state":fc(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Fn="DialogContent",za=c.forwardRef((e,t)=>{const r=ch(Fn,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=mr(Fn,e.__scopeDialog);return c.createElement(ar,{present:n||o.open},o.modal?c.createElement(zx,De({},i,{ref:t})):c.createElement(Hx,De({},i,{ref:t})))}),zx=c.forwardRef((e,t)=>{const r=mr(Fn,e.__scopeDialog),n=c.useRef(null),i=Tt(t,r.contentRef,n);return c.useEffect(()=>{const o=n.current;if(o)return nh(o)},[]),c.createElement(dh,De({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:mt(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:mt(e.onFocusOutside,o=>o.preventDefault())}))}),Hx=c.forwardRef((e,t)=>{const r=mr(Fn,e.__scopeDialog),n=c.useRef(!1);return c.createElement(dh,De({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}n.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(n.current=!0);const s=i.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&i.preventDefault()}}))}),dh=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=mr(Fn,r),l=c.useRef(null),u=Tt(t,l);return ex(),c.createElement(c.Fragment,null,c.createElement(V_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o},c.createElement(Dp,De({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":fc(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),sc="DialogTitle",lc=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=mr(sc,r);return c.createElement(ht.h2,De({id:i.titleId},n,{ref:t}))}),ph="DialogDescription",cc=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=mr(ph,r);return c.createElement(ht.p,De({id:i.descriptionId},n,{ref:t}))}),hh="DialogClose",uc=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,i=mr(hh,r);return c.createElement(ht.button,De({type:"button"},n,{ref:t,onClick:mt(e.onClick,()=>i.onOpenChange(!1))}))});function fc(e){return e?"open":"closed"}const Vx="DialogTitleWarning",[Gx,$B]=r_(Vx,{contentName:Fn,titleName:sc,docsSlug:"dialog"}),dc=jx,Kx=sh,qx=uh,Yx=fh,Jx=za,Xx=lc,Zx=cc,gh=uc,Qx="AlertDialog",[e2,CB]=hn(Qx,[ah]),Vr=ah(),t2=e=>{const{__scopeAlertDialog:t,...r}=e,n=Vr(t);return c.createElement(dc,De({},n,r,{modal:!0}))},r2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Vr(r);return c.createElement(Kx,De({},i,n,{ref:t}))}),n2=e=>{const{__scopeAlertDialog:t,...r}=e,n=Vr(t);return c.createElement(qx,De({},n,r))},i2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Vr(r);return c.createElement(Yx,De({},i,n,{ref:t}))}),mh="AlertDialogContent",[o2,a2]=e2(mh),s2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...i}=e,o=Vr(r),a=c.useRef(null),s=Tt(t,a),l=c.useRef(null);return c.createElement(Gx,{contentName:mh,titleName:l2,docsSlug:"alert-dialog"},c.createElement(o2,{scope:r,cancelRef:l},c.createElement(Jx,De({role:"alertdialog"},o,i,{ref:s,onOpenAutoFocus:mt(i.onOpenAutoFocus,u=>{var d;u.preventDefault(),(d=l.current)===null||d===void 0||d.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault()}),c.createElement(Jl,null,n),!1)))}),l2="AlertDialogTitle",c2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Vr(r);return c.createElement(Xx,De({},i,n,{ref:t}))}),u2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Vr(r);return c.createElement(Zx,De({},i,n,{ref:t}))}),f2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,i=Vr(r);return c.createElement(gh,De({},i,n,{ref:t}))}),d2="AlertDialogCancel",p2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:i}=a2(d2,r),o=Vr(r),a=Tt(t,i);return c.createElement(gh,De({},o,n,{ref:a}))}),h2=t2;function ft(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function vh(e){const t=e+"CollectionProvider",[r,n]=kr(t),[i,o]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:v,children:y}=m,w=c.useRef(null),E=c.useRef(new Map).current;return c.createElement(i,{scope:v,itemMap:E,collectionRef:w},y)},s=e+"CollectionSlot",l=c.forwardRef((m,v)=>{const{scope:y,children:w}=m,E=o(s,y),_=rr(v,E.collectionRef);return c.createElement(Ct,{ref:_},w)}),u=e+"CollectionItemSlot",d="data-radix-collection-item",p=c.forwardRef((m,v)=>{const{scope:y,children:w,...E}=m,_=c.useRef(null),S=rr(v,_),$=o(u,y);return c.useEffect(()=>($.itemMap.set(_,{ref:_,...E}),()=>void $.itemMap.delete(_))),c.createElement(Ct,{[d]:"",ref:S},w)});function h(m){const v=o(e+"CollectionConsumer",m);return c.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const E=Array.from(w.querySelectorAll(`[${d}]`));return Array.from(v.itemMap.values()).sort(($,k)=>E.indexOf($.ref.current)-E.indexOf(k.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:l,ItemSlot:p},h,n]}const g2=c.createContext(void 0);function yh(e){const t=c.useContext(g2);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 m2(e,t=globalThis==null?void 0:globalThis.document){const r=Dr(e);c.useEffect(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}let pc=0;function v2(){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:bh()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:bh()),pc++,()=>{pc===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),pc--}},[])}function bh(){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 wi=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},y2=ve.useId||(()=>{});let b2=0;function hc(e){const[t,r]=ve.useState(y2());return wi(()=>{e||r(n=>n??String(b2++))},[e]),e||(t?`radix-${t}`:"")}function Ei(e){return e.split("-")[1]}function gc(e){return e==="y"?"height":"width"}function Gr(e){return e.split("-")[0]}function Bn(e){return["top","bottom"].includes(Gr(e))?"x":"y"}function wh(e,t,r){let{reference:n,floating:i}=e;const o=n.x+n.width/2-i.width/2,a=n.y+n.height/2-i.height/2,s=Bn(t),l=gc(s),u=n[l]/2-i[l]/2,d=s==="x";let p;switch(Gr(t)){case"top":p={x:o,y:n.y-i.height};break;case"bottom":p={x:o,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:a};break;case"left":p={x:n.x-i.width,y:a};break;default:p={x:n.x,y:n.y}}switch(Ei(t)){case"start":p[s]-=u*(r&&d?-1:1);break;case"end":p[s]+=u*(r&&d?-1:1)}return p}const w2=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:p}=wh(u,n,l),h=n,m={},v=0;for(let y=0;y<s.length;y++){const{name:w,fn:E}=s[y],{x:_,y:S,data:$,reset:k}=await E({x:d,y:p,initialPlacement:n,placement:h,strategy:i,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});d=_??d,p=S??p,m={...m,[w]:{...m[w],...$}},k&&v<=50&&(v++,typeof k=="object"&&(k.placement&&(h=k.placement),k.rects&&(u=k.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):k.rects),{x:d,y:p}=wh(u,h,l)),y=-1)}return{x:d,y:p,placement:h,strategy:i,middlewareData:m}};function Eh(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 Ha(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Co(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=t,v=Eh(m),y=s[h?p==="floating"?"reference":"floating":p],w=Ha(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(y)))==null||r?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),E=p==="floating"?{...a.floating,x:n,y:i}:a.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),S=await(o.isElement==null?void 0:o.isElement(_))&&await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1},$=Ha(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:E,offsetParent:_,strategy:l}):E);return{top:(w.top-$.top+v.top)/S.y,bottom:($.bottom-w.bottom+v.bottom)/S.y,left:(w.left-$.left+v.left)/S.x,right:($.right-w.right+v.right)/S.x}}const mc=Math.min,jn=Math.max;function vc(e,t,r){return jn(e,mc(t,r))}const _h=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e||{},{x:i,y:o,placement:a,rects:s,platform:l,elements:u}=t;if(r==null)return{};const d=Eh(n),p={x:i,y:o},h=Bn(a),m=gc(h),v=await l.getDimensions(r),y=h==="y",w=y?"top":"left",E=y?"bottom":"right",_=y?"clientHeight":"clientWidth",S=s.reference[m]+s.reference[h]-p[h]-s.floating[m],$=p[h]-s.reference[h],k=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let P=k?k[_]:0;P&&await(l.isElement==null?void 0:l.isElement(k))||(P=u.floating[_]||s.floating[m]);const C=S/2-$/2,T=d[w],D=P-v[m]-d[E],j=P/2-v[m]/2+C,F=vc(T,j,D),M=Ei(a)!=null&&j!=F&&s.reference[m]/2-(j<T?d[w]:d[E])-v[m]/2<0;return{[h]:p[h]-(M?j<T?T-j:D-j:0),data:{[h]:F,centerOffset:j-F}}}}),xh=["top","right","bottom","left"];xh.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const E2={left:"right",right:"left",bottom:"top",top:"bottom"};function Va(e){return e.replace(/left|right|bottom|top/g,t=>E2[t])}function _2(e,t,r){r===void 0&&(r=!1);const n=Ei(e),i=Bn(e),o=gc(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Va(a)),{main:a,cross:Va(a)}}const x2={start:"end",end:"start"};function yc(e){return e.replace(/start|end/g,t=>x2[t])}const S2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:v=!0,...y}=e,w=Gr(n),E=Gr(a)===a,_=await(s.isRTL==null?void 0:s.isRTL(l.floating)),S=p||(E||!v?[Va(a)]:function(F){const M=Va(F);return[yc(F),M,yc(M)]}(a));p||m==="none"||S.push(...function(F,M,Z,Y){const X=Ei(F);let ne=function(oe,ce,se){const ge=["left","right"],le=["right","left"],V=["top","bottom"],J=["bottom","top"];switch(oe){case"top":case"bottom":return se?ce?le:ge:ce?ge:le;case"left":case"right":return ce?V:J;default:return[]}}(Gr(F),Z==="start",Y);return X&&(ne=ne.map(oe=>oe+"-"+X),M&&(ne=ne.concat(ne.map(yc)))),ne}(a,v,m,_));const $=[a,...S],k=await Co(t,y),P=[];let C=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&P.push(k[w]),d){const{main:F,cross:M}=_2(n,o,_);P.push(k[F],k[M])}if(C=[...C,{placement:n,overflows:P}],!P.every(F=>F<=0)){var T,D;const F=(((T=i.flip)==null?void 0:T.index)||0)+1,M=$[F];if(M)return{data:{index:F,overflows:C},reset:{placement:M}};let Z=(D=C.filter(Y=>Y.overflows[0]<=0).sort((Y,X)=>Y.overflows[1]-X.overflows[1])[0])==null?void 0:D.placement;if(!Z)switch(h){case"bestFit":{var j;const Y=(j=C.map(X=>[X.placement,X.overflows.filter(ne=>ne>0).reduce((ne,oe)=>ne+oe,0)]).sort((X,ne)=>X[1]-ne[1])[0])==null?void 0:j[0];Y&&(Z=Y);break}case"initialPlacement":Z=a}if(n!==Z)return{reset:{placement:Z}}}return{}}}};function Sh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $h(e){return xh.some(t=>e[t]>=0)}const $2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{strategy:r="referenceHidden",...n}=e,{rects:i}=t;switch(r){case"referenceHidden":{const o=Sh(await Co(t,{...n,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:$h(o)}}}case"escaped":{const o=Sh(await Co(t,{...n,altBoundary:!0}),i.floating);return{data:{escapedOffsets:o,escaped:$h(o)}}}default:return{}}}}},C2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,i=await async function(o,a){const{placement:s,platform:l,elements:u}=o,d=await(l.isRTL==null?void 0:l.isRTL(u.floating)),p=Gr(s),h=Ei(s),m=Bn(s)==="x",v=["left","top"].includes(p)?-1:1,y=d&&m?-1:1,w=typeof a=="function"?a(o):a;let{mainAxis:E,crossAxis:_,alignmentAxis:S}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...w};return h&&typeof S=="number"&&(_=h==="end"?-1*S:S),m?{x:_*y,y:E*v}:{x:E*v,y:_*y}}(t,e);return{x:r+i.x,y:n+i.y,data:i}}}};function Ch(e){return e==="x"?"y":"x"}const A2=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:E,y:_}=w;return{x:E,y:_}}},...l}=e,u={x:r,y:n},d=await Co(t,l),p=Bn(Gr(i)),h=Ch(p);let m=u[p],v=u[h];if(o){const w=p==="y"?"bottom":"right";m=vc(m+d[p==="y"?"top":"left"],m,m-d[w])}if(a){const w=h==="y"?"bottom":"right";v=vc(v+d[h==="y"?"top":"left"],v,v-d[w])}const y=s.fn({...t,[p]:m,[h]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},O2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,d={x:r,y:n},p=Bn(i),h=Ch(p);let m=d[p],v=d[h];const y=typeof s=="function"?s(t):s,w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const S=p==="y"?"height":"width",$=o.reference[p]-o.floating[S]+w.mainAxis,k=o.reference[p]+o.reference[S]-w.mainAxis;m<$?m=$:m>k&&(m=k)}if(u){var E,_;const S=p==="y"?"width":"height",$=["top","left"].includes(Gr(i)),k=o.reference[h]-o.floating[S]+($&&((E=a.offset)==null?void 0:E[h])||0)+($?0:w.crossAxis),P=o.reference[h]+o.reference[S]+($?0:((_=a.offset)==null?void 0:_[h])||0)-($?w.crossAxis:0);v<k?v=k:v>P&&(v=P)}return{[p]:m,[h]:v}}}},T2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:i,elements:o}=t,{apply:a=()=>{},...s}=e,l=await Co(t,s),u=Gr(r),d=Ei(r),p=Bn(r)==="x",{width:h,height:m}=n.floating;let v,y;u==="top"||u==="bottom"?(v=u,y=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(y=u,v=d==="end"?"top":"bottom");const w=m-l[v],E=h-l[y],_=!t.middlewareData.shift;let S=w,$=E;if(p){const P=h-l.left-l.right;$=d||_?mc(E,P):P}else{const P=m-l.top-l.bottom;S=d||_?mc(w,P):P}if(_&&!d){const P=jn(l.left,0),C=jn(l.right,0),T=jn(l.top,0),D=jn(l.bottom,0);p?$=h-2*(P!==0||C!==0?P+C:jn(l.left,l.right)):S=m-2*(T!==0||D!==0?T+D:jn(l.top,l.bottom))}await a({...t,availableWidth:$,availableHeight:S});const k=await i.getDimensions(o.floating);return h!==k.width||m!==k.height?{reset:{rects:!0}}:{}}}};function sr(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vr(e){return sr(e).getComputedStyle(e)}function Ah(e){return e instanceof sr(e).Node}function gn(e){return Ah(e)?(e.nodeName||"").toLowerCase():""}function yr(e){return e instanceof sr(e).HTMLElement}function nr(e){return e instanceof sr(e).Element}function Oh(e){return typeof ShadowRoot>"u"?!1:e instanceof sr(e).ShadowRoot||e instanceof ShadowRoot}function Ao(e){const{overflow:t,overflowX:r,overflowY:n,display:i}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(i)}function I2(e){return["table","td","th"].includes(gn(e))}function bc(e){const t=wc(),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 wc(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Ga(e){return["html","body","#document"].includes(gn(e))}const Th=Math.min,Oo=Math.max,Ka=Math.round;function Ih(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const i=yr(e),o=i?e.offsetWidth:r,a=i?e.offsetHeight:n,s=Ka(r)!==o||Ka(n)!==a;return s&&(r=o,n=a),{width:r,height:n,fallback:s}}function Ph(e){return nr(e)?e:e.contextElement}const kh={x:1,y:1};function _i(e){const t=Ph(e);if(!yr(t))return kh;const r=t.getBoundingClientRect(),{width:n,height:i,fallback:o}=Ih(t);let a=(o?Ka(r.width):r.width)/n,s=(o?Ka(r.height):r.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const Nh={x:0,y:0};function Dh(e,t,r){var n,i;if(t===void 0&&(t=!0),!wc())return Nh;const o=e?sr(e):window;return!r||t&&r!==o?Nh:{x:((n=o.visualViewport)==null?void 0:n.offsetLeft)||0,y:((i=o.visualViewport)==null?void 0:i.offsetTop)||0}}function Rn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const i=e.getBoundingClientRect(),o=Ph(e);let a=kh;t&&(n?nr(n)&&(a=_i(n)):a=_i(e));const s=Dh(o,r,n);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,d=i.width/a.x,p=i.height/a.y;if(o){const h=sr(o),m=n&&nr(n)?sr(n):n;let v=h.frameElement;for(;v&&n&&m!==h;){const y=_i(v),w=v.getBoundingClientRect(),E=getComputedStyle(v);w.x+=(v.clientLeft+parseFloat(E.paddingLeft))*y.x,w.y+=(v.clientTop+parseFloat(E.paddingTop))*y.y,l*=y.x,u*=y.y,d*=y.x,p*=y.y,l+=w.x,u+=w.y,v=sr(v).frameElement}}return Ha({width:d,height:p,x:l,y:u})}function mn(e){return((Ah(e)?e.ownerDocument:e.document)||window.document).documentElement}function qa(e){return nr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Lh(e){return Rn(mn(e)).left+qa(e).scrollLeft}function xi(e){if(gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Oh(e)&&e.host||mn(e);return Oh(t)?t.host:t}function Mh(e){const t=xi(e);return Ga(t)?t.ownerDocument.body:yr(t)&&Ao(t)?t:Mh(t)}function To(e,t){var r;t===void 0&&(t=[]);const n=Mh(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=sr(n);return i?t.concat(o,o.visualViewport||[],Ao(n)?n:[]):t.concat(n,To(n))}function Fh(e,t,r){let n;if(t==="viewport")n=function(i,o){const a=sr(i),s=mn(i),l=a.visualViewport;let u=s.clientWidth,d=s.clientHeight,p=0,h=0;if(l){u=l.width,d=l.height;const m=wc();(!m||m&&o==="fixed")&&(p=l.offsetLeft,h=l.offsetTop)}return{width:u,height:d,x:p,y:h}}(e,r);else if(t==="document")n=function(i){const o=mn(i),a=qa(i),s=i.ownerDocument.body,l=Oo(o.scrollWidth,o.clientWidth,s.scrollWidth,s.clientWidth),u=Oo(o.scrollHeight,o.clientHeight,s.scrollHeight,s.clientHeight);let d=-a.scrollLeft+Lh(i);const p=-a.scrollTop;return vr(s).direction==="rtl"&&(d+=Oo(o.clientWidth,s.clientWidth)-l),{width:l,height:u,x:d,y:p}}(mn(e));else if(nr(t))n=function(i,o){const a=Rn(i,!0,o==="fixed"),s=a.top+i.clientTop,l=a.left+i.clientLeft,u=yr(i)?_i(i):{x:1,y:1};return{width:i.clientWidth*u.x,height:i.clientHeight*u.y,x:l*u.x,y:s*u.y}}(t,r);else{const i=Dh(e);n={...t,x:t.x-i.x,y:t.y-i.y}}return Ha(n)}function Bh(e,t){const r=xi(e);return!(r===t||!nr(r)||Ga(r))&&(vr(r).position==="fixed"||Bh(r,t))}function jh(e,t){return yr(e)&&vr(e).position!=="fixed"?t?t(e):e.offsetParent:null}function Rh(e,t){const r=sr(e);if(!yr(e))return r;let n=jh(e,t);for(;n&&I2(n)&&vr(n).position==="static";)n=jh(n,t);return n&&(gn(n)==="html"||gn(n)==="body"&&vr(n).position==="static"&&!bc(n))?r:n||function(i){let o=xi(i);for(;yr(o)&&!Ga(o);){if(bc(o))return o;o=xi(o)}return null}(e)||r}function P2(e,t,r){const n=yr(t),i=mn(t),o=r==="fixed",a=Rn(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!o)if((gn(t)!=="body"||Ao(i))&&(s=qa(t)),yr(t)){const u=Rn(t,!0,o,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else i&&(l.x=Lh(i));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const k2={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=r==="clippingAncestors"?function(u,d){const p=d.get(u);if(p)return p;let h=To(u).filter(w=>nr(w)&&gn(w)!=="body"),m=null;const v=vr(u).position==="fixed";let y=v?xi(u):u;for(;nr(y)&&!Ga(y);){const w=vr(y),E=bc(y);E||w.position!=="fixed"||(m=null),(v?!E&&!m:!E&&w.position==="static"&&m&&["absolute","fixed"].includes(m.position)||Ao(y)&&!E&&Bh(u,y))?h=h.filter(_=>_!==y):m=w,y=xi(y)}return d.set(u,h),h}(t,this._c):[].concat(r),a=[...o,n],s=a[0],l=a.reduce((u,d)=>{const p=Fh(t,d,i);return u.top=Oo(p.top,u.top),u.right=Th(p.right,u.right),u.bottom=Th(p.bottom,u.bottom),u.left=Oo(p.left,u.left),u},Fh(t,s,i));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 i=yr(r),o=mn(r);if(r===o)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((i||!i&&n!=="fixed")&&((gn(r)!=="body"||Ao(o))&&(a=qa(r)),yr(r))){const u=Rn(r);s=_i(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 Ih(e)},getOffsetParent:Rh,getDocumentElement:mn,getScale:_i,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e;const i=this.getOffsetParent||Rh,o=this.getDimensions;return{reference:P2(t,await i(r),n),floating:{x:0,y:0,...await o(r)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>vr(e).direction==="rtl"};function N2(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=i||o?[...nr(e)?To(e):e.contextElement?To(e.contextElement):[],...To(t)]:[];l.forEach(h=>{const m=!nr(h)&&h.toString().includes("V");!i||s&&!m||h.addEventListener("scroll",r,{passive:!0}),o&&h.addEventListener("resize",r)});let u,d=null;a&&(d=new ResizeObserver(()=>{r()}),nr(e)&&!s&&d.observe(e),nr(e)||!e.contextElement||s||d.observe(e.contextElement),d.observe(t));let p=s?Rn(e):null;return s&&function h(){const m=Rn(e);!p||m.x===p.x&&m.y===p.y&&m.width===p.width&&m.height===p.height||r(),p=m,u=requestAnimationFrame(h)}(),r(),()=>{var h;l.forEach(m=>{i&&m.removeEventListener("scroll",r),o&&m.removeEventListener("resize",r)}),(h=d)==null||h.disconnect(),d=null,s&&cancelAnimationFrame(u)}}const D2=(e,t,r)=>{const n=new Map,i={platform:k2,...r},o={...i.platform,_c:n};return w2(e,t,{...i,platform:o})},L2=e=>{const{element:t,padding:r}=e;function n(i){return{}.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return t&&n(t)?t.current!=null?_h({element:t.current,padding:r}).fn(i):{}:t?_h({element:t,padding:r}).fn(i):{}}}};var Ya=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,i;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(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!Ja(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Uh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wh(e,t){const r=Uh(e);return Math.round(t*r)/r}function zh(e){const t=ve.useRef(e);return Ya(()=>{t.current=e}),t}function M2(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[d,p]=ve.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=ve.useState(n);Ja(h,n)||m(n);const[v,y]=ve.useState(null),[w,E]=ve.useState(null),_=ve.useCallback(ne=>{ne!=P.current&&(P.current=ne,y(ne))},[y]),S=ve.useCallback(ne=>{ne!==C.current&&(C.current=ne,E(ne))},[E]),$=o||v,k=a||w,P=ve.useRef(null),C=ve.useRef(null),T=ve.useRef(d),D=zh(l),j=zh(i),F=ve.useCallback(()=>{if(!P.current||!C.current)return;const ne={placement:t,strategy:r,middleware:h};j.current&&(ne.platform=j.current),D2(P.current,C.current,ne).then(oe=>{const ce={...oe,isPositioned:!0};M.current&&!Ja(T.current,ce)&&(T.current=ce,zd.flushSync(()=>{p(ce)}))})},[h,t,r,j]);Ya(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(ne=>({...ne,isPositioned:!1})))},[u]);const M=ve.useRef(!1);Ya(()=>(M.current=!0,()=>{M.current=!1}),[]),Ya(()=>{if($&&(P.current=$),k&&(C.current=k),$&&k){if(D.current)return D.current($,k,F);F()}},[$,k,F,D]);const Z=ve.useMemo(()=>({reference:P,floating:C,setReference:_,setFloating:S}),[_,S]),Y=ve.useMemo(()=>({reference:$,floating:k}),[$,k]),X=ve.useMemo(()=>{const ne={position:r,left:0,top:0};if(!Y.floating)return ne;const oe=Wh(Y.floating,d.x),ce=Wh(Y.floating,d.y);return s?{...ne,transform:"translate("+oe+"px, "+ce+"px)",...Uh(Y.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:oe,top:ce}},[r,s,Y.floating,d.x,d.y]);return ve.useMemo(()=>({...d,update:F,refs:Z,elements:Y,floatingStyles:X}),[d,F,Z,Y,X])}const F2=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return c.createElement(Je.svg,Xe({},o,{ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))});function Hh(e){const[t,r]=c.useState(void 0);return wi(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.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 B2(e,t){return c.useReducer((r,n)=>{const i=t[r][n];return i??r},e)}const Xa=e=>{const{present:t,children:r}=e,n=j2(t),i=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),o=rr(n.ref,i.ref);return typeof r=="function"||n.isPresent?c.cloneElement(i,{ref:o}):null};Xa.displayName="Presence";function j2(e){const[t,r]=c.useState(),n=c.useRef({}),i=c.useRef(e),o=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=B2(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Za(n.current);o.current=s==="mounted"?u:"none"},[s]),wi(()=>{const u=n.current,d=i.current;if(d!==e){const h=o.current,m=Za(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),wi(()=>{if(t){const u=p=>{const m=Za(n.current).includes(p.animationName);p.target===t&&m&&sn.flushSync(()=>l("ANIMATION_END"))},d=p=>{p.target===t&&(o.current=Za(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),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 Za(e){return(e==null?void 0:e.animationName)||"none"}function Kr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=R2({defaultProp:t,onChange:r}),o=e!==void 0,a=o?e:n,s=Dr(r),l=c.useCallback(u=>{if(o){const p=typeof u=="function"?u(e):u;p!==e&&s(p)}else i(u)},[o,e,i,s]);return[a,l]}function R2({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,i=c.useRef(n),o=Dr(t);return c.useEffect(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}const Ec="rovingFocusGroup.onEntryFocus",U2={bubbles:!1,cancelable:!0},_c="RovingFocusGroup",[xc,Vh,W2]=vh(_c),[z2,Gh]=kr(_c,[W2]),[H2,V2]=z2(_c),G2=c.forwardRef((e,t)=>c.createElement(xc.Provider,{scope:e.__scopeRovingFocusGroup},c.createElement(xc.Slot,{scope:e.__scopeRovingFocusGroup},c.createElement(K2,Xe({},e,{ref:t}))))),K2=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...d}=e,p=c.useRef(null),h=rr(t,p),m=yh(o),[v=null,y]=Kr({prop:a,defaultProp:s,onChange:l}),[w,E]=c.useState(!1),_=Dr(u),S=Vh(r),$=c.useRef(!1),[k,P]=c.useState(0);return c.useEffect(()=>{const C=p.current;if(C)return C.addEventListener(Ec,_),()=>C.removeEventListener(Ec,_)},[_]),c.createElement(H2,{scope:r,orientation:n,dir:m,loop:i,currentTabStopId:v,onItemFocus:c.useCallback(C=>y(C),[y]),onItemShiftTab:c.useCallback(()=>E(!0),[]),onFocusableItemAdd:c.useCallback(()=>P(C=>C+1),[]),onFocusableItemRemove:c.useCallback(()=>P(C=>C-1),[])},c.createElement(Je.div,Xe({tabIndex:w||k===0?-1:0,"data-orientation":n},d,{ref:h,style:{outline:"none",...e.style},onMouseDown:ft(e.onMouseDown,()=>{$.current=!0}),onFocus:ft(e.onFocus,C=>{const T=!$.current;if(C.target===C.currentTarget&&T&&!w){const D=new CustomEvent(Ec,U2);if(C.currentTarget.dispatchEvent(D),!D.defaultPrevented){const j=S().filter(X=>X.focusable),F=j.find(X=>X.active),M=j.find(X=>X.id===v),Y=[F,M,...j].filter(Boolean).map(X=>X.ref.current);Kh(Y)}}$.current=!1}),onBlur:ft(e.onBlur,()=>E(!1))})))}),q2="RovingFocusGroupItem",Y2=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:o,...a}=e,s=hc(),l=o||s,u=V2(q2,r),d=u.currentTabStopId===l,p=Vh(r),{onFocusableItemAdd:h,onFocusableItemRemove:m}=u;return c.useEffect(()=>{if(n)return h(),()=>m()},[n,h,m]),c.createElement(xc.ItemSlot,{scope:r,id:l,focusable:n,active:i},c.createElement(Je.span,Xe({tabIndex:d?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:ft(e.onMouseDown,v=>{n?u.onItemFocus(l):v.preventDefault()}),onFocus:ft(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:ft(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=Z2(v,u.orientation,u.dir);if(y!==void 0){v.preventDefault();let E=p().filter(_=>_.focusable).map(_=>_.ref.current);if(y==="last")E.reverse();else if(y==="prev"||y==="next"){y==="prev"&&E.reverse();const _=E.indexOf(v.currentTarget);E=u.loop?Q2(E,_+1):E.slice(_+1)}setTimeout(()=>Kh(E))}})})))}),J2={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function X2(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Z2(e,t,r){const n=X2(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return J2[n]}function Kh(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Q2(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const eS=G2,tS=Y2,Sc="dismissableLayer.update",rS="dismissableLayer.pointerDownOutside",nS="dismissableLayer.focusOutside";let qh;const iS=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),oS=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,d=c.useContext(iS),[p,h]=c.useState(null),m=(r=p==null?void 0:p.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,v]=c.useState({}),y=rr(t,T=>h(T)),w=Array.from(d.layers),[E]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),_=w.indexOf(E),S=p?w.indexOf(p):-1,$=d.layersWithOutsidePointerEventsDisabled.size>0,k=S>=_,P=aS(T=>{const D=T.target,j=[...d.branches].some(F=>F.contains(D));!k||j||(o==null||o(T),s==null||s(T),T.defaultPrevented||l==null||l())},m),C=sS(T=>{const D=T.target;[...d.branches].some(F=>F.contains(D))||(a==null||a(T),s==null||s(T),T.defaultPrevented||l==null||l())},m);return m2(T=>{S===d.layers.size-1&&(i==null||i(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},m),c.useEffect(()=>{if(p)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(qh=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(p)),d.layers.add(p),Yh(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=qh)}},[p,m,n,d]),c.useEffect(()=>()=>{p&&(d.layers.delete(p),d.layersWithOutsidePointerEventsDisabled.delete(p),Yh())},[p,d]),c.useEffect(()=>{const T=()=>v({});return document.addEventListener(Sc,T),()=>document.removeEventListener(Sc,T)},[]),c.createElement(Je.div,Xe({},u,{ref:y,style:{pointerEvents:$?k?"auto":"none":void 0,...e.style},onFocusCapture:ft(e.onFocusCapture,C.onFocusCapture),onBlurCapture:ft(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:ft(e.onPointerDownCapture,P.onPointerDownCapture)}))});function aS(e,t=globalThis==null?void 0:globalThis.document){const r=Dr(e),n=c.useRef(!1),i=c.useRef(()=>{});return c.useEffect(()=>{const o=s=>{if(s.target&&!n.current){let u=function(){Jh(rS,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function sS(e,t=globalThis==null?void 0:globalThis.document){const r=Dr(e),n=c.useRef(!1);return c.useEffect(()=>{const i=o=>{o.target&&!n.current&&Jh(nS,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Yh(){const e=new CustomEvent(Sc);document.dispatchEvent(e)}function Jh(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?np(i,o):i.dispatchEvent(o)}const $c="focusScope.autoFocusOnMount",Cc="focusScope.autoFocusOnUnmount",Xh={bubbles:!1,cancelable:!0},lS=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=c.useState(null),u=Dr(i),d=Dr(o),p=c.useRef(null),h=rr(t,y=>l(y)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let y=function(S){if(m.paused||!s)return;const $=S.target;s.contains($)?p.current=$:vn(p.current,{select:!0})},w=function(S){if(m.paused||!s)return;const $=S.relatedTarget;$!==null&&(s.contains($)||vn(p.current,{select:!0}))},E=function(S){const $=document.activeElement;for(const k of S)k.removedNodes.length>0&&(s!=null&&s.contains($)||vn(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",w);const _=new MutationObserver(E);return s&&_.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",w),_.disconnect()}}},[n,s,m.paused]),c.useEffect(()=>{if(s){eg.add(m);const y=document.activeElement;if(!s.contains(y)){const E=new CustomEvent($c,Xh);s.addEventListener($c,u),s.dispatchEvent(E),E.defaultPrevented||(cS(hS(Zh(s)),{select:!0}),document.activeElement===y&&vn(s))}return()=>{s.removeEventListener($c,u),setTimeout(()=>{const E=new CustomEvent(Cc,Xh);s.addEventListener(Cc,d),s.dispatchEvent(E),E.defaultPrevented||vn(y??document.body,{select:!0}),s.removeEventListener(Cc,d),eg.remove(m)},0)}}},[s,u,d,m]);const v=c.useCallback(y=>{if(!r&&!n||m.paused)return;const w=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,E=document.activeElement;if(w&&E){const _=y.currentTarget,[S,$]=uS(_);S&&$?!y.shiftKey&&E===$?(y.preventDefault(),r&&vn(S,{select:!0})):y.shiftKey&&E===S&&(y.preventDefault(),r&&vn($,{select:!0})):E===_&&y.preventDefault()}},[r,n,m.paused]);return c.createElement(Je.div,Xe({tabIndex:-1},a,{ref:h,onKeyDown:v}))});function cS(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(vn(n,{select:t}),document.activeElement!==r)return}function uS(e){const t=Zh(e),r=Qh(t,e),n=Qh(t.reverse(),e);return[r,n]}function Zh(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Qh(e,t){for(const r of e)if(!fS(r,{upTo:t}))return r}function fS(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 dS(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&&dS(e)&&t&&e.select()}}const eg=pS();function pS(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=tg(e,t),e.unshift(t)},remove(t){var r;e=tg(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function tg(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function hS(e){return e.filter(t=>t.tagName!=="A")}const rg="Popper",[ng,ig]=kr(rg),[gS,og]=ng(rg),mS=e=>{const{__scopePopper:t,children:r}=e,[n,i]=c.useState(null);return c.createElement(gS,{scope:t,anchor:n,onAnchorChange:i},r)},vS="PopperAnchor",yS=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=og(vS,r),a=c.useRef(null),s=rr(t,a);return c.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:c.createElement(Je.div,De({},i,{ref:s}))}),ag="PopperContent",[bS,wS]=ng(ag),ES=c.forwardRef((e,t)=>{var r,n,i,o,a,s,l,u;const{__scopePopper:d,side:p="bottom",sideOffset:h=0,align:m="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:w=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:S=!1,avoidCollisions:$=!0,onPlaced:k,...P}=e,C=og(ag,d),[T,D]=c.useState(null),j=rr(t,ie=>D(ie)),[F,M]=c.useState(null),Z=Hh(F),Y=(r=Z==null?void 0:Z.width)!==null&&r!==void 0?r:0,X=(n=Z==null?void 0:Z.height)!==null&&n!==void 0?n:0,ne=p+(m!=="center"?"-"+m:""),oe=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},ce=Array.isArray(w)?w:[w],se=ce.length>0,ge={padding:oe,boundary:ce.filter(xS),altBoundary:se},{refs:le,floatingStyles:V,placement:J,isPositioned:re,middlewareData:de}=M2({strategy:"fixed",placement:ne,whileElementsMounted:N2,elements:{reference:C.anchor},middleware:[C2({mainAxis:h+X,alignmentAxis:v}),$&&A2({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?O2():void 0,...ge}),$&&S2({...ge}),T2({...ge,apply:({elements:ie,rects:pe,availableWidth:ye,availableHeight:_e})=>{const{width:xe,height:ae}=pe.reference,Me=ie.floating.style;Me.setProperty("--radix-popper-available-width",`${ye}px`),Me.setProperty("--radix-popper-available-height",`${_e}px`),Me.setProperty("--radix-popper-anchor-width",`${xe}px`),Me.setProperty("--radix-popper-anchor-height",`${ae}px`)}}),F&&L2({element:F,padding:y}),SS({arrowWidth:Y,arrowHeight:X}),S&&$2({strategy:"referenceHidden"})]}),[H,G]=cg(J),B=Dr(k);wi(()=>{re&&(B==null||B())},[re,B]);const z=(i=de.arrow)===null||i===void 0?void 0:i.x,K=(o=de.arrow)===null||o===void 0?void 0:o.y,I=((a=de.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[N,Q]=c.useState();return wi(()=>{T&&Q(window.getComputedStyle(T).zIndex)},[T]),c.createElement("div",{ref:le.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:re?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:N,"--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(bS,{scope:d,placedSide:H,onArrowChange:M,arrowX:z,arrowY:K,shouldHideArrow:I},c.createElement(Je.div,De({"data-side":H,"data-align":G},P,{ref:j,style:{...P.style,animation:re?void 0:"none",opacity:(u=de.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),sg="PopperArrow",_S={top:"bottom",right:"left",bottom:"top",left:"right"},lg=c.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=wS(sg,n),a=_S[o.placedSide];return c.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},c.createElement(F2,De({},i,{ref:r,style:{...i.style,display:"block"}})))});function xS(e){return e!==null}const SS=e=>({name:"transformOrigin",options:e,fn(t){var r,n,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=p?0:e.arrowWidth,m=p?0:e.arrowHeight,[v,y]=cg(s),w={start:"0%",center:"50%",end:"100%"}[y],E=((n=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,_=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+m/2;let S="",$="";return v==="bottom"?(S=p?w:`${E}px`,$=`${-m}px`):v==="top"?(S=p?w:`${E}px`,$=`${l.floating.height+m}px`):v==="right"?(S=`${-m}px`,$=p?w:`${_}px`):v==="left"&&(S=`${l.floating.width+m}px`,$=p?w:`${_}px`),{data:{x:S,y:$}}}});function cg(e){const[t,r="center"]=e.split("-");return[t,r]}const $S=mS,CS=yS,AS=ES,OS=lg,TS=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...i}=e;return n?sn.createPortal(c.createElement(Je.div,Xe({},i,{ref:t})),n):null}),IS=["Enter"," "],PS=["ArrowDown","PageUp","Home"],ug=["ArrowUp","PageDown","End"],kS=[...PS,...ug],Qa="Menu",[Ac,NS,DS]=vh(Qa),[Un,fg]=kr(Qa,[DS,ig,Gh]),es=ig(),dg=Gh(),[LS,Io]=Un(Qa),[MS,Oc]=Un(Qa),FS=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:o,modal:a=!0}=e,s=es(t),[l,u]=c.useState(null),d=c.useRef(!1),p=Dr(o),h=yh(i);return c.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),c.createElement($S,s,c.createElement(LS,{scope:t,open:r,onOpenChange:p,content:l,onContentChange:u},c.createElement(MS,{scope:t,onClose:c.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:d,dir:h,modal:a},n)))},BS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=es(r);return c.createElement(CS,Xe({},i,n,{ref:t}))}),pg="MenuPortal",[jS,RS]=Un(pg,{forceMount:void 0}),US=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:i}=e,o=Io(pg,t);return c.createElement(jS,{scope:t,forceMount:r},c.createElement(Xa,{present:r||o.open},c.createElement(TS,{asChild:!0,container:i},n)))},yn="MenuContent",[WS,hg]=Un(yn),zS=c.forwardRef((e,t)=>{const r=RS(yn,e.__scopeMenu),{forceMount:n=r.forceMount,...i}=e,o=Io(yn,e.__scopeMenu),a=Oc(yn,e.__scopeMenu);return c.createElement(Ac.Provider,{scope:e.__scopeMenu},c.createElement(Xa,{present:n||o.open},c.createElement(Ac.Slot,{scope:e.__scopeMenu},a.modal?c.createElement(HS,Xe({},i,{ref:t})):c.createElement(VS,Xe({},i,{ref:t})))))}),HS=c.forwardRef((e,t)=>{const r=Io(yn,e.__scopeMenu),n=c.useRef(null),i=rr(t,n);return c.useEffect(()=>{const o=n.current;if(o)return nh(o)},[]),c.createElement(gg,Xe({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:ft(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))}),VS=c.forwardRef((e,t)=>{const r=Io(yn,e.__scopeMenu);return c.createElement(gg,Xe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))}),gg=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:h,onDismiss:m,disableOutsideScroll:v,...y}=e,w=Io(yn,r),E=Oc(yn,r),_=es(r),S=dg(r),$=NS(r),[k,P]=c.useState(null),C=c.useRef(null),T=rr(t,C,w.onContentChange),D=c.useRef(0),j=c.useRef(""),F=c.useRef(0),M=c.useRef(null),Z=c.useRef("right"),Y=c.useRef(0),X=v?th:c.Fragment,ne=v?{as:Ct,allowPinchZoom:!0}:void 0,oe=se=>{var ge,le;const V=j.current+se,J=$().filter(z=>!z.disabled),re=document.activeElement,de=(ge=J.find(z=>z.ref.current===re))===null||ge===void 0?void 0:ge.textValue,H=J.map(z=>z.textValue),G=i$(H,V,de),B=(le=J.find(z=>z.textValue===G))===null||le===void 0?void 0:le.ref.current;(function z(K){j.current=K,window.clearTimeout(D.current),K!==""&&(D.current=window.setTimeout(()=>z(""),1e3))})(V),B&&setTimeout(()=>B.focus())};c.useEffect(()=>()=>window.clearTimeout(D.current),[]),v2();const ce=c.useCallback(se=>{var ge,le;return Z.current===((ge=M.current)===null||ge===void 0?void 0:ge.side)&&a$(se,(le=M.current)===null||le===void 0?void 0:le.area)},[]);return c.createElement(WS,{scope:r,searchRef:j,onItemEnter:c.useCallback(se=>{ce(se)&&se.preventDefault()},[ce]),onItemLeave:c.useCallback(se=>{var ge;ce(se)||((ge=C.current)===null||ge===void 0||ge.focus(),P(null))},[ce]),onTriggerLeave:c.useCallback(se=>{ce(se)&&se.preventDefault()},[ce]),pointerGraceTimerRef:F,onPointerGraceIntentChange:c.useCallback(se=>{M.current=se},[])},c.createElement(X,ne,c.createElement(lS,{asChild:!0,trapped:i,onMountAutoFocus:ft(o,se=>{var ge;se.preventDefault(),(ge=C.current)===null||ge===void 0||ge.focus()}),onUnmountAutoFocus:a},c.createElement(oS,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:p,onInteractOutside:h,onDismiss:m},c.createElement(eS,Xe({asChild:!0},S,{dir:E.dir,orientation:"vertical",loop:n,currentTabStopId:k,onCurrentTabStopIdChange:P,onEntryFocus:ft(l,se=>{E.isUsingKeyboardRef.current||se.preventDefault()})}),c.createElement(AS,Xe({role:"menu","aria-orientation":"vertical","data-state":t$(w.open),"data-radix-menu-content":"",dir:E.dir},_,y,{ref:T,style:{outline:"none",...y.style},onKeyDown:ft(y.onKeyDown,se=>{const le=se.target.closest("[data-radix-menu-content]")===se.currentTarget,V=se.ctrlKey||se.altKey||se.metaKey,J=se.key.length===1;le&&(se.key==="Tab"&&se.preventDefault(),!V&&J&&oe(se.key));const re=C.current;if(se.target!==re||!kS.includes(se.key))return;se.preventDefault();const H=$().filter(G=>!G.disabled).map(G=>G.ref.current);ug.includes(se.key)&&H.reverse(),r$(H)}),onBlur:ft(e.onBlur,se=>{se.currentTarget.contains(se.target)||(window.clearTimeout(D.current),j.current="")}),onPointerMove:ft(e.onPointerMove,Ic(se=>{const ge=se.target,le=Y.current!==se.clientX;if(se.currentTarget.contains(ge)&&le){const V=se.clientX>Y.current?"right":"left";Z.current=V,Y.current=se.clientX}}))})))))))}),GS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Je.div,Xe({role:"group"},n,{ref:t}))}),KS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Je.div,Xe({},n,{ref:t}))}),Tc="MenuItem",mg="menu.itemSelect",vg=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...i}=e,o=c.useRef(null),a=Oc(Tc,e.__scopeMenu),s=hg(Tc,e.__scopeMenu),l=rr(t,o),u=c.useRef(!1),d=()=>{const p=o.current;if(!r&&p){const h=new CustomEvent(mg,{bubbles:!0,cancelable:!0});p.addEventListener(mg,m=>n==null?void 0:n(m),{once:!0}),np(p,h),h.defaultPrevented?u.current=!1:a.onClose()}};return c.createElement(qS,Xe({},i,{ref:l,disabled:r,onClick:ft(e.onClick,d),onPointerDown:p=>{var h;(h=e.onPointerDown)===null||h===void 0||h.call(e,p),u.current=!0},onPointerUp:ft(e.onPointerUp,p=>{var h;u.current||(h=p.currentTarget)===null||h===void 0||h.click()}),onKeyDown:ft(e.onKeyDown,p=>{const h=s.searchRef.current!=="";r||h&&p.key===" "||IS.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})}))}),qS=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:i,...o}=e,a=hg(Tc,r),s=dg(r),l=c.useRef(null),u=rr(t,l),[d,p]=c.useState(!1),[h,m]=c.useState("");return c.useEffect(()=>{const v=l.current;if(v){var y;m(((y=v.textContent)!==null&&y!==void 0?y:"").trim())}},[o.children]),c.createElement(Ac.ItemSlot,{scope:r,disabled:n,textValue:i??h},c.createElement(tS,Xe({asChild:!0},s,{focusable:!n}),c.createElement(Je.div,Xe({role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},o,{ref:u,onPointerMove:ft(e.onPointerMove,Ic(v=>{n?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:ft(e.onPointerLeave,Ic(v=>a.onItemLeave(v))),onFocus:ft(e.onFocus,()=>p(!0)),onBlur:ft(e.onBlur,()=>p(!1))}))))}),YS=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...i}=e;return c.createElement(JS,{scope:e.__scopeMenu,checked:r},c.createElement(vg,Xe({role:"menuitemcheckbox","aria-checked":ts(r)?"mixed":r},i,{ref:t,"data-state":bg(r),onSelect:ft(i.onSelect,()=>n==null?void 0:n(ts(r)?!0:!r),{checkForDefaultPrevented:!1})})))});Un("MenuRadioGroup",{value:void 0,onValueChange:()=>{}});const yg="MenuItemIndicator",[JS,XS]=Un(yg,{checked:!1}),ZS=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...i}=e,o=XS(yg,r);return c.createElement(Xa,{present:n||ts(o.checked)||o.checked===!0},c.createElement(Je.span,Xe({},i,{ref:t,"data-state":bg(o.checked)})))}),QS=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Je.div,Xe({role:"separator","aria-orientation":"horizontal"},n,{ref:t}))}),e$=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,i=es(r);return c.createElement(OS,Xe({},i,n,{ref:t}))});Un("MenuSub");function t$(e){return e?"open":"closed"}function ts(e){return e==="indeterminate"}function bg(e){return ts(e)?"indeterminate":e?"checked":"unchecked"}function r$(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function n$(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function i$(e,t,r){const i=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,o=r?e.indexOf(r):-1;let a=n$(e,Math.max(o,0));i.length===1&&(a=a.filter(u=>u!==r));const l=a.find(u=>u.toLowerCase().startsWith(i.toLowerCase()));return l!==r?l:void 0}function o$(e,t){const{x:r,y:n}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,l=t[o].y,u=t[a].x,d=t[a].y;l>n!=d>n&&r<(u-s)*(n-l)/(d-l)+s&&(i=!i)}return i}function a$(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return o$(r,t)}function Ic(e){return t=>t.pointerType==="mouse"?e(t):void 0}const s$=FS,l$=BS,c$=US,u$=zS,f$=GS,d$=KS,p$=vg,h$=YS,g$=ZS,m$=QS,v$=e$,wg="DropdownMenu",[y$,IB]=kr(wg,[fg]),br=fg(),[b$,Eg]=y$(wg),w$=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,l=br(t),u=c.useRef(null),[d=!1,p]=Kr({prop:i,defaultProp:o,onChange:a});return c.createElement(b$,{scope:t,triggerId:hc(),triggerRef:u,contentId:hc(),open:d,onOpenChange:p,onOpenToggle:c.useCallback(()=>p(h=>!h),[p]),modal:s},c.createElement(s$,De({},l,{open:d,onOpenChange:p,dir:n,modal:s}),r))},E$="DropdownMenuTrigger",_$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...i}=e,o=Eg(E$,r),a=br(r);return c.createElement(l$,De({asChild:!0},a),c.createElement(Je.button,De({type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":n?"":void 0,disabled:n},i,{ref:Wl(t,o.triggerRef),onPointerDown:ft(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:ft(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})))}),x$=e=>{const{__scopeDropdownMenu:t,...r}=e,n=br(t);return c.createElement(c$,De({},n,r))},S$="DropdownMenuContent",$$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=Eg(S$,r),o=br(r),a=c.useRef(!1);return c.createElement(u$,De({id:i.contentId,"aria-labelledby":i.triggerId},o,n,{ref:t,onCloseAutoFocus:ft(e.onCloseAutoFocus,s=>{var l;a.current||(l=i.triggerRef.current)===null||l===void 0||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:ft(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!i.modal||d)&&(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)"}}))}),C$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=br(r);return c.createElement(f$,De({},i,n,{ref:t}))}),A$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=br(r);return c.createElement(d$,De({},i,n,{ref:t}))}),O$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=br(r);return c.createElement(p$,De({},i,n,{ref:t}))}),T$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=br(r);return c.createElement(h$,De({},i,n,{ref:t}))}),I$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=br(r);return c.createElement(g$,De({},i,n,{ref:t}))}),P$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=br(r);return c.createElement(m$,De({},i,n,{ref:t}))}),k$=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,i=br(r);return c.createElement(v$,De({},i,n,{ref:t}))}),N$=_$,D$=x$,L$=$$,M$=C$,F$=A$,B$=O$,j$=T$,R$=I$,U$=P$,W$=k$;function z$(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 _g(e){const[t,r]=c.useState(void 0);return Pr(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.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 xg="Checkbox",[H$,PB]=hn(xg),[V$,G$]=H$(xg),K$=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:i,defaultChecked:o,required:a,disabled:s,value:l="on",onCheckedChange:u,...d}=e,[p,h]=c.useState(null),m=Tt(t,S=>h(S)),v=c.useRef(!1),y=p?!!p.closest("form"):!0,[w=!1,E]=Da({prop:i,defaultProp:o,onChange:u}),_=c.useRef(w);return c.useEffect(()=>{const S=p==null?void 0:p.form;if(S){const $=()=>E(_.current);return S.addEventListener("reset",$),()=>S.removeEventListener("reset",$)}},[p,E]),c.createElement(V$,{scope:r,state:w,disabled:s},c.createElement(ht.button,ut({type:"button",role:"checkbox","aria-checked":Wn(w)?"mixed":w,"aria-required":a,"data-state":Sg(w),"data-disabled":s?"":void 0,disabled:s,value:l},d,{ref:m,onKeyDown:mt(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:mt(e.onClick,S=>{E($=>Wn($)?!0:!$),y&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})})),y&&c.createElement(J$,{control:p,bubbles:!v.current,name:n,value:l,checked:w,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),q$="CheckboxIndicator",Y$=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...i}=e,o=G$(q$,r);return c.createElement(ar,{present:n||Wn(o.state)||o.state===!0},c.createElement(ht.span,ut({"data-state":Sg(o.state),"data-disabled":o.disabled?"":void 0},i,{ref:t,style:{pointerEvents:"none",...e.style}})))}),J$=e=>{const{control:t,checked:r,bubbles:n=!0,...i}=e,o=c.useRef(null),a=z$(r),s=_g(t);return c.useEffect(()=>{const l=o.current,u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&p){const h=new Event("click",{bubbles:n});l.indeterminate=Wn(r),p.call(l,Wn(r)?!1:r),l.dispatchEvent(h)}},[a,r,n]),c.createElement("input",ut({type:"checkbox","aria-hidden":!0,defaultChecked:Wn(r)?!1:r},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Wn(e){return e==="indeterminate"}function Sg(e){return Wn(e)?"indeterminate":e?"checked":"unchecked"}const X$=K$,Z$=Y$;function Q$(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 $g="Switch",[eC,kB]=kr($g),[tC,rC]=eC($g),nC=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:i,defaultChecked:o,required:a,disabled:s,value:l="on",onCheckedChange:u,...d}=e,[p,h]=c.useState(null),m=rr(t,_=>h(_)),v=c.useRef(!1),y=p?!!p.closest("form"):!0,[w=!1,E]=Kr({prop:i,defaultProp:o,onChange:u});return c.createElement(tC,{scope:r,checked:w,disabled:s},c.createElement(Je.button,De({type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":Cg(w),"data-disabled":s?"":void 0,disabled:s,value:l},d,{ref:m,onClick:ft(e.onClick,_=>{E(S=>!S),y&&(v.current=_.isPropagationStopped(),v.current||_.stopPropagation())})})),y&&c.createElement(aC,{control:p,bubbles:!v.current,name:n,value:l,checked:w,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),iC="SwitchThumb",oC=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,i=rC(iC,r);return c.createElement(Je.span,De({"data-state":Cg(i.checked),"data-disabled":i.disabled?"":void 0},n,{ref:t}))}),aC=e=>{const{control:t,checked:r,bubbles:n=!0,...i}=e,o=c.useRef(null),a=Q$(r),s=Hh(t);return c.useEffect(()=>{const l=o.current,u=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&p){const h=new Event("click",{bubbles:n});p.call(l,r),l.dispatchEvent(h)}},[a,r,n]),c.createElement("input",De({type:"checkbox","aria-hidden":!0,defaultChecked:r},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Cg(e){return e?"checked":"unchecked"}const sC=nC,lC=oC;/*! *****************************************************************************
44
+ Copyright (c) Microsoft Corporation.
45
+
46
+ Permission to use, copy, modify, and/or distribute this software for any
47
+ purpose with or without fee is hereby granted.
48
+
49
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
50
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
51
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
52
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
53
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
54
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
55
+ PERFORMANCE OF THIS SOFTWARE.
56
+ ***************************************************************************** */function Ag(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var cC=function(e){var t,r=e.current,n=e.previous,i=e.value;if(r[0]!==r[1]||typeof r[0]!="number"||typeof r[1]!="number")return null;var o=r[0],a=r[1];return o>0&&n[0]===o&&n[1]===o+1?[o-1,a]:!((t=i[o])===null||t===void 0)&&t.length?[o,a+1]:null},Pc=function(e){return[+e.selectionStart,+e.selectionEnd]},Og=[0,0],rs=function(e,t){return e[0]===t[0]&&e[1]===t[1]},uC=function(e){var t=e.inputRef,r=e.previousRef,n=e.setSelection;return c.useCallback(function(i){var o=i.type,a=t.current,s=r.current;if(!(!s||!a)){var l=a.selectionDirection,u=a.value,d=Pc(a),p=function(h){rs(h,s)&&(rs(h,Og)||rs(h,Pc(a)))||(r.current=h,n(function(m){return rs(m,h)?m:h}),a.setSelectionRange.apply(a,Ag(Ag([],h,!1),[l||void 0],!1)))};if(o==="selectionchange"&&document.activeElement!==a)return p([u.length,u.length]);p(cC({previous:s,current:d,direction:l,value:u})||d)}},[t,r,n])},fC=function(e){var t=e.inputRef,r=e.previousRef,n=e.handler;c.useLayoutEffect(function(){var i=t.current;r.current===void 0&&i&&(r.current=Pc(i));var o=n;return i==null||i.addEventListener("input",o),document.addEventListener("selectionchange",o),function(){i==null||i.removeEventListener("input",o),document.removeEventListener("selectionchange",o)}},[t,n,r])},dC=function(e){var t=c.useState(Og),r=t[0],n=t[1],i=c.useRef(),o=uC({inputRef:e,previousRef:i,setSelection:n});return fC({inputRef:e,previousRef:i,handler:o}),r},kc={exports:{}},Po={};/**
57
+ * @license React
58
+ * react-jsx-runtime.production.min.js
59
+ *
60
+ * Copyright (c) Facebook, Inc. and its affiliates.
61
+ *
62
+ * This source code is licensed under the MIT license found in the
63
+ * LICENSE file in the root directory of this source tree.
64
+ */var Tg;function pC(){if(Tg)return Po;Tg=1;var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,u){var d,p={},h=null,m=null;u!==void 0&&(h=""+u),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(m=l.ref);for(d in l)n.call(l,d)&&!o.hasOwnProperty(d)&&(p[d]=l[d]);if(s&&s.defaultProps)for(d in l=s.defaultProps,l)p[d]===void 0&&(p[d]=l[d]);return{$$typeof:t,type:s,key:h,ref:m,props:p,_owner:i.current}}return Po.Fragment=r,Po.jsx=a,Po.jsxs=a,Po}var ko={};/**
65
+ * @license React
66
+ * react-jsx-runtime.development.js
67
+ *
68
+ * Copyright (c) Facebook, Inc. and its affiliates.
69
+ *
70
+ * This source code is licensed under the MIT license found in the
71
+ * LICENSE file in the root directory of this source tree.
72
+ */var Ig;function hC(){return Ig||(Ig=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"),i=Symbol.for("react.strict_mode"),o=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"),d=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),v=Symbol.iterator,y="@@iterator";function w(q){if(q===null||typeof q!="object")return null;var fe=v&&q[v]||q[y];return typeof fe=="function"?fe:null}var E=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(q){{for(var fe=arguments.length,Ee=new Array(fe>1?fe-1:0),Ne=1;Ne<fe;Ne++)Ee[Ne-1]=arguments[Ne];S("error",q,Ee)}}function S(q,fe,Ee){{var Ne=E.ReactDebugCurrentFrame,Qe=Ne.getStackAddendum();Qe!==""&&(fe+="%s",Ee=Ee.concat([Qe]));var We=Ee.map(function(Ve){return String(Ve)});We.unshift("Warning: "+fe),Function.prototype.apply.call(console[q],console,We)}}var $=!1,k=!1,P=!1,C=!1,T=!1,D;D=Symbol.for("react.module.reference");function j(q){return!!(typeof q=="string"||typeof q=="function"||q===n||q===o||T||q===i||q===u||q===d||C||q===m||$||k||P||typeof q=="object"&&q!==null&&(q.$$typeof===h||q.$$typeof===p||q.$$typeof===a||q.$$typeof===s||q.$$typeof===l||q.$$typeof===D||q.getModuleId!==void 0))}function F(q,fe,Ee){var Ne=q.displayName;if(Ne)return Ne;var Qe=fe.displayName||fe.name||"";return Qe!==""?Ee+"("+Qe+")":Ee}function M(q){return q.displayName||"Context"}function Z(q){if(q==null)return null;if(typeof q.tag=="number"&&_("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof q=="function")return q.displayName||q.name||null;if(typeof q=="string")return q;switch(q){case n:return"Fragment";case r:return"Portal";case o:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case d:return"SuspenseList"}if(typeof q=="object")switch(q.$$typeof){case s:var fe=q;return M(fe)+".Consumer";case a:var Ee=q;return M(Ee._context)+".Provider";case l:return F(q,q.render,"ForwardRef");case p:var Ne=q.displayName||null;return Ne!==null?Ne:Z(q.type)||"Memo";case h:{var Qe=q,We=Qe._payload,Ve=Qe._init;try{return Z(Ve(We))}catch{return null}}}return null}var Y=Object.assign,X=0,ne,oe,ce,se,ge,le,V;function J(){}J.__reactDisabledLog=!0;function re(){{if(X===0){ne=console.log,oe=console.info,ce=console.warn,se=console.error,ge=console.group,le=console.groupCollapsed,V=console.groupEnd;var q={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:q,log:q,warn:q,error:q,group:q,groupCollapsed:q,groupEnd:q})}X++}}function de(){{if(X--,X===0){var q={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Y({},q,{value:ne}),info:Y({},q,{value:oe}),warn:Y({},q,{value:ce}),error:Y({},q,{value:se}),group:Y({},q,{value:ge}),groupCollapsed:Y({},q,{value:le}),groupEnd:Y({},q,{value:V})})}X<0&&_("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var H=E.ReactCurrentDispatcher,G;function B(q,fe,Ee){{if(G===void 0)try{throw Error()}catch(Qe){var Ne=Qe.stack.trim().match(/\n( *(at )?)/);G=Ne&&Ne[1]||""}return`
73
+ `+G+q}}var z=!1,K;{var I=typeof WeakMap=="function"?WeakMap:Map;K=new I}function N(q,fe){if(!q||z)return"";{var Ee=K.get(q);if(Ee!==void 0)return Ee}var Ne;z=!0;var Qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var We;We=H.current,H.current=null,re();try{if(fe){var Ve=function(){throw Error()};if(Object.defineProperty(Ve.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ve,[])}catch(Nt){Ne=Nt}Reflect.construct(q,[],Ve)}else{try{Ve.call()}catch(Nt){Ne=Nt}q.call(Ve.prototype)}}else{try{throw Error()}catch(Nt){Ne=Nt}q()}}catch(Nt){if(Nt&&Ne&&typeof Nt.stack=="string"){for(var ze=Nt.stack.split(`
74
+ `),kt=Ne.stack.split(`
75
+ `),wt=ze.length-1,Et=kt.length-1;wt>=1&&Et>=0&&ze[wt]!==kt[Et];)Et--;for(;wt>=1&&Et>=0;wt--,Et--)if(ze[wt]!==kt[Et]){if(wt!==1||Et!==1)do if(wt--,Et--,Et<0||ze[wt]!==kt[Et]){var Ht=`
76
+ `+ze[wt].replace(" at new "," at ");return q.displayName&&Ht.includes("<anonymous>")&&(Ht=Ht.replace("<anonymous>",q.displayName)),typeof q=="function"&&K.set(q,Ht),Ht}while(wt>=1&&Et>=0);break}}}finally{z=!1,H.current=We,de(),Error.prepareStackTrace=Qe}var tr=q?q.displayName||q.name:"",uo=tr?B(tr):"";return typeof q=="function"&&K.set(q,uo),uo}function Q(q,fe,Ee){return N(q,!1)}function ie(q){var fe=q.prototype;return!!(fe&&fe.isReactComponent)}function pe(q,fe,Ee){if(q==null)return"";if(typeof q=="function")return N(q,ie(q));if(typeof q=="string")return B(q);switch(q){case u:return B("Suspense");case d:return B("SuspenseList")}if(typeof q=="object")switch(q.$$typeof){case l:return Q(q.render);case p:return pe(q.type,fe,Ee);case h:{var Ne=q,Qe=Ne._payload,We=Ne._init;try{return pe(We(Qe),fe,Ee)}catch{}}}return""}var ye=Object.prototype.hasOwnProperty,_e={},xe=E.ReactDebugCurrentFrame;function ae(q){if(q){var fe=q._owner,Ee=pe(q.type,q._source,fe?fe.type:null);xe.setExtraStackFrame(Ee)}else xe.setExtraStackFrame(null)}function Me(q,fe,Ee,Ne,Qe){{var We=Function.call.bind(ye);for(var Ve in q)if(We(q,Ve)){var ze=void 0;try{if(typeof q[Ve]!="function"){var kt=Error((Ne||"React class")+": "+Ee+" type `"+Ve+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof q[Ve]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw kt.name="Invariant Violation",kt}ze=q[Ve](fe,Ve,Ne,Ee,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(wt){ze=wt}ze&&!(ze instanceof Error)&&(ae(Qe),_("%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).",Ne||"React class",Ee,Ve,typeof ze),ae(null)),ze instanceof Error&&!(ze.message in _e)&&(_e[ze.message]=!0,ae(Qe),_("Failed %s type: %s",Ee,ze.message),ae(null))}}}var at=Array.isArray;function Oe(q){return at(q)}function Re(q){{var fe=typeof Symbol=="function"&&Symbol.toStringTag,Ee=fe&&q[Symbol.toStringTag]||q.constructor.name||"Object";return Ee}}function gt(q){try{return Se(q),!1}catch{return!0}}function Se(q){return""+q}function je(q){if(gt(q))return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Re(q)),Se(q)}var b=E.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0},g,x,O;O={};function L(q){if(ye.call(q,"ref")){var fe=Object.getOwnPropertyDescriptor(q,"ref").get;if(fe&&fe.isReactWarning)return!1}return q.ref!==void 0}function W(q){if(ye.call(q,"key")){var fe=Object.getOwnPropertyDescriptor(q,"key").get;if(fe&&fe.isReactWarning)return!1}return q.key!==void 0}function me(q,fe){if(typeof q.ref=="string"&&b.current&&fe&&b.current.stateNode!==fe){var Ee=Z(b.current.type);O[Ee]||(_('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',Z(b.current.type),q.ref),O[Ee]=!0)}}function ke(q,fe){{var Ee=function(){g||(g=!0,_("%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))};Ee.isReactWarning=!0,Object.defineProperty(q,"key",{get:Ee,configurable:!0})}}function $e(q,fe){{var Ee=function(){x||(x=!0,_("%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))};Ee.isReactWarning=!0,Object.defineProperty(q,"ref",{get:Ee,configurable:!0})}}var Ie=function(q,fe,Ee,Ne,Qe,We,Ve){var ze={$$typeof:t,type:q,key:fe,ref:Ee,props:Ve,_owner:We};return ze._store={},Object.defineProperty(ze._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ze,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ne}),Object.defineProperty(ze,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.freeze&&(Object.freeze(ze.props),Object.freeze(ze)),ze};function Ae(q,fe,Ee,Ne,Qe){{var We,Ve={},ze=null,kt=null;Ee!==void 0&&(je(Ee),ze=""+Ee),W(fe)&&(je(fe.key),ze=""+fe.key),L(fe)&&(kt=fe.ref,me(fe,Qe));for(We in fe)ye.call(fe,We)&&!f.hasOwnProperty(We)&&(Ve[We]=fe[We]);if(q&&q.defaultProps){var wt=q.defaultProps;for(We in wt)Ve[We]===void 0&&(Ve[We]=wt[We])}if(ze||kt){var Et=typeof q=="function"?q.displayName||q.name||"Unknown":q;ze&&ke(Ve,Et),kt&&$e(Ve,Et)}return Ie(q,ze,kt,Qe,Ne,b.current,Ve)}}var nn=E.ReactCurrentOwner,oo=E.ReactDebugCurrentFrame;function pr(q){if(q){var fe=q._owner,Ee=pe(q.type,q._source,fe?fe.type:null);oo.setExtraStackFrame(Ee)}else oo.setExtraStackFrame(null)}var Xt;Xt=!1;function si(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function Lt(){{if(nn.current){var q=Z(nn.current.type);if(q)return`
77
+
78
+ Check the render method of \``+q+"`."}return""}}function ga(q){{if(q!==void 0){var fe=q.fileName.replace(/^.*[\\\/]/,""),Ee=q.lineNumber;return`
79
+
80
+ Check your code at `+fe+":"+Ee+"."}return""}}var ao={};function ma(q){{var fe=Lt();if(!fe){var Ee=typeof q=="string"?q:q.displayName||q.name;Ee&&(fe=`
81
+
82
+ Check the top-level render call using <`+Ee+">.")}return fe}}function so(q,fe){{if(!q._store||q._store.validated||q.key!=null)return;q._store.validated=!0;var Ee=ma(fe);if(ao[Ee])return;ao[Ee]=!0;var Ne="";q&&q._owner&&q._owner!==nn.current&&(Ne=" It was passed a child from "+Z(q._owner.type)+"."),pr(q),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Ee,Ne),pr(null)}}function lo(q,fe){{if(typeof q!="object")return;if(Oe(q))for(var Ee=0;Ee<q.length;Ee++){var Ne=q[Ee];si(Ne)&&so(Ne,fe)}else if(si(q))q._store&&(q._store.validated=!0);else if(q){var Qe=w(q);if(typeof Qe=="function"&&Qe!==q.entries)for(var We=Qe.call(q),Ve;!(Ve=We.next()).done;)si(Ve.value)&&so(Ve.value,fe)}}}function Ot(q){{var fe=q.type;if(fe==null||typeof fe=="string")return;var Ee;if(typeof fe=="function")Ee=fe.propTypes;else if(typeof fe=="object"&&(fe.$$typeof===l||fe.$$typeof===p))Ee=fe.propTypes;else return;if(Ee){var Ne=Z(fe);Me(Ee,q.props,"prop",Ne,q)}else if(fe.PropTypes!==void 0&&!Xt){Xt=!0;var Qe=Z(fe);_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof fe.getDefaultProps=="function"&&!fe.getDefaultProps.isReactClassApproved&&_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function va(q){{for(var fe=Object.keys(q.props),Ee=0;Ee<fe.length;Ee++){var Ne=fe[Ee];if(Ne!=="children"&&Ne!=="key"){pr(q),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ne),pr(null);break}}q.ref!==null&&(pr(q),_("Invalid attribute `ref` supplied to `React.Fragment`."),pr(null))}}function co(q,fe,Ee,Ne,Qe,We){{var Ve=j(q);if(!Ve){var ze="";(q===void 0||typeof q=="object"&&q!==null&&Object.keys(q).length===0)&&(ze+=" 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 kt=ga(Qe);kt?ze+=kt:ze+=Lt();var wt;q===null?wt="null":Oe(q)?wt="array":q!==void 0&&q.$$typeof===t?(wt="<"+(Z(q.type)||"Unknown")+" />",ze=" Did you accidentally export a JSX literal instead of a component?"):wt=typeof q,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",wt,ze)}var Et=Ae(q,fe,Ee,Qe,We);if(Et==null)return Et;if(Ve){var Ht=fe.children;if(Ht!==void 0)if(Ne)if(Oe(Ht)){for(var tr=0;tr<Ht.length;tr++)lo(Ht[tr],q);Object.freeze&&Object.freeze(Ht)}else _("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 lo(Ht,q)}return q===n?va(Et):Ot(Et),Et}}function ya(q,fe,Ee){return co(q,fe,Ee,!0)}function ba(q,fe,Ee){return co(q,fe,Ee,!1)}var wa=ba,Zt=ya;ko.Fragment=n,ko.jsx=wa,ko.jsxs=Zt}()),ko}process.env.NODE_ENV==="production"?kc.exports=pC():kc.exports=hC();var ir=kc.exports;const Pg=c.createContext(6),kg=()=>c.useContext(Pg),Ng=c.createContext(null),gC=()=>c.useContext(Ng),mC=e=>ir.jsx(Pg.Provider,{value:e.length,children:ir.jsx(Ng.Provider,{value:e.selection,children:e.children})}),vC=(e,[t,r])=>typeof t!="number"||typeof r!="number"?null:t===r&&t===e?"cursor":e>=t&&e<r?"selected":null,yC=(e,[t,r])=>e<t?-1:e>=r?1:0,bC=(e,t)=>Array(e).fill(null).map((n,i)=>({state:vC(i,t),position:yC(i,t)})),wC=e=>ir.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}}),EC=e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.scrollTop=0,e.currentTarget.scrollLeft=0},_C=e=>ir.jsx("div",{...e,onScroll:EC,style:{...e.style,height:"100%",overflow:"hidden"}}),xC=c.forwardRef((e,t)=>{const r=kg();return ir.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"}})}),SC=e=>{const t=gC(),r=kg(),n=t,o=bC(r,n).map(({state:a,position:s},l)=>e.children({index:l,state:a,position:s,selection:n}));return ir.jsx(ir.Fragment,{children:o})},$C=({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:i="0.25rem",paddingY:o=i,paddingX:a=i,spacing:s="0.5rem",characterWidth:l="1ch",style:u,className:d,inputClassName:p,inputStyle:h,segmentWidth:m=`calc(${l} + ${a} * 2)`,inputWidth:v=`calc(100% + ${m} + ${s})`,inputRef:y,scrollWrapperClassName:w,segmentWrapperClassName:E,rootProps:_,...S})=>{const $=dC(y),k={...u,position:"relative",width:`calc(${m} * ${t} + ${s} * ${t-1})`,fontFamily:r,fontSize:n,textIndent:a,letterSpacing:`calc(${a} * 2 + ${s})`,lineHeight:`calc(${n} + ${o} * 2)`,zIndex:0},P={className:p,style:h,ref:y};return ir.jsx(mC,{length:t,selection:$,children:ir.jsxs("div",{..._,className:d,style:k,children:[ir.jsx(wC,{className:E,children:ir.jsx(SC,{children:e})}),ir.jsx(_C,{className:w,onMouseDownCapture:C=>{var M,Z;if(C.button!==0||C.ctrlKey||C.shiftKey||C.metaKey||!(C.currentTarget instanceof HTMLElement)||!(y.current instanceof HTMLInputElement))return;C.stopPropagation(),C.preventDefault();const{left:T,width:D}=C.currentTarget.getBoundingClientRect(),j=C.clientX-T,F=Math.floor(j/D*t);document.activeElement!==y.current&&((M=y.current)==null||M.focus()),(Z=y.current)==null||Z.setSelectionRange(F,F+1)},onDoubleClickCapture:()=>{var C;(C=y.current)==null||C.setSelectionRange(0,t)},children:ir.jsx(xC,{width:v,...S,...P})})]})})},CC=e=>`calc(1ch + ${e} * 2)`;var Ut="Input",[AC,NB]=kr(Ut,[]),[OC,or]=AC(Ut),Dg=({__inputScope:e,id:t,descriptionId:r,errorMessageId:n,validationValence:i="neutral",children:o})=>{const a=St("input",t),s=St("input__description",r),l=St("input__error-message",n);return c.createElement(OC,{id:a,descriptionId:s,errorMessageId:l,validationValence:i,scope:e},o)};Dg.displayName=Ut;var TC=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},i)=>{const{id:o}=or(Ut,e),a=t?Ct:Je.label;return c.createElement(a,{...n,htmlFor:o,ref:i},r)}),IC=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},i)=>{const{descriptionId:o,validationValence:a}=or(Ut,e),s=t?Ct:Je.span;return c.createElement(s,{...n,...a==="error"&&{id:o},ref:i},r)}),PC=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},i)=>{const{errorMessageId:o}=or(Ut,e),a=t?Ct:Je.span;return c.createElement(a,{...n,id:o,ref:i},r)}),kC=c.forwardRef((e,t)=>{const{__inputScope:r,asChild:n,children:i,...o}=e,{validationValence:a}=or(Ut,r);if(a==="error")return c.createElement(PC,{...e,ref:t});{const s=n?Ct:Je.span;return c.createElement(s,{...o,ref:t},i)}}),NC=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},i)=>{const{descriptionId:o,validationValence:a}=or(Ut,e),s=t?Ct:Je.p;return c.createElement(s,{...n,...a!=="error"&&{id:o},ref:i},r)}),DC=c.forwardRef(({__inputScope:e,segmentClassName:t,inputClassName:r,segmentPadding:n="13px",segmentHeight:i="100%",...o},a)=>{const{id:s,validationValence:l,descriptionId:u,errorMessageId:d}=or(Ut,e),p=CC(n),h=Rl(a),m=Fw(h),v=c.useCallback(({state:y,index:w})=>c.createElement("div",{key:w,className:t==null?void 0:t({focused:!!(m&&y),validationValence:l}),"data-state":y,style:{width:p,height:i}}),[t,m,l]);return c.createElement($C,{padding:"8px",spacing:"8px",fontFamily:"",spellCheck:!1,length:6,...o,id:s,"aria-describedby":u,...l==="error"&&{"aria-invalid":"true","aria-errormessage":d},inputRef:h,renderSegment:v,className:r})}),LC=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:i,descriptionId:o,errorMessageId:a}=or(Ut,e);return c.createElement(Je.input,{...t,id:n,"aria-describedby":o,...i==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})}),MC=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:i,descriptionId:o,errorMessageId:a}=or(Ut,e);return c.createElement("textarea",{...t,id:n,"aria-describedby":o,...i==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})});const Lg="Collapsible",[FC,DB]=hn(Lg),[BC,Nc]=FC(Lg),jC=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,u]=Da({prop:n,defaultProp:i,onChange:a});return c.createElement(BC,{scope:r,disabled:o,contentId:$o(),open:l,onOpenToggle:c.useCallback(()=>u(d=>!d),[u])},c.createElement(ht.div,ut({"data-state":Dc(l),"data-disabled":o?"":void 0},s,{ref:t})))}),RC="CollapsibleTrigger",UC=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,i=Nc(RC,r);return c.createElement(ht.button,ut({type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Dc(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled},n,{ref:t,onClick:mt(e.onClick,i.onOpenToggle)}))}),Mg="CollapsibleContent",WC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=Nc(Mg,e.__scopeCollapsible);return c.createElement(ar,{present:r||i.open},({present:o})=>c.createElement(zC,ut({},n,{ref:t,present:o})))}),zC=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:i,...o}=e,a=Nc(Mg,r),[s,l]=c.useState(n),u=c.useRef(null),d=Tt(t,u),p=c.useRef(0),h=p.current,m=c.useRef(0),v=m.current,y=a.open||s,w=c.useRef(y),E=c.useRef();return c.useEffect(()=>{const _=requestAnimationFrame(()=>w.current=!1);return()=>cancelAnimationFrame(_)},[]),Pr(()=>{const _=u.current;if(_){E.current=E.current||{transitionDuration:_.style.transitionDuration,animationName:_.style.animationName},_.style.transitionDuration="0s",_.style.animationName="none";const S=_.getBoundingClientRect();p.current=S.height,m.current=S.width,w.current||(_.style.transitionDuration=E.current.transitionDuration,_.style.animationName=E.current.animationName),l(n)}},[a.open,n]),c.createElement(ht.div,ut({"data-state":Dc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},o,{ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style}}),y&&i)});function Dc(e){return e?"open":"closed"}const HC=jC,VC=UC,GC=WC;var ns="List",[KC,LB]=kr(ns,[]),[qC,YC]=KC(ns),Fg=c.forwardRef((e,t)=>{const{__listScope:r,variant:n="ordered",selectable:i=!1,itemSizes:o,children:a,...s}=e,l=n==="ordered"?Je.ol:Je.ul;return c.createElement(l,{...i&&{role:"listbox","aria-multiselectable":!0},...s,ref:t},c.createElement(qC,{scope:r,variant:n,selectable:i,itemSizes:o},a))});Fg.displayName=ns;var No="ListItem",[JC,MB]=kr(No,[]),[XC,Bg]=JC(No),ZC=c.forwardRef(({children:e,asChild:t,__listItemScope:r,...n},i)=>{const{headingId:o}=Bg(No,r),a=t?Ct:Je.div;return c.createElement(a,{...n,id:o,ref:i},e)}),QC=VC,eA=GC,jg=c.forwardRef((e,t)=>{const r=St("listItem",e.id),{__listScope:n,__listItemScope:i,children:o,selected:a,defaultSelected:s,onSelectedChange:l,open:u,defaultOpen:d,onOpenChange:p,collapsible:h,labelId:m,...v}=e,{selectable:y}=YC(ns,n),[w=!1,E]=Kr({prop:a,defaultProp:s,onChange:l}),[_=!1,S]=Kr({prop:u,defaultProp:d,onChange:p}),$=St("listItem__heading",m),k=c.createElement(Je.li,{...v,id:r,ref:t,"aria-labelledby":$,...y&&{role:"option","aria-selected":!!w},..._&&{"aria-expanded":!0}},o);return c.createElement(XC,{scope:i,headingId:$,open:_,selected:w,setSelected:E},h?c.createElement(HC,{asChild:!0,open:_,onOpenChange:S},k):k)});jg.displayName=No;function tA(e,[t,r]){return Math.min(r,Math.max(t,e))}function rA(e,t){return c.useReducer((r,n)=>{const i=t[r][n];return i??r},e)}const Rg="ScrollArea",[Ug,FB]=hn(Rg),[nA,lr]=Ug(Rg),iA=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,l]=c.useState(null),[u,d]=c.useState(null),[p,h]=c.useState(null),[m,v]=c.useState(null),[y,w]=c.useState(null),[E,_]=c.useState(0),[S,$]=c.useState(0),[k,P]=c.useState(!1),[C,T]=c.useState(!1),D=Tt(t,F=>l(F)),j=B_(i);return c.createElement(nA,{scope:r,type:n,dir:j,scrollHideDelay:o,scrollArea:s,viewport:u,onViewportChange:d,content:p,onContentChange:h,scrollbarX:m,onScrollbarXChange:v,scrollbarXEnabled:k,onScrollbarXEnabledChange:P,scrollbarY:y,onScrollbarYChange:w,scrollbarYEnabled:C,onScrollbarYEnabledChange:T,onCornerWidthChange:_,onCornerHeightChange:$},c.createElement(ht.div,ut({dir:j},a,{ref:D,style:{position:"relative","--radix-scroll-area-corner-width":E+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})))}),oA="ScrollAreaViewport",aA=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...i}=e,o=lr(oA,r),a=c.useRef(null),s=Tt(t,a,o.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(ht.div,ut({"data-radix-scroll-area-viewport":""},i,{ref:s,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),c.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),qr="ScrollAreaScrollbar",sA=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=lr(qr,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return c.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?c.createElement(lA,ut({},n,{ref:t,forceMount:r})):i.type==="scroll"?c.createElement(cA,ut({},n,{ref:t,forceMount:r})):i.type==="auto"?c.createElement(Wg,ut({},n,{ref:t,forceMount:r})):i.type==="always"?c.createElement(Lc,ut({},n,{ref:t})):null}),lA=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=lr(qr,e.__scopeScrollArea),[o,a]=c.useState(!1);return c.useEffect(()=>{const s=i.scrollArea;let l=0;if(s){const u=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",d)}}},[i.scrollArea,i.scrollHideDelay]),c.createElement(ar,{present:r||o},c.createElement(Wg,ut({"data-state":o?"visible":"hidden"},n,{ref:t})))}),cA=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=lr(qr,e.__scopeScrollArea),o=e.orientation==="horizontal",a=as(()=>l("SCROLL_END"),100),[s,l]=rA("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"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,i.scrollHideDelay,l]),c.useEffect(()=>{const u=i.viewport,d=o?"scrollLeft":"scrollTop";if(u){let p=u[d];const h=()=>{const m=u[d];p!==m&&(l("SCROLL"),a()),p=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[i.viewport,o,l,a]),c.createElement(ar,{present:r||s!=="hidden"},c.createElement(Lc,ut({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:mt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:mt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),Wg=c.forwardRef((e,t)=>{const r=lr(qr,e.__scopeScrollArea),{forceMount:n,...i}=e,[o,a]=c.useState(!1),s=e.orientation==="horizontal",l=as(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,d=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?u:d)}},10);return Si(r.viewport,l),Si(r.content,l),c.createElement(ar,{present:n||o},c.createElement(Lc,ut({"data-state":o?"visible":"hidden"},i,{ref:t})))}),Lc=c.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,i=lr(qr,e.__scopeScrollArea),o=c.useRef(null),a=c.useRef(0),[s,l]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Gg(s.viewport,s.content),d={...n,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function p(h,m){return vA(h,a.current,s,m)}return r==="horizontal"?c.createElement(uA,ut({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,m=Kg(h,s,i.dir);o.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=p(h,i.dir))}})):r==="vertical"?c.createElement(fA,ut({},d,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,m=Kg(h,s);o.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=p(h))}})):null}),uA=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,o=lr(qr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=Tt(t,l,o.onScrollbarXChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Hg,ut({"data-orientation":"horizontal"},i,{ref:u,sizes:r,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":os(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,p)=>{if(o.viewport){const h=o.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),Yg(h,p)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:is(a.paddingLeft),paddingEnd:is(a.paddingRight)}})}}))}),fA=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...i}=e,o=lr(qr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=Tt(t,l,o.onScrollbarYChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Hg,ut({"data-orientation":"vertical"},i,{ref:u,sizes:r,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":os(r)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,p)=>{if(o.viewport){const h=o.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),Yg(h,p)&&d.preventDefault()}},onResize:()=>{l.current&&o.viewport&&a&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:is(a.paddingTop),paddingEnd:is(a.paddingBottom)}})}}))}),[dA,zg]=Ug(qr),Hg=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:p,...h}=e,m=lr(qr,r),[v,y]=c.useState(null),w=Tt(t,D=>y(D)),E=c.useRef(null),_=c.useRef(""),S=m.viewport,$=n.content-n.viewport,k=Kt(d),P=Kt(l),C=as(p,10);function T(D){if(E.current){const j=D.clientX-E.current.left,F=D.clientY-E.current.top;u({x:j,y:F})}}return c.useEffect(()=>{const D=j=>{const F=j.target;(v==null?void 0:v.contains(F))&&k(j,$)};return document.addEventListener("wheel",D,{passive:!1}),()=>document.removeEventListener("wheel",D,{passive:!1})},[S,v,$,k]),c.useEffect(P,[n,P]),Si(v,C),Si(m.content,C),c.createElement(dA,{scope:r,scrollbar:v,hasThumb:i,onThumbChange:Kt(o),onThumbPointerUp:Kt(a),onThumbPositionChange:P,onThumbPointerDown:Kt(s)},c.createElement(ht.div,ut({},h,{ref:w,style:{position:"absolute",...h.style},onPointerDown:mt(e.onPointerDown,D=>{D.button===0&&(D.target.setPointerCapture(D.pointerId),E.current=v.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",T(D))}),onPointerMove:mt(e.onPointerMove,T),onPointerUp:mt(e.onPointerUp,D=>{const j=D.target;j.hasPointerCapture(D.pointerId)&&j.releasePointerCapture(D.pointerId),document.body.style.webkitUserSelect=_.current,E.current=null})})))}),Mc="ScrollAreaThumb",pA=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,i=zg(Mc,e.__scopeScrollArea);return c.createElement(ar,{present:r||i.hasThumb},c.createElement(hA,ut({ref:t},n)))}),hA=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...i}=e,o=lr(Mc,r),a=zg(Mc,r),{onThumbPositionChange:s}=a,l=Tt(t,p=>a.onThumbChange(p)),u=c.useRef(),d=as(()=>{u.current&&(u.current(),u.current=void 0)},100);return c.useEffect(()=>{const p=o.viewport;if(p){const h=()=>{if(d(),!u.current){const m=yA(p,s);u.current=m,s()}};return s(),p.addEventListener("scroll",h),()=>p.removeEventListener("scroll",h)}},[o.viewport,d,s]),c.createElement(ht.div,ut({"data-state":a.hasThumb?"visible":"hidden"},i,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:mt(e.onPointerDownCapture,p=>{const m=p.target.getBoundingClientRect(),v=p.clientX-m.left,y=p.clientY-m.top;a.onThumbPointerDown({x:v,y})}),onPointerUp:mt(e.onPointerUp,a.onThumbPointerUp)}))}),Vg="ScrollAreaCorner",gA=c.forwardRef((e,t)=>{const r=lr(Vg,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.createElement(mA,ut({},e,{ref:t})):null}),mA=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,i=lr(Vg,r),[o,a]=c.useState(0),[s,l]=c.useState(0),u=!!(o&&s);return Si(i.scrollbarX,()=>{var d;const p=((d=i.scrollbarX)===null||d===void 0?void 0:d.offsetHeight)||0;i.onCornerHeightChange(p),l(p)}),Si(i.scrollbarY,()=>{var d;const p=((d=i.scrollbarY)===null||d===void 0?void 0:d.offsetWidth)||0;i.onCornerWidthChange(p),a(p)}),u?c.createElement(ht.div,ut({},n,{ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function is(e){return e?parseInt(e,10):0}function Gg(e,t){const r=e/t;return isNaN(r)?0:r}function os(e){const t=Gg(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function vA(e,t,r,n="ltr"){const i=os(r),o=i/2,a=t||o,s=i-a,l=r.scrollbar.paddingStart+a,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,d=r.content-r.viewport,p=n==="ltr"?[0,d]:[d*-1,0];return qg([l,u],p)(e)}function Kg(e,t,r="ltr"){const n=os(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-n,l=r==="ltr"?[0,a]:[a*-1,0],u=tA(e,l);return qg([0,a],[0,s])(u)}function qg(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 Yg(e,t){return e>0&&e<t}const yA=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=r.left!==o.left,s=r.top!==o.top;(a||s)&&t(),r=o,n=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(n)};function as(e,t){const r=Kt(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 Si(e,t){const r=Kt(t);Pr(()=>{let n=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return i.observe(e),()=>{window.cancelAnimationFrame(n),i.unobserve(e)}}},[e,r])}const bA=iA,wA=aA,EA=sA,_A=pA,xA=gA;function zn(e){return e.split("-")[0]}function Do(e){return e.split("-")[1]}function $i(e){return["top","bottom"].includes(zn(e))?"x":"y"}function Fc(e){return e==="y"?"height":"width"}function Jg(e,t,r){let{reference:n,floating:i}=e;const o=n.x+n.width/2-i.width/2,a=n.y+n.height/2-i.height/2,s=$i(t),l=Fc(s),u=n[l]/2-i[l]/2,d=s==="x";let p;switch(zn(t)){case"top":p={x:o,y:n.y-i.height};break;case"bottom":p={x:o,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:a};break;case"left":p={x:n.x-i.width,y:a};break;default:p={x:n.x,y:n.y}}switch(Do(t)){case"start":p[s]-=u*(r&&d?-1:1);break;case"end":p[s]+=u*(r&&d?-1:1)}return p}const SA=async(e,t,r)=>{const{placement:n="bottom",strategy:i="absolute",middleware:o=[],platform:a}=r,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Jg(l,n,s),p=n,h={},m=0;for(let v=0;v<o.length;v++){const{name:y,fn:w}=o[v],{x:E,y:_,data:S,reset:$}=await w({x:u,y:d,initialPlacement:n,placement:p,strategy:i,middlewareData:h,rects:l,platform:a,elements:{reference:e,floating:t}});u=E??u,d=_??d,h={...h,[y]:{...h[y],...S}},$&&m<=50&&(m++,typeof $=="object"&&($.placement&&(p=$.placement),$.rects&&(l=$.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):$.rects),{x:u,y:d}=Jg(l,p,s)),v=-1)}return{x:u,y:d,placement:p,strategy:i,middlewareData:h}};function Xg(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 ss(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Lo(e,t){var r;t===void 0&&(t={});const{x:n,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:p="floating",altBoundary:h=!1,padding:m=0}=t,v=Xg(m),y=s[h?p==="floating"?"reference":"floating":p],w=ss(await o.getClippingRect({element:(r=await(o.isElement==null?void 0:o.isElement(y)))==null||r?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:u,rootBoundary:d,strategy:l})),E=ss(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:p==="floating"?{...a.floating,x:n,y:i}:a.reference,offsetParent:await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),strategy:l}):a[p]);return{top:w.top-E.top+v.top,bottom:E.bottom-w.bottom+v.bottom,left:w.left-E.left+v.left,right:E.right-w.right+v.right}}const $A=Math.min,Hn=Math.max;function Bc(e,t,r){return Hn(e,$A(t,r))}const Zg=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e??{},{x:i,y:o,placement:a,rects:s,platform:l}=t;if(r==null)return{};const u=Xg(n),d={x:i,y:o},p=$i(a),h=Do(a),m=Fc(p),v=await l.getDimensions(r),y=p==="y"?"top":"left",w=p==="y"?"bottom":"right",E=s.reference[m]+s.reference[p]-d[p]-s.floating[m],_=d[p]-s.reference[p],S=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let $=S?p==="y"?S.clientHeight||0:S.clientWidth||0:0;$===0&&($=s.floating[m]);const k=E/2-_/2,P=u[y],C=$-v[m]-u[w],T=$/2-v[m]/2+k,D=Bc(P,T,C),j=(h==="start"?u[y]:u[w])>0&&T!==D&&s.reference[m]<=s.floating[m];return{[p]:d[p]-(j?T<P?P-T:C-T:0),data:{[p]:D,centerOffset:T-D}}}}),CA={left:"right",right:"left",bottom:"top",top:"bottom"};function ls(e){return e.replace(/left|right|bottom|top/g,t=>CA[t])}function AA(e,t,r){r===void 0&&(r=!1);const n=Do(e),i=$i(e),o=Fc(i);let a=i==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ls(a)),{main:a,cross:ls(a)}}const OA={start:"end",end:"start"};function Qg(e){return e.replace(/start|end/g,t=>OA[t])}const em=["top","right","bottom","left"];em.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const TA=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:i,rects:o,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",flipAlignment:m=!0,...v}=e,y=zn(n),w=p||(y===a||!m?[ls(a)]:function(T){const D=ls(T);return[Qg(T),D,Qg(D)]}(a)),E=[a,...w],_=await Lo(t,v),S=[];let $=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&S.push(_[y]),d){const{main:T,cross:D}=AA(n,o,await(s.isRTL==null?void 0:s.isRTL(l.floating)));S.push(_[T],_[D])}if($=[...$,{placement:n,overflows:S}],!S.every(T=>T<=0)){var k,P;const T=((k=(P=i.flip)==null?void 0:P.index)!=null?k:0)+1,D=E[T];if(D)return{data:{index:T,overflows:$},reset:{placement:D}};let j="bottom";switch(h){case"bestFit":{var C;const F=(C=$.map(M=>[M,M.overflows.filter(Z=>Z>0).reduce((Z,Y)=>Z+Y,0)]).sort((M,Z)=>M[1]-Z[1])[0])==null?void 0:C[0].placement;F&&(j=F);break}case"initialPlacement":j=a}if(n!==j)return{reset:{placement:j}}}return{}}}};function tm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rm(e){return em.some(t=>e[t]>=0)}const IA=function(e){let{strategy:t="referenceHidden",...r}=e===void 0?{}:e;return{name:"hide",async fn(n){const{rects:i}=n;switch(t){case"referenceHidden":{const o=tm(await Lo(n,{...r,elementContext:"reference"}),i.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:rm(o)}}}case"escaped":{const o=tm(await Lo(n,{...r,altBoundary:!0}),i.floating);return{data:{escapedOffsets:o,escaped:rm(o)}}}default:return{}}}}},PA=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,i=await async function(o,a){const{placement:s,platform:l,elements:u}=o,d=await(l.isRTL==null?void 0:l.isRTL(u.floating)),p=zn(s),h=Do(s),m=$i(s)==="x",v=["left","top"].includes(p)?-1:1,y=d&&m?-1:1,w=typeof a=="function"?a(o):a;let{mainAxis:E,crossAxis:_,alignmentAxis:S}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...w};return h&&typeof S=="number"&&(_=h==="end"?-1*S:S),m?{x:_*y,y:E*v}:{x:E*v,y:_*y}}(t,e);return{x:r+i.x,y:n+i.y,data:i}}}};function nm(e){return e==="x"?"y":"x"}const kA=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:w=>{let{x:E,y:_}=w;return{x:E,y:_}}},...l}=e,u={x:r,y:n},d=await Lo(t,l),p=$i(zn(i)),h=nm(p);let m=u[p],v=u[h];if(o){const w=p==="y"?"bottom":"right";m=Bc(m+d[p==="y"?"top":"left"],m,m-d[w])}if(a){const w=h==="y"?"bottom":"right";v=Bc(v+d[h==="y"?"top":"left"],v,v-d[w])}const y=s.fn({...t,[p]:m,[h]:v});return{...y,data:{x:y.x-r,y:y.y-n}}}}},NA=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,d={x:r,y:n},p=$i(i),h=nm(p);let m=d[p],v=d[h];const y=typeof s=="function"?s({...o,placement:i}):s,w=typeof y=="number"?{mainAxis:y,crossAxis:0}:{mainAxis:0,crossAxis:0,...y};if(l){const k=p==="y"?"height":"width",P=o.reference[p]-o.floating[k]+w.mainAxis,C=o.reference[p]+o.reference[k]-w.mainAxis;m<P?m=P:m>C&&(m=C)}if(u){var E,_,S,$;const k=p==="y"?"width":"height",P=["top","left"].includes(zn(i)),C=o.reference[h]-o.floating[k]+(P&&(E=(_=a.offset)==null?void 0:_[h])!=null?E:0)+(P?0:w.crossAxis),T=o.reference[h]+o.reference[k]+(P?0:(S=($=a.offset)==null?void 0:$[h])!=null?S:0)-(P?w.crossAxis:0);v<C?v=C:v>T&&(v=T)}return{[p]:m,[h]:v}}}},DA=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:i,elements:o}=t,{apply:a,...s}=e,l=await Lo(t,s),u=zn(r),d=Do(r);let p,h;u==="top"||u==="bottom"?(p=u,h=d===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(h=u,p=d==="end"?"top":"bottom");const m=Hn(l.left,0),v=Hn(l.right,0),y=Hn(l.top,0),w=Hn(l.bottom,0),E={availableHeight:n.floating.height-(["left","right"].includes(r)?2*(y!==0||w!==0?y+w:Hn(l.top,l.bottom)):l[p]),availableWidth:n.floating.width-(["top","bottom"].includes(r)?2*(m!==0||v!==0?m+v:Hn(l.left,l.right)):l[h])},_=await i.getDimensions(o.floating);a==null||a({...t,...E});const S=await i.getDimensions(o.floating);return _.width!==S.width||_.height!==S.height?{reset:{rects:!0}}:{}}}};function im(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Yr(e){if(e==null)return window;if(!im(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Mo(e){return Yr(e).getComputedStyle(e)}function Jr(e){return im(e)?"":e?(e.nodeName||"").toLowerCase():""}function om(){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 Yr(e).HTMLElement}function bn(e){return e instanceof Yr(e).Element}function jc(e){return typeof ShadowRoot>"u"?!1:e instanceof Yr(e).ShadowRoot||e instanceof ShadowRoot}function cs(e){const{overflow:t,overflowX:r,overflowY:n}=Mo(e);return/auto|scroll|overlay|hidden/.test(t+n+r)}function LA(e){return["table","td","th"].includes(Jr(e))}function am(e){const t=/firefox/i.test(om()),r=Mo(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 sm(){return!/^((?!chrome|android).)*safari/i.test(om())}const lm=Math.min,Fo=Math.max,us=Math.round;function Xr(e,t,r){var n,i,o,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&&us(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&us(s.height)/e.offsetHeight||1);const d=bn(e)?Yr(e):window,p=!sm()&&r,h=(s.left+(p&&(n=(i=d.visualViewport)==null?void 0:i.offsetLeft)!=null?n:0))/l,m=(s.top+(p&&(o=(a=d.visualViewport)==null?void 0:a.offsetTop)!=null?o:0))/u,v=s.width/l,y=s.height/u;return{width:v,height:y,top:m,right:h+v,bottom:m+y,left:h,x:h,y:m}}function wn(e){return(t=e,(t instanceof Yr(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function fs(e){return bn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function cm(e){return Xr(wn(e)).left+fs(e).scrollLeft}function MA(e,t,r){const n=Lr(t),i=wn(t),o=Xr(e,n&&function(l){const u=Xr(l);return us(u.width)!==l.offsetWidth||us(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"||cs(i))&&(a=fs(t)),Lr(t)){const l=Xr(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else i&&(s.x=cm(i));return{x:o.left+a.scrollLeft-s.x,y:o.top+a.scrollTop-s.y,width:o.width,height:o.height}}function um(e){return Jr(e)==="html"?e:e.assignedSlot||e.parentNode||(jc(e)?e.host:null)||wn(e)}function fm(e){return Lr(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function Rc(e){const t=Yr(e);let r=fm(e);for(;r&&LA(r)&&getComputedStyle(r).position==="static";)r=fm(r);return r&&(Jr(r)==="html"||Jr(r)==="body"&&getComputedStyle(r).position==="static"&&!am(r))?t:r||function(n){let i=um(n);for(jc(i)&&(i=i.host);Lr(i)&&!["html","body"].includes(Jr(i));){if(am(i))return i;i=i.parentNode}return null}(e)||t}function dm(e){if(Lr(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Xr(e);return{width:t.width,height:t.height}}function pm(e){const t=um(e);return["html","body","#document"].includes(Jr(t))?e.ownerDocument.body:Lr(t)&&cs(t)?t:pm(t)}function ds(e,t){var r;t===void 0&&(t=[]);const n=pm(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),o=Yr(n),a=i?[o].concat(o.visualViewport||[],cs(n)?n:[]):n,s=t.concat(a);return i?s:s.concat(ds(a))}function hm(e,t,r){return t==="viewport"?ss(function(n,i){const o=Yr(n),a=wn(n),s=o.visualViewport;let l=a.clientWidth,u=a.clientHeight,d=0,p=0;if(s){l=s.width,u=s.height;const h=sm();(h||!h&&i==="fixed")&&(d=s.offsetLeft,p=s.offsetTop)}return{width:l,height:u,x:d,y:p}}(e,r)):bn(t)?function(n,i){const o=Xr(n,!1,i==="fixed"),a=o.top+n.clientTop,s=o.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):ss(function(n){var i;const o=wn(n),a=fs(n),s=(i=n.ownerDocument)==null?void 0:i.body,l=Fo(o.scrollWidth,o.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=Fo(o.scrollHeight,o.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let d=-a.scrollLeft+cm(n);const p=-a.scrollTop;return Mo(s||o).direction==="rtl"&&(d+=Fo(o.clientWidth,s?s.clientWidth:0)-l),{width:l,height:u,x:d,y:p}}(wn(e)))}function FA(e){const t=ds(e),r=["absolute","fixed"].includes(Mo(e).position)&&Lr(e)?Rc(e):e;return bn(r)?t.filter(n=>bn(n)&&function(i,o){const a=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(a&&jc(a)){let s=o;do{if(s&&i===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(n,r)&&Jr(n)!=="body"):[]}const BA={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:i}=e;const o=[...r==="clippingAncestors"?FA(t):[].concat(r),n],a=o[0],s=o.reduce((l,u)=>{const d=hm(t,u,i);return l.top=Fo(d.top,l.top),l.right=lm(d.right,l.right),l.bottom=lm(d.bottom,l.bottom),l.left=Fo(d.left,l.left),l},hm(t,a,i));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 i=Lr(r),o=wn(r);if(r===o)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((i||!i&&n!=="fixed")&&((Jr(r)!=="body"||cs(o))&&(a=fs(r)),Lr(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:bn,getDimensions:dm,getOffsetParent:Rc,getDocumentElement:wn,getElementRects:e=>{let{reference:t,floating:r,strategy:n}=e;return{reference:MA(t,Rc(r),n),floating:{...dm(r),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Mo(e).direction==="rtl"};function jA(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=i&&!s,u=o&&!s,d=l||u?[...bn(e)?ds(e):[],...ds(t)]:[];d.forEach(v=>{l&&v.addEventListener("scroll",r,{passive:!0}),u&&v.addEventListener("resize",r)});let p,h=null;if(a){let v=!0;h=new ResizeObserver(()=>{v||r(),v=!1}),bn(e)&&!s&&h.observe(e),h.observe(t)}let m=s?Xr(e):null;return s&&function v(){const y=Xr(e);!m||y.x===m.x&&y.y===m.y&&y.width===m.width&&y.height===m.height||r(),m=y,p=requestAnimationFrame(v)}(),r(),()=>{var v;d.forEach(y=>{l&&y.removeEventListener("scroll",r),u&&y.removeEventListener("resize",r)}),(v=h)==null||v.disconnect(),h=null,s&&cancelAnimationFrame(p)}}const RA=(e,t,r)=>SA(e,t,{platform:BA,...r});var Uc=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Wc(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,i;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(!Wc(e[n],t[n]))return!1;return!0}if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;for(n=r;n--!==0;){const o=i[n];if(!(o==="_owner"&&e.$$typeof)&&!Wc(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function UA(e){const t=ve.useRef(e);return Uc(()=>{t.current=e}),t}function WA(e){let{middleware:t,placement:r="bottom",strategy:n="absolute",whileElementsMounted:i}=e===void 0?{}:e;const o=ve.useRef(null),a=ve.useRef(null),s=UA(i),l=ve.useRef(null),[u,d]=ve.useState({x:null,y:null,strategy:n,placement:r,middlewareData:{}}),[p,h]=ve.useState(t);Wc(p==null?void 0:p.map(S=>{let{options:$}=S;return $}),t==null?void 0:t.map(S=>{let{options:$}=S;return $}))||h(t);const m=ve.useCallback(()=>{!o.current||!a.current||RA(o.current,a.current,{middleware:p,placement:r,strategy:n}).then(S=>{v.current&&zd.flushSync(()=>{d(S)})})},[p,r,n]);Uc(()=>{v.current&&m()},[m]);const v=ve.useRef(!1);Uc(()=>(v.current=!0,()=>{v.current=!1}),[]);const y=ve.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),o.current&&a.current)if(s.current){const S=s.current(o.current,a.current,m);l.current=S}else m()},[m,s]),w=ve.useCallback(S=>{o.current=S,y()},[y]),E=ve.useCallback(S=>{a.current=S,y()},[y]),_=ve.useMemo(()=>({reference:o,floating:a}),[]);return ve.useMemo(()=>({...u,update:m,refs:_,reference:w,floating:E}),[u,m,_,w,E])}const zA=e=>{const{element:t,padding:r}=e;function n(i){return Object.prototype.hasOwnProperty.call(i,"current")}return{name:"arrow",options:e,fn(i){return n(t)?t.current!=null?Zg({element:t.current,padding:r}).fn(i):{}:t?Zg({element:t,padding:r}).fn(i):{}}}},HA=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:i=5,...o}=e;return c.createElement(ht.svg,Xe({},o,{ref:t,width:n,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))}),gm="Popper",[zc,mm]=hn(gm),[VA,vm]=zc(gm),GA=e=>{const{__scopePopper:t,children:r}=e,[n,i]=c.useState(null);return c.createElement(VA,{scope:t,anchor:n,onAnchorChange:i},r)},KA="PopperAnchor",qA=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...i}=e,o=vm(KA,r),a=c.useRef(null),s=Tt(t,a);return c.useEffect(()=>{o.onAnchorChange((n==null?void 0:n.current)||a.current)}),n?null:c.createElement(ht.div,Xe({},i,{ref:s}))}),ps="PopperContent",[YA,JA]=zc(ps),[XA,ZA]=zc(ps,{hasParent:!1,positionUpdateFns:new Set}),QA=c.forwardRef((e,t)=>{var r,n,i,o,a,s,l,u;const{__scopePopper:d,side:p="bottom",sideOffset:h=0,align:m="center",alignOffset:v=0,arrowPadding:y=0,collisionBoundary:w=[],collisionPadding:E=0,sticky:_="partial",hideWhenDetached:S=!1,avoidCollisions:$=!0,onPlaced:k,...P}=e,C=vm(ps,d),[T,D]=c.useState(null),j=Tt(t,Oe=>D(Oe)),[F,M]=c.useState(null),Z=_g(F),Y=(r=Z==null?void 0:Z.width)!==null&&r!==void 0?r:0,X=(n=Z==null?void 0:Z.height)!==null&&n!==void 0?n:0,ne=p+(m!=="center"?"-"+m:""),oe=typeof E=="number"?E:{top:0,right:0,bottom:0,left:0,...E},ce=Array.isArray(w)?w:[w],se=ce.length>0,ge={padding:oe,boundary:ce.filter(rO),altBoundary:se},{reference:le,floating:V,strategy:J,x:re,y:de,placement:H,middlewareData:G,update:B}=WA({strategy:"fixed",placement:ne,whileElementsMounted:jA,middleware:[nO(),PA({mainAxis:h+X,alignmentAxis:v}),$?kA({mainAxis:!0,crossAxis:!1,limiter:_==="partial"?NA():void 0,...ge}):void 0,F?zA({element:F,padding:y}):void 0,$?TA({...ge}):void 0,DA({...ge,apply:({elements:Oe,availableWidth:Re,availableHeight:gt})=>{Oe.floating.style.setProperty("--radix-popper-available-width",`${Re}px`),Oe.floating.style.setProperty("--radix-popper-available-height",`${gt}px`)}}),iO({arrowWidth:Y,arrowHeight:X}),S?IA({strategy:"referenceHidden"}):void 0].filter(tO)});Pr(()=>{le(C.anchor)},[le,C.anchor]);const z=re!==null&&de!==null,[K,I]=wm(H),N=Kt(k);Pr(()=>{z&&(N==null||N())},[z,N]);const Q=(i=G.arrow)===null||i===void 0?void 0:i.x,ie=(o=G.arrow)===null||o===void 0?void 0:o.y,pe=((a=G.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[ye,_e]=c.useState();Pr(()=>{T&&_e(window.getComputedStyle(T).zIndex)},[T]);const{hasParent:xe,positionUpdateFns:ae}=ZA(ps,d),Me=!xe;c.useLayoutEffect(()=>{if(!Me)return ae.add(B),()=>{ae.delete(B)}},[Me,ae,B]),Pr(()=>{Me&&z&&Array.from(ae).reverse().forEach(Oe=>requestAnimationFrame(Oe))},[Me,z,ae]);const at={"data-side":K,"data-align":I,...P,ref:j,style:{...P.style,animation:z?void 0:"none",opacity:(s=G.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return c.createElement("div",{ref:V,"data-radix-popper-content-wrapper":"",style:{position:J,left:0,top:0,transform:z?`translate3d(${Math.round(re)}px, ${Math.round(de)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[(l=G.transformOrigin)===null||l===void 0?void 0:l.x,(u=G.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},c.createElement(YA,{scope:d,placedSide:K,onArrowChange:M,arrowX:Q,arrowY:ie,shouldHideArrow:pe},Me?c.createElement(XA,{scope:d,hasParent:!0,positionUpdateFns:ae},c.createElement(ht.div,at)):c.createElement(ht.div,at)))}),ym="PopperArrow",eO={top:"bottom",right:"left",bottom:"top",left:"right"},bm=c.forwardRef(function(t,r){const{__scopePopper:n,...i}=t,o=JA(ym,n),a=eO[o.placedSide];return c.createElement("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0}},c.createElement(HA,Xe({},i,{ref:r,style:{...i.style,display:"block"}})))});function tO(e){return e!==void 0}function rO(e){return e!==null}const nO=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:r}=e,{width:n,height:i}=t.reference;return r.floating.style.setProperty("--radix-popper-anchor-width",`${n}px`),r.floating.style.setProperty("--radix-popper-anchor-height",`${i}px`),{}}}),iO=e=>({name:"transformOrigin",options:e,fn(t){var r,n,i,o,a;const{placement:s,rects:l,middlewareData:u}=t,p=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,h=p?0:e.arrowWidth,m=p?0:e.arrowHeight,[v,y]=wm(s),w={start:"0%",center:"50%",end:"100%"}[y],E=((n=(i=u.arrow)===null||i===void 0?void 0:i.x)!==null&&n!==void 0?n:0)+h/2,_=((o=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&o!==void 0?o:0)+m/2;let S="",$="";return v==="bottom"?(S=p?w:`${E}px`,$=`${-m}px`):v==="top"?(S=p?w:`${E}px`,$=`${l.floating.height+m}px`):v==="right"?(S=`${-m}px`,$=p?w:`${_}px`):v==="left"&&(S=`${l.floating.width+m}px`,$=p?w:`${_}px`),{data:{x:S,y:$}}}});function wm(e){const[t,r="center"]=e.split("-");return[t,r]}const oO=GA,aO=qA,sO=QA,lO=bm,cO=c.forwardRef((e,t)=>c.createElement(ht.span,Xe({},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}}))),[hs,RB]=hn("Tooltip",[mm]),gs=mm(),uO="TooltipProvider",fO=700,Hc="tooltip.open",[dO,Vc]=hs(uO),pO=e=>{const{__scopeTooltip:t,delayDuration:r=fO,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=c.useState(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const d=u.current;return()=>window.clearTimeout(d)},[]),c.createElement(dO,{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(d=>{l.current=d},[]),disableHoverableContent:i},o)},Gc="Tooltip",[hO,Bo]=hs(Gc),gO=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,l=Vc(Gc,e.__scopeTooltip),u=gs(t),[d,p]=c.useState(null),h=$o(),m=c.useRef(0),v=a??l.disableHoverableContent,y=s??l.delayDuration,w=c.useRef(!1),[E=!1,_]=Da({prop:n,defaultProp:i,onChange:C=>{C?(l.onOpen(),document.dispatchEvent(new CustomEvent(Hc))):l.onClose(),o==null||o(C)}}),S=c.useMemo(()=>E?w.current?"delayed-open":"instant-open":"closed",[E]),$=c.useCallback(()=>{window.clearTimeout(m.current),w.current=!1,_(!0)},[_]),k=c.useCallback(()=>{window.clearTimeout(m.current),_(!1)},[_]),P=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{w.current=!0,_(!0)},y)},[y,_]);return c.useEffect(()=>()=>window.clearTimeout(m.current),[]),c.createElement(oO,u,c.createElement(hO,{scope:t,contentId:h,open:E,stateAttribute:S,trigger:d,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayed?P():$()},[l.isOpenDelayed,P,$]),onTriggerLeave:c.useCallback(()=>{v?k():window.clearTimeout(m.current)},[k,v]),onOpen:$,onClose:k,disableHoverableContent:v},r))},Em="TooltipTrigger",mO=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=Bo(Em,r),o=Vc(Em,r),a=gs(r),s=c.useRef(null),l=Tt(t,s,i.onTriggerChange),u=c.useRef(!1),d=c.useRef(!1),p=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),c.createElement(aO,De({asChild:!0},a),c.createElement(ht.button,De({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},n,{ref:l,onPointerMove:mt(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),d.current=!0)}),onPointerLeave:mt(e.onPointerLeave,()=>{i.onTriggerLeave(),d.current=!1}),onPointerDown:mt(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:mt(e.onFocus,()=>{u.current||i.onOpen()}),onBlur:mt(e.onBlur,i.onClose),onClick:mt(e.onClick,i.onClose)})))}),_m="TooltipPortal",[vO,yO]=hs(_m,{forceMount:void 0}),bO=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:i}=e,o=Bo(_m,t);return c.createElement(vO,{scope:t,forceMount:r},c.createElement(ar,{present:r||o.open},c.createElement(Wp,{asChild:!0,container:i},n)))},jo="TooltipContent",wO=c.forwardRef((e,t)=>{const r=yO(jo,e.__scopeTooltip),{forceMount:n=r.forceMount,side:i="top",...o}=e,a=Bo(jo,e.__scopeTooltip);return c.createElement(ar,{present:n||a.open},a.disableHoverableContent?c.createElement(xm,De({side:i},o,{ref:t})):c.createElement(EO,De({side:i},o,{ref:t})))}),EO=c.forwardRef((e,t)=>{const r=Bo(jo,e.__scopeTooltip),n=Vc(jo,e.__scopeTooltip),i=c.useRef(null),o=Tt(t,i),[a,s]=c.useState(null),{trigger:l,onClose:u}=r,d=i.current,{onPointerInTransitChange:p}=n,h=c.useCallback(()=>{s(null),p(!1)},[p]),m=c.useCallback((v,y)=>{const w=v.currentTarget,E={x:v.clientX,y:v.clientY},_=CO(E,w.getBoundingClientRect()),S=_==="right"||_==="bottom"?-5:5,k=_==="right"||_==="left"?{x:v.clientX+S,y:v.clientY}:{x:v.clientX,y:v.clientY+S},P=AO(y.getBoundingClientRect()),C=TO([k,...P]);s(C),p(!0)},[p]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(l&&d){const v=w=>m(w,d),y=w=>m(w,l);return l.addEventListener("pointerleave",v),d.addEventListener("pointerleave",y),()=>{l.removeEventListener("pointerleave",v),d.removeEventListener("pointerleave",y)}}},[l,d,m,h]),c.useEffect(()=>{if(a){const v=y=>{const w=y.target,E={x:y.clientX,y:y.clientY},_=(l==null?void 0:l.contains(w))||(d==null?void 0:d.contains(w)),S=!OO(E,a);_?h():S&&(h(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,d,a,u,h]),c.createElement(xm,De({},e,{ref:o}))}),[_O,xO]=hs(Gc,{isInside:!1}),xm=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,l=Bo(jo,r),u=gs(r),{onClose:d}=l;return c.useEffect(()=>(document.addEventListener(Hc,d),()=>document.removeEventListener(Hc,d)),[d]),c.useEffect(()=>{if(l.trigger){const p=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&d()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,d]),c.createElement(Dp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:p=>p.preventDefault(),onDismiss:d},c.createElement(sO,De({"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(Jl,null,n),c.createElement(_O,{scope:r,isInside:!0},c.createElement(cO,{id:l.contentId,role:"tooltip"},i||n))))}),SO="TooltipArrow",$O=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,i=gs(r);return xO(SO,r).isInside?null:c.createElement(lO,De({},i,n,{ref:t}))});function CO(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(r,n,i,o)){case o:return"left";case i:return"right";case r:return"top";case n:return"bottom";default:return null}}function AO(e){const{top:t,right:r,bottom:n,left:i}=e;return[{x:i,y:t},{x:r,y:t},{x:r,y:n},{x:i,y:n}]}function OO(e,t){const{x:r,y:n}=e;let i=!1;for(let o=0,a=t.length-1;o<t.length;a=o++){const s=t[o].x,l=t[o].y,u=t[a].x,d=t[a].y;l>n!=d>n&&r<(u-s)*(n-l)/(d-l)+s&&(i=!i)}return i}function TO(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),IO(t)}function IO(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const i=e[n];for(;t.length>=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const i=e[n];for(;r.length>=2;){const o=r[r.length-1],a=r[r.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))r.pop();else break}r.push(i)}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 PO=pO,kO=gO;var NO=typeof WeakRef<"u",Sm=class{constructor(e){NO&&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}},Vn="keyborg:focusin",Ro="keyborg:focusout";function DO(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 Kc=!1;function Ci(e){const t=e.focus;t.__keyborgNativeFocus?t.__keyborgNativeFocus.call(e):e.focus()}function LO(e){const t=e;Kc||(Kc=DO(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=l;const n=new Set,i=d=>{const p=d.target;if(!p)return;const h=new CustomEvent(Ro,{cancelable:!0,bubbles:!0,composed:!0,detail:{originalEvent:d}});p.dispatchEvent(h)},o=d=>{const p=d.target;if(!p)return;let h=d.composedPath()[0];const m=new Set;for(;h;)h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?(m.add(h),h=h.host):h=h.parentNode;for(const v of n){const y=v.deref();(!y||!m.has(y))&&(n.delete(v),y&&(y.removeEventListener("focusin",o,!0),y.removeEventListener("focusout",i,!0)))}a(p,d.relatedTarget||void 0)},a=(d,p,h)=>{var m;const v=d.shadowRoot;if(v){for(const E of n)if(E.deref()===v)return;v.addEventListener("focusin",o,!0),v.addEventListener("focusout",i,!0),n.add(new Sm(v));return}const y={relatedTarget:p,originalEvent:h},w=new CustomEvent(Vn,{cancelable:!0,bubbles:!0,composed:!0,detail:y});w.details=y,(Kc||s.lastFocusedProgrammatically)&&(y.isFocusedProgrammatically=d===((m=s.lastFocusedProgrammatically)==null?void 0:m.deref()),s.lastFocusedProgrammatically=void 0),d.dispatchEvent(w)},s=t.__keyborgData={focusInHandler:o,focusOutHandler:i,shadowTargets:n};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0),t.document.addEventListener("focusout",t.__keyborgData.focusOutHandler,!0);function l(){const d=t.__keyborgData;return d&&(d.lastFocusedProgrammatically=new Sm(this)),r.apply(this,arguments)}let u=t.document.activeElement;for(;u&&u.shadowRoot;)a(u),u=u.shadowRoot.activeElement;l.__keyborgNativeFocus=r}function MO(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,i=t.__keyborgData;if(i){t.document.removeEventListener("focusin",i.focusInHandler,!0),t.document.removeEventListener("focusout",i.focusOutHandler,!0);for(const o of i.shadowTargets){const a=o.deref();a&&(a.removeEventListener("focusin",i.focusInHandler,!0),a.removeEventListener("focusout",i.focusOutHandler,!0))}i.shadowTargets.clear(),delete t.__keyborgData}n&&(r.focus=n)}var FO=500,$m=0,BO=class{constructor(e,t){this._isNavigatingWithKeyboard_DO_NOT_USE=!1,this._onFocusIn=n=>{if(this._isMouseUsedTimer||this.isNavigatingWithKeyboard)return;const i=n.detail;i.relatedTarget&&(i.isFocusedProgrammatically||i.isFocusedProgrammatically===void 0||(this.isNavigatingWithKeyboard=!0))},this._onMouseDown=n=>{if(n.buttons===0||n.clientX===0&&n.clientY===0&&n.screenX===0&&n.screenY===0)return;const i=this._win;i&&(this._isMouseUsedTimer&&i.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=i.setTimeout(()=>{delete this._isMouseUsedTimer},1e3)),this.isNavigatingWithKeyboard=!1},this._onKeyDown=n=>{this.isNavigatingWithKeyboard?this._shouldDismissKeyboardNavigation(n)&&this._scheduleDismiss():this._shouldTriggerKeyboardNavigation(n)&&(this.isNavigatingWithKeyboard=!0)},this.id="c"+ ++$m,this._win=e;const r=e.document;if(t){const n=t.triggerKeys,i=t.dismissKeys;n!=null&&n.length&&(this._triggerKeys=new Set(n)),i!=null&&i.length&&(this._dismissKeys=new Set(i))}r.addEventListener(Vn,this._onFocusIn,!0),r.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("keydown",this._onKeyDown,!0),LO(e)}get isNavigatingWithKeyboard(){return this._isNavigatingWithKeyboard_DO_NOT_USE}set isNavigatingWithKeyboard(e){this._isNavigatingWithKeyboard_DO_NOT_USE!==e&&(this._isNavigatingWithKeyboard_DO_NOT_USE=e,this.update())}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),MO(e);const t=e.document;t.removeEventListener(Vn,this._onFocusIn,!0),t.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("keydown",this._onKeyDown,!0),delete this._win}}isDisposed(){return!!this._win}update(){var e,t;const r=(t=(e=this._win)==null?void 0:e.__keyborg)==null?void 0:t.refs;if(r)for(const n of Object.keys(r))qc.update(r[n],this.isNavigatingWithKeyboard)}_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),i=r&&(r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.isContentEditable);return n&&!i}_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&&(this.isNavigatingWithKeyboard=!1)},FO)}}},qc=class iw{constructor(t,r){this._cb=[],this._id="k"+ ++$m,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new BO(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new iw(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(){var t;return!!((t=this._core)!=null&&t.isNavigatingWithKeyboard)}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){this._core&&(this._core.isNavigatingWithKeyboard=t)}};function Cm(e,t){return qc.create(e,t)}function jO(e){qc.dispose(e)}/*!
83
+ * Copyright (c) Microsoft Corporation. All rights reserved.
84
+ * Licensed under the MIT License.
85
+ */var Mr=e=>{const{density:t}=c.useContext(zm);return e??t},Gn=e=>{const{elevation:t}=c.useContext(Dm);return e??t},Am="en-US",ms="dxos-common",Om=bE,RO={[Am]:{[ms]:{"loading translations":"Loading translations…"}}};Rt.use(Ew).init({resources:RO,lng:Am,defaultNS:ms,interpolation:{escapeValue:!1}});var Tm=c.createContext({appNs:ms,dtLocale:Om}),it=(...e)=>{const t=Pw(...e),{dtLocale:r}=c.useContext(Tm);return{...t,dtLocale:r}},UO=({fallback:e,resourceExtensions:t,children:r,appNs:n,dtLocale:i})=>{const[o,a]=c.useState(!1);return c.useEffect(()=>{a(!1),t&&t.length&&t.forEach(s=>{Object.keys(s).forEach(l=>{Object.keys(s[l]).forEach(u=>{Rt.addResourceBundle(l,u,s[l][u])})})}),a(!0)},[t]),c.createElement(Tm.Provider,{value:{appNs:n??ms,dtLocale:i??Om}},c.createElement(c.Suspense,{fallback:e},o?r:e))},Pe=()=>c.useContext(ev),WO=e=>{const[t,r]=c.useState(null),[n,i]=c.useState(null);return c.useEffect(()=>{var a;const o=()=>{window.visualViewport&&(r(window.visualViewport.width),i(window.visualViewport.height))};return(a=window.visualViewport)==null||a.addEventListener("resize",o),o(),()=>{var s;return(s=window.visualViewport)==null?void 0:s.removeEventListener("resize",o)}},e??[]),{width:t,height:n}},zO="Avatar",[HO,Kn]=gi(zO),VO=({size:e=10,variant:t="circle",status:r,animation:n,children:i,labelId:o,descriptionId:a,maskId:s,inGroup:l,color:u})=>{const d=St("avatar__label",o),p=St("avatar__description",a),h=St("avatar__mask",s);return c.createElement(HO,{labelId:d,descriptionId:p,maskId:h,size:e,variant:t,status:r,animation:n,inGroup:l,color:u},i)},Im="0.25rem",GO=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{size:i,variant:o,labelId:a,descriptionId:s,maskId:l,inGroup:u,status:d,animation:p,color:h}=Kn("AvatarFrame"),{tx:m}=Pe(),v=i==="px"?1:Number(i),y=v*4,w=v>4?2:(v>3,1),E=v>12?3:v>4?2:v>3?1:0,_=y/2-E-w;return c.createElement(h_,{role:"img",...r,className:m("avatar.root","avatar",{size:i,variant:o,inGroup:u},e),ref:n,...!u&&{"aria-labelledby":a,"aria-describedby":s}},c.createElement("svg",{viewBox:`0 0 ${y} ${y}`,width:y,height:y,className:m("avatar.frame","avatar__frame",{variant:o})},c.createElement("defs",null,c.createElement("mask",{id:l},o==="circle"?c.createElement("circle",{fill:"white",cx:"50%",cy:"50%",r:_}):c.createElement("rect",{fill:"white",width:2*_,height:2*_,x:E+w,y:E+w,rx:Im}))),o==="circle"?c.createElement("circle",{className:`avatarFrameFill${h?"":" fill-[var(--surface-bg)]"}`,cx:"50%",cy:"50%",r:_,...h?{fill:h}:{}}):c.createElement("rect",{className:"avatarFrameFill fill-[var(--surface-bg)]",x:E+w,y:E+w,width:2*_,height:2*_,rx:Im}),t),c.createElement("span",{role:"none",className:m("avatar.ring","avatar__ring",{size:i,variant:o,status:d,animation:p}),style:{borderWidth:w+"px"}}))}),KO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},i)=>{const o=e?Ct:Je.span,{tx:a}=Pe(),{labelId:s}=Kn("AvatarLabel");return c.createElement(o,{...n,id:s,ref:i,className:a("avatar.label","avatar__label",{srOnly:t},r)})}),qO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},i)=>{const o=e?Ct:Je.span,{tx:a}=Pe(),{descriptionId:s}=Kn("AvatarDescription");return c.createElement(o,{...n,id:s,ref:i,className:a("avatar.description","avatar__description",{srOnly:t},r)})}),Pm=c.forwardRef((e,t)=>{const{maskId:r}=Kn("AvatarFallback");return c.createElement("image",{width:"100%",height:"100%",...e,mask:`url(#${r})`,ref:t,preserveAspectRatio:"xMidYMid slice"})}),YO=e=>{const{maskId:t,size:r}=Kn("AvatarFallback"),{large:n}=e,i=(n?4:3)*(1/1.612),{tx:o}=Pe();return c.createElement("text",{x:"50%",y:"50%",className:o("avatar.fallbackText","avatar__fallback-text"),textAnchor:"middle",alignmentBaseline:"central",fontSize:r==="px"?"200%":r*i,mask:`url(#${t})`},e.children)},JO=c.forwardRef(({onLoadingStatusChange:e,...t},r)=>{const{size:n}=Kn("AvatarImage");return(n==="px"?1:n*4)<=20?null:c.createElement(Op,{asChild:!0},c.createElement(Pm,{...t,ref:r}))}),XO=c.forwardRef(({delayMs:e,text:t,...r},n)=>{const i=!!(t&&/[0-9a-zA-Z]+/.test(t)),{size:o}=Kn("AvatarFallback"),a=o==="px"?1:Number(o);return c.createElement(Op,{delayMs:e,asChild:!0},c.createElement(c.Fragment,null,a>=6&&c.createElement(Pm,{...r,ref:n}),t&&c.createElement(YO,{large:!i},t.toLocaleUpperCase())))}),ZO=(e,t)=>`data:image/svg+xml;utf8,${encodeURIComponent(N_(e,t==="px"?1:t*4,{padding:0}))}`,vs=(e,t)=>c.useMemo(()=>ZO(e,t),[e]),Pt={Root:VO,Frame:GO,Image:JO,Fallback:XO,Label:KO,Description:qO},km="ButtonGroup",Nm="Button",[QO,e5]=gi(km,{inGroup:!1}),wr=c.forwardRef(({classNames:e,children:t,density:r,elevation:n,variant:i="default",asChild:o,...a},s)=>{const{inGroup:l}=e5(Nm),{tx:u}=Pe(),d=Gn(n),p=Mr(r),h=o?Ct:Je.button;return c.createElement(h,{ref:s,...a,className:u("button.root","button",{variant:i,inGroup:l,disabled:a.disabled,density:p,elevation:d},e),...a.disabled&&{disabled:!0}},t)});wr.displayName=Nm;var t5=c.forwardRef(({children:e,elevation:t,classNames:r,asChild:n,...i},o)=>{const{tx:a}=Pe(),s=Gn(t),l=n?Ct:Je.div;return c.createElement(l,{role:"none",...i,className:a("button.group","button-group",{elevation:s},r),ref:o},c.createElement(QO,{inGroup:!0},e))});t5.displayName=km;var Dm=c.createContext({elevation:"base"}),Uo=({elevation:e,children:t})=>c.createElement(Dm.Provider,{value:{elevation:e}},t),r5=dc,n5=sh,i5=uh,o5=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:i}=Pe();return c.createElement(lc,{...r,className:i("dialog.title","dialog__title",{srOnly:t},e),ref:n})}),a5=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:i}=Pe();return c.createElement(cc,{...r,className:i("dialog.description","dialog__description",{srOnly:t},e),ref:n})}),s5=uc,Lm="DialogOverlay",Mm="DialogContent",[l5,c5]=gi(Lm,{inOverlayLayout:!1}),Fm=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:i}=Pe();return c.createElement(fh,{...r,className:i("dialog.overlay","dialog__overlay",{},e),ref:n},c.createElement(l5,{inOverlayLayout:!0},t))});Fm.displayName=Lm;var Bm=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:i}=Pe(),{inOverlayLayout:o}=c5(Mm);return c.createElement(za,{...r,className:i("dialog.content","dialog",{inOverlayLayout:o},e),ref:n},c.createElement(Uo,{elevation:"chrome"},t))});Bm.displayName=Mm;var Fr={Root:r5,Trigger:n5,Portal:i5,Overlay:Fm,Content:Bm,Title:o5,Description:a5,Close:s5},u5=h2,f5=r2,d5=n2,p5=p2,h5=f2,g5=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:i}=Pe();return c.createElement(c2,{...r,className:i("dialog.title","dialog--alert__title",{srOnly:t},e),ref:n})}),m5=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:i}=Pe();return c.createElement(u2,{...r,className:i("dialog.description","dialog--alert__description",{srOnly:t},e),ref:n})}),jm="AlertDialogOverlay",Rm="AlertDialogContent",[v5,y5]=gi(jm,{inOverlayLayout:!1}),Um=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:i}=Pe();return c.createElement(i2,{...r,className:i("dialog.overlay","dialog--alert__overlay",{},e),ref:n},c.createElement(v5,{inOverlayLayout:!0},t))});Um.displayName=jm;var Wm=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:i}=Pe(),{inOverlayLayout:o}=y5(Rm);return c.createElement(s2,{...r,className:i("dialog.content","dialog--alert",{inOverlayLayout:o},e),ref:n},c.createElement(Uo,{elevation:"chrome"},t))});Wm.displayName=Rm;var Ai={Root:u5,Trigger:f5,Portal:d5,Overlay:Um,Content:Wm,Title:g5,Description:m5,Cancel:p5,Action:h5},b5=w$,w5=N$,E5=D$,_5=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:i}=Pe();return c.createElement(L$,{sideOffset:4,collisionPadding:8,...r,className:i("menu.content","menu",{},e),ref:n},c.createElement(Uo,{elevation:"chrome"},t))}),x5=c.forwardRef(({classNames:e,asChild:t,children:r,...n},i)=>{const{tx:o}=Pe(),a=t?Ct:Je.div;return c.createElement(a,{...n,className:o("menu.viewport","menu__viewport",{},e),ref:i},r)}),S5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(W$,{...t,className:n("menu.arrow","menu__arrow",{},e),ref:r})}),$5=M$,C5=R$,A5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(B$,{...t,className:n("menu.item","menu__item",{},e),ref:r})}),O5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(j$,{...t,className:n("menu.item","menu__item--checkbox",{},e),ref:r})}),T5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(U$,{...t,className:n("menu.separator","menu__item",{},e),ref:r})}),I5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(F$,{...t,className:n("menu.groupLabel","menu__group__label",{},e),ref:r})}),qn={Root:b5,Trigger:w5,Portal:E5,Content:_5,Viewport:x5,Arrow:S5,Group:$5,Item:A5,CheckboxItem:O5,ItemIndicator:C5,Separator:T5,GroupLabel:I5},P5=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},i)=>{const{tx:o}=Pe();return c.createElement(TC,{...n,className:o("input.label","input__label",{srOnly:e},t),ref:i},r)}),k5=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},i)=>{const{tx:o}=Pe();return c.createElement(IC,{...n,className:o("input.description","input__description",{srOnly:e},t),ref:i},r)}),N5=c.forwardRef(({__inputScope:e,srOnly:t,classNames:r,children:n,...i},o)=>{const{tx:a}=Pe(),{validationValence:s}=or(Ut,e);return c.createElement(kC,{...i,className:a("input.validation",`input__validation-message input__validation-message--${s}`,{srOnly:t,validationValence:s},r),ref:o},n)}),D5=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},i)=>{const{tx:o}=Pe();return c.createElement(NC,{...n,className:o("input.descriptionAndValidation","input__description-and-validation",{srOnly:e},t),ref:i},r)}),L5=c.forwardRef(({density:e,elevation:t,segmentClassName:r,inputClassName:n,variant:i,...o},a)=>{const{hasIosKeyboard:s}=Pe(),{tx:l}=Pe(),u=Mr(e),d=Gn(t),p=c.useCallback(({focused:h,validationValence:m})=>l("input.input","input--pin-segment",{variant:"static",focused:h,disabled:o.disabled,density:u,elevation:d,validationValence:m},r),[l,o.disabled,d,t,u]);return c.createElement(DC,{...o,segmentClassName:p,...o.autoFocus&&!s&&{autoFocus:!0},inputClassName:l("input.inputWithSegments","input input--pin",{disabled:o.disabled},n),ref:a})}),M5=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:i,...o},a)=>{const{hasIosKeyboard:s}=Pe(),l=Pe(),u=Mr(r),d=Gn(n),{validationValence:p}=or(Ut,e),{tx:h}=l;return c.createElement(LC,{...o,className:h("input.input","input",{variant:i,disabled:o.disabled,density:u,elevation:d,validationValence:p},t),...o.autoFocus&&!s&&{autoFocus:!0},ref:a})}),F5=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:i,...o},a)=>{const{hasIosKeyboard:s}=Pe(),{tx:l}=Pe(),u=Mr(r),d=Gn(n),{validationValence:p}=or(Ut,e);return c.createElement(MC,{...o,className:l("input.input","input--text-area",{variant:i,disabled:o.disabled,density:u,elevation:d,validationValence:p},t),...o.autoFocus&&!s&&{autoFocus:!0},ref:a})}),B5=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:i,weight:o="bold",classNames:a,...s},l)=>{const[u,d]=Kr({prop:t,defaultProp:r,onChange:n}),{id:p,validationValence:h,descriptionId:m,errorMessageId:v}=or(Ut,e),{tx:y}=Pe(),w=u==="indeterminate"?Ye.Minus:u?Ye.Check:c.Fragment;return c.createElement(X$,{...s,checked:u,onCheckedChange:d,id:p,"aria-describedby":m,...h==="error"&&{"aria-invalid":"true","aria-errormessage":v},className:y("input.checkbox","input--checkbox",{size:i},"shrink-0",a),ref:l},c.createElement(Z$,{asChild:!0},c.createElement(w,u&&{weight:o,className:y("input.checkboxIndicator","input--checkbox__indicator",{size:i})})))}),j5=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:i=5,classNames:o,...a},s)=>{const{tx:l}=Pe(),[u,d]=Kr({prop:t,defaultProp:r,onChange:n}),{id:p,validationValence:h,descriptionId:m,errorMessageId:v}=or(Ut,e);return c.createElement(sC,{...a,checked:u,onCheckedChange:d,id:p,"aria-describedby":m,...h==="error"&&{"aria-invalid":"true","aria-errormessage":v},className:l("input.switch","input--switch",{size:i},o),ref:s},c.createElement(lC,{className:l("input.switchThumb","input--switch__thumb",{size:i})}))}),Br={Root:Dg,PinInput:L5,TextInput:M5,TextArea:F5,Checkbox:B5,Switch:j5,Label:P5,Description:k5,Validation:N5,DescriptionAndValidation:D5},zm=c.createContext({density:"coarse"}),Oi=({density:e,children:t})=>c.createElement(zm.Provider,{value:{density:e}},t),Yc=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:i}=Pe(),o=Mr(r.density);return c.createElement(Oi,{density:o},c.createElement(Fg,{...r,className:i("list.root","list",{},e),ref:n},t))}),R5=c.forwardRef(({children:e,classNames:t,asChild:r,...n},i)=>{const o=r?Ct:"div",a=Mr(),{tx:s}=Pe();return c.createElement(o,{...!r&&{role:"none"},...n,className:s("list.item.endcap","list__listItem__endcap",{density:a},t),ref:i},e)}),U5=({classNames:e,...t})=>{const r=Mr(),{tx:n}=Pe();return c.createElement("div",{role:"none",...t,className:n("list.item.openTrigger","list__listItem__openTrigger--mock",{density:r},e)})},W5=c.forwardRef(({children:e,classNames:t,...r},n)=>{const{tx:i}=Pe(),o=Mr();return c.createElement(ZC,{...r,className:i("list.item.heading","list__listItem__heading",{density:o},t),ref:n},e)}),z5=c.forwardRef(({__listItemScope:e,classNames:t,children:r,...n},i)=>{const{tx:o}=Pe(),a=Mr(),{open:s}=Bg(No,e),l=s?Ye.CaretDown:Ye.CaretRight;return c.createElement(QC,{...n,className:o("list.item.openTrigger","list__listItem__openTrigger",{density:a},t),ref:i},r||c.createElement(l,{weight:"bold",className:o("list.item.openTriggerIcon","list__listItem__openTrigger__icon",{})}))}),H5=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:i}=Pe(),o=Mr();return c.createElement(jg,{...r,className:i("list.item.root","list__listItem",{density:o,collapsible:r.collapsible},e),ref:n},t)}),Jc={Root:H5,Endcap:R5,Heading:W5,OpenTrigger:z5,CollapsibleContent:eA,MockOpenTrigger:U5},Hm;(function(e){e[e.IDLE=0]="IDLE",e[e.DEBOUNCING=1]="DEBOUNCING",e[e.FOLLOWING=2]="FOLLOWING"})(Hm||(Hm={}));var V5=(e,{onDismiss:t,dismissThreshold:r=64,debounceThreshold:n=8,offset:i=0})=>{const o=e.current,[a,s]=c.useState(0),[l,u]=c.useState(0),d=c.useCallback(()=>{s(0),o==null||o.style.removeProperty("inset-inline-start"),o==null||o.style.setProperty("transition-duration","200ms")},[o]),p=c.useCallback(()=>{s(2),o==null||o.style.setProperty("transition-duration","0ms")},[o]),h=c.useCallback(({screenX:y})=>{a===0&&(s(1),u(y))},[a]),m=c.useCallback(({screenX:y})=>{if(o){const w=Math.min(y-l,0);switch(a){case 2:Math.abs(w)>r?(d(),t==null||t()):o.style.setProperty("inset-inline-start",`${i+w}px`);break;case 1:Math.abs(w)>n&&p();break}}},[o,a,l]),v=c.useCallback(()=>{d()},[d]);c.useEffect(()=>(o==null||o.addEventListener("pointerdown",h),()=>{o==null||o.removeEventListener("pointerdown",h)}),[o,h]),c.useEffect(()=>(o&&document.documentElement.addEventListener("pointermove",m),()=>{document.documentElement.removeEventListener("pointermove",m)}),[o,m]),c.useEffect(()=>(o&&document.documentElement.addEventListener("pointerup",v),()=>{document.documentElement.removeEventListener("pointerup",v)}),[o,v])},Xc="NavigationSidebar",Zc="Main",[UB,Vm]=gi(Zc,{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`")}}),G5=e=>{!document.body.hasAttribute("data-is-keyboard")&&e.preventDefault()},K5=c.forwardRef(({classNames:e,children:t,swipeToDismiss:r,onOpenAutoFocus:n,open:i,setOpen:o,side:a,...s},l)=>{const[u]=rp("lg",{ssr:!1}),{tx:d}=Pe(),p=Rl(l),h=c.useRef(null);V5(r?p:h,{onDismiss:()=>o(!1)});const m=u?Je.div:za;return c.createElement(dc,{open:i,modal:!1},c.createElement(m,{...!u&&{forceMount:!0,tabIndex:-1,onOpenAutoFocus:n??G5},...s,className:d("main.sidebar","main__sidebar",{isLg:u,[a==="inline-end"?"inlineEndSidebarOpen":"inlineStartSidebarOpen"]:i,side:a},e),...!i&&{inert:"true"},ref:p},c.createElement(Uo,{elevation:"group"},t)))}),Gm=c.forwardRef((e,t)=>{const{navigationSidebarOpen:r,setNavigationSidebarOpen:n}=Vm(Xc);return c.createElement(K5,{...e,open:r,setOpen:n,side:"inline-start",ref:t})});Gm.displayName=Xc,Gm.displayName=Xc;var q5=c.forwardRef(({asChild:e,classNames:t,bounce:r,children:n,...i},o)=>{const[a]=rp("lg",{ssr:!1}),{navigationSidebarOpen:s,complementarySidebarOpen:l}=Vm(Zc),{tx:u}=Pe(),d=e?Ct:"main";return c.createElement(d,{...i,className:u("main.content","main",{isLg:a,inlineStartSidebarOpen:s,inlineEndSidebarOpen:l,bounce:r},t),ref:o},n)});q5.displayName=Zc;var Km="Message",[Y5,qm]=gi(Km),Ym=c.forwardRef(({asChild:e,valence:t,elevation:r,className:n,titleId:i,descriptionId:o,children:a,...s},l)=>{const{tx:u}=Pe(),d=St("message__title",i),p=St("message__description",o),h=Gn(r),m=e?Ct:Je.div;return c.createElement(Y5,{titleId:d,descriptionId:p},c.createElement(m,{...s,className:u("message.root","message",{valence:t,elevation:h},n),"aria-labelledby":d,"aria-describedby":p,ref:l},a))});Ym.displayName=Km;var Jm="MessageTitle",Xm=c.forwardRef(({asChild:e,className:t,children:r,...n},i)=>{const{tx:o}=Pe(),{titleId:a}=qm(Jm),s=e?Ct:Je.h2;return c.createElement(s,{...n,className:o("message.title","message__title",{},t),id:a,ref:i},r)});Xm.displayName=Jm;var Zm="MessageBody",Qm=c.forwardRef(({asChild:e,className:t,children:r,...n},i)=>{const{tx:o}=Pe(),{descriptionId:a}=qm(Zm),s=e?Ct:Je.p;return c.createElement(s,{...n,className:o("message.body","message__body",{},t),id:a,ref:i},r)});Qm.displayName=Zm;var Qc={Root:Ym,Title:Xm,Body:Qm},J5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(bA,{...t,className:n("scrollArea.root","scroll-area",{},e),ref:r})}),X5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(wA,{...t,className:n("scrollArea.viewport","scroll-area",{},e),ref:r})}),Z5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(EA,{...t,className:n("scrollArea.scrollbar","scroll-area__scrollbar",{},e),ref:r})}),Q5=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(_A,{...t,className:n("scrollArea.thumb","scroll-area__thumb",{},e),ref:r})}),eT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(xA,{...t,className:n("scrollArea.corner","scroll-area__corner",{},e),ref:r})}),ys={Root:J5,Viewport:X5,Scrollbar:Z5,Thumb:Q5,Corner:eT},tT=PO,rT=kO,nT=bO,iT=mO,oT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement($O,{...t,className:n("tooltip.arrow","tooltip__arrow",{},e),ref:r})}),aT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Pe();return c.createElement(wO,{sideOffset:4,collisionPadding:8,...t,className:n("tooltip.content","tooltip",{},e),ref:r})}),Er={Provider:tT,Root:rT,Portal:nT,Trigger:iT,Arrow:oT,Content:aT},sT=()=>!!navigator.userAgent.match(/iP(ad|od|hone).+Safari/),ev=c.createContext({tx:(e,t,r,...n)=>t,themeMode:"dark",hasIosKeyboard:!1}),tv=e=>{e?document.body.setAttribute("data-is-keyboard","true"):document.body.removeAttribute("data-is-keyboard")},lT=({children:e,fallback:t=null,resourceExtensions:r,appNs:n,tx:i=(l,u,d,...p)=>u,themeMode:o="dark",rootElevation:a="base",rootDensity:s="coarse"})=>(c.useEffect(()=>{if(document.defaultView){const l=Cm(document.defaultView);return l.subscribe(tv),()=>l.unsubscribe(tv)}},[]),c.createElement(ev.Provider,{value:{tx:i,themeMode:o,hasIosKeyboard:sT()}},c.createElement(UO,{fallback:t,resourceExtensions:r,appNs:n},c.createElement(Uo,{elevation:a},c.createElement(Oi,{density:s},e))))),cT={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},eu=cT,tu={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function uT(e){return e.trim().replace(tu.whitespace," ")}function fT(e){return encodeURIComponent(e).replace(tu.urlHexPairs,pT)}function dT(e){return Object.keys(eu).forEach(function(t){eu[t].test(e)&&(e=e.replace(eu[t],t))}),e}function pT(e){switch(e){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return e.toLowerCase()}}function ru(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=dT(uT(e)).replace(tu.quotes,"'");return"data:image/svg+xml,"+fT(t)}ru.toSrcset=function(t){return ru(t).replace(/ /g,"%20")};var hT=ru,rv={},nv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function t(n,i){return{handler:n,config:i}}t.withOptions=function(n,i=()=>({})){const o=function(a){return{__options:a,handler:n(a),config:i(a)}};return o.__isOptionsFunction=!0,o.__pluginFunction=n,o.__configFunction=i,o};const r=t})(nv),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=r(nv);function r(i){return i&&i.__esModule?i:{default:i}}const n=t.default}(rv);let nu=rv;var iu=(nu.__esModule?nu:{default:nu}).default;const gT=cn(iu);var iv={},ov={};(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,i])=>[n,t(i)])):r}})(ov);var mT={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:{busy:'busy="true"',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","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-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"},gridRowEnd:{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"},gridRowStart:{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"},gridTemplateColumns:{none:"none",subgrid:"subgrid",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",subgrid:"subgrid",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))"},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",svh:"100svh",lvh:"100lvh",dvh:"100dvh",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",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({...e("spacing"),none:"none",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:({theme:e})=>({...e("spacing"),full:"100%",screen:"100vh",svh:"100svh",lvh:"100lvh",dvh:"100dvh",min:"min-content",max:"max-content",fit:"fit-content"}),minWidth:({theme:e})=>({...e("spacing"),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",15:"0.15",20:"0.2",25:"0.25",30:"0.3",35:"0.35",40:"0.4",45:"0.45",50:"0.5",55:"0.55",60:"0.6",65:"0.65",70:"0.7",75:"0.75",80:"0.8",85:"0.85",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%"}),size:({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%",min:"min-content",max:"max-content",fit:"fit-content"}),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",svw:"100svw",lvw:"100lvw",dvw:"100dvw",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 i}});const t=ov,r=n(mT);function n(o){return o&&o.__esModule?o:{default:o}}const i=(0,t.cloneDeep)(r.default.theme)})(iv);let ou=iv;var vT=(ou.__esModule?ou:{default:ou}).default,av={},sv={},au={exports:{}},vt=String,lv=function(){return{isColorSupported:!1,reset:vt,bold:vt,dim:vt,italic:vt,underline:vt,inverse:vt,hidden:vt,strikethrough:vt,black:vt,red:vt,green:vt,yellow:vt,blue:vt,magenta:vt,cyan:vt,white:vt,gray:vt,bgBlack:vt,bgRed:vt,bgGreen:vt,bgYellow:vt,bgBlue:vt,bgMagenta:vt,bgCyan:vt,bgWhite:vt}};au.exports=lv(),au.exports.createColors=lv;var yT=au.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var d in u)Object.defineProperty(l,d,{enumerable:!0,get:u[d]})}t(e,{dim:function(){return a},default:function(){return s}});const r=n(yT);function n(l){return l&&l.__esModule?l:{default:l}}let i=new Set;function o(l,u,d){typeof process<"u"&&process.env.JEST_WORKER_ID||d&&i.has(d)||(d&&i.add(d),console.warn(""),u.forEach(p=>console.warn(l,"-",p)))}function a(l){return r.default.dim(l)}const s={info(l,u){o(r.default.bold(r.default.cyan("info")),...Array.isArray(l)?[l]:[u,l])},warn(l,u){o(r.default.bold(r.default.yellow("warn")),...Array.isArray(l)?[l]:[u,l])},risk(l,u){o(r.default.bold(r.default.magenta("risk")),...Array.isArray(l)?[l]:[u,l])}}})(sv),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i}});const t=r(sv);function r(o){return o&&o.__esModule?o:{default:o}}function n({version:o,from:a,to:s}){t.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${o}, \`${a}\` has been renamed to \`${s}\`.`,"Update your configuration file to silence this warning."])}const i={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}}}(av);let su=av;var bT=(su.__esModule?su:{default:su}).default;const bs=hT,wT=iu,cv=vT,En=bT,[ET,{lineHeight:_T}]=cv.fontSize.base,{spacing:Zr,borderWidth:uv,borderRadius:fv}=cv;wT.withOptions(function(e={strategy:void 0}){return function({addBase:t,addComponents:r,theme:n}){const i=e.strategy===void 0?["base","class"]:[e.strategy],o=[{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",En.gray[500]),"border-width":uv.DEFAULT,"border-radius":fv.none,"padding-top":Zr[2],"padding-right":Zr[3],"padding-bottom":Zr[2],"padding-left":Zr[3],"font-size":ET,"line-height":_T,"--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",En.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",En.blue[600])}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:n("colors.gray.500",En.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("${bs(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${n("colors.gray.500",En.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",En.blue[600]),"background-color":"#fff","border-color":n("colors.gray.500",En.gray[500]),"border-width":uv.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":fv.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",En.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("${bs('<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("${bs('<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("${bs('<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=>o.map(l=>l[s]===null?null:{[l[s]]:l.styles}).filter(Boolean);i.includes("base")&&t(a("base")),i.includes("class")&&r(a("class"))}});var ws={exports:{}};ws.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",p="[object Date]",h="[object Error]",m="[object Function]",v="[object GeneratorFunction]",y="[object Map]",w="[object Number]",E="[object Null]",_="[object Object]",S="[object Proxy]",$="[object RegExp]",k="[object Set]",P="[object String]",C="[object Undefined]",T="[object WeakMap]",D="[object ArrayBuffer]",j="[object DataView]",F="[object Float32Array]",M="[object Float64Array]",Z="[object Int8Array]",Y="[object Int16Array]",X="[object Int32Array]",ne="[object Uint8Array]",oe="[object Uint8ClampedArray]",ce="[object Uint16Array]",se="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,le=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,J={};J[F]=J[M]=J[Z]=J[Y]=J[X]=J[ne]=J[oe]=J[ce]=J[se]=!0,J[s]=J[l]=J[D]=J[d]=J[j]=J[p]=J[h]=J[m]=J[y]=J[w]=J[_]=J[$]=J[k]=J[P]=J[T]=!1;var re=typeof et=="object"&&et&&et.Object===Object&&et,de=typeof self=="object"&&self&&self.Object===Object&&self,H=re||de||Function("return this")(),G=t&&!t.nodeType&&t,B=G&&!0&&e&&!e.nodeType&&e,z=B&&B.exports===G,K=z&&re.process,I=function(){try{var R=B&&B.require&&B.require("util").types;return R||K&&K.binding&&K.binding("util")}catch{}}(),N=I&&I.isTypedArray;function Q(R,ee,A){switch(A.length){case 0:return R.call(ee);case 1:return R.call(ee,A[0]);case 2:return R.call(ee,A[0],A[1]);case 3:return R.call(ee,A[0],A[1],A[2])}return R.apply(ee,A)}function ie(R,ee){for(var A=-1,U=Array(R);++A<R;)U[A]=ee(A);return U}function pe(R){return function(ee){return R(ee)}}function ye(R,ee){return R==null?void 0:R[ee]}function _e(R,ee){return function(A){return R(ee(A))}}var xe=Array.prototype,ae=Function.prototype,Me=Object.prototype,at=H["__core-js_shared__"],Oe=ae.toString,Re=Me.hasOwnProperty,gt=function(){var R=/[^.]+$/.exec(at&&at.keys&&at.keys.IE_PROTO||"");return R?"Symbol(src)_1."+R:""}(),Se=Me.toString,je=Oe.call(Object),b=RegExp("^"+Oe.call(Re).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),f=z?H.Buffer:void 0,g=H.Symbol,x=H.Uint8Array,O=f?f.allocUnsafe:void 0,L=_e(Object.getPrototypeOf,Object),W=Object.create,me=Me.propertyIsEnumerable,ke=xe.splice,$e=g?g.toStringTag:void 0,Ie=function(){try{var R=Dn(Object,"defineProperty");return R({},"",{}),R}catch{}}(),Ae=f?f.isBuffer:void 0,nn=Math.max,oo=Date.now,pr=Dn(H,"Map"),Xt=Dn(Object,"create"),si=function(){function R(){}return function(ee){if(!Hr(ee))return{};if(W)return W(ee);R.prototype=ee;var A=new R;return R.prototype=void 0,A}}();function Lt(R){var ee=-1,A=R==null?0:R.length;for(this.clear();++ee<A;){var U=R[ee];this.set(U[0],U[1])}}function ga(){this.__data__=Xt?Xt(null):{},this.size=0}function ao(R){var ee=this.has(R)&&delete this.__data__[R];return this.size-=ee?1:0,ee}function ma(R){var ee=this.__data__;if(Xt){var A=ee[R];return A===n?void 0:A}return Re.call(ee,R)?ee[R]:void 0}function so(R){var ee=this.__data__;return Xt?ee[R]!==void 0:Re.call(ee,R)}function lo(R,ee){var A=this.__data__;return this.size+=this.has(R)?0:1,A[R]=Xt&&ee===void 0?n:ee,this}Lt.prototype.clear=ga,Lt.prototype.delete=ao,Lt.prototype.get=ma,Lt.prototype.has=so,Lt.prototype.set=lo;function Ot(R){var ee=-1,A=R==null?0:R.length;for(this.clear();++ee<A;){var U=R[ee];this.set(U[0],U[1])}}function va(){this.__data__=[],this.size=0}function co(R){var ee=this.__data__,A=Nt(ee,R);if(A<0)return!1;var U=ee.length-1;return A==U?ee.pop():ke.call(ee,A,1),--this.size,!0}function ya(R){var ee=this.__data__,A=Nt(ee,R);return A<0?void 0:ee[A][1]}function ba(R){return Nt(this.__data__,R)>-1}function wa(R,ee){var A=this.__data__,U=Nt(A,R);return U<0?(++this.size,A.push([R,ee])):A[U][1]=ee,this}Ot.prototype.clear=va,Ot.prototype.delete=co,Ot.prototype.get=ya,Ot.prototype.has=ba,Ot.prototype.set=wa;function Zt(R){var ee=-1,A=R==null?0:R.length;for(this.clear();++ee<A;){var U=R[ee];this.set(U[0],U[1])}}function q(){this.size=0,this.__data__={hash:new Lt,map:new(pr||Ot),string:new Lt}}function fe(R){var ee=ci(this,R).delete(R);return this.size-=ee?1:0,ee}function Ee(R){return ci(this,R).get(R)}function Ne(R){return ci(this,R).has(R)}function Qe(R,ee){var A=ci(this,R),U=A.size;return A.set(R,ee),this.size+=A.size==U?0:1,this}Zt.prototype.clear=q,Zt.prototype.delete=fe,Zt.prototype.get=Ee,Zt.prototype.has=Ne,Zt.prototype.set=Qe;function We(R){var ee=this.__data__=new Ot(R);this.size=ee.size}function Ve(){this.__data__=new Ot,this.size=0}function ze(R){var ee=this.__data__,A=ee.delete(R);return this.size=ee.size,A}function kt(R){return this.__data__.get(R)}function wt(R){return this.__data__.has(R)}function Et(R,ee){var A=this.__data__;if(A instanceof Ot){var U=A.__data__;if(!pr||U.length<r-1)return U.push([R,ee]),this.size=++A.size,this;A=this.__data__=new Zt(U)}return A.set(R,ee),this.size=A.size,this}We.prototype.clear=Ve,We.prototype.delete=ze,We.prototype.get=kt,We.prototype.has=wt,We.prototype.set=Et;function Ht(R,ee){var A=ui(R),U=!A&&Ln(R),te=!A&&!U&&Il(R),he=!A&&!U&&!te&&Pl(R),Te=A||U||te||he,Ce=Te?ie(R.length,String):[],Fe=Ce.length;for(var Be in R)(ee||Re.call(R,Be))&&!(Te&&(Be=="length"||te&&(Be=="offset"||Be=="parent")||he&&(Be=="buffer"||Be=="byteLength"||Be=="byteOffset")||Cl(Be,Fe)))&&Ce.push(Be);return Ce}function tr(R,ee,A){(A!==void 0&&!po(R[ee],A)||A===void 0&&!(ee in R))&&li(R,ee,A)}function uo(R,ee,A){var U=R[ee];(!(Re.call(R,ee)&&po(U,A))||A===void 0&&!(ee in R))&&li(R,ee,A)}function Nt(R,ee){for(var A=R.length;A--;)if(po(R[A][0],ee))return A;return-1}function li(R,ee,A){ee=="__proto__"&&Ie?Ie(R,ee,{configurable:!0,enumerable:!0,value:A,writable:!0}):R[ee]=A}var bd=Pd();function on(R){return R==null?R===void 0?C:E:$e&&$e in Object(R)?_a(R):Ld(R)}function Ea(R){return Qt(R)&&on(R)==s}function wd(R){if(!Hr(R)||Dd(R))return!1;var ee=ho(R)?b:le;return ee.test(Bd(R))}function Ed(R){return Qt(R)&&go(R.length)&&!!J[on(R)]}function _d(R){if(!Hr(R))return Tl(R);var ee=Ol(R),A=[];for(var U in R)U=="constructor"&&(ee||!Re.call(R,U))||A.push(U);return A}function fo(R,ee,A,U,te){R!==ee&&bd(ee,function(he,Te){if(te||(te=new We),Hr(he))xd(R,ee,Te,A,fo,U,te);else{var Ce=U?U(xa(R,Te),he,Te+"",R,ee,te):void 0;Ce===void 0&&(Ce=he),tr(R,Te,Ce)}},Nl)}function xd(R,ee,A,U,te,he,Te){var Ce=xa(R,A),Fe=xa(ee,A),Be=Te.get(Fe);if(Be){tr(R,A,Be);return}var Ge=he?he(Ce,Fe,A+"",R,ee,Te):void 0,Mt=Ge===void 0;if(Mt){var jt=ui(Fe),an=!jt&&Il(Fe),mo=!jt&&!an&&Pl(Fe);Ge=Fe,jt||an||mo?ui(Ce)?Ge=Ce:$a(Ce)?Ge=Od(Ce):an?(Mt=!1,Ge=$d(Fe,!0)):mo?(Mt=!1,Ge=Ad(Fe,!0)):Ge=[]:di(Fe)||Ln(Fe)?(Ge=Ce,Ln(Ce)?Ge=kl(Ce):(!Hr(Ce)||ho(Ce))&&(Ge=kd(Fe))):Mt=!1}Mt&&(Te.set(Fe,Ge),te(Ge,Fe,U,he,Te),Te.delete(Fe)),tr(R,A,Ge)}function $l(R,ee){return Sa(Md(R,ee,Ll),R+"")}var Sd=Ie?function(R,ee){return Ie(R,"toString",{configurable:!0,enumerable:!1,value:Dl(ee),writable:!0})}:Ll;function $d(R,ee){if(ee)return R.slice();var A=R.length,U=O?O(A):new R.constructor(A);return R.copy(U),U}function Cd(R){var ee=new R.constructor(R.byteLength);return new x(ee).set(new x(R)),ee}function Ad(R,ee){var A=ee?Cd(R.buffer):R.buffer;return new R.constructor(A,R.byteOffset,R.length)}function Od(R,ee){var A=-1,U=R.length;for(ee||(ee=Array(U));++A<U;)ee[A]=R[A];return ee}function Td(R,ee,A,U){var te=!A;A||(A={});for(var he=-1,Te=ee.length;++he<Te;){var Ce=ee[he],Fe=U?U(A[Ce],R[Ce],Ce,A,R):void 0;Fe===void 0&&(Fe=R[Ce]),te?li(A,Ce,Fe):uo(A,Ce,Fe)}return A}function Id(R){return $l(function(ee,A){var U=-1,te=A.length,he=te>1?A[te-1]:void 0,Te=te>2?A[2]:void 0;for(he=R.length>3&&typeof he=="function"?(te--,he):void 0,Te&&Al(A[0],A[1],Te)&&(he=te<3?void 0:he,te=1),ee=Object(ee);++U<te;){var Ce=A[U];Ce&&R(ee,Ce,U,he)}return ee})}function Pd(R){return function(ee,A,U){for(var te=-1,he=Object(ee),Te=U(ee),Ce=Te.length;Ce--;){var Fe=Te[R?Ce:++te];if(A(he[Fe],Fe,he)===!1)break}return ee}}function ci(R,ee){var A=R.__data__;return Nd(ee)?A[typeof ee=="string"?"string":"hash"]:A.map}function Dn(R,ee){var A=ye(R,ee);return wd(A)?A:void 0}function _a(R){var ee=Re.call(R,$e),A=R[$e];try{R[$e]=void 0;var U=!0}catch{}var te=Se.call(R);return U&&(ee?R[$e]=A:delete R[$e]),te}function kd(R){return typeof R.constructor=="function"&&!Ol(R)?si(L(R)):{}}function Cl(R,ee){var A=typeof R;return ee=ee??a,!!ee&&(A=="number"||A!="symbol"&&V.test(R))&&R>-1&&R%1==0&&R<ee}function Al(R,ee,A){if(!Hr(A))return!1;var U=typeof ee;return(U=="number"?fi(A)&&Cl(ee,A.length):U=="string"&&ee in A)?po(A[ee],R):!1}function Nd(R){var ee=typeof R;return ee=="string"||ee=="number"||ee=="symbol"||ee=="boolean"?R!=="__proto__":R===null}function Dd(R){return!!gt&&gt in R}function Ol(R){var ee=R&&R.constructor,A=typeof ee=="function"&&ee.prototype||Me;return R===A}function Tl(R){var ee=[];if(R!=null)for(var A in Object(R))ee.push(A);return ee}function Ld(R){return Se.call(R)}function Md(R,ee,A){return ee=nn(ee===void 0?R.length-1:ee,0),function(){for(var U=arguments,te=-1,he=nn(U.length-ee,0),Te=Array(he);++te<he;)Te[te]=U[ee+te];te=-1;for(var Ce=Array(ee+1);++te<ee;)Ce[te]=U[te];return Ce[ee]=A(Te),Q(R,this,Ce)}}function xa(R,ee){if(!(ee==="constructor"&&typeof R[ee]=="function")&&ee!="__proto__")return R[ee]}var Sa=Fd(Sd);function Fd(R){var ee=0,A=0;return function(){var U=oo(),te=o-(U-A);if(A=U,te>0){if(++ee>=i)return arguments[0]}else ee=0;return R.apply(void 0,arguments)}}function Bd(R){if(R!=null){try{return Oe.call(R)}catch{}try{return R+""}catch{}}return""}function po(R,ee){return R===ee||R!==R&&ee!==ee}var Ln=Ea(function(){return arguments}())?Ea:function(R){return Qt(R)&&Re.call(R,"callee")&&!me.call(R,"callee")},ui=Array.isArray;function fi(R){return R!=null&&go(R.length)&&!ho(R)}function $a(R){return Qt(R)&&fi(R)}var Il=Ae||Rd;function ho(R){if(!Hr(R))return!1;var ee=on(R);return ee==m||ee==v||ee==u||ee==S}function go(R){return typeof R=="number"&&R>-1&&R%1==0&&R<=a}function Hr(R){var ee=typeof R;return R!=null&&(ee=="object"||ee=="function")}function Qt(R){return R!=null&&typeof R=="object"}function di(R){if(!Qt(R)||on(R)!=_)return!1;var ee=L(R);if(ee===null)return!0;var A=Re.call(ee,"constructor")&&ee.constructor;return typeof A=="function"&&A instanceof A&&Oe.call(A)==je}var Pl=N?pe(N):Ed;function kl(R){return Td(R,Nl(R))}function Nl(R){return fi(R)?Ht(R,!0):_d(R)}var jd=Id(function(R,ee,A){fo(R,ee,A)});function Dl(R){return function(){return R}}function Ll(R){return R}function Rd(){return!1}e.exports=jd}(ws,ws.exports),ws.exports;var Es={},_s={};Object.defineProperty(_s,"__esModule",{value:!0}),_s.default=void 0;function dv(e,t){return{handler:e,config:t}}dv.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 xT=dv;_s.default=xT,Object.defineProperty(Es,"__esModule",{value:!0}),Es.default=void 0;var ST=$T(_s);function $T(e){return e&&e.__esModule?e:{default:e}}var CT=ST.default;Es.default=CT;let lu=Es;var AT=(lu.__esModule?lu:{default:lu}).default,OT=function({matchUtilities:e,theme:t}){e({bs:r=>({blockSize:r})},{values:t("height")})},xs={};Object.defineProperty(xs,"__esModule",{value:!0}),xs.default=void 0;const pv=e=>Object.assign({},...Object.entries(e??{}).flatMap(([t,r])=>typeof r=="object"?Object.entries(pv(r)).map(([n,i])=>({[t+(n==="DEFAULT"?"":`-${n}`)]:i})):[{[`${t}`]:r}]));var TT=pv;xs.default=TT;var cu={};Object.defineProperty(cu,"__esModule",{value:!0}),cu.default=IT;function IT(e){return typeof e=="function"?e({}):e}var Ss={},$s={},PT={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($s,"__esModule",{value:!0}),$s.parseColor=FT,$s.formatColor=BT;var hv=kT(PT);function kT(e){return e&&e.__esModule?e:{default:e}}let NT=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,DT=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Cs="(?:\\d+|\\d*\\.\\d+)%?",gv="(?:\\s*,\\s*|\\s+)",LT="\\s*[,/]\\s*",MT=new RegExp(`^(rgb|hsl)a?\\(\\s*(${Cs})${gv}(${Cs})${gv}(${Cs})(?:${LT}(${Cs}))?\\s*\\)$`);function FT(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 hv.default)return{mode:"rgb",color:hv.default[e].map(o=>o.toString())};let t=e.replace(DT,(o,a,s,l,u)=>["#",a,a,s,s,l,l,u?u+u:""].join("")).match(NT);if(t!==null)return{mode:"rgb",color:[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)].map(o=>o.toString()),alpha:t[4]?(parseInt(t[4],16)/255).toString():void 0};let r=e.match(MT);if(r!==null){var n,i;return{mode:r[1],color:[r[2],r[3],r[4]].map(o=>o.toString()),alpha:(n=r[5])===null||n===void 0||(i=n.toString)===null||i===void 0?void 0:i.call(n)}}return null}function BT({mode:e,color:t,alpha:r}){let n=r!==void 0;return`${e}(${t.join(" ")}${n?` / ${r}`:""})`}Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.withAlphaValue=jT,Ss.default=RT;var As=$s;function jT(e,t,r){if(typeof e=="function")return e({opacityValue:t});let n=As.parseColor(e);return n===null?r:As.formatColor({...n,alpha:t})}function RT({color:e,property:t,variable:r}){let n=[].concat(t);if(typeof e=="function")return{[r]:"1",...Object.fromEntries(n.map(o=>[o,e({opacityVariable:r,opacityValue:`var(${r})`})]))};const i=As.parseColor(e);return i===null?Object.fromEntries(n.map(o=>[o,e])):i.alpha!==void 0?Object.fromEntries(n.map(o=>[o,e])):{[r]:"1",...Object.fromEntries(n.map(o=>[o,As.formatColor({...i,alpha:`var(${r})`})]))}}const mv=xs.default,_n=cu.default,Ti=Ss.default;var UT=function({corePlugins:e,matchUtilities:t,theme:r}){t({"border-lb":n=>e("borderOpacity")?Ti({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")?Ti({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,...i})=>i)(mv(r("borderColor"))),type:"color"}),t({"border-bs":n=>e("borderOpacity")?Ti({color:n,property:"border-block-start-color",variable:"--tw-border-opacity"}):{"border-block-start-color":_n(n)},"border-be":n=>e("borderOpacity")?Ti({color:n,property:"border-block-end-color",variable:"--tw-border-opacity"}):{"border-block-end-color":_n(n)},"border-is":n=>e("borderOpacity")?Ti({color:n,property:"border-inline-start-color",variable:"--tw-border-opacity"}):{"border-inline-start-color":_n(n)},"border-ie":n=>e("borderOpacity")?Ti({color:n,property:"border-inline-end-color",variable:"--tw-border-opacity"}):{"border-inline-end-color":_n(n)}},{values:(({DEFAULT:n,...i})=>i)(mv(r("borderColor"))),type:"color"})},WT=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")})},zT=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")})},HT=function({addUtilities:e}){e({".clear-start":{clear:"inline-start"},".clear-end":{clear:"inline-end"}})},VT=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"}})},GT=function({addUtilities:e}){e({".float-start":{float:"inline-start"},".float-end":{float:"inline-end"}})},KT=function({matchUtilities:e,theme:t}){e({is:r=>({inlineSize:r})},{values:t("width")})},qT=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")})},YT=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")})},JT=function({matchUtilities:e,theme:t}){e({"max-bs":r=>({maxBlockSize:r})},{values:t("maxHeight")})},XT=function({matchUtilities:e,theme:t}){e({"max-is":r=>({maxInlineSize:r})},{values:t("maxWidth")})},ZT=function({matchUtilities:e,theme:t}){e({"min-bs":r=>({minBlockSize:r})},{values:t("minHeight")})},QT=function({matchUtilities:e,theme:t}){e({"min-is":r=>({minInlineSize:r})},{values:t("minWidth")})},e6=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"}})},t6=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")})},r6=function({addUtilities:e}){e({".resize-block":{resize:"block"},".resize-inline":{resize:"inline"}})},n6=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"}})},i6=function({addUtilities:e}){e({".text-start":{textAlign:"start"},".text-end":{textAlign:"end"}})};const o6=AT,a6=OT,s6=UT,l6=WT,c6=zT,u6=HT,f6=VT,d6=GT,p6=KT,h6=qT,g6=YT,m6=JT,v6=XT,y6=ZT,b6=QT,w6=e6,E6=t6,_6=r6,x6=n6,S6=i6;o6(function(e){d6(e),u6(e),S6(e),_6(e),w6(e),a6(e),y6(e),m6(e),p6(e),b6(e),v6(e),g6(e),E6(e),x6(e),h6(e),f6(e),c6(e),s6(e),l6(e)});var $6=et&&et.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const C6=$6(iu),A6=["disabled","highlighted","placeholder"],vv={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"]};C6.default.withOptions(e=>({addUtilities:t,addVariant:r,e:n})=>{e=e||{variantPrefix:"radix"};const i=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-${i}${u}`]:{"transform-origin":`var(--radix-${u}-content-transform-origin)`}})}),A6.forEach(u=>{let d=`${i}${u}`,p=`data-${u}`;r(`${d}`,({modifySelectors:h,separator:m})=>{h(({className:v})=>`.${n(`${d}${m}${v}`)}[${p}]`)}),r(`group-${d}`,({modifySelectors:h,separator:m})=>{h(({className:v})=>`.group[${p}] .${n(`group-${d}${m}${v}`)}`)}),r(`peer-${d}`,({modifySelectors:h,separator:m})=>{h(({className:v})=>`.peer[${p}] ~ .${n(`peer-${d}${m}${v}`)}`)})}),Object.keys(vv).forEach(u=>{vv[u].forEach(d=>{let p=`${i}${u}-${d}`,h=`data-${u}="${d}"`;r(`${p}`,({modifySelectors:m,separator:v})=>{m(({className:y})=>`.${n(`${p}${v}${y}`)}[${h}]`)}),r(`group-${p}`,({modifySelectors:m,separator:v})=>{m(({className:y})=>`.group[${h}] .${n(`group-${p}${v}${y}`)}`)}),r(`peer-${p}`,({modifySelectors:m,separator:v})=>{m(({className:y})=>`.peer[${h}] ~ .${n(`peer-${p}${v}${y}`)}`)})})}),["accordion-content","collapsible-content","navigation-menu-viewport"].forEach(u=>{t({[`.w-${i}${u}`]:{width:`var(--radix-${u}-width)`}}),t({[`.h-${i}${u}`]:{height:`var(--radix-${u}-height)`}})}),["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.w-${i}${u}-content-available-width`]:{width:`var(--radix-${u}-content-available-width)`}}),t({[`.max-w-${i}${u}-content-available-width`]:{maxWidth:`var(--radix-${u}-content-available-width)`}}),t({[`.h-${i}${u}-content-available-height`]:{height:`var(--radix-${u}-content-available-height)`}}),t({[`.max-h-${i}${u}-content-available-height`]:{maxHeight:`var(--radix-${u}-content-available-height)`}}),t({[`.w-${i}${u}-trigger-width`]:{width:`var(--radix-${u}-trigger-width)`}}),t({[`.h-${i}${u}-trigger-height`]:{height:`var(--radix-${u}-trigger-height)`}})}),["toast-swipe-end","toast-swipe-move"].forEach(u=>{t({[`.translate-x-${i}${u}-x`]:{transform:`translateX(var(--radix-${u}-x))`}}),t({[`.translate-y-${i}${u}-y`]:{transform:`translateY(var(--radix-${u}-y))`}})})});function yv(e){return!Array.isArray(e[0])}function Os(e,t){const r=e.length,n=yv(e)?[e]:e,i=yv(t)?t.map(l=>[l]):t,o=i[0].length,a=i[0].map((l,u)=>i.map(d=>d[u]));let s=n.map(l=>a.map(u=>Array.isArray(l)?l.reduce((d,p,h)=>d+p*(u[h]||0),0):u.reduce((d,p)=>d+p*l,0)));return r===1&&(s=s[0]),o===1?s.map(l=>l[0]):s}function O6(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 bv(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 T6(e){return Os([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],e)}function wv(e){return Os([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],e)}function I6(e){return Os([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],e)}function Ev(e){return Os([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],e)}function P6(e){const t=.008856451679035631,r=24389/27,n=[.96422,1,.82521],o=e.map((a,s)=>a/n[s]).map(a=>a>t?Math.cbrt(a):(r*a+16)/116);return[116*o[1]-16,500*(o[0]-o[1]),200*(o[1]-o[2])]}function _v(e){const t=903.2962962962963,r=216/24389,n=[.96422,1,.82521],i=[];return i[1]=(e[0]+16)/116,i[0]=e[1]/500+i[1],i[2]=i[1]-e[2]/200,[Math.pow(i[0],3)>r?Math.pow(i[0],3):(116*i[0]-16)/t,e[0]>t*r?Math.pow((e[0]+16)/116,3):e[0]/t,Math.pow(i[2],3)>r?Math.pow(i[2],3):(116*i[2]-16)/t].map((a,s)=>a*n[s])}function uu(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 Ts(e){return[e[0],e[1]*Math.cos(e[2]*Math.PI/180),e[1]*Math.sin(e[2]*Math.PI/180)]}function k6(e){return uu(P6(I6(T6(O6(e)))))}function N6(e){return bv(wv(Ev(_v(Ts(e)))))}function D6(e){return bv(wv(Ev(_v(e))))}function xv(e,t,r){return N6([+e,+t,+r]).reduce((o,a)=>o&&a>=0-5e-6&&a<=1+5e-6,!0)}function L6(e){const r=uu(e),n=r[0];let i=r[1];const o=r[2];if(xv(n,i,o))return e;let a=i,s=0;for(i/=2;a-s>1e-4;)xv(n,i,o)?s=i:a=i,i=(a+s)/2;return Ts([n,i,o])}var M6=128;function F6(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function B6(e,t){const r=1-e;return r*r*t}function j6(e,t){return 2*(1-e)*e*t}function R6(e,t){return e*e*t}function fu(e,t,r,n){return B6(e,t)+j6(e,r)+R6(e,n)}function U6(e,t){const[r,n,i]=e.points;return[fu(t,r[0],n[0],i[0]),fu(t,r[1],n[1],i[1]),fu(t,r[2],n[2],i[2])]}function W6(e,t){const r=[];for(let n=0;n<=t;n++)r.push(U6(e,n/t));return r}function z6(e,t=M6){const r=[];let n;for(let i=0,o=e.curves;i<o.length;i++){const a=o[i],s=W6(a,t);for(const l of s)n&&F6(n,l)||(r.push(l),n=l)}return r}var Sv=.75;function H6(e,t,r){const n=[],i=(t-e)/r;for(let o=0;o<r;o++)n[o]=e+i*o;return n}var V6=(e,t,r)=>{const n=e<=0?0:Math.log(e),i=Math.log(t),o=(i-n)/r,a=[Math.pow(Math.E,n)];for(let s=1;s<r;s+=1)a.push(Math.pow(Math.E,n+o*s));return a.push(Math.pow(Math.E,i)),a};function G6(e,t,r=[0,100],n=Sv){if(e.length<=2)return[];const i=[],o=V6(Math.log10(r[0]),Math.log10(r[1]),t),a=H6(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],o[l]*(1-n)+a[l]*n));for(;u>e[s+1][0];)s++;const[d,p,h]=e[s],[m,v,y]=e[s+1],w=(u-d)/(m-d);i[l]=[d+(m-d)*w,p+(v-p)*w,h+(y-h)*w]}return i.map(L6)}function K6(e,t=16,r=[0,100],n=Sv,i=24){return G6(z6(e,Math.ceil(i*(1+Math.abs(e.torsion||1))/2)).map(o=>X6(o,e.torsion,e.torsionT0)),t,r,n)}function q6(e){return`#${e.map(t=>(t<0?0:Math.floor(t>=1?255:t*256)).toString(16).padStart(2,"0")).join("")}`}function $v(e){return q6(D6(e))}function Y6(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 J6(e){return k6(Y6(e))}function X6(e,t=0,r=50){const n=e[0],[i,o,a]=uu(e),s=t*(n-r);return Ts([i,o,a+s])}function Z6({keyColor:e,darkCp:t,lightCp:r,hueTorsion:n}){const i=[0,0,0],o=[100,0,0],a=Ts(e),[s,l,u]=a,d=[s*(1-t),l,u],p=[s+(100-s)*r,l,u];return{curves:[{points:[i,d,a]},{points:[a,p,o]}],torsion:n,torsionT0:s}}const du="-";function Q6(e){const t=t3(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;function i(a){const s=a.split(du);return s[0]===""&&s.length!==1&&s.shift(),Cv(s,t)||e3(a)}function o(a,s){const l=r[a]||[];return s&&n[a]?[...l,...n[a]]:l}return{getClassGroupId:i,getConflictingClassGroupIds:o}}function Cv(e,t){var a;if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),i=n?Cv(e.slice(1),n):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(du);return(a=t.validators.find(({validator:s})=>s(o)))==null?void 0:a.classGroupId}const Av=/^\[(.+)\]$/;function e3(e){if(Av.test(e)){const t=Av.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function t3(e){const{theme:t,prefix:r}=e,n={nextPart:new Map,validators:[]};return n3(Object.entries(e.classGroups),r).forEach(([o,a])=>{pu(a,n,o,t)}),n}function pu(e,t,r,n){e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Ov(t,i);o.classGroupId=r;return}if(typeof i=="function"){if(r3(i)){pu(i(n),t,r,n);return}t.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([o,a])=>{pu(a,Ov(t,o),r,n)})})}function Ov(e,t){let r=e;return t.split(du).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function r3(e){return e.isThemeGetter}function n3(e,t){return t?e.map(([r,n])=>{const i=n.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[r,i]}):e}function i3(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;function i(o,a){r.set(o,a),t++,t>e&&(t=0,n=r,r=new Map)}return{get(o){let a=r.get(o);if(a!==void 0)return a;if((a=n.get(o))!==void 0)return i(o,a),a},set(o,a){r.has(o)?r.set(o,a):i(o,a)}}}const Tv="!";function o3(e){const t=e.separator,r=t.length===1,n=t[0],i=t.length;return function(a){const s=[];let l=0,u=0,d;for(let y=0;y<a.length;y++){let w=a[y];if(l===0){if(w===n&&(r||a.slice(y,y+i)===t)){s.push(a.slice(u,y)),u=y+i;continue}if(w==="/"){d=y;continue}}w==="["?l++:w==="]"&&l--}const p=s.length===0?a:a.substring(u),h=p.startsWith(Tv),m=h?p.substring(1):p,v=d&&d>u?d-u:void 0;return{modifiers:s,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:v}}}function a3(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(n=>{n[0]==="["?(t.push(...r.sort(),n),r=[]):r.push(n)}),t.push(...r.sort()),t}function s3(e){return{cache:i3(e.cacheSize),splitModifiers:o3(e),...Q6(e)}}const l3=/\s+/;function c3(e,t){const{splitModifiers:r,getClassGroupId:n,getConflictingClassGroupIds:i}=t,o=new Set;return e.trim().split(l3).map(a=>{const{modifiers:s,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:d}=r(a);let p=n(d?u.substring(0,d):u),h=!!d;if(!p){if(!d)return{isTailwindClass:!1,originalClassName:a};if(p=n(u),!p)return{isTailwindClass:!1,originalClassName:a};h=!1}const m=a3(s).join(":");return{isTailwindClass:!0,modifierId:l?m+Tv:m,classGroupId:p,originalClassName:a,hasPostfixModifier:h}}).reverse().filter(a=>{if(!a.isTailwindClass)return!0;const{modifierId:s,classGroupId:l,hasPostfixModifier:u}=a,d=s+l;return o.has(d)?!1:(o.add(d),i(l,u).forEach(p=>o.add(s+p)),!0)}).reverse().map(a=>a.originalClassName).join(" ")}function u3(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Iv(t))&&(n&&(n+=" "),n+=r);return n}function Iv(e){if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=Iv(e[n]))&&(r&&(r+=" "),r+=t);return r}function Pv(e,...t){let r,n,i,o=a;function a(l){const u=t.reduce((d,p)=>p(d),e());return r=s3(u),n=r.cache.get,i=r.cache.set,o=s,s(l)}function s(l){const u=n(l);if(u)return u;const d=c3(l,r);return i(l,d),d}return function(){return o(u3.apply(null,arguments))}}function yt(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const kv=/^\[(?:([a-z-]+):)?(.+)\]$/i,f3=/^\d+\/\d+$/,d3=new Set(["px","full","screen"]),p3=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,h3=/\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$/,g3=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,m3=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,v3=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function jr(e){return xn(e)||d3.has(e)||f3.test(e)}function Qr(e){return ki(e,"length",w3)}function xn(e){return!!e&&!Number.isNaN(Number(e))}function Wo(e){return ki(e,"number",xn)}function Ii(e){return!!e&&Number.isInteger(Number(e))}function Nv(e){return e.endsWith("%")&&xn(e.slice(0,-1))}function Ue(e){return kv.test(e)}function en(e){return p3.test(e)}const y3=new Set(["length","size","percentage"]);function Dv(e){return ki(e,y3,Bv)}function Lv(e){return ki(e,"position",Bv)}const b3=new Set(["image","url"]);function Mv(e){return ki(e,b3,_3)}function Fv(e){return ki(e,"",E3)}function Pi(){return!0}function ki(e,t,r){const n=kv.exec(e);return n?n[1]?typeof t=="string"?n[1]===t:t.has(n[1]):r(n[2]):!1}function w3(e){return h3.test(e)&&!g3.test(e)}function Bv(){return!1}function E3(e){return m3.test(e)}function _3(e){return v3.test(e)}const Ni=Object.defineProperty({__proto__:null,isAny:Pi,isArbitraryImage:Mv,isArbitraryLength:Qr,isArbitraryNumber:Wo,isArbitraryPosition:Lv,isArbitraryShadow:Fv,isArbitrarySize:Dv,isArbitraryValue:Ue,isInteger:Ii,isLength:jr,isNumber:xn,isPercent:Nv,isTshirtSize:en},Symbol.toStringTag,{value:"Module"});function jv(){const e=yt("colors"),t=yt("spacing"),r=yt("blur"),n=yt("brightness"),i=yt("borderColor"),o=yt("borderRadius"),a=yt("borderSpacing"),s=yt("borderWidth"),l=yt("contrast"),u=yt("grayscale"),d=yt("hueRotate"),p=yt("invert"),h=yt("gap"),m=yt("gradientColorStops"),v=yt("gradientColorStopPositions"),y=yt("inset"),w=yt("margin"),E=yt("opacity"),_=yt("padding"),S=yt("saturate"),$=yt("scale"),k=yt("sepia"),P=yt("skew"),C=yt("space"),T=yt("translate"),D=()=>["auto","contain","none"],j=()=>["auto","hidden","clip","visible","scroll"],F=()=>["auto",Ue,t],M=()=>[Ue,t],Z=()=>["",jr,Qr],Y=()=>["auto",xn,Ue],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],ce=()=>["start","end","center","between","around","evenly","stretch"],se=()=>["","0",Ue],ge=()=>["auto","avoid","all","avoid-page","page","left","right","column"],le=()=>[xn,Wo],V=()=>[xn,Ue];return{cacheSize:500,separator:":",theme:{colors:[Pi],spacing:[jr,Qr],blur:["none","",en,Ue],brightness:le(),borderColor:[e],borderRadius:["none","","full",en,Ue],borderSpacing:M(),borderWidth:Z(),contrast:le(),grayscale:se(),hueRotate:V(),invert:se(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Nv,Qr],inset:F(),margin:F(),opacity:le(),padding:M(),saturate:le(),scale:le(),sepia:se(),skew:V(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",Ue]}],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","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...X(),Ue]}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ii,Ue]}],basis:[{basis:F()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ue]}],grow:[{grow:se()}],shrink:[{shrink:se()}],order:[{order:["first","last","none",Ii,Ue]}],"grid-cols":[{"grid-cols":[Pi]}],"col-start-end":[{col:["auto",{span:["full",Ii,Ue]},Ue]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[Pi]}],"row-start-end":[{row:["auto",{span:[Ii,Ue]},Ue]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ue]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...ce()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ce(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ce(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[w]}],mx:[{mx:[w]}],my:[{my:[w]}],ms:[{ms:[w]}],me:[{me:[w]}],mt:[{mt:[w]}],mr:[{mr:[w]}],mb:[{mb:[w]}],ml:[{ml:[w]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ue,t]}],"min-w":[{"min-w":[Ue,t,"min","max","fit"]}],"max-w":[{"max-w":[Ue,t,"none","full","min","max","fit","prose",{screen:[en]},en]}],h:[{h:[Ue,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ue,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ue,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ue,t,"auto","min","max","fit"]}],"font-size":[{text:["base",en,Qr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wo]}],"font-family":[{font:[Pi]}],"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",Ue]}],"line-clamp":[{"line-clamp":["none",xn,Wo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",jr,Ue]}],"list-image":[{"list-image":["none",Ue]}],"list-style-type":[{list:["none","disc","decimal",Ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[E]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[E]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",jr,Qr]}],"underline-offset":[{"underline-offset":["auto",jr,Ue]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ue]}],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",Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[E]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Lv]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Dv]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Mv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"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":[E]}],"border-style":[{border:[...ne(),"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":[E]}],"divide-style":[{divide:ne()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[jr,Ue]}],"outline-w":[{outline:[jr,Qr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[E]}],"ring-offset-w":[{"ring-offset":[jr,Qr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",en,Fv]}],"shadow-color":[{shadow:[Pi]}],opacity:[{opacity:[E]}],"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,Ue]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[p]}],saturate:[{saturate:[S]}],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":[d]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[E]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"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",Ue]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",Ue]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[$]}],"scale-x":[{"scale-x":[$]}],"scale-y":[{"scale-y":[$]}],rotate:[{rotate:[Ii,Ue]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ue]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[jr,Qr,Wo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},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"],size:["w","h"],"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"],"line-clamp":["display","overflow"],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"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function Rv(e,{cacheSize:t,prefix:r,separator:n,extend:i={},override:o={}}){Is(e,"cacheSize",t),Is(e,"prefix",r),Is(e,"separator",n);for(const a in o)x3(e[a],o[a]);for(const a in i)S3(e[a],i[a]);return e}function Is(e,t,r){r!==void 0&&(e[t]=r)}function x3(e,t){if(t)for(const r in t)Is(e,r,t[r])}function S3(e,t){if(t)for(const r in t){const n=t[r];n!==void 0&&(e[r]=(e[r]||[]).concat(n))}}function $3(e,...t){return typeof e=="function"?Pv(jv,e,...t):Pv(()=>Rv(jv(),e),...t)}var C3="Expected a function",Uv="__lodash_hash_undefined__",Wv=1/0,A3="[object Function]",O3="[object GeneratorFunction]",T3="[object Symbol]",I3=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P3=/^\w*$/,k3=/^\./,N3=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,D3=/[\\^$.*+?()[\]{}|]/g,L3=/\\(\\)?/g,M3=/^\[object .+?Constructor\]$/,F3=typeof et=="object"&&et&&et.Object===Object&&et,B3=typeof self=="object"&&self&&self.Object===Object&&self,hu=F3||B3||Function("return this")();function j3(e,t){return e==null?void 0:e[t]}function R3(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var U3=Array.prototype,W3=Function.prototype,zv=Object.prototype,gu=hu["__core-js_shared__"],Hv=function(){var e=/[^.]+$/.exec(gu&&gu.keys&&gu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Vv=W3.toString,mu=zv.hasOwnProperty,Gv=zv.toString,z3=RegExp("^"+Vv.call(mu).replace(D3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Kv=hu.Symbol,H3=U3.splice,V3=Jv(hu,"Map"),zo=Jv(Object,"create"),qv=Kv?Kv.prototype:void 0,Yv=qv?qv.toString:void 0;function Yn(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 G3(){this.__data__=zo?zo(null):{}}function K3(e){return this.has(e)&&delete this.__data__[e]}function q3(e){var t=this.__data__;if(zo){var r=t[e];return r===Uv?void 0:r}return mu.call(t,e)?t[e]:void 0}function Y3(e){var t=this.__data__;return zo?t[e]!==void 0:mu.call(t,e)}function J3(e,t){var r=this.__data__;return r[e]=zo&&t===void 0?Uv:t,this}Yn.prototype.clear=G3,Yn.prototype.delete=K3,Yn.prototype.get=q3,Yn.prototype.has=Y3,Yn.prototype.set=J3;function Di(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 X3(){this.__data__=[]}function Z3(e){var t=this.__data__,r=Ps(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():H3.call(t,r,1),!0}function Q3(e){var t=this.__data__,r=Ps(t,e);return r<0?void 0:t[r][1]}function eI(e){return Ps(this.__data__,e)>-1}function tI(e,t){var r=this.__data__,n=Ps(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Di.prototype.clear=X3,Di.prototype.delete=Z3,Di.prototype.get=Q3,Di.prototype.has=eI,Di.prototype.set=tI;function Jn(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 rI(){this.__data__={hash:new Yn,map:new(V3||Di),string:new Yn}}function nI(e){return ks(this,e).delete(e)}function iI(e){return ks(this,e).get(e)}function oI(e){return ks(this,e).has(e)}function aI(e,t){return ks(this,e).set(e,t),this}Jn.prototype.clear=rI,Jn.prototype.delete=nI,Jn.prototype.get=iI,Jn.prototype.has=oI,Jn.prototype.set=aI;function Ps(e,t){for(var r=e.length;r--;)if(vI(e[r][0],t))return r;return-1}function sI(e,t){t=fI(t,e)?[t]:uI(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[gI(t[r++])];return r&&r==n?e:void 0}function lI(e){if(!Zv(e)||pI(e))return!1;var t=yI(e)||R3(e)?z3:M3;return t.test(mI(e))}function cI(e){if(typeof e=="string")return e;if(yu(e))return Yv?Yv.call(e):"";var t=e+"";return t=="0"&&1/e==-Wv?"-0":t}function uI(e){return Xv(e)?e:hI(e)}function ks(e,t){var r=e.__data__;return dI(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Jv(e,t){var r=j3(e,t);return lI(r)?r:void 0}function fI(e,t){if(Xv(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||yu(e)?!0:P3.test(e)||!I3.test(e)||t!=null&&e in Object(t)}function dI(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function pI(e){return!!Hv&&Hv in e}var hI=vu(function(e){e=wI(e);var t=[];return k3.test(e)&&t.push(""),e.replace(N3,function(r,n,i,o){t.push(i?o.replace(L3,"$1"):n||r)}),t});function gI(e){if(typeof e=="string"||yu(e))return e;var t=e+"";return t=="0"&&1/e==-Wv?"-0":t}function mI(e){if(e!=null){try{return Vv.call(e)}catch{}try{return e+""}catch{}}return""}function vu(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(C3);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a),a};return r.cache=new(vu.Cache||Jn),r}vu.Cache=Jn;function vI(e,t){return e===t||e!==e&&t!==t}var Xv=Array.isArray;function yI(e){var t=Zv(e)?Gv.call(e):"";return t==A3||t==O3}function Zv(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function bI(e){return!!e&&typeof e=="object"}function yu(e){return typeof e=="symbol"||bI(e)&&Gv.call(e)==T3}function wI(e){return e==null?"":cI(e)}function EI(e,t,r){var n=e==null?void 0:sI(e,t);return n===void 0?r:n}var _I=EI;const xI=cn(_I);var SI=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950],$I=[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,Qv={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}},st=Object.keys(Qv).reduce((e,t)=>{const r=t==="neutral"||t==="primary",n=Qv[t],i=Z6({...n,keyColor:J6(n.keyColor)}),o=K6(i,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 $v(o[s/50]);{const l=s%50/50,u=1-l,[d,p,h]=o[Math.floor(s/50)],[m,v,y]=o[Math.ceil(s/50)];return $v([d*u+m*l,p*u+v*l,h*u+y*l])}};return e[t]=(r?$I:SI).reduce((s,l)=>(s[l]=a(l),s),{}),e},{}),CI={scrim:{light:`${st.neutral[75]}A6`,dark:`${st.neutral[900]}A6`},attention:{light:"#ffffff",dark:st.neutral[900]},base:{light:st.neutral[25],dark:st.neutral[850],fg:{light:"#000000",dark:"#ffffff"}},description:{light:st.neutral[300],dark:st.neutral[500]},baseGlass:{light:`${st.neutral[25]}E6`,dark:`${st.neutral[850]}E6`},input:{light:st.neutral[50],dark:st.neutral[825]},modal:{light:"#ffffff",dark:`${st.neutral[750]}`},modalSelected:{light:st.neutral[50],dark:st.neutral[825]},hover:{light:st.neutral[37],dark:st.neutral[800]},accent:{light:st.primary[550],dark:st.primary[550],fg:{light:st.primary[550],dark:st.primary[400]}},accentHover:{light:st.primary[600],dark:st.primary[500]},unAccent:{light:st.neutral[500],dark:st.neutral[400]},unAccentHover:{light:st.neutral[400],dark:st.neutral[500]},separator:{light:st.neutral[75],dark:st.neutral[750]},inverse:{light:"#ffffff",dark:"#ffffff"},unavailable:{light:st.neutral[100],dark:st.neutral[600]}};gT(({addUtilities:e,theme:t,e:r})=>{const n=t("semanticColors"),i=Object.entries(n).map(([o,a])=>{var s,l,u,d;return{[`.fg-${r(`${o}`)}`]:{color:`${((s=a.fg)==null?void 0:s.light)??a.light}`},[`.dark .fg-${r(`${o}`)}`]:{color:`${((l=a.fg)==null?void 0:l.dark)??a.dark}`},[`.surface-${r(`${o}`)}`]:{backgroundColor:`${a.light}`},[`.dark .surface-${r(`${o}`)}`]:{backgroundColor:`${a.dark}`},[`.separator-${r(`${o}`)}`]:{borderColor:`${((u=a.fg)==null?void 0:u.light)??a.light}`},[`.dark .separator-${r(`${o}`)}`]:{borderColor:`${((d=a.fg)==null?void 0:d.dark)??a.dark}`}}});e(i)});var bu="fill-[--surface-bg] dark:fill-[--surface-bg]",AI="fill-[--surface-bg] dark:fill-[--surface-bg]",Ns="min-bs-[2.5rem]",OI="pli-3",TI="pli-4",II=`${Ns} ${OI}`,PI=`${Ns} ${TI}`,Ds="min-bs-[2.5rem] pointer-fine:min-bs-[2rem]",kI="pli-2",NI="pli-2.5",DI=`${Ds} ${kI}`,LI=`${Ds} ${NI}`,e0=(e="coarse")=>e==="fine"?Ds:Ns,Ls="opacity-40 cursor-not-allowed shadow-none",MI="data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed",wu=({elevation:e})=>[e==="group"?"shadow-sm":e==="chrome"?"shadow-none":"shadow"],Li=({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",t0="focus:outline-none focus-visible:outline-none focus:ring-0 ring-0 focus:border-0 border-0",FI="ring-2 ring-offset-0 ring-primary-350 ring-offset-white dark:ring-primary-450 dark:ring-offset-black",BI="transition-colors duration-100 linear hover:surface-hover",r0="hover:surface-hover",jI="fixed inset-0 z-0 overflow-auto overscroll-auto scroll-smooth",n0="will-change-[opacity,transform] data-[side=top]:animate-slideDownAndFade data-[side=right]:animate-slideLeftAndFade data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade",RI="will-change-[opacity,transform] animate-slideUpAndFade",UI="separator-separator",WI="self-stretch border-ie",i0="self-stretch border-be",zI="data-[highlighted]:bg-primary-100 dark:data-[highlighted]:bg-primary-850 hover:data-[highlighted]:bg-primary-150 hover:dark:data-[highlighted]:bg-primary-800",HI="base-surface md:fixed-surface backdrop-blur-md dark:backdrop-blur-lg",VI="separator-separator",GI="separator-separator",Mi="modal-surface",Wt=()=>[Ni.isLength],Fi=()=>["auto",Ni.isLength],Bi=()=>["",Ni.isLength],Sn=()=>[Ni.isAny],$n=()=>["none","","sm","md","lg","xl","2xl","3xl","full",Ni.isArbitraryLength],KI={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:Wt()}],"logical.min-bs":[{"min-bs":Sn()}],"logical.max-bs":[{"max-bs":Sn()}],"logical.is":[{is:Wt()}],"logical.min-is":[{"min-is":Sn()}],"logical.max-is":[{"max-is":Sn()}],"logical.mlb":[{mlb:Wt()}],"logical.mli":[{mli:Wt()}],"logical.mbs":[{mbs:Wt()}],"logical.mbe":[{mbe:Wt()}],"logical.mis":[{mis:Wt()}],"logical.mie":[{mie:Wt()}],"logical.plb":[{plb:Wt()}],"logical.pli":[{pli:Wt()}],"logical.pbs":[{pbs:Wt()}],"logical.pbe":[{pbe:Wt()}],"logical.pis":[{pis:Wt()}],"logical.pie":[{pie:Wt()}],"logical.space-b":[{"space-b":Wt()}],"logical.space-i":[{"space-i":Wt()}],"logical.inset-block":[{"inset-block":Fi()}],"logical.inset-inline":[{"inset-inline":Fi()}],"logical.block-start":[{"block-start":Fi()}],"logical.block-end":[{"block-end":Fi()}],"logical.inline-start":[{"inline-start":Fi()}],"logical.inline-end":[{"inline-end":Fi()}],"logical.border-bs":[{"border-bs":Bi()}],"logical.border-be":[{"border-be":Bi()}],"logical.border-is":[{"border-is":Bi()}],"logical.border-ie":[{"border-ie":Bi()}],"logical.border-color-bs":[{"border-bs":Sn()}],"logical.border-color-be":[{"border-be":Sn()}],"logical.border-color-is":[{"border-is":Sn()}],"logical.border-color-ie":[{"border-ie":Sn()}],"logical.rounded-bs":[{"rounded-bs":$n()}],"logical.rounded-be":[{"rounded-be":$n()}],"logical.rounded-is":[{"rounded-is":$n()}],"logical.rounded-ie":[{"rounded-ie":$n()}],"logical.rounded-ss":[{"rounded-ss":$n()}],"logical.rounded-se":[{"rounded-se":$n()}],"logical.rounded-es":[{"rounded-es":$n()}],"logical.rounded-ee":[{"rounded-ee":$n()}],"logical.divide-b":[{"divide-b":Bi()}],"logical.divide-i":[{"divide-i":Bi()}]},qI=e=>Rv(e,{extend:{classGroups:KI,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"]}}}),Eu=Object.keys(CI),ue=$3({extend:{classGroups:{"font-family":["font-body","font-mono"],"font-weight":["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black",Ni.isArbitraryNumber],foreground:Eu.map(e=>`fg-${e}`),surface:Eu.map(e=>`surface-${e}`),separator:Eu.map(e=>`separator-${e}`)}}},qI),_u=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"]]),o0=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"]]),Ho=new Set(_u.keys()),xu=o0.get.bind(o0),a0=_u.get.bind(_u),qe=e=>ue(xu(e),a0(e)),s0=(e,t)=>{if(Ho.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,i=Math.floor(e/2)*2,o=Math.floor(e/4)*4;return Ho.has(n)?n:Ho.has(r)?r:Ho.has(i)?i:Ho.has(o)?o:t}},l0=e=>e==="px"?1:e,Su="placeholder-neutral-500 dark:placeholder-neutral-400",It="text-xs font-normal fg-description",YI="text-xs font-normal fg-base",JI="text-xs font-normal",XI="text-xs font-medium text-success-550 dark:text-success-300",ZI="text-xs font-medium text-info-550 dark:text-info-300",QI="text-xs font-medium text-warning-550 dark:text-warning-300",eP="text-xs font-medium text-error-550 dark:text-error-300",tP=e=>{switch(e){case"success":return XI;case"info":return ZI;case"warning":return QI;case"error":return eP;default:return}},rP="bg-neutral-25 dark:bg-neutral-850",nP="shadow-success-500/50 dark:shadow-success-500/50 text-success-600 dark:text-success-100 bg-success-50 dark:bg-success-900",iP="shadow-info-500/50 dark:shadow-info-500/50 text-info-600 dark:text-info-100 bg-info-50 dark:bg-info-900",oP="shadow-warning-500/50 dark:shadow-warning-500/50 text-warning-600 dark:text-warning-100 bg-warning-50 dark:bg-warning-900",aP="shadow-error-500/50 dark:shadow-error-500/50 text-error-600 dark:text-error-100 bg-error-50 dark:bg-error-900",sP=e=>{switch(e){case"success":return nP;case"info":return iP;case"warning":return oP;case"error":return aP;default:return rP}},lP=(e,...t)=>ue("overflow-anchored overflow-auto",...t),cP=(e,...t)=>ue("overflow-anchor is-px bs-px",...t),uP={root:lP,anchor:cP},fP=({size:e=10,inGroup:t},...r)=>ue("relative inline-flex shrink-0",qe(e),t&&(e==="px"||e<=3?"-mie-1":"-mie-2"),...r),dP=({srOnly:e},...t)=>ue(e&&"sr-only",...t),pP=({srOnly:e},...t)=>ue(It,e&&"sr-only",...t),hP=({variant:e},...t)=>ue("is-full bs-full bg-[--surface-bg]",e==="circle"?"rounded-full":"rounded",...t),gP=({status:e,size:t=3},...r)=>ue("absolute block-end-0 inline-end-0",qe(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),mP=({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"?"separator-separator":e==="internal"?"border-fuchsia-600":"border-[color:var(--surface-bg)]",r==="pulse"?"animate-halo-pulse":"",...n),vP=(e,...t)=>ue("fill-white",...t),yP=(e,...t)=>ue("inline-flex items-center",...t),bP=({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&&xu(e),...r),wP=({srOnly:e},...t)=>ue(e?"sr-only":It,...t),EP={root:fP,label:dP,description:pP,statusIcon:gP,frame:hP,ring:mP,fallbackText:vP,group:yP,groupLabel:bP,groupDescription:wP},_P=(e,...t)=>ue("shrink-0 flex items-center",...t),xP=(e,...t)=>ue("contents",...t),SP=(e,...t)=>ue("contents",...t),$P=(e,...t)=>ue(...t),CP=(e,...t)=>ue("opacity-50",...t),AP={root:_P,list:xP,listItem:SP,current:$P,separator:CP},OP="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",TP="surface-input",IP=TP+" data-[state=open]:surface-input aria-pressed:fg-accent aria-pressed:surface-base aria-checked:fg-accent aria-checked:surface-base",PP=r0+" hover:text-inherit data-[state=open]:surface-input aria-pressed:fg-accent aria-pressed:surface-base aria-checked:fg-accent aria-checked:surface-base",kP=(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"?LI:PI,e.disabled&&Ls,!e.inGroup&&"rounded-md",!e.textWrap&&"text-ellipsis whitespace-nowrap",!e.disabled&&!e.inGroup&&(r==="default"||r==="primary")&&wu({elevation:e.elevation}),!e.disabled&&BI,r!=="outline"&&" hover:border-transparent dark:hover:border-transparent",r==="default"&&IP,!e.disabled&&r==="ghost"&&PP,r==="primary"&&OP,r==="outline"&&"border separator-base",!e.disabled&&Rr,"group",...t)},NP=(e,...t)=>ue("inline-flex rounded-md [&>:first-child]:rounded-is-md [&>:last-child]:rounded-ie-md [&>button]:relative",wu({elevation:e.elevation}),...t),DP={root:kP,group:NP},LP="overflow-auto grid place-items-center p-2 md:p-4 lg:p-8",MP=(e,...t)=>ue("fixed z-20 inset-inline-0 block-start-0 bs-[100dvb] surface-scrim",LP,...t),FP=({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",RI,Li({elevation:t}),"surface-baseGlass backdrop-blur",GI,Rr,...r),BP=({srOnly:e},...t)=>ue("rounded shrink-0 text-xl font-medium",e&&"sr-only",...t),jP=({srOnly:e},...t)=>ue("mlb-2",It,e&&"sr-only",...t),RP={overlay:MP,content:FP,title:BP,description:jP},UP=(e,...t)=>ue("rounded-md p-1 max-bs-[--radix-dropdown-menu-content-available-height] overflow-y-auto",...t),WP=(e,...t)=>ue("is-48 rounded-md md:is-56 z-[30]",n0,Mi,Li({elevation:"group"}),...t),zP=(e,...t)=>ue("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2 text-sm","data-[highlighted]:surface-hover",t0,MI,...t),HP=(e,...t)=>ue("mlb-1 mli-2 bs-px surface-separator",...t),VP=(e,...t)=>ue(It,"select-none pli-2 plb-2",...t),GP=(e,...t)=>ue(bu,...t),KP={content:WP,viewport:UP,item:zP,separator:HP,groupLabel:VP,arrow:GP},qP="",YP="shadow-success-500/50 dark:shadow-success-600/50",JP="shadow-info-500/50 dark:shadow-info-600/50",XP="shadow-warning-500/50 dark:shadow-warning-600/50",ZP="shadow-error-500/50 dark:shadow-error-600/50",c0="transition-colors bg-[--input-bg] focus:surface-attention border-transparent focus:border-transparent",u0="hover:bg-[--input-bg-hover] dark:hover:bg-[--input-bg-hover] focus:hover:surface-attention",f0="shadow-inner transition-colors surface-unAccent aria-checked:surface-accent aria-[checked=mixed]:surface-accent",d0="hover:surface-unAccentHover hover:aria-checked:surface-accentHover hover:aria-[checked=mixed]:surface-accentHover",p0=e=>{switch(e){case"success":return YP;case"info":return JP;case"warning":return XP;case"error":return ZP;default:return null}},QP=e=>["is-full bg-transparent text-current",e.density==="fine"?Ds:Ns,Su,t0,e.disabled&&Ls],ek=e=>["is-full text-base rounded text-[color:var(--surface-text)]",c0,Su,e.density==="fine"?DI:II,e.disabled?Ls:u0],tk=e=>["is-full text-base rounded text-[color:var(--surface-text)]",c0,u0,e.focused&&"surface-attention",Su,p0(e.validationValence),e.disabled&&Ls,e.focused&&FI],rk=(e,...t)=>e.variant==="subdued"?ue(...QP(e),...t):e.variant==="static"?ue(...tk(e),...t):ue(...ek(e),!e.disabled&&Rr,p0(e.validationValence)||qP,...t),nk=({size:e=5,disabled:t},...r)=>ue(qe(e),f0,!t&&d0,"shrink-0 flex items-center justify-center rounded text-white",Rr,...r),ik=({size:e=5},...t)=>ue(qe(s0(l0(e)*.7,4)),...t),ok=({size:e=5,disabled:t},...r)=>ue(xu(e),a0(s0(l0(e)*1.75,9)),f0,!t&&d0,"cursor-pointer shrink-0 rounded-full pli-1 mx-1 relative",Rr,...r),ak=({size:e=5},...t)=>ue(qe(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),sk=(e,...t)=>ue("font-mono selection:bg-transparent mli-auto",e.disabled&&"cursor-not-allowed",...t),lk=(e,...t)=>ue("block text-sm font-medium",e.srOnly&&"sr-only",...t),ck=(e,...t)=>ue(It,e.srOnly&&"sr-only",...t),uk=(e,...t)=>ue("leading-none mlb-1",e.srOnly&&"sr-only",...t),fk=(e,...t)=>ue(It,e.srOnly?"sr-only":tP(e.validationValence),...t),dk={input:rk,inputWithSegments:sk,checkbox:nk,checkboxIndicator:ik,label:lk,description:ck,validation:fk,switch:ok,switchThumb:ak,descriptionAndValidation:uk},pk=(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),hk={root:pk},gk=(e,...t)=>ue(...t),mk=({collapsible:e},...t)=>ue(!e&&"flex",...t),vk=({density:e},...t)=>ue(qe(e==="fine"?8:10),"shrink-0 flex items-start justify-center",...t),yk=({density:e},...t)=>ue(e0(e),...t),bk=(e,...t)=>ue(qe(5),"mbs-2.5",...t),wk=({density:e},...t)=>ue("is-5 rounded flex justify-center items-center",e0(e),r0,Rr,...t),Ek=(e,...t)=>ue(qe(5),...t),_k={root:gk,item:{root:mk,endcap:vk,heading:yk,dragHandleIcon:bk,openTrigger:wk,openTriggerIcon:Ek}},ji={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]"}},xk=({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",VI,r==="inline-start"?ji.start.width:ji.end.width,r==="inline-start"?e?"inline-start-0":ue("-inline-start-[100vw]",ji.start.sidebar):t?"inline-end-0":ue("-inline-end-[100vw]",ji.end.sidebar),r==="inline-start"?"border-ie":"border-is",HI,...n),Sk=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,bounce:n},...i)=>ue("transition-[padding-inline-start,padding-inline-end] duration-200 ease-in-out",e&&t?ji.start.content:"pis-0",e&&r?ji.end.content:"pie-0",n&&jI,...i),$k=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,side:n},...i)=>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",...i),Ck={content:Sk,sidebar:xk,overlay:$k},Ak=({valence:e,elevation:t},...r)=>ue("p-3 rounded-md max-is-full overflow-auto",wu({elevation:t}),sP(e),...r),Ok=(e,...t)=>ue("text-base font-medium mb-2",...t),Tk=(e,...t)=>ue(...t),Ik={root:Ak,title:Ok,body:Tk},Pk=({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),kk=(e,...t)=>ue("z-[30] rounded-lg",Mi,Li({elevation:"group"}),Rr,...t),Nk=(e,...t)=>ue(AI,...t),Dk={content:kk,viewport:Pk,arrow:Nk},Lk=(e,...t)=>ue("overflow-hidden",...t),Mk=(e,...t)=>ue("is-full bs-full scroll-smooth","[&>div]:table-fixed [&>div]:w-full",...t),Fk=(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),Bk=(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-[6px] before:min-h-[6px]",...t),jk=(e,...t)=>ue(...t),Rk={root:Lk,viewport:Mk,scrollbar:Fk,thumb:Bk,corner:jk},Uk=({elevation:e="chrome"},...t)=>ue("p-1 z-[50] rounded",Mi,Li({elevation:e}),...t),Wk=(e,...t)=>ue("relative flex items-center pis-6 pie-3 plb-1","text-base leading-none rounded-sm select-none outline-none",zI,...t),zk=(e,...t)=>ue("absolute inline-start-0 is-6 inline-flex items-center justify-center",...t),Hk=(e,...t)=>ue(bu,...t),Vk=(e,...t)=>ue(i0,...t),Gk=(e,...t)=>ue(Mi,"flex items-center justify-center cursor-default bs-6 is-full",...t),Kk={content:Uk,item:Wk,itemIndicator:zk,arrow:Hk,separator:Vk,scrollButton:Gk},qk=({orientation:e},...t)=>ue(e==="vertical"?WI:i0,UI,...t),Yk={root:qk},Jk=(e,...t)=>ue("is-20 bs-1 inline-block relative bg-neutral-400/25 rounded-full overflow-hidden",...t),Xk=({indeterminate:e},...t)=>ue("absolute inline-start-0 inset-block-0 inline-block bg-neutral-400 rounded-full",e&&"animate-progress-indeterminate",...t),Zk={root:Jk,bar:Xk},Qk={neutral:"surface-separator text-neutral-800 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"},e4=({palette:e="neutral"},...t)=>ue("text-xs font-semibold pli-2 plb-0.5 rounded cursor-default",Qk[e],...t),t4={root:e4},r4=(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),n4=(e,...t)=>ue("rounded-lg flex p-2 gap-2",Mi,Li({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),i4=(e,...t)=>ue("grow flex flex-col gap-1 justify-center pis-2",...t),o4=(e,...t)=>ue("shrink-0 flex flex-col gap-1 justify-center",...t),a4=({srOnly:e},...t)=>ue("shrink-0 text-md font-medium",e&&"sr-only",...t),s4=({srOnly:e},...t)=>ue(It,"shrink-0",e&&"sr-only",...t),l4={viewport:r4,root:n4,body:i4,title:a4,description:s4,actions:o4},c4=(e,...t)=>ue("flex items-center gap-2 is-full",...t),u4={root:c4},f4=(e,...t)=>ue("inline-flex items-center rounded-md plb-2 pli-3",Mi,n0,Li({elevation:"group"}),JI,...t),d4=(e,...t)=>ue(bu,...t),p4={content:f4,arrow:d4},h4={themeName:()=>"default",anchoredOverflow:uP,avatar:EP,breadcrumb:AP,button:DP,dialog:RP,menu:KP,input:dk,link:hk,list:_k,main:Ck,message:Ik,popover:Dk,select:Kk,scrollArea:Rk,separator:Yk,status:Zk,tag:t4,toast:l4,toolbar:u4,tooltip:p4},g4=e=>(t,r,n,...i)=>{const o=xI(e,t);return typeof o=="function"?o(n,...i):r},m4=g4(h4);const h0=c.createContext({textValue:"",setTextValue:async e=>{}}),g0=()=>c.useContext(h0),$u=({children:e})=>{const[t,r]=c.useState(""),n=c.useCallback(async i=>(await navigator.clipboard.writeText(i),r(i)),[]);return c.createElement(h0.Provider,{value:{textValue:t,setTextValue:n}},e)},m0="invisible bs-px -mbe-px overflow-hidden",v4=({value:e,classNames:t,iconProps:r,...n})=>{const{t:i}=it("os"),{textValue:o,setTextValue:a}=g0(),s=o===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&&m0)},c.createElement("span",{className:"pli-1"},i("copy invitation code label")),c.createElement(Ye.Copy,{className:qe(4),weight:"bold",...r})),c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",!s&&m0)},c.createElement("span",{className:"pli-1"},i("copy invitation code success label")),c.createElement(Ye.Check,{className:qe(4),weight:"bold",...r})))},y4=({value:e,classNames:t,iconProps:r,variant:n,...i})=>{const{t:o}=it("os"),{textValue:a,setTextValue:s}=g0(),u=o(a===e?"copy invitation code success label":"copy invitation code label"),[d,p]=c.useState(!1);return c.createElement(Er.Root,{delayDuration:1500,open:d,onOpenChange:p},c.createElement(Er.Portal,null,c.createElement(Er.Content,{side:"bottom",sideOffset:12,classNames:"z-30"},c.createElement("span",null,u),c.createElement(Er.Arrow,null))),c.createElement(Er.Trigger,{"aria-label":u,...i,onClick:()=>s(e).then(()=>p(!0)),"data-testid":"copy-invitation",asChild:!0},c.createElement(wr,{variant:n,classNames:["inline-flex flex-col justify-center",t]},c.createElement(Ye.Copy,{className:qe(5),weight:"bold",...r}))))},Cu=({children:e,description:t,before:r,after:n,variant:i="default",elevation:o,slots:a={},...s})=>{var v,y,w,E;const l=St("compoundButton-label"),u=St("compoundButton-description"),{tx:d}=Pe(),p=Gn(o),h={...s,variant:i,elevation:p,textWrap:!0},m=d("button.root","button button--compound",h,"flex items-center gap-4 plb-2.5",(v=a.root)==null?void 0:v.className);return c.createElement("button",{...s,...a.root,className:m,"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",(y=a.middle)==null?void 0:y.className)},c.createElement("p",{...a.label,id:l,className:ue((w=a.label)==null?void 0:w.className)},e),t&&c.createElement("p",{id:u,...a.description,className:ue("text-xs mbe-1 font-normal",i==="primary"?YI:It,(E=a.description)==null?void 0:E.className)},t)),n&&c.createElement("div",{role:"none",className:"grow-0"},n))};var Ms={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"]},v0=e=>e.charAt(0).toUpperCase()+e.slice(1),Au=e=>{const t=e.length*2/3,r=e.substring(0,t),n=e.substring(t),i=v0(Ms.adjectives[parseInt(r,16)%Ms.adjectives.length]),o=v0(Ms.animals[parseInt(n,16)%Ms.animals.length]);return`${i} ${o}`};const y0=c.forwardRef(({identity:e,presence:t,onClick:r},n)=>{var l;const i=e.identityKey.toHex(),o=St("identityListItem__label"),a=vs(i??"",12),s=((l=e.profile)==null?void 0:l.displayName)??Au(e.identityKey.toHex());return c.createElement(Jc.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:o,ref:n},c.createElement(Pt.Root,{status:t===Ca.SpaceMember.PresenceState.ONLINE?"active":"inactive",labelId:o},c.createElement(Pt.Frame,null,c.createElement(Pt.Fallback,{href:a})),c.createElement(Pt.Label,{classNames:"text-sm truncate pli-2"},s)))}),b4=({devices:e,onSelect:t})=>{const{t:r}=it("os");return e.length>0?c.createElement(Yc,{classNames:"flex flex-col gap-2"},e.map(n=>{var o,a,s,l,u;const i={identityKey:n.deviceKey,profile:n.profile?{displayName:`${(o=n.profile)==null?void 0:o.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(y0,{key:n.deviceKey.toHex(),identity:i,onClick:t&&(()=>t(n))})})):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(It,"text-center is-full")},r("empty device list message")))},w4=({spaceKey:e,includeSelf:t,onSelect:r})=>{const n=Ke.useClient(),i=Ca.useMembers(e),o=c.useMemo(()=>t?i.sort(a=>a.identity.identityKey.equals(n.halo.identity.get().identityKey)?-1:1):i.filter(a=>!a.identity.identityKey.equals(n.halo.identity.get().identityKey)),[i]);return c.createElement(E4,{members:o,onSelect:r})},E4=({members:e,onSelect:t})=>{const{t:r}=it("os"),n=e.filter(i=>i.identity);return n.length>0?c.createElement(Yc,{classNames:"flex flex-col gap-2","data-testid":"space-members-list"},n.map(i=>c.createElement(y0,{key:i.identity.identityKey.toHex(),identity:i.identity,presence:i.presence,onClick:t&&(()=>t(i))}))):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(It,"text-center is-full mlb-2")},r("empty space members message")))};var b0;(function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"})(b0||(b0={}));var w0;(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={}))})(w0||(w0={}));var E0;(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={}))})(E0||(E0={}));var _0;(function(e){e[e.CURRENT=0]="CURRENT",e[e.TRUSTED=1]="TRUSTED"})(_0||(_0={}));var x0;(function(e){(function(t){t[t.OFFLINE=0]="OFFLINE",t[t.ONLINE=1]="ONLINE",t[t.REMOVED=2]="REMOVED"})(e.PresenceState||(e.PresenceState={}))})(x0||(x0={}));var S0;(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"})(S0||(S0={}));var $0;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.INIT_AUTOMERGE=1]="INIT_AUTOMERGE"})(e.Migration||(e.Migration={}))})($0||($0={}));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 C0;(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={}))})(C0||(C0={}));var A0;(function(e){e[e.OFFLINE=0]="OFFLINE",e[e.ONLINE=1]="ONLINE"})(A0||(A0={}));var O0;(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"})(O0||(O0={}));var T0;(function(e){(function(t){t[t.INCLUSIVE=1]="INCLUSIVE",t[t.EXPLICIT=2]="EXPLICIT"})(e.MatchingOptions||(e.MatchingOptions={}))})(T0||(T0={}));var _4=200,Ou="__lodash_hash_undefined__",x4=1/0,I0=9007199254740991,S4="[object Arguments]",$4="[object Function]",C4="[object GeneratorFunction]",A4="[object Symbol]",O4=/[\\^$.*+?()[\]{}|]/g,T4=/^\[object .+?Constructor\]$/,I4=/^(?:0|[1-9]\d*)$/,P4=typeof et=="object"&&et&&et.Object===Object&&et,k4=typeof self=="object"&&self&&self.Object===Object&&self,Tu=P4||k4||Function("return this")();function N4(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 D4(e,t){var r=e?e.length:0;return!!r&&F4(e,t,0)>-1}function L4(e,t,r){for(var n=-1,i=e?e.length:0;++n<i;)if(r(t,e[n]))return!0;return!1}function P0(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Iu(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function M4(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function F4(e,t,r){if(t!==t)return M4(e,B4,r);for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function B4(e){return e!==e}function j4(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function R4(e){return function(t){return e(t)}}function U4(e,t){return e.has(t)}function W4(e,t){return e==null?void 0:e[t]}function z4(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function k0(e,t){return function(r){return e(t(r))}}var H4=Array.prototype,V4=Function.prototype,Fs=Object.prototype,Pu=Tu["__core-js_shared__"],N0=function(){var e=/[^.]+$/.exec(Pu&&Pu.keys&&Pu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),D0=V4.toString,Ri=Fs.hasOwnProperty,ku=Fs.toString,G4=RegExp("^"+D0.call(Ri).replace(O4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L0=Tu.Symbol,K4=k0(Object.getPrototypeOf,Object),q4=Fs.propertyIsEnumerable,Y4=H4.splice,M0=L0?L0.isConcatSpreadable:void 0,Nu=Object.getOwnPropertySymbols,F0=Math.max,J4=j0(Tu,"Map"),Vo=j0(Object,"create");function Xn(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 X4(){this.__data__=Vo?Vo(null):{}}function Z4(e){return this.has(e)&&delete this.__data__[e]}function Q4(e){var t=this.__data__;if(Vo){var r=t[e];return r===Ou?void 0:r}return Ri.call(t,e)?t[e]:void 0}function e8(e){var t=this.__data__;return Vo?t[e]!==void 0:Ri.call(t,e)}function t8(e,t){var r=this.__data__;return r[e]=Vo&&t===void 0?Ou:t,this}Xn.prototype.clear=X4,Xn.prototype.delete=Z4,Xn.prototype.get=Q4,Xn.prototype.has=e8,Xn.prototype.set=t8;function Ui(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 r8(){this.__data__=[]}function n8(e){var t=this.__data__,r=js(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Y4.call(t,r,1),!0}function i8(e){var t=this.__data__,r=js(t,e);return r<0?void 0:t[r][1]}function o8(e){return js(this.__data__,e)>-1}function a8(e,t){var r=this.__data__,n=js(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Ui.prototype.clear=r8,Ui.prototype.delete=n8,Ui.prototype.get=i8,Ui.prototype.has=o8,Ui.prototype.set=a8;function Wi(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 s8(){this.__data__={hash:new Xn,map:new(J4||Ui),string:new Xn}}function l8(e){return Rs(this,e).delete(e)}function c8(e){return Rs(this,e).get(e)}function u8(e){return Rs(this,e).has(e)}function f8(e,t){return Rs(this,e).set(e,t),this}Wi.prototype.clear=s8,Wi.prototype.delete=l8,Wi.prototype.get=c8,Wi.prototype.has=u8,Wi.prototype.set=f8;function Bs(e){var t=-1,r=e?e.length:0;for(this.__data__=new Wi;++t<r;)this.add(e[t])}function d8(e){return this.__data__.set(e,Ou),this}function p8(e){return this.__data__.has(e)}Bs.prototype.add=Bs.prototype.push=d8,Bs.prototype.has=p8;function h8(e,t){var r=Du(e)||R0(e)?j4(e.length,String):[],n=r.length,i=!!n;for(var o in e)(t||Ri.call(e,o))&&!(i&&(o=="length"||C8(o,n)))&&r.push(o);return r}function js(e,t){for(var r=e.length;r--;)if(N8(e[r][0],t))return r;return-1}function g8(e,t,r,n){var i=-1,o=D4,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=P0(t,R4(r))),n?(o=L4,a=!1):t.length>=_4&&(o=U4,a=!1,t=new Bs(t));e:for(;++i<s;){var d=e[i],p=r?r(d):d;if(d=n||d!==0?d:0,a&&p===p){for(var h=u;h--;)if(t[h]===p)continue e;l.push(d)}else o(t,p,n)||l.push(d)}return l}function B0(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=$8),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?B0(s,t-1,r,n,i):Iu(i,s):n||(i[i.length]=s)}return i}function m8(e,t,r){var n=t(e);return Du(e)?n:Iu(n,r(e))}function v8(e){if(!Lu(e)||O8(e))return!1;var t=W0(e)||z4(e)?G4:T4;return t.test(k8(e))}function y8(e){if(!Lu(e))return I8(e);var t=T8(e),r=[];for(var n in e)n=="constructor"&&(t||!Ri.call(e,n))||r.push(n);return r}function b8(e,t){return e=Object(e),w8(e,t,function(r,n){return n in e})}function w8(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=e[a];r(s,a)&&(o[a]=s)}return o}function E8(e,t){return t=F0(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,i=F0(r.length-t,0),o=Array(i);++n<i;)o[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=o,N4(e,this,a)}}function _8(e){return m8(e,F8,S8)}function Rs(e,t){var r=e.__data__;return A8(t)?r[typeof t=="string"?"string":"hash"]:r.map}function j0(e,t){var r=W4(e,t);return v8(r)?r:void 0}var x8=Nu?k0(Nu,Object):H0,S8=Nu?function(e){for(var t=[];e;)Iu(t,x8(e)),e=K4(e);return t}:H0;function $8(e){return Du(e)||R0(e)||!!(M0&&e&&e[M0])}function C8(e,t){return t=t??I0,!!t&&(typeof e=="number"||I4.test(e))&&e>-1&&e%1==0&&e<t}function A8(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function O8(e){return!!N0&&N0 in e}function T8(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Fs;return e===r}function I8(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}function P8(e){if(typeof e=="string"||M8(e))return e;var t=e+"";return t=="0"&&1/e==-x4?"-0":t}function k8(e){if(e!=null){try{return D0.call(e)}catch{}try{return e+""}catch{}}return""}function N8(e,t){return e===t||e!==e&&t!==t}function R0(e){return D8(e)&&Ri.call(e,"callee")&&(!q4.call(e,"callee")||ku.call(e)==S4)}var Du=Array.isArray;function U0(e){return e!=null&&L8(e.length)&&!W0(e)}function D8(e){return z0(e)&&U0(e)}function W0(e){var t=Lu(e)?ku.call(e):"";return t==$4||t==C4}function L8(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=I0}function Lu(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function z0(e){return!!e&&typeof e=="object"}function M8(e){return typeof e=="symbol"||z0(e)&&ku.call(e)==A4}function F8(e){return U0(e)?h8(e,!0):y8(e)}E8(function(e,t){return e==null?{}:(t=P0(B0(t,1),P8),b8(e,g8(_8(e),t)))});function H0(){return[]}var B8=1/0,j8=9007199254740991,R8="[object Arguments]",U8="[object Function]",W8="[object GeneratorFunction]",z8="[object Symbol]",H8=typeof et=="object"&&et&&et.Object===Object&&et,V8=typeof self=="object"&&self&&self.Object===Object&&self,G8=H8||V8||Function("return this")();function K8(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 q8(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Y8(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var Mu=Object.prototype,J8=Mu.hasOwnProperty,Fu=Mu.toString,V0=G8.Symbol,X8=Mu.propertyIsEnumerable,G0=V0?V0.isConcatSpreadable:void 0,K0=Math.max;function q0(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=tN),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?q0(s,t-1,r,n,i):Y8(i,s):n||(i[i.length]=s)}return i}function Z8(e,t){return e=Object(e),Q8(e,t,function(r,n){return n in e})}function Q8(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=e[a];r(s,a)&&(o[a]=s)}return o}function eN(e,t){return t=K0(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,i=K0(r.length-t,0),o=Array(i);++n<i;)o[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=o,K8(e,this,a)}}function tN(e){return iN(e)||nN(e)||!!(G0&&e&&e[G0])}function rN(e){if(typeof e=="string"||uN(e))return e;var t=e+"";return t=="0"&&1/e==-B8?"-0":t}function nN(e){return aN(e)&&J8.call(e,"callee")&&(!X8.call(e,"callee")||Fu.call(e)==R8)}var iN=Array.isArray;function oN(e){return e!=null&&lN(e.length)&&!sN(e)}function aN(e){return Y0(e)&&oN(e)}function sN(e){var t=cN(e)?Fu.call(e):"";return t==U8||t==W8}function lN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=j8}function cN(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Y0(e){return!!e&&typeof e=="object"}function uN(e){return typeof e=="symbol"||Y0(e)&&Fu.call(e)==z8}eN(function(e,t){return e==null?{}:Z8(e,q8(q0(t,1),rN))});var fN=Object.create,J0=Object.defineProperty,dN=Object.getOwnPropertyDescriptor,X0=Object.getOwnPropertyNames,pN=Object.getPrototypeOf,hN=Object.prototype.hasOwnProperty,He=(e,t)=>function(){return t||(0,e[X0(e)[0]])((t={exports:{}}).exports,t),t.exports},gN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of X0(t))!hN.call(e,i)&&i!==r&&J0(e,i,{get:()=>t[i],enumerable:!(n=dN(t,i))||n.enumerable});return e},Zn=(e,t,r)=>(r=e!=null?fN(pN(e)):{},gN(t||!e||!e.__esModule?J0(r,"default",{value:e,enumerable:!0}):r,e)),Z0=He({"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={},i=Symbol("test"),o=Object(i);if(typeof i=="string"||Object.prototype.toString.call(i)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var a=42;n[i]=a;for(i 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]!==i||!Object.prototype.propertyIsEnumerable.call(n,i))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(n,i);if(l.value!==a||l.enumerable!==!0)return!1}return!0}}}),Go=He({"node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(e,t){var r=Z0();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),Q0=He({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=Z0();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),ey=He({"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)}}}),mN=He({"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,i=Math.max,o="[object Function]",a=function(d,p){for(var h=[],m=0;m<d.length;m+=1)h[m]=d[m];for(var v=0;v<p.length;v+=1)h[v+d.length]=p[v];return h},s=function(d,p){for(var h=[],m=p||0,v=0;m<d.length;m+=1,v+=1)h[v]=d[m];return h},l=function(u,d){for(var p="",h=0;h<u.length;h+=1)p+=u[h],h+1<u.length&&(p+=d);return p};t.exports=function(d){var p=this;if(typeof p!="function"||n.apply(p)!==o)throw new TypeError(r+p);for(var h=s(arguments,1),m,v=function(){if(this instanceof m){var S=p.apply(this,a(h,arguments));return Object(S)===S?S:this}return p.apply(d,a(h,arguments))},y=i(0,p.length-h.length),w=[],E=0;E<y;E++)w[E]="$"+E;if(m=Function("binder","return function ("+l(w,",")+"){ return binder.apply(this,arguments); }")(v),p.prototype){var _=function(){};_.prototype=p.prototype,m.prototype=new _,_.prototype=null}return m}}}),Bu=He({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(e,t){var r=mN();t.exports=Function.prototype.bind||r}}),vN=He({"node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,n=Object.prototype.hasOwnProperty,i=Bu();t.exports=i.call(r,n)}}),zi=He({"node_modules/.pnpm/get-intrinsic@1.2.2/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,i=Function,o=TypeError,a=function(Y){try{return i('"use strict"; return ('+Y+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new o},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,d=Q0()(),p=ey()(),h=Object.getPrototypeOf||(p?function(Y){return Y.__proto__}:null),m={},v=typeof Uint8Array>"u"||!h?r:h(Uint8Array),y={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":d&&h?h([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%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%":i,"%GeneratorFunction%":m,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&h?h(h([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!d||!h?r:h(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"||!d||!h?r:h(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&h?h(""[Symbol.iterator]()):r,"%Symbol%":d?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":v,"%TypeError%":o,"%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(h)try{null.error}catch(Y){w=h(h(Y)),y["%Error.prototype%"]=w}var w,E=function Y(X){var ne;if(X==="%AsyncFunction%")ne=a("async function () {}");else if(X==="%GeneratorFunction%")ne=a("function* () {}");else if(X==="%AsyncGeneratorFunction%")ne=a("async function* () {}");else if(X==="%AsyncGenerator%"){var oe=Y("%AsyncGeneratorFunction%");oe&&(ne=oe.prototype)}else if(X==="%AsyncIteratorPrototype%"){var ce=Y("%AsyncGenerator%");ce&&h&&(ne=h(ce.prototype))}return y[X]=ne,ne},_={"%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"]},S=Bu(),$=vN(),k=S.call(Function.call,Array.prototype.concat),P=S.call(Function.apply,Array.prototype.splice),C=S.call(Function.call,String.prototype.replace),T=S.call(Function.call,String.prototype.slice),D=S.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,M=function(X){var ne=T(X,0,1),oe=T(X,-1);if(ne==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&ne!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var ce=[];return C(X,j,function(se,ge,le,V){ce[ce.length]=le?C(V,F,"$1"):ge||se}),ce},Z=function(X,ne){var oe=X,ce;if($(_,oe)&&(ce=_[oe],oe="%"+ce[0]+"%"),$(y,oe)){var se=y[oe];if(se===m&&(se=E(oe)),typeof se>"u"&&!ne)throw new o("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:ce,name:oe,value:se}}throw new n("intrinsic "+X+" does not exist!")};t.exports=function(X,ne){if(typeof X!="string"||X.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ne!="boolean")throw new o('"allowMissing" argument must be a boolean');if(D(/^%?[^%]*%?$/,X)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=M(X),ce=oe.length>0?oe[0]:"",se=Z("%"+ce+"%",ne),ge=se.name,le=se.value,V=!1,J=se.alias;J&&(ce=J[0],P(oe,k([0,1],J)));for(var re=1,de=!0;re<oe.length;re+=1){var H=oe[re],G=T(H,0,1),B=T(H,-1);if((G==='"'||G==="'"||G==="`"||B==='"'||B==="'"||B==="`")&&G!==B)throw new n("property names with quotes must have matching quotes");if((H==="constructor"||!de)&&(V=!0),ce+="."+H,ge="%"+ce+"%",$(y,ge))le=y[ge];else if(le!=null){if(!(H in le)){if(!ne)throw new o("base intrinsic for "+X+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var z=s(le,H);de=!!z,de&&"get"in z&&!("originalValue"in z.get)?le=z.get:le=le[H]}else de=$(le,H),le=le[H];de&&!V&&(y[ge]=le)}}return le}}}),ty=He({"node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js"(e,t){var r=zi(),n=r("%Object.defineProperty%",!0),i=function(){if(n)try{return n({},"a",{value:1}),!0}catch{return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},t.exports=i}}),ju=He({"node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(e,t){var r=zi(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),yN=He({"node_modules/.pnpm/define-data-property@1.1.1/node_modules/define-data-property/index.js"(e,t){var r=ty()(),n=zi(),i=r&&n("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch{i=!1}var o=n("%SyntaxError%"),a=n("%TypeError%"),s=ju();t.exports=function(u,d,p){if(!u||typeof u!="object"&&typeof u!="function")throw new a("`obj` must be an object or a function`");if(typeof d!="string"&&typeof d!="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 h=arguments.length>3?arguments[3]:null,m=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,w=!!s&&s(u,d);if(i)i(u,d,{configurable:v===null&&w?w.configurable:!v,enumerable:h===null&&w?w.enumerable:!h,value:p,writable:m===null&&w?w.writable:!m});else if(y||!h&&!m&&!v)u[d]=p;else throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),bN=He({"node_modules/.pnpm/set-function-length@1.1.1/node_modules/set-function-length/index.js"(e,t){var r=zi(),n=yN(),i=ty()(),o=ju(),a=r("%TypeError%"),s=r("%Math.floor%");t.exports=function(u,d){if(typeof u!="function")throw new a("`fn` is not a function");if(typeof d!="number"||d<0||d>4294967295||s(d)!==d)throw new a("`length` must be a positive 32-bit integer");var p=arguments.length>2&&!!arguments[2],h=!0,m=!0;if("length"in u&&o){var v=o(u,"length");v&&!v.configurable&&(h=!1),v&&!v.writable&&(m=!1)}return(h||m||!p)&&(i?n(u,"length",d,!0,!0):n(u,"length",d)),u}}}),ry=He({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/index.js"(e,t){var r=Bu(),n=zi(),i=bN(),o=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),d=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}t.exports=function(m){if(typeof m!="function")throw new o("a function is required");var v=l(r,s,arguments);return i(v,1+d(0,m.length-(arguments.length-1)),!0)};var p=function(){return l(r,a,arguments)};u?u(t.exports,"apply",{value:p}):t.exports.apply=p}}),ny=He({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/callBound.js"(e,t){var r=zi(),n=ry(),i=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&i(a,".prototype.")>-1?n(l):l}}}),wN=He({"node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js"(e,t){var r=Go()(),n=ny(),i=n("Object.prototype.toString"),o=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:i(u)==="[object Arguments]"},a=function(u){return o(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&i(u)!=="[object Array]"&&i(u.callee)==="[object Function]"},s=function(){return o(arguments)}();o.isLegacyArguments=a,t.exports=s?o:a}}),EN=He({"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,i=/^\s*(?:function)?\*/,o=Go()(),a=Object.getPrototypeOf,s=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch{}},l;t.exports=function(d){if(typeof d!="function")return!1;if(i.test(n.call(d)))return!0;if(!o){var p=r.call(d);return p==="[object GeneratorFunction]"}if(!a)return!1;if(typeof l>"u"){var h=s();l=h?a(h):!1}return a(d)===l}}}),_N=He({"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,i,o;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{i=Object.defineProperty({},"length",{get:function(){throw o}}),o={},n(function(){throw 42},null,i)}catch($){$!==o&&(n=null)}else n=null;var a=/^\s*class\b/,s=function(k){try{var P=r.call(k);return a.test(P)}catch{return!1}},l=function(k){try{return s(k)?!1:(r.call(k),!0)}catch{return!1}},u=Object.prototype.toString,d="[object Object]",p="[object Function]",h="[object GeneratorFunction]",m="[object HTMLAllCollection]",v="[object HTML document.all class]",y="[object HTMLCollection]",w=typeof Symbol=="function"&&!!Symbol.toStringTag,E=!(0 in[,]),_=function(){return!1};typeof document=="object"&&(S=document.all,u.call(S)===u.call(document.all)&&(_=function(k){if((E||!k)&&(typeof k>"u"||typeof k=="object"))try{var P=u.call(k);return(P===m||P===v||P===y||P===d)&&k("")==null}catch{}return!1}));var S;t.exports=n?function(k){if(_(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;try{n(k,null,i)}catch(P){if(P!==o)return!1}return!s(k)&&l(k)}:function(k){if(_(k))return!0;if(!k||typeof k!="function"&&typeof k!="object")return!1;if(w)return l(k);if(s(k))return!1;var P=u.call(k);return P!==p&&P!==h&&!/^\[object HTML/.test(P)?!1:l(k)}}}),Ru=He({"node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js"(e,t){var r=_N(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,o=function(d,p,h){for(var m=0,v=d.length;m<v;m++)i.call(d,m)&&(h==null?p(d[m],m,d):p.call(h,d[m],m,d))},a=function(d,p,h){for(var m=0,v=d.length;m<v;m++)h==null?p(d.charAt(m),m,d):p.call(h,d.charAt(m),m,d)},s=function(d,p,h){for(var m in d)i.call(d,m)&&(h==null?p(d[m],m,d):p.call(h,d[m],m,d))},l=function(d,p,h){if(!r(p))throw new TypeError("iterator must be a function");var m;arguments.length>=3&&(m=h),n.call(d)==="[object Array]"?o(d,p,m):typeof d=="string"?a(d,p,m):s(d,p,m)};t.exports=l}}),Uu=He({"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 o=[],a=0;a<r.length;a++)typeof n[r[a]]=="function"&&(o[o.length]=r[a]);return o}}}),xN=He({"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,i=Object.prototype.toString,o="[object Function]";t.exports=function(s){var l=this;if(typeof l!="function"||i.call(l)!==o)throw new TypeError(r+l);for(var u=n.call(arguments,1),d,p=function(){if(this instanceof d){var w=l.apply(this,u.concat(n.call(arguments)));return Object(w)===w?w:this}else return l.apply(s,u.concat(n.call(arguments)))},h=Math.max(0,l.length-u.length),m=[],v=0;v<h;v++)m.push("$"+v);if(d=Function("binder","return function ("+m.join(",")+"){ return binder.apply(this,arguments); }")(p),l.prototype){var y=function(){};y.prototype=l.prototype,d.prototype=new y,y.prototype=null}return d}}}),Wu=He({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(e,t){var r=xN();t.exports=Function.prototype.bind||r}}),SN=He({"node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(e,t){var r=Wu();t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)}}),zu=He({"node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,i=Function,o=TypeError,a=function(Y){try{return i('"use strict"; return ('+Y+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new o},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,d=Q0()(),p=ey()(),h=Object.getPrototypeOf||(p?function(Y){return Y.__proto__}:null),m={},v=typeof Uint8Array>"u"||!h?r:h(Uint8Array),y={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":d&&h?h([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":m,"%AsyncGenerator%":m,"%AsyncGeneratorFunction%":m,"%AsyncIteratorPrototype%":m,"%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%":i,"%GeneratorFunction%":m,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d&&h?h(h([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!d||!h?r:h(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"||!d||!h?r:h(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d&&h?h(""[Symbol.iterator]()):r,"%Symbol%":d?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":v,"%TypeError%":o,"%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(h)try{null.error}catch(Y){w=h(h(Y)),y["%Error.prototype%"]=w}var w,E=function Y(X){var ne;if(X==="%AsyncFunction%")ne=a("async function () {}");else if(X==="%GeneratorFunction%")ne=a("function* () {}");else if(X==="%AsyncGeneratorFunction%")ne=a("async function* () {}");else if(X==="%AsyncGenerator%"){var oe=Y("%AsyncGeneratorFunction%");oe&&(ne=oe.prototype)}else if(X==="%AsyncIteratorPrototype%"){var ce=Y("%AsyncGenerator%");ce&&h&&(ne=h(ce.prototype))}return y[X]=ne,ne},_={"%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"]},S=Wu(),$=SN(),k=S.call(Function.call,Array.prototype.concat),P=S.call(Function.apply,Array.prototype.splice),C=S.call(Function.call,String.prototype.replace),T=S.call(Function.call,String.prototype.slice),D=S.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,M=function(X){var ne=T(X,0,1),oe=T(X,-1);if(ne==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&ne!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var ce=[];return C(X,j,function(se,ge,le,V){ce[ce.length]=le?C(V,F,"$1"):ge||se}),ce},Z=function(X,ne){var oe=X,ce;if($(_,oe)&&(ce=_[oe],oe="%"+ce[0]+"%"),$(y,oe)){var se=y[oe];if(se===m&&(se=E(oe)),typeof se>"u"&&!ne)throw new o("intrinsic "+X+" exists, but is not available. Please file an issue!");return{alias:ce,name:oe,value:se}}throw new n("intrinsic "+X+" does not exist!")};t.exports=function(X,ne){if(typeof X!="string"||X.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ne!="boolean")throw new o('"allowMissing" argument must be a boolean');if(D(/^%?[^%]*%?$/,X)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=M(X),ce=oe.length>0?oe[0]:"",se=Z("%"+ce+"%",ne),ge=se.name,le=se.value,V=!1,J=se.alias;J&&(ce=J[0],P(oe,k([0,1],J)));for(var re=1,de=!0;re<oe.length;re+=1){var H=oe[re],G=T(H,0,1),B=T(H,-1);if((G==='"'||G==="'"||G==="`"||B==='"'||B==="'"||B==="`")&&G!==B)throw new n("property names with quotes must have matching quotes");if((H==="constructor"||!de)&&(V=!0),ce+="."+H,ge="%"+ce+"%",$(y,ge))le=y[ge];else if(le!=null){if(!(H in le)){if(!ne)throw new o("base intrinsic for "+X+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var z=s(le,H);de=!!z,de&&"get"in z&&!("originalValue"in z.get)?le=z.get:le=le[H]}else de=$(le,H),le=le[H];de&&!V&&(y[ge]=le)}}return le}}}),$N=He({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(e,t){var r=Wu(),n=zu(),i=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||r.call(o,i),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(h){var m=a(r,o,arguments);if(s&&l){var v=s(m,"length");v.configurable&&l(m,"length",{value:1+u(0,h.length-(arguments.length-1))})}return m};var d=function(){return a(r,i,arguments)};l?l(t.exports,"apply",{value:d}):t.exports.apply=d}}),iy=He({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(e,t){var r=zu(),n=$N(),i=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&i(a,".prototype.")>-1?n(l):l}}}),oy=He({"node_modules/.pnpm/es-abstract@1.20.4/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js"(e,t){var r=zu(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),CN=He({"node_modules/.pnpm/which-typed-array@1.1.13/node_modules/which-typed-array/index.js"(e,t){var r=Ru(),n=Uu(),i=ry(),o=ny(),a=ju(),s=o("Object.prototype.toString"),l=Go()(),u=typeof globalThis>"u"?global:globalThis,d=n(),p=o("String.prototype.slice"),h=Object.getPrototypeOf,m=o("Array.prototype.indexOf",!0)||function(_,S){for(var $=0;$<_.length;$+=1)if(_[$]===S)return $;return-1},v={__proto__:null};l&&a&&h?r(d,function(E){var _=new u[E];if(Symbol.toStringTag in _){var S=h(_),$=a(S,Symbol.toStringTag);if(!$){var k=h(S);$=a(k,Symbol.toStringTag)}v["$"+E]=i($.get)}}):r(d,function(E){var _=new u[E],S=_.slice||_.set;S&&(v["$"+E]=i(S))});var y=function(_){var S=!1;return r(v,function($,k){if(!S)try{"$"+$(_)===k&&(S=p(k,1))}catch{}}),S},w=function(_){var S=!1;return r(v,function($,k){if(!S)try{$(_),S=p(k,1)}catch{}}),S};t.exports=function(_){if(!_||typeof _!="object")return!1;if(!l){var S=p(s(_),8,-1);return m(d,S)>-1?S:S!=="Object"?!1:w(_)}return a?y(_):null}}}),AN=He({"node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js"(e,t){var r=CN();t.exports=function(i){return!!r(i)}}}),ON=He({"node_modules/.pnpm/which-typed-array@1.1.8/node_modules/which-typed-array/index.js"(e,t){var r=Ru(),n=Uu(),i=iy(),o=i("Object.prototype.toString"),a=Go()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=i("String.prototype.slice"),d={},p=oy(),h=Object.getPrototypeOf;a&&p&&h&&r(l,function(y){if(typeof s[y]=="function"){var w=new s[y];if(Symbol.toStringTag in w){var E=h(w),_=p(E,Symbol.toStringTag);if(!_){var S=h(E);_=p(S,Symbol.toStringTag)}d[y]=_.get}}});var m=function(w){var E=!1;return r(d,function(_,S){if(!E)try{var $=_.call(w);$===S&&(E=$)}catch{}}),E},v=AN();t.exports=function(w){return v(w)?!a||!(Symbol.toStringTag in w)?u(o(w),8,-1):m(w):!1}}}),TN=He({"node_modules/.pnpm/is-typed-array@1.1.9/node_modules/is-typed-array/index.js"(e,t){var r=Ru(),n=Uu(),i=iy(),o=i("Object.prototype.toString"),a=Go()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=i("Array.prototype.indexOf",!0)||function(w,E){for(var _=0;_<w.length;_+=1)if(w[_]===E)return _;return-1},d=i("String.prototype.slice"),p={},h=oy(),m=Object.getPrototypeOf;a&&h&&m&&r(l,function(y){var w=new s[y];if(Symbol.toStringTag in w){var E=m(w),_=h(E,Symbol.toStringTag);if(!_){var S=m(E);_=h(S,Symbol.toStringTag)}p[y]=_.get}});var v=function(w){var E=!1;return r(p,function(_,S){if(!E)try{E=_.call(w)===S}catch{}}),E};t.exports=function(w){if(!w||typeof w!="object")return!1;if(!a||!(Symbol.toStringTag in w)){var E=d(o(w),8,-1);return u(l,E)>-1}return h?v(w):!1}}}),IN=He({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js"(e){var t=wN(),r=EN(),n=ON(),i=TN();function o(ae){return ae.call.bind(ae)}var a=typeof BigInt<"u",s=typeof Symbol<"u",l=o(Object.prototype.toString),u=o(Number.prototype.valueOf),d=o(String.prototype.valueOf),p=o(Boolean.prototype.valueOf);a&&(h=o(BigInt.prototype.valueOf));var h;s&&(m=o(Symbol.prototype.valueOf));var m;function v(ae,Me){if(typeof ae!="object")return!1;try{return Me(ae),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=i;function y(ae){return typeof Promise<"u"&&ae instanceof Promise||ae!==null&&typeof ae=="object"&&typeof ae.then=="function"&&typeof ae.catch=="function"}e.isPromise=y;function w(ae){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ae):i(ae)||J(ae)}e.isArrayBufferView=w;function E(ae){return n(ae)==="Uint8Array"}e.isUint8Array=E;function _(ae){return n(ae)==="Uint8ClampedArray"}e.isUint8ClampedArray=_;function S(ae){return n(ae)==="Uint16Array"}e.isUint16Array=S;function $(ae){return n(ae)==="Uint32Array"}e.isUint32Array=$;function k(ae){return n(ae)==="Int8Array"}e.isInt8Array=k;function P(ae){return n(ae)==="Int16Array"}e.isInt16Array=P;function C(ae){return n(ae)==="Int32Array"}e.isInt32Array=C;function T(ae){return n(ae)==="Float32Array"}e.isFloat32Array=T;function D(ae){return n(ae)==="Float64Array"}e.isFloat64Array=D;function j(ae){return n(ae)==="BigInt64Array"}e.isBigInt64Array=j;function F(ae){return n(ae)==="BigUint64Array"}e.isBigUint64Array=F;function M(ae){return l(ae)==="[object Map]"}M.working=typeof Map<"u"&&M(new Map);function Z(ae){return typeof Map>"u"?!1:M.working?M(ae):ae instanceof Map}e.isMap=Z;function Y(ae){return l(ae)==="[object Set]"}Y.working=typeof Set<"u"&&Y(new Set);function X(ae){return typeof Set>"u"?!1:Y.working?Y(ae):ae instanceof Set}e.isSet=X;function ne(ae){return l(ae)==="[object WeakMap]"}ne.working=typeof WeakMap<"u"&&ne(new WeakMap);function oe(ae){return typeof WeakMap>"u"?!1:ne.working?ne(ae):ae instanceof WeakMap}e.isWeakMap=oe;function ce(ae){return l(ae)==="[object WeakSet]"}ce.working=typeof WeakSet<"u"&&ce(new WeakSet);function se(ae){return ce(ae)}e.isWeakSet=se;function ge(ae){return l(ae)==="[object ArrayBuffer]"}ge.working=typeof ArrayBuffer<"u"&&ge(new ArrayBuffer);function le(ae){return typeof ArrayBuffer>"u"?!1:ge.working?ge(ae):ae instanceof ArrayBuffer}e.isArrayBuffer=le;function V(ae){return l(ae)==="[object DataView]"}V.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&V(new DataView(new ArrayBuffer(1),0,1));function J(ae){return typeof DataView>"u"?!1:V.working?V(ae):ae instanceof DataView}e.isDataView=J;var re=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(ae){return l(ae)==="[object SharedArrayBuffer]"}function H(ae){return typeof re>"u"?!1:(typeof de.working>"u"&&(de.working=de(new re)),de.working?de(ae):ae instanceof re)}e.isSharedArrayBuffer=H;function G(ae){return l(ae)==="[object AsyncFunction]"}e.isAsyncFunction=G;function B(ae){return l(ae)==="[object Map Iterator]"}e.isMapIterator=B;function z(ae){return l(ae)==="[object Set Iterator]"}e.isSetIterator=z;function K(ae){return l(ae)==="[object Generator]"}e.isGeneratorObject=K;function I(ae){return l(ae)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=I;function N(ae){return v(ae,u)}e.isNumberObject=N;function Q(ae){return v(ae,d)}e.isStringObject=Q;function ie(ae){return v(ae,p)}e.isBooleanObject=ie;function pe(ae){return a&&v(ae,h)}e.isBigIntObject=pe;function ye(ae){return s&&v(ae,m)}e.isSymbolObject=ye;function _e(ae){return N(ae)||Q(ae)||ie(ae)||pe(ae)||ye(ae)}e.isBoxedPrimitive=_e;function xe(ae){return typeof Uint8Array<"u"&&(le(ae)||H(ae))}e.isAnyArrayBuffer=xe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ae){Object.defineProperty(e,ae,{enumerable:!1,value:function(){throw new Error(ae+" is not supported in userland")}})})}}),PN=He({"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"}}}),kN=He({"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=function(n,i){i&&(n.super_=i,n.prototype=Object.create(i.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,i){if(i){n.super_=i;var o=function(){};o.prototype=i.prototype,n.prototype=new o,n.prototype.constructor=n}}}}),ay=He({"node_modules/.pnpm/util@0.12.5/node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(J){for(var re=Object.keys(J),de={},H=0;H<re.length;H++)de[re[H]]=Object.getOwnPropertyDescriptor(J,re[H]);return de},r=/%[sdj%]/g;e.format=function(V){if(!k(V)){for(var J=[],re=0;re<arguments.length;re++)J.push(a(arguments[re]));return J.join(" ")}for(var re=1,de=arguments,H=de.length,G=String(V).replace(r,function(z){if(z==="%%")return"%";if(re>=H)return z;switch(z){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 z}}),B=de[re];re<H;B=de[++re])_(B)||!D(B)?G+=" "+B:G+=" "+a(B);return G},e.deprecate=function(V,J){if(typeof process<"u"&&process.noDeprecation===!0)return V;if(typeof process>"u")return function(){return e.deprecate(V,J).apply(this,arguments)};var re=!1;function de(){if(!re){if(process.throwDeprecation)throw new Error(J);process.traceDeprecation?console.trace(J):console.error(J),re=!0}return V.apply(this,arguments)}return de};var n={},i=/^$/;process.env.NODE_DEBUG&&(o=process.env.NODE_DEBUG,o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i"));var o;e.debuglog=function(V){if(V=V.toUpperCase(),!n[V])if(i.test(V)){var J=process.pid;n[V]=function(){var re=e.format.apply(e,arguments);console.error("%s %d: %s",V,J,re)}}else n[V]=function(){};return n[V]};function a(V,J){var re={seen:[],stylize:l};return arguments.length>=3&&(re.depth=arguments[2]),arguments.length>=4&&(re.colors=arguments[3]),E(J)?re.showHidden=J:J&&e._extend(re,J),C(re.showHidden)&&(re.showHidden=!1),C(re.depth)&&(re.depth=2),C(re.colors)&&(re.colors=!1),C(re.customInspect)&&(re.customInspect=!0),re.colors&&(re.stylize=s),d(re,V,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(V,J){var re=a.styles[J];return re?"\x1B["+a.colors[re][0]+"m"+V+"\x1B["+a.colors[re][1]+"m":V}function l(V,J){return V}function u(V){var J={};return V.forEach(function(re,de){J[re]=!0}),J}function d(V,J,re){if(V.customInspect&&J&&M(J.inspect)&&J.inspect!==e.inspect&&!(J.constructor&&J.constructor.prototype===J)){var de=J.inspect(re,V);return k(de)||(de=d(V,de,re)),de}var H=p(V,J);if(H)return H;var G=Object.keys(J),B=u(G);if(V.showHidden&&(G=Object.getOwnPropertyNames(J)),F(J)&&(G.indexOf("message")>=0||G.indexOf("description")>=0))return h(J);if(G.length===0){if(M(J)){var z=J.name?": "+J.name:"";return V.stylize("[Function"+z+"]","special")}if(T(J))return V.stylize(RegExp.prototype.toString.call(J),"regexp");if(j(J))return V.stylize(Date.prototype.toString.call(J),"date");if(F(J))return h(J)}var K="",I=!1,N=["{","}"];if(w(J)&&(I=!0,N=["[","]"]),M(J)){var Q=J.name?": "+J.name:"";K=" [Function"+Q+"]"}if(T(J)&&(K=" "+RegExp.prototype.toString.call(J)),j(J)&&(K=" "+Date.prototype.toUTCString.call(J)),F(J)&&(K=" "+h(J)),G.length===0&&(!I||J.length==0))return N[0]+K+N[1];if(re<0)return T(J)?V.stylize(RegExp.prototype.toString.call(J),"regexp"):V.stylize("[Object]","special");V.seen.push(J);var ie;return I?ie=m(V,J,re,B,G):ie=G.map(function(pe){return v(V,J,re,B,pe,I)}),V.seen.pop(),y(ie,K,N)}function p(V,J){if(C(J))return V.stylize("undefined","undefined");if(k(J)){var re="'"+JSON.stringify(J).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return V.stylize(re,"string")}if($(J))return V.stylize(""+J,"number");if(E(J))return V.stylize(""+J,"boolean");if(_(J))return V.stylize("null","null")}function h(V){return"["+Error.prototype.toString.call(V)+"]"}function m(V,J,re,de,H){for(var G=[],B=0,z=J.length;B<z;++B)ce(J,String(B))?G.push(v(V,J,re,de,String(B),!0)):G.push("");return H.forEach(function(K){K.match(/^\d+$/)||G.push(v(V,J,re,de,K,!0))}),G}function v(V,J,re,de,H,G){var B,z,K;if(K=Object.getOwnPropertyDescriptor(J,H)||{value:J[H]},K.get?K.set?z=V.stylize("[Getter/Setter]","special"):z=V.stylize("[Getter]","special"):K.set&&(z=V.stylize("[Setter]","special")),ce(de,H)||(B="["+H+"]"),z||(V.seen.indexOf(K.value)<0?(_(re)?z=d(V,K.value,null):z=d(V,K.value,re-1),z.indexOf(`
86
+ `)>-1&&(G?z=z.split(`
87
+ `).map(function(I){return" "+I}).join(`
88
+ `).slice(2):z=`
89
+ `+z.split(`
90
+ `).map(function(I){return" "+I}).join(`
91
+ `))):z=V.stylize("[Circular]","special")),C(B)){if(G&&H.match(/^\d+$/))return z;B=JSON.stringify(""+H),B.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(B=B.slice(1,-1),B=V.stylize(B,"name")):(B=B.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),B=V.stylize(B,"string"))}return B+": "+z}function y(V,J,re){var de=V.reduce(function(H,G){return G.indexOf(`
92
+ `)>=0,H+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return de>60?re[0]+(J===""?"":J+`
93
+ `)+" "+V.join(`,
94
+ `)+" "+re[1]:re[0]+J+" "+V.join(", ")+" "+re[1]}e.types=IN();function w(V){return Array.isArray(V)}e.isArray=w;function E(V){return typeof V=="boolean"}e.isBoolean=E;function _(V){return V===null}e.isNull=_;function S(V){return V==null}e.isNullOrUndefined=S;function $(V){return typeof V=="number"}e.isNumber=$;function k(V){return typeof V=="string"}e.isString=k;function P(V){return typeof V=="symbol"}e.isSymbol=P;function C(V){return V===void 0}e.isUndefined=C;function T(V){return D(V)&&Y(V)==="[object RegExp]"}e.isRegExp=T,e.types.isRegExp=T;function D(V){return typeof V=="object"&&V!==null}e.isObject=D;function j(V){return D(V)&&Y(V)==="[object Date]"}e.isDate=j,e.types.isDate=j;function F(V){return D(V)&&(Y(V)==="[object Error]"||V instanceof Error)}e.isError=F,e.types.isNativeError=F;function M(V){return typeof V=="function"}e.isFunction=M;function Z(V){return V===null||typeof V=="boolean"||typeof V=="number"||typeof V=="string"||typeof V=="symbol"||typeof V>"u"}e.isPrimitive=Z,e.isBuffer=PN();function Y(V){return Object.prototype.toString.call(V)}function X(V){return V<10?"0"+V.toString(10):V.toString(10)}var ne=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function oe(){var V=new Date,J=[X(V.getHours()),X(V.getMinutes()),X(V.getSeconds())].join(":");return[V.getDate(),ne[V.getMonth()],J].join(" ")}e.log=function(){console.log("%s - %s",oe(),e.format.apply(e,arguments))},e.inherits=kN(),e._extend=function(V,J){if(!J||!D(J))return V;for(var re=Object.keys(J),de=re.length;de--;)V[re[de]]=J[re[de]];return V};function ce(V,J){return Object.prototype.hasOwnProperty.call(V,J)}var se=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');if(se&&J[se]){var re=J[se];if(typeof re!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(re,se,{value:re,enumerable:!1,writable:!1,configurable:!0}),re}function re(){for(var de,H,G=new Promise(function(K,I){de=K,H=I}),B=[],z=0;z<arguments.length;z++)B.push(arguments[z]);B.push(function(K,I){K?H(K):de(I)});try{J.apply(this,B)}catch(K){H(K)}return G}return Object.setPrototypeOf(re,Object.getPrototypeOf(J)),se&&Object.defineProperty(re,se,{value:re,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(re,t(J))},e.promisify.custom=se;function ge(V,J){if(!V){var re=new Error("Promise was rejected with a falsy value");re.reason=V,V=re}return J(V)}function le(V){if(typeof V!="function")throw new TypeError('The "original" argument must be of type Function');function J(){for(var re=[],de=0;de<arguments.length;de++)re.push(arguments[de]);var H=re.pop();if(typeof H!="function")throw new TypeError("The last argument must be of type Function");var G=this,B=function(){return H.apply(G,arguments)};V.apply(this,re).then(function(z){process.nextTick(B.bind(null,null,z))},function(z){process.nextTick(ge.bind(null,z,B))})}return Object.setPrototypeOf(J,Object.getPrototypeOf(V)),Object.defineProperties(J,t(V)),J}e.callbackify=le}});function NN(e,...t){t.length>0?queueMicrotask(()=>e(...t)):queueMicrotask(e)}var DN="browser",LN="browser",MN=!0,FN={},BN=[],jN="",RN={},UN={},WN={};function Qn(){}var zN=Qn,HN=Qn,VN=Qn,GN=Qn,KN=Qn,qN=Qn,YN=Qn;function JN(e){throw new Error("process.binding is not supported")}function XN(){return"/"}function ZN(e){throw new Error("process.chdir is not supported")}function QN(){return 0}var Hi=globalThis.performance||{},eD=Hi.now||Hi.mozNow||Hi.msNow||Hi.oNow||Hi.webkitNow||function(){return new Date().getTime()};function tD(e){var t=eD.call(Hi)*.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 rD=new Date;function nD(){var e=new Date,t=e-rD;return t/1e3}var Us={nextTick:NN,title:DN,browser:MN,env:FN,argv:BN,version:jN,versions:RN,on:zN,addListener:HN,once:VN,off:GN,removeListener:KN,removeAllListeners:qN,emit:YN,binding:JN,cwd:XN,chdir:ZN,umask:QN,hrtime:tD,platform:LN,release:UN,config:WN,uptime:nD},sy={};Object.keys(sy).forEach(e=>{const t=e.split(".");let r=Us;for(let n=0;n<t.length;n++){const i=t[n];n===t.length-1?r[i]=sy[e]:r=r[i]||(r[i]={})}});var iD=He({"node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js"(e){e.byteLength=l,e.toByteArray=d,e.fromByteArray=m;var t=[],r=[],n=typeof Uint8Array<"u"?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(o=0,a=i.length;o<a;++o)t[o]=i[o],r[i.charCodeAt(o)]=o;var o,a;r[45]=62,r[95]=63;function s(v){var y=v.length;if(y%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var w=v.indexOf("=");w===-1&&(w=y);var E=w===y?0:4-w%4;return[w,E]}function l(v){var y=s(v),w=y[0],E=y[1];return(w+E)*3/4-E}function u(v,y,w){return(y+w)*3/4-w}function d(v){var y,w=s(v),E=w[0],_=w[1],S=new n(u(v,E,_)),$=0,k=_>0?E-4:E,P;for(P=0;P<k;P+=4)y=r[v.charCodeAt(P)]<<18|r[v.charCodeAt(P+1)]<<12|r[v.charCodeAt(P+2)]<<6|r[v.charCodeAt(P+3)],S[$++]=y>>16&255,S[$++]=y>>8&255,S[$++]=y&255;return _===2&&(y=r[v.charCodeAt(P)]<<2|r[v.charCodeAt(P+1)]>>4,S[$++]=y&255),_===1&&(y=r[v.charCodeAt(P)]<<10|r[v.charCodeAt(P+1)]<<4|r[v.charCodeAt(P+2)]>>2,S[$++]=y>>8&255,S[$++]=y&255),S}function p(v){return t[v>>18&63]+t[v>>12&63]+t[v>>6&63]+t[v&63]}function h(v,y,w){for(var E,_=[],S=y;S<w;S+=3)E=(v[S]<<16&16711680)+(v[S+1]<<8&65280)+(v[S+2]&255),_.push(p(E));return _.join("")}function m(v){for(var y,w=v.length,E=w%3,_=[],S=16383,$=0,k=w-E;$<k;$+=S)_.push(h(v,$,$+S>k?k:$+S));return E===1?(y=v[w-1],_.push(t[y>>2]+t[y<<4&63]+"==")):E===2&&(y=(v[w-2]<<8)+v[w-1],_.push(t[y>>10]+t[y>>4&63]+t[y<<2&63]+"=")),_.join("")}}}),oD=He({"node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js"(e){e.read=function(t,r,n,i,o){var a,s,l=o*8-i-1,u=(1<<l)-1,d=u>>1,p=-7,h=n?o-1:0,m=n?-1:1,v=t[r+h];for(h+=m,a=v&(1<<-p)-1,v>>=-p,p+=l;p>0;a=a*256+t[r+h],h+=m,p-=8);for(s=a&(1<<-p)-1,a>>=-p,p+=i;p>0;s=s*256+t[r+h],h+=m,p-=8);if(a===0)a=1-d;else{if(a===u)return s?NaN:(v?-1:1)*(1/0);s=s+Math.pow(2,i),a=a-d}return(v?-1:1)*s*Math.pow(2,a-i)},e.write=function(t,r,n,i,o,a){var s,l,u,d=a*8-o-1,p=(1<<d)-1,h=p>>1,m=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=i?0:a-1,y=i?1:-1,w=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(l=isNaN(r)?1:0,s=p):(s=Math.floor(Math.log(r)/Math.LN2),r*(u=Math.pow(2,-s))<1&&(s--,u*=2),s+h>=1?r+=m/u:r+=m*Math.pow(2,1-h),r*u>=2&&(s++,u/=2),s+h>=p?(l=0,s=p):s+h>=1?(l=(r*u-1)*Math.pow(2,o),s=s+h):(l=r*Math.pow(2,h-1)*Math.pow(2,o),s=0));o>=8;t[n+v]=l&255,v+=y,l/=256,o-=8);for(s=s<<o|l,d+=o;d>0;t[n+v]=s&255,v+=y,s/=256,d-=8);t[n+v-y]|=w*128}}}),ly=He({"node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js"(e){var t=iD(),r=oD(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;var i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!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 o(){try{const b=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(b,f),b.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(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');const f=new Uint8Array(b);return Object.setPrototypeOf(f,s.prototype),f}function s(b,f,g){if(typeof b=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(b)}return l(b,f,g)}s.poolSize=8192;function l(b,f,g){if(typeof b=="string")return h(b,f);if(ArrayBuffer.isView(b))return v(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(Oe(b,ArrayBuffer)||b&&Oe(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Oe(b,SharedArrayBuffer)||b&&Oe(b.buffer,SharedArrayBuffer)))return y(b,f,g);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=b.valueOf&&b.valueOf();if(x!=null&&x!==b)return s.from(x,f,g);const O=w(b);if(O)return O;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return s.from(b[Symbol.toPrimitive]("string"),f,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}s.from=function(b,f,g){return l(b,f,g)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function d(b,f,g){return u(b),b<=0?a(b):f!==void 0?typeof g=="string"?a(b).fill(f,g):a(b).fill(f):a(b)}s.alloc=function(b,f,g){return d(b,f,g)};function p(b){return u(b),a(b<0?0:E(b)|0)}s.allocUnsafe=function(b){return p(b)},s.allocUnsafeSlow=function(b){return p(b)};function h(b,f){if((typeof f!="string"||f==="")&&(f="utf8"),!s.isEncoding(f))throw new TypeError("Unknown encoding: "+f);const g=S(b,f)|0;let x=a(g);const O=x.write(b,f);return O!==g&&(x=x.slice(0,O)),x}function m(b){const f=b.length<0?0:E(b.length)|0,g=a(f);for(let x=0;x<f;x+=1)g[x]=b[x]&255;return g}function v(b){if(Oe(b,Uint8Array)){const f=new Uint8Array(b);return y(f.buffer,f.byteOffset,f.byteLength)}return m(b)}function y(b,f,g){if(f<0||b.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<f+(g||0))throw new RangeError('"length" is outside of buffer bounds');let x;return f===void 0&&g===void 0?x=new Uint8Array(b):g===void 0?x=new Uint8Array(b,f):x=new Uint8Array(b,f,g),Object.setPrototypeOf(x,s.prototype),x}function w(b){if(s.isBuffer(b)){const f=E(b.length)|0,g=a(f);return g.length===0||b.copy(g,0,0,f),g}if(b.length!==void 0)return typeof b.length!="number"||Re(b.length)?a(0):m(b);if(b.type==="Buffer"&&Array.isArray(b.data))return m(b.data)}function E(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function _(b){return+b!=b&&(b=0),s.alloc(+b)}s.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==s.prototype},s.compare=function(f,g){if(Oe(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),Oe(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),!s.isBuffer(f)||!s.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===g)return 0;let x=f.length,O=g.length;for(let L=0,W=Math.min(x,O);L<W;++L)if(f[L]!==g[L]){x=f[L],O=g[L];break}return x<O?-1:O<x?1:0},s.isEncoding=function(f){switch(String(f).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(f,g){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return s.alloc(0);let x;if(g===void 0)for(g=0,x=0;x<f.length;++x)g+=f[x].length;const O=s.allocUnsafe(g);let L=0;for(x=0;x<f.length;++x){let W=f[x];if(Oe(W,Uint8Array))L+W.length>O.length?(s.isBuffer(W)||(W=s.from(W)),W.copy(O,L)):Uint8Array.prototype.set.call(O,W,L);else if(s.isBuffer(W))W.copy(O,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=W.length}return O};function S(b,f){if(s.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||Oe(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const g=b.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&g===0)return 0;let O=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return _e(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return Me(b).length;default:if(O)return x?-1:_e(b).length;f=(""+f).toLowerCase(),O=!0}}s.byteLength=S;function $(b,f,g){let x=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,f>>>=0,g<=f))return"";for(b||(b="utf8");;)switch(b){case"hex":return se(this,f,g);case"utf8":case"utf-8":return Y(this,f,g);case"ascii":return oe(this,f,g);case"latin1":case"binary":return ce(this,f,g);case"base64":return Z(this,f,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,f,g);default:if(x)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),x=!0}}s.prototype._isBuffer=!0;function k(b,f,g){const x=b[f];b[f]=b[g],b[g]=x}s.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;g<f;g+=2)k(this,g,g+1);return this},s.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let g=0;g<f;g+=4)k(this,g,g+3),k(this,g+1,g+2);return this},s.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let g=0;g<f;g+=8)k(this,g,g+7),k(this,g+1,g+6),k(this,g+2,g+5),k(this,g+3,g+4);return this},s.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?Y(this,0,f):$.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(f){if(!s.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:s.compare(this,f)===0},s.prototype.inspect=function(){let f="";const g=e.INSPECT_MAX_BYTES;return f=this.toString("hex",0,g).replace(/(.{2})/g,"$1 ").trim(),this.length>g&&(f+=" ... "),"<Buffer "+f+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(f,g,x,O,L){if(Oe(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(g===void 0&&(g=0),x===void 0&&(x=f?f.length:0),O===void 0&&(O=0),L===void 0&&(L=this.length),g<0||x>f.length||O<0||L>this.length)throw new RangeError("out of range index");if(O>=L&&g>=x)return 0;if(O>=L)return-1;if(g>=x)return 1;if(g>>>=0,x>>>=0,O>>>=0,L>>>=0,this===f)return 0;let W=L-O,me=x-g;const ke=Math.min(W,me),$e=this.slice(O,L),Ie=f.slice(g,x);for(let Ae=0;Ae<ke;++Ae)if($e[Ae]!==Ie[Ae]){W=$e[Ae],me=Ie[Ae];break}return W<me?-1:me<W?1:0};function P(b,f,g,x,O){if(b.length===0)return-1;if(typeof g=="string"?(x=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,Re(g)&&(g=O?0:b.length-1),g<0&&(g=b.length+g),g>=b.length){if(O)return-1;g=b.length-1}else if(g<0)if(O)g=0;else return-1;if(typeof f=="string"&&(f=s.from(f,x)),s.isBuffer(f))return f.length===0?-1:C(b,f,g,x,O);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?O?Uint8Array.prototype.indexOf.call(b,f,g):Uint8Array.prototype.lastIndexOf.call(b,f,g):C(b,[f],g,x,O);throw new TypeError("val must be string, number or Buffer")}function C(b,f,g,x,O){let L=1,W=b.length,me=f.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(b.length<2||f.length<2)return-1;L=2,W/=2,me/=2,g/=2}function ke(Ie,Ae){return L===1?Ie[Ae]:Ie.readUInt16BE(Ae*L)}let $e;if(O){let Ie=-1;for($e=g;$e<W;$e++)if(ke(b,$e)===ke(f,Ie===-1?0:$e-Ie)){if(Ie===-1&&(Ie=$e),$e-Ie+1===me)return Ie*L}else Ie!==-1&&($e-=$e-Ie),Ie=-1}else for(g+me>W&&(g=W-me),$e=g;$e>=0;$e--){let Ie=!0;for(let Ae=0;Ae<me;Ae++)if(ke(b,$e+Ae)!==ke(f,Ae)){Ie=!1;break}if(Ie)return $e}return-1}s.prototype.includes=function(f,g,x){return this.indexOf(f,g,x)!==-1},s.prototype.indexOf=function(f,g,x){return P(this,f,g,x,!0)},s.prototype.lastIndexOf=function(f,g,x){return P(this,f,g,x,!1)};function T(b,f,g,x){g=Number(g)||0;const O=b.length-g;x?(x=Number(x),x>O&&(x=O)):x=O;const L=f.length;x>L/2&&(x=L/2);let W;for(W=0;W<x;++W){const me=parseInt(f.substr(W*2,2),16);if(Re(me))return W;b[g+W]=me}return W}function D(b,f,g,x){return at(_e(f,b.length-g),b,g,x)}function j(b,f,g,x){return at(xe(f),b,g,x)}function F(b,f,g,x){return at(Me(f),b,g,x)}function M(b,f,g,x){return at(ae(f,b.length-g),b,g,x)}s.prototype.write=function(f,g,x,O){if(g===void 0)O="utf8",x=this.length,g=0;else if(x===void 0&&typeof g=="string")O=g,x=this.length,g=0;else if(isFinite(g))g=g>>>0,isFinite(x)?(x=x>>>0,O===void 0&&(O="utf8")):(O=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const L=this.length-g;if((x===void 0||x>L)&&(x=L),f.length>0&&(x<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");O||(O="utf8");let W=!1;for(;;)switch(O){case"hex":return T(this,f,g,x);case"utf8":case"utf-8":return D(this,f,g,x);case"ascii":case"latin1":case"binary":return j(this,f,g,x);case"base64":return F(this,f,g,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,f,g,x);default:if(W)throw new TypeError("Unknown encoding: "+O);O=(""+O).toLowerCase(),W=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(b,f,g){return f===0&&g===b.length?t.fromByteArray(b):t.fromByteArray(b.slice(f,g))}function Y(b,f,g){g=Math.min(b.length,g);const x=[];let O=f;for(;O<g;){const L=b[O];let W=null,me=L>239?4:L>223?3:L>191?2:1;if(O+me<=g){let ke,$e,Ie,Ae;switch(me){case 1:L<128&&(W=L);break;case 2:ke=b[O+1],(ke&192)===128&&(Ae=(L&31)<<6|ke&63,Ae>127&&(W=Ae));break;case 3:ke=b[O+1],$e=b[O+2],(ke&192)===128&&($e&192)===128&&(Ae=(L&15)<<12|(ke&63)<<6|$e&63,Ae>2047&&(Ae<55296||Ae>57343)&&(W=Ae));break;case 4:ke=b[O+1],$e=b[O+2],Ie=b[O+3],(ke&192)===128&&($e&192)===128&&(Ie&192)===128&&(Ae=(L&15)<<18|(ke&63)<<12|($e&63)<<6|Ie&63,Ae>65535&&Ae<1114112&&(W=Ae))}}W===null?(W=65533,me=1):W>65535&&(W-=65536,x.push(W>>>10&1023|55296),W=56320|W&1023),x.push(W),O+=me}return ne(x)}var X=4096;function ne(b){const f=b.length;if(f<=X)return String.fromCharCode.apply(String,b);let g="",x=0;for(;x<f;)g+=String.fromCharCode.apply(String,b.slice(x,x+=X));return g}function oe(b,f,g){let x="";g=Math.min(b.length,g);for(let O=f;O<g;++O)x+=String.fromCharCode(b[O]&127);return x}function ce(b,f,g){let x="";g=Math.min(b.length,g);for(let O=f;O<g;++O)x+=String.fromCharCode(b[O]);return x}function se(b,f,g){const x=b.length;(!f||f<0)&&(f=0),(!g||g<0||g>x)&&(g=x);let O="";for(let L=f;L<g;++L)O+=gt[b[L]];return O}function ge(b,f,g){const x=b.slice(f,g);let O="";for(let L=0;L<x.length-1;L+=2)O+=String.fromCharCode(x[L]+x[L+1]*256);return O}s.prototype.slice=function(f,g){const x=this.length;f=~~f,g=g===void 0?x:~~g,f<0?(f+=x,f<0&&(f=0)):f>x&&(f=x),g<0?(g+=x,g<0&&(g=0)):g>x&&(g=x),g<f&&(g=f);const O=this.subarray(f,g);return Object.setPrototypeOf(O,s.prototype),O};function le(b,f,g){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+f>g)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(f,g,x){f=f>>>0,g=g>>>0,x||le(f,g,this.length);let O=this[f],L=1,W=0;for(;++W<g&&(L*=256);)O+=this[f+W]*L;return O},s.prototype.readUintBE=s.prototype.readUIntBE=function(f,g,x){f=f>>>0,g=g>>>0,x||le(f,g,this.length);let O=this[f+--g],L=1;for(;g>0&&(L*=256);)O+=this[f+--g]*L;return O},s.prototype.readUint8=s.prototype.readUInt8=function(f,g){return f=f>>>0,g||le(f,1,this.length),this[f]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(f,g){return f=f>>>0,g||le(f,2,this.length),this[f]|this[f+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(f,g){return f=f>>>0,g||le(f,2,this.length),this[f]<<8|this[f+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(f,g){return f=f>>>0,g||le(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(f,g){return f=f>>>0,g||le(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},s.prototype.readBigUInt64LE=Se(function(f){f=f>>>0,Q(f,"offset");const g=this[f],x=this[f+7];(g===void 0||x===void 0)&&ie(f,this.length-8);const O=g+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,L=this[++f]+this[++f]*2**8+this[++f]*2**16+x*2**24;return BigInt(O)+(BigInt(L)<<BigInt(32))}),s.prototype.readBigUInt64BE=Se(function(f){f=f>>>0,Q(f,"offset");const g=this[f],x=this[f+7];(g===void 0||x===void 0)&&ie(f,this.length-8);const O=g*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],L=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x;return(BigInt(O)<<BigInt(32))+BigInt(L)}),s.prototype.readIntLE=function(f,g,x){f=f>>>0,g=g>>>0,x||le(f,g,this.length);let O=this[f],L=1,W=0;for(;++W<g&&(L*=256);)O+=this[f+W]*L;return L*=128,O>=L&&(O-=Math.pow(2,8*g)),O},s.prototype.readIntBE=function(f,g,x){f=f>>>0,g=g>>>0,x||le(f,g,this.length);let O=g,L=1,W=this[f+--O];for(;O>0&&(L*=256);)W+=this[f+--O]*L;return L*=128,W>=L&&(W-=Math.pow(2,8*g)),W},s.prototype.readInt8=function(f,g){return f=f>>>0,g||le(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},s.prototype.readInt16LE=function(f,g){f=f>>>0,g||le(f,2,this.length);const x=this[f]|this[f+1]<<8;return x&32768?x|4294901760:x},s.prototype.readInt16BE=function(f,g){f=f>>>0,g||le(f,2,this.length);const x=this[f+1]|this[f]<<8;return x&32768?x|4294901760:x},s.prototype.readInt32LE=function(f,g){return f=f>>>0,g||le(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},s.prototype.readInt32BE=function(f,g){return f=f>>>0,g||le(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},s.prototype.readBigInt64LE=Se(function(f){f=f>>>0,Q(f,"offset");const g=this[f],x=this[f+7];(g===void 0||x===void 0)&&ie(f,this.length-8);const O=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(x<<24);return(BigInt(O)<<BigInt(32))+BigInt(g+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),s.prototype.readBigInt64BE=Se(function(f){f=f>>>0,Q(f,"offset");const g=this[f],x=this[f+7];(g===void 0||x===void 0)&&ie(f,this.length-8);const O=(g<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(O)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x)}),s.prototype.readFloatLE=function(f,g){return f=f>>>0,g||le(f,4,this.length),r.read(this,f,!0,23,4)},s.prototype.readFloatBE=function(f,g){return f=f>>>0,g||le(f,4,this.length),r.read(this,f,!1,23,4)},s.prototype.readDoubleLE=function(f,g){return f=f>>>0,g||le(f,8,this.length),r.read(this,f,!0,52,8)},s.prototype.readDoubleBE=function(f,g){return f=f>>>0,g||le(f,8,this.length),r.read(this,f,!1,52,8)};function V(b,f,g,x,O,L){if(!s.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>O||f<L)throw new RangeError('"value" argument is out of bounds');if(g+x>b.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(f,g,x,O){if(f=+f,g=g>>>0,x=x>>>0,!O){const me=Math.pow(2,8*x)-1;V(this,f,g,x,me,0)}let L=1,W=0;for(this[g]=f&255;++W<x&&(L*=256);)this[g+W]=f/L&255;return g+x},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(f,g,x,O){if(f=+f,g=g>>>0,x=x>>>0,!O){const me=Math.pow(2,8*x)-1;V(this,f,g,x,me,0)}let L=x-1,W=1;for(this[g+L]=f&255;--L>=0&&(W*=256);)this[g+L]=f/W&255;return g+x},s.prototype.writeUint8=s.prototype.writeUInt8=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,1,255,0),this[g]=f&255,g+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,2,65535,0),this[g]=f&255,this[g+1]=f>>>8,g+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,2,65535,0),this[g]=f>>>8,this[g+1]=f&255,g+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,4,4294967295,0),this[g+3]=f>>>24,this[g+2]=f>>>16,this[g+1]=f>>>8,this[g]=f&255,g+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,4,4294967295,0),this[g]=f>>>24,this[g+1]=f>>>16,this[g+2]=f>>>8,this[g+3]=f&255,g+4};function J(b,f,g,x,O){N(f,x,O,b,g,7);let L=Number(f&BigInt(4294967295));b[g++]=L,L=L>>8,b[g++]=L,L=L>>8,b[g++]=L,L=L>>8,b[g++]=L;let W=Number(f>>BigInt(32)&BigInt(4294967295));return b[g++]=W,W=W>>8,b[g++]=W,W=W>>8,b[g++]=W,W=W>>8,b[g++]=W,g}function re(b,f,g,x,O){N(f,x,O,b,g,7);let L=Number(f&BigInt(4294967295));b[g+7]=L,L=L>>8,b[g+6]=L,L=L>>8,b[g+5]=L,L=L>>8,b[g+4]=L;let W=Number(f>>BigInt(32)&BigInt(4294967295));return b[g+3]=W,W=W>>8,b[g+2]=W,W=W>>8,b[g+1]=W,W=W>>8,b[g]=W,g+8}s.prototype.writeBigUInt64LE=Se(function(f,g=0){return J(this,f,g,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Se(function(f,g=0){return re(this,f,g,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(f,g,x,O){if(f=+f,g=g>>>0,!O){const ke=Math.pow(2,8*x-1);V(this,f,g,x,ke-1,-ke)}let L=0,W=1,me=0;for(this[g]=f&255;++L<x&&(W*=256);)f<0&&me===0&&this[g+L-1]!==0&&(me=1),this[g+L]=(f/W>>0)-me&255;return g+x},s.prototype.writeIntBE=function(f,g,x,O){if(f=+f,g=g>>>0,!O){const ke=Math.pow(2,8*x-1);V(this,f,g,x,ke-1,-ke)}let L=x-1,W=1,me=0;for(this[g+L]=f&255;--L>=0&&(W*=256);)f<0&&me===0&&this[g+L+1]!==0&&(me=1),this[g+L]=(f/W>>0)-me&255;return g+x},s.prototype.writeInt8=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,1,127,-128),f<0&&(f=255+f+1),this[g]=f&255,g+1},s.prototype.writeInt16LE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,2,32767,-32768),this[g]=f&255,this[g+1]=f>>>8,g+2},s.prototype.writeInt16BE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,2,32767,-32768),this[g]=f>>>8,this[g+1]=f&255,g+2},s.prototype.writeInt32LE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,4,2147483647,-2147483648),this[g]=f&255,this[g+1]=f>>>8,this[g+2]=f>>>16,this[g+3]=f>>>24,g+4},s.prototype.writeInt32BE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[g]=f>>>24,this[g+1]=f>>>16,this[g+2]=f>>>8,this[g+3]=f&255,g+4},s.prototype.writeBigInt64LE=Se(function(f,g=0){return J(this,f,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Se(function(f,g=0){return re(this,f,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(b,f,g,x,O,L){if(g+x>b.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function H(b,f,g,x,O){return f=+f,g=g>>>0,O||de(b,f,g,4),r.write(b,f,g,x,23,4),g+4}s.prototype.writeFloatLE=function(f,g,x){return H(this,f,g,!0,x)},s.prototype.writeFloatBE=function(f,g,x){return H(this,f,g,!1,x)};function G(b,f,g,x,O){return f=+f,g=g>>>0,O||de(b,f,g,8),r.write(b,f,g,x,52,8),g+8}s.prototype.writeDoubleLE=function(f,g,x){return G(this,f,g,!0,x)},s.prototype.writeDoubleBE=function(f,g,x){return G(this,f,g,!1,x)},s.prototype.copy=function(f,g,x,O){if(!s.isBuffer(f))throw new TypeError("argument should be a Buffer");if(x||(x=0),!O&&O!==0&&(O=this.length),g>=f.length&&(g=f.length),g||(g=0),O>0&&O<x&&(O=x),O===x||f.length===0||this.length===0)return 0;if(g<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(O<0)throw new RangeError("sourceEnd out of bounds");O>this.length&&(O=this.length),f.length-g<O-x&&(O=f.length-g+x);const L=O-x;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(g,x,O):Uint8Array.prototype.set.call(f,this.subarray(x,O),g),L},s.prototype.fill=function(f,g,x,O){if(typeof f=="string"){if(typeof g=="string"?(O=g,g=0,x=this.length):typeof x=="string"&&(O=x,x=this.length),O!==void 0&&typeof O!="string")throw new TypeError("encoding must be a string");if(typeof O=="string"&&!s.isEncoding(O))throw new TypeError("Unknown encoding: "+O);if(f.length===1){const W=f.charCodeAt(0);(O==="utf8"&&W<128||O==="latin1")&&(f=W)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(g<0||this.length<g||this.length<x)throw new RangeError("Out of range index");if(x<=g)return this;g=g>>>0,x=x===void 0?this.length:x>>>0,f||(f=0);let L;if(typeof f=="number")for(L=g;L<x;++L)this[L]=f;else{const W=s.isBuffer(f)?f:s.from(f,O),me=W.length;if(me===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(L=0;L<x-g;++L)this[L+g]=W[L%me]}return this};var B={};function z(b,f,g){B[b]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(O){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:O,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}z("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),z("ERR_INVALID_ARG_TYPE",function(b,f){return`The "${b}" argument must be of type number. Received type ${typeof f}`},TypeError),z("ERR_OUT_OF_RANGE",function(b,f,g){let x=`The value of "${b}" is out of range.`,O=g;return Number.isInteger(g)&&Math.abs(g)>2**32?O=K(String(g)):typeof g=="bigint"&&(O=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&(O=K(O)),O+="n"),x+=` It must be ${f}. Received ${O}`,x},RangeError);function K(b){let f="",g=b.length;const x=b[0]==="-"?1:0;for(;g>=x+4;g-=3)f=`_${b.slice(g-3,g)}${f}`;return`${b.slice(0,g)}${f}`}function I(b,f,g){Q(f,"offset"),(b[f]===void 0||b[f+g]===void 0)&&ie(f,b.length-(g+1))}function N(b,f,g,x,O,L){if(b>g||b<f){const W=typeof f=="bigint"?"n":"";let me;throw L>3?f===0||f===BigInt(0)?me=`>= 0${W} and < 2${W} ** ${(L+1)*8}${W}`:me=`>= -(2${W} ** ${(L+1)*8-1}${W}) and < 2 ** ${(L+1)*8-1}${W}`:me=`>= ${f}${W} and <= ${g}${W}`,new B.ERR_OUT_OF_RANGE("value",me,b)}I(x,O,L)}function Q(b,f){if(typeof b!="number")throw new B.ERR_INVALID_ARG_TYPE(f,"number",b)}function ie(b,f,g){throw Math.floor(b)!==b?(Q(b,g),new B.ERR_OUT_OF_RANGE(g||"offset","an integer",b)):f<0?new B.ERR_BUFFER_OUT_OF_BOUNDS:new B.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${f}`,b)}var pe=/[^+/0-9A-Za-z-_]/g;function ye(b){if(b=b.split("=")[0],b=b.trim().replace(pe,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function _e(b,f){f=f||1/0;let g;const x=b.length;let O=null;const L=[];for(let W=0;W<x;++W){if(g=b.charCodeAt(W),g>55295&&g<57344){if(!O){if(g>56319){(f-=3)>-1&&L.push(239,191,189);continue}else if(W+1===x){(f-=3)>-1&&L.push(239,191,189);continue}O=g;continue}if(g<56320){(f-=3)>-1&&L.push(239,191,189),O=g;continue}g=(O-55296<<10|g-56320)+65536}else O&&(f-=3)>-1&&L.push(239,191,189);if(O=null,g<128){if((f-=1)<0)break;L.push(g)}else if(g<2048){if((f-=2)<0)break;L.push(g>>6|192,g&63|128)}else if(g<65536){if((f-=3)<0)break;L.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((f-=4)<0)break;L.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return L}function xe(b){const f=[];for(let g=0;g<b.length;++g)f.push(b.charCodeAt(g)&255);return f}function ae(b,f){let g,x,O;const L=[];for(let W=0;W<b.length&&!((f-=2)<0);++W)g=b.charCodeAt(W),x=g>>8,O=g%256,L.push(O),L.push(x);return L}function Me(b){return t.toByteArray(ye(b))}function at(b,f,g,x){let O;for(O=0;O<x&&!(O+g>=f.length||O>=b.length);++O)f[O+g]=b[O];return O}function Oe(b,f){return b instanceof f||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===f.name}function Re(b){return b!==b}var gt=function(){const b="0123456789abcdef",f=new Array(256);for(let g=0;g<16;++g){const x=g*16;for(let O=0;O<16;++O)f[x+O]=b[g]+b[O]}return f}();function Se(b){return typeof BigInt>"u"?je:b}function je(){throw new Error("BigInt not supported")}}});/*! Bundled license information:
95
+
96
+ ieee754/index.js:
97
+ (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> *)
98
+
99
+ buffer/index.js:
100
+ (*!
101
+ * The buffer module from node.js, for the browser.
102
+ *
103
+ * @author Feross Aboukhadijeh <https://feross.org>
104
+ * @license MIT
105
+ *)
106
+ */var aD=Zn(ly());globalThis.global=globalThis,globalThis.Buffer=aD.Buffer,globalThis.process=Us;var sD=Zn(ay()),Hu=Zn(ay());sD.default,Hu.callbackify;var _r=Hu.inspect;Hu.promisify;var Ws={exports:{}};Ws.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",d="[object Boolean]",p="[object Date]",h="[object Error]",m="[object Function]",v="[object GeneratorFunction]",y="[object Map]",w="[object Number]",E="[object Null]",_="[object Object]",S="[object Proxy]",$="[object RegExp]",k="[object Set]",P="[object String]",C="[object Undefined]",T="[object WeakMap]",D="[object ArrayBuffer]",j="[object DataView]",F="[object Float32Array]",M="[object Float64Array]",Z="[object Int8Array]",Y="[object Int16Array]",X="[object Int32Array]",ne="[object Uint8Array]",oe="[object Uint8ClampedArray]",ce="[object Uint16Array]",se="[object Uint32Array]",ge=/[\\^$.*+?()[\]{}|]/g,le=/^\[object .+?Constructor\]$/,V=/^(?:0|[1-9]\d*)$/,J={};J[F]=J[M]=J[Z]=J[Y]=J[X]=J[ne]=J[oe]=J[ce]=J[se]=!0,J[s]=J[l]=J[D]=J[d]=J[j]=J[p]=J[h]=J[m]=J[y]=J[w]=J[_]=J[$]=J[k]=J[P]=J[T]=!1;var re=typeof et=="object"&&et&&et.Object===Object&&et,de=typeof self=="object"&&self&&self.Object===Object&&self,H=re||de||Function("return this")(),G=t&&!t.nodeType&&t,B=G&&!0&&e&&!e.nodeType&&e,z=B&&B.exports===G,K=z&&re.process,I=function(){try{var A=B&&B.require&&B.require("util").types;return A||K&&K.binding&&K.binding("util")}catch{}}(),N=I&&I.isTypedArray;function Q(A,U,te){switch(te.length){case 0:return A.call(U);case 1:return A.call(U,te[0]);case 2:return A.call(U,te[0],te[1]);case 3:return A.call(U,te[0],te[1],te[2])}return A.apply(U,te)}function ie(A,U){for(var te=-1,he=Array(A);++te<A;)he[te]=U(te);return he}function pe(A){return function(U){return A(U)}}function ye(A,U){return A==null?void 0:A[U]}function _e(A,U){return function(te){return A(U(te))}}var xe=Array.prototype,ae=Function.prototype,Me=Object.prototype,at=H["__core-js_shared__"],Oe=ae.toString,Re=Me.hasOwnProperty,gt=function(){var A=/[^.]+$/.exec(at&&at.keys&&at.keys.IE_PROTO||"");return A?"Symbol(src)_1."+A:""}(),Se=Me.toString,je=Oe.call(Object),b=RegExp("^"+Oe.call(Re).replace(ge,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),f=z?H.Buffer:void 0,g=H.Symbol,x=H.Uint8Array,O=f?f.allocUnsafe:void 0,L=_e(Object.getPrototypeOf,Object),W=Object.create,me=Me.propertyIsEnumerable,ke=xe.splice,$e=g?g.toStringTag:void 0,Ie=function(){try{var A=_a(Object,"defineProperty");return A({},"",{}),A}catch{}}(),Ae=f?f.isBuffer:void 0,nn=Math.max,oo=Date.now,pr=_a(H,"Map"),Xt=_a(Object,"create"),si=function(){function A(){}return function(U){if(!Qt(U))return{};if(W)return W(U);A.prototype=U;var te=new A;return A.prototype=void 0,te}}();function Lt(A){var U=-1,te=A==null?0:A.length;for(this.clear();++U<te;){var he=A[U];this.set(he[0],he[1])}}function ga(){this.__data__=Xt?Xt(null):{},this.size=0}function ao(A){var U=this.has(A)&&delete this.__data__[A];return this.size-=U?1:0,U}function ma(A){var U=this.__data__;if(Xt){var te=U[A];return te===n?void 0:te}return Re.call(U,A)?U[A]:void 0}function so(A){var U=this.__data__;return Xt?U[A]!==void 0:Re.call(U,A)}function lo(A,U){var te=this.__data__;return this.size+=this.has(A)?0:1,te[A]=Xt&&U===void 0?n:U,this}Lt.prototype.clear=ga,Lt.prototype.delete=ao,Lt.prototype.get=ma,Lt.prototype.has=so,Lt.prototype.set=lo;function Ot(A){var U=-1,te=A==null?0:A.length;for(this.clear();++U<te;){var he=A[U];this.set(he[0],he[1])}}function va(){this.__data__=[],this.size=0}function co(A){var U=this.__data__,te=Nt(U,A);if(te<0)return!1;var he=U.length-1;return te==he?U.pop():ke.call(U,te,1),--this.size,!0}function ya(A){var U=this.__data__,te=Nt(U,A);return te<0?void 0:U[te][1]}function ba(A){return Nt(this.__data__,A)>-1}function wa(A,U){var te=this.__data__,he=Nt(te,A);return he<0?(++this.size,te.push([A,U])):te[he][1]=U,this}Ot.prototype.clear=va,Ot.prototype.delete=co,Ot.prototype.get=ya,Ot.prototype.has=ba,Ot.prototype.set=wa;function Zt(A){var U=-1,te=A==null?0:A.length;for(this.clear();++U<te;){var he=A[U];this.set(he[0],he[1])}}function q(){this.size=0,this.__data__={hash:new Lt,map:new(pr||Ot),string:new Lt}}function fe(A){var U=Dn(this,A).delete(A);return this.size-=U?1:0,U}function Ee(A){return Dn(this,A).get(A)}function Ne(A){return Dn(this,A).has(A)}function Qe(A,U){var te=Dn(this,A),he=te.size;return te.set(A,U),this.size+=te.size==he?0:1,this}Zt.prototype.clear=q,Zt.prototype.delete=fe,Zt.prototype.get=Ee,Zt.prototype.has=Ne,Zt.prototype.set=Qe;function We(A){var U=this.__data__=new Ot(A);this.size=U.size}function Ve(){this.__data__=new Ot,this.size=0}function ze(A){var U=this.__data__,te=U.delete(A);return this.size=U.size,te}function kt(A){return this.__data__.get(A)}function wt(A){return this.__data__.has(A)}function Et(A,U){var te=this.__data__;if(te instanceof Ot){var he=te.__data__;if(!pr||he.length<r-1)return he.push([A,U]),this.size=++te.size,this;te=this.__data__=new Zt(he)}return te.set(A,U),this.size=te.size,this}We.prototype.clear=Ve,We.prototype.delete=ze,We.prototype.get=kt,We.prototype.has=wt,We.prototype.set=Et;function Ht(A,U){var te=fi(A),he=!te&&ui(A),Te=!te&&!he&&ho(A),Ce=!te&&!he&&!Te&&kl(A),Fe=te||he||Te||Ce,Be=Fe?ie(A.length,String):[],Ge=Be.length;for(var Mt in A)(U||Re.call(A,Mt))&&!(Fe&&(Mt=="length"||Te&&(Mt=="offset"||Mt=="parent")||Ce&&(Mt=="buffer"||Mt=="byteLength"||Mt=="byteOffset")||Al(Mt,Ge)))&&Be.push(Mt);return Be}function tr(A,U,te){(te!==void 0&&!Ln(A[U],te)||te===void 0&&!(U in A))&&li(A,U,te)}function uo(A,U,te){var he=A[U];(!(Re.call(A,U)&&Ln(he,te))||te===void 0&&!(U in A))&&li(A,U,te)}function Nt(A,U){for(var te=A.length;te--;)if(Ln(A[te][0],U))return te;return-1}function li(A,U,te){U=="__proto__"&&Ie?Ie(A,U,{configurable:!0,enumerable:!0,value:te,writable:!0}):A[U]=te}var bd=Pd();function on(A){return A==null?A===void 0?C:E:$e&&$e in Object(A)?kd(A):Md(A)}function Ea(A){return di(A)&&on(A)==s}function wd(A){if(!Qt(A)||Ol(A))return!1;var U=go(A)?b:le;return U.test(po(A))}function Ed(A){return di(A)&&Hr(A.length)&&!!J[on(A)]}function _d(A){if(!Qt(A))return Ld(A);var U=Tl(A),te=[];for(var he in A)he=="constructor"&&(U||!Re.call(A,he))||te.push(he);return te}function fo(A,U,te,he,Te){A!==U&&bd(U,function(Ce,Fe){if(Te||(Te=new We),Qt(Ce))xd(A,U,Fe,te,fo,he,Te);else{var Be=he?he(Sa(A,Fe),Ce,Fe+"",A,U,Te):void 0;Be===void 0&&(Be=Ce),tr(A,Fe,Be)}},Dl)}function xd(A,U,te,he,Te,Ce,Fe){var Be=Sa(A,te),Ge=Sa(U,te),Mt=Fe.get(Ge);if(Mt){tr(A,te,Mt);return}var jt=Ce?Ce(Be,Ge,te+"",A,U,Fe):void 0,an=jt===void 0;if(an){var mo=fi(Ge),Ud=!mo&&ho(Ge),nw=!mo&&!Ud&&kl(Ge);jt=Ge,mo||Ud||nw?fi(Be)?jt=Be:Il(Be)?jt=Od(Be):Ud?(an=!1,jt=$d(Ge,!0)):nw?(an=!1,jt=Ad(Ge,!0)):jt=[]:Pl(Ge)||ui(Ge)?(jt=Be,ui(Be)?jt=Nl(Be):(!Qt(Be)||go(Be))&&(jt=Cl(Ge))):an=!1}an&&(Fe.set(Ge,jt),Te(jt,Ge,he,Ce,Fe),Fe.delete(Ge)),tr(A,te,jt)}function $l(A,U){return Fd(xa(A,U,R),A+"")}var Sd=Ie?function(A,U){return Ie(A,"toString",{configurable:!0,enumerable:!1,value:Rd(U),writable:!0})}:R;function $d(A,U){if(U)return A.slice();var te=A.length,he=O?O(te):new A.constructor(te);return A.copy(he),he}function Cd(A){var U=new A.constructor(A.byteLength);return new x(U).set(new x(A)),U}function Ad(A,U){var te=U?Cd(A.buffer):A.buffer;return new A.constructor(te,A.byteOffset,A.length)}function Od(A,U){var te=-1,he=A.length;for(U||(U=Array(he));++te<he;)U[te]=A[te];return U}function Td(A,U,te,he){var Te=!te;te||(te={});for(var Ce=-1,Fe=U.length;++Ce<Fe;){var Be=U[Ce],Ge=he?he(te[Be],A[Be],Be,te,A):void 0;Ge===void 0&&(Ge=A[Be]),Te?li(te,Be,Ge):uo(te,Be,Ge)}return te}function Id(A){return $l(function(U,te){var he=-1,Te=te.length,Ce=Te>1?te[Te-1]:void 0,Fe=Te>2?te[2]:void 0;for(Ce=A.length>3&&typeof Ce=="function"?(Te--,Ce):void 0,Fe&&Nd(te[0],te[1],Fe)&&(Ce=Te<3?void 0:Ce,Te=1),U=Object(U);++he<Te;){var Be=te[he];Be&&A(U,Be,he,Ce)}return U})}function Pd(A){return function(U,te,he){for(var Te=-1,Ce=Object(U),Fe=he(U),Be=Fe.length;Be--;){var Ge=Fe[A?Be:++Te];if(te(Ce[Ge],Ge,Ce)===!1)break}return U}}function ci(A,U,te,he,Te,Ce){return Qt(A)&&Qt(U)&&(Ce.set(U,A),fo(A,U,void 0,ci,Ce),Ce.delete(U)),A}function Dn(A,U){var te=A.__data__;return Dd(U)?te[typeof U=="string"?"string":"hash"]:te.map}function _a(A,U){var te=ye(A,U);return wd(te)?te:void 0}function kd(A){var U=Re.call(A,$e),te=A[$e];try{A[$e]=void 0;var he=!0}catch{}var Te=Se.call(A);return he&&(U?A[$e]=te:delete A[$e]),Te}function Cl(A){return typeof A.constructor=="function"&&!Tl(A)?si(L(A)):{}}function Al(A,U){var te=typeof A;return U=U??a,!!U&&(te=="number"||te!="symbol"&&V.test(A))&&A>-1&&A%1==0&&A<U}function Nd(A,U,te){if(!Qt(te))return!1;var he=typeof U;return(he=="number"?$a(te)&&Al(U,te.length):he=="string"&&U in te)?Ln(te[U],A):!1}function Dd(A){var U=typeof A;return U=="string"||U=="number"||U=="symbol"||U=="boolean"?A!=="__proto__":A===null}function Ol(A){return!!gt&&gt in A}function Tl(A){var U=A&&A.constructor,te=typeof U=="function"&&U.prototype||Me;return A===te}function Ld(A){var U=[];if(A!=null)for(var te in Object(A))U.push(te);return U}function Md(A){return Se.call(A)}function xa(A,U,te){return U=nn(U===void 0?A.length-1:U,0),function(){for(var he=arguments,Te=-1,Ce=nn(he.length-U,0),Fe=Array(Ce);++Te<Ce;)Fe[Te]=he[U+Te];Te=-1;for(var Be=Array(U+1);++Te<U;)Be[Te]=he[Te];return Be[U]=te(Fe),Q(A,this,Be)}}function Sa(A,U){if(!(U==="constructor"&&typeof A[U]=="function")&&U!="__proto__")return A[U]}var Fd=Bd(Sd);function Bd(A){var U=0,te=0;return function(){var he=oo(),Te=o-(he-te);if(te=he,Te>0){if(++U>=i)return arguments[0]}else U=0;return A.apply(void 0,arguments)}}function po(A){if(A!=null){try{return Oe.call(A)}catch{}try{return A+""}catch{}}return""}function Ln(A,U){return A===U||A!==A&&U!==U}var ui=Ea(function(){return arguments}())?Ea:function(A){return di(A)&&Re.call(A,"callee")&&!me.call(A,"callee")},fi=Array.isArray;function $a(A){return A!=null&&Hr(A.length)&&!go(A)}function Il(A){return di(A)&&$a(A)}var ho=Ae||ee;function go(A){if(!Qt(A))return!1;var U=on(A);return U==m||U==v||U==u||U==S}function Hr(A){return typeof A=="number"&&A>-1&&A%1==0&&A<=a}function Qt(A){var U=typeof A;return A!=null&&(U=="object"||U=="function")}function di(A){return A!=null&&typeof A=="object"}function Pl(A){if(!di(A)||on(A)!=_)return!1;var U=L(A);if(U===null)return!0;var te=Re.call(U,"constructor")&&U.constructor;return typeof te=="function"&&te instanceof te&&Oe.call(te)==je}var kl=N?pe(N):Ed;function Nl(A){return Td(A,Dl(A))}var jd=$l(function(A){return A.push(void 0,ci),Q(Ll,void 0,A)});function Dl(A){return $a(A)?Ht(A,!0):_d(A)}var Ll=Id(function(A,U,te,he){fo(A,U,te,he)});function Rd(A){return function(){return A}}function R(A){return A}function ee(){return!1}e.exports=jd}(Ws,Ws.exports);var lD=Ws.exports;const cD=cn(lD);var uD=Zn(ly()),Cn=uD.Buffer,Ko=(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 ${dD(r.F)}:${r.L}`),new fD(n)},fD=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},dD=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},pD=He({"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(C,T,D){return Function.prototype.apply.call(C,T,D)},i;r&&typeof r.ownKeys=="function"?i=r.ownKeys:Object.getOwnPropertySymbols?i=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:i=function(C){return Object.getOwnPropertyNames(C)};function o(P){console&&console.warn&&console.warn(P)}var a=Number.isNaN||function(C){return C!==C};function s(){s.init.call(this)}t.exports=s,t.exports.once=S,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(P){if(typeof P!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof P)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(P){if(typeof P!="number"||P<0||a(P))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+P+".");l=P}}),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(C){if(typeof C!="number"||C<0||a(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function d(P){return P._maxListeners===void 0?s.defaultMaxListeners:P._maxListeners}s.prototype.getMaxListeners=function(){return d(this)},s.prototype.emit=function(C){for(var T=[],D=1;D<arguments.length;D++)T.push(arguments[D]);var j=C==="error",F=this._events;if(F!==void 0)j=j&&F.error===void 0;else if(!j)return!1;if(j){var M;if(T.length>0&&(M=T[0]),M instanceof Error)throw M;var Z=new Error("Unhandled error."+(M?" ("+M.message+")":""));throw Z.context=M,Z}var Y=F[C];if(Y===void 0)return!1;if(typeof Y=="function")n(Y,this,T);else for(var X=Y.length,ne=w(Y,X),D=0;D<X;++D)n(ne[D],this,T);return!0};function p(P,C,T,D){var j,F,M;if(u(T),F=P._events,F===void 0?(F=P._events=Object.create(null),P._eventsCount=0):(F.newListener!==void 0&&(P.emit("newListener",C,T.listener?T.listener:T),F=P._events),M=F[C]),M===void 0)M=F[C]=T,++P._eventsCount;else if(typeof M=="function"?M=F[C]=D?[T,M]:[M,T]:D?M.unshift(T):M.push(T),j=d(P),j>0&&M.length>j&&!M.warned){M.warned=!0;var Z=new Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");Z.name="MaxListenersExceededWarning",Z.emitter=P,Z.type=C,Z.count=M.length,o(Z)}return P}s.prototype.addListener=function(C,T){return p(this,C,T,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(C,T){return p(this,C,T,!0)};function h(){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 m(P,C,T){var D={fired:!1,wrapFn:void 0,target:P,type:C,listener:T},j=h.bind(D);return j.listener=T,D.wrapFn=j,j}s.prototype.once=function(C,T){return u(T),this.on(C,m(this,C,T)),this},s.prototype.prependOnceListener=function(C,T){return u(T),this.prependListener(C,m(this,C,T)),this},s.prototype.removeListener=function(C,T){var D,j,F,M,Z;if(u(T),j=this._events,j===void 0)return this;if(D=j[C],D===void 0)return this;if(D===T||D.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete j[C],j.removeListener&&this.emit("removeListener",C,D.listener||T));else if(typeof D!="function"){for(F=-1,M=D.length-1;M>=0;M--)if(D[M]===T||D[M].listener===T){Z=D[M].listener,F=M;break}if(F<0)return this;F===0?D.shift():E(D,F),D.length===1&&(j[C]=D[0]),j.removeListener!==void 0&&this.emit("removeListener",C,Z||T)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(C){var T,D,j;if(D=this._events,D===void 0)return this;if(D.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):D[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete D[C]),this;if(arguments.length===0){var F=Object.keys(D),M;for(j=0;j<F.length;++j)M=F[j],M!=="removeListener"&&this.removeAllListeners(M);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=D[C],typeof T=="function")this.removeListener(C,T);else if(T!==void 0)for(j=T.length-1;j>=0;j--)this.removeListener(C,T[j]);return this};function v(P,C,T){var D=P._events;if(D===void 0)return[];var j=D[C];return j===void 0?[]:typeof j=="function"?T?[j.listener||j]:[j]:T?_(j):w(j,j.length)}s.prototype.listeners=function(C){return v(this,C,!0)},s.prototype.rawListeners=function(C){return v(this,C,!1)},s.listenerCount=function(P,C){return typeof P.listenerCount=="function"?P.listenerCount(C):y.call(P,C)},s.prototype.listenerCount=y;function y(P){var C=this._events;if(C!==void 0){var T=C[P];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?i(this._events):[]};function w(P,C){for(var T=new Array(C),D=0;D<C;++D)T[D]=P[D];return T}function E(P,C){for(;C+1<P.length;C++)P[C]=P[C+1];P.pop()}function _(P){for(var C=new Array(P.length),T=0;T<C.length;++T)C[T]=P[T].listener||P[T];return C}function S(P,C){return new Promise(function(T,D){function j(M){P.removeListener(C,F),D(M)}function F(){typeof P.removeListener=="function"&&P.removeListener("error",j),T([].slice.call(arguments))}k(P,C,F,{once:!0}),C!=="error"&&$(P,j,{once:!0})})}function $(P,C,T){typeof P.on=="function"&&k(P,"error",C,T)}function k(P,C,T,D){if(typeof P.on=="function")D.once?P.once(C,T):P.on(C,T);else if(typeof P.addEventListener=="function")P.addEventListener(C,function j(F){D.once&&P.removeEventListener(C,j),T(F)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof P)}}}),cy=Zn(pD());cy.EventEmitter,cy.EventEmitter;var zs=e=>{const t=Object.getPrototypeOf(e).constructor.name;return e.toJSON?`${t}(${_r(e.toJSON())})`:String(e)},uy=e=>{throw e},fy;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.VERBOSE=1]="VERBOSE",e[e.BOLD=2]="BOLD"})(fy||(fy={}));var hD=(e,t=8)=>{const r=String(e);return r.length<=t?r:r.slice(0,t)},Hs=Symbol.for("devtoolsFormatter"),gD=()=>{typeof window<"u"&&(window.devtoolsFormatters??(window.devtoolsFormatters=[])).push({header:(e,t)=>{const r=e[Hs];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[Hs];return!r||!r.hasBody?!1:r.hasBody(t)},body:(e,t)=>{const r=e[Hs];return!r||!r.body?null:r.body(t)}})};gD();var mD=Symbol.for("dxos.common.equals"),Vu={exports:{}},Gu={exports:{}},qo={},Vs={};Vs.byteLength=bD,Vs.toByteArray=ED,Vs.fromByteArray=SD;for(var Ur=[],ur=[],vD=typeof Uint8Array<"u"?Uint8Array:Array,Ku="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vi=0,yD=Ku.length;Vi<yD;++Vi)Ur[Vi]=Ku[Vi],ur[Ku.charCodeAt(Vi)]=Vi;ur[45]=62,ur[95]=63;function dy(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 bD(e){var t=dy(e),r=t[0],n=t[1];return(r+n)*3/4-n}function wD(e,t,r){return(t+r)*3/4-r}function ED(e){var t,r=dy(e),n=r[0],i=r[1],o=new vD(wD(e,n,i)),a=0,s=i>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)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return i===2&&(t=ur[e.charCodeAt(l)]<<2|ur[e.charCodeAt(l+1)]>>4,o[a++]=t&255),i===1&&(t=ur[e.charCodeAt(l)]<<10|ur[e.charCodeAt(l+1)]<<4|ur[e.charCodeAt(l+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function _D(e){return Ur[e>>18&63]+Ur[e>>12&63]+Ur[e>>6&63]+Ur[e&63]}function xD(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(e[o+2]&255),i.push(_D(n));return i.join("")}function SD(e){for(var t,r=e.length,n=r%3,i=[],o=16383,a=0,s=r-n;a<s;a+=o)i.push(xD(e,a,a+o>s?s:a+o));return n===1?(t=e[r-1],i.push(Ur[t>>2]+Ur[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],i.push(Ur[t>>10]+Ur[t>>4&63]+Ur[t<<2&63]+"=")),i.join("")}var qu={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */qu.read=function(e,t,r,n,i){var o,a,s=i*8-n-1,l=(1<<s)-1,u=l>>1,d=-7,p=r?i-1:0,h=r?-1:1,m=e[t+p];for(p+=h,o=m&(1<<-d)-1,m>>=-d,d+=s;d>0;o=o*256+e[t+p],p+=h,d-=8);for(a=o&(1<<-d)-1,o>>=-d,d+=n;d>0;a=a*256+e[t+p],p+=h,d-=8);if(o===0)o=1-u;else{if(o===l)return a?NaN:(m?-1:1)*(1/0);a=a+Math.pow(2,n),o=o-u}return(m?-1:1)*a*Math.pow(2,o-n)},qu.write=function(e,t,r,n,i,o){var a,s,l,u=o*8-i-1,d=(1<<u)-1,p=d>>1,h=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=n?0:o-1,v=n?1:-1,y=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=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+p>=1?t+=h/l:t+=h*Math.pow(2,1-p),t*l>=2&&(a++,l/=2),a+p>=d?(s=0,a=d):a+p>=1?(s=(t*l-1)*Math.pow(2,i),a=a+p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),a=0));i>=8;e[r+m]=s&255,m+=v,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[r+m]=a&255,m+=v,a/=256,u-=8);e[r+m-v]|=y*128};/*!
107
+ * The buffer module from node.js, for the browser.
108
+ *
109
+ * @author Feross Aboukhadijeh <https://feross.org>
110
+ * @license MIT
111
+ */(function(e){const t=Vs,r=qu,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=_,e.INSPECT_MAX_BYTES=50;const i=2147483647;e.kMaxLength=i,s.TYPED_ARRAY_SUPPORT=o(),!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 o(){try{const b=new Uint8Array(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,Uint8Array.prototype),Object.setPrototypeOf(b,f),b.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(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');const f=new Uint8Array(b);return Object.setPrototypeOf(f,s.prototype),f}function s(b,f,g){if(typeof b=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(b)}return l(b,f,g)}s.poolSize=8192;function l(b,f,g){if(typeof b=="string")return h(b,f);if(ArrayBuffer.isView(b))return v(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(Oe(b,ArrayBuffer)||b&&Oe(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Oe(b,SharedArrayBuffer)||b&&Oe(b.buffer,SharedArrayBuffer)))return y(b,f,g);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=b.valueOf&&b.valueOf();if(x!=null&&x!==b)return s.from(x,f,g);const O=w(b);if(O)return O;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return s.from(b[Symbol.toPrimitive]("string"),f,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}s.from=function(b,f,g){return l(b,f,g)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function d(b,f,g){return u(b),b<=0?a(b):f!==void 0?typeof g=="string"?a(b).fill(f,g):a(b).fill(f):a(b)}s.alloc=function(b,f,g){return d(b,f,g)};function p(b){return u(b),a(b<0?0:E(b)|0)}s.allocUnsafe=function(b){return p(b)},s.allocUnsafeSlow=function(b){return p(b)};function h(b,f){if((typeof f!="string"||f==="")&&(f="utf8"),!s.isEncoding(f))throw new TypeError("Unknown encoding: "+f);const g=S(b,f)|0;let x=a(g);const O=x.write(b,f);return O!==g&&(x=x.slice(0,O)),x}function m(b){const f=b.length<0?0:E(b.length)|0,g=a(f);for(let x=0;x<f;x+=1)g[x]=b[x]&255;return g}function v(b){if(Oe(b,Uint8Array)){const f=new Uint8Array(b);return y(f.buffer,f.byteOffset,f.byteLength)}return m(b)}function y(b,f,g){if(f<0||b.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<f+(g||0))throw new RangeError('"length" is outside of buffer bounds');let x;return f===void 0&&g===void 0?x=new Uint8Array(b):g===void 0?x=new Uint8Array(b,f):x=new Uint8Array(b,f,g),Object.setPrototypeOf(x,s.prototype),x}function w(b){if(s.isBuffer(b)){const f=E(b.length)|0,g=a(f);return g.length===0||b.copy(g,0,0,f),g}if(b.length!==void 0)return typeof b.length!="number"||Re(b.length)?a(0):m(b);if(b.type==="Buffer"&&Array.isArray(b.data))return m(b.data)}function E(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function _(b){return+b!=b&&(b=0),s.alloc(+b)}s.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==s.prototype},s.compare=function(f,g){if(Oe(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),Oe(g,Uint8Array)&&(g=s.from(g,g.offset,g.byteLength)),!s.isBuffer(f)||!s.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===g)return 0;let x=f.length,O=g.length;for(let L=0,W=Math.min(x,O);L<W;++L)if(f[L]!==g[L]){x=f[L],O=g[L];break}return x<O?-1:O<x?1:0},s.isEncoding=function(f){switch(String(f).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(f,g){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return s.alloc(0);let x;if(g===void 0)for(g=0,x=0;x<f.length;++x)g+=f[x].length;const O=s.allocUnsafe(g);let L=0;for(x=0;x<f.length;++x){let W=f[x];if(Oe(W,Uint8Array))L+W.length>O.length?(s.isBuffer(W)||(W=s.from(W)),W.copy(O,L)):Uint8Array.prototype.set.call(O,W,L);else if(s.isBuffer(W))W.copy(O,L);else throw new TypeError('"list" argument must be an Array of Buffers');L+=W.length}return O};function S(b,f){if(s.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||Oe(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const g=b.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&g===0)return 0;let O=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return _e(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return Me(b).length;default:if(O)return x?-1:_e(b).length;f=(""+f).toLowerCase(),O=!0}}s.byteLength=S;function $(b,f,g){let x=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,f>>>=0,g<=f))return"";for(b||(b="utf8");;)switch(b){case"hex":return se(this,f,g);case"utf8":case"utf-8":return Y(this,f,g);case"ascii":return oe(this,f,g);case"latin1":case"binary":return ce(this,f,g);case"base64":return Z(this,f,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ge(this,f,g);default:if(x)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),x=!0}}s.prototype._isBuffer=!0;function k(b,f,g){const x=b[f];b[f]=b[g],b[g]=x}s.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;g<f;g+=2)k(this,g,g+1);return this},s.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let g=0;g<f;g+=4)k(this,g,g+3),k(this,g+1,g+2);return this},s.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let g=0;g<f;g+=8)k(this,g,g+7),k(this,g+1,g+6),k(this,g+2,g+5),k(this,g+3,g+4);return this},s.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?Y(this,0,f):$.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(f){if(!s.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:s.compare(this,f)===0},s.prototype.inspect=function(){let f="";const g=e.INSPECT_MAX_BYTES;return f=this.toString("hex",0,g).replace(/(.{2})/g,"$1 ").trim(),this.length>g&&(f+=" ... "),"<Buffer "+f+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(f,g,x,O,L){if(Oe(f,Uint8Array)&&(f=s.from(f,f.offset,f.byteLength)),!s.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(g===void 0&&(g=0),x===void 0&&(x=f?f.length:0),O===void 0&&(O=0),L===void 0&&(L=this.length),g<0||x>f.length||O<0||L>this.length)throw new RangeError("out of range index");if(O>=L&&g>=x)return 0;if(O>=L)return-1;if(g>=x)return 1;if(g>>>=0,x>>>=0,O>>>=0,L>>>=0,this===f)return 0;let W=L-O,me=x-g;const ke=Math.min(W,me),$e=this.slice(O,L),Ie=f.slice(g,x);for(let Ae=0;Ae<ke;++Ae)if($e[Ae]!==Ie[Ae]){W=$e[Ae],me=Ie[Ae];break}return W<me?-1:me<W?1:0};function P(b,f,g,x,O){if(b.length===0)return-1;if(typeof g=="string"?(x=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,Re(g)&&(g=O?0:b.length-1),g<0&&(g=b.length+g),g>=b.length){if(O)return-1;g=b.length-1}else if(g<0)if(O)g=0;else return-1;if(typeof f=="string"&&(f=s.from(f,x)),s.isBuffer(f))return f.length===0?-1:C(b,f,g,x,O);if(typeof f=="number")return f=f&255,typeof Uint8Array.prototype.indexOf=="function"?O?Uint8Array.prototype.indexOf.call(b,f,g):Uint8Array.prototype.lastIndexOf.call(b,f,g):C(b,[f],g,x,O);throw new TypeError("val must be string, number or Buffer")}function C(b,f,g,x,O){let L=1,W=b.length,me=f.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(b.length<2||f.length<2)return-1;L=2,W/=2,me/=2,g/=2}function ke(Ie,Ae){return L===1?Ie[Ae]:Ie.readUInt16BE(Ae*L)}let $e;if(O){let Ie=-1;for($e=g;$e<W;$e++)if(ke(b,$e)===ke(f,Ie===-1?0:$e-Ie)){if(Ie===-1&&(Ie=$e),$e-Ie+1===me)return Ie*L}else Ie!==-1&&($e-=$e-Ie),Ie=-1}else for(g+me>W&&(g=W-me),$e=g;$e>=0;$e--){let Ie=!0;for(let Ae=0;Ae<me;Ae++)if(ke(b,$e+Ae)!==ke(f,Ae)){Ie=!1;break}if(Ie)return $e}return-1}s.prototype.includes=function(f,g,x){return this.indexOf(f,g,x)!==-1},s.prototype.indexOf=function(f,g,x){return P(this,f,g,x,!0)},s.prototype.lastIndexOf=function(f,g,x){return P(this,f,g,x,!1)};function T(b,f,g,x){g=Number(g)||0;const O=b.length-g;x?(x=Number(x),x>O&&(x=O)):x=O;const L=f.length;x>L/2&&(x=L/2);let W;for(W=0;W<x;++W){const me=parseInt(f.substr(W*2,2),16);if(Re(me))return W;b[g+W]=me}return W}function D(b,f,g,x){return at(_e(f,b.length-g),b,g,x)}function j(b,f,g,x){return at(xe(f),b,g,x)}function F(b,f,g,x){return at(Me(f),b,g,x)}function M(b,f,g,x){return at(ae(f,b.length-g),b,g,x)}s.prototype.write=function(f,g,x,O){if(g===void 0)O="utf8",x=this.length,g=0;else if(x===void 0&&typeof g=="string")O=g,x=this.length,g=0;else if(isFinite(g))g=g>>>0,isFinite(x)?(x=x>>>0,O===void 0&&(O="utf8")):(O=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const L=this.length-g;if((x===void 0||x>L)&&(x=L),f.length>0&&(x<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");O||(O="utf8");let W=!1;for(;;)switch(O){case"hex":return T(this,f,g,x);case"utf8":case"utf-8":return D(this,f,g,x);case"ascii":case"latin1":case"binary":return j(this,f,g,x);case"base64":return F(this,f,g,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,f,g,x);default:if(W)throw new TypeError("Unknown encoding: "+O);O=(""+O).toLowerCase(),W=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Z(b,f,g){return f===0&&g===b.length?t.fromByteArray(b):t.fromByteArray(b.slice(f,g))}function Y(b,f,g){g=Math.min(b.length,g);const x=[];let O=f;for(;O<g;){const L=b[O];let W=null,me=L>239?4:L>223?3:L>191?2:1;if(O+me<=g){let ke,$e,Ie,Ae;switch(me){case 1:L<128&&(W=L);break;case 2:ke=b[O+1],(ke&192)===128&&(Ae=(L&31)<<6|ke&63,Ae>127&&(W=Ae));break;case 3:ke=b[O+1],$e=b[O+2],(ke&192)===128&&($e&192)===128&&(Ae=(L&15)<<12|(ke&63)<<6|$e&63,Ae>2047&&(Ae<55296||Ae>57343)&&(W=Ae));break;case 4:ke=b[O+1],$e=b[O+2],Ie=b[O+3],(ke&192)===128&&($e&192)===128&&(Ie&192)===128&&(Ae=(L&15)<<18|(ke&63)<<12|($e&63)<<6|Ie&63,Ae>65535&&Ae<1114112&&(W=Ae))}}W===null?(W=65533,me=1):W>65535&&(W-=65536,x.push(W>>>10&1023|55296),W=56320|W&1023),x.push(W),O+=me}return ne(x)}const X=4096;function ne(b){const f=b.length;if(f<=X)return String.fromCharCode.apply(String,b);let g="",x=0;for(;x<f;)g+=String.fromCharCode.apply(String,b.slice(x,x+=X));return g}function oe(b,f,g){let x="";g=Math.min(b.length,g);for(let O=f;O<g;++O)x+=String.fromCharCode(b[O]&127);return x}function ce(b,f,g){let x="";g=Math.min(b.length,g);for(let O=f;O<g;++O)x+=String.fromCharCode(b[O]);return x}function se(b,f,g){const x=b.length;(!f||f<0)&&(f=0),(!g||g<0||g>x)&&(g=x);let O="";for(let L=f;L<g;++L)O+=gt[b[L]];return O}function ge(b,f,g){const x=b.slice(f,g);let O="";for(let L=0;L<x.length-1;L+=2)O+=String.fromCharCode(x[L]+x[L+1]*256);return O}s.prototype.slice=function(f,g){const x=this.length;f=~~f,g=g===void 0?x:~~g,f<0?(f+=x,f<0&&(f=0)):f>x&&(f=x),g<0?(g+=x,g<0&&(g=0)):g>x&&(g=x),g<f&&(g=f);const O=this.subarray(f,g);return Object.setPrototypeOf(O,s.prototype),O};function le(b,f,g){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+f>g)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(f,g,x){f=f>>>0,g=g>>>0,x||le(f,g,this.length);let O=this[f],L=1,W=0;for(;++W<g&&(L*=256);)O+=this[f+W]*L;return O},s.prototype.readUintBE=s.prototype.readUIntBE=function(f,g,x){f=f>>>0,g=g>>>0,x||le(f,g,this.length);let O=this[f+--g],L=1;for(;g>0&&(L*=256);)O+=this[f+--g]*L;return O},s.prototype.readUint8=s.prototype.readUInt8=function(f,g){return f=f>>>0,g||le(f,1,this.length),this[f]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(f,g){return f=f>>>0,g||le(f,2,this.length),this[f]|this[f+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(f,g){return f=f>>>0,g||le(f,2,this.length),this[f]<<8|this[f+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(f,g){return f=f>>>0,g||le(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(f,g){return f=f>>>0,g||le(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},s.prototype.readBigUInt64LE=Se(function(f){f=f>>>0,Q(f,"offset");const g=this[f],x=this[f+7];(g===void 0||x===void 0)&&ie(f,this.length-8);const O=g+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,L=this[++f]+this[++f]*2**8+this[++f]*2**16+x*2**24;return BigInt(O)+(BigInt(L)<<BigInt(32))}),s.prototype.readBigUInt64BE=Se(function(f){f=f>>>0,Q(f,"offset");const g=this[f],x=this[f+7];(g===void 0||x===void 0)&&ie(f,this.length-8);const O=g*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],L=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x;return(BigInt(O)<<BigInt(32))+BigInt(L)}),s.prototype.readIntLE=function(f,g,x){f=f>>>0,g=g>>>0,x||le(f,g,this.length);let O=this[f],L=1,W=0;for(;++W<g&&(L*=256);)O+=this[f+W]*L;return L*=128,O>=L&&(O-=Math.pow(2,8*g)),O},s.prototype.readIntBE=function(f,g,x){f=f>>>0,g=g>>>0,x||le(f,g,this.length);let O=g,L=1,W=this[f+--O];for(;O>0&&(L*=256);)W+=this[f+--O]*L;return L*=128,W>=L&&(W-=Math.pow(2,8*g)),W},s.prototype.readInt8=function(f,g){return f=f>>>0,g||le(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},s.prototype.readInt16LE=function(f,g){f=f>>>0,g||le(f,2,this.length);const x=this[f]|this[f+1]<<8;return x&32768?x|4294901760:x},s.prototype.readInt16BE=function(f,g){f=f>>>0,g||le(f,2,this.length);const x=this[f+1]|this[f]<<8;return x&32768?x|4294901760:x},s.prototype.readInt32LE=function(f,g){return f=f>>>0,g||le(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},s.prototype.readInt32BE=function(f,g){return f=f>>>0,g||le(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},s.prototype.readBigInt64LE=Se(function(f){f=f>>>0,Q(f,"offset");const g=this[f],x=this[f+7];(g===void 0||x===void 0)&&ie(f,this.length-8);const O=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(x<<24);return(BigInt(O)<<BigInt(32))+BigInt(g+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),s.prototype.readBigInt64BE=Se(function(f){f=f>>>0,Q(f,"offset");const g=this[f],x=this[f+7];(g===void 0||x===void 0)&&ie(f,this.length-8);const O=(g<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(O)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x)}),s.prototype.readFloatLE=function(f,g){return f=f>>>0,g||le(f,4,this.length),r.read(this,f,!0,23,4)},s.prototype.readFloatBE=function(f,g){return f=f>>>0,g||le(f,4,this.length),r.read(this,f,!1,23,4)},s.prototype.readDoubleLE=function(f,g){return f=f>>>0,g||le(f,8,this.length),r.read(this,f,!0,52,8)},s.prototype.readDoubleBE=function(f,g){return f=f>>>0,g||le(f,8,this.length),r.read(this,f,!1,52,8)};function V(b,f,g,x,O,L){if(!s.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>O||f<L)throw new RangeError('"value" argument is out of bounds');if(g+x>b.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(f,g,x,O){if(f=+f,g=g>>>0,x=x>>>0,!O){const me=Math.pow(2,8*x)-1;V(this,f,g,x,me,0)}let L=1,W=0;for(this[g]=f&255;++W<x&&(L*=256);)this[g+W]=f/L&255;return g+x},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(f,g,x,O){if(f=+f,g=g>>>0,x=x>>>0,!O){const me=Math.pow(2,8*x)-1;V(this,f,g,x,me,0)}let L=x-1,W=1;for(this[g+L]=f&255;--L>=0&&(W*=256);)this[g+L]=f/W&255;return g+x},s.prototype.writeUint8=s.prototype.writeUInt8=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,1,255,0),this[g]=f&255,g+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,2,65535,0),this[g]=f&255,this[g+1]=f>>>8,g+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,2,65535,0),this[g]=f>>>8,this[g+1]=f&255,g+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,4,4294967295,0),this[g+3]=f>>>24,this[g+2]=f>>>16,this[g+1]=f>>>8,this[g]=f&255,g+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,4,4294967295,0),this[g]=f>>>24,this[g+1]=f>>>16,this[g+2]=f>>>8,this[g+3]=f&255,g+4};function J(b,f,g,x,O){N(f,x,O,b,g,7);let L=Number(f&BigInt(4294967295));b[g++]=L,L=L>>8,b[g++]=L,L=L>>8,b[g++]=L,L=L>>8,b[g++]=L;let W=Number(f>>BigInt(32)&BigInt(4294967295));return b[g++]=W,W=W>>8,b[g++]=W,W=W>>8,b[g++]=W,W=W>>8,b[g++]=W,g}function re(b,f,g,x,O){N(f,x,O,b,g,7);let L=Number(f&BigInt(4294967295));b[g+7]=L,L=L>>8,b[g+6]=L,L=L>>8,b[g+5]=L,L=L>>8,b[g+4]=L;let W=Number(f>>BigInt(32)&BigInt(4294967295));return b[g+3]=W,W=W>>8,b[g+2]=W,W=W>>8,b[g+1]=W,W=W>>8,b[g]=W,g+8}s.prototype.writeBigUInt64LE=Se(function(f,g=0){return J(this,f,g,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=Se(function(f,g=0){return re(this,f,g,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(f,g,x,O){if(f=+f,g=g>>>0,!O){const ke=Math.pow(2,8*x-1);V(this,f,g,x,ke-1,-ke)}let L=0,W=1,me=0;for(this[g]=f&255;++L<x&&(W*=256);)f<0&&me===0&&this[g+L-1]!==0&&(me=1),this[g+L]=(f/W>>0)-me&255;return g+x},s.prototype.writeIntBE=function(f,g,x,O){if(f=+f,g=g>>>0,!O){const ke=Math.pow(2,8*x-1);V(this,f,g,x,ke-1,-ke)}let L=x-1,W=1,me=0;for(this[g+L]=f&255;--L>=0&&(W*=256);)f<0&&me===0&&this[g+L+1]!==0&&(me=1),this[g+L]=(f/W>>0)-me&255;return g+x},s.prototype.writeInt8=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,1,127,-128),f<0&&(f=255+f+1),this[g]=f&255,g+1},s.prototype.writeInt16LE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,2,32767,-32768),this[g]=f&255,this[g+1]=f>>>8,g+2},s.prototype.writeInt16BE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,2,32767,-32768),this[g]=f>>>8,this[g+1]=f&255,g+2},s.prototype.writeInt32LE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,4,2147483647,-2147483648),this[g]=f&255,this[g+1]=f>>>8,this[g+2]=f>>>16,this[g+3]=f>>>24,g+4},s.prototype.writeInt32BE=function(f,g,x){return f=+f,g=g>>>0,x||V(this,f,g,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[g]=f>>>24,this[g+1]=f>>>16,this[g+2]=f>>>8,this[g+3]=f&255,g+4},s.prototype.writeBigInt64LE=Se(function(f,g=0){return J(this,f,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=Se(function(f,g=0){return re(this,f,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(b,f,g,x,O,L){if(g+x>b.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function H(b,f,g,x,O){return f=+f,g=g>>>0,O||de(b,f,g,4),r.write(b,f,g,x,23,4),g+4}s.prototype.writeFloatLE=function(f,g,x){return H(this,f,g,!0,x)},s.prototype.writeFloatBE=function(f,g,x){return H(this,f,g,!1,x)};function G(b,f,g,x,O){return f=+f,g=g>>>0,O||de(b,f,g,8),r.write(b,f,g,x,52,8),g+8}s.prototype.writeDoubleLE=function(f,g,x){return G(this,f,g,!0,x)},s.prototype.writeDoubleBE=function(f,g,x){return G(this,f,g,!1,x)},s.prototype.copy=function(f,g,x,O){if(!s.isBuffer(f))throw new TypeError("argument should be a Buffer");if(x||(x=0),!O&&O!==0&&(O=this.length),g>=f.length&&(g=f.length),g||(g=0),O>0&&O<x&&(O=x),O===x||f.length===0||this.length===0)return 0;if(g<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(O<0)throw new RangeError("sourceEnd out of bounds");O>this.length&&(O=this.length),f.length-g<O-x&&(O=f.length-g+x);const L=O-x;return this===f&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(g,x,O):Uint8Array.prototype.set.call(f,this.subarray(x,O),g),L},s.prototype.fill=function(f,g,x,O){if(typeof f=="string"){if(typeof g=="string"?(O=g,g=0,x=this.length):typeof x=="string"&&(O=x,x=this.length),O!==void 0&&typeof O!="string")throw new TypeError("encoding must be a string");if(typeof O=="string"&&!s.isEncoding(O))throw new TypeError("Unknown encoding: "+O);if(f.length===1){const W=f.charCodeAt(0);(O==="utf8"&&W<128||O==="latin1")&&(f=W)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(g<0||this.length<g||this.length<x)throw new RangeError("Out of range index");if(x<=g)return this;g=g>>>0,x=x===void 0?this.length:x>>>0,f||(f=0);let L;if(typeof f=="number")for(L=g;L<x;++L)this[L]=f;else{const W=s.isBuffer(f)?f:s.from(f,O),me=W.length;if(me===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(L=0;L<x-g;++L)this[L+g]=W[L%me]}return this};const B={};function z(b,f,g){B[b]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(O){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:O,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}z("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),z("ERR_INVALID_ARG_TYPE",function(b,f){return`The "${b}" argument must be of type number. Received type ${typeof f}`},TypeError),z("ERR_OUT_OF_RANGE",function(b,f,g){let x=`The value of "${b}" is out of range.`,O=g;return Number.isInteger(g)&&Math.abs(g)>2**32?O=K(String(g)):typeof g=="bigint"&&(O=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&(O=K(O)),O+="n"),x+=` It must be ${f}. Received ${O}`,x},RangeError);function K(b){let f="",g=b.length;const x=b[0]==="-"?1:0;for(;g>=x+4;g-=3)f=`_${b.slice(g-3,g)}${f}`;return`${b.slice(0,g)}${f}`}function I(b,f,g){Q(f,"offset"),(b[f]===void 0||b[f+g]===void 0)&&ie(f,b.length-(g+1))}function N(b,f,g,x,O,L){if(b>g||b<f){const W=typeof f=="bigint"?"n":"";let me;throw L>3?f===0||f===BigInt(0)?me=`>= 0${W} and < 2${W} ** ${(L+1)*8}${W}`:me=`>= -(2${W} ** ${(L+1)*8-1}${W}) and < 2 ** ${(L+1)*8-1}${W}`:me=`>= ${f}${W} and <= ${g}${W}`,new B.ERR_OUT_OF_RANGE("value",me,b)}I(x,O,L)}function Q(b,f){if(typeof b!="number")throw new B.ERR_INVALID_ARG_TYPE(f,"number",b)}function ie(b,f,g){throw Math.floor(b)!==b?(Q(b,g),new B.ERR_OUT_OF_RANGE(g||"offset","an integer",b)):f<0?new B.ERR_BUFFER_OUT_OF_BOUNDS:new B.ERR_OUT_OF_RANGE(g||"offset",`>= ${g?1:0} and <= ${f}`,b)}const pe=/[^+/0-9A-Za-z-_]/g;function ye(b){if(b=b.split("=")[0],b=b.trim().replace(pe,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function _e(b,f){f=f||1/0;let g;const x=b.length;let O=null;const L=[];for(let W=0;W<x;++W){if(g=b.charCodeAt(W),g>55295&&g<57344){if(!O){if(g>56319){(f-=3)>-1&&L.push(239,191,189);continue}else if(W+1===x){(f-=3)>-1&&L.push(239,191,189);continue}O=g;continue}if(g<56320){(f-=3)>-1&&L.push(239,191,189),O=g;continue}g=(O-55296<<10|g-56320)+65536}else O&&(f-=3)>-1&&L.push(239,191,189);if(O=null,g<128){if((f-=1)<0)break;L.push(g)}else if(g<2048){if((f-=2)<0)break;L.push(g>>6|192,g&63|128)}else if(g<65536){if((f-=3)<0)break;L.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((f-=4)<0)break;L.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return L}function xe(b){const f=[];for(let g=0;g<b.length;++g)f.push(b.charCodeAt(g)&255);return f}function ae(b,f){let g,x,O;const L=[];for(let W=0;W<b.length&&!((f-=2)<0);++W)g=b.charCodeAt(W),x=g>>8,O=g%256,L.push(O),L.push(x);return L}function Me(b){return t.toByteArray(ye(b))}function at(b,f,g,x){let O;for(O=0;O<x&&!(O+g>=f.length||O>=b.length);++O)f[O+g]=b[O];return O}function Oe(b,f){return b instanceof f||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===f.name}function Re(b){return b!==b}const gt=function(){const b="0123456789abcdef",f=new Array(256);for(let g=0;g<16;++g){const x=g*16;for(let O=0;O<16;++O)f[x+O]=b[g]+b[O]}return f}();function Se(b){return typeof BigInt>"u"?je:b}function je(){throw new Error("BigInt not supported")}})(qo);/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=qo,n=r.Buffer;function i(a,s){for(var l in a)s[l]=a[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o);function o(a,s,l){return n(a,s,l)}o.prototype=Object.create(n.prototype),i(n,o),o.from=function(a,s,l){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,s,l)},o.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},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(a)}})(Gu,Gu.exports);var py=Gu.exports,Yu=65536,$D=4294967295;function CD(){throw new Error(`Secure random number generation is not supported by this browser.
112
+ Use Chrome, Firefox or Internet Explorer 11`)}var AD=py.Buffer,Gs=et.crypto||et.msCrypto;Gs&&Gs.getRandomValues?Vu.exports=OD:Vu.exports=CD;function OD(e,t){if(e>$D)throw new RangeError("requested too many random bytes");var r=AD.allocUnsafe(e);if(e>0)if(e>Yu)for(var n=0;n<e;n+=Yu)Gs.getRandomValues(r.slice(n,n+Yu));else Gs.getRandomValues(r);return typeof t=="function"?process.nextTick(function(){t(null,r)}):r}var TD=Vu.exports;const ID=cn(TD);var Ju="/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts",PD=32,hy=class Vt{static from(t){if(Ko(t,void 0,{F:Ju,L:31,S:this,A:["source",""]}),t instanceof Vt)return t;if(t instanceof Cn)return new Vt(new Uint8Array(t.buffer,t.byteOffset,t.byteLength));if(t instanceof Uint8Array)return new Vt(t);if(t instanceof ArrayBuffer)return new Vt(new Uint8Array(t));if(typeof t=="string")return Vt.fromHex(t);if(t.asUint8Array)return new Vt(t.asUint8Array());throw new TypeError(`Unable to create PublicKey from ${t}`)}static safeFrom(t){if(t)try{return Vt.from(t)}catch{return}}static fromHex(t){t.startsWith("0x")&&(t=t.slice(2));const r=Cn.from(t,"hex");return new Vt(new Uint8Array(r.buffer,r.byteOffset,r.byteLength))}static random(){return Vt.from(ID(PD))}static*randomSequence(){for(let t=0;t<1e4;t++)yield Vt.random();throw new Error("Too many keys requested")}static isPublicKey(t){return t instanceof Vt}static assertValidPublicKey(t){if(!this.isPublicKey(t))throw new TypeError("Invalid PublicKey")}static equals(t,r){return Vt.from(t).equals(r)}static bufferize(t){return Ko(typeof t=="string","Invalid type",{F:Ju,L:130,S:this,A:["typeof str === 'string'","'Invalid type'"]}),Cn.from(t,"hex")}static stringify(t){return t instanceof Vt?t=t.asBuffer():t instanceof Uint8Array&&(t=Cn.from(t.buffer,t.byteOffset,t.byteLength)),Ko(t instanceof Cn,"Invalid type",{F:Ju,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 hD(this,t)}asBuffer(){return Cn.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 Us.stdout.hasColors!="function"||!Us.stdout.hasColors())return`<PublicKey ${this.truncate()}>`;const n=a=>`\x1B[${a}m`,i=["red","green","yellow","blue","magenta","cyan","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright"],o=i[this.getInsecureHash(i.length)];return`PublicKey(${n(_r.colors[o][0])}${this.truncate()}${n(_r.colors.reset[0])})`}get[Hs](){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=Vt.from(t);if(this._value.length!==r._value.length)return!1;let n=!0;for(let i=0;i<this._value.length;i++)n&&(n=this._value[i]===r._value[i]);return n}[mD](t){return Vt.isPublicKey(t)?this.equals(t):!1}},gy=10;(class{constructor(e,t){if(this._projection=e,this._values=new Map,t)for(const r of t)this.add(r)}toString(){return zs(this)}toJSON(){return this._values.size>gy?{size:this._values.size}:Array.from(this._values.values())}[_r.custom](){return zs(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 zs(this)}toJSON(){return this._values.size>gy?{size:this._values.size}:Array.from(this._values.values())}[_r.custom](){return zs(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)??uy(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)??uy(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 kD=["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"],ND=class{constructor(e=kD){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 i=n.map(a=>parseInt(a,16));return this._compress(i,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,i=[];for(let a=0;a<n*t;a+=n)i.push(e.slice(a,a+n));return i[i.length-1]=i[i.length-1].concat(e.slice(t*n)),i.map(a=>a.reduce((s,l)=>s^l))}},DD=new ND,LD=e=>(e instanceof Cn||e instanceof Uint8Array||e instanceof ArrayBuffer?e=hy.stringify(e):e instanceof hy&&(e=e.toHex()),DD.humanize(e)),MD=e=>Cn.from(e.buffer,e.byteOffset,e.byteLength),FD=5,Xu=(e,t=0,r=new WeakSet)=>{if(t>FD)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 MD(e).toString("hex");if(Array.isArray(e))return e.map(n=>Xu(n,t+1,r));if(typeof e.toJSON=="function")return e.toJSON();{const n={};for(const i of Object.keys(e))n[i]=Xu(e[i],t+1,r);return n}}finally{r.delete(e)}}else return e},BD=(e,t,r)=>{let n=e.get(t);return n===void 0&&(n=typeof r=="function"?r():r,e.set(t,n)),n},jD=()=>typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Zu=Symbol("instanceTag"),RD=e=>t=>{t.prototype[Zu]=e,Object.defineProperty(t.prototype,Symbol.hasInstance,{value:r=>(r==null?void 0:r[Zu])===e}),Object.defineProperty(t,Symbol.hasInstance,{value:r=>(r==null?void 0:r[Zu])===e})},Qu=Symbol.for("dxos.instance-contexts"),UD=globalThis[Qu]??(globalThis[Qu]=new WeakMap),WD=e=>{const t=Object.getPrototypeOf(e),r=BD(UD,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},ef=()=>{throw new Error("Not available on this platform")},zD=()=>ef(),HD=()=>ef(),VD=()=>ef(),my=He({"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,d=-1,p=0,h,m=0;m<=a.length;++m){if(m<a.length)h=a.charCodeAt(m);else{if(h===47)break;h=47}if(h===47){if(!(d===m-1||p===1))if(d!==m-1&&p===2){if(l.length<2||u!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var v=l.lastIndexOf("/");if(v!==l.length-1){v===-1?(l="",u=0):(l=l.slice(0,v),u=l.length-1-l.lastIndexOf("/")),d=m,p=0;continue}}else if(l.length===2||l.length===1){l="",u=0,d=m,p=0;continue}}s&&(l.length>0?l+="/..":l="..",u=2)}else l.length>0?l+="/"+a.slice(d+1,m):l=a.slice(d+1,m),u=m-d-1;d=m,p=0}else h===46&&p!==-1?++p:p=-1}return l}function i(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 o={resolve:function(){for(var s="",l=!1,u,d=arguments.length-1;d>=-1&&!l;d--){var p;d>=0?p=arguments[d]:(u===void 0&&(u=process.cwd()),p=u),r(p),p.length!==0&&(s=p+"/"+s,l=p.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?".":o.normalize(s)},relative:function(s,l){if(r(s),r(l),s===l||(s=o.resolve(s),l=o.resolve(l),s===l))return"";for(var u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var d=s.length,p=d-u,h=1;h<l.length&&l.charCodeAt(h)===47;++h);for(var m=l.length,v=m-h,y=p<v?p:v,w=-1,E=0;E<=y;++E){if(E===y){if(v>y){if(l.charCodeAt(h+E)===47)return l.slice(h+E+1);if(E===0)return l.slice(h+E)}else p>y&&(s.charCodeAt(u+E)===47?w=E:E===0&&(w=0));break}var _=s.charCodeAt(u+E),S=l.charCodeAt(h+E);if(_!==S)break;_===47&&(w=E)}var $="";for(E=u+w+1;E<=d;++E)(E===d||s.charCodeAt(E)===47)&&($.length===0?$+="..":$+="/..");return $.length>0?$+l.slice(h+w):(h+=w,l.charCodeAt(h)===47&&++h,l.slice(h))},_makeLong:function(s){return s},dirname:function(s){if(r(s),s.length===0)return".";for(var l=s.charCodeAt(0),u=l===47,d=-1,p=!0,h=s.length-1;h>=1;--h)if(l=s.charCodeAt(h),l===47){if(!p){d=h;break}}else p=!1;return d===-1?u?"/":".":u&&d===1?"//":s.slice(0,d)},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,d=-1,p=!0,h;if(l!==void 0&&l.length>0&&l.length<=s.length){if(l.length===s.length&&l===s)return"";var m=l.length-1,v=-1;for(h=s.length-1;h>=0;--h){var y=s.charCodeAt(h);if(y===47){if(!p){u=h+1;break}}else v===-1&&(p=!1,v=h+1),m>=0&&(y===l.charCodeAt(m)?--m===-1&&(d=h):(m=-1,d=v))}return u===d?d=v:d===-1&&(d=s.length),s.slice(u,d)}else{for(h=s.length-1;h>=0;--h)if(s.charCodeAt(h)===47){if(!p){u=h+1;break}}else d===-1&&(p=!1,d=h+1);return d===-1?"":s.slice(u,d)}},extname:function(s){r(s);for(var l=-1,u=0,d=-1,p=!0,h=0,m=s.length-1;m>=0;--m){var v=s.charCodeAt(m);if(v===47){if(!p){u=m+1;break}continue}d===-1&&(p=!1,d=m+1),v===46?l===-1?l=m:h!==1&&(h=1):l!==-1&&(h=-1)}return l===-1||d===-1||h===0||h===1&&l===d-1&&l===u+1?"":s.slice(l,d)},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 i("/",s)},parse:function(s){r(s);var l={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return l;var u=s.charCodeAt(0),d=u===47,p;d?(l.root="/",p=1):p=0;for(var h=-1,m=0,v=-1,y=!0,w=s.length-1,E=0;w>=p;--w){if(u=s.charCodeAt(w),u===47){if(!y){m=w+1;break}continue}v===-1&&(y=!1,v=w+1),u===46?h===-1?h=w:E!==1&&(E=1):h!==-1&&(E=-1)}return h===-1||v===-1||E===0||E===1&&h===v-1&&h===m+1?v!==-1&&(m===0&&d?l.base=l.name=s.slice(1,v):l.base=l.name=s.slice(m,v)):(m===0&&d?(l.name=s.slice(1,h),l.base=s.slice(1,v)):(l.name=s.slice(m,h),l.base=s.slice(m,v)),l.ext=s.slice(h,v)),m>0?l.dir=s.slice(0,m-1):d&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,t.exports=o}});Zn(my());var Wr=Zn(my());Wr.basename;var GD=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 KD={trace:5,debug:10,info:11,warn:12,error:13},Yo;(function(e){e.CONSOLE="console",e.BROWSER="browser",e.DEBUG="debug"})(Yo||(Yo={}));var qD=Symbol("logInfoProperties"),YD=e=>{if(!e)return{};const t={},n=Object.getPrototypeOf(e)[qD]??[];for(const i of n)try{t[i]=typeof e[i]=="function"?e[i]():e[i]}catch(o){t[i]=o.message}return t},JD=(e,t,r)=>t>=e.level&&(!e.pattern||r.includes(e.pattern)),vy=(e,t)=>t===void 0?!0:t.some(r=>{var n;return JD(r,e.level,((n=e.meta)==null?void 0:n.F)??"")}),tf=e=>{let t;if(e.meta){const r=YD(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},XD=0,ZD=e=>(t,r,n)=>(i,o,a)=>{const s=a.value;a.value=function(...l){const u={...n??{},S:this},d=l.map(p=>_r(p,!1,1,!0)).join(", ");try{const p=performance.now(),h=s.apply(this,l);if(QD(h)){const m=XD++;e.info(`${o}(${d}) => Promise { #${m} }`,{},u),h.then(v=>{v!==void 0?e.info(`✅ resolve #${m} ${(performance.now()-p).toFixed(0)}ms => ${_r(v,!1,1,!0)}`,{},u):e.info(`✅ resolve #${m} ${(performance.now()-p).toFixed(0)}ms`,{},u)},v=>{e.info(`🔥 reject #${m} #${(performance.now()-p).toFixed(0)}ms => ${v}`,{},u)})}else e.info(`${o}(${d}) => ${_r(h,!1,1,!0)}`,{},u);return h}catch(p){throw e.error(`${o}(${d}) 🔥 ${p}`,{},u),p}},Object.defineProperty(a.value,"name",{value:o+"$log"})},QD=e=>e&&typeof e.then=="function",eL=e=>{try{return JSON.parse(localStorage.getItem("dxlog"))}catch{return}},yy=()=>{},tL=(e,t)=>{console.log(_r(t,!1,null,!0))},by=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},rf=typeof mochaExecutor<"u"?{useTestProcessor:!0,printFileLinks:!0}:{useTestProcessor:!1,printFileLinks:!1},rL=(e,t)=>{var u,d,p;if(!vy(t,e.filters))return;const r=e.prefix??"https://vscode.dev/github.com/dxos/dxos/blob/main/",n=[];let i="";if(t.meta){const h=by(t.meta.F);i=`${`${r.replace(/\/$/,"")}/${h}`}#L${t.meta.L}`}let o=[];if((u=t.meta)!=null&&u.S){const h=(d=t.meta)==null?void 0:d.S,m=Object.getPrototypeOf(h),v=WD(h);o.push(`%c${m.constructor.name}#${v}`,"color:#C026D3;font-weight:bold")}o.push(t.message);const a=tf(t);a&&o.push(a);const s={[_t.ERROR]:console.error,[_t.WARN]:console.warn,[_t.DEBUG]:console.log};(rf.printFileLinks||jD())&&(n!=null&&n.length?o=[`%c${i}
113
+ %c${o.join(" ")}`,...n]:o=[i+`
114
+ `,...o]);const l=s[t.level]??console.log;typeof((p=t.meta)==null?void 0:p.C)=="function"?t.meta.C(l,o):l(...o)},nL=(e,t)=>{var s;if(!vy(t,e.filters))return;let r="";t.meta&&(r=`${by(t.meta.F)}:${t.meta.L}`);let n=[];n.push(t.message);const i=tf(t);i&&n.push(i);const o={[_t.ERROR]:console.error,[_t.WARN]:console.warn,[_t.DEBUG]:console.log};rf.printFileLinks&&(n=[r,...n]);const a=o[t.level]??console.log;typeof((s=t.meta)==null?void 0:s.C)=="function"?t.meta.C(a,n):a(...n)},wy=rf.useTestProcessor?nL:rL,iL=({path:e,levels:t})=>{let r;return(n,i)=>{var a,s;if(!t.includes(i.level))return;if(!r){try{HD(GD(e))}catch{}r=VD()}const o={...i,timestamp:Date.now(),meta:{file:(a=i.meta)==null?void 0:a.F,line:(s=i.meta)==null?void 0:s.L},context:Xu(tf(i))};zD(r,JSON.stringify(o)+`
115
+ `)}},Ey,oL=()=>(Ey??(Ey=process.env.LOG_FILE??(process.env.HOME?`${process.env.HOME}/.dxlog/${new Date().toISOString()}.log`:void 0)),Ey);iL({path:oL(),levels:[_t.ERROR,_t.WARN,_t.INFO,_t.TRACE]});var aL={[Yo.CONSOLE]:yy,[Yo.BROWSER]:wy,[Yo.DEBUG]:tL},sL=typeof window<"u"||typeof navigator<"u",nf=[sL?wy:yy],_y=e=>{if(typeof e=="number")return[{level:e}];const t=(n,i=_t.WARN)=>KD[n.toLowerCase()]??i;return(typeof e=="string"?e.split(/,\s*/):e).map(n=>{const[i,o]=n.split(":");return o?{level:t(o),pattern:i}:{level:t(i)}})},xy=e=>{const t="process"in globalThis?{file:process.env.LOG_CONFIG,filter:process.env.LOG_FILTER,processor:process.env.LOG_PROCESSOR}:void 0,r=cD({},e,t&&eL(t.file),t);return{options:r,filters:_y(r.filter??_t.INFO),captureFilters:_y(r.captureFilter??_t.WARN),processors:r.processor?[aL[r.processor]]:nf,prefix:r.prefix}},lL=()=>{const e=(...r)=>t(_t.DEBUG,...r);e._config=xy(),Object.defineProperty(e,"runtimeConfig",{get:()=>e._config}),e.addProcessor=r=>{nf.filter(n=>n===r).length===0&&nf.push(r),e._config.processors.filter(n=>n===r).length===0&&e._config.processors.push(r)},e.config=r=>{e._config=xy(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,i)=>t(_t.ERROR,r.stack,n,i),e.break=()=>e.info("——————————————————————————————————————————————————"),e.stack=(r,n,i)=>t(_t.INFO,`${r??"Stack Dump"}
116
+ ${cL()}`,n,i),e.method=ZD(e);const t=(r,n,i={},o,a)=>{e._config.processors.forEach(s=>s(e._config,{level:r,message:n,context:i,meta:o,error:a}))};return e},tt=globalThis.dx_log??(globalThis.dx_log=lL()),cL=()=>new Error().stack.split(`
117
+ `).slice(3).join(`
118
+ `),uL=Symbol("kDebugInfoProperties");(class{constructor(e,t){this.constr=e,this.parent=t}getInfo(){if(!this.instance)return{};const e=this.constr.prototype[uL]??[],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 fL=class extends Error{constructor(){super("Context disposed.")}};function dL(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}var of="/home/runner/work/dxos/dxos/packages/common/context/src/context.ts",pL=300,Sy=class ow{constructor({onError:t=i=>{if(!(i instanceof fL))throw this.dispose(),i},attributes:r={},parent:n}={}){this._disposeCallbacks=[],this._isDisposed=!1,this._disposePromise=void 0,this._parent=null,this.maxSafeDisposeCallbacks=pL,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){tt.catch(r,void 0,{F:of,L:82,S:this,C:(n,i)=>n(...i)})}})(),this._disposeCallbacks.push(t),this._disposeCallbacks.length>this.maxSafeDisposeCallbacks&&tt.warn("Context has a large number of dispose callbacks. This might be a memory leak.",{count:this._disposeCallbacks.length,safeThreshold:this.maxSafeDisposeCallbacks},{F:of,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){tt.catch(n,void 0,{F:of,L:124,S:this,C:(i,o)=>i(...o)})}})());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 ow({onError:async o=>{if(!t)this.raise(o);else try{await t(o)}catch{this.raise(o)}},attributes:r}),i=this.onDispose(()=>n.dispose());return n.onDispose(i),n}getAttribute(t){if(t in this._attributes)return this._attributes[t];if(this._parent!==null)return this._parent.getAttribute(t)}};Sy=dL([RD("Context")],Sy);var Ks={};Object.defineProperty(Ks,"__esModule",{value:!0}),Ks.Observable=void 0;const $y=e=>!!Symbol[e],af=e=>$y(e)?Symbol[e]:"@@"+e,hL=af("iterator"),sf=af("observable"),Cy=af("species");function qs(e,t){let r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function Jo(e){let t=e.constructor;return t!==void 0&&(t=t[Cy],t===null&&(t=void 0)),t!==void 0?t:Js}function gL(e){return e instanceof Js}function Gi(e){Gi.log?Gi.log(e):setTimeout(()=>{throw e})}function Ys(e){Promise.resolve().then(()=>{try{e()}catch(t){Gi(t)}})}function Ay(e){let t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{let r=qs(t,"unsubscribe");r&&r.call(t)}}catch(r){Gi(r)}}function lf(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function mL(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(Oy(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function Oy(e,t,r){e._state="running";let n=e._observer;try{let i=qs(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(lf(e),i)i.call(n,r);else throw r;break;case"complete":lf(e),i&&i.call(n);break}}catch(i){Gi(i)}e._state==="closed"?Ay(e):e._state==="running"&&(e._state="ready")}function cf(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}],Ys(()=>mL(e));return}Oy(e,t,r)}}class vL{constructor(t,r){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";let n=this,i={get closed(){return n._state==="closed"},next(o){cf(n,"next",o)},error(o){cf(n,"error",o)},complete(){cf(n,"complete")}};try{this._cleanup=r.call(void 0,i)}catch(o){i.error(o)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(lf(this),Ay(this))}}let Js=class Ml{constructor(t){if(!(this instanceof Ml))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 vL(t,this._subscriber)}forEach(t){return new Promise((r,n)=>{if(typeof t!="function"){n(new TypeError(t+" is not a function"));return}function i(){o.unsubscribe(),r()}let o=this.subscribe({next(a){try{t(a,i)}catch(s){n(s),o.unsubscribe()}},error:n,complete:r})})}map(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Jo(this);return new r(n=>this.subscribe({next(i){try{i=t(i)}catch(o){return n.error(o)}n.next(i)},error(i){n.error(i)},complete(){n.complete()}}))}filter(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Jo(this);return new r(n=>this.subscribe({next(i){try{if(!t(i))return}catch(o){return n.error(o)}n.next(i)},error(i){n.error(i)},complete(){n.complete()}}))}reduce(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Jo(this),n=arguments.length>1,i=!1,a=arguments[1];return new r(s=>this.subscribe({next(l){let u=!i;if(i=!0,!u||n)try{a=t(a,l)}catch(d){return s.error(d)}else a=l},error(l){s.error(l)},complete(){if(!i&&!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=Jo(this);return new r(n=>{let i,o=0;function a(s){i=s.subscribe({next(l){n.next(l)},error(l){n.error(l)},complete(){o===t.length?(i=void 0,n.complete()):a(r.from(t[o++]))}})}return a(this),()=>{i&&(i.unsubscribe(),i=void 0)}})}flatMap(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Jo(this);return new r(n=>{let i=[],o=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=i.indexOf(l);u>=0&&i.splice(u,1),a()}});i.push(l)},error(s){n.error(s)},complete(){a()}});function a(){o.closed&&i.length===0&&n.complete()}return()=>{i.forEach(s=>s.unsubscribe()),o.unsubscribe()}})}[sf](){return this}static from(t){let r=typeof this=="function"?this:Ml;if(t==null)throw new TypeError(t+" is not an object");let n=qs(t,sf);if(n){let i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return gL(i)&&i.constructor===r?i:new r(o=>i.subscribe(o))}if($y("iterator")&&(n=qs(t,hL),n))return new r(i=>{Ys(()=>{if(!i.closed){for(let o of n.call(t))if(i.next(o),i.closed)return;i.complete()}})});if(Array.isArray(t))return new r(i=>{Ys(()=>{if(!i.closed){for(let o=0;o<t.length;++o)if(i.next(t[o]),i.closed)return;i.complete()}})});throw new TypeError(t+" is not observable")}static of(...t){let r=typeof this=="function"?this:Ml;return new r(n=>{Ys(()=>{if(!n.closed){for(let i=0;i<t.length;++i)if(n.next(t[i]),n.closed)return;n.complete()}})})}static get[Cy](){return this}};Ks.Observable=Js,Object.defineProperty(Js,Symbol("extensions"),{value:{symbol:sf,hostReportError:Gi},configurable:!0});var yL=Ks.Observable;const Xs=cn(yL);var Ty={exports:{}},uf={exports:{}},Ki=typeof Reflect=="object"?Reflect:null,Iy=Ki&&typeof Ki.apply=="function"?Ki.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Zs;Ki&&typeof Ki.ownKeys=="function"?Zs=Ki.ownKeys:Object.getOwnPropertySymbols?Zs=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Zs=function(t){return Object.getOwnPropertyNames(t)};function bL(e){console&&console.warn&&console.warn(e)}var Py=Number.isNaN||function(t){return t!==t};function dt(){dt.init.call(this)}uf.exports=dt,uf.exports.once=xL,dt.EventEmitter=dt,dt.prototype._events=void 0,dt.prototype._eventsCount=0,dt.prototype._maxListeners=void 0;var ky=10;function Qs(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(dt,"defaultMaxListeners",{enumerable:!0,get:function(){return ky},set:function(e){if(typeof e!="number"||e<0||Py(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");ky=e}}),dt.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},dt.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Py(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 Ny(e){return e._maxListeners===void 0?dt.defaultMaxListeners:e._maxListeners}dt.prototype.getMaxListeners=function(){return Ny(this)},dt.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var i=t==="error",o=this._events;if(o!==void 0)i=i&&o.error===void 0;else if(!i)return!1;if(i){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=o[t];if(l===void 0)return!1;if(typeof l=="function")Iy(l,this,r);else for(var u=l.length,d=By(l,u),n=0;n<u;++n)Iy(d[n],this,r);return!0};function Dy(e,t,r,n){var i,o,a;if(Qs(r),o=e._events,o===void 0?(o=e._events=Object.create(null),e._eventsCount=0):(o.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),a===void 0)a=o[t]=r,++e._eventsCount;else if(typeof a=="function"?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),i=Ny(e),i>0&&a.length>i&&!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,bL(s)}return e}dt.prototype.addListener=function(t,r){return Dy(this,t,r,!1)},dt.prototype.on=dt.prototype.addListener,dt.prototype.prependListener=function(t,r){return Dy(this,t,r,!0)};function wL(){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 Ly(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=wL.bind(n);return i.listener=r,n.wrapFn=i,i}dt.prototype.once=function(t,r){return Qs(r),this.on(t,Ly(this,t,r)),this},dt.prototype.prependOnceListener=function(t,r){return Qs(r),this.prependListener(t,Ly(this,t,r)),this},dt.prototype.removeListener=function(t,r){var n,i,o,a,s;if(Qs(r),i=this._events,i===void 0)return this;if(n=i[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(o=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,o=a;break}if(o<0)return this;o===0?n.shift():EL(n,o),n.length===1&&(i[t]=n[0]),i.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this},dt.prototype.off=dt.prototype.removeListener,dt.prototype.removeAllListeners=function(t){var r,n,i;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 o=Object.keys(n),a;for(i=0;i<o.length;++i)a=o[i],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(i=r.length-1;i>=0;i--)this.removeListener(t,r[i]);return this};function My(e,t,r){var n=e._events;if(n===void 0)return[];var i=n[t];return i===void 0?[]:typeof i=="function"?r?[i.listener||i]:[i]:r?_L(i):By(i,i.length)}dt.prototype.listeners=function(t){return My(this,t,!0)},dt.prototype.rawListeners=function(t){return My(this,t,!1)},dt.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Fy.call(e,t)},dt.prototype.listenerCount=Fy;function Fy(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}dt.prototype.eventNames=function(){return this._eventsCount>0?Zs(this._events):[]};function By(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function EL(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function _L(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function xL(e,t){return new Promise(function(r,n){function i(a){e.removeListener(t,o),n(a)}function o(){typeof e.removeListener=="function"&&e.removeListener("error",i),r([].slice.call(arguments))}jy(e,t,o,{once:!0}),t!=="error"&&SL(e,i,{once:!0})})}function SL(e,t,r){typeof e.on=="function"&&jy(e,"error",t,r)}function jy(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 i(o){n.once&&e.removeEventListener(t,i),r(o)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var Ry=uf.exports,Uy=Ry.EventEmitter;const Wy=lw(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ff,zy;function $L(){if(zy)return ff;zy=1;function e(h,m){var v=Object.keys(h);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(h);m&&(y=y.filter(function(w){return Object.getOwnPropertyDescriptor(h,w).enumerable})),v.push.apply(v,y)}return v}function t(h){for(var m=1;m<arguments.length;m++){var v=arguments[m]!=null?arguments[m]:{};m%2?e(Object(v),!0).forEach(function(y){r(h,y,v[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(v)):e(Object(v)).forEach(function(y){Object.defineProperty(h,y,Object.getOwnPropertyDescriptor(v,y))})}return h}function r(h,m,v){return m in h?Object.defineProperty(h,m,{value:v,enumerable:!0,configurable:!0,writable:!0}):h[m]=v,h}function n(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}function i(h,m){for(var v=0;v<m.length;v++){var y=m[v];y.enumerable=y.enumerable||!1,y.configurable=!0,"value"in y&&(y.writable=!0),Object.defineProperty(h,y.key,y)}}function o(h,m,v){return m&&i(h.prototype,m),v&&i(h,v),h}var a=qo,s=a.Buffer,l=Wy,u=l.inspect,d=u&&u.custom||"inspect";function p(h,m,v){s.prototype.copy.call(h,m,v)}return ff=function(){function h(){n(this,h),this.head=null,this.tail=null,this.length=0}return o(h,[{key:"push",value:function(v){var y={data:v,next:null};this.length>0?this.tail.next=y:this.head=y,this.tail=y,++this.length}},{key:"unshift",value:function(v){var y={data:v,next:this.head};this.length===0&&(this.tail=y),this.head=y,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var y=this.head,w=""+y.data;y=y.next;)w+=v+y.data;return w}},{key:"concat",value:function(v){if(this.length===0)return s.alloc(0);for(var y=s.allocUnsafe(v>>>0),w=this.head,E=0;w;)p(w.data,y,E),E+=w.data.length,w=w.next;return y}},{key:"consume",value:function(v,y){var w;return v<this.head.data.length?(w=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?w=this.shift():w=y?this._getString(v):this._getBuffer(v),w}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var y=this.head,w=1,E=y.data;for(v-=E.length;y=y.next;){var _=y.data,S=v>_.length?_.length:v;if(S===_.length?E+=_:E+=_.slice(0,v),v-=S,v===0){S===_.length?(++w,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=_.slice(S));break}++w}return this.length-=w,E}},{key:"_getBuffer",value:function(v){var y=s.allocUnsafe(v),w=this.head,E=1;for(w.data.copy(y),v-=w.data.length;w=w.next;){var _=w.data,S=v>_.length?_.length:v;if(_.copy(y,y.length-v,0,S),v-=S,v===0){S===_.length?(++E,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=_.slice(S));break}++E}return this.length-=E,y}},{key:d,value:function(v,y){return u(this,t({},y,{depth:0,customInspect:!1}))}}]),h}(),ff}function CL(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(df,this,e)):process.nextTick(df,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(o){!t&&o?r._writableState?r._writableState.errorEmitted?process.nextTick(el,r):(r._writableState.errorEmitted=!0,process.nextTick(Hy,r,o)):process.nextTick(Hy,r,o):t?(process.nextTick(el,r),t(o)):process.nextTick(el,r)}),this)}function Hy(e,t){df(e,t),el(e)}function el(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function AL(){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 df(e,t){e.emit("error",t)}function OL(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var Vy={destroy:CL,undestroy:AL,errorOrDestroy:OL},ei={};function TL(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var Gy={};function fr(e,t,r){r||(r=Error);function n(o,a,s){return typeof t=="string"?t:t(o,a,s)}var i=function(o){TL(a,o);function a(s,l,u){return o.call(this,n(s,l,u))||this}return a}(r);i.prototype.name=r.name,i.prototype.code=e,Gy[e]=i}function Ky(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 IL(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function PL(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function kL(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"&&IL(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var i;if(PL(e," argument"))i="The ".concat(e," ").concat(n," ").concat(Ky(t,"type"));else{var o=kL(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(n," ").concat(Ky(t,"type"))}return i+=". Received type ".concat(typeof r),i},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"),ei.codes=Gy;var NL=ei.codes.ERR_INVALID_OPT_VALUE;function DL(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function LL(e,t,r,n){var i=DL(t,n,r);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var o=n?r:"highWaterMark";throw new NL(o,i)}return Math.floor(i)}return e.objectMode?16:16*1024}var qy={getHighWaterMark:LL},pf={exports:{}};typeof Object.create=="function"?pf.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:pf.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 Xo=pf.exports,ML=FL;function FL(e,t){if(hf("noDeprecation"))return e;var r=!1;function n(){if(!r){if(hf("throwDeprecation"))throw new Error(t);hf("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function hf(e){try{if(!et.localStorage)return!1}catch{return!1}var t=et.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var gf,Yy;function Jy(){if(Yy)return gf;Yy=1,gf=T;function e(H){var G=this;this.next=null,this.entry=null,this.finish=function(){de(G,H)}}var t;T.WritableState=P;var r={deprecate:ML},n=Uy,i=qo.Buffer,o=et.Uint8Array||function(){};function a(H){return i.from(H)}function s(H){return i.isBuffer(H)||H instanceof o}var l=Vy,u=qy,d=u.getHighWaterMark,p=ei.codes,h=p.ERR_INVALID_ARG_TYPE,m=p.ERR_METHOD_NOT_IMPLEMENTED,v=p.ERR_MULTIPLE_CALLBACK,y=p.ERR_STREAM_CANNOT_PIPE,w=p.ERR_STREAM_DESTROYED,E=p.ERR_STREAM_NULL_VALUES,_=p.ERR_STREAM_WRITE_AFTER_END,S=p.ERR_UNKNOWN_ENCODING,$=l.errorOrDestroy;Xo(T,n);function k(){}function P(H,G,B){t=t||qi(),H=H||{},typeof B!="boolean"&&(B=G instanceof t),this.objectMode=!!H.objectMode,B&&(this.objectMode=this.objectMode||!!H.writableObjectMode),this.highWaterMark=d(this,H,"writableHighWaterMark",B),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var z=H.decodeStrings===!1;this.decodeStrings=!z,this.defaultEncoding=H.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(K){ne(G,K)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}P.prototype.getBuffer=function(){for(var G=this.bufferedRequest,B=[];G;)B.push(G),G=G.next;return B},function(){try{Object.defineProperty(P.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var C;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(C=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(G){return C.call(this,G)?!0:this!==T?!1:G&&G._writableState instanceof P}})):C=function(G){return G instanceof this};function T(H){t=t||qi();var G=this instanceof t;if(!G&&!C.call(T,this))return new T(H);this._writableState=new P(H,this,G),this.writable=!0,H&&(typeof H.write=="function"&&(this._write=H.write),typeof H.writev=="function"&&(this._writev=H.writev),typeof H.destroy=="function"&&(this._destroy=H.destroy),typeof H.final=="function"&&(this._final=H.final)),n.call(this)}T.prototype.pipe=function(){$(this,new y)};function D(H,G){var B=new _;$(H,B),process.nextTick(G,B)}function j(H,G,B,z){var K;return B===null?K=new E:typeof B!="string"&&!G.objectMode&&(K=new h("chunk",["string","Buffer"],B)),K?($(H,K),process.nextTick(z,K),!1):!0}T.prototype.write=function(H,G,B){var z=this._writableState,K=!1,I=!z.objectMode&&s(H);return I&&!i.isBuffer(H)&&(H=a(H)),typeof G=="function"&&(B=G,G=null),I?G="buffer":G||(G=z.defaultEncoding),typeof B!="function"&&(B=k),z.ending?D(this,B):(I||j(this,z,H,B))&&(z.pendingcb++,K=M(this,z,I,H,G,B)),K},T.prototype.cork=function(){this._writableState.corked++},T.prototype.uncork=function(){var H=this._writableState;H.corked&&(H.corked--,!H.writing&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&se(this,H))},T.prototype.setDefaultEncoding=function(G){if(typeof G=="string"&&(G=G.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((G+"").toLowerCase())>-1))throw new S(G);return this._writableState.defaultEncoding=G,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function F(H,G,B){return!H.objectMode&&H.decodeStrings!==!1&&typeof G=="string"&&(G=i.from(G,B)),G}Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function M(H,G,B,z,K,I){if(!B){var N=F(G,z,K);z!==N&&(B=!0,K="buffer",z=N)}var Q=G.objectMode?1:z.length;G.length+=Q;var ie=G.length<G.highWaterMark;if(ie||(G.needDrain=!0),G.writing||G.corked){var pe=G.lastBufferedRequest;G.lastBufferedRequest={chunk:z,encoding:K,isBuf:B,callback:I,next:null},pe?pe.next=G.lastBufferedRequest:G.bufferedRequest=G.lastBufferedRequest,G.bufferedRequestCount+=1}else Z(H,G,!1,Q,z,K,I);return ie}function Z(H,G,B,z,K,I,N){G.writelen=z,G.writecb=N,G.writing=!0,G.sync=!0,G.destroyed?G.onwrite(new w("write")):B?H._writev(K,G.onwrite):H._write(K,I,G.onwrite),G.sync=!1}function Y(H,G,B,z,K){--G.pendingcb,B?(process.nextTick(K,z),process.nextTick(J,H,G),H._writableState.errorEmitted=!0,$(H,z)):(K(z),H._writableState.errorEmitted=!0,$(H,z),J(H,G))}function X(H){H.writing=!1,H.writecb=null,H.length-=H.writelen,H.writelen=0}function ne(H,G){var B=H._writableState,z=B.sync,K=B.writecb;if(typeof K!="function")throw new v;if(X(B),G)Y(H,B,z,G,K);else{var I=ge(B)||H.destroyed;!I&&!B.corked&&!B.bufferProcessing&&B.bufferedRequest&&se(H,B),z?process.nextTick(oe,H,B,I,K):oe(H,B,I,K)}}function oe(H,G,B,z){B||ce(H,G),G.pendingcb--,z(),J(H,G)}function ce(H,G){G.length===0&&G.needDrain&&(G.needDrain=!1,H.emit("drain"))}function se(H,G){G.bufferProcessing=!0;var B=G.bufferedRequest;if(H._writev&&B&&B.next){var z=G.bufferedRequestCount,K=new Array(z),I=G.corkedRequestsFree;I.entry=B;for(var N=0,Q=!0;B;)K[N]=B,B.isBuf||(Q=!1),B=B.next,N+=1;K.allBuffers=Q,Z(H,G,!0,G.length,K,"",I.finish),G.pendingcb++,G.lastBufferedRequest=null,I.next?(G.corkedRequestsFree=I.next,I.next=null):G.corkedRequestsFree=new e(G),G.bufferedRequestCount=0}else{for(;B;){var ie=B.chunk,pe=B.encoding,ye=B.callback,_e=G.objectMode?1:ie.length;if(Z(H,G,!1,_e,ie,pe,ye),B=B.next,G.bufferedRequestCount--,G.writing)break}B===null&&(G.lastBufferedRequest=null)}G.bufferedRequest=B,G.bufferProcessing=!1}T.prototype._write=function(H,G,B){B(new m("_write()"))},T.prototype._writev=null,T.prototype.end=function(H,G,B){var z=this._writableState;return typeof H=="function"?(B=H,H=null,G=null):typeof G=="function"&&(B=G,G=null),H!=null&&this.write(H,G),z.corked&&(z.corked=1,this.uncork()),z.ending||re(this,z,B),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ge(H){return H.ending&&H.length===0&&H.bufferedRequest===null&&!H.finished&&!H.writing}function le(H,G){H._final(function(B){G.pendingcb--,B&&$(H,B),G.prefinished=!0,H.emit("prefinish"),J(H,G)})}function V(H,G){!G.prefinished&&!G.finalCalled&&(typeof H._final=="function"&&!G.destroyed?(G.pendingcb++,G.finalCalled=!0,process.nextTick(le,H,G)):(G.prefinished=!0,H.emit("prefinish")))}function J(H,G){var B=ge(G);if(B&&(V(H,G),G.pendingcb===0&&(G.finished=!0,H.emit("finish"),G.autoDestroy))){var z=H._readableState;(!z||z.autoDestroy&&z.endEmitted)&&H.destroy()}return B}function re(H,G,B){G.ending=!0,J(H,G),B&&(G.finished?process.nextTick(B):H.once("finish",B)),G.ended=!0,H.writable=!1}function de(H,G,B){var z=H.entry;for(H.entry=null;z;){var K=z.callback;G.pendingcb--,K(B),z=z.next}G.corkedRequestsFree.next=H}return Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(G){this._writableState&&(this._writableState.destroyed=G)}}),T.prototype.destroy=l.destroy,T.prototype._undestroy=l.undestroy,T.prototype._destroy=function(H,G){G(H)},gf}var mf,Xy;function qi(){if(Xy)return mf;Xy=1;var e=Object.keys||function(u){var d=[];for(var p in u)d.push(p);return d};mf=a;var t=ob(),r=Jy();Xo(a,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var o=n[i];a.prototype[o]||(a.prototype[o]=r.prototype[o])}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(d){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=d,this._writableState.destroyed=d)}}),mf}var vf={},Zy;function Qy(){if(Zy)return vf;Zy=1;var e=py.Buffer,t=e.isEncoding||function(E){switch(E=""+E,E&&E.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(E){if(!E)return"utf8";for(var _;;)switch(E){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 E;default:if(_)return;E=(""+E).toLowerCase(),_=!0}}function n(E){var _=r(E);if(typeof _!="string"&&(e.isEncoding===t||!t(E)))throw new Error("Unknown encoding: "+E);return _||E}vf.StringDecoder=i;function i(E){this.encoding=n(E);var _;switch(this.encoding){case"utf16le":this.text=p,this.end=h,_=4;break;case"utf8":this.fillLast=l,_=4;break;case"base64":this.text=m,this.end=v,_=3;break;default:this.write=y,this.end=w;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(_)}i.prototype.write=function(E){if(E.length===0)return"";var _,S;if(this.lastNeed){if(_=this.fillLast(E),_===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S<E.length?_?_+this.text(E,S):this.text(E,S):_||""},i.prototype.end=d,i.prototype.text=u,i.prototype.fillLast=function(E){if(this.lastNeed<=E.length)return E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,this.lastTotal-this.lastNeed,0,E.length),this.lastNeed-=E.length};function o(E){return E<=127?0:E>>5===6?2:E>>4===14?3:E>>3===30?4:E>>6===2?-1:-2}function a(E,_,S){var $=_.length-1;if($<S)return 0;var k=o(_[$]);return k>=0?(k>0&&(E.lastNeed=k-1),k):--$<S||k===-2?0:(k=o(_[$]),k>=0?(k>0&&(E.lastNeed=k-2),k):--$<S||k===-2?0:(k=o(_[$]),k>=0?(k>0&&(k===2?k=0:E.lastNeed=k-3),k):0))}function s(E,_,S){if((_[0]&192)!==128)return E.lastNeed=0,"�";if(E.lastNeed>1&&_.length>1){if((_[1]&192)!==128)return E.lastNeed=1,"�";if(E.lastNeed>2&&_.length>2&&(_[2]&192)!==128)return E.lastNeed=2,"�"}}function l(E){var _=this.lastTotal-this.lastNeed,S=s(this,E);if(S!==void 0)return S;if(this.lastNeed<=E.length)return E.copy(this.lastChar,_,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);E.copy(this.lastChar,_,0,E.length),this.lastNeed-=E.length}function u(E,_){var S=a(this,E,_);if(!this.lastNeed)return E.toString("utf8",_);this.lastTotal=S;var $=E.length-(S-this.lastNeed);return E.copy(this.lastChar,0,$),E.toString("utf8",_,$)}function d(E){var _=E&&E.length?this.write(E):"";return this.lastNeed?_+"�":_}function p(E,_){if((E.length-_)%2===0){var S=E.toString("utf16le",_);if(S){var $=S.charCodeAt(S.length-1);if($>=55296&&$<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=E[E.length-1],E.toString("utf16le",_,E.length-1)}function h(E){var _=E&&E.length?this.write(E):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return _+this.lastChar.toString("utf16le",0,S)}return _}function m(E,_){var S=(E.length-_)%3;return S===0?E.toString("base64",_):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=E[E.length-1]:(this.lastChar[0]=E[E.length-2],this.lastChar[1]=E[E.length-1]),E.toString("base64",_,E.length-S))}function v(E){var _=E&&E.length?this.write(E):"";return this.lastNeed?_+this.lastChar.toString("base64",0,3-this.lastNeed):_}function y(E){return E.toString(this.encoding)}function w(E){return E&&E.length?this.write(E):""}return vf}var eb=ei.codes.ERR_STREAM_PREMATURE_CLOSE;function BL(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function jL(){}function RL(e){return e.setHeader&&typeof e.abort=="function"}function tb(e,t,r){if(typeof t=="function")return tb(e,null,t);t||(t={}),r=BL(r||jL);var n=t.readable||t.readable!==!1&&e.readable,i=t.writable||t.writable!==!1&&e.writable,o=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){i=!1,a=!0,n||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,l=!0,i||r.call(e)},d=function(v){r.call(e,v)},p=function(){var v;if(n&&!l)return(!e._readableState||!e._readableState.ended)&&(v=new eb),r.call(e,v);if(i&&!a)return(!e._writableState||!e._writableState.ended)&&(v=new eb),r.call(e,v)},h=function(){e.req.on("finish",s)};return RL(e)?(e.on("complete",s),e.on("abort",p),e.req?h():e.on("request",h)):i&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",u),e.on("finish",s),t.error!==!1&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",s),e.removeListener("abort",p),e.removeListener("request",h),e.req&&e.req.removeListener("finish",s),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",s),e.removeListener("end",u),e.removeListener("error",d),e.removeListener("close",p)}}var yf=tb,bf,rb;function UL(){if(rb)return bf;rb=1;var e;function t(E,_,S){return _ in E?Object.defineProperty(E,_,{value:S,enumerable:!0,configurable:!0,writable:!0}):E[_]=S,E}var r=yf,n=Symbol("lastResolve"),i=Symbol("lastReject"),o=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),l=Symbol("handlePromise"),u=Symbol("stream");function d(E,_){return{value:E,done:_}}function p(E){var _=E[n];if(_!==null){var S=E[u].read();S!==null&&(E[s]=null,E[n]=null,E[i]=null,_(d(S,!1)))}}function h(E){process.nextTick(p,E)}function m(E,_){return function(S,$){E.then(function(){if(_[a]){S(d(void 0,!0));return}_[l](S,$)},$)}}var v=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((e={get stream(){return this[u]},next:function(){var _=this,S=this[o];if(S!==null)return Promise.reject(S);if(this[a])return Promise.resolve(d(void 0,!0));if(this[u].destroyed)return new Promise(function(C,T){process.nextTick(function(){_[o]?T(_[o]):C(d(void 0,!0))})});var $=this[s],k;if($)k=new Promise(m($,this));else{var P=this[u].read();if(P!==null)return Promise.resolve(d(P,!1));k=new Promise(this[l])}return this[s]=k,k}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var _=this;return new Promise(function(S,$){_[u].destroy(null,function(k){if(k){$(k);return}S(d(void 0,!0))})})}),e),v),w=function(_){var S,$=Object.create(y,(S={},t(S,u,{value:_,writable:!0}),t(S,n,{value:null,writable:!0}),t(S,i,{value:null,writable:!0}),t(S,o,{value:null,writable:!0}),t(S,a,{value:_._readableState.endEmitted,writable:!0}),t(S,l,{value:function(P,C){var T=$[u].read();T?($[s]=null,$[n]=null,$[i]=null,P(d(T,!1))):($[n]=P,$[i]=C)},writable:!0}),S));return $[s]=null,r(_,function(k){if(k&&k.code!=="ERR_STREAM_PREMATURE_CLOSE"){var P=$[i];P!==null&&($[s]=null,$[n]=null,$[i]=null,P(k)),$[o]=k;return}var C=$[n];C!==null&&($[s]=null,$[n]=null,$[i]=null,C(d(void 0,!0))),$[a]=!0}),_.on("readable",h.bind(null,$)),$};return bf=w,bf}var wf,nb;function WL(){return nb||(nb=1,wf=function(){throw new Error("Readable.from is not available in the browser")}),wf}var Ef,ib;function ob(){if(ib)return Ef;ib=1,Ef=D;var e;D.ReadableState=T,Ry.EventEmitter;var t=function(N,Q){return N.listeners(Q).length},r=Uy,n=qo.Buffer,i=et.Uint8Array||function(){};function o(I){return n.from(I)}function a(I){return n.isBuffer(I)||I instanceof i}var s=Wy,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var u=$L(),d=Vy,p=qy,h=p.getHighWaterMark,m=ei.codes,v=m.ERR_INVALID_ARG_TYPE,y=m.ERR_STREAM_PUSH_AFTER_EOF,w=m.ERR_METHOD_NOT_IMPLEMENTED,E=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,_,S,$;Xo(D,r);var k=d.errorOrDestroy,P=["error","close","destroy","pause","resume"];function C(I,N,Q){if(typeof I.prependListener=="function")return I.prependListener(N,Q);!I._events||!I._events[N]?I.on(N,Q):Array.isArray(I._events[N])?I._events[N].unshift(Q):I._events[N]=[Q,I._events[N]]}function T(I,N,Q){e=e||qi(),I=I||{},typeof Q!="boolean"&&(Q=N instanceof e),this.objectMode=!!I.objectMode,Q&&(this.objectMode=this.objectMode||!!I.readableObjectMode),this.highWaterMark=h(this,I,"readableHighWaterMark",Q),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=I.emitClose!==!1,this.autoDestroy=!!I.autoDestroy,this.destroyed=!1,this.defaultEncoding=I.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,I.encoding&&(_||(_=Qy().StringDecoder),this.decoder=new _(I.encoding),this.encoding=I.encoding)}function D(I){if(e=e||qi(),!(this instanceof D))return new D(I);var N=this instanceof e;this._readableState=new T(I,this,N),this.readable=!0,I&&(typeof I.read=="function"&&(this._read=I.read),typeof I.destroy=="function"&&(this._destroy=I.destroy)),r.call(this)}Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(N){this._readableState&&(this._readableState.destroyed=N)}}),D.prototype.destroy=d.destroy,D.prototype._undestroy=d.undestroy,D.prototype._destroy=function(I,N){N(I)},D.prototype.push=function(I,N){var Q=this._readableState,ie;return Q.objectMode?ie=!0:typeof I=="string"&&(N=N||Q.defaultEncoding,N!==Q.encoding&&(I=n.from(I,N),N=""),ie=!0),j(this,I,N,!1,ie)},D.prototype.unshift=function(I){return j(this,I,null,!0,!1)};function j(I,N,Q,ie,pe){l("readableAddChunk",N);var ye=I._readableState;if(N===null)ye.reading=!1,ne(I,ye);else{var _e;if(pe||(_e=M(ye,N)),_e)k(I,_e);else if(ye.objectMode||N&&N.length>0)if(typeof N!="string"&&!ye.objectMode&&Object.getPrototypeOf(N)!==n.prototype&&(N=o(N)),ie)ye.endEmitted?k(I,new E):F(I,ye,N,!0);else if(ye.ended)k(I,new y);else{if(ye.destroyed)return!1;ye.reading=!1,ye.decoder&&!Q?(N=ye.decoder.write(N),ye.objectMode||N.length!==0?F(I,ye,N,!1):se(I,ye)):F(I,ye,N,!1)}else ie||(ye.reading=!1,se(I,ye))}return!ye.ended&&(ye.length<ye.highWaterMark||ye.length===0)}function F(I,N,Q,ie){N.flowing&&N.length===0&&!N.sync?(N.awaitDrain=0,I.emit("data",Q)):(N.length+=N.objectMode?1:Q.length,ie?N.buffer.unshift(Q):N.buffer.push(Q),N.needReadable&&oe(I)),se(I,N)}function M(I,N){var Q;return!a(N)&&typeof N!="string"&&N!==void 0&&!I.objectMode&&(Q=new v("chunk",["string","Buffer","Uint8Array"],N)),Q}D.prototype.isPaused=function(){return this._readableState.flowing===!1},D.prototype.setEncoding=function(I){_||(_=Qy().StringDecoder);var N=new _(I);this._readableState.decoder=N,this._readableState.encoding=this._readableState.decoder.encoding;for(var Q=this._readableState.buffer.head,ie="";Q!==null;)ie+=N.write(Q.data),Q=Q.next;return this._readableState.buffer.clear(),ie!==""&&this._readableState.buffer.push(ie),this._readableState.length=ie.length,this};var Z=1073741824;function Y(I){return I>=Z?I=Z:(I--,I|=I>>>1,I|=I>>>2,I|=I>>>4,I|=I>>>8,I|=I>>>16,I++),I}function X(I,N){return I<=0||N.length===0&&N.ended?0:N.objectMode?1:I!==I?N.flowing&&N.length?N.buffer.head.data.length:N.length:(I>N.highWaterMark&&(N.highWaterMark=Y(I)),I<=N.length?I:N.ended?N.length:(N.needReadable=!0,0))}D.prototype.read=function(I){l("read",I),I=parseInt(I,10);var N=this._readableState,Q=I;if(I!==0&&(N.emittedReadable=!1),I===0&&N.needReadable&&((N.highWaterMark!==0?N.length>=N.highWaterMark:N.length>0)||N.ended))return l("read: emitReadable",N.length,N.ended),N.length===0&&N.ended?B(this):oe(this),null;if(I=X(I,N),I===0&&N.ended)return N.length===0&&B(this),null;var ie=N.needReadable;l("need readable",ie),(N.length===0||N.length-I<N.highWaterMark)&&(ie=!0,l("length less than watermark",ie)),N.ended||N.reading?(ie=!1,l("reading or ended",ie)):ie&&(l("do read"),N.reading=!0,N.sync=!0,N.length===0&&(N.needReadable=!0),this._read(N.highWaterMark),N.sync=!1,N.reading||(I=X(Q,N)));var pe;return I>0?pe=G(I,N):pe=null,pe===null?(N.needReadable=N.length<=N.highWaterMark,I=0):(N.length-=I,N.awaitDrain=0),N.length===0&&(N.ended||(N.needReadable=!0),Q!==I&&N.ended&&B(this)),pe!==null&&this.emit("data",pe),pe};function ne(I,N){if(l("onEofChunk"),!N.ended){if(N.decoder){var Q=N.decoder.end();Q&&Q.length&&(N.buffer.push(Q),N.length+=N.objectMode?1:Q.length)}N.ended=!0,N.sync?oe(I):(N.needReadable=!1,N.emittedReadable||(N.emittedReadable=!0,ce(I)))}}function oe(I){var N=I._readableState;l("emitReadable",N.needReadable,N.emittedReadable),N.needReadable=!1,N.emittedReadable||(l("emitReadable",N.flowing),N.emittedReadable=!0,process.nextTick(ce,I))}function ce(I){var N=I._readableState;l("emitReadable_",N.destroyed,N.length,N.ended),!N.destroyed&&(N.length||N.ended)&&(I.emit("readable"),N.emittedReadable=!1),N.needReadable=!N.flowing&&!N.ended&&N.length<=N.highWaterMark,H(I)}function se(I,N){N.readingMore||(N.readingMore=!0,process.nextTick(ge,I,N))}function ge(I,N){for(;!N.reading&&!N.ended&&(N.length<N.highWaterMark||N.flowing&&N.length===0);){var Q=N.length;if(l("maybeReadMore read 0"),I.read(0),Q===N.length)break}N.readingMore=!1}D.prototype._read=function(I){k(this,new w("_read()"))},D.prototype.pipe=function(I,N){var Q=this,ie=this._readableState;switch(ie.pipesCount){case 0:ie.pipes=I;break;case 1:ie.pipes=[ie.pipes,I];break;default:ie.pipes.push(I);break}ie.pipesCount+=1,l("pipe count=%d opts=%j",ie.pipesCount,N);var pe=(!N||N.end!==!1)&&I!==process.stdout&&I!==process.stderr,ye=pe?xe:je;ie.endEmitted?process.nextTick(ye):Q.once("end",ye),I.on("unpipe",_e);function _e(b,f){l("onunpipe"),b===Q&&f&&f.hasUnpiped===!1&&(f.hasUnpiped=!0,at())}function xe(){l("onend"),I.end()}var ae=le(Q);I.on("drain",ae);var Me=!1;function at(){l("cleanup"),I.removeListener("close",gt),I.removeListener("finish",Se),I.removeListener("drain",ae),I.removeListener("error",Re),I.removeListener("unpipe",_e),Q.removeListener("end",xe),Q.removeListener("end",je),Q.removeListener("data",Oe),Me=!0,ie.awaitDrain&&(!I._writableState||I._writableState.needDrain)&&ae()}Q.on("data",Oe);function Oe(b){l("ondata");var f=I.write(b);l("dest.write",f),f===!1&&((ie.pipesCount===1&&ie.pipes===I||ie.pipesCount>1&&K(ie.pipes,I)!==-1)&&!Me&&(l("false write response, pause",ie.awaitDrain),ie.awaitDrain++),Q.pause())}function Re(b){l("onerror",b),je(),I.removeListener("error",Re),t(I,"error")===0&&k(I,b)}C(I,"error",Re);function gt(){I.removeListener("finish",Se),je()}I.once("close",gt);function Se(){l("onfinish"),I.removeListener("close",gt),je()}I.once("finish",Se);function je(){l("unpipe"),Q.unpipe(I)}return I.emit("pipe",Q),ie.flowing||(l("pipe resume"),Q.resume()),I};function le(I){return function(){var Q=I._readableState;l("pipeOnDrain",Q.awaitDrain),Q.awaitDrain&&Q.awaitDrain--,Q.awaitDrain===0&&t(I,"data")&&(Q.flowing=!0,H(I))}}D.prototype.unpipe=function(I){var N=this._readableState,Q={hasUnpiped:!1};if(N.pipesCount===0)return this;if(N.pipesCount===1)return I&&I!==N.pipes?this:(I||(I=N.pipes),N.pipes=null,N.pipesCount=0,N.flowing=!1,I&&I.emit("unpipe",this,Q),this);if(!I){var ie=N.pipes,pe=N.pipesCount;N.pipes=null,N.pipesCount=0,N.flowing=!1;for(var ye=0;ye<pe;ye++)ie[ye].emit("unpipe",this,{hasUnpiped:!1});return this}var _e=K(N.pipes,I);return _e===-1?this:(N.pipes.splice(_e,1),N.pipesCount-=1,N.pipesCount===1&&(N.pipes=N.pipes[0]),I.emit("unpipe",this,Q),this)},D.prototype.on=function(I,N){var Q=r.prototype.on.call(this,I,N),ie=this._readableState;return I==="data"?(ie.readableListening=this.listenerCount("readable")>0,ie.flowing!==!1&&this.resume()):I==="readable"&&!ie.endEmitted&&!ie.readableListening&&(ie.readableListening=ie.needReadable=!0,ie.flowing=!1,ie.emittedReadable=!1,l("on readable",ie.length,ie.reading),ie.length?oe(this):ie.reading||process.nextTick(J,this)),Q},D.prototype.addListener=D.prototype.on,D.prototype.removeListener=function(I,N){var Q=r.prototype.removeListener.call(this,I,N);return I==="readable"&&process.nextTick(V,this),Q},D.prototype.removeAllListeners=function(I){var N=r.prototype.removeAllListeners.apply(this,arguments);return(I==="readable"||I===void 0)&&process.nextTick(V,this),N};function V(I){var N=I._readableState;N.readableListening=I.listenerCount("readable")>0,N.resumeScheduled&&!N.paused?N.flowing=!0:I.listenerCount("data")>0&&I.resume()}function J(I){l("readable nexttick read 0"),I.read(0)}D.prototype.resume=function(){var I=this._readableState;return I.flowing||(l("resume"),I.flowing=!I.readableListening,re(this,I)),I.paused=!1,this};function re(I,N){N.resumeScheduled||(N.resumeScheduled=!0,process.nextTick(de,I,N))}function de(I,N){l("resume",N.reading),N.reading||I.read(0),N.resumeScheduled=!1,I.emit("resume"),H(I),N.flowing&&!N.reading&&I.read(0)}D.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 H(I){var N=I._readableState;for(l("flow",N.flowing);N.flowing&&I.read()!==null;);}D.prototype.wrap=function(I){var N=this,Q=this._readableState,ie=!1;I.on("end",function(){if(l("wrapped end"),Q.decoder&&!Q.ended){var _e=Q.decoder.end();_e&&_e.length&&N.push(_e)}N.push(null)}),I.on("data",function(_e){if(l("wrapped data"),Q.decoder&&(_e=Q.decoder.write(_e)),!(Q.objectMode&&_e==null)&&!(!Q.objectMode&&(!_e||!_e.length))){var xe=N.push(_e);xe||(ie=!0,I.pause())}});for(var pe in I)this[pe]===void 0&&typeof I[pe]=="function"&&(this[pe]=function(xe){return function(){return I[xe].apply(I,arguments)}}(pe));for(var ye=0;ye<P.length;ye++)I.on(P[ye],this.emit.bind(this,P[ye]));return this._read=function(_e){l("wrapped _read",_e),ie&&(ie=!1,I.resume())},this},typeof Symbol=="function"&&(D.prototype[Symbol.asyncIterator]=function(){return S===void 0&&(S=UL()),S(this)}),Object.defineProperty(D.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(D.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(D.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(N){this._readableState&&(this._readableState.flowing=N)}}),D._fromList=G,Object.defineProperty(D.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function G(I,N){if(N.length===0)return null;var Q;return N.objectMode?Q=N.buffer.shift():!I||I>=N.length?(N.decoder?Q=N.buffer.join(""):N.buffer.length===1?Q=N.buffer.first():Q=N.buffer.concat(N.length),N.buffer.clear()):Q=N.buffer.consume(I,N.decoder),Q}function B(I){var N=I._readableState;l("endReadable",N.endEmitted),N.endEmitted||(N.ended=!0,process.nextTick(z,N,I))}function z(I,N){if(l("endReadableNT",I.endEmitted,I.length),!I.endEmitted&&I.length===0&&(I.endEmitted=!0,N.readable=!1,N.emit("end"),I.autoDestroy)){var Q=N._writableState;(!Q||Q.autoDestroy&&Q.finished)&&N.destroy()}}typeof Symbol=="function"&&(D.from=function(I,N){return $===void 0&&($=WL()),$(D,I,N)});function K(I,N){for(var Q=0,ie=I.length;Q<ie;Q++)if(I[Q]===N)return Q;return-1}return Ef}var ab=tn,tl=ei.codes,zL=tl.ERR_METHOD_NOT_IMPLEMENTED,HL=tl.ERR_MULTIPLE_CALLBACK,VL=tl.ERR_TRANSFORM_ALREADY_TRANSFORMING,GL=tl.ERR_TRANSFORM_WITH_LENGTH_0,rl=qi();Xo(tn,rl);function KL(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new HL);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function tn(e){if(!(this instanceof tn))return new tn(e);rl.call(this,e),this._transformState={afterTransform:KL.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",qL)}function qL(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){sb(e,t,r)}):sb(this,null,null)}tn.prototype.push=function(e,t){return this._transformState.needTransform=!1,rl.prototype.push.call(this,e,t)},tn.prototype._transform=function(e,t,r){r(new zL("_transform()"))},tn.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},tn.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},tn.prototype._destroy=function(e,t){rl.prototype._destroy.call(this,e,function(r){t(r)})};function sb(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new GL;if(e._transformState.transforming)throw new VL;return e.push(null)}var YL=Zo,lb=ab;Xo(Zo,lb);function Zo(e){if(!(this instanceof Zo))return new Zo(e);lb.call(this,e)}Zo.prototype._transform=function(e,t,r){r(null,e)};var _f;function JL(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var cb=ei.codes,XL=cb.ERR_MISSING_ARGS,ZL=cb.ERR_STREAM_DESTROYED;function ub(e){if(e)throw e}function QL(e){return e.setHeader&&typeof e.abort=="function"}function e7(e,t,r,n){n=JL(n);var i=!1;e.on("close",function(){i=!0}),_f===void 0&&(_f=yf),_f(e,{readable:t,writable:r},function(a){if(a)return n(a);i=!0,n()});var o=!1;return function(a){if(!i&&!o){if(o=!0,QL(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(a||new ZL("pipe"))}}}function fb(e){e()}function t7(e,t){return e.pipe(t)}function r7(e){return!e.length||typeof e[e.length-1]!="function"?ub:e.pop()}function n7(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=r7(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new XL("streams");var i,o=t.map(function(a,s){var l=s<t.length-1,u=s>0;return e7(a,l,u,function(d){i||(i=d),d&&o.forEach(fb),!l&&(o.forEach(fb),n(i))})});return t.reduce(t7)}var i7=n7;(function(e,t){t=e.exports=ob(),t.Stream=t,t.Readable=t,t.Writable=Jy(),t.Duplex=qi(),t.Transform=ab,t.PassThrough=YL,t.finished=yf,t.pipeline=i7})(Ty,Ty.exports);var o7=e=>new Promise((t,r)=>{e((n,i)=>{n?r(n):t(i)})}),db=class extends Error{constructor(e,t){super(e?`Timeout [${e.toLocaleString()}ms]${t===void 0?"":`: ${t}`}`:"Timeout")}},a7=async(e,t,r)=>{let n;const i=r===void 0||typeof r=="string"?new db(t,r):r,o=new Promise((s,l)=>{n=setTimeout(()=>{l(i)},t),s7(n)}),a=typeof e=="function"?o7(e):e;return await Promise.race([a,o]).finally(()=>{clearTimeout(n)})},s7=e=>{typeof e=="object"&&"unref"in e&&e.unref()},l7=class{constructor(e={autoReset:!1}){this._options=e,this.reset()}async wait({timeout:e}={}){return e?a7(this._promise,e,new db(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}},c7=class $r extends Xs{constructor(t,r){super(n=>this._subscribe(n)),this._value=r,this._observers=new Set,this._completed=new l7,this._handlers={next:n=>{this._value=n,this._observers.forEach(i=>{var o;return(o=i.next)==null?void 0:o.call(i,n)})},error:n=>{this._observers.forEach(i=>{var o;return(o=i.error)==null?void 0:o.call(i,n)})},complete:()=>{this._completed.wake(),this._observers.forEach(n=>{var i;return(i=n.complete)==null?void 0:i.call(n)})}},this._observable=typeof t=="function"?new Xs(t):t,this._observable.subscribe(this._handlers)}static from(t,r){if("emit"in t)return new $r(i=>{t.on(o=>{i.next(o)})},r);const n=Xs.from(t);return new $r(n,r)}static of(...t){return new $r(Xs.of(...t.slice(1)),t[0])}static empty(){return u7}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(o=>o instanceof $r),i=t(this._value,n.map(o=>o.get()));return new $r(this._observable.concat(...r),i)}_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)}}},u7=c7.of(null),pb=typeof process<"u"&&!!process.env.DX_TRACK_LEAKS,hb=new Set,f7=()=>{if(pb){console.log(`Leaked resources ${hb.size}:`);for(const e of hb)console.log(`- ${e.name} at`),console.log(e.openStack.getStack(1)),console.log()}};pb&&(global.dxDumpLeaks=f7);var gb="/home/runner/work/dxos/dxos/packages/sdk/react-client/src/invitations/useInvitationStatus.ts",xf=e=>{const[t,r]=c.useReducer((a,s)=>(tt("useInvitationStatus",{action:s},{F:gb,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,d;const a=p=>{switch(p.state){case we.State.CONNECTED:case we.State.READY_FOR_AUTHENTICATION:case we.State.AUTHENTICATING:{r({status:p.state});break}case we.State.SUCCESS:{r({status:p.state,result:{spaceKey:p.spaceKey||null,identityKey:p.identityKey||null,swarmKey:p.swarmKey||null,target:p.target||null}});break}case we.State.CANCELLED:case we.State.TIMEOUT:{r({status:p.state,haltedAt:t.status});break}}},s=(u=t.observable)==null?void 0:u.subscribe(a,p=>{r({status:we.State.ERROR,error:p,haltedAt:t.status})}),l=(d=t.observable)==null?void 0:d.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})},[]),i=c.useCallback(a=>(tt("authenticating...",{authCode:a},{F:gb,L:163,S:void 0,C:(s,l)=>s(...l)}),t.observable.authenticate(a)),[t.observable]),o=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:o,connect:n,authenticate:i,id:a==null?void 0:a.invitationId,invitationCode:a?ln.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,o,n,i])};const d7=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 mb=9007199254740991,p7="[object Arguments]",h7="[object Function]",g7="[object GeneratorFunction]",Sf="[object Map]",m7="[object Object]",vb="[object Promise]",$f="[object Set]",v7="[object String]",yb="[object WeakMap]",bb="[object DataView]",y7=/[\\^$.*+?()[\]{}|]/g,b7=/^\[object .+?Constructor\]$/,w7=/^(?:0|[1-9]\d*)$/,Cf="\\ud800-\\udfff",wb="\\u0300-\\u036f\\ufe20-\\ufe23",Eb="\\u20d0-\\u20f0",_b="\\ufe0e\\ufe0f",E7="["+Cf+"]",Af="["+wb+Eb+"]",Of="\\ud83c[\\udffb-\\udfff]",_7="(?:"+Af+"|"+Of+")",xb="[^"+Cf+"]",Sb="(?:\\ud83c[\\udde6-\\uddff]){2}",$b="[\\ud800-\\udbff][\\udc00-\\udfff]",Cb="\\u200d",Ab=_7+"?",Ob="["+_b+"]?",x7="(?:"+Cb+"(?:"+[xb,Sb,$b].join("|")+")"+Ob+Ab+")*",S7=Ob+Ab+x7,$7="(?:"+[xb+Af+"?",Af,Sb,$b,E7].join("|")+")",C7=RegExp(Of+"(?="+Of+")|"+$7+S7,"g"),A7=RegExp("["+Cb+Cf+wb+Eb+_b+"]"),O7=typeof et=="object"&&et&&et.Object===Object&&et,T7=typeof self=="object"&&self&&self.Object===Object&&self,ti=O7||T7||Function("return this")();function I7(e,t){for(var r=-1,n=e?e.length:0,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function P7(e){return e.split("")}function k7(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function N7(e,t){return I7(t,function(r){return e[r]})}function D7(e,t){return e==null?void 0:e[t]}function L7(e){return A7.test(e)}function M7(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function F7(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function B7(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function j7(e,t){return function(r){return e(t(r))}}function R7(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}function U7(e){return L7(e)?W7(e):P7(e)}function W7(e){return e.match(C7)||[]}var z7=Function.prototype,nl=Object.prototype,Tf=ti["__core-js_shared__"],Tb=function(){var e=/[^.]+$/.exec(Tf&&Tf.keys&&Tf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Ib=z7.toString,il=nl.hasOwnProperty,Qo=nl.toString,H7=RegExp("^"+Ib.call(il).replace(y7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Pb=ti.Symbol,If=Pb?Pb.iterator:void 0,V7=nl.propertyIsEnumerable,G7=j7(Object.keys,Object),Pf=ea(ti,"DataView"),kf=ea(ti,"Map"),Nf=ea(ti,"Promise"),Df=ea(ti,"Set"),Lf=ea(ti,"WeakMap"),K7=ni(Pf),q7=ni(kf),Y7=ni(Nf),J7=ni(Df),X7=ni(Lf);function Z7(e,t){var r=kb(e)||aM(e)?k7(e.length,String):[],n=r.length,i=!!n;for(var o in e)(t||il.call(e,o))&&!(i&&(o=="length"||nM(o,n)))&&r.push(o);return r}function Q7(e){return Qo.call(e)}function eM(e){if(!Db(e)||iM(e))return!1;var t=Nb(e)||M7(e)?H7:b7;return t.test(ni(e))}function tM(e){if(!oM(e))return G7(e);var t=[];for(var r in Object(e))il.call(e,r)&&r!="constructor"&&t.push(r);return t}function rM(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function ea(e,t){var r=D7(e,t);return eM(r)?r:void 0}var ri=Q7;(Pf&&ri(new Pf(new ArrayBuffer(1)))!=bb||kf&&ri(new kf)!=Sf||Nf&&ri(Nf.resolve())!=vb||Df&&ri(new Df)!=$f||Lf&&ri(new Lf)!=yb)&&(ri=function(e){var t=Qo.call(e),r=t==m7?e.constructor:void 0,n=r?ni(r):void 0;if(n)switch(n){case K7:return bb;case q7:return Sf;case Y7:return vb;case J7:return $f;case X7:return yb}return t});function nM(e,t){return t=t??mb,!!t&&(typeof e=="number"||w7.test(e))&&e>-1&&e%1==0&&e<t}function iM(e){return!!Tb&&Tb in e}function oM(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||nl;return e===r}function ni(e){if(e!=null){try{return Ib.call(e)}catch{}try{return e+""}catch{}}return""}function aM(e){return sM(e)&&il.call(e,"callee")&&(!V7.call(e,"callee")||Qo.call(e)==p7)}var kb=Array.isArray;function Mf(e){return e!=null&&lM(e.length)&&!Nb(e)}function sM(e){return Lb(e)&&Mf(e)}function Nb(e){var t=Db(e)?Qo.call(e):"";return t==h7||t==g7}function lM(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=mb}function Db(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Lb(e){return!!e&&typeof e=="object"}function cM(e){return typeof e=="string"||!kb(e)&&Lb(e)&&Qo.call(e)==v7}function uM(e){if(!e)return[];if(Mf(e))return cM(e)?U7(e):rM(e);if(If&&e[If])return F7(e[If]());var t=ri(e),r=t==Sf?B7:t==$f?R7:dM;return r(e)}function fM(e){return Mf(e)?Z7(e):tM(e)}function dM(e){return e?N7(e,fM(e)):[]}var pM=uM;const Mb=cn(pM)("👹👻👽🤖🎃🦾🦿🦷👣👁️🧶👑🐒🦆🦉🐴🦄🐝🦋🐞🪲🐢🦎🦕🦑🦀🐠🐬🐋🦭🐅🐆🦓🦍🦧🐘🐫🦒🦘🦬🐖🐏🦌🐕🐈🐓🦚🦜🦢🦩🦦🐁🐿️🌵🌲🌳🪵🌱🍁🪺🍄🐚🪸🪨🌾🌷🌻☀️🌙🪐⭐️⚡️☄️🔥🌈☁️💧⛱️🌊🍎🍋🍉🍇🫐🍈🍒🍑🥭🍍🥥🥝🥑🌶️🌽🥕🍬🥜🫖☕️🍵🧊🧂🏔️⚓️🛟🏝️🛶🚀🛰️⛲️🏰🚲⛺️🎙️🧲⚙️🔩🔮🔭🔬🧬🌡️🧺🛎️🔑🪑🧸🎈🎀🎊♻️🎵"),Ff=e=>Mb[parseInt(e,16)%Mb.length],Fb=e=>{const{code:t,large:r,classNames:n}=e,i=(t==null?void 0:t.length)??0,o=t==null?void 0:t.slice(0,i/2),a=t==null?void 0:t.slice(i/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,o),c.createElement("span",null,a))},hM=e=>{const{invitation:t}=e,r=xf(t);return c.createElement(mM,{...e,invitationStatus:r})},ta={size:10,variant:"circle"},gM=({animation:e,status:t})=>{const{tx:r}=Pe();return c.createElement(c.Fragment,null,c.createElement("span",{role:"none",className:ue("absolute inline-start-1 inline-end-auto opacity-20",qe(ta.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...ta,status:t,animation:e}),style:{animationDelay:"400ms"}})),c.createElement("span",{role:"none",className:ue("absolute inline-start-2 inline-end-auto opacity-50",qe(ta.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...ta,status:t,animation:e}),style:{animationDelay:"200ms"}})))},mM=({invitation:e,invitationStatus:t,send:r,onClickRemove:n,createInvitationUrl:i})=>{const{t:o}=it("os"),{cancel:a,status:s,invitationCode:l,authCode:u,type:d}=t,p=!([we.State.ERROR,we.State.TIMEOUT,we.State.CANCELLED].indexOf(s)>=0),h=d===we.Type.MULTIUSE||[we.State.INIT,we.State.CONNECTING,we.State.CONNECTED].indexOf(s)>=0,m=s===we.State.READY_FOR_AUTHENTICATION,v=c.useCallback(()=>n==null?void 0:n(e),[e,n]),y=l&&i(l),w=e==null?void 0:e.get().invitationId,E=[we.State.INIT,we.State.CONNECTING,we.State.CONNECTED,we.State.READY_FOR_AUTHENTICATION,we.State.AUTHENTICATING].includes(s)?"pulse":"none",_=[we.State.ERROR,we.State.TIMEOUT,we.State.CANCELLED].includes(s),S=[we.State.CONNECTED,we.State.READY_FOR_AUTHENTICATION,we.State.AUTHENTICATING,we.State.SUCCESS].includes(s),$=_?"error":S?"active":"inactive";return c.createElement(Jc.Root,{id:l,classNames:"flex gap-2 pis-3 pie-1 items-center relative"},c.createElement(Jc.Heading,{classNames:"sr-only"},o(d===we.Type.MULTIUSE?"invite many list item label":"invite one list item label")),d===we.Type.MULTIUSE&&c.createElement(gM,{status:$,animation:E}),c.createElement(Er.Root,null,c.createElement(Pt.Root,{...ta,animation:E,status:$},c.createElement(Er.Trigger,{asChild:!0},c.createElement(Pt.Frame,{tabIndex:0,classNames:[Rr,"relative rounded-full"]},c.createElement(Pt.Fallback,{text:Ff(w)})))),c.createElement(Er.Portal,null,c.createElement(Er.Content,{side:"left",classNames:"z-[70]"},o(d===we.Type.MULTIUSE?"invite many qr label":"invite one qr label"),c.createElement(Er.Arrow,null)))),h&&y?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,o("open share panel label"))),c.createElement(y4,{variant:"ghost",value:y})):m?c.createElement(Fb,{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"}," "),p?c.createElement(wr,{variant:"ghost",classNames:"flex gap-1",onClick:a,"data-testid":"cancel-invitation"},c.createElement("span",{className:"sr-only"},o("cancel invitation label")),c.createElement(Ye.X,{className:qe(5),weight:"bold"})):c.createElement(wr,{variant:"ghost",classNames:"flex gap-1",onClick:v,"data-testid":"remove-invitation"},c.createElement("span",{className:"sr-only"},o("remove invitation label")),c.createElement(Ye.X,{className:qe(5),weight:"bold"})))},vM=({invitations:e,send:t,...r})=>{const{className:n,InvitationListItem:i=hM}=r;return c.createElement(Yc,{classNames:ue("flex flex-col gap-2",n)},e.map(o=>{const a=o.get().invitationId;return c.createElement(i,{key:a,send:t,invitation:o,...r})}))},yM={noopAction:{label:"No-op",description:"",icon:Ye.Placeholder,onClick:()=>{}}},bM=c.forwardRef((e,t)=>{const{classNames:r,variant:n,isFull:i=!0,actions:o=yM,activeAction:a,onChangeActiveAction:s,defaultActiveAction:l,...u}=e,[d=Object.keys(o)[0],p]=Kr({prop:a,onChange:s,defaultProp:l}),h=o[d]??{},{t:m}=it("os");return c.createElement("div",{role:"none",className:ue("mbs-2 flex gap-px items-center",i&&"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:h.onClick},h.icon&&c.createElement(h.icon,null),c.createElement("span",null,h.label)),c.createElement(qn.Root,null,c.createElement(qn.Trigger,{asChild:!0},c.createElement(wr,{classNames:["bs-11 flex-none rounded-is-none",r]},c.createElement("span",{className:"sr-only"},m("invite options label")),c.createElement(Ye.CaretDown,null))),c.createElement(qn.Content,null,c.createElement(qn.Viewport,null,Object.entries(o).map(([v,y])=>c.createElement(qn.CheckboxItem,{key:v,"aria-labelledby":`${v}__label`,"aria-describedby":`${v}__description`,checked:d===v,onCheckedChange:w=>w&&p(v),classNames:"gap-2"},y.icon&&c.createElement(y.icon,{className:qe(5)}),c.createElement("div",{role:"none",className:"flex-1 min-is-0 space-b-1"},c.createElement("p",{id:`${v}__label`},y.label),y.description&&c.createElement("p",{id:`${v}__description`,className:It},y.description)),c.createElement(qn.ItemIndicator,{asChild:!0},c.createElement(Ye.Check,null))))),c.createElement(qn.Arrow,null))))}),lt=c.forwardRef((e,t)=>{const{children:r,classNames:n,variant:i,isFull:o=!0,...a}=e;return c.createElement(wr,{...a,classNames:[o&&"is-full","bs-11 flex gap-2 mbs-2",n],ref:t,variant:i},r)}),qt=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)),Bb=({onDone:e,...t})=>{const{t:r}=it("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(Ye.X,{weight:"bold",className:qe(4)}),c.createElement("span",{className:"sr-only"},r("exit label")))},Bf=({text:e,className:t})=>c.createElement("div",{role:"none",className:ue(qe(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))),wM=e=>{const{children:t}=e;return c.createElement("div",{role:"none",className:"absolute inset-0 flex items-center justify-center"},t)},jf=c.forwardRef(({titleId:e,title:t,titleSrOnly:r,children:n,corner:i},o)=>c.createElement("div",{role:"none",className:"pbe-2 relative",ref:o},i,c.createElement("h1",{...!r&&{id:e},className:ue(It,"text-center mlb-2",r&&"invisible")},t),r&&c.createElement("span",{id:e},t),n)),jb=e=>{const{children:t}=e;return c.createElement("span",{className:ue(It,"text-center mli-6 whitespace-normal")},t)},ra=({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));/*!
119
+ * Copyright (c) Microsoft Corporation. All rights reserved.
120
+ * Licensed under the MIT License.
121
+ */const An="data-tabster",Rb="data-tabster-dummy",EM="tabster:focusin",_M="tabster:focusout",xM="tabster:movefocus",Ub=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]"].join(", "),SM={Auto:0,Inside:1,Outside:2};/*!
122
+ * Copyright (c) Microsoft Corporation. All rights reserved.
123
+ * Licensed under the MIT License.
124
+ */function ii(e,t){var r;return(r=e.storageEntry(t))===null||r===void 0?void 0:r.tabster}function Wb(e,t,r){var n,i;const o=r||e._noop?void 0:t.getAttribute(An);let a=e.storageEntry(t),s;if(o)if(o!==((n=a==null?void 0:a.attr)===null||n===void 0?void 0:n.string))try{const p=JSON.parse(o);if(typeof p!="object")throw new Error(`Value is not a JSON object, got '${o}'.`);s={string:o,object:p}}catch(p){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${p}`,t)}else return;else if(!a)return;a||(a=e.storageEntry(t,!0)),a.tabster||(a.tabster={});const l=a.tabster||{},u=((i=a.attr)===null||i===void 0?void 0:i.object)||{},d=(s==null?void 0:s.object)||{};for(const p of Object.keys(u))if(!d[p]){if(p==="root"){const h=l[p];h&&e.root.onRoot(h,!0)}switch(p){case"deloser":case"root":case"groupper":case"modalizer":case"restorer":case"mover":const h=l[p];h&&(h.dispose(),delete l[p]);break;case"observed":delete l[p],e.observedElement&&e.observedElement.onObservedElementUpdate(t);break;case"focusable":case"outline":case"uncontrolled":case"sys":delete l[p];break}}for(const p of Object.keys(d)){const h=d.sys;switch(p){case"deloser":l.deloser?l.deloser.setProps(d.deloser):e.deloser?l.deloser=e.deloser.createDeloser(t,d.deloser):process.env.NODE_ENV==="development"&&console.error("Deloser API used before initialization, please call `getDeloser()`");break;case"root":l.root?l.root.setProps(d.root):l.root=e.root.createRoot(t,d.root,h),e.root.onRoot(l.root);break;case"modalizer":l.modalizer?l.modalizer.setProps(d.modalizer):e.modalizer?l.modalizer=e.modalizer.createModalizer(t,d.modalizer,h):process.env.NODE_ENV==="development"&&console.error("Modalizer API used before initialization, please call `getModalizer()`");break;case"restorer":l.restorer?l.restorer.setProps(d.restorer):e.restorer?d.restorer&&(l.restorer=e.restorer.createRestorer(t,d.restorer)):process.env.NODE_ENV==="development"&&console.error("Restorer API used before initialization, please call `getRestorer()`");break;case"focusable":l.focusable=d.focusable;break;case"groupper":l.groupper?l.groupper.setProps(d.groupper):e.groupper?l.groupper=e.groupper.createGroupper(t,d.groupper,h):process.env.NODE_ENV==="development"&&console.error("Groupper API used before initialization, please call `getGroupper()`");break;case"mover":l.mover?l.mover.setProps(d.mover):e.mover?l.mover=e.mover.createMover(t,d.mover,h):process.env.NODE_ENV==="development"&&console.error("Mover API used before initialization, please call `getMover()`");break;case"observed":e.observedElement?(l.observed=d.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=d.uncontrolled;break;case"outline":e.outline?l.outline=d.outline:process.env.NODE_ENV==="development"&&console.error("Outline API used before initialization, please call `getOutline()`");break;case"sys":l.sys=d.sys;break;default:console.error(`Unknown key '${p}' in data-tabster attribute value.`)}}s?a.attr=s:(Object.keys(l).length===0&&(delete a.tabster,delete a.attr),e.storageEntry(t,!1))}/*!
125
+ * Copyright (c) Microsoft Corporation. All rights reserved.
126
+ * Licensed under the MIT License.
127
+ */function $M(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")}/*!
128
+ * Copyright (c) Microsoft Corporation. All rights reserved.
129
+ * Licensed under the MIT License.
130
+ */const Le={createMutationObserver:e=>new MutationObserver(e),createTreeWalker:(e,t,r,n)=>e.createTreeWalker(t,r,n),getParentNode:e=>e?e.parentNode:null,getParentElement:e=>e?e.parentElement:null,nodeContains:(e,t)=>!!(t&&(e!=null&&e.contains(t))),getActiveElement:e=>e.activeElement,querySelector:(e,t)=>e.querySelector(t),querySelectorAll:(e,t)=>Array.prototype.slice.call(e.querySelectorAll(t),0),getElementById:(e,t)=>e.getElementById(t),getFirstChild:e=>(e==null?void 0:e.firstChild)||null,getLastChild:e=>(e==null?void 0:e.lastChild)||null,getNextSibling:e=>(e==null?void 0:e.nextSibling)||null,getPreviousSibling:e=>(e==null?void 0:e.previousSibling)||null,getFirstElementChild:e=>(e==null?void 0:e.firstElementChild)||null,getLastElementChild:e=>(e==null?void 0:e.lastElementChild)||null,getNextElementSibling:e=>(e==null?void 0:e.nextElementSibling)||null,getPreviousElementSibling:e=>(e==null?void 0:e.previousElementSibling)||null,appendChild:(e,t)=>e.appendChild(t),insertBefore:(e,t,r)=>e.insertBefore(t,r),getSelection:e=>{var t;return((t=e.ownerDocument)===null||t===void 0?void 0:t.getSelection())||null}};function CM(e){for(const t of Object.keys(e))Le[t]=e[t]}/*!
131
+ * Copyright (c) Microsoft Corporation. All rights reserved.
132
+ * Licensed under the MIT License.
133
+ */let Rf,AM=0;try{document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT),Rf=!1}catch{Rf=!0}const Uf=100;function oi(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 OM(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 TM(e){const t=e.__tabsterInstanceContext;return new((t==null?void 0:t.basics.WeakMap)||WeakMap)}function IM(e){return!!e.querySelector(Ub)}class zb{constructor(t){this._target=t}deref(){return this._target}static cleanup(t,r){return t._target?r||!Wf(t._target.ownerDocument,t._target)?(delete t._target,!0):!1:!0}}class On{constructor(t,r,n){const i=oi(t);let o;i.WeakRef?o=new i.WeakRef(r):(o=new zb(r),i.fakeWeakRefs.push(o)),this._ref=o,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 Hb(e,t){const r=oi(e);r.fakeWeakRefs=r.fakeWeakRefs.filter(n=>!zb.cleanup(n,t))}function Vb(e){const t=oi(e);t.fakeWeakRefsStarted||(t.fakeWeakRefsStarted=!0,t.WeakRef=MM(t)),t.fakeWeakRefsTimer||(t.fakeWeakRefsTimer=e().setTimeout(()=>{t.fakeWeakRefsTimer=void 0,Hb(e),Vb(e)},2*60*1e3))}function PM(e){const t=oi(e);t.fakeWeakRefsStarted=!1,t.fakeWeakRefsTimer&&(e().clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefsTimer=void 0,t.fakeWeakRefs=[])}function Gb(e,t,r){if(t.nodeType!==Node.ELEMENT_NODE)return;const n=Rf?r:{acceptNode:r};return Le.createTreeWalker(e,t,NodeFilter.SHOW_ELEMENT,n,!1)}function kM(e){e.__shouldIgnoreFocus=!0}function Kb(e){return!!e.__shouldIgnoreFocus}function NM(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((++AM).toString(36)),r.push("|"),r.push(Date.now().toString(36)),r.join("")}function DM(e,t){const r=oi(e);let n=t.__tabsterElementUID;return n||(n=t.__tabsterElementUID=NM(e())),!r.elementByUId[n]&&Wf(t.ownerDocument,t)&&(r.elementByUId[n]=new On(e,t)),n}function qb(e,t){const r=oi(e);for(const n of Object.keys(r.elementByUId)){const i=r.elementByUId[n],o=i&&i.get();o&&t&&!Le.nodeContains(t,o)||delete r.elementByUId[n]}}function Wf(e,t){return Le.nodeContains(e==null?void 0:e.body,t)}function LM(e,t){const r=e.matches||e.matchesSelector||e.msMatchesSelector||e.webkitMatchesSelector;return r&&r.call(e,t)}function MM(e){return e.basics.WeakRef}let FM=0;class BM{constructor(t,r,n){const i=t.getWindow;this._tabster=t,this._element=new On(i,r),this._props={...n},this.id="i"+ ++FM}getElement(){return this._element.get()}getProps(){return this._props}setProps(t){this._props={...t}}}class ol{constructor(t,r,n,i,o){var a;this._focusIn=d=>{if(this._fixedTarget){const h=this._fixedTarget.get();h&&Ci(h);return}const p=this.input;if(this.onFocusIn&&p){const h=d.relatedTarget;this.onFocusIn(this,this._isBackward(!0,p,h),h)}},this._focusOut=d=>{if(this._fixedTarget)return;this.useDefaultAction=!1;const p=this.input;if(this.onFocusOut&&p){const h=d.relatedTarget;this.onFocusOut(this,this._isBackward(!1,p,h),h)}};const s=t(),l=s.document.createElement("i");l.tabIndex=0,l.setAttribute("role","none"),l.setAttribute(Rb,""),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"),kM(l),this.input=l,this.isFirst=n.isFirst,this.isOutside=r,this._isPhantom=(a=n.isPhantom)!==null&&a!==void 0?a:!1,this._fixedTarget=o,l.addEventListener("focusin",this._focusIn),l.addEventListener("focusout",this._focusOut),l.__tabsterDummyContainer=i,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=Le.getParentNode(r))===null||t===void 0||t.removeChild(r))}setTopLeft(t,r){var n;const i=(n=this.input)===null||n===void 0?void 0:n.style;i&&(i.top=`${t}px`,i.left=`${r}px`)}_isBackward(t,r,n){return t&&!n?!this.isFirst:!!(n&&r.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)}}const jM={Root:1,Modalizer:2,Mover:3,Groupper:4};class zf{constructor(t,r,n,i,o,a){this._element=r,this._instance=new UM(t,r,this,n,i,o,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,i,o){var a;const l=new ol(t.getWindow,!0,{isPhantom:!0,isFirst:!0}).input;if(l){let u,d;if(r.tagName==="BODY")u=r,d=n&&i||!n&&!i?Le.getFirstElementChild(r):null;else{n&&(!i||i&&!t.focusable.isFocusable(r,!1,!0,!0))?(u=r,d=i?r.firstElementChild:null):(u=Le.getParentElement(r),d=n&&i||!n&&!i?r:Le.getNextElementSibling(r));let p,h;do p=n&&i||!n&&!i?Le.getPreviousElementSibling(d):d,h=(a=p==null?void 0:p.__tabsterDummyContainer)===null||a===void 0?void 0:a.get(),h===r?d=n&&i||!n&&!i?p:Le.getNextElementSibling(p):h=void 0;while(h)}u&&ia({by:"root",owner:u,next:null,relatedEvent:o})&&(Le.insertBefore(u,l,d),Ci(l))}}static addPhantomDummyWithTarget(t,r,n,i){const a=new ol(t.getWindow,!0,{isPhantom:!0,isFirst:!0},void 0,new On(t.getWindow,i)).input;if(a){let s,l;IM(r)&&!n?(s=r,l=Le.getFirstElementChild(r)):(s=Le.getParentElement(r),l=n?r:Le.getNextElementSibling(r)),s&&Le.insertBefore(s,a,l)}}}function Tn(e,t){var r;const n={1:"Root",2:"Modalizer",3:"Mover",4:"Groupper"};(r=e.input)===null||r===void 0||r.setAttribute(Rb,[`isFirst=${e.isFirst}`,`isOutside=${e.isOutside}`,...t.map(i=>`(${n[i.priority]}, tabbable=${i.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 i of this._dummyElements){const o=i.get();if(o){const a=this._dummyCallbacks.get(o);if(a){const s=Le.getParentNode(o);(!s||this._changedParents.has(s))&&a()}}}this._changedParents=new WeakSet},Uf)))},this._win=t}add(t,r){!this._dummyCallbacks.has(t)&&this._win&&(this._dummyElements.push(new On(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+Uf<=Date.now()){const r=new Map,n=[];for(const i of this._updateQueue)n.push(i(r));this._updateQueue.clear();for(const i of n)i();r.clear()}else this._scheduledUpdatePositions()},Uf))}}class UM{constructor(t,r,n,i,o,a,s){this._wrappers=[],this._isOutside=!1,this._transformElements=new Set,this._onFocusIn=(m,v,y)=>{this._onFocus(!0,m,v,y)},this._onFocusOut=(m,v,y)=>{this._onFocus(!1,m,v,y)},this.moveOut=m=>{var v;const y=this._firstDummy,w=this._lastDummy;if(y&&w){this._ensurePosition();const E=y.input,_=w.input,S=(v=this._element)===null||v===void 0?void 0:v.get();if(E&&_&&S){let $;m?(E.tabIndex=0,$=E):(_.tabIndex=0,$=_),$&&Ci($)}}},this.moveOutWithDefaultAction=(m,v)=>{var y;const w=this._firstDummy,E=this._lastDummy;if(w&&E){this._ensurePosition();const _=w.input,S=E.input,$=(y=this._element)===null||y===void 0?void 0:y.get();if(_&&S&&$){let k;m?!w.isOutside&&this._tabster.focusable.isFocusable($,!0,!0,!0)?k=$:(w.useDefaultAction=!0,_.tabIndex=0,k=_):(E.useDefaultAction=!0,S.tabIndex=0,k=S),k&&ia({by:"root",owner:$,next:null,relatedEvent:v})&&Ci(k)}}},this.setTabbable=(m,v)=>{var y,w;for(const _ of this._wrappers)if(_.manager===m){_.tabbable=v;break}const E=this._getCurrent();if(E){const _=E.tabbable?0:-1;let S=(y=this._firstDummy)===null||y===void 0?void 0:y.input;S&&(S.tabIndex=_),S=(w=this._lastDummy)===null||w===void 0?void 0:w.input,S&&(S.tabIndex=_)}process.env.NODE_ENV==="development"&&(this._firstDummy&&Tn(this._firstDummy,this._wrappers),this._lastDummy&&Tn(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&&Tn(this._firstDummy,this._wrappers),this._lastDummy&&Tn(this._lastDummy,this._wrappers)),this._addTransformOffsets()},0))},this._addTransformOffsets=()=>{this._tabster._dummyObserver.updatePositions(this._computeTransformOffsets)},this._computeTransformOffsets=m=>{var v,y;const w=((v=this._firstDummy)===null||v===void 0?void 0:v.input)||((y=this._lastDummy)===null||y===void 0?void 0:y.input),E=this._transformElements,_=new Set;let S=0,$=0;const k=this._getWindow();for(let P=w;P&&P.nodeType===Node.ELEMENT_NODE;P=Le.getParentElement(P)){let C=m.get(P);if(C===void 0){const T=k.getComputedStyle(P).transform;T&&T!=="none"&&(C={scrollTop:P.scrollTop,scrollLeft:P.scrollLeft}),m.set(P,C||null)}C&&(_.add(P),E.has(P)||P.addEventListener("scroll",this._addTransformOffsets),S+=C.scrollTop,$+=C.scrollLeft)}for(const P of E)_.has(P)||P.removeEventListener("scroll",this._addTransformOffsets);return this._transformElements=_,()=>{var P,C;(P=this._firstDummy)===null||P===void 0||P.setTopLeft(S,$),(C=this._lastDummy)===null||C===void 0||C.setTopLeft(S,$)}};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:i,tabbable:!0}),u)return process.env.NODE_ENV==="development"&&(this._firstDummy&&Tn(this._firstDummy,u._wrappers),this._lastDummy&&Tn(this._lastDummy,u._wrappers)),u;l.__tabsterDummy=this;const d=o==null?void 0:o.dummyInputsPosition,p=l.tagName;this._isOutside=d?d===SM.Outside:(a||p==="UL"||p==="OL"||p==="TABLE")&&!(p==="LI"||p==="TD"||p==="TH"),this._firstDummy=new ol(this._getWindow,this._isOutside,{isFirst:!0},r),this._lastDummy=new ol(this._getWindow,this._isOutside,{isFirst:!1},r);const h=this._firstDummy.input;h&&t._dummyObserver.add(h,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,i,o,a;const s=this._wrappers=this._wrappers.filter(l=>l.manager!==t&&!r);if(process.env.NODE_ENV==="development"&&(this._firstDummy&&Tn(this._firstDummy,s),this._lastDummy&&Tn(this._lastDummy,s)),s.length===0){delete((n=this._element)===null||n===void 0?void 0:n.get()).__tabsterDummy;for(const d of this._transformElements)d.removeEventListener("scroll",this._addTransformOffsets);this._transformElements.clear();const l=this._getWindow();this._addTimer&&(l.clearTimeout(this._addTimer),delete this._addTimer);const u=(i=this._firstDummy)===null||i===void 0?void 0:i.input;u&&this._tabster._dummyObserver.remove(u),(o=this._firstDummy)===null||o===void 0||o.dispose(),(a=this._lastDummy)===null||a===void 0||a.dispose()}}_onFocus(t,r,n,i){var o;const a=this._getCurrent();a&&(!r.useDefaultAction||this._callForDefaultAction)&&((o=a.manager.getHandler(t))===null||o===void 0||o(r,n,i))}_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 i=(t=this._element)===null||t===void 0?void 0:t.get(),o=(r=this._firstDummy)===null||r===void 0?void 0:r.input,a=(n=this._lastDummy)===null||n===void 0?void 0:n.input;if(!(!i||!o||!a))if(this._isOutside){const s=Le.getParentNode(i);if(s){const l=Le.getNextSibling(i);l!==a&&Le.insertBefore(s,a,l),Le.getPreviousElementSibling(i)!==o&&Le.insertBefore(s,o,i)}}else{Le.getLastElementChild(i)!==a&&Le.appendChild(i,a);const s=Le.getFirstElementChild(i);s&&s!==o&&s.parentNode&&Le.insertBefore(s.parentNode,o,s)}}}function Yb(e){let t=null;for(let r=Le.getLastElementChild(e);r;r=Le.getLastElementChild(r))t=r;return t||void 0}function na(e,t,r){const n=new CustomEvent(t,{bubbles:!0,cancelable:!0,composed:!0,detail:r});return n.details=r,e.dispatchEvent(n),!n.defaultPrevented}function ia(e){return na(e.owner,xM,e)}/*!
134
+ * Copyright (c) Microsoft Corporation. All rights reserved.
135
+ * Licensed under the MIT License.
136
+ */function WM(e,t){const r=JSON.stringify(e);return t===!0?r:{[An]:r}}function zM(e,t){for(const r of Object.keys(t)){const n=t[r];n?e[r]=n:delete e[r]}}function HM(e,t,r){let n;if(r){const i=e.getAttribute(An);if(i)try{n=JSON.parse(i)}catch(o){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${o}`,e)}}n||(n={}),zM(n,t),Object.keys(n).length>0?e.setAttribute(An,WM(n,!0)):e.removeAttribute(An)}/*!
137
+ * Copyright (c) Microsoft Corporation. All rights reserved.
138
+ * Licensed under the MIT License.
139
+ */function Jb(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 Xb extends zf{constructor(t,r,n,i){super(t,r,jM.Root,i,void 0,!0),this._onDummyInputFocus=o=>{var a;if(o.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(o.isFirst,{container:s,ignoreAccessibility:!0});if(l){Ci(l);return}}(a=o.input)===null||a===void 0||a.blur()}},this._setHandlers(this._onDummyInputFocus),this._tabster=t,this._setFocused=n}}class VM extends BM{constructor(t,r,n,i,o){super(t,r,i),this._isFocused=!1,this._setFocused=u=>{var d;if(this._setFocusedTimer&&(this._tabster.getWindow().clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),this._isFocused===u)return;const p=this._element.get();p&&(u?(this._isFocused=!0,(d=this._dummyManager)===null||d===void 0||d.setTabbable(!1),na(this._tabster.root.eventTarget,"focus",{element:p})):this._setFocusedTimer=this._tabster.getWindow().setTimeout(()=>{var h;delete this._setFocusedTimer,this._isFocused=!1,(h=this._dummyManager)===null||h===void 0||h.setTabbable(!0),na(this._tabster.root.eventTarget,"blur",{element:p})},0))},this._onFocusIn=u=>{const d=this._tabster.getParent,p=this._element.get();let h=u.composedPath()[0];do{if(h===p){this._setFocused(!0);return}h=h&&d(h)}while(h)},this._onFocusOut=()=>{this._setFocused(!1)},this._onDispose=n;const a=t.getWindow;this.uid=DM(a,r),this._sys=o,(t.controlTab||t.rootDummyInputs)&&this.addDummyInputs();const l=a().document;l.addEventListener(Vn,this._onFocusIn),l.addEventListener(Ro,this._onFocusOut),this._add()}addDummyInputs(){this._dummyManager||(this._dummyManager=new Xb(this._tabster,this._element,this._setFocused,this._sys))}dispose(){var t;this._onDispose(this);const r=this._tabster.getWindow(),n=r.document;n.removeEventListener(Vn,this._onFocusIn),n.removeEventListener(Ro,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 i=this.getElement();i&&Xb.moveWithPhantomDummy(this._tabster,i,!0,t,r)}}_add(){process.env.NODE_ENV==="development"&&Jb(this._element,!1,this.uid)}_remove(){process.env.NODE_ENV==="development"&&Jb(this._element,!0)}}class zr{constructor(t,r){this._autoRootWaiting=!1,this._roots={},this._forceDummy=!1,this.rootById={},this._autoRootCreate=()=>{var n;const i=this._win().document,o=i.body;if(o){this._autoRootUnwait(i);const a=this._autoRoot;if(a)return HM(o,{root:a},!0),Wb(this._tabster,o),(n=ii(this._tabster,o))===null||n===void 0?void 0:n.root}else this._autoRootWaiting||(this._autoRootWaiting=!0,i.addEventListener("readystatechange",this._autoRootCreate))},this._onRootDispose=n=>{delete this._roots[n.id]},this._tabster=t,this._win=t.getWindow,this._autoRoot=r,this.eventTarget=$M(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 i=new VM(this._tabster,t,this._onRootDispose,r,n);return this._roots[i.id]=i,this._forceDummy&&i.addDummyInputs(),i}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 i,o,a,s;if(!r.ownerDocument)return;const{checkRtl:l,referenceElement:u}=n,d=t.getParent;t.drainInitQueue();let p,h,m,v,y=!1,w,E,_,S,$=u||r;const k={};for(;$&&(!p||l);){const C=ii(t,$);if(l&&_===void 0){const M=$.dir;M&&(_=M.toLowerCase()==="rtl")}if(!C){$=d($);continue}const T=$.tagName;(C.uncontrolled||T==="IFRAME"||T==="WEBVIEW")&&(S=$),!v&&(!((i=C.focusable)===null||i===void 0)&&i.excludeFromMover)&&!m&&(y=!0);const D=C.modalizer,j=C.groupper,F=C.mover;!h&&D&&(h=D),!m&&j&&(!h||D)&&(h?(!j.isActive()&&j.getProps().tabbability&&h.userId!==((o=t.modalizer)===null||o===void 0?void 0:o.activeId)&&(h=void 0,m=j),E=j):m=j),!v&&F&&(!h||D)&&(!j||$!==r)&&(v=F,w=!!m&&m!==j),C.root&&(p=C.root),!((a=C.focusable)===null||a===void 0)&&a.ignoreKeydown&&Object.assign(k,C.focusable.ignoreKeydown),$=d($)}if(!p){const C=t.root;C._autoRoot&&!((s=r.ownerDocument)===null||s===void 0)&&s.body&&(p=C._autoRootCreate())}return m&&!v&&(w=!0),process.env.NODE_ENV==="development"&&!p&&(h||m||v)&&console.error("Tabster Root is required for Mover, Groupper and Modalizer to work."),p?{root:p,modalizer:h,groupper:m,mover:v,groupperBeforeMover:w,modalizerInGroupper:E,rtl:l?!!_:void 0,uncontrolled:S,excludedFromMover:y,ignoreKeydown:C=>!!k[C.key]}:void 0}static getRoot(t,r){var n;const i=t.getParent;for(let o=r;o;o=i(o)){const a=(n=ii(t,o))===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}}/*!
140
+ * Copyright (c) Microsoft Corporation. All rights reserved.
141
+ * Licensed under the MIT License.
142
+ */class Zb{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))}}/*!
143
+ * Copyright (c) Microsoft Corporation. All rights reserved.
144
+ * Licensed under the MIT License.
145
+ */class GM{constructor(t){this._tabster=t}dispose(){}getProps(t){const r=ii(this._tabster,t);return r&&r.focusable||{}}isFocusable(t,r,n,i){return LM(t,Ub)&&(r||t.tabIndex!==-1)?(n||this.isVisible(t))&&(i||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=Le.getParentElement(n)){const i=ii(this._tabster,n);if(this._isHidden(n)||!((r=i==null?void 0:i.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 i,o,a;const{container:s,currentElement:l=null,includeProgrammaticallyFocusable:u,useActiveModalizer:d,ignoreAccessibility:p,modalizerId:h,isBackward:m,onElement:v}=r;n||(n={});const y=[];let{acceptCondition:w}=r;const E=!!w;if(!s)return null;w||(w=k=>this.isFocusable(k,u,!1,p));const _={container:s,modalizerUserId:h===void 0&&d?(i=this._tabster.modalizer)===null||i===void 0?void 0:i.activeId:h||((a=(o=zr.getTabsterContext(this._tabster,s))===null||o===void 0?void 0:o.modalizer)===null||a===void 0?void 0:a.userId),from:l||s,isBackward:m,acceptCondition:w,hasCustomCondition:E,includeProgrammaticallyFocusable:u,ignoreAccessibility:p,cachedGrouppers:{}},S=Gb(s.ownerDocument,s,k=>this._acceptElement(k,_));if(!S)return null;const $=k=>{var P,C;const T=(P=_.foundElement)!==null&&P!==void 0?P:_.foundBackward;return T&&y.push(T),t?T&&(_.found=!1,delete _.foundElement,delete _.foundBackward,delete _.fromCtx,_.from=T,v&&!v(T))?!1:!!(T||k):(T&&n&&(n.uncontrolled=(C=zr.getTabsterContext(this._tabster,T))===null||C===void 0?void 0:C.uncontrolled),!!(k&&!T))};if(l||(n.outOfDOMOrder=!0),l&&Le.nodeContains(s,l))S.currentNode=l;else if(m){const k=Yb(s);if(!k)return null;if(this._acceptElement(k,_)===NodeFilter.FILTER_ACCEPT&&!$(!0))return _.skippedFocusable&&(n.outOfDOMOrder=!0),y;S.currentNode=k}do m?S.previousNode():S.nextNode();while($());return _.skippedFocusable&&(n.outOfDOMOrder=!0),y.length?y:null}_acceptElement(t,r){var n,i,o;if(r.found)return NodeFilter.FILTER_ACCEPT;const a=r.foundBackward;if(a&&(t===a||!Le.nodeContains(a,t)))return r.found=!0,r.foundElement=a,NodeFilter.FILTER_ACCEPT;const s=r.container;if(t===s)return NodeFilter.FILTER_SKIP;if(!Le.nodeContains(s,t)||t.__tabsterDummyContainer||Le.nodeContains(r.rejectElementsFrom,t))return NodeFilter.FILTER_REJECT;const l=r.currentCtx=zr.getTabsterContext(this._tabster,t);if(!l)return NodeFilter.FILTER_SKIP;if(Kb(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((n=l.modalizer)===null||n===void 0?void 0:n.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 u,d=r.fromCtx;d||(d=r.fromCtx=zr.getTabsterContext(this._tabster,r.from));const p=d==null?void 0:d.mover;let h=l.groupper,m=l.mover;if(u=(o=this._tabster.modalizer)===null||o===void 0?void 0:o.acceptElement(t,r),u!==void 0&&(r.skippedFocusable=!0),u===void 0&&(h||m||p)){const v=h==null?void 0:h.getElement(),y=p==null?void 0:p.getElement();let w=m==null?void 0:m.getElement();w&&Le.nodeContains(y,w)&&Le.nodeContains(s,y)&&(!v||!m||Le.nodeContains(y,v))&&(m=p,w=y),v&&(v===s||!Le.nodeContains(s,v))&&(h=void 0),w&&!Le.nodeContains(s,w)&&(m=void 0),h&&m&&(w&&v&&!Le.nodeContains(v,w)?m=void 0:h=void 0),h&&(u=h.acceptElement(t,r)),m&&(u=m.acceptElement(t,r))}return u===void 0&&(u=r.acceptCondition(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,u===NodeFilter.FILTER_SKIP&&this.isFocusable(t,!1,!0,!0)&&(r.skippedFocusable=!0)),u===NodeFilter.FILTER_ACCEPT&&!r.found&&(r.isBackward?(r.foundBackward=t,u=NodeFilter.FILTER_SKIP):(r.found=!0,r.foundElement=t)),u}}/*!
146
+ * Copyright (c) Microsoft Corporation. All rights reserved.
147
+ * Licensed under the MIT License.
148
+ */const KM={Tab:9,Enter:13,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40};/*!
149
+ * Copyright (c) Microsoft Corporation. All rights reserved.
150
+ * Licensed under the MIT License.
151
+ */function qM(e,t){var r;const n=e.getParent;let i=t;do{const o=(r=ii(e,i))===null||r===void 0?void 0:r.uncontrolled;if(o&&e.uncontrolled.isUncontrolledCompletely(i,!!o.completely))return i;i=n(i)}while(i)}class Dt extends Zb{constructor(t,r){super(),this._init=()=>{const n=this._win(),i=n.document;i.addEventListener(Vn,this._onFocusIn,!0),i.addEventListener(Ro,this._onFocusOut,!0),n.addEventListener("keydown",this._onKeyDown,!0);const o=Le.getActiveElement(i);o&&o!==i.body&&this._setFocusedElement(o),this.subscribe(this._onChanged)},this._onFocusIn=n=>{const i=n.composedPath()[0];i&&this._setFocusedElement(i,n.detail.relatedTarget,n.detail.isFocusedProgrammatically)},this._onFocusOut=n=>{var i;this._setFocusedElement(void 0,(i=n.detail)===null||i===void 0?void 0:i.originalEvent.relatedTarget)},this._validateFocusedElement=n=>{},this._onKeyDown=n=>{if(n.keyCode!==KM.Tab||n.ctrlKey)return;const i=this.getVal();if(!i||!i.ownerDocument||i.contentEditable==="true")return;const o=this._tabster,a=o.controlTab,s=zr.getTabsterContext(o,i);if(!s||s.ignoreKeydown(n))return;const l=n.shiftKey,u=Dt.findNextTabbable(o,s,void 0,i,void 0,l,!0),d=s.root.getElement();if(!d)return;const p=u==null?void 0:u.element,h=qM(o,i);if(p){const m=u.uncontrolled;if(s.uncontrolled||Le.nodeContains(m,i)){if(!u.outOfDOMOrder&&m===s.uncontrolled||h&&!Le.nodeContains(h,p))return;zf.addPhantomDummyWithTarget(o,i,l,p);return}if(m||p.tagName==="IFRAME"){ia({by:"root",owner:d,next:p,relatedEvent:n})&&zf.moveWithPhantomDummy(this._tabster,m??p,!1,l,n);return}(a||u!=null&&u.outOfDOMOrder)&&ia({by:"root",owner:d,next:p,relatedEvent:n})&&(n.preventDefault(),n.stopImmediatePropagation(),Ci(p))}else!h&&ia({by:"root",owner:d,next:null,relatedEvent:n})&&s.root.moveOutWithDefaultAction(l,n)},this._onChanged=(n,i)=>{var o,a;if(n)na(n,EM,i);else{const s=(o=this._lastVal)===null||o===void 0?void 0:o.get();if(s){const l={...i},u=zr.getTabsterContext(this._tabster,s),d=(a=u==null?void 0:u.modalizer)===null||a===void 0?void 0:a.userId;d&&(l.modalizerId=d),na(s,_M,l)}}},this._tabster=t,this._win=r,t.queueInit(this._init)}dispose(){super.dispose();const t=this._win(),r=t.document;r.removeEventListener(Vn,this._onFocusIn,!0),r.removeEventListener(Ro,this._onFocusOut,!0),t.removeEventListener("keydown",this._onKeyDown,!0),this.unsubscribe(this._onChanged),delete Dt._lastResetElement,delete this._nextVal,delete this._lastVal}static forgetMemorized(t,r){var n,i;let o=Dt._lastResetElement,a=o&&o.get();a&&Le.nodeContains(r,a)&&delete Dt._lastResetElement,a=(i=(n=t._nextVal)===null||n===void 0?void 0:n.element)===null||i===void 0?void 0:i.get(),a&&Le.nodeContains(r,a)&&delete t._nextVal,o=t._lastVal,a=o&&o.get(),a&&Le.nodeContains(r,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&&!Wf(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:i,ignoreAccessibility:o}=r;let a;if(i){const s=zr.getTabsterContext(this._tabster,i);s&&(a=(n=Dt.findNextTabbable(this._tabster,s,i,void 0,void 0,!t,o))===null||n===void 0?void 0:n.element)}return a&&!Le.nodeContains(i,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"),Dt._lastResetElement=new On(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 i,o;if(this._tabster._noop)return;const a={relatedTarget:r};if(t){const l=(i=Dt._lastResetElement)===null||i===void 0?void 0:i.get();if(Dt._lastResetElement=void 0,l===t||Kb(t))return;a.isFocusedProgrammatically=n;const u=zr.getTabsterContext(this._tabster,t),d=(o=u==null?void 0:u.modalizer)===null||o===void 0?void 0:o.userId;d&&(a.modalizerId=d)}const s=this._nextVal={element:t?new On(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 On(this._win,t))}static findNextTabbable(t,r,n,i,o,a,s){const l=n||r.root.getElement();if(!l)return null;let u=null;const d=Dt._isTabbingTimer,p=t.getWindow();d&&p.clearTimeout(d),Dt.isTabbing=!0,Dt._isTabbingTimer=p.setTimeout(()=>{delete Dt._isTabbingTimer,Dt.isTabbing=!1},0);const h=r.modalizer,m=r.groupper,v=r.mover,y=w=>{if(u=w.findNextTabbable(i,o,a,s),i&&!(u!=null&&u.element)){const E=w!==h&&Le.getParentElement(w.getElement());if(E){const _=zr.getTabsterContext(t,i,{referenceElement:E});if(_){const S=w.getElement(),$=a?S:S&&Yb(S)||S;$&&(u=Dt.findNextTabbable(t,_,n,$,E,a,s),u&&(u.outOfDOMOrder=!0))}}}};if(m&&v)y(r.groupperBeforeMover?m:v);else if(m)y(m);else if(v)y(v);else if(h)y(h);else{const w={container:l,currentElement:i,referenceElement:o,ignoreAccessibility:s,useActiveModalizer:!0},E={};u={element:t.focusable[a?"findPrev":"findNext"](w,E),outOfDOMOrder:E.outOfDOMOrder,uncontrolled:E.uncontrolled}}return u}}Dt.isTabbing=!1;/*!
152
+ * Copyright (c) Microsoft Corporation. All rights reserved.
153
+ * Licensed under the MIT License.
154
+ */class YM extends Zb{constructor(t){super(),this._onChange=r=>{this.setVal(r,void 0)},this._keyborg=Cm(t()),this._keyborg.subscribe(this._onChange)}dispose(){super.dispose(),this._keyborg&&(this._keyborg.unsubscribe(this._onChange),jO(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())}}/*!
155
+ * Copyright (c) Microsoft Corporation. All rights reserved.
156
+ * Licensed under the MIT License.
157
+ */function JM(e,t,r,n){if(typeof MutationObserver>"u")return()=>{};const i=t.getWindow;let o;const a=d=>{var p,h,m,v,y;for(const w of d){const E=w.target,_=w.removedNodes,S=w.addedNodes;if(w.type==="attributes")w.attributeName===An&&r(t,E);else{for(let $=0;$<_.length;$++)s(_[$],!0),(h=(p=t._dummyObserver).domChanged)===null||h===void 0||h.call(p,E);for(let $=0;$<S.length;$++)s(S[$]),(v=(m=t._dummyObserver).domChanged)===null||v===void 0||v.call(m,E)}}(y=t.modalizer)===null||y===void 0||y.hiddenUpdate()};function s(d,p){o||(o=oi(i).elementByUId),l(d,p);const h=Gb(e,d,m=>l(m,p));if(h)for(;h.nextNode(););}function l(d,p){var h;if(!d.getAttribute)return NodeFilter.FILTER_SKIP;const m=d.__tabsterElementUID;return m&&o&&(p?delete o[m]:(h=o[m])!==null&&h!==void 0||(o[m]=new On(i,d))),(ii(t,d)||d.hasAttribute(An))&&r(t,d,p),NodeFilter.FILTER_SKIP}const u=Le.createMutationObserver(a);return n&&s(i().document.body),u.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[An]}),()=>{u.disconnect()}}/*!
158
+ * Copyright (c) Microsoft Corporation. All rights reserved.
159
+ * Licensed under the MIT License.
160
+ */class XM{constructor(t){this._isUncontrolledCompletely=t}isUncontrolledCompletely(t,r){var n;const i=(n=this._isUncontrolledCompletely)===null||n===void 0?void 0:n.call(this,t,r);return i===void 0?r:i}}/*!
161
+ * Copyright (c) Microsoft Corporation. All rights reserved.
162
+ * Licensed under the MIT License.
163
+ */class ZM{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 QM{constructor(t,r){var n,i;this._forgetMemorizedElements=[],this._wrappers=new Set,this._initQueue=[],this._version="6.0.0",this._noop=!1,this.getWindow=()=>{if(!this._win)throw new Error("Using disposed Tabster.");return this._win},this._storage=TM(t),this._win=t;const o=this.getWindow;r!=null&&r.DOMAPI&&CM({...r.DOMAPI}),this.keyboardNavigation=new YM(o),this.focusedElement=new Dt(this,o),this.focusable=new GM(this),this.root=new zr(this,r==null?void 0:r.autoRoot),this.uncontrolled=new XM((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(o),this.getParent=(i=r==null?void 0:r.getParent)!==null&&i!==void 0?i:Le.getParentNode,this.internal={stopObserver:()=>{this._unobserve&&(this._unobserve(),delete this._unobserve)},resumeObserver:a=>{if(!this._unobserve){const s=o().document;this._unobserve=JM(s,this,Wb,a)}}},Vb(o),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 ZM(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,i,o,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(),(i=this.groupper)===null||i===void 0||i.dispose(),(o=this.mover)===null||o===void 0||o.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(),PM(this.getWindow),qb(this.getWindow),this._storage=new WeakMap,this._wrappers.clear(),u&&(OM(u),delete u.__tabsterInstance,delete this._win)}storageEntry(t,r){const n=this._storage;let i=n.get(t);return i?r===!1&&Object.keys(i).length===0&&n.delete(t):r===!0&&(i={},n.set(t,i)),i}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())qb(this.getWindow,t),Dt.forgetMemorized(this.focusedElement,t)},0),Hb(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 eF(e,t){let r=rF(e);return r?r.createTabster(!1,t):(r=new QM(e,t),e.__tabsterInstance=r,r.createTabster())}function tF(e,t){e.core.disposeTabster(e,t)}function rF(e){return e.__tabsterInstance}const Qb=ve.createContext(void 0),nF={targetDocument:typeof document=="object"?document:void 0,dir:"ltr"};Qb.Provider;function e1(){var e;return(e=ve.useContext(Qb))!==null&&e!==void 0?e:nF}function iF(){return typeof window<"u"&&!!(window.document&&window.document.createElement)}const oF=iF()?ve.useLayoutEffect:ve.useEffect;function aF(e){return e&&!!e._virtual}function sF(e){return aF(e)&&e._virtual.parent||null}function lF(e,t={}){if(!e)return null;if(!t.skipVirtual){const n=sF(e);if(n)return n}const r=e.parentNode;return r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE?r.host:r}const cF=()=>{const{targetDocument:e}=e1(),t=(e==null?void 0:e.defaultView)||void 0,r=t==null?void 0:t.__tabsterShadowDOMAPI,n=ve.useMemo(()=>t?eF(t,{autoRoot:{},controlTab:!1,getParent:lF,checkUncontrolledTrappingFocus:i=>{var o;return!!(!((o=i.firstElementChild)===null||o===void 0)&&o.hasAttribute("data-is-focus-trap-zone-bumper"))},DOMAPI:r}):null,[t,r]);return oF(()=>()=>{n&&tF(n)},[n]),n},uF=()=>{const e=cF(),{targetDocument:t}=e1(),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]),i=ve.useCallback(s=>e==null?void 0:e.focusable.findLast({container:s}),[e]),o=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:i,findNextFocusable:o,findPrevFocusable:a}},Hf="Viewport",fF="ViewportViews",t1="ViewportView",[dF,fj]=kr(Hf,[]),[pF,hF]=dF(Hf),r1=({__viewportScope:e,classNames:t,children:r,defaultActiveView:n,activeView:i,focusManaged:o=!1,onActiveViewChange:a,...s})=>{const[l="never",u]=Kr({prop:i,defaultProp:n,onChange:a});return c.createElement(pF,{focusManaged:o,activeView:l,setActiveView:u,scope:e},c.createElement("div",{role:"region","aria-live":"polite",...s,className:ue("is-full overflow-hidden",t)},r))};r1.displayName=Hf;const n1=({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)};n1.displayName=fF;const i1=c.forwardRef(({__viewportScope:e,classNames:t,children:r,id:n,...i},o)=>{const{activeView:a,focusManaged:s}=hF(t1,e),l=n===a,u=Rl(o),{findFirstFocusable:d}=uF();return c.useEffect(()=>{var p;!s&&l&&document.body.hasAttribute("data-is-keyboard")&&u.current&&((p=d(u.current))==null||p.focus())},[s,u.current,l]),c.createElement("section",{...i,...!l&&{"aria-hidden":!0},className:ue("min-is-0 flex-1 flex flex-col",l?"order-2":"order-4 invisible",t),ref:u},r)});i1.displayName=t1;const ct={Root:r1,Views:n1,View:i1};c.forwardRef(({space:e,onClick:t},r)=>{const n=e.key.toHex(),i=St("identityListItem__label"),o=vs(n??"",12),a=e.properties.name??LD(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(Pt.Root,{labelId:i},c.createElement(Pt.Frame,null,c.createElement(Pt.Fallback,{href:o})),c.createElement(Pt.Label,{classNames:"text-sm truncate"},a)))});var Vf={exports:{}},Gf={},al={exports:{}},Kf={};/**
164
+ * @license React
165
+ * use-sync-external-store-shim.production.min.js
166
+ *
167
+ * Copyright (c) Facebook, Inc. and its affiliates.
168
+ *
169
+ * This source code is licensed under the MIT license found in the
170
+ * LICENSE file in the root directory of this source tree.
171
+ */var o1;function gF(){if(o1)return Kf;o1=1;var e=c;function t(p,h){return p===h&&(p!==0||1/p===1/h)||p!==p&&h!==h}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(p,h){var m=h(),v=n({inst:{value:m,getSnapshot:h}}),y=v[0].inst,w=v[1];return o(function(){y.value=m,y.getSnapshot=h,l(y)&&w({inst:y})},[p,m,h]),i(function(){return l(y)&&w({inst:y}),p(function(){l(y)&&w({inst:y})})},[p]),a(m),m}function l(p){var h=p.getSnapshot;p=p.value;try{var m=h();return!r(p,m)}catch{return!0}}function u(p,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Kf.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Kf}var qf={};/**
172
+ * @license React
173
+ * use-sync-external-store-shim.development.js
174
+ *
175
+ * Copyright (c) Facebook, Inc. and its affiliates.
176
+ *
177
+ * This source code is licensed under the MIT license found in the
178
+ * LICENSE file in the root directory of this source tree.
179
+ */var a1;function mF(){return a1||(a1=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(S){{for(var $=arguments.length,k=new Array($>1?$-1:0),P=1;P<$;P++)k[P-1]=arguments[P];n("error",S,k)}}function n(S,$,k){{var P=t.ReactDebugCurrentFrame,C=P.getStackAddendum();C!==""&&($+="%s",k=k.concat([C]));var T=k.map(function(D){return String(D)});T.unshift("Warning: "+$),Function.prototype.apply.call(console[S],console,T)}}function i(S,$){return S===$&&(S!==0||1/S===1/$)||S!==S&&$!==$}var o=typeof Object.is=="function"?Object.is:i,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,d=!1,p=!1;function h(S,$,k){d||e.startTransition!==void 0&&(d=!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 P=$();if(!p){var C=$();o(P,C)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}var T=a({inst:{value:P,getSnapshot:$}}),D=T[0].inst,j=T[1];return l(function(){D.value=P,D.getSnapshot=$,m(D)&&j({inst:D})},[S,P,$]),s(function(){m(D)&&j({inst:D});var F=function(){m(D)&&j({inst:D})};return S(F)},[S]),u(P),P}function m(S){var $=S.getSnapshot,k=S.value;try{var P=$();return!o(k,P)}catch{return!0}}function v(S,$,k){return $()}var y=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",w=!y,E=w?v:h,_=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:E;qf.useSyncExternalStore=_,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),qf}var s1;function l1(){return s1||(s1=1,process.env.NODE_ENV==="production"?al.exports=gF():al.exports=mF()),al.exports}/**
180
+ * @license React
181
+ * use-sync-external-store-shim/with-selector.production.min.js
182
+ *
183
+ * Copyright (c) Facebook, Inc. and its affiliates.
184
+ *
185
+ * This source code is licensed under the MIT license found in the
186
+ * LICENSE file in the root directory of this source tree.
187
+ */var c1;function vF(){if(c1)return Gf;c1=1;var e=c,t=l1();function r(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Gf.useSyncExternalStoreWithSelector=function(u,d,p,h,m){var v=o(null);if(v.current===null){var y={hasValue:!1,value:null};v.current=y}else y=v.current;v=s(function(){function E(P){if(!_){if(_=!0,S=P,P=h(P),m!==void 0&&y.hasValue){var C=y.value;if(m(C,P))return $=C}return $=P}if(C=$,n(S,P))return C;var T=h(P);return m!==void 0&&m(C,T)?C:(S=P,$=T)}var _=!1,S,$,k=p===void 0?null:p;return[function(){return E(d())},k===null?void 0:function(){return E(k())}]},[d,p,h,m]);var w=i(u,v[0],v[1]);return a(function(){y.hasValue=!0,y.value=w},[w]),l(w),w},Gf}var Yf={};/**
188
+ * @license React
189
+ * use-sync-external-store-shim/with-selector.development.js
190
+ *
191
+ * Copyright (c) Facebook, Inc. and its affiliates.
192
+ *
193
+ * This source code is licensed under the MIT license found in the
194
+ * LICENSE file in the root directory of this source tree.
195
+ */var u1;function yF(){return u1||(u1=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=l1();function r(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var n=typeof Object.is=="function"?Object.is:r,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(d,p,h,m,v){var y=o(null),w;y.current===null?(w={hasValue:!1,value:null},y.current=w):w=y.current;var E=s(function(){var k=!1,P,C,T=function(M){if(!k){k=!0,P=M;var Z=m(M);if(v!==void 0&&w.hasValue){var Y=w.value;if(v(Y,Z))return C=Y,Y}return C=Z,Z}var X=P,ne=C;if(n(X,M))return ne;var oe=m(M);return v!==void 0&&v(ne,oe)?ne:(P=M,C=oe,oe)},D=h===void 0?null:h,j=function(){return T(p())},F=D===null?void 0:function(){return T(D())};return[j,F]},[p,h,m,v]),_=E[0],S=E[1],$=i(d,_,S);return a(function(){w.hasValue=!0,w.value=$},[$]),l($),$}Yf.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Yf}process.env.NODE_ENV==="production"?Vf.exports=vF():Vf.exports=yF();var bF=Vf.exports;/*! *****************************************************************************
196
+ Copyright (c) Microsoft Corporation.
197
+
198
+ Permission to use, copy, modify, and/or distribute this software for any
199
+ purpose with or without fee is hereby granted.
200
+
201
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
202
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
203
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
204
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
205
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
206
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
207
+ PERFORMANCE OF THIS SOFTWARE.
208
+ ***************************************************************************** */var be=function(){return be=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},be.apply(this,arguments)};function Jf(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Ze(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 rt(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function bt(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}var pt;(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"})(pt||(pt={}));var Yi;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(Yi||(Yi={}));var Xf=pt.Start,Zf=pt.Stop,oa=pt.Raise,sl=pt.Send,f1=pt.Cancel,wF=pt.NullEvent,Qf=pt.Assign;pt.After,pt.DoneState;var d1=pt.Log,EF=pt.Init,ed=pt.Invoke;pt.ErrorExecution;var p1=pt.ErrorPlatform,_F=pt.ErrorCustom,h1=pt.Update,xF=pt.Choose,SF=pt.Pure,g1=".",m1={},td="xstate.guard",$F="",At=process.env.NODE_ENV==="production",ll;function rd(e,t,r){r===void 0&&(r=g1);var n=aa(e,r),i=aa(t,r);return nt(i)?nt(n)?i===n:!1:nt(n)?n in i:Object.keys(n).every(function(o){return o in i?rd(n[o],i[o]):!1})}function v1(e){try{return nt(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 nd(e,t){try{return Ji(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function CF(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function aa(e,t){if(CF(e))return e.value;if(Ji(e))return cl(e);if(typeof e!="string")return e;var r=nd(e,t);return cl(r)}function cl(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 sa(e,t){for(var r={},n=Object.keys(e),i=0;i<n.length;i++){var o=n[i];r[o]=t(e[o],o,e,i)}return r}function y1(e,t,r){var n,i,o={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];r(u)&&(o[l]=t(u,l,e))}}catch(d){n={error:d}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}var AF=function(e){return function(t){var r,n,i=t;try{for(var o=Ze(e),a=o.next();!a.done;a=o.next()){var s=a.value;i=i[s]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return i}};function OF(e,t){return function(r){var n,i,o=r;try{for(var a=Ze(e),s=a.next();!s.done;s=a.next()){var l=s.value;o=o[t][l]}}catch(u){n={error:u}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}}function ul(e){if(!e)return[[]];if(nt(e))return[[e]];var t=xt(Object.keys(e).map(function(r){var n=e[r];return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:ul(e[r]).map(function(i){return[r].concat(i)})}));return t}function xt(e){var t;return(t=[]).concat.apply(t,bt([],rt(e),!1))}function b1(e){return Ji(e)?e:[e]}function Sr(e){return e===void 0?[]:b1(e)}function fl(e,t,r){var n,i;if(ot(e))return e(t,r.data);var o={};try{for(var a=Ze(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];ot(u)?o[l]=u(t,r.data):o[l]=u}}catch(d){n={error:d}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o}function TF(e){return/^(done|error)\./.test(e)}function w1(e){return!!(e instanceof Promise||e!==null&&(ot(e)||typeof e=="object")&&ot(e.then))}function IF(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function PF(e,t){var r,n,i=rt([[],[]],2),o=i[0],a=i[1];try{for(var s=Ze(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?o.push(u):a.push(u)}}catch(d){r={error:d}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[o,a]}function E1(e,t){return sa(e.states,function(r,n){if(r){var i=(nt(t)?void 0:t[n])||(r?r.current:void 0);if(i)return{current:i,states:E1(r,i)}}})}function kF(e,t){return{current:t,states:E1(e,t)}}function _1(e,t,r,n){At||Ft(!!e,"Attempting to update undefined context");var i=e&&r.reduce(function(o,a){var s,l,u=a.assignment,d={state:n,action:a,_event:t},p={};if(ot(u))p=u(o,t.data,d);else try{for(var h=Ze(Object.keys(u)),m=h.next();!m.done;m=h.next()){var v=m.value,y=u[v];p[v]=ot(y)?y(o,t.data,d):y}}catch(w){s={error:w}}finally{try{m&&!m.done&&(l=h.return)&&l.call(h)}finally{if(s)throw s.error}}return Object.assign({},o,p)},e);return i}var Ft=function(){};At||(Ft=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 Ji(e){return Array.isArray(e)}function ot(e){return typeof e=="function"}function nt(e){return typeof e=="string"}function x1(e,t){if(e)return nt(e)?{type:td,name:e,predicate:t?t[e]:void 0}:ot(e)?{type:td,name:e.name,predicate:e}:e}function NF(e){try{return"subscribe"in e&&ot(e.subscribe)}catch{return!1}}var In=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();ll={},ll[In]=function(){return this},ll[Symbol.observable]=function(){return this};function ai(e){return!!e&&"__xstatenode"in e}function DF(e){return!!e&&typeof e.send=="function"}function dl(e,t){return nt(e)||typeof e=="number"?be({type:e},t):e}function Bt(e,t){if(!nt(e)&&"$$type"in e&&e.$$type==="scxml")return e;var r=dl(e);return be({name:r.type,data:r,$$type:"scxml",type:"external"},t)}function Xi(e,t){var r=b1(t).map(function(n){return typeof n>"u"||typeof n=="string"||ai(n)?{target:n,event:e}:be(be({},n),{event:e})});return r}function LF(e){if(!(e===void 0||e===$F))return Sr(e)}function MF(e,t,r){if(!At){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 i=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(i))}}}function S1(e,t,r,n,i){var o=e.options.guards,a={state:i,cond:t,_event:n};if(t.type===td)return((o==null?void 0:o[t.name])||t.predicate)(r,n.data,a);var s=o==null?void 0:o[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 $1(e){return typeof e=="string"?{type:e}:e}function pl(e,t,r){var n=function(){},i=typeof e=="object",o=i?e:null;return{next:((i?e.next:e)||n).bind(o),error:((i?e.error:t)||n).bind(o),complete:((i?e.complete:r)||n).bind(o)}}function hl(e,t){return"".concat(e,":invocation[").concat(t,"]")}function id(e){return(e.type===oa||e.type===sl&&e.to===Yi.Internal)&&typeof e.delay!="number"}var Zi=Bt({type:EF});function od(e,t){return t&&t[e]||void 0}function la(e,t){var r;if(nt(e)||typeof e=="number"){var n=od(e,t);ot(n)?r={type:e,exec:n}:n?r=n:r={type:e,exec:void 0}}else if(ot(e))r={type:e.name||e.toString(),exec:e};else{var n=od(e.type,t);if(ot(n))r=be(be({},e),{exec:n});else if(n){var i=n.type||e.type;r=be(be(be({},n),e),{type:i})}else r=e}return r}var Pn=function(e,t){if(!e)return[];var r=Ji(e)?e:[e];return r.map(function(n){return la(n,t)})};function ad(e){var t=la(e);return be(be({id:nt(e)?e:t.id},t),{type:t.type})}function FF(e,t){return{type:oa,event:typeof e=="function"?e:dl(e),delay:t?t.delay:void 0,id:t==null?void 0:t.id}}function BF(e,t,r,n){var i={_event:r},o=Bt(ot(e.event)?e.event(t,r.data,i):e.event),a;if(nt(e.delay)){var s=n&&n[e.delay];a=ot(s)?s(t,r.data,i):s}else a=ot(e.delay)?e.delay(t,r.data,i):e.delay;return be(be({},e),{type:oa,_event:o,delay:a})}function jF(e,t){return{to:t?t.to:void 0,type:sl,event:ot(e)?e:dl(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:ot(e)?e.name:v1(e)}}function RF(e,t,r,n){var i={_event:r},o=Bt(ot(e.event)?e.event(t,r.data,i):e.event),a;if(nt(e.delay)){var s=n&&n[e.delay];a=ot(s)?s(t,r.data,i):s}else a=ot(e.delay)?e.delay(t,r.data,i):e.delay;var l=ot(e.to)?e.to(t,r.data,i):e.to;return be(be({},e),{to:l,_event:o,event:o.data,delay:a})}var UF=function(e,t,r){return be(be({},e),{value:nt(e.expr)?e.expr:e.expr(t,r.data,{_event:r})})},WF=function(e){return{type:f1,sendId:e}};function zF(e){var t=ad(e);return{type:pt.Start,activity:t,exec:void 0}}function HF(e){var t=ot(e)?e:ad(e);return{type:pt.Stop,activity:t,exec:void 0}}function VF(e,t,r){var n=ot(e.activity)?e.activity(t,r.data):e.activity,i=typeof n=="string"?{id:n}:n,o={type:pt.Stop,activity:i};return o}var GF=function(e){return{type:Qf,assignment:e}};function KF(e,t){var r=t?"#".concat(t):"";return"".concat(pt.After,"(").concat(e,")").concat(r)}function gl(e,t){var r="".concat(pt.DoneState,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function ml(e,t){var r="".concat(pt.DoneInvoke,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function ca(e,t){var r="".concat(pt.ErrorPlatform,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}var qF=function(e){var t,r,n=[];try{for(var i=Ze(e),o=i.next();!o.done;o=i.next())for(var a=o.value,s=0;s<a.actions.length;){if(a.actions[s].type===Qf){n.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(l){t={error:l}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n};function vl(e,t,r,n,i,o,a){a===void 0&&(a=!1);var s=a?[]:qF(i),l=s.length?_1(r,n,s,t):r,u=a?[r]:void 0,d=[];function p(v,y){var w;switch(y.type){case oa:{var E=BF(y,l,n,e.options.delays);return o&&typeof E.delay=="number"&&o(E,l,n),E}case sl:var _=RF(y,l,n,e.options.delays);if(!At){var S=y.delay;Ft(!nt(S)||typeof _.delay=="number","No delay reference for delay expression '".concat(S,"' was found on machine '").concat(e.id,"'"))}return o&&_.to!==Yi.Internal&&(v==="entry"?d.push(_):o(_,l,n)),_;case d1:{var $=UF(y,l,n);return o==null||o($,l,n),$}case xF:{var k=y,P=(w=k.conds.find(function(oe){var ce=x1(oe.cond,e.options.guards);return!ce||S1(e,ce,l,n,o?void 0:t)}))===null||w===void 0?void 0:w.actions;if(!P)return[];var C=rt(vl(e,t,l,n,[{type:v,actions:Pn(Sr(P),e.options.actions)}],o,a),2),T=C[0],D=C[1];return l=D,u==null||u.push(l),T}case SF:{var P=y.get(l,n.data);if(!P)return[];var j=rt(vl(e,t,l,n,[{type:v,actions:Pn(Sr(P),e.options.actions)}],o,a),2),F=j[0],M=j[1];return l=M,u==null||u.push(l),F}case Zf:{var $=VF(y,l,n);return o==null||o($,r,n),$}case Qf:{l=_1(l,n,[y],o?void 0:t),u==null||u.push(l);break}default:var Z=la(y,e.options.actions),Y=Z.exec;if(o)o(Z,l,n);else if(Y&&u){var X=u.length-1,ne=be(be({},Z),{exec:function(oe){for(var ce=[],se=1;se<arguments.length;se++)ce[se-1]=arguments[se];Y.apply(void 0,bt([u[X]],rt(ce),!1))}});Z=ne}return Z}}function h(v){var y,w,E=[];try{for(var _=Ze(v.actions),S=_.next();!S.done;S=_.next()){var $=S.value,k=p(v.type,$);k&&(E=E.concat(k))}}catch(P){y={error:P}}finally{try{S&&!S.done&&(w=_.return)&&w.call(_)}finally{if(y)throw y.error}}return d.forEach(function(P){o(P,l,n)}),d.length=0,E}var m=xt(i.map(h));return[m,l]}var Qi=function(e,t){var r=t(e);return r};function C1(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[In]=function(){return this},t}function YF(e,t,r,n){var i,o=$1(e.src),a=(i=t==null?void 0:t.options.services)===null||i===void 0?void 0:i[o.type],s=e.data?fl(e.data,r,n):void 0,l=a?A1(a,e.id,s):C1(e.id);return l.meta=e,l}function A1(e,t,r){var n=C1(t);if(n.deferred=!0,ai(e)){var i=n.state=Qi(void 0,function(){return(r?e.withContext(r):e).initialState});n.getSnapshot=function(){return i}}return n}function JF(e){try{return typeof e.send=="function"}catch{return!1}}function XF(e){return JF(e)&&"id"in e}function ZF(e){var t;return be((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[In]=function(){return this},t),e)}var yl=function(e){return e.type==="atomic"||e.type==="final"};function O1(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function ua(e){return O1(e).filter(function(t){return t.type!=="history"})}function T1(e){var t=[e];return yl(e)?t:t.concat(xt(ua(e).map(T1)))}function fa(e,t){var r,n,i,o,a,s,l,u,d=new Set(e),p=sd(d),h=new Set(t);try{for(var m=Ze(h),v=m.next();!v.done;v=m.next())for(var y=v.value,w=y.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(D){r={error:D}}finally{try{v&&!v.done&&(n=m.return)&&n.call(m)}finally{if(r)throw r.error}}var E=sd(h);try{for(var _=Ze(h),S=_.next();!S.done;S=_.next()){var y=S.value;if(y.type==="compound"&&(!E.get(y)||!E.get(y).length))p.get(y)?p.get(y).forEach(function(j){return h.add(j)}):y.initialStateNodes.forEach(function(j){return h.add(j)});else if(y.type==="parallel")try{for(var $=(a=void 0,Ze(ua(y))),k=$.next();!k.done;k=$.next()){var P=k.value;h.has(P)||(h.add(P),p.get(P)?p.get(P).forEach(function(j){return h.add(j)}):P.initialStateNodes.forEach(function(j){return h.add(j)}))}}catch(j){a={error:j}}finally{try{k&&!k.done&&(s=$.return)&&s.call($)}finally{if(a)throw a.error}}}}catch(D){i={error:D}}finally{try{S&&!S.done&&(o=_.return)&&o.call(_)}finally{if(i)throw i.error}}try{for(var C=Ze(h),T=C.next();!T.done;T=C.next())for(var y=T.value,w=y.parent;w&&!h.has(w);)h.add(w),w=w.parent}catch(D){l={error:D}}finally{try{T&&!T.done&&(u=C.return)&&u.call(C)}finally{if(l)throw l.error}}return h}function I1(e,t){var r=t.get(e);if(!r)return{};if(e.type==="compound"){var n=r[0];if(n){if(yl(n))return n.key}else return{}}var i={};return r.forEach(function(o){i[o.key]=I1(o,t)}),i}function sd(e){var t,r,n=new Map;try{for(var i=Ze(e),o=i.next();!o.done;o=i.next()){var a=o.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{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function QF(e,t){var r=fa([e],t);return I1(e,sd(r))}function da(e,t){return Array.isArray(e)?e.some(function(r){return r===t}):e instanceof Set?e.has(t):!1}function e9(e){return bt([],rt(new Set(xt(bt([],rt(e.map(function(t){return t.ownEvents})),!1)))),!1)}function bl(e,t){return t.type==="compound"?ua(t).some(function(r){return r.type==="final"&&da(e,r)}):t.type==="parallel"?ua(t).every(function(r){return bl(e,r)}):!1}function t9(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(xt(e.map(function(t){return t.tags})))}function k1(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(nt(e)||nt(t))return e===t;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(i){return k1(e[i],t[i])})}function r9(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function n9(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=m1,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||m1,this.meta=t9(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 e9(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=Zi;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=Zi;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="."),nt(t))return[t];var i=Object.keys(t);return i.concat.apply(i,bt([],rt(i.map(function(o){return n.toStrings(t[o],r).map(function(a){return o+r+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var r=t.tags;t.machine;var n=Jf(t,["configuration","transitions","tags","machine"]);return be(be({},n),{tags:Array.from(r)})},e.prototype.matches=function(t){return rd(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var r;At&&Ft(!!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(i){return i.target!==void 0||i.actions.length})},e}(),i9={deferEvents:!1},N1=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=be(be({},i9),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}(),ld=new Map,o9=0,pa={bookId:function(){return"x:".concat(o9++)},register:function(e,t){return ld.set(e,t),e},get:function(e){return ld.get(e)},free:function(e){ld.delete(e)}};function cd(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;At||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 a9(){var e=cd();if(e&&"__xstate__"in e)return e.__xstate__}function s9(e){if(cd()){var t=a9();t&&t.register(e)}}function l9(e,t){t===void 0&&(t={});var r=e.initialState,n=new Set,i=[],o=!1,a=function(){if(!o){for(o=!0;i.length>0;){var u=i.shift();r=e.transition(r,u,l),n.forEach(function(d){return d.next(r)})}o=!1}},s=ZF({id:t.id,send:function(u){i.push(u),a()},getSnapshot:function(){return r},subscribe:function(u,d,p){var h=pl(u,d,p);return n.add(h),h.next(r),{unsubscribe:function(){n.delete(h)}}}}),l={parent:t.parent,self:s,id:t.id||"anonymous",observers:n};return r=e.start?e.start(l):r,s}var c9={sync:!1,autoForward:!1},$t;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})($t||($t={}));var u9=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=$t.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(d,p){if(Ji(d))return n.batch(d),n.state;var h=Bt(dl(d,p));if(n.status===$t.Stopped)return At||Ft(!1,'Event "'.concat(h.name,'" was sent to stopped service "').concat(n.machine.id,`". This service has already reached its final state, and will not transition.
209
+ Event: `).concat(JSON.stringify(h.data))),n.state;if(n.status!==$t.Running&&!n.options.deferEvents)throw new Error('Event "'.concat(h.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.
210
+ Event: `).concat(JSON.stringify(h.data)));return n.scheduler.schedule(function(){n.forward(h);var m=n._nextState(h);n.update(m,h)}),n._state},this.sendTo=function(d,p,h){var m=n.parent&&(p===Yi.Parent||n.parent.id===p),v=m?n.parent:nt(p)?p===Yi.Internal?n:n.children.get(p)||pa.get(p):DF(p)?p:void 0;if(!v){if(!m)throw new Error("Unable to send event to child '".concat(p,"' from service '").concat(n.id,"'."));At||Ft(!1,"Service '".concat(n.id,"' has no parent: unable to send event ").concat(d.type));return}if("machine"in v){if(n.status!==$t.Stopped||n.parent!==v||n.state.done){var y=be(be({},d),{name:d.name===_F?"".concat(ca(n.id)):d.name,origin:n.sessionId});!h&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([v,y]):v.send(y)}}else!h&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([v,d.data]):v.send(d.data)},this._exec=function(d,p,h,m){m===void 0&&(m=n.machine.options.actions);var v=d.exec||od(d.type,m),y=ot(v)?v:v?v.exec:d.exec;if(y)try{return y(p,h.data,n.machine.config.predictableActionArguments?{action:d,_event:h}:{action:d,state:n.state,_event:h})}catch(Y){throw n.parent&&n.parent.send({type:"xstate.error",data:Y}),Y}switch(d.type){case oa:{var w=d;n.defer(w);break}case sl:var E=d;if(typeof E.delay=="number"){n.defer(E);return}else E.to?n.sendTo(E._event,E.to,h===Zi):n.send(E._event);break;case f1:n.cancel(d.sendId);break;case Xf:{if(n.status!==$t.Running)return;var _=d.activity;if(!n.machine.config.predictableActionArguments&&!n.state.activities[_.id||_.type])break;if(_.type===pt.Invoke){var S=$1(_.src),$=n.machine.options.services?n.machine.options.services[S.type]:void 0,k=_.id,P=_.data;At||Ft(!("forward"in _),"`forward` property is deprecated (found in invocation of '".concat(_.src,"' in in machine '").concat(n.machine.id,"'). ")+"Please use `autoForward` instead.");var C="autoForward"in _?_.autoForward:!!_.forward;if(!$){At||Ft(!1,"No service found for invocation '".concat(_.src,"' in machine '").concat(n.machine.id,"'."));return}var T=P?fl(P,p,h):void 0;if(typeof $=="string")return;var D=ot($)?$(p,h.data,{data:T,src:S,meta:_.meta}):$;if(!D)return;var j=void 0;ai(D)&&(D=T?D.withContext(T):D,j={autoForward:C}),n.spawn(D,k,j)}else n.spawnActivity(_);break}case Zf:{n.stopChild(d.activity.id);break}case d1:var F=d,M=F.label,Z=F.value;M?n.logger(M,Z):n.logger(Z);break;default:At||Ft(!1,"No implementation found for action type '".concat(d.type,"'"));break}};var i=be(be({},e.defaultOptions),r),o=i.clock,a=i.logger,s=i.parent,l=i.id,u=l!==void 0?l:t.id;this.id=u,this.logger=a,this.clock=o,this.parent=s,this.options=i,this.scheduler=new N1({deferEvents:this.options.deferEvents}),this.sessionId=pa.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:Qi(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return At||Ft(this.status!==$t.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,i;try{for(var o=Ze(t.actions),a=o.next();!a.done;a=o.next()){var s=a.value;this.exec(s,t,r)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},e.prototype.update=function(t,r){var n,i,o,a,s,l,u,d,p=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||r===Zi)&&this.options.execute)this.execute(this.state);else for(var h=void 0;h=this._outgoingQueue.shift();)h[0].send(h[1]);if(this.children.forEach(function(D){p.state.children[D.id]=D}),this.devTools&&this.devTools.send(r.data,t),t.event)try{for(var m=Ze(this.eventListeners),v=m.next();!v.done;v=m.next()){var y=v.value;y(t.event)}}catch(D){n={error:D}}finally{try{v&&!v.done&&(i=m.return)&&i.call(m)}finally{if(n)throw n.error}}try{for(var w=Ze(this.listeners),E=w.next();!E.done;E=w.next()){var y=E.value;y(t,t.event)}}catch(D){o={error:D}}finally{try{E&&!E.done&&(a=w.return)&&a.call(w)}finally{if(o)throw o.error}}try{for(var _=Ze(this.contextListeners),S=_.next();!S.done;S=_.next()){var $=S.value;$(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(D){s={error:D}}finally{try{S&&!S.done&&(l=_.return)&&l.call(_)}finally{if(s)throw s.error}}if(this.state.done){var k=t.configuration.find(function(D){return D.type==="final"&&D.parent===p.machine}),P=k&&k.doneData?fl(k.doneData,t.context,r):void 0;this._doneEvent=ml(this.id,P);try{for(var C=Ze(this.doneListeners),T=C.next();!T.done;T=C.next()){var y=T.value;y(this._doneEvent)}}catch(D){u={error:D}}finally{try{T&&!T.done&&(d=C.return)&&d.call(C)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),pa.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===$t.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,r,n){var i=this,o=pl(t,r,n);this.listeners.add(o.next),this.status!==$t.NotStarted&&o.next(this.state);var a=function(){i.doneListeners.delete(a),i.stopListeners.delete(a),o.complete()};return this.status===$t.Stopped?o.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){i.listeners.delete(o.next),i.doneListeners.delete(a),i.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===$t.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===$t.Running)return this;this.machine._init(),pa.register(this.sessionId,this),this.initialized=!0,this.status=$t.Running;var n=t===void 0?this.initialState:Qi(this,function(){return r9(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,Zi)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){ot(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,r,n,i,o,a,s,l,u,d;try{for(var p=Ze(this.listeners),h=p.next();!h.done;h=p.next()){var m=h.value;this.listeners.delete(m)}}catch(C){t={error:C}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}try{for(var v=Ze(this.stopListeners),y=v.next();!y.done;y=v.next()){var m=y.value;m(),this.stopListeners.delete(m)}}catch(C){n={error:C}}finally{try{y&&!y.done&&(i=v.return)&&i.call(v)}finally{if(n)throw n.error}}try{for(var w=Ze(this.contextListeners),E=w.next();!E.done;E=w.next()){var m=E.value;this.contextListeners.delete(m)}}catch(C){o={error:C}}finally{try{E&&!E.done&&(a=w.return)&&a.call(w)}finally{if(o)throw o.error}}try{for(var _=Ze(this.doneListeners),S=_.next();!S.done;S=_.next()){var m=S.value;this.doneListeners.delete(m)}}catch(C){s={error:C}}finally{try{S&&!S.done&&(l=_.return)&&l.call(_)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=$t.Stopped,this._initialState=void 0;try{for(var $=Ze(Object.keys(this.delayedEventsMap)),k=$.next();!k.done;k=$.next()){var P=k.value;this.clock.clearTimeout(this.delayedEventsMap[P])}}catch(C){u={error:C}}finally{try{k&&!k.done&&(d=$.return)&&d.call($)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new N1({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,r=this.scheduler;return this._stop(),r.schedule(function(){var n=Bt({type:"xstate.stop"}),i=Qi(t,function(){var o=xt(bt([],rt(t.state.configuration),!1).sort(function(d,p){return p.order-d.order}).map(function(d){return Pn(d.onExit,t.machine.options.actions)})),a=rt(vl(t.machine,t.state,t.state.context,n,[{type:"exit",actions:o}],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(d){return!id(d)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(i,n),t._stopChildren(),pa.free(t.sessionId)}),this},e.prototype.batch=function(t){var r=this;if(this.status===$t.NotStarted&&this.options.deferEvents)At||Ft(!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.
211
+ Event: `).concat(JSON.stringify(event)));else if(this.status!==$t.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 i,o,a=r.state,s=!1,l=[],u=function(m){var v=Bt(m);r.forward(v),a=Qi(r,function(){return r.machine.transition(a,v,void 0,n||void 0)}),l.push.apply(l,bt([],rt(r.machine.config.predictableActionArguments?a.actions:a.actions.map(function(y){return n9(y,a)})),!1)),s=s||!!a.changed};try{for(var d=Ze(t),p=d.next();!p.done;p=d.next()){var h=p.value;u(h)}}catch(m){i={error:m}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}a.changed=s,a.actions=l,r.update(a,Bt(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 i=Bt(t);if(i.name.indexOf(p1)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(p1)===0}))throw i.data.data;var o=Qi(this,function(){return n.machine.transition(n.state,i,void 0,r||void 0)});return o},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var r,n;try{for(var i=Ze(this.forwardTo),o=i.next();!o.done;o=i.next()){var a=o.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{o&&!o.done&&(n=i.return)&&n.call(i)}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),ot(r.stop)&&r.stop())},e.prototype.spawn=function(t,r,n){if(this.status!==$t.Running)return A1(t,r);if(w1(t))return this.spawnPromise(Promise.resolve(t),r);if(ot(t))return this.spawnCallback(t,r);if(XF(t))return this.spawnActor(t,r);if(NF(t))return this.spawnObservable(t,r);if(ai(t))return this.spawnMachine(t,be(be({},n),{id:r}));if(IF(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 i=new e(t,be(be({},this.options),{parent:this,id:r.id||t.id})),o=be(be({},c9),r);o.sync&&i.onTransition(function(s){n.send(h1,{state:s,id:i.id})});var a=i;return this.children.set(i.id,a),o.autoForward&&this.forwardTo.add(i.id),i.onDone(function(s){n.removeChild(i.id),n.send(Bt(s,{origin:i.id}))}).start(),a},e.prototype.spawnBehavior=function(t,r){var n=l9(t,{id:r,parent:this});return this.children.set(r,n),n},e.prototype.spawnPromise=function(t,r){var n,i=this,o=!1,a;t.then(function(l){o||(a=l,i.removeChild(r),i.send(Bt(ml(r,l),{origin:r})))},function(l){if(!o){i.removeChild(r);var u=ca(r,l);try{i.send(Bt(u,{origin:r}))}catch(d){MF(l,d,r),i.devTools&&i.devTools.send(u,i.state),i.machine.strict&&i.stop()}}});var s=(n={id:r,send:function(){},subscribe:function(l,u,d){var p=pl(l,u,d),h=!1;return t.then(function(m){h||(p.next(m),!h&&p.complete())},function(m){h||p.error(m)}),{unsubscribe:function(){return h=!0}}},stop:function(){o=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return a}},n[In]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnCallback=function(t,r){var n,i=this,o=!1,a=new Set,s=new Set,l,u=function(h){l=h,s.forEach(function(m){return m(h)}),!o&&i.send(Bt(h,{origin:r}))},d;try{d=t(u,function(h){a.add(h)})}catch(h){this.send(ca(r,h))}if(w1(d))return this.spawnPromise(d,r);var p=(n={id:r,send:function(h){return a.forEach(function(m){return m(h)})},subscribe:function(h){var m=pl(h);return s.add(m.next),{unsubscribe:function(){s.delete(m.next)}}},stop:function(){o=!0,ot(d)&&d()},toJSON:function(){return{id:r}},getSnapshot:function(){return l}},n[In]=function(){return this},n);return this.children.set(r,p),p},e.prototype.spawnObservable=function(t,r){var n,i=this,o,a=t.subscribe(function(l){o=l,i.send(Bt(l,{origin:r}))},function(l){i.removeChild(r),i.send(Bt(ca(r,l),{origin:r}))},function(){i.removeChild(r),i.send(Bt(ml(r),{origin:r}))}),s=(n={id:r,send:function(){},subscribe:function(l,u,d){return t.subscribe(l,u,d)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return o},toJSON:function(){return{id:r}}},n[In]=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){At||Ft(!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[In]=function(){return this},n))},e.prototype.attachDev=function(){var t=cd();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)}s9(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[In]=function(){return this},e.prototype.getSnapshot=function(){return this.status===$t.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=D1,e}();function D1(e,t){var r=new u9(e,t);return r}function f9(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function wl(e){return be(be({type:ed},e),{toJSON:function(){e.onDone,e.onError;var t=Jf(e,["onDone","onError"]);return be(be({},t),{type:ed,src:f9(e.src)})}})}var eo="",ud="#",ha="*",to={},ro=function(e){return e[0]===ud},d9=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},p9=function(e,t,r){var n=r.slice(0,-1).some(function(o){return!("cond"in o)&&!("in"in o)&&(nt(o.target)||ai(o.target))}),i=t===eo?"the transient event":"event '".concat(t,"'");Ft(!n,"One or more transitions for ".concat(i," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},h9=function(){function e(t,r,n,i){n===void 0&&(n="context"in t?t.context:void 0);var o=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(d9(),r),this.parent=i==null?void 0:i.parent,this.key=this.config.key||(i==null?void 0:i.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:g1),this.id=this.config.id||bt([this.machine.key],rt(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,At||Ft(!("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?sa(this.config.states,function(u,d){var p,h=new e(u,{},void 0,{parent:o,key:d});return Object.assign(o.idMap,be((p={},p[h.id]=h,p),h.idMap)),h}):to;var s=0;function l(u){var d,p;u.order=s++;try{for(var h=Ze(O1(u)),m=h.next();!m.done;m=h.next()){var v=m.value;l(v)}}catch(y){d={error:y}}finally{try{m&&!m.done&&(p=h.return)&&p.call(h)}finally{if(d)throw d.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 d=u.event;return d===eo}):eo in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=Sr(this.config.entry||this.config.onEntry).map(function(u){return la(u)}),this.onExit=Sr(this.config.exit||this.config.onExit).map(function(u){return la(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,d){var p,h;if(ai(u)){var m=hl(o.id,d);return o.machine.options.services=be((p={},p[m]=u,p),o.machine.options.services),wl({src:m,id:m})}else if(nt(u.src)){var m=u.id||hl(o.id,d);return wl(be(be({},u),{id:m,src:u.src}))}else if(ai(u.src)||ot(u.src)){var m=u.id||hl(o.id,d);return o.machine.options.services=be((h={},h[m]=u.src,h),o.machine.options.services),wl(be(be({id:m},u),{src:m}))}else{var v=u.src;return wl(be(be({id:hl(o.id,d)},u),{src:v}))}}),this.activities=Sr(this.config.activities).concat(this.invoke).map(function(u){return ad(u)}),this.transition=this.transition.bind(this),this.tags=Sr(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||T1(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,r){var n=this.options,i=n.actions,o=n.activities,a=n.guards,s=n.services,l=n.delays;return new e(this.config,{actions:be(be({},i),t.actions),activities:be(be({},o),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 ot(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:sa(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===eo,n=this.transitions.filter(function(i){var o=i.eventType===t;return r?o:o||i.eventType===ha});return this.__cache.candidates[t]=n,n},e.prototype.getDelayedTransitions=function(){var t=this,r=this.config.after;if(!r)return[];var n=function(o,a){var s=ot(o)?"".concat(t.id,":delay[").concat(a,"]"):o,l=KF(s,t.id);return t.onEntry.push(jF(l,{delay:o})),t.onExit.push(WF(l)),l},i=Ji(r)?r.map(function(o,a){var s=n(o.delay,a);return be(be({},o),{event:s})}):xt(Object.keys(r).map(function(o,a){var s=r[o],l=nt(s)?{target:s}:s,u=isNaN(+o)?o:+o,d=n(u,a);return Sr(l).map(function(p){return be(be({},p),{event:d,delay:u})})}));return i.map(function(o){var a=o.delay;return be(be({},t.formatTransition(o)),{delay:a})})},e.prototype.getStateNodes=function(t){var r,n=this;if(!t)return[];var i=t instanceof dr?t.value:aa(t,this.delimiter);if(nt(i)){var o=this.getStateNode(i).initial;return o!==void 0?this.getStateNodes((r={},r[i]=o,r)):[this,this.states[i]]}var a=Object.keys(i),s=[this];return s.push.apply(s,bt([],rt(xt(a.map(function(l){return n.getStateNode(l).getStateNodes(i[l])}))),!1)),s},e.prototype.handles=function(t){var r=v1(t);return this.events.includes(r)},e.prototype.resolveState=function(t){var r=t instanceof dr?t:dr.create(t),n=Array.from(fa([],this.getStateNodes(r.value)));return new dr(be(be({},r),{value:this.resolve(r.value),configuration:n,done:bl(n,this),tags:P1(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,r,n){var i=this.getStateNode(t),o=i.next(r,n);return!o||!o.transitions.length?this.next(r,n):o},e.prototype.transitionCompoundNode=function(t,r,n){var i=Object.keys(t),o=this.getStateNode(i[0]),a=o._transition(t[i[0]],r,n);return!a||!a.transitions.length?this.next(r,n):a},e.prototype.transitionParallelNode=function(t,r,n){var i,o,a={};try{for(var s=Ze(Object.keys(t)),l=s.next();!l.done;l=s.next()){var u=l.value,d=t[u];if(d){var p=this.getStateNode(u),h=p._transition(d,r,n);h&&(a[u]=h)}}}catch(E){i={error:E}}finally{try{l&&!l.done&&(o=s.return)&&o.call(s)}finally{if(i)throw i.error}}var m=Object.keys(a).map(function(E){return a[E]}),v=xt(m.map(function(E){return E.transitions})),y=m.some(function(E){return E.transitions.length>0});if(!y)return this.next(r,n);var w=xt(Object.keys(a).map(function(E){return a[E].configuration}));return{transitions:v,exitSet:xt(m.map(function(E){return E.exitSet})),configuration:w,source:r,actions:xt(Object.keys(a).map(function(E){return a[E].actions}))}},e.prototype._transition=function(t,r,n){return nt(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,Bt(r))},e.prototype.next=function(t,r){var n,i,o=this,a=r.name,s=[],l=[],u;try{for(var d=Ze(this.getCandidates(a)),p=d.next();!p.done;p=d.next()){var h=p.value,m=h.cond,v=h.in,y=t.context,w=v?nt(v)&&ro(v)?t.matches(aa(this.getStateNodeById(v).path,this.delimiter)):rd(aa(v,this.delimiter),AF(this.path.slice(0,-2))(t.value)):!0,E=!1;try{E=!m||S1(this.machine,m,y,r,t)}catch($){throw new Error("Unable to evaluate guard '".concat(m.name||m.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
212
+ `).concat($.message))}if(E&&w){h.target!==void 0&&(l=h.target),s.push.apply(s,bt([],rt(h.actions),!1)),u=h;break}}}catch($){n={error:$}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(n)throw n.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var _=xt(l.map(function($){return o.getRelativeStateNodes($,t.historyValue)})),S=!!u.internal;return{transitions:[u],exitSet:S?[]:xt(l.map(function($){return o.getPotentiallyReenteringNodes($)})),configuration:_,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var r=[],n=this,i=t;n&&n!==i;)r.push(n),n=n.parent;return n!==i?[]:(r.push(i),r)},e.prototype.getActions=function(t,r,n,i,o,a,s){var l,u,d,p,h=this,m=a?fa([],this.getStateNodes(a.value)):[],v=new Set;try{for(var y=Ze(Array.from(t).sort(function(F,M){return F.order-M.order})),w=y.next();!w.done;w=y.next()){var E=w.value;(!da(m,E)||da(n.exitSet,E)||E.parent&&v.has(E.parent))&&v.add(E)}}catch(F){l={error:F}}finally{try{w&&!w.done&&(u=y.return)&&u.call(y)}finally{if(l)throw l.error}}try{for(var _=Ze(m),S=_.next();!S.done;S=_.next()){var E=S.value;(!da(t,E)||da(n.exitSet,E.parent))&&n.exitSet.push(E)}}catch(F){d={error:F}}finally{try{S&&!S.done&&(p=_.return)&&p.call(_)}finally{if(d)throw d.error}}n.exitSet.sort(function(F,M){return M.order-F.order});var $=Array.from(v).sort(function(F,M){return F.order-M.order}),k=new Set(n.exitSet),P=xt($.map(function(F){var M=[];if(F.type!=="final")return M;var Z=F.parent;if(!Z.parent)return M;M.push(gl(F.id,F.doneData),gl(Z.id,F.doneData?fl(F.doneData,i,o):void 0));var Y=Z.parent;return Y.type==="parallel"&&ua(Y).every(function(X){return bl(n.configuration,X)})&&M.push(gl(Y.id)),M})),C=$.map(function(F){var M=F.onEntry,Z=F.activities.map(function(Y){return zF(Y)});return{type:"entry",actions:Pn(s?bt(bt([],rt(M),!1),rt(Z),!1):bt(bt([],rt(Z),!1),rt(M),!1),h.machine.options.actions)}}).concat({type:"state_done",actions:P.map(function(F){return FF(F)})}),T=Array.from(k).map(function(F){return{type:"exit",actions:Pn(bt(bt([],rt(F.onExit),!1),rt(F.activities.map(function(M){return HF(M)})),!1),h.machine.options.actions)}}),D=T.concat({type:"transition",actions:Pn(n.actions,this.machine.options.actions)}).concat(C);if(r){var j=Pn(xt(bt([],rt(t),!1).sort(function(F,M){return M.order-F.order}).map(function(F){return F.onExit})),this.machine.options.actions).filter(function(F){return!id(F)});return D.concat({type:"stop",actions:j})}return D},e.prototype.transition=function(t,r,n,i){t===void 0&&(t=this.initialState);var o=Bt(r),a;if(t instanceof dr)a=n===void 0?t:this.resolveState(dr.from(t,n));else{var s=nt(t)?this.resolve(cl(this.getResolvedPath(t))):this.resolve(t),l=n??this.machine.context;a=this.resolveState(dr.from(s,l))}if(!At&&o.name===ha)throw new Error("An event cannot have the wildcard type ('".concat(ha,"')"));if(this.strict&&!this.events.includes(o.name)&&!TF(o.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(o.name,"'"));var u=this._transition(a.value,a,o)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},d=fa([],this.getStateNodes(a.value)),p=u.configuration.length?fa(d,u.configuration):d;return u.configuration=bt([],rt(p),!1),this.resolveTransition(u,a,a.context,i,o)},e.prototype.resolveRaisedTransition=function(t,r,n,i){var o,a=t.actions;return t=this.transition(t,r,void 0,i),t._event=n,t.event=n.data,(o=t.actions).unshift.apply(o,bt([],rt(a),!1)),t},e.prototype.resolveTransition=function(t,r,n,i,o){var a,s,l,u,d=this;o===void 0&&(o=Zi);var p=t.configuration,h=!r||t.transitions.length>0,m=h?t.configuration:r?r.configuration:[],v=bl(m,this),y=h?QF(this.machine,p):void 0,w=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):void 0:void 0,E=this.getActions(new Set(m),v,t,n,o,r,i),_=r?be({},r.activities):{};try{for(var S=Ze(E),$=S.next();!$.done;$=S.next()){var k=$.value;try{for(var P=(l=void 0,Ze(k.actions)),C=P.next();!C.done;C=P.next()){var T=C.value;T.type===Xf?_[T.activity.id||T.activity.type]=T:T.type===Zf&&(_[T.activity.id||T.activity.type]=!1)}}catch(re){l={error:re}}finally{try{C&&!C.done&&(u=P.return)&&u.call(P)}finally{if(l)throw l.error}}}}catch(re){a={error:re}}finally{try{$&&!$.done&&(s=S.return)&&s.call(S)}finally{if(a)throw a.error}}var D=rt(vl(this,r,n,o,E,i,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),j=D[0],F=D[1],M=rt(PF(j,id),2),Z=M[0],Y=M[1],X=j.filter(function(re){var de;return re.type===Xf&&((de=re.activity)===null||de===void 0?void 0:de.type)===ed}),ne=X.reduce(function(re,de){return re[de.activity.id]=YF(de.activity,d.machine,F,o),re},r?be({},r.children):{}),oe=new dr({value:y||r.value,context:F,_event:o,_sessionid:r?r._sessionid:null,historyValue:y?w?kF(w,y):void 0:r?r.historyValue:void 0,history:!y||t.source?r:void 0,actions:y?Y:[],activities:y?_:r?r.activities:{},events:[],configuration:m,transitions:t.transitions,children:ne,done:v,tags:P1(m),machine:this}),ce=n!==F;oe.changed=o.name===h1||ce;var se=oe.history;se&&delete se.history;var ge=!v&&(this._transient||p.some(function(re){return re._transient}));if(!h&&(!ge||o.name===eo))return oe;var le=oe;if(!v)for(ge&&(le=this.resolveRaisedTransition(le,{type:wF},o,i));Z.length;){var V=Z.shift();le=this.resolveRaisedTransition(le,V._event,o,i)}var J=le.changed||(se?!!le.actions.length||ce||typeof se.value!=typeof le.value||!k1(le.value,se.value):void 0);return le.changed=J,le.history=se,le},e.prototype.getStateNode=function(t){if(ro(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=ro(t)?t.slice(ud.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"&&ro(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var r=nd(t,this.delimiter).slice(),n=this;r.length;){var i=r.shift();if(!i.length)break;n=n.getStateNode(i)}return n},e.prototype.resolve=function(t){var r,n=this;if(!t)return this.initialStateValue||to;switch(this.type){case"parallel":return sa(this.initialStateValue,function(o,a){return o?n.getStateNode(a).resolve(t[a]||o):to});case"compound":if(nt(t)){var i=this.getStateNode(t);return i.type==="parallel"||i.type==="compound"?(r={},r[t]=i.initialStateValue,r):t}return Object.keys(t).length?sa(t,function(o,a){return o?n.getStateNode(a).resolve(o):to}):this.initialStateValue||{};default:return t||to}},e.prototype.getResolvedPath=function(t){if(ro(t)){var r=this.machine.idMap[t.slice(ud.length)];if(!r)throw new Error("Unable to find state node '".concat(t,"'"));return r.path}return nd(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=y1(this.states,function(n){return n.initialStateValue||to},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=yl(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;nt(r.target)?t=ro(r.target)?cl(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(yl(this))return[this];if(this.type==="compound"&&!this.initial)return At||Ft(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var r=ul(this.initialStateValue);return xt(r.map(function(n){return t.getFromRelativePath(n)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var r=rt(t),n=r[0],i=r.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var o=this.getStateNode(n);if(o.type==="history")return o.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(i)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:y1(this.states,function(r,n){if(!t)return r.historyValue();var i=nt(t)?void 0:t[n];return r.historyValue(i||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 i=this.target;return i?xt(ul(i).map(function(a){return n.getFromRelativePath(a)})):n.initialStateNodes}var o=OF(n.path,"states")(t).current;return nt(o)?[n.getStateNode(o)]:xt(ul(o).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=xt(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,i;if(this.__cache.events)return this.__cache.events;var o=this.states,a=new Set(this.ownEvents);if(o)try{for(var s=Ze(Object.keys(o)),l=s.next();!l.done;l=s.next()){var u=l.value,d=o[u];if(d.states)try{for(var p=(n=void 0,Ze(d.events)),h=p.next();!h.done;h=p.next()){var m=h.value;a.add("".concat(m))}}catch(v){n={error:v}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}}}catch(v){t={error:v}}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(!nt(n))return n;var i=n[0]===r.delimiter;if(i&&!r.parent)return r.getStateNodeByPath(n.slice(1));var o=i?r.key+n:n;if(r.parent)try{var a=r.parent.getStateNodeByPath(o);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(r.id,`':
213
+ `).concat(s.message))}else return r.getStateNodeByPath(o)})},e.prototype.formatTransition=function(t){var r=this,n=LF(t.target),i="internal"in t?t.internal:n?n.some(function(l){return nt(l)&&l[0]===r.delimiter}):!0,o=this.machine.options.guards,a=this.resolveTarget(n),s=be(be({},t),{actions:Pn(Sr(t.actions)),cond:x1(t.cond,o),target:a,source:this,internal:i,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,i;if(!this.config.on)i=[];else if(Array.isArray(this.config.on))i=this.config.on;else{var o=this.config.on,a=ha,s=o[a],l=s===void 0?[]:s,u=Jf(o,[typeof a=="symbol"?a:a+""]);i=xt(Object.keys(u).map(function(_){!At&&_===eo&&Ft(!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 S=Xi(_,u[_]);return At||p9(n,_,S),S}).concat(Xi(ha,l)))}var d=this.config.always?Xi("",this.config.always):[],p=this.config.onDone?Xi(String(gl(this.id)),this.config.onDone):[];At||Ft(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var h=xt(this.invoke.map(function(_){var S=[];return _.onDone&&S.push.apply(S,bt([],rt(Xi(String(ml(_.id)),_.onDone)),!1)),_.onError&&S.push.apply(S,bt([],rt(Xi(String(ca(_.id)),_.onError)),!1)),S})),m=this.after,v=xt(bt(bt(bt(bt([],rt(p),!1),rt(h),!1),rt(i),!1),rt(d),!1).map(function(_){return Sr(_).map(function(S){return n.formatTransition(S)})}));try{for(var y=Ze(m),w=y.next();!w.done;w=y.next()){var E=w.value;v.push(E)}}catch(_){t={error:_}}finally{try{w&&!w.done&&(r=y.return)&&r.call(y)}finally{if(t)throw t.error}}return v},e}(),L1=!1;function fd(e,t){return!At&&!("predictableActionArguments"in e)&&!L1&&(L1=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new h9(e,t)}var Yt=GF,g9=c.useLayoutEffect;function M1(e){var t=ve.useRef();return t.current||(t.current={v:e()}),t.current.v}var El=function(){return El=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},El.apply(this,arguments)},m9=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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r},v9=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function y9(e,t){var r=M1(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var n=v9(c.useState(r),1),i=n[0];e!==i&&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 o=t.context,a=t.guards,s=t.actions,l=t.activities,u=t.services,d=t.delays;t.state;var p=m9(t,["context","guards","actions","activities","services","delays","state"]),h=M1(function(){var m={context:o,guards:a,actions:s,activities:l,services:u,delays:d},v=r.withConfig(m,function(){return El(El({},r.context),o)});return D1(v,p)});return g9(function(){Object.assign(h.machine.options.actions,s),Object.assign(h.machine.options.guards,a),Object.assign(h.machine.options.activities,l),Object.assign(h.machine.options.services,u),Object.assign(h.machine.options.delays,d)},[s,a,l,u,d]),h}function b9(e,t,r){if(e.status===$t.NotStarted)return!0;var n=r.changed===void 0&&(Object.keys(r.children).length>0||typeof t.changed=="boolean");return!(r.changed||n)}var w9=function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o};function E9(e){return e}function dd(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=w9(t,1),i=n[0],o=i===void 0?{}:i,a=y9(e,o),s=c.useCallback(function(){return a.status===$t.NotStarted?o.state?dr.create(o.state):a.machine.initialState:a.getSnapshot()},[a]),l=c.useCallback(function(p,h){return b9(a,p,h)},[a]),u=c.useCallback(function(p){var h=a.subscribe(p).unsubscribe;return h},[a]),d=bF.useSyncExternalStoreWithSelector(u,s,s,E9,l);return c.useEffect(function(){var p=o.state;return a.start(p?dr.create(p):void 0),function(){a.stop(),a.status=$t.NotStarted}},[]),[d,a.send,a]}const _9=fd({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:Yt({identity:(e,t)=>(t==null?void 0:t.identity)??null}),setInvitation:Yt({invitation:(e,t)=>(t==null?void 0:t.invitation)??null}),unsetInvitation:Yt({invitation:()=>{}}),log:(e,t)=>{tt("[transition]",{event:t,context:e})}}}),x9=(e,t)=>dd(_9,{...t,context:{...t==null?void 0:t.context,identity:e.halo.identity.get(),identitySubscribable:e.halo.identity.map(r=>({type:"setIdentity",identity:r}))}}),S9=e=>{const{active:t,onAgentCreate:r,onAgentDestroy:n,send:i,validationMessage:o,agentStatus:a,agentActive:s,agentProviderDisabled:l}=e,u=!t,{t:d}=it("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(ra,{validationMessage:o,label:c.createElement(xr,null,"Agent Status"),disabled:u,"data-testid":"agent-status",value:a})),c.createElement(qt,null,c.createElement(lt,{disabled:s||l,onClick:()=>r==null?void 0:r(),"data-testid":"create-agent"},"Create Agent"),c.createElement(lt,{disabled:!s||l,onClick:()=>n==null?void 0:n(),"data-testid":"destroy-agent"},"Destroy Agent"),c.createElement(lt,{disabled:u,onClick:()=>i==null?void 0:i({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},d("back label"))))},$9=({devices:e,active:t,send:r})=>{const{t:n}=it("os"),i=!t;return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow"},c.createElement(b4,{devices:e})),c.createElement(qt,null,c.createElement(lt,{variant:"ghost",disabled:i,onClick:()=>r==null?void 0:r({type:"unchooseAction"}),"data-testid":"manage-devices-back"},n("back label"))))},C9=e=>{const{send:t}=e,r=Ke.useClient(),n=vo.useHaloInvitations(),i=c.useCallback(a=>{const s=ln.InvitationEncoder.encode(a);a.state===we.State.CONNECTING&&console.log(JSON.stringify({invitationCode:s,authCode:a.authCode}))},[]),o=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(i),t==null||t({type:"selectInvitation",invitation:l})};return c.createElement(A9,{...e,onCreateInvitationClick:a=>o(a)})},A9=({onCreateInvitationClick:e,active:t,send:r,onDone:n,doneActionParent:i})=>{const{t:o}=it("os");return c.createElement("div",{role:"none",className:"grow flex flex-col gap-1"},c.createElement(Oi,{density:"coarse"},c.createElement("div",{className:"grow justify-center flex flex-col gap-1"},c.createElement(lt,{"data-testid":"manage-agent",onClick:()=>r==null?void 0:r({type:"chooseAgent"}),classNames:"plb-4"},c.createElement(Ye.HardDrive,{className:qe(6)}),c.createElement("span",{className:"grow mli-3"},"Manage Agent"),c.createElement(Ye.CaretRight,{weight:"bold",className:qe(4)})),c.createElement(lt,{disabled:!t,"data-testid":"devices-panel.create-invitation",onClick:e,classNames:"plb-4"},c.createElement(Ye.Plus,{className:qe(6)}),c.createElement("span",{className:"grow mli-3"},o("choose add device label")),c.createElement(Ye.CaretRight,{weight:"bold",className:qe(4)})),c.createElement(lt,{"data-testid":"manage-devices",onClick:()=>r==null?void 0:r({type:"chooseDevices"}),classNames:"plb-4"},c.createElement(Ye.Devices,{className:qe(6)}),c.createElement("span",{className:"grow mli-3"},o("choose devices label")),c.createElement(Ye.CaretRight,{weight:"bold",className:qe(4)})),c.createElement(lt,{"data-testid":"manage-profile",onClick:()=>r==null?void 0:r({type:"chooseProfile"}),classNames:"plb-4"},c.createElement(Ye.UserGear,{className:qe(6)}),c.createElement("span",{className:"grow mli-3"},o("choose profile label")),c.createElement(Ye.CaretRight,{weight:"bold",className:qe(4)})),c.createElement(lt,{"data-testid":"devices-panel.sign-out",onClick:()=>r==null?void 0:r({type:"chooseSignOut"}),classNames:"plb-4"},c.createElement(Ye.Power,{className:qe(6)}),c.createElement("span",{className:"grow mli-3"},o("choose sign out label")),c.createElement(Ye.CaretRight,{weight:"bold",className:qe(4)})))))},O9=e=>{const{onUpdateProfile:t}=e,{t:r}=it("os"),[n,i]=c.useState(""),o=async a=>{await(t==null?void 0:t(a).catch(s=>{tt.catch(s),i(r("failed to update profile message"))}))};return c.createElement(T9,{...e,onUpdateProfile:o,validationMessage:n})},T9=e=>{const{active:t,profile:r,send:n,onUpdateProfile:i,validationMessage:o}=e,a=!t,{t:s}=it("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(ra,{validationMessage:o,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:d}})=>u(d),onKeyDown:({key:d})=>d==="Enter"&&(i==null?void 0:i({displayName:l}))})),c.createElement(qt,null,c.createElement(lt,{variant:"ghost",disabled:a,onClick:()=>n==null?void 0:n({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},s("back label")),c.createElement(lt,{variant:"primary",disabled:a,onClick:()=>i==null?void 0:i({displayName:l}),"data-testid":"update-profile-form-continue"},s("done label"))))},I9=e=>{const{t}=it("os"),r=()=>{var n;window.confirm(t("reset device confirm message"))&&((n=e.onResetDevice)==null||n.call(e))};return c.createElement(P9,{disabled:!e.active,onBack:()=>{var n;return(n=e.send)==null?void 0:n.call(e,{type:"unchooseAction"})},onResetDevice:r,onJoinNewIdentity:e.onJoinNewIdentity})},P9=({disabled:e,onResetDevice:t,onJoinNewIdentity:r,onBack:n})=>{const{t:i}=it("os");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Qc.Root,{valence:"error"},c.createElement(Qc.Title,null,c.createElement(Ye.Warning,{className:ue(qe(6),"inline mie-2")}),i("sign out chooser title")),c.createElement(Qc.Body,null,i("sign out chooser message")))),c.createElement(qt,null,c.createElement(lt,{disabled:e,onClick:n},i("back label")),c.createElement(lt,{variant:"primary","data-testid":"sign-out.join-new-identity",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:r},i("join new identity label")),c.createElement(lt,{variant:"primary","data-testid":"sign-out.reset-device",classNames:"!bg-error-500 hover:!bg-error-550",disabled:e,onClick:t},i("reset device label"))))},k9=({client:e,invitations:t,identity:r})=>{const[n,i]=c.useState(""),[o,a]=c.useState(""),[s,l]=c.useState(!1),u=Ke.useAgentHostingProviderClient(e.config);c.useEffect(()=>{(async()=>{if(u){const v=await(u==null?void 0:u.getAgent((r==null?void 0:r.identityKey.truncate())??"foo"));v?(l(!0),a(v)):(l(!1),i("No agent deployed via provider."))}else i("No agent provider configured.")})()},[]);const d=c.useCallback(async m=>{const v=ln.InvitationEncoder.encode(m);if(m.state===we.State.CONNECTING&&(console.log(JSON.stringify({invitationCode:v,authCode:m.authCode})),Ko(r,"Identity not found"),u))try{const y=await(u==null?void 0:u.createAgent(v,r.identityKey.truncate()));a(y),l(!0),i("")}catch(y){i(`error creating agent: ${y.message}`)}},[]);return{onAgentCreate:async()=>{t.forEach(v=>v.cancel()),e.halo.share({type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE}).subscribe(d)},onAgentDestroy:async()=>{const m=e.halo.identity.get();Ko(m,"Identity not found");try{await(u==null?void 0:u.destroyAgent(m.identityKey.truncate())),i("No agent deployed via provider."),a(""),l(!1)}catch(v){i(`error destroying agent: ${v.message}`)}},validationMessage:n,agentStatus:o,agentActive:s}};var F1={exports:{}};(function(e,t){var r=function(){var n=function(k,P){var C=236,T=17,D=k,j=o[P],F=null,M=0,Z=null,Y=[],X={},ne=function(B,z){M=D*4+17,F=function(K){for(var I=new Array(K),N=0;N<K;N+=1){I[N]=new Array(K);for(var Q=0;Q<K;Q+=1)I[N][Q]=null}return I}(M),oe(0,0),oe(M-7,0),oe(0,M-7),ge(),se(),V(B,z),D>=7&&le(B),Z==null&&(Z=de(D,j,Y)),J(Z,z)},oe=function(B,z){for(var K=-1;K<=7;K+=1)if(!(B+K<=-1||M<=B+K))for(var I=-1;I<=7;I+=1)z+I<=-1||M<=z+I||(0<=K&&K<=6&&(I==0||I==6)||0<=I&&I<=6&&(K==0||K==6)||2<=K&&K<=4&&2<=I&&I<=4?F[B+K][z+I]=!0:F[B+K][z+I]=!1)},ce=function(){for(var B=0,z=0,K=0;K<8;K+=1){ne(!0,K);var I=s.getLostPoint(X);(K==0||B>I)&&(B=I,z=K)}return z},se=function(){for(var B=8;B<M-8;B+=1)F[B][6]==null&&(F[B][6]=B%2==0);for(var z=8;z<M-8;z+=1)F[6][z]==null&&(F[6][z]=z%2==0)},ge=function(){for(var B=s.getPatternPosition(D),z=0;z<B.length;z+=1)for(var K=0;K<B.length;K+=1){var I=B[z],N=B[K];if(F[I][N]==null)for(var Q=-2;Q<=2;Q+=1)for(var ie=-2;ie<=2;ie+=1)Q==-2||Q==2||ie==-2||ie==2||Q==0&&ie==0?F[I+Q][N+ie]=!0:F[I+Q][N+ie]=!1}},le=function(B){for(var z=s.getBCHTypeNumber(D),K=0;K<18;K+=1){var I=!B&&(z>>K&1)==1;F[Math.floor(K/3)][K%3+M-8-3]=I}for(var K=0;K<18;K+=1){var I=!B&&(z>>K&1)==1;F[K%3+M-8-3][Math.floor(K/3)]=I}},V=function(B,z){for(var K=j<<3|z,I=s.getBCHTypeInfo(K),N=0;N<15;N+=1){var Q=!B&&(I>>N&1)==1;N<6?F[N][8]=Q:N<8?F[N+1][8]=Q:F[M-15+N][8]=Q}for(var N=0;N<15;N+=1){var Q=!B&&(I>>N&1)==1;N<8?F[8][M-N-1]=Q:N<9?F[8][15-N-1+1]=Q:F[8][15-N-1]=Q}F[M-8][8]=!B},J=function(B,z){for(var K=-1,I=M-1,N=7,Q=0,ie=s.getMaskFunction(z),pe=M-1;pe>0;pe-=2)for(pe==6&&(pe-=1);;){for(var ye=0;ye<2;ye+=1)if(F[I][pe-ye]==null){var _e=!1;Q<B.length&&(_e=(B[Q]>>>N&1)==1);var xe=ie(I,pe-ye);xe&&(_e=!_e),F[I][pe-ye]=_e,N-=1,N==-1&&(Q+=1,N=7)}if(I+=K,I<0||M<=I){I-=K,K=-K;break}}},re=function(B,z){for(var K=0,I=0,N=0,Q=new Array(z.length),ie=new Array(z.length),pe=0;pe<z.length;pe+=1){var ye=z[pe].dataCount,_e=z[pe].totalCount-ye;I=Math.max(I,ye),N=Math.max(N,_e),Q[pe]=new Array(ye);for(var xe=0;xe<Q[pe].length;xe+=1)Q[pe][xe]=255&B.getBuffer()[xe+K];K+=ye;var ae=s.getErrorCorrectPolynomial(_e),Me=u(Q[pe],ae.getLength()-1),at=Me.mod(ae);ie[pe]=new Array(ae.getLength()-1);for(var xe=0;xe<ie[pe].length;xe+=1){var Oe=xe+at.getLength()-ie[pe].length;ie[pe][xe]=Oe>=0?at.getAt(Oe):0}}for(var Re=0,xe=0;xe<z.length;xe+=1)Re+=z[xe].totalCount;for(var gt=new Array(Re),Se=0,xe=0;xe<I;xe+=1)for(var pe=0;pe<z.length;pe+=1)xe<Q[pe].length&&(gt[Se]=Q[pe][xe],Se+=1);for(var xe=0;xe<N;xe+=1)for(var pe=0;pe<z.length;pe+=1)xe<ie[pe].length&&(gt[Se]=ie[pe][xe],Se+=1);return gt},de=function(B,z,K){for(var I=d.getRSBlocks(B,z),N=p(),Q=0;Q<K.length;Q+=1){var ie=K[Q];N.put(ie.getMode(),4),N.put(ie.getLength(),s.getLengthInBits(ie.getMode(),B)),ie.write(N)}for(var pe=0,Q=0;Q<I.length;Q+=1)pe+=I[Q].dataCount;if(N.getLengthInBits()>pe*8)throw"code length overflow. ("+N.getLengthInBits()+">"+pe*8+")";for(N.getLengthInBits()+4<=pe*8&&N.put(0,4);N.getLengthInBits()%8!=0;)N.putBit(!1);for(;!(N.getLengthInBits()>=pe*8||(N.put(C,8),N.getLengthInBits()>=pe*8));)N.put(T,8);return re(N,I)};X.addData=function(B,z){z=z||"Byte";var K=null;switch(z){case"Numeric":K=h(B);break;case"Alphanumeric":K=m(B);break;case"Byte":K=v(B);break;case"Kanji":K=y(B);break;default:throw"mode:"+z}Y.push(K),Z=null},X.isDark=function(B,z){if(B<0||M<=B||z<0||M<=z)throw B+","+z;return F[B][z]},X.getModuleCount=function(){return M},X.make=function(){if(D<1){for(var B=1;B<40;B++){for(var z=d.getRSBlocks(B,j),K=p(),I=0;I<Y.length;I++){var N=Y[I];K.put(N.getMode(),4),K.put(N.getLength(),s.getLengthInBits(N.getMode(),B)),N.write(K)}for(var Q=0,I=0;I<z.length;I++)Q+=z[I].dataCount;if(K.getLengthInBits()<=Q*8)break}D=B}ne(!1,ce())},X.createTableTag=function(B,z){B=B||2,z=typeof z>"u"?B*4:z;var K="";K+='<table style="',K+=" border-width: 0px; border-style: none;",K+=" border-collapse: collapse;",K+=" padding: 0px; margin: "+z+"px;",K+='">',K+="<tbody>";for(var I=0;I<X.getModuleCount();I+=1){K+="<tr>";for(var N=0;N<X.getModuleCount();N+=1)K+='<td style="',K+=" border-width: 0px; border-style: none;",K+=" border-collapse: collapse;",K+=" padding: 0px; margin: 0px;",K+=" width: "+B+"px;",K+=" height: "+B+"px;",K+=" background-color: ",K+=X.isDark(I,N)?"#000000":"#ffffff",K+=";",K+='"/>';K+="</tr>"}return K+="</tbody>",K+="</table>",K},X.createSvgTag=function(B,z,K,I){var N={};typeof arguments[0]=="object"&&(N=arguments[0],B=N.cellSize,z=N.margin,K=N.alt,I=N.title),B=B||2,z=typeof z>"u"?B*4:z,K=typeof K=="string"?{text:K}:K||{},K.text=K.text||null,K.id=K.text?K.id||"qrcode-description":null,I=typeof I=="string"?{text:I}:I||{},I.text=I.text||null,I.id=I.text?I.id||"qrcode-title":null;var Q=X.getModuleCount()*B+z*2,ie,pe,ye,_e,xe="",ae;for(ae="l"+B+",0 0,"+B+" -"+B+",0 0,-"+B+"z ",xe+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',xe+=N.scalable?"":' width="'+Q+'px" height="'+Q+'px"',xe+=' viewBox="0 0 '+Q+" "+Q+'" ',xe+=' preserveAspectRatio="xMinYMin meet"',xe+=I.text||K.text?' role="img" aria-labelledby="'+H([I.id,K.id].join(" ").trim())+'"':"",xe+=">",xe+=I.text?'<title id="'+H(I.id)+'">'+H(I.text)+"</title>":"",xe+=K.text?'<description id="'+H(K.id)+'">'+H(K.text)+"</description>":"",xe+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',xe+='<path d="',ye=0;ye<X.getModuleCount();ye+=1)for(_e=ye*B+z,ie=0;ie<X.getModuleCount();ie+=1)X.isDark(ye,ie)&&(pe=ie*B+z,xe+="M"+pe+","+_e+ae);return xe+='" stroke="transparent" fill="black"/>',xe+="</svg>",xe},X.createDataURL=function(B,z){B=B||2,z=typeof z>"u"?B*4:z;var K=X.getModuleCount()*B+z*2,I=z,N=K-z;return $(K,K,function(Q,ie){if(I<=Q&&Q<N&&I<=ie&&ie<N){var pe=Math.floor((Q-I)/B),ye=Math.floor((ie-I)/B);return X.isDark(ye,pe)?0:1}else return 1})},X.createImgTag=function(B,z,K){B=B||2,z=typeof z>"u"?B*4:z;var I=X.getModuleCount()*B+z*2,N="";return N+="<img",N+=' src="',N+=X.createDataURL(B,z),N+='"',N+=' width="',N+=I,N+='"',N+=' height="',N+=I,N+='"',K&&(N+=' alt="',N+=H(K),N+='"'),N+="/>",N};var H=function(B){for(var z="",K=0;K<B.length;K+=1){var I=B.charAt(K);switch(I){case"<":z+="&lt;";break;case">":z+="&gt;";break;case"&":z+="&amp;";break;case'"':z+="&quot;";break;default:z+=I;break}}return z},G=function(B){var z=1;B=typeof B>"u"?z*2:B;var K=X.getModuleCount()*z+B*2,I=B,N=K-B,Q,ie,pe,ye,_e,xe={"██":"█","█ ":"▀"," █":"▄"," ":" "},ae={"██":"▀","█ ":"▀"," █":" "," ":" "},Me="";for(Q=0;Q<K;Q+=2){for(pe=Math.floor((Q-I)/z),ye=Math.floor((Q+1-I)/z),ie=0;ie<K;ie+=1)_e="█",I<=ie&&ie<N&&I<=Q&&Q<N&&X.isDark(pe,Math.floor((ie-I)/z))&&(_e=" "),I<=ie&&ie<N&&I<=Q+1&&Q+1<N&&X.isDark(ye,Math.floor((ie-I)/z))?_e+=" ":_e+="█",Me+=B<1&&Q+1>=N?ae[_e]:xe[_e];Me+=`
214
+ `}return K%2&&B>0?Me.substring(0,Me.length-K-1)+Array(K+1).join("▀"):Me.substring(0,Me.length-1)};return X.createASCII=function(B,z){if(B=B||1,B<2)return G(z);B-=1,z=typeof z>"u"?B*2:z;var K=X.getModuleCount()*B+z*2,I=z,N=K-z,Q,ie,pe,ye,_e=Array(B+1).join("██"),xe=Array(B+1).join(" "),ae="",Me="";for(Q=0;Q<K;Q+=1){for(pe=Math.floor((Q-I)/B),Me="",ie=0;ie<K;ie+=1)ye=1,I<=ie&&ie<N&&I<=Q&&Q<N&&X.isDark(pe,Math.floor((ie-I)/B))&&(ye=0),Me+=ye?_e:xe;for(pe=0;pe<B;pe+=1)ae+=Me+`
215
+ `}return ae.substring(0,ae.length-1)},X.renderTo2dContext=function(B,z){z=z||2;for(var K=X.getModuleCount(),I=0;I<K;I++)for(var N=0;N<K;N++)B.fillStyle=X.isDark(I,N)?"black":"white",B.fillRect(I*z,N*z,z,z)},X};n.stringToBytesFuncs={default:function(k){for(var P=[],C=0;C<k.length;C+=1){var T=k.charCodeAt(C);P.push(T&255)}return P}},n.stringToBytes=n.stringToBytesFuncs.default,n.createStringToBytes=function(k,P){var C=function(){for(var D=_(k),j=function(){var se=D.read();if(se==-1)throw"eof";return se},F=0,M={};;){var Z=D.read();if(Z==-1)break;var Y=j(),X=j(),ne=j(),oe=String.fromCharCode(Z<<8|Y),ce=X<<8|ne;M[oe]=ce,F+=1}if(F!=P)throw F+" != "+P;return M}(),T=63;return function(D){for(var j=[],F=0;F<D.length;F+=1){var M=D.charCodeAt(F);if(M<128)j.push(M);else{var Z=C[D.charAt(F)];typeof Z=="number"?(Z&255)==Z?j.push(Z):(j.push(Z>>>8),j.push(Z&255)):j.push(T)}}return j}};var i={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},o={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]],P=1335,C=7973,T=21522,D={},j=function(F){for(var M=0;F!=0;)M+=1,F>>>=1;return M};return D.getBCHTypeInfo=function(F){for(var M=F<<10;j(M)-j(P)>=0;)M^=P<<j(M)-j(P);return(F<<10|M)^T},D.getBCHTypeNumber=function(F){for(var M=F<<12;j(M)-j(C)>=0;)M^=C<<j(M)-j(C);return F<<12|M},D.getPatternPosition=function(F){return k[F-1]},D.getMaskFunction=function(F){switch(F){case a.PATTERN000:return function(M,Z){return(M+Z)%2==0};case a.PATTERN001:return function(M,Z){return M%2==0};case a.PATTERN010:return function(M,Z){return Z%3==0};case a.PATTERN011:return function(M,Z){return(M+Z)%3==0};case a.PATTERN100:return function(M,Z){return(Math.floor(M/2)+Math.floor(Z/3))%2==0};case a.PATTERN101:return function(M,Z){return M*Z%2+M*Z%3==0};case a.PATTERN110:return function(M,Z){return(M*Z%2+M*Z%3)%2==0};case a.PATTERN111:return function(M,Z){return(M*Z%3+(M+Z)%2)%2==0};default:throw"bad maskPattern:"+F}},D.getErrorCorrectPolynomial=function(F){for(var M=u([1],0),Z=0;Z<F;Z+=1)M=M.multiply(u([1,l.gexp(Z)],0));return M},D.getLengthInBits=function(F,M){if(1<=M&&M<10)switch(F){case i.MODE_NUMBER:return 10;case i.MODE_ALPHA_NUM:return 9;case i.MODE_8BIT_BYTE:return 8;case i.MODE_KANJI:return 8;default:throw"mode:"+F}else if(M<27)switch(F){case i.MODE_NUMBER:return 12;case i.MODE_ALPHA_NUM:return 11;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 10;default:throw"mode:"+F}else if(M<41)switch(F){case i.MODE_NUMBER:return 14;case i.MODE_ALPHA_NUM:return 13;case i.MODE_8BIT_BYTE:return 16;case i.MODE_KANJI:return 12;default:throw"mode:"+F}else throw"type:"+M},D.getLostPoint=function(F){for(var M=F.getModuleCount(),Z=0,Y=0;Y<M;Y+=1)for(var X=0;X<M;X+=1){for(var ne=0,oe=F.isDark(Y,X),ce=-1;ce<=1;ce+=1)if(!(Y+ce<0||M<=Y+ce))for(var se=-1;se<=1;se+=1)X+se<0||M<=X+se||ce==0&&se==0||oe==F.isDark(Y+ce,X+se)&&(ne+=1);ne>5&&(Z+=3+ne-5)}for(var Y=0;Y<M-1;Y+=1)for(var X=0;X<M-1;X+=1){var ge=0;F.isDark(Y,X)&&(ge+=1),F.isDark(Y+1,X)&&(ge+=1),F.isDark(Y,X+1)&&(ge+=1),F.isDark(Y+1,X+1)&&(ge+=1),(ge==0||ge==4)&&(Z+=3)}for(var Y=0;Y<M;Y+=1)for(var X=0;X<M-6;X+=1)F.isDark(Y,X)&&!F.isDark(Y,X+1)&&F.isDark(Y,X+2)&&F.isDark(Y,X+3)&&F.isDark(Y,X+4)&&!F.isDark(Y,X+5)&&F.isDark(Y,X+6)&&(Z+=40);for(var X=0;X<M;X+=1)for(var Y=0;Y<M-6;Y+=1)F.isDark(Y,X)&&!F.isDark(Y+1,X)&&F.isDark(Y+2,X)&&F.isDark(Y+3,X)&&F.isDark(Y+4,X)&&!F.isDark(Y+5,X)&&F.isDark(Y+6,X)&&(Z+=40);for(var le=0,X=0;X<M;X+=1)for(var Y=0;Y<M;Y+=1)F.isDark(Y,X)&&(le+=1);var V=Math.abs(100*le/M/M-50)/5;return Z+=V*10,Z},D}(),l=function(){for(var k=new Array(256),P=new Array(256),C=0;C<8;C+=1)k[C]=1<<C;for(var C=8;C<256;C+=1)k[C]=k[C-4]^k[C-5]^k[C-6]^k[C-8];for(var C=0;C<255;C+=1)P[k[C]]=C;var T={};return T.glog=function(D){if(D<1)throw"glog("+D+")";return P[D]},T.gexp=function(D){for(;D<0;)D+=255;for(;D>=256;)D-=255;return k[D]},T}();function u(k,P){if(typeof k.length>"u")throw k.length+"/"+P;var C=function(){for(var D=0;D<k.length&&k[D]==0;)D+=1;for(var j=new Array(k.length-D+P),F=0;F<k.length-D;F+=1)j[F]=k[F+D];return j}(),T={};return T.getAt=function(D){return C[D]},T.getLength=function(){return C.length},T.multiply=function(D){for(var j=new Array(T.getLength()+D.getLength()-1),F=0;F<T.getLength();F+=1)for(var M=0;M<D.getLength();M+=1)j[F+M]^=l.gexp(l.glog(T.getAt(F))+l.glog(D.getAt(M)));return u(j,0)},T.mod=function(D){if(T.getLength()-D.getLength()<0)return T;for(var j=l.glog(T.getAt(0))-l.glog(D.getAt(0)),F=new Array(T.getLength()),M=0;M<T.getLength();M+=1)F[M]=T.getAt(M);for(var M=0;M<D.getLength();M+=1)F[M]^=l.gexp(l.glog(D.getAt(M))+j);return u(F,0).mod(D)},T}var d=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]],P=function(D,j){var F={};return F.totalCount=D,F.dataCount=j,F},C={},T=function(D,j){switch(j){case o.L:return k[(D-1)*4+0];case o.M:return k[(D-1)*4+1];case o.Q:return k[(D-1)*4+2];case o.H:return k[(D-1)*4+3];default:return}};return C.getRSBlocks=function(D,j){var F=T(D,j);if(typeof F>"u")throw"bad rs block @ typeNumber:"+D+"/errorCorrectionLevel:"+j;for(var M=F.length/3,Z=[],Y=0;Y<M;Y+=1)for(var X=F[Y*3+0],ne=F[Y*3+1],oe=F[Y*3+2],ce=0;ce<X;ce+=1)Z.push(P(ne,oe));return Z},C}(),p=function(){var k=[],P=0,C={};return C.getBuffer=function(){return k},C.getAt=function(T){var D=Math.floor(T/8);return(k[D]>>>7-T%8&1)==1},C.put=function(T,D){for(var j=0;j<D;j+=1)C.putBit((T>>>D-j-1&1)==1)},C.getLengthInBits=function(){return P},C.putBit=function(T){var D=Math.floor(P/8);k.length<=D&&k.push(0),T&&(k[D]|=128>>>P%8),P+=1},C},h=function(k){var P=i.MODE_NUMBER,C=k,T={};T.getMode=function(){return P},T.getLength=function(F){return C.length},T.write=function(F){for(var M=C,Z=0;Z+2<M.length;)F.put(D(M.substring(Z,Z+3)),10),Z+=3;Z<M.length&&(M.length-Z==1?F.put(D(M.substring(Z,Z+1)),4):M.length-Z==2&&F.put(D(M.substring(Z,Z+2)),7))};var D=function(F){for(var M=0,Z=0;Z<F.length;Z+=1)M=M*10+j(F.charAt(Z));return M},j=function(F){if("0"<=F&&F<="9")return F.charCodeAt(0)-48;throw"illegal char :"+F};return T},m=function(k){var P=i.MODE_ALPHA_NUM,C=k,T={};T.getMode=function(){return P},T.getLength=function(j){return C.length},T.write=function(j){for(var F=C,M=0;M+1<F.length;)j.put(D(F.charAt(M))*45+D(F.charAt(M+1)),11),M+=2;M<F.length&&j.put(D(F.charAt(M)),6)};var D=function(j){if("0"<=j&&j<="9")return j.charCodeAt(0)-48;if("A"<=j&&j<="Z")return j.charCodeAt(0)-65+10;switch(j){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 :"+j}};return T},v=function(k){var P=i.MODE_8BIT_BYTE,C=n.stringToBytes(k),T={};return T.getMode=function(){return P},T.getLength=function(D){return C.length},T.write=function(D){for(var j=0;j<C.length;j+=1)D.put(C[j],8)},T},y=function(k){var P=i.MODE_KANJI,C=n.stringToBytesFuncs.SJIS;if(!C)throw"sjis not supported.";(function(j,F){var M=C(j);if(M.length!=2||(M[0]<<8|M[1])!=F)throw"sjis not supported."})("友",38726);var T=C(k),D={};return D.getMode=function(){return P},D.getLength=function(j){return~~(T.length/2)},D.write=function(j){for(var F=T,M=0;M+1<F.length;){var Z=(255&F[M])<<8|255&F[M+1];if(33088<=Z&&Z<=40956)Z-=33088;else if(57408<=Z&&Z<=60351)Z-=49472;else throw"illegal char at "+(M+1)+"/"+Z;Z=(Z>>>8&255)*192+(Z&255),j.put(Z,13),M+=2}if(M<F.length)throw"illegal char at "+(M+1)},D},w=function(){var k=[],P={};return P.writeByte=function(C){k.push(C&255)},P.writeShort=function(C){P.writeByte(C),P.writeByte(C>>>8)},P.writeBytes=function(C,T,D){T=T||0,D=D||C.length;for(var j=0;j<D;j+=1)P.writeByte(C[j+T])},P.writeString=function(C){for(var T=0;T<C.length;T+=1)P.writeByte(C.charCodeAt(T))},P.toByteArray=function(){return k},P.toString=function(){var C="";C+="[";for(var T=0;T<k.length;T+=1)T>0&&(C+=","),C+=k[T];return C+="]",C},P},E=function(){var k=0,P=0,C=0,T="",D={},j=function(M){T+=String.fromCharCode(F(M&63))},F=function(M){if(!(M<0)){if(M<26)return 65+M;if(M<52)return 97+(M-26);if(M<62)return 48+(M-52);if(M==62)return 43;if(M==63)return 47}throw"n:"+M};return D.writeByte=function(M){for(k=k<<8|M&255,P+=8,C+=1;P>=6;)j(k>>>P-6),P-=6},D.flush=function(){if(P>0&&(j(k<<6-P),k=0,P=0),C%3!=0)for(var M=3-C%3,Z=0;Z<M;Z+=1)T+="="},D.toString=function(){return T},D},_=function(k){var P=k,C=0,T=0,D=0,j={};j.read=function(){for(;D<8;){if(C>=P.length){if(D==0)return-1;throw"unexpected end of file./"+D}var M=P.charAt(C);if(C+=1,M=="=")return D=0,-1;if(M.match(/^\s$/))continue;T=T<<6|F(M.charCodeAt(0)),D+=6}var Z=T>>>D-8&255;return D-=8,Z};var F=function(M){if(65<=M&&M<=90)return M-65;if(97<=M&&M<=122)return M-97+26;if(48<=M&&M<=57)return M-48+52;if(M==43)return 62;if(M==47)return 63;throw"c:"+M};return j},S=function(k,P){var C=k,T=P,D=new Array(k*P),j={};j.setPixel=function(Y,X,ne){D[X*C+Y]=ne},j.write=function(Y){Y.writeString("GIF87a"),Y.writeShort(C),Y.writeShort(T),Y.writeByte(128),Y.writeByte(0),Y.writeByte(0),Y.writeByte(0),Y.writeByte(0),Y.writeByte(0),Y.writeByte(255),Y.writeByte(255),Y.writeByte(255),Y.writeString(","),Y.writeShort(0),Y.writeShort(0),Y.writeShort(C),Y.writeShort(T),Y.writeByte(0);var X=2,ne=M(X);Y.writeByte(X);for(var oe=0;ne.length-oe>255;)Y.writeByte(255),Y.writeBytes(ne,oe,255),oe+=255;Y.writeByte(ne.length-oe),Y.writeBytes(ne,oe,ne.length-oe),Y.writeByte(0),Y.writeString(";")};var F=function(Y){var X=Y,ne=0,oe=0,ce={};return ce.write=function(se,ge){if(se>>>ge)throw"length over";for(;ne+ge>=8;)X.writeByte(255&(se<<ne|oe)),ge-=8-ne,se>>>=8-ne,oe=0,ne=0;oe=se<<ne|oe,ne=ne+ge},ce.flush=function(){ne>0&&X.writeByte(oe)},ce},M=function(Y){for(var X=1<<Y,ne=(1<<Y)+1,oe=Y+1,ce=Z(),se=0;se<X;se+=1)ce.add(String.fromCharCode(se));ce.add(String.fromCharCode(X)),ce.add(String.fromCharCode(ne));var ge=w(),le=F(ge);le.write(X,oe);var V=0,J=String.fromCharCode(D[V]);for(V+=1;V<D.length;){var re=String.fromCharCode(D[V]);V+=1,ce.contains(J+re)?J=J+re:(le.write(ce.indexOf(J),oe),ce.size()<4095&&(ce.size()==1<<oe&&(oe+=1),ce.add(J+re)),J=re)}return le.write(ce.indexOf(J),oe),le.write(ne,oe),le.flush(),ge.toByteArray()},Z=function(){var Y={},X=0,ne={};return ne.add=function(oe){if(ne.contains(oe))throw"dup key:"+oe;Y[oe]=X,X+=1},ne.size=function(){return X},ne.indexOf=function(oe){return Y[oe]},ne.contains=function(oe){return typeof Y[oe]<"u"},ne};return j},$=function(k,P,C){for(var T=S(k,P),D=0;D<P;D+=1)for(var j=0;j<k;j+=1)T.setPixel(j,D,C(j,D));var F=w();T.write(F);for(var M=E(),Z=F.toByteArray(),Y=0;Y<Z.length;Y+=1)M.writeByte(Z[Y]);return M.flush(),"data:image/gif;base64,"+M};return n}();(function(){r.stringToBytesFuncs["UTF-8"]=function(n){function i(o){for(var a=[],s=0;s<o.length;s++){var l=o.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|o.charCodeAt(s)&1023),a.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return a}return i(n)}})(),function(n){e.exports=n()}(function(){return r})})(F1);var N9=F1.exports;const pd=cn(N9);var D9=Object.defineProperty,_l=Object.getOwnPropertySymbols,B1=Object.prototype.hasOwnProperty,j1=Object.prototype.propertyIsEnumerable,R1=(e,t,r)=>t in e?D9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L9=(e,t)=>{for(var r in t||(t={}))B1.call(t,r)&&R1(e,r,t[r]);if(_l)for(var r of _l(t))j1.call(t,r)&&R1(e,r,t[r]);return e},M9=(e,t)=>{var r={};for(var n in e)B1.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&_l)for(var n of _l(e))t.indexOf(n)<0&&j1.call(e,n)&&(r[n]=e[n]);return r},rn=1e3,F9=/code length overflow/i;pd.stringToBytes=pd.stringToBytesFuncs["UTF-8"];var B9=(e,t,r)=>{r=Math.max(1,r);for(let n=r;n<=40;n+=1)try{const i=pd(n,t);i.addData(e),i.make();const o=i.getModuleCount();return{text:e,level:t,version:n,moduleCount:o,isDark:(s,l)=>s>=0&&s<o&&l>=0&&l<o&&i.isDark(s,l)}}catch(i){if(!(n<40&&F9.test(String(i))))throw i}return null},kn=Math.round,no=(e,t)=>`M ${kn(e)} ${kn(t)}`,zt=(e,t)=>`L ${kn(e)} ${kn(t)}`,Nn=(e,t,r)=>`A ${kn(r)} ${kn(r)} 0 0 1 ${kn(e)} ${kn(t)}`,j9=(e,t,r,n,i,o,a,s,l)=>{const u=[];return o?u.push(no(e+i,t)):u.push(no(e,t)),a?u.push(zt(r-i,t),Nn(r,t+i,i)):u.push(zt(r,t)),s?u.push(zt(r,n-i),Nn(r-i,n,i)):u.push(zt(r,n)),l?u.push(zt(e+i,n),Nn(e,n-i,i)):u.push(zt(e,n)),o?u.push(zt(e,t+i),Nn(e+i,t,i)):u.push(zt(e,t)),u.join(" ")},R9=(e,t,r,n,i,o,a,s,l)=>{const u=[];return o&&u.push(no(e+i,t),zt(e,t),zt(e,t+i),Nn(e+i,t,i)),a&&u.push(no(r,t+i),zt(r,t),zt(r-i,t),Nn(r,t+i,i)),s&&u.push(no(r-i,n),zt(r,n),zt(r,n-i),Nn(r-i,n,i)),l&&u.push(no(e,n-i),zt(e,n),zt(e+i,n),Nn(e,n-i,i)),u.join(" ")},U9=(e,t,r,n,i)=>{const o=i*r,a=n*r,s=o+r,l=a+r,u=t*.005*r,d=e.isDark,p=n-1,h=n+1,m=i-1,v=i+1,y=d(n,i),w=d(p,m),E=d(p,i),_=d(p,v),S=d(n,v),$=d(h,v),k=d(h,i),P=d(h,m),C=d(n,m);return y?j9(o,a,s,l,u,!E&&!C,!E&&!S,!k&&!S,!k&&!C):R9(o,a,s,l,u,E&&C&&w,E&&S&&_,k&&S&&$,k&&C&&P)},W9=(e,t)=>{if(!e)return"";const r=e.moduleCount,n=rn/r,i=[];for(let o=0;o<r;o+=1)for(let a=0;a<r;a+=1)i.push(U9(e,t,n,o,a));return i.join(" ")},z9=e=>{var t=e,{color:r="#000",backgroundColor:n,cutout:i=!1,cutoutElement:o,errorCorrectionLevel:a="Q",rounding:s=0,children:l}=t,u=M9(t,["color","backgroundColor","cutout","cutoutElement","errorCorrectionLevel","rounding","children"]),d,p;const h=c.useMemo(()=>B9(l,a,1),[l,a]);if(!h)return null;const m=(d=h==null?void 0:h.moduleCount)!=null?d:1,y=rn/((p=h==null?void 0:h.moduleCount)!=null?p:1)*(Math.floor(m*.18)*2-1)+2,w=(rn-y)/2;return ve.createElement("svg",L9({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${rn} ${rn}`},u),i?ve.createElement("mask",{id:"react-qr-rounded__mask"},ve.createElement("rect",{x:"0",y:"0",width:rn,height:rn,fill:"#fff"}),ve.createElement("rect",{x:w,y:w,width:y,height:y,rx:s,ry:s,fill:"#000"})):null,n?ve.createElement("rect",{x:"0",y:"0",width:rn,height:rn,fill:n}):null,ve.createElement("path",{fill:r,d:W9(h,s),mask:i?"url(#react-qr-rounded__mask)":void 0}),o?ve.createElement("foreignObject",{x:w,y:w,width:y,height:y},ve.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",overflow:"hidden",borderRadius:s}},o)):null)};const hd=({children:e,...t})=>c.createElement(ct.View,{...t,classNames:"grow flex flex-col justify-around items-center"},e),U1=({invitationUrl:e,active:t,send:r,status:n,type:i,authCode:o,id:a})=>{const{t:s}=it("os"),l=St("invitation-manager__qr-code"),u=i===we.Type.MULTIUSE?0:d7.get(n)??0,d=u===3,p=Ff(a??""),h=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(ct.Root,{activeView:h,classNames:"grow plb-1"},c.createElement(ct.Views,null,c.createElement(hd,{id:"showing qr",emoji:p},c.createElement("p",{className:"text-sm mlb-1 font-normal text-center"},s(i===we.Type.MULTIUSE?"invite many qr label":"invite one qr label")),c.createElement("div",{role:"none",className:ue(It,"is-full max-is-[14rem] relative")},c.createElement(z9,{rounding:100,backgroundColor:"transparent",color:"currentColor",className:ue("is-full bs-full p-2",d&&"invisible"),"aria-labelledby":l,errorCorrectionLevel:"Q",cutout:!0},e??"never"),c.createElement(wM,null,c.createElement(Bf,{text:p}))),c.createElement("span",{id:l,className:"sr-only"},s("qr label")),c.createElement(v4,{variant:"ghost",value:e??"never"})),c.createElement(hd,{id:"showing auth code"},c.createElement(jb,null,s("auth code message")),c.createElement(Fb,{code:o,large:!0,classNames:"text-black dark:text-white"}),c.createElement(jb,null,"Be sure the other device is showing this symbol:"),p&&c.createElement(Bf,{text:p})),c.createElement(hd,{id:"showing final"},u>0?c.createElement(Ye.Check,{className:ue("m-1.5",qe(6))}):c.createElement(Ye.X,{className:ue("m-1.5",qe(6))})))),c.createElement(qt,{classNames:"mbs-4"},c.createElement(lt,{disabled:!t,onClick:()=>r==null?void 0:r({type:"deselectInvitation"})},s("back label"))))},io="pbs-1 pbe-3 pli-3",H9=({titleId:e,title:t,identity:r,onDone:n})=>{var o;const i=vs(r.identityKey.toHex(),12);return c.createElement(jf,{titleId:e,title:t,corner:c.createElement(Bb,{onDone:n})},c.createElement(Pt.Root,{size:12,variant:"circle",status:"active"},c.createElement(Pt.Frame,{classNames:"block mbs-4 mbe-2 mli-auto chromatic-ignore"},c.createElement(Pt.Fallback,{href:i})),c.createElement(Pt.Label,{classNames:"block text-center font-light text-xl","data-testid":"identityHeading.displayName"},((o=r.profile)==null?void 0:o.displayName)??Au(r.identityKey.toHex()))))},W1=e=>{const{identity:t,titleId:r,activeView:n,onUpdateProfile:i,onResetDevice:o,onJoinNewIdentity:a,IdentityActionChooser:s=C9,InvitationManager:l=U1,onDone:u,...d}=e,{t:p}=it("os"),h=c.useMemo(()=>{switch(n){case"agent manager":return"Manage Agent";case"device invitation manager":return p("choose add device label");default:return p("identity heading")}},[n,p]);return c.createElement(Oi,{density:"fine"},c.createElement(H9,{identity:t,titleId:r,title:h,onDone:u}),c.createElement(ct.Root,{activeView:n},c.createElement(ct.Views,null,c.createElement(ct.View,{id:"identity action chooser",classNames:io},c.createElement(s,{active:n==="identity action chooser",...d})),c.createElement(ct.View,{id:"device invitation manager",classNames:io},c.createElement(l,{active:n==="device invitation manager",...d,invitationUrl:d.createInvitationUrl(d.invitationCode)})),c.createElement(ct.View,{id:"device manager",classNames:io},c.createElement($9,{active:n==="device manager",...d})),c.createElement(ct.View,{classNames:io,id:"update profile form"},c.createElement(O9,{send:d.send,active:n==="update profile form",profile:t.profile,onUpdateProfile:i})),c.createElement(ct.View,{classNames:io,id:"signing out"},c.createElement(I9,{send:d.send,active:n==="signing out",onResetDevice:o,onJoinNewIdentity:a})),c.createElement(ct.View,{classNames:io,id:"agent manager"},c.createElement(S9,{send:d.send,active:n==="agent manager",...d})))))},V9=({invitation:e,...t})=>{const r=xf(e);return c.createElement(W1,{...t,...r})},G9=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=St("identityPanel__heading",e),i=Ke.useClient(),o=vo.useDevices(),a=vo.useIdentity(),s=vo.useHaloInvitations(),l=k9({client:i,identity:a,invitations:s});if(!a)return console.error("IdentityPanel rendered with no active identity."),null;const[u,d,p]=x9(i);c.useEffect(()=>p.subscribe(w=>{tt("[state]",w)}).unsubscribe,[p]);const h=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]),v={...r,identity:a,devices:o,activeView:h,send:d,titleId:n,createInvitationUrl:t,onUpdateProfile:async y=>{d({type:"updateProfile"}),await i.halo.updateProfile(y)},...l};return u.context.invitation?c.createElement(V9,{...v,invitation:u.context.invitation}):c.createElement(W1,{...v})},K9=c.forwardRef(({mode:e,titleId:t,onExit:r,exitActionParent:n},i)=>{const{t:o}=it("os"),a=c.createElement(wr,{variant:"ghost",...r&&{onClick:r},classNames:ue(It,"plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),"data-testid":"join-exit"},c.createElement(Ye.X,{weight:"bold",className:qe(4)}),c.createElement("span",{className:"sr-only"},o("exit label")));return c.createElement(jf,{ref:i,titleId:t,title:o(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"})}),z1=(e,t)=>(tt("[subscribing to invitation]",t),{subscribe:(r,n,i)=>t.subscribe(o=>{switch(o.state){case we.State.CONNECTING:return tt("[invitation connecting]",{Kind:e,invitation:o}),r({type:`connecting${e}Invitation`,invitation:o});case we.State.CONNECTED:return tt("[invitation connected]",{Kind:e,invitation:o}),r({type:`connected${e}Invitation`,invitation:o});case we.State.READY_FOR_AUTHENTICATION:return tt("[invitation ready for authentication]",{Kind:e,invitation:o}),r({type:`readyForAuthentication${e}Invitation`,invitation:o});case we.State.AUTHENTICATING:return tt("[invitation authenticating]",{Kind:e,invitation:o}),r({type:`authenticating${e}Invitation`,invitation:o});case we.State.SUCCESS:return tt("[invitation success]",{Kind:e,invitation:o}),r({type:`success${e}Invitation`,invitation:o}),i==null?void 0:i();case we.State.CANCELLED:return tt.warn("[invitation cancelled]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"cancelled"});case we.State.TIMEOUT:return tt.error("[invitation timeout]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"timeout"})}},o=>o instanceof Ke.AlreadyJoinedError?(tt("[already joined]",{Kind:e,error:o}),r({type:`success${e}Invitation`,invitation:t.get()}),i==null?void 0:i()):(tt.error("[invitation errored]",{Kind:e,error:o}),r({type:`fail${e}Invitation`,reason:"error"}),n==null?void 0:n(o)))}),H1=(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 i,o;if(e!=="Space")return!1;{const a=(o=(i=n.space.invitation)==null?void 0:i.spaceKey)==null?void 0:o.toHex(),s=n.space.succeededKeys;return a?!!(s!=null&&s.has(a)):!1}},target:t,actions:"log"},{cond:n=>{const i=n[e.toLowerCase()].invitation;return!i||(i==null?void 0:i.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:[Yt({[e.toLowerCase()]:(n,i)=>({...n[e.toLowerCase()],failReason:i.reason})}),"log"]}}}},on:{[`set${e}InvitationCode`]:{target:`.acceptingRedeemed${e}Invitation`,actions:[Yt({[e.toLowerCase()]:(n,i)=>({...n[e.toLowerCase()],unredeemedCode:i.code,succeededKeys:i.succeededKeys})}),`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]}}}),q9=fd({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:H1("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:H1("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:Yt({identity:(e,t)=>t.identity}),unsetIdentity:Yt({identity:()=>null}),resetInvitation:Yt({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:Yt({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)=>{tt("[transition]",{event:t,haloInvitation:e.halo.invitation,spaceInvitation:e.space.invitation})}}}),V1=(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 tt.catch(r),t}},Y9=(e,t)=>{const r=c.useCallback(({halo:a})=>{if(a.unredeemedCode)try{const s=ln.InvitationEncoder.decode(V1("halo",a.unredeemedCode)),l=e.halo.join(s);return{...a,invitationObservable:l,invitationSubscribable:z1("Halo",l)}}catch(s){return tt.error("Could not redeem device invitation code",s),a}else return a},[e]),n=c.useCallback(({space:a})=>{if(a.unredeemedCode)try{const s=ln.InvitationEncoder.decode(V1("space",a.unredeemedCode)),l=e.spaces.join(s);return{...a,invitationObservable:l,invitationSubscribable:z1("Space",l)}}catch(s){return tt.error("Could not redeem space invitation code",s),a}else return a},[e]),i=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]),o=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 dd(q9,{...t,actions:{...t==null?void 0:t.actions,redeemHaloInvitationCode:Yt({halo:r}),redeemSpaceInvitationCode:Yt({space:n}),invalidateHaloInvitationCode:Yt({halo:i}),invalidateSpaceInvitationCode:Yt({space:o})}})},J9=e=>{const t=!e.active,{send:r}=e,{t:n}=it("os"),i={disabled:t,after:c.createElement(Ye.CaretRight,{className:qe(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(Cu,{...i,description:n("create identity description"),before:c.createElement(Ye.Plus,{className:qe(6)}),onClick:()=>r({type:"createIdentity"}),"data-autofocus":"choosingAuthMethod","data-testid":"identity-chooser.create-identity"},n("create identity label")),c.createElement(Cu,{...i,description:n("join identity description"),before:c.createElement(Ye.QrCode,{className:qe(6)}),onClick:()=>r({type:"acceptHaloInvitation"}),"data-testid":"identity-chooser.join-identity"},n("join identity label")),c.createElement(Cu,{...i,disabled:!0,description:n("recover identity description"),before:c.createElement(Ye.Textbox,{className:qe(6)}),onClick:()=>r({type:"recoverIdentity"}),"data-testid":"identity-chooser.recover-identity"},n("recover identity label"))))},X9=e=>{var v,y;const{mode:t,addedIdentity:r,active:n,send:i,onDone:o,doneActionParent:a}=e,s=!n,{t:l}=it("os"),u=r==null?void 0:r.identityKey.toHex(),d=St("identityListItem__label"),p=vs(u??"",12),h=((v=r==null?void 0:r.profile)==null?void 0:v.displayName)??(r&&Au(r==null?void 0:r.identityKey.toHex())),m=c.createElement(lt,{...o&&{onClick:()=>o(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(Pt.Root,{status:"active",labelId:d},c.createElement(Pt.Frame,null,c.createElement(Pt.Fallback,{href:p})),c.createElement(Pt.Label,{classNames:ue("text-lg truncate",!((y=r==null?void 0:r.profile)!=null&&y.displayName)&&"font-mono")},h))),c.createElement(qt,null,t==="halo-only"?a?c.cloneElement(a,{},m):m:c.createElement(lt,{variant:"primary",disabled:s||!r,onClick:()=>r&&i({type:"selectIdentity",identity:r}),"data-autofocus":"confirmingAddedIdentity"},l("continue label"))))},Z9=e=>{const{send:t,method:r}=e,n=r==="recover identity",i=Ke.useClient(),{t:o}=it("os"),[a,s]=c.useState(""),l=u=>{i.halo.createIdentity({[n?"seedphrase":"displayName"]:u}).then(d=>{t==null||t({type:"selectIdentity",identity:d})},d=>{tt.catch(d),s(o(n?"failed to recover identity message":"failed to create identity message"))})};return c.createElement(Q9,{...e,onDisplayNameConfirm:l,validationMessage:a})},Q9=e=>{const{method:t,send:r,active:n,onDisplayNameConfirm:i,validationMessage:o}=e,a=!n,{t:s}=it("os"),[l,u]=c.useState(""),d=t==="recover identity";return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(ra,{validationMessage:o,label:c.createElement(xr,null,s(d?"recover identity input label":"new identity input label")),disabled:a,"data-testid":"identity-input",placeholder:d?"Type your recovery phrase":"Type a display name",onChange:({target:{value:p}})=>u(p)})),c.createElement(qt,null,c.createElement(lt,{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(lt,{variant:"primary",disabled:a,onClick:()=>i==null?void 0:i(l),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-continue`},s("continue label"))))},G1=e=>{const{active:t,Kind:r,doneActionParent:n,onDone:i}=e,o=!t,{t:a}=it("os"),s=c.createElement(lt,{variant:"primary",onClick:i,disabled:o,"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(qt,null,n?c.cloneElement(n,{},s):s))},eB=e=>{try{const t=new URLSearchParams(e.substring(e.lastIndexOf("?")));return t.get("spaceInvitationCode")??t.get("deviceInvitationCode")??e}catch(t){return tt.catch(t),e}},K1=e=>{const{Kind:t,active:r,send:n,unredeemedCode:i,onExit:o,exitActionParent:a,onDone:s,doneActionParent:l,succeededKeys:u}=e,d=!r,{t:p}=it("os"),[h,m]=c.useState(i??"");c.useEffect(()=>{i&&m(i??"")},[i]);const v=()=>{h.trim().length!==0&&n({type:`set${t}InvitationCode`,code:eB(h),...t==="Space"&&{succeededKeys:u}})},y=c.createElement(lt,{variant:"ghost",disabled:d,...o?{onClick:()=>o()}:{onClick:()=>s==null?void 0:s(null)},"data-testid":"join-exit"},p("cancel label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(ra,{label:c.createElement(xr,null,p("invitation input label")),placeholder:"Type an invitation code",disabled:d,value:h,onChange:({target:{value:w}})=>m(w),"data-autofocus":`inputting${t}InvitationCode`,"data-testid":`${t.toLowerCase()}-invitation-input`,onKeyUp:({key:w})=>w==="Enter"&&v()})),c.createElement(qt,null,t==="Halo"?c.createElement(lt,{variant:"ghost",disabled:d,onClick:()=>n({type:"deselectAuthMethod"}),"data-testid":`${t.toLowerCase()}-invitation-input-back`},p("back label")):a?c.cloneElement(a,{},y):l?c.cloneElement(l,{},y):y,c.createElement(lt,{variant:"primary",disabled:d,onClick:v,"data-testid":`${t.toLowerCase()}-invitation-input-continue`},p("continue label"))))},tB=({invitationState:e,onInvitationCancel:t,active:r,send:n,Kind:i,failReason:o})=>{const{t:a}=it("os");return o?c.createElement(c.Fragment,null,c.createElement(xr,{className:It},a(o==="timeout"?"timeout status label":o==="cancelled"?"cancelled status label":"error status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(qt,null,c.createElement(lt,{disabled:!r,onClick:()=>n({type:`reset${i}Invitation`}),"data-testid":"invitation-rescuer-reset"},a("reset label")))):c.createElement(c.Fragment,null,c.createElement(xr,{className:It},a("connecting status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(qt,null,c.createElement(lt,{disabled:!0,classNames:"order-2","data-testid":"next"},a("next label")),c.createElement(lt,{disabled:!r,onClick:t,"data-testid":"invitation-rescuer-cancel"},a("cancel label"))))},q1=e=>{const{Kind:t,invitationState:r,active:n,send:i}=e,{t:o}=it("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:It},"There was a problem joining the space")),c.createElement(qt,null,c.createElement(lt,{disabled:!n,"data-testid":"invitation-rescuer-blank-reset",onClick:()=>i({type:`reset${t}Invitation`})},o("reset label")))):c.createElement(tB,{...e}))},Y1=6,J1=({failed:e,Kind:t,active:r,pending:n,invitationId:i,onInvitationAuthenticate:o,onInvitationCancel:a})=>{const s=!r||n,{t:l}=it("os"),u=t.toLowerCase(),[d,p]=c.useState(""),h=({target:{value:m}})=>{var v;p(m),m.length===Y1&&((v=document.querySelector(`[data-autofocus-pinlength="${u}"]`))==null||v.focus())};return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},i&&c.createElement(Bf,{text:Ff(i)}),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:Y1,onChange:h,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(qt,null,c.createElement(lt,{variant:"ghost",disabled:s,onClick:()=>a==null?void 0:a(),"data-testid":`${u}-invitation-authenticator-cancel`},l("cancel label")),c.createElement(lt,{variant:"primary",disabled:s,onClick:()=>o==null?void 0:o(d),"data-autofocus-pinlength":u,"data-testid":`${u}-invitation-authenticator-next`},l("next label"))))},rB=({send:e,active:t})=>{const r=Ke.useClient(),{t:n}=it("os"),[i,o]=c.useState(""),a=()=>{r.reset().then(()=>e==null?void 0:e({type:"resetIdentity"}),s=>{tt.catch(s),o(n("failed to reset identity message"))})};return c.createElement(nB,{disabled:!t,validationMessage:i,onConfirm:()=>a()})},nB=({disabled:e,validationMessage:t,onConfirm:r})=>{const{t:n}=it("os"),i=n("confirmation value"),[o,a]=c.useState("");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(ra,{validationMessage:t,label:c.createElement(xr,null,n("reset identity input label",{confirmationValue:i})),disabled:e,"data-testid":"reset-identity-input",placeholder:i,onChange:({target:{value:s}})=>a(s)})),c.createElement(qt,null,c.createElement(lt,{variant:"primary",disabled:e||o!==i,onClick:()=>r==null?void 0:r(),"data-testid":"reset-identity-input-confirm"},n("confirm label"))))},Jt="pbs-1 pbe-3 pli-3",iB=e=>{const{titleId:t,send:r,activeView:n,failed:i,mode:o,unredeemedCodes:a,invitationStates:s,succeededKeys:l,failReasons:u,onExit:d,onHaloDone:p,onSpaceDone:h,exitActionParent:m,doneActionParent:v,onHaloInvitationCancel:y,onSpaceInvitationCancel:w,onHaloInvitationAuthenticate:E,onSpaceInvitationAuthenticate:_,IdentityInput:S=Z9,ResetIdentity:$=rB}=e;return c.createElement(Oi,{density:"fine"},o!=="halo-only"&&c.createElement(K9,{titleId:t,mode:o,onExit:d,exitActionParent:m}),c.createElement(ct.Root,{focusManaged:!0,activeView:n},c.createElement(ct.Views,null,c.createElement(ct.View,{classNames:Jt,id:"addition method chooser"},c.createElement(J9,{send:r,active:n==="addition method chooser"})),c.createElement(ct.View,{classNames:Jt,id:"reset identity confirmation"},c.createElement($,{send:r,method:"reset identity",active:n==="reset identity confirmation"})),c.createElement(ct.View,{classNames:Jt,id:"create identity input"},c.createElement(S,{send:r,method:"create identity",active:n==="create identity input"})),c.createElement(ct.View,{classNames:Jt,id:"recover identity input"},c.createElement(S,{send:r,method:"recover identity",active:n==="recover identity input"})),c.createElement(ct.View,{classNames:Jt,id:"halo invitation input"},c.createElement(K1,{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(ct.View,{classNames:Jt,id:"halo invitation rescuer"},c.createElement(q1,{send:r,Kind:"Halo",active:n==="halo invitation rescuer",invitationState:s==null?void 0:s.Halo,onInvitationCancel:y,failReason:u==null?void 0:u.Halo})),c.createElement(ct.View,{classNames:Jt,id:"halo invitation authenticator"},c.createElement(J1,{send:r,Kind:"Halo",active:n==="halo invitation authenticator",onInvitationCancel:y,onInvitationAuthenticate:E,...i.has("Halo")&&{failed:!0}})),c.createElement(ct.View,{classNames:Jt,id:"halo invitation accepted"},c.createElement(G1,{send:r,Kind:"Halo",active:n==="halo invitation accepted",doneActionParent:v,onDone:p})),c.createElement(ct.View,{classNames:Jt,id:"identity added"},c.createElement(X9,{send:r,mode:o,active:n==="identity added",doneActionParent:v,onDone:p})),c.createElement(ct.View,{classNames:Jt,id:"space invitation input"},c.createElement(K1,{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:d,exitActionParent:m})),c.createElement(ct.View,{classNames:Jt,id:"space invitation rescuer"},c.createElement(q1,{send:r,Kind:"Space",active:n==="space invitation rescuer",invitationState:s==null?void 0:s.Space,onInvitationCancel:w,failReason:u==null?void 0:u.Space})),c.createElement(ct.View,{classNames:Jt,id:"space invitation authenticator"},c.createElement(J1,{send:r,Kind:"Space",active:n==="space invitation authenticator",onInvitationCancel:w,onInvitationAuthenticate:_,...i.has("Space")&&{failed:!0}})),c.createElement(ct.View,{classNames:Jt,id:"space invitation accepted"},c.createElement(G1,{send:r,Kind:"Space",active:n==="space invitation accepted",doneActionParent:v,onDone:h})))))},oB=({titleId:e,mode:t="default",initialInvitationCode:r,exitActionParent:n,onExit:i,doneActionParent:o,onDone:a})=>{const s=Ke.useClient(),l=vo.useIdentity(),{hasIosKeyboard:u}=Pe(),d=St("joinPanel__heading",e),[p,h,m]=Y9(s,{context:{mode:t,identity:l,...r&&{[t==="halo-only"?"halo":"space"]:{unredeemedCode:r}}}});c.useEffect(()=>m.subscribe(T=>{tt("[state]",T)}).unsubscribe,[m]),c.useEffect(()=>{const C=p.configuration[0].id.split("."),T=C[C.length-1],D=T==="finishingJoining"?"successSpaceInvitation":T,j=document.querySelector(`[data-autofocus~="${D}"]`);j&&!(u&&j.hasAttribute("data-prevent-ios-autofocus"))&&j.focus()},[p.value,u]);const v=c.useMemo(()=>{switch(!0){case p.matches({choosingIdentity:"choosingAuthMethod"}):return"addition method chooser";case p.matches("resettingIdentity"):return"reset identity confirmation";case p.matches({choosingIdentity:"creatingIdentity"}):return"create identity input";case p.matches({choosingIdentity:"recoveringIdentity"}):return"recover identity input";case p.matches({choosingIdentity:{acceptingHaloInvitation:"inputtingHaloInvitationCode"}}):return"halo invitation input";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"connectingHaloInvitation"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"failingHaloInvitation"}}}].some(p.matches):return"halo invitation rescuer";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"inputtingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticatingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}].some(p.matches):return"halo invitation authenticator";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"successHaloInvitation"}}},"finishingJoiningHalo"].some(p.matches):return"halo invitation accepted";case p.matches({choosingIdentity:"confirmingAddedIdentity"}):return"identity added";case p.matches({acceptingSpaceInvitation:"inputtingSpaceInvitationCode"}):return"space invitation input";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"connectingSpaceInvitation"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"failingSpaceInvitation"}}].some(p.matches):return"space invitation rescuer";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"inputtingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticatingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}].some(p.matches):return"space invitation authenticator";case p.matches("finishingJoiningSpace"):return"space invitation accepted";default:return"never"}},[p]),y=c.useMemo(()=>{const C=new Set;switch(!0){case p.matches({choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}):C.add("Halo");break;case p.matches({acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}):C.add("Space");break}return C},[p]),w=c.useMemo(()=>({Halo:p.context.halo.unredeemedCode,Space:p.context.space.unredeemedCode}),[p]),E=Ke.useMulticastObservable(s.spaces),_=c.useMemo(()=>({Space:E?new Set(E.map(({key:C})=>C.toHex())):void 0}),[E]),S=c.useMemo(()=>{var C,T;return{Halo:(C=p.context.halo.invitationObservable)==null?void 0:C.get().state,Space:(T=p.context.space.invitationObservable)==null?void 0:T.get().state}},[p]),$=c.useMemo(()=>({Halo:p.context.halo.failReason,Space:p.context.space.failReason}),[p]),k=c.useCallback(()=>{var C,T,D,j;a==null||a({identityKey:((C=p.context.halo.invitation)==null?void 0:C.identityKey)??null,swarmKey:((T=p.context.halo.invitation)==null?void 0:T.swarmKey)??null,spaceKey:((D=p.context.halo.invitation)==null?void 0:D.spaceKey)??null,target:((j=p.context.halo.invitation)==null?void 0:j.target)??null})},[p,a]),P=c.useCallback(()=>{var C,T,D,j;a==null||a({identityKey:((C=p.context.space.invitation)==null?void 0:C.identityKey)??null,swarmKey:((T=p.context.space.invitation)==null?void 0:T.swarmKey)??null,spaceKey:((D=p.context.space.invitation)==null?void 0:D.spaceKey)??null,target:((j=p.context.space.invitation)==null?void 0:j.target)??null})},[p,a]);return c.createElement(iB,{titleId:d,mode:t,send:h,activeView:v,failed:y,failReasons:$,pending:["connecting","authenticating"].some(C=>p==null?void 0:p.configuration[0].id.includes(C)),unredeemedCodes:w,invitationStates:S,succeededKeys:_,identity:l,onExit:i,exitActionParent:n,doneActionParent:o,onHaloDone:k,onSpaceDone:P,onHaloInvitationCancel:()=>{var C;return(C=p.context.halo.invitationObservable)==null?void 0:C.cancel()},onSpaceInvitationCancel:()=>{var C;return(C=p.context.space.invitationObservable)==null?void 0:C.cancel()},onHaloInvitationAuthenticate:C=>{var T;return h({type:"authenticateHaloVerificationCode"}),(T=p.context.halo.invitationObservable)==null?void 0:T.authenticate(C)},onSpaceInvitationAuthenticate:C=>{var T;return h({type:"authenticateSpaceVerificationCode"}),(T=p.context.space.invitationObservable)==null?void 0:T.authenticate(C)}})},aB=fd({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:Yt({invitation:(e,t)=>(t==null?void 0:t.invitation)??null}),unsetInvitation:Yt({invitation:()=>{}}),log:(e,t)=>{tt("[transition]",{event:t,context:e})}}}),sB=e=>dd(aB,{...e,context:{...e==null?void 0:e.context}}),X1="dxos:react-shell/space-manager/active-action",lB=e=>{const{space:t,target:r}=e,{t:n}=it("os"),i=Ke.useConfig(),o=Ca.useSpaceInvitations(t==null?void 0:t.key),a=c.useCallback(l=>{const u=ln.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:Ye.UserPlus,onClick:c.useCallback(()=>{var u,d,p,h;const l=(u=t.share)==null?void 0:u.call(t,{type:we.Type.INTERACTIVE,authMethod:we.AuthMethod.SHARED_SECRET,target:r});l&&((h=(p=(d=i.values.runtime)==null?void 0:d.app)==null?void 0:p.env)==null?void 0:h.DX_ENVIRONMENT)!=="production"&&l.subscribe(a)},[t])},inviteMany:{label:n("invite many label"),description:n("invite many description"),icon:Ye.UsersThree,onClick:c.useCallback(()=>{var u,d,p,h;const l=(u=t.share)==null?void 0:u.call(t,{type:we.Type.MULTIUSE,authMethod:we.AuthMethod.NONE,target:r});l&&((h=(p=(d=i.values.runtime)==null?void 0:d.app)==null?void 0:p.env)==null?void 0:h.DX_ENVIRONMENT)!=="production"&&l.subscribe(a)},[t])}};return c.createElement(cB,{...e,invitations:o,inviteActions:s})},Z1="pis-3 pie-1 plb-1 mbe-1 font-medium",cB=e=>{const{active:t,space:r,createInvitationUrl:n,send:i,inviteActions:o,invitations:a,showInactiveInvitations:s,SpaceMemberList:l=w4,InvitationList:u=vM}=e,{t:d}=it("os"),p=o??{noopInvite:{label:d("create space invitation label"),description:"",icon:Ye.Placeholder,onClick:()=>{}}},[h,m]=c.useState(localStorage.getItem(X1)??"inviteOne"),v=w=>{m(w),localStorage.setItem(X1,w)},y=s?a:a==null?void 0:a.filter(w=>![we.State.CANCELLED].includes(w.get().state));return c.createElement(c.Fragment,null,c.createElement(ys.Root,{classNames:"grow shrink basis-28 -mli-2"},c.createElement(ys.Viewport,{classNames:"is-full pie-2"},!!(y!=null&&y.length)&&c.createElement(c.Fragment,null,c.createElement("h3",{className:ue(Z1,It)},d("invitation list heading")),c.createElement(u,{className:"mb-2",send:i,invitations:y??[],onClickRemove:w=>w.cancel(),createInvitationUrl:n}),c.createElement("h3",{className:ue(Z1,It,"mbs-2")},d("space member list heading"))),c.createElement(l,{spaceKey:r.key,includeSelf:!0})),c.createElement(ys.Scrollbar,{orientation:"vertical"},c.createElement(ys.Thumb,null))),c.createElement(qt,null,c.createElement(bM,{disabled:!t,actions:p,activeAction:h,onChangeActiveAction:v,"data-testid":"spaces-panel.create-invitation"})))},uB=({titleId:e,space:t,onDone:r})=>{const{t:n}=it("os"),i=t.properties.name;return c.createElement(jf,{titleId:e,title:n("space panel heading"),corner:c.createElement(Bb,{"data-testid":"identity-panel-done",onDone:r})},c.createElement("div",{role:"none",className:"flex gap-4 items-center justify-center mlb-4"},c.createElement(Ye.Planet,{size:32}),c.createElement("div",{className:"block text-start font-light text-xl"},i??t.key.truncate())))},Q1=e=>{const{titleId:t,activeView:r,space:n,target:i,SpaceManager:o=lB,InvitationManager:a=U1,...s}=e;return c.createElement(Oi,{density:"fine"},c.createElement(uB,{...s,titleId:t,space:n}),c.createElement(ct.Root,{activeView:r},c.createElement(ct.Views,null,c.createElement(ct.View,{id:"space manager",classNames:Jt},c.createElement(o,{active:r==="space manager",space:n,target:i,...s})),c.createElement(ct.View,{id:"space invitation manager",classNames:Jt},c.createElement(a,{active:r==="space invitation manager",...s,invitationUrl:e.invitationUrl})))))},fB=({invitation:e,...t})=>{const r=xf(e);return c.createElement(Q1,{...t,...r,invitationUrl:t.createInvitationUrl(r.invitationCode)})},dB=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=St("spacePanel__heading",e),[i,o,a]=sB({context:{space:r.space}});c.useEffect(()=>a.subscribe(d=>{tt("[state]",d)}).unsubscribe,[a]);const s=c.useMemo(()=>{switch(!0){case i.matches("managingSpace"):return"space manager";case i.matches("managingSpaceInvitation"):return"space invitation manager";default:return"never"}},[i]),l={...r,activeView:s,send:o,titleId:n,createInvitationUrl:t};return i.context.invitation?c.createElement(fB,{...l,invitation:i.context.invitation}):c.createElement(Q1,{...l})},pB=e=>{const t=St("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($u,null,c.createElement(G9,{...e,titleId:t,doneActionParent:c.createElement(Fr.Close,{asChild:!0})}))))))},ew=e=>{const t=St("joinDialog__title"),{height:r}=WO();return c.createElement(Ai.Root,{defaultOpen:!0,onOpenChange:n=>{var i;return n||(e.onExit?e.onExit():(i=e.onDone)==null?void 0:i.call(e,null))}},c.createElement(Ai.Portal,null,c.createElement(Ai.Overlay,{classNames:"backdrop-blur",...r&&{style:{blockSize:`${r}px`}}},c.createElement(Ai.Content,{"aria-labelledby":t},c.createElement(oB,{...e,titleId:t,exitActionParent:c.createElement(Ai.Cancel,{asChild:!0}),doneActionParent:c.createElement(Ai.Action,{asChild:!0})})))))};var gd,xl=sn;if(process.env.NODE_ENV==="production")gd=xl.createRoot,xl.hydrateRoot;else{var tw=xl.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;gd=function(e,t){tw.usingClientEntryPoint=!0;try{return xl.createRoot(e,t)}finally{tw.usingClientEntryPoint=!1}}}var md={exports:{}};(function(e,t){(function(r,n){var i="1.0.35",o="",a="?",s="function",l="undefined",u="object",d="string",p="major",h="model",m="name",v="type",y="vendor",w="version",E="architecture",_="console",S="mobile",$="tablet",k="smarttv",P="wearable",C="embedded",T=350,D="Amazon",j="Apple",F="ASUS",M="BlackBerry",Z="Browser",Y="Chrome",X="Edge",ne="Firefox",oe="Google",ce="Huawei",se="LG",ge="Microsoft",le="Motorola",V="Opera",J="Samsung",re="Sharp",de="Sony",H="Xiaomi",G="Zebra",B="Facebook",z="Chromium OS",K="Mac OS",I=function(Se,je){var b={};for(var f in Se)je[f]&&je[f].length%2===0?b[f]=je[f].concat(Se[f]):b[f]=Se[f];return b},N=function(Se){for(var je={},b=0;b<Se.length;b++)je[Se[b].toUpperCase()]=Se[b];return je},Q=function(Se,je){return typeof Se===d?ie(je).indexOf(ie(Se))!==-1:!1},ie=function(Se){return Se.toLowerCase()},pe=function(Se){return typeof Se===d?Se.replace(/[^\d\.]/g,o).split(".")[0]:n},ye=function(Se,je){if(typeof Se===d)return Se=Se.replace(/^\s\s*/,o),typeof je===l?Se:Se.substring(0,T)},_e=function(Se,je){for(var b=0,f,g,x,O,L,W;b<je.length&&!L;){var me=je[b],ke=je[b+1];for(f=g=0;f<me.length&&!L&&me[f];)if(L=me[f++].exec(Se),L)for(x=0;x<ke.length;x++)W=L[++g],O=ke[x],typeof O===u&&O.length>0?O.length===2?typeof O[1]==s?this[O[0]]=O[1].call(this,W):this[O[0]]=O[1]:O.length===3?typeof O[1]===s&&!(O[1].exec&&O[1].test)?this[O[0]]=W?O[1].call(this,W,O[2]):n:this[O[0]]=W?W.replace(O[1],O[2]):n:O.length===4&&(this[O[0]]=W?O[3].call(this,W.replace(O[1],O[2])):n):this[O]=W||n;b+=2}},xe=function(Se,je){for(var b in je)if(typeof je[b]===u&&je[b].length>0){for(var f=0;f<je[b].length;f++)if(Q(je[b][f],Se))return b===a?n:b}else if(Q(je[b],Se))return b===a?n:b;return Se},ae={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Me={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"},at={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[w,[m,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[w,[m,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[m,w],[/opios[\/ ]+([\w\.]+)/i],[w,[m,V+" Mini"]],[/\bopr\/([\w\.]+)/i],[w,[m,V]],[/(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],[m,w],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[w,[m,"UC"+Z]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[w,[m,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[w,[m,"WeChat"]],[/konqueror\/([\w\.]+)/i],[w,[m,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[w,[m,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[w,[m,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[m,/(.+)/,"$1 Secure "+Z],w],[/\bfocus\/([\w\.]+)/i],[w,[m,ne+" Focus"]],[/\bopt\/([\w\.]+)/i],[w,[m,V+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[w,[m,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[w,[m,"Dolphin"]],[/coast\/([\w\.]+)/i],[w,[m,V+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[w,[m,"MIUI "+Z]],[/fxios\/([-\w\.]+)/i],[w,[m,ne]],[/\bqihu|(qi?ho?o?|360)browser/i],[[m,"360 "+Z]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[m,/(.+)/,"$1 "+Z],w],[/(comodo_dragon)\/([\w\.]+)/i],[[m,/_/g," "],w],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[m,w],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[m],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[m,B],w],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[m,w],[/\bgsa\/([\w\.]+) .*safari\//i],[w,[m,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[w,[m,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[w,[m,Y+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[m,Y+" WebView"],w],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[w,[m,"Android "+Z]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[m,w],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[w,[m,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[w,m],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[m,[w,xe,ae]],[/(webkit|khtml)\/([\w\.]+)/i],[m,w],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[m,"Netscape"],w],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[w,[m,ne+" 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],[m,w],[/(cobalt)\/([\w\.]+)/i],[m,[w,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[E,"amd64"]],[/(ia32(?=;))/i],[[E,ie]],[/((?:i[346]|x)86)[;\)]/i],[[E,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[E,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[E,"armhf"]],[/windows (ce|mobile); ppc;/i],[[E,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[E,/ower/,o,ie]],[/(sun4\w)[;\)]/i],[[E,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[E,ie]]],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],[h,[y,J],[v,$]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[h,[y,J],[v,S]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[h,[y,j],[v,S]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[h,[y,j],[v,$]],[/(macintosh);/i],[h,[y,j]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[h,[y,re],[v,S]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[h,[y,ce],[v,$]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[h,[y,ce],[v,S]],[/\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],[[h,/_/g," "],[y,H],[v,S]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[h,/_/g," "],[y,H],[v,$]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[h,[y,"OPPO"],[v,S]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[h,[y,"Vivo"],[v,S]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[h,[y,"Realme"],[v,S]],[/\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],[h,[y,le],[v,S]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[h,[y,le],[v,$]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[h,[y,se],[v,$]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[h,[y,se],[v,S]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[h,[y,"Lenovo"],[v,$]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[h,/_/g," "],[y,"Nokia"],[v,S]],[/(pixel c)\b/i],[h,[y,oe],[v,$]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[h,[y,oe],[v,S]],[/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],[h,[y,de],[v,S]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[h,"Xperia Tablet"],[y,de],[v,$]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[h,[y,"OnePlus"],[v,S]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[h,[y,D],[v,$]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[h,/(.+)/g,"Fire Phone $1"],[y,D],[v,S]],[/(playbook);[-\w\),; ]+(rim)/i],[h,y,[v,$]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[h,[y,M],[v,S]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[h,[y,F],[v,$]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[h,[y,F],[v,S]],[/(nexus 9)/i],[h,[y,"HTC"],[v,$]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[y,[h,/_/g," "],[v,S]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[h,[y,"Acer"],[v,$]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[h,[y,"Meizu"],[v,S]],[/(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],[y,h,[v,S]],[/(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],[y,h,[v,$]],[/(surface duo)/i],[h,[y,ge],[v,$]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[h,[y,"Fairphone"],[v,S]],[/(u304aa)/i],[h,[y,"AT&T"],[v,S]],[/\bsie-(\w*)/i],[h,[y,"Siemens"],[v,S]],[/\b(rct\w+) b/i],[h,[y,"RCA"],[v,$]],[/\b(venue[\d ]{2,7}) b/i],[h,[y,"Dell"],[v,$]],[/\b(q(?:mv|ta)\w+) b/i],[h,[y,"Verizon"],[v,$]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[h,[y,"Barnes & Noble"],[v,$]],[/\b(tm\d{3}\w+) b/i],[h,[y,"NuVision"],[v,$]],[/\b(k88) b/i],[h,[y,"ZTE"],[v,$]],[/\b(nx\d{3}j) b/i],[h,[y,"ZTE"],[v,S]],[/\b(gen\d{3}) b.+49h/i],[h,[y,"Swiss"],[v,S]],[/\b(zur\d{3}) b/i],[h,[y,"Swiss"],[v,$]],[/\b((zeki)?tb.*\b) b/i],[h,[y,"Zeki"],[v,$]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[y,"Dragon Touch"],h,[v,$]],[/\b(ns-?\w{0,9}) b/i],[h,[y,"Insignia"],[v,$]],[/\b((nxa|next)-?\w{0,9}) b/i],[h,[y,"NextBook"],[v,$]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[y,"Voice"],h,[v,S]],[/\b(lvtel\-)?(v1[12]) b/i],[[y,"LvTel"],h,[v,S]],[/\b(ph-1) /i],[h,[y,"Essential"],[v,S]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[h,[y,"Envizen"],[v,$]],[/\b(trio[-\w\. ]+) b/i],[h,[y,"MachSpeed"],[v,$]],[/\btu_(1491) b/i],[h,[y,"Rotor"],[v,$]],[/(shield[\w ]+) b/i],[h,[y,"Nvidia"],[v,$]],[/(sprint) (\w+)/i],[y,h,[v,S]],[/(kin\.[onetw]{3})/i],[[h,/\./g," "],[y,ge],[v,S]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[h,[y,G],[v,$]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[h,[y,G],[v,S]],[/smart-tv.+(samsung)/i],[y,[v,k]],[/hbbtv.+maple;(\d+)/i],[[h,/^/,"SmartTV"],[y,J],[v,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[y,se],[v,k]],[/(apple) ?tv/i],[y,[h,j+" TV"],[v,k]],[/crkey/i],[[h,Y+"cast"],[y,oe],[v,k]],[/droid.+aft(\w)( bui|\))/i],[h,[y,D],[v,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[h,[y,re],[v,k]],[/(bravia[\w ]+)( bui|\))/i],[h,[y,de],[v,k]],[/(mitv-\w{5}) bui/i],[h,[y,H],[v,k]],[/Hbbtv.*(technisat) (.*);/i],[y,h,[v,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[y,ye],[h,ye],[v,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[v,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[y,h,[v,_]],[/droid.+; (shield) bui/i],[h,[y,"Nvidia"],[v,_]],[/(playstation [345portablevi]+)/i],[h,[y,de],[v,_]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[h,[y,ge],[v,_]],[/((pebble))app/i],[y,h,[v,P]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[h,[y,j],[v,P]],[/droid.+; (glass) \d/i],[h,[y,oe],[v,P]],[/droid.+; (wt63?0{2,3})\)/i],[h,[y,G],[v,P]],[/(quest( 2| pro)?)/i],[h,[y,B],[v,P]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[y,[v,C]],[/(aeobc)\b/i],[h,[y,D],[v,C]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[h,[v,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[h,[v,$]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[v,$]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[v,S]],[/(android[-\w\. ]{0,9});.+buil/i],[h,[y,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[w,[m,X+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[w,[m,"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],[m,w],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[w,m]],os:[[/microsoft (windows) (vista|xp)/i],[m,w],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[m,[w,xe,Me]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[m,"Windows"],[w,xe,Me]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[w,/_/g,"."],[m,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[m,K],[w,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[w,m],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[m,w],[/\(bb(10);/i],[w,[m,M]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[w,[m,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[w,[m,ne+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[w,[m,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[w,[m,"watchOS"]],[/crkey\/([\d\.]+)/i],[w,[m,Y+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[m,z],w],[/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],[m,w],[/(sunos) ?([\w\.\d]*)/i],[[m,"Solaris"],w],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[m,w]]},Oe=function(Se,je){if(typeof Se===u&&(je=Se,Se=n),!(this instanceof Oe))return new Oe(Se,je).getResult();var b=typeof r!==l&&r.navigator?r.navigator:n,f=Se||(b&&b.userAgent?b.userAgent:o),g=b&&b.userAgentData?b.userAgentData:n,x=je?I(at,je):at,O=b&&b.userAgent==f;return this.getBrowser=function(){var L={};return L[m]=n,L[w]=n,_e.call(L,f,x.browser),L[p]=pe(L[w]),O&&b&&b.brave&&typeof b.brave.isBrave==s&&(L[m]="Brave"),L},this.getCPU=function(){var L={};return L[E]=n,_e.call(L,f,x.cpu),L},this.getDevice=function(){var L={};return L[y]=n,L[h]=n,L[v]=n,_e.call(L,f,x.device),O&&!L[v]&&g&&g.mobile&&(L[v]=S),O&&L[h]=="Macintosh"&&b&&typeof b.standalone!==l&&b.maxTouchPoints&&b.maxTouchPoints>2&&(L[h]="iPad",L[v]=$),L},this.getEngine=function(){var L={};return L[m]=n,L[w]=n,_e.call(L,f,x.engine),L},this.getOS=function(){var L={};return L[m]=n,L[w]=n,_e.call(L,f,x.os),O&&!L[m]&&g&&g.platform!="Unknown"&&(L[m]=g.platform.replace(/chrome os/i,z).replace(/macos/i,K)),L},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 f},this.setUA=function(L){return f=typeof L===d&&L.length>T?ye(L,T):L,this},this.setUA(f),this};Oe.VERSION=i,Oe.BROWSER=N([m,w,p]),Oe.CPU=N([E]),Oe.DEVICE=N([h,y,v,_,S,k,$,P,C]),Oe.ENGINE=Oe.OS=N([m,w]),e.exports&&(t=e.exports=Oe),t.UAParser=Oe;var Re=typeof r!==l&&(r.jQuery||r.Zepto);if(Re&&!Re.ua){var gt=new Oe;Re.ua=gt.getResult(),Re.ua.get=function(){return gt.getUA()},Re.ua.set=function(Se){gt.setUA(Se);var je=gt.getResult();for(var b in je)Re.ua[b]=je[b]}}})(typeof window=="object"?window:et)})(md,md.exports);var hB=md.exports,Sl="/home/runner/work/dxos/dxos/packages/core/mesh/rpc-tunnel/src/ports/iframe.ts",vd,yd;if(typeof navigator<"u"){const e=new hB.UAParser(navigator.userAgent);vd=e.getBrowser().name,yd=e.getOS().name}var gB=(e,t,r)=>{if(!e.contentWindow){tt("IFrame content window missing",{origin:t},{F:Sl,L:24,S:void 0,C:(n,i)=>n(...i)});return}vd==="Chrome"&&yd==="iOS"?e.contentWindow.postMessage(r,t):e.contentWindow.postMessage(r,t,[r.payload])},mB=(e,t)=>{vd==="Chrome"&&yd==="iOS"?window.parent.postMessage(t,e):window.parent.postMessage(t,e,[t.payload])},rw=({channel:e,iframe:t,origin:r,onOrigin:n})=>({send:async i=>{if(!r){tt("no origin set",{channel:e},{F:Sl,L:62,S:void 0,C:(s,l)=>s(...l)});return}tt("sending",{channel:e,data:i.length},{F:Sl,L:66,S:void 0,C:(s,l)=>s(...l)});const o=i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength),a={channel:e,payload:o};t?gB(t,r,a):mB(r,a)},subscribe:i=>{const o=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)),tt("received",l,{F:Sl,L:98,S:void 0,C:(u,d)=>u(...d)}),i(new Uint8Array(l.payload)))};return window.addEventListener("message",o),()=>window.removeEventListener("message",o)}});const vB=e=>{const t=St("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($u,null,c.createElement(dB,{...e,titleId:t,doneActionParent:c.createElement(Fr.Close,{asChild:!0})}))))))},yB=({runtime:e,origin:t})=>{const[{layout:r,invitationCode:n,spaceKey:i,target:o},a]=c.useState({layout:e.layout,invitationCode:e.invitationCode,spaceKey:e.spaceKey,target:e.target}),s=Ke.useClient(),l=Ca.useSpace(i);switch(c.useEffect(()=>e.layoutUpdate.on(u=>a(u)),[e]),c.useEffect(()=>{if(r===Ke.ShellLayout.SPACE&&!l){tt.warn("No space found for shell space invitations.");const u=setTimeout(async()=>{await e.setAppContext({display:Ke.ShellDisplay.NONE}),e.setLayout({layout:Ke.ShellLayout.DEFAULT})});return()=>clearTimeout(u)}},[e,r,l]),r){case Ke.ShellLayout.INITIALIZE_IDENTITY:return c.createElement(ew,{mode:"halo-only",initialInvitationCode:n,onDone:()=>{e.setAppContext({display:Ke.ShellDisplay.NONE}),e.setLayout({layout:Ke.ShellLayout.DEFAULT})}});case Ke.ShellLayout.IDENTITY:case Ke.ShellLayout.SHARE_IDENTITY:case Ke.ShellLayout.EDIT_PROFILE:return c.createElement(pB,{createInvitationUrl:u=>`${t}?deviceInvitationCode=${u}`,onResetDevice:async()=>{await s.reset(),await e.setAppContext({display:Ke.ShellDisplay.NONE,reload:!0})},onJoinNewIdentity:()=>e.setLayout({layout:Ke.ShellLayout.INITIALIZE_IDENTITY}),onDone:async()=>{await e.setAppContext({display:Ke.ShellDisplay.NONE}),e.setLayout({layout:Ke.ShellLayout.DEFAULT})}});case Ke.ShellLayout.SPACE:return l?c.createElement(vB,{space:l,target:o,createInvitationUrl:u=>`${t}?spaceInvitationCode=${u}`,onDone:async()=>{await e.setAppContext({display:Ke.ShellDisplay.NONE}),e.setLayout({layout:Ke.ShellLayout.DEFAULT})}}):null;case Ke.ShellLayout.JOIN_SPACE:return c.createElement(ew,{initialInvitationCode:n,onDone:async u=>{const d=(u==null?void 0:u.target)??void 0;await e.setAppContext({display:Ke.ShellDisplay.NONE,spaceKey:(u==null?void 0:u.spaceKey)??void 0,target:d}),e.setLayout({layout:Ke.ShellLayout.DEFAULT})},onExit:async()=>{await e.setAppContext({display:Ke.ShellDisplay.NONE}),e.setLayout({layout:Ke.ShellLayout.DEFAULT})}});default:return null}},bB={"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"}))},wB=async(e=new Ke.Config)=>{const t=new Ke.ClientServicesProxy(rw({channel:ln.DEFAULT_CLIENT_CHANNEL})),r=new Ke.Client({config:e,services:t}),n=new aw.ShellRuntimeImpl(rw({channel:ln.DEFAULT_SHELL_CHANNEL}));await Promise.all([n.open(),r.initialize()]),gd(document.getElementById("root")).render(c.createElement(c.StrictMode,null,c.createElement(lT,{tx:m4,resourceExtensions:[bB]},c.createElement(Ke.ClientContext.Provider,{value:{client:r,status:Ke.SystemStatus.ACTIVE}},c.createElement($u,null,c.createElement(Er.Provider,null,c.createElement(yB,{runtime:n,origin:location.origin})))))))};c.createContext({}),er.runShell=wB,Object.defineProperty(er,Symbol.toStringTag,{value:"Module"})});
216
+ //# sourceMappingURL=shell.umd.js.map