@oliasoft-open-source/charts-library 5.7.2 → 5.8.0-beta-2
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.
- package/dist/assets/Color-6BZIO3FS-BY6KYatN.js +1 -0
- package/dist/assets/DocsRenderer-LL677BLK-gGVqzmXf.js +41 -0
- package/dist/assets/{WithTooltip-65CFNBJE-BQ4nRetu.js → WithTooltip-65CFNBJE-Ch1PW1bh.js} +1 -1
- package/dist/assets/bar-chart.stories-B4LXU_9C.js +138 -0
- package/dist/assets/{chunk-YKABRMAI-ChBkp0ra.js → chunk-YKABRMAI-DmB7_5QE.js} +2 -2
- package/dist/assets/components-bN1F3H50.js +92 -0
- package/dist/assets/formatter-EIJCOSYU-C3MpZZqp.js +1 -0
- package/dist/assets/get-draggableData-CvBgArLw.js +2 -0
- package/dist/assets/{iframe-DvGneWFZ.js → iframe-C7BMRDpC.js} +4 -4
- package/dist/assets/{legend-DnGwExsY.js → legend-C5nz-pM5.js} +40 -40
- package/dist/assets/legend-context-IlLDo2WS.js +9 -0
- package/dist/assets/line-chart-C4LAdFzu.js +1 -0
- package/dist/assets/line-chart.stories-DaE2Q5FB.js +1211 -0
- package/dist/assets/{line-chart.test-case.stories-BPzBXXrt.js → line-chart.test-case.stories-DYaX5SMr.js} +1 -1
- package/dist/assets/pie-chart.stories-BxMgMqK7.js +45 -0
- package/dist/assets/{react-18-CaPDGmKz.js → react-18-C3CMmLe3.js} +1 -1
- package/dist/assets/{react-dom-DuTm0_Xz.js → react-dom-BSWruJ_n.js} +1 -1
- package/dist/assets/{react-B3R5p1NM.js → react-yk5YDUIt.js} +1 -1
- package/dist/assets/scatter-chart.stories-DYtG-dNV.js +41 -0
- package/dist/assets/syntaxhighlighter-ED5Y7EFY-BYKOC5Jx.js +6 -0
- package/dist/assets/{theming-Y5Cbkxro.js → theming-BoM3_jXR.js} +1 -1
- package/dist/common/common.interface.d.ts +7 -0
- package/dist/common/helpers/get-chart-annotation.d.ts +48 -6
- package/dist/iframe.html +2 -2
- package/dist/index.js +314 -62
- package/dist/index.json +1 -1
- package/dist/line-chart/plugins/vertical-markers-plugin/draw.d.ts +24 -0
- package/dist/line-chart/plugins/vertical-markers-plugin/types.d.ts +42 -0
- package/dist/line-chart/plugins/vertical-markers-plugin/utils.d.ts +23 -0
- package/dist/line-chart/plugins/vertical-markers-plugin/vertical-markers-plugin.d.ts +54 -0
- package/dist/project.json +1 -1
- package/dist/src/components/common/common.interface.d.ts +7 -0
- package/dist/src/components/common/helpers/get-chart-annotation.d.ts +48 -6
- package/dist/src/components/line-chart/plugins/vertical-markers-plugin/draw.d.ts +24 -0
- package/dist/src/components/line-chart/plugins/vertical-markers-plugin/types.d.ts +42 -0
- package/dist/src/components/line-chart/plugins/vertical-markers-plugin/utils.d.ts +23 -0
- package/dist/src/components/line-chart/plugins/vertical-markers-plugin/vertical-markers-plugin.d.ts +54 -0
- package/package.json +1 -1
- package/dist/assets/Color-6BZIO3FS-BaAvX6Yp.js +0 -1
- package/dist/assets/DocsRenderer-LL677BLK-BK5C7Jzn.js +0 -41
- package/dist/assets/bar-chart.stories-D5i9vPgt.js +0 -138
- package/dist/assets/components-DgLnPVTi.js +0 -92
- package/dist/assets/formatter-EIJCOSYU-By9veOc8.js +0 -1
- package/dist/assets/get-draggableData-C4qYyiBf.js +0 -2
- package/dist/assets/jsx-runtime-S4TgXXQD.js +0 -1
- package/dist/assets/legend-context-DrT75Hl_.js +0 -9
- package/dist/assets/line-chart-Ds2L0-Ky.js +0 -1
- package/dist/assets/line-chart.stories-8UAM62iU.js +0 -1207
- package/dist/assets/pie-chart.stories-qKjdYhwq.js +0 -45
- package/dist/assets/scatter-chart.stories-CzYwqOiR.js +0 -41
- package/dist/assets/syntaxhighlighter-ED5Y7EFY-BHci-LOP.js +0 -6
- /package/dist/assets/{bar-chart-const-Dmo8UTJN.js → bar-chart-const-BupPLp8f.js} +0 -0
- /package/dist/assets/{chunk-242VQQM5-DegdISsM.js → chunk-242VQQM5-By-lqKqL.js} +0 -0
- /package/dist/assets/{get-custom-legend-plugin-example-Decjgf1l.js → get-custom-legend-plugin-example-Bo7hTtyz.js} +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./theming-BoM3_jXR.js","./iframe-C7BMRDpC.js","./preload-helper-Bhb7V-Yo.js","./syntaxhighlighter-ED5Y7EFY-BYKOC5Jx.js","./react-dom-BSWruJ_n.js","./chunk-242VQQM5-By-lqKqL.js","./chunk-YKABRMAI-DmB7_5QE.js","./formatter-EIJCOSYU-C3MpZZqp.js","./WithTooltip-65CFNBJE-Ch1PW1bh.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{t as e}from"./preload-helper-Bhb7V-Yo.js";import{C as t,E as n,O as r,S as i,T as a,_ as o,a as s,b as c,c as l,d as u,g as d,h as f,j as p,l as m,m as h,s as g,t as _,u as v,v as y,w as b,x,y as S}from"./iframe-C7BMRDpC.js";import{_ as C,a as w,d as T,f as E,g as D,h as O,i as k,l as A,m as j,o as M,s as N,u as P,v as ee,y as te}from"./theming-BoM3_jXR.js";import{t as ne}from"./react-dom-BSWruJ_n.js";import{n as re,r as ie}from"./chunk-YKABRMAI-DmB7_5QE.js";import{t as ae}from"./chunk-242VQQM5-By-lqKqL.js";var F=p(s(),1),oe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M6 3.5a.5.5 0 01.5.5v1.5H8a.5.5 0 010 1H6.5V8a.5.5 0 01-1 0V6.5H4a.5.5 0 010-1h1.5V4a.5.5 0 01.5-.5z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.544 10.206a5.5 5.5 0 11.662-.662.5.5 0 01.148.102l3 3a.5.5 0 01-.708.708l-3-3a.5.5 0 01-.102-.148zM10.5 6a4.5 4.5 0 11-9 0 4.5 4.5 0 019 0z`,fill:e}))),se=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M4 5.5a.5.5 0 000 1h4a.5.5 0 000-1H4z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M6 11.5c1.35 0 2.587-.487 3.544-1.294a.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 106 11.5zm0-1a4.5 4.5 0 100-9 4.5 4.5 0 000 9z`,fill:e}))),ce=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.5 2.837V1.5a.5.5 0 00-1 0V4a.5.5 0 00.5.5h2.5a.5.5 0 000-1H2.258a4.5 4.5 0 11-.496 4.016.5.5 0 10-.942.337 5.502 5.502 0 008.724 2.353.5.5 0 00.102.148l3 3a.5.5 0 00.708-.708l-3-3a.5.5 0 00-.148-.102A5.5 5.5 0 101.5 2.837z`,fill:e}))),le=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M10.139 8.725l1.36-1.323a.568.568 0 00.151-.54.534.534 0 00-.377-.396l-2.705-.708 2.22-4.976a.568.568 0 00-.15-.666.497.497 0 00-.648.008L5.464 4.05l.708.71 2.848-2.47-1.64 3.677.697.697 2.164.567-.81.787.708.708zM2.523 6.6a.566.566 0 00-.177.544.534.534 0 00.382.41l2.782.721-1.494 5.013a.563.563 0 00.217.627.496.496 0 00.629-.06l3.843-3.736-.708-.707-2.51 2.44 1.137-3.814-.685-.685-2.125-.55.844-.731-.71-.71L2.524 6.6zM1.854 1.146a.5.5 0 10-.708.708l11 11a.5.5 0 00.708-.708l-11-11z`,fill:e}))),ue=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M4 5.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5zM4.5 7.5a.5.5 0 000 1h5a.5.5 0 000-1h-5zM4 10.5a.5.5 0 01.5-.5h5a.5.5 0 010 1h-5a.5.5 0 01-.5-.5z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M1.5 0a.5.5 0 00-.5.5v13a.5.5 0 00.5.5h11a.5.5 0 00.5-.5V3.207a.5.5 0 00-.146-.353L10.146.146A.5.5 0 009.793 0H1.5zM2 1h7.5v2a.5.5 0 00.5.5h2V13H2V1z`,fill:e}))),de=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M8.982 1.632a.5.5 0 00-.964-.263l-3 11a.5.5 0 10.964.263l3-11zM3.32 3.616a.5.5 0 01.064.704L1.151 7l2.233 2.68a.5.5 0 11-.768.64l-2.5-3a.5.5 0 010-.64l2.5-3a.5.5 0 01.704-.064zM10.68 3.616a.5.5 0 00-.064.704L12.849 7l-2.233 2.68a.5.5 0 00.768.64l2.5-3a.5.5 0 000-.64l-2.5-3a.5.5 0 00-.704-.064z`,fill:e}))),fe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.854 1.146a.5.5 0 10-.708.708L6.293 7l-5.147 5.146a.5.5 0 00.708.708L7 7.707l5.146 5.147a.5.5 0 00.708-.708L7.707 7l5.147-5.146a.5.5 0 00-.708-.708L7 6.293 1.854 1.146z`,fill:e}))),pe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M7 3a.5.5 0 01.5.5v3h3a.5.5 0 010 1h-3v3a.5.5 0 01-1 0v-3h-3a.5.5 0 010-1h3v-3A.5.5 0 017 3z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z`,fill:e}))),me=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M3.5 6.5a.5.5 0 000 1h7a.5.5 0 000-1h-7z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M14 7A7 7 0 110 7a7 7 0 0114 0zm-1 0A6 6 0 111 7a6 6 0 0112 0z`,fill:e}))),he=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M9.854 4.146a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z`,fill:e}),F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 14A7 7 0 107 0a7 7 0 000 14zm0-1A6 6 0 107 1a6 6 0 000 12z`,fill:e}))),ge=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M7 14A7 7 0 107 0a7 7 0 000 14zm2.854-9.854a.5.5 0 010 .708L7.707 7l2.147 2.146a.5.5 0 01-.708.708L7 7.707 4.854 9.854a.5.5 0 01-.708-.708L6.293 7 4.146 4.854a.5.5 0 11.708-.708L7 6.293l2.146-2.147a.5.5 0 01.708 0z`,fill:e}))),_e=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M11.841 2.159a2.25 2.25 0 00-3.182 0l-2.5 2.5a2.25 2.25 0 000 3.182.5.5 0 01-.707.707 3.25 3.25 0 010-4.596l2.5-2.5a3.25 3.25 0 014.596 4.596l-2.063 2.063a4.27 4.27 0 00-.094-1.32l1.45-1.45a2.25 2.25 0 000-3.182z`,fill:e}),F.createElement(`path`,{d:`M3.61 7.21c-.1-.434-.132-.88-.095-1.321L1.452 7.952a3.25 3.25 0 104.596 4.596l2.5-2.5a3.25 3.25 0 000-4.596.5.5 0 00-.707.707 2.25 2.25 0 010 3.182l-2.5 2.5A2.25 2.25 0 112.159 8.66l1.45-1.45z`,fill:e}))),ve=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M2 1.004a1 1 0 00-1 1v10a1 1 0 001 1h10a1 1 0 001-1v-4.5a.5.5 0 00-1 0v4.5H2v-10h4.5a.5.5 0 000-1H2z`,fill:e}),F.createElement(`path`,{d:`M7.354 7.357L12 2.711v1.793a.5.5 0 001 0v-3a.5.5 0 00-.5-.5h-3a.5.5 0 100 1h1.793L6.646 6.65a.5.5 0 10.708.707z`,fill:e}))),ye=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.146 4.604l5.5 5.5a.5.5 0 00.708 0l5.5-5.5a.5.5 0 00-.708-.708L7 9.043 1.854 3.896a.5.5 0 10-.708.708z`,fill:e}))),be=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M11.104 7.354l-5.5 5.5a.5.5 0 01-.708-.708L10.043 7 4.896 1.854a.5.5 0 11.708-.708l5.5 5.5a.5.5 0 010 .708z`,fill:e}))),xe=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M3.854 9.104a.5.5 0 11-.708-.708l3.5-3.5a.5.5 0 01.708 0l3.5 3.5a.5.5 0 01-.708.708L7 5.957 3.854 9.104z`,fill:e}))),Se=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M3.854 4.896a.5.5 0 10-.708.708l3.5 3.5a.5.5 0 00.708 0l3.5-3.5a.5.5 0 00-.708-.708L7 8.043 3.854 4.896z`,fill:e}))),Ce=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M9.104 10.146a.5.5 0 01-.708.708l-3.5-3.5a.5.5 0 010-.708l3.5-3.5a.5.5 0 11.708.708L5.957 7l3.147 3.146z`,fill:e}))),we=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M4.896 10.146a.5.5 0 00.708.708l3.5-3.5a.5.5 0 000-.708l-3.5-3.5a.5.5 0 10-.708.708L8.043 7l-3.147 3.146z`,fill:e}))),Te=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M1.146 3.854a.5.5 0 010-.708l2-2a.5.5 0 11.708.708L2.707 3h6.295A4 4 0 019 11H3a.5.5 0 010-1h6a3 3 0 100-6H2.707l1.147 1.146a.5.5 0 11-.708.708l-2-2z`,fill:e}))),Ee=F.forwardRef(({color:e=`currentColor`,size:t=14,...n},r)=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,ref:r,...n},F.createElement(`path`,{d:`M7.092.5H7a6.5 6.5 0 106.41 7.583.5.5 0 10-.986-.166A5.495 5.495 0 017 12.5a5.5 5.5 0 010-11h.006a5.5 5.5 0 014.894 3H10a.5.5 0 000 1h3a.5.5 0 00.5-.5V2a.5.5 0 00-1 0v1.535A6.495 6.495 0 007.092.5z`,fill:e}))),De=new Map,Oe=`UNIVERSAL_STORE:`,ke={PENDING:`PENDING`,RESOLVED:`RESOLVED`,REJECTED:`REJECTED`},Ae=class e{constructor(t,n){if(this.debugging=!1,this.listeners=new Map([[`*`,new Set]]),this.getState=()=>(this.debug(`getState`,{state:this.state}),this.state),this.subscribe=(e,t)=>{let n=typeof e==`function`,r=n?`*`:e,i=n?e:t;if(this.debug(`subscribe`,{eventType:r,listener:i}),!i)throw TypeError(`Missing first subscribe argument, or second if first is the event type, when subscribing to a UniversalStore with id '${this.id}'`);return this.listeners.has(r)||this.listeners.set(r,new Set),this.listeners.get(r).add(i),()=>{this.debug(`unsubscribe`,{eventType:r,listener:i}),this.listeners.has(r)&&(this.listeners.get(r).delete(i),this.listeners.get(r)?.size===0&&this.listeners.delete(r))}},this.send=t=>{if(this.debug(`send`,{event:t}),this.status!==e.Status.READY)throw TypeError(m`Cannot send event before store is ready. You can get the current status with store.status,
|
|
3
|
+
or await store.readyPromise to wait for the store to be ready before sending events.
|
|
4
|
+
${JSON.stringify({event:t,id:this.id,actor:this.actor,environment:this.environment},null,2)}`);this.emitToListeners(t,{actor:this.actor}),this.emitToChannel(t,{actor:this.actor})},this.debugging=t.debug??!1,!e.isInternalConstructing)throw TypeError(`UniversalStore is not constructable - use UniversalStore.create() instead`);if(e.isInternalConstructing=!1,this.id=t.id,this.actorId=Date.now().toString(36)+Math.random().toString(36).substring(2),this.actorType=t.leader?e.ActorType.LEADER:e.ActorType.FOLLOWER,this.state=t.initialState,this.channelEventName=`${Oe}${this.id}`,this.debug(`constructor`,{options:t,environmentOverrides:n,channelEventName:this.channelEventName}),this.actor.type===e.ActorType.LEADER)this.syncing={state:ke.RESOLVED,promise:Promise.resolve()};else{let e,t,n=new Promise((n,r)=>{e=()=>{this.syncing.state===ke.PENDING&&(this.syncing.state=ke.RESOLVED,n())},t=e=>{this.syncing.state===ke.PENDING&&(this.syncing.state=ke.REJECTED,r(e))}});this.syncing={state:ke.PENDING,promise:n,resolve:e,reject:t}}this.getState=this.getState.bind(this),this.setState=this.setState.bind(this),this.subscribe=this.subscribe.bind(this),this.onStateChange=this.onStateChange.bind(this),this.send=this.send.bind(this),this.emitToChannel=this.emitToChannel.bind(this),this.prepareThis=this.prepareThis.bind(this),this.emitToListeners=this.emitToListeners.bind(this),this.handleChannelEvents=this.handleChannelEvents.bind(this),this.debug=this.debug.bind(this),this.channel=n?.channel??e.preparation.channel,this.environment=n?.environment??e.preparation.environment,this.channel&&this.environment?(e.preparation.resolve({channel:this.channel,environment:this.environment}),this.prepareThis({channel:this.channel,environment:this.environment})):e.preparation.promise.then(this.prepareThis)}static setupPreparationPromise(){let t,n,r=new Promise((e,r)=>{t=t=>{e(t)},n=(...e)=>{r(e)}});e.preparation={resolve:t,reject:n,promise:r}}get actor(){return Object.freeze({id:this.actorId,type:this.actorType,environment:this.environment??e.Environment.UNKNOWN})}get status(){if(!this.channel||!this.environment)return e.Status.UNPREPARED;switch(this.syncing?.state){case ke.PENDING:case void 0:return e.Status.SYNCING;case ke.REJECTED:return e.Status.ERROR;case ke.RESOLVED:default:return e.Status.READY}}untilReady(){return Promise.all([e.preparation.promise,this.syncing?.promise])}static create(t){if(!t||typeof t?.id!=`string`)throw TypeError(`id is required and must be a string, when creating a UniversalStore`);t.debug&&console.debug(m`[UniversalStore]
|
|
5
|
+
create`,{options:t});let n=De.get(t.id);if(n)return console.warn(m`UniversalStore with id "${t.id}" already exists in this environment, re-using existing.
|
|
6
|
+
You should reuse the existing instance instead of trying to create a new one.`),n;e.isInternalConstructing=!0;let r=new e(t);return De.set(t.id,r),r}static __prepare(t,n){e.preparation.channel=t,e.preparation.environment=n,e.preparation.resolve({channel:t,environment:n})}setState(t){let n=this.state,r=typeof t==`function`?t(n):t;if(this.debug(`setState`,{newState:r,previousState:n,updater:t}),this.status!==e.Status.READY)throw TypeError(m`Cannot set state before store is ready. You can get the current status with store.status,
|
|
7
|
+
or await store.readyPromise to wait for the store to be ready before sending events.
|
|
8
|
+
${JSON.stringify({newState:r,id:this.id,actor:this.actor,environment:this.environment},null,2)}`);this.state=r;let i={type:e.InternalEventType.SET_STATE,payload:{state:r,previousState:n}};this.emitToChannel(i,{actor:this.actor}),this.emitToListeners(i,{actor:this.actor})}onStateChange(t){return this.debug(`onStateChange`,{listener:t}),this.subscribe(e.InternalEventType.SET_STATE,({payload:e},n)=>{t(e.state,e.previousState,n)})}emitToChannel(e,t){this.debug(`emitToChannel`,{event:e,eventInfo:t,channel:!!this.channel}),this.channel?.emit(this.channelEventName,{event:e,eventInfo:t})}prepareThis({channel:t,environment:n}){this.channel=t,this.environment=n,this.debug(`prepared`,{channel:!!t,environment:n}),this.channel.on(this.channelEventName,this.handleChannelEvents),this.actor.type===e.ActorType.LEADER?this.emitToChannel({type:e.InternalEventType.LEADER_CREATED},{actor:this.actor}):(this.emitToChannel({type:e.InternalEventType.FOLLOWER_CREATED},{actor:this.actor}),this.emitToChannel({type:e.InternalEventType.EXISTING_STATE_REQUEST},{actor:this.actor}),setTimeout(()=>{this.syncing.reject(TypeError(`No existing state found for follower with id: '${this.id}'. Make sure a leader with the same id exists before creating a follower.`))},1e3))}emitToListeners(e,t){let n=this.listeners.get(e.type),r=this.listeners.get(`*`);this.debug(`emitToListeners`,{event:e,eventInfo:t,eventTypeListeners:n,everythingListeners:r}),[...n??[],...r??[]].forEach(n=>n(e,t))}handleChannelEvents(t){let{event:n,eventInfo:r}=t;if([r.actor.id,r.forwardingActor?.id].includes(this.actor.id)){this.debug(`handleChannelEvents: Ignoring event from self`,{channelEvent:t});return}else if(this.syncing?.state===ke.PENDING&&n.type!==e.InternalEventType.EXISTING_STATE_RESPONSE){this.debug(`handleChannelEvents: Ignoring event while syncing`,{channelEvent:t});return}if(this.debug(`handleChannelEvents`,{channelEvent:t}),this.actor.type===e.ActorType.LEADER){let i=!0;switch(n.type){case e.InternalEventType.EXISTING_STATE_REQUEST:i=!1;let t={type:e.InternalEventType.EXISTING_STATE_RESPONSE,payload:this.state};this.debug(`handleChannelEvents: responding to existing state request`,{responseEvent:t}),this.emitToChannel(t,{actor:this.actor}),this.emitToListeners(t,{actor:this.actor});break;case e.InternalEventType.LEADER_CREATED:i=!1,this.syncing.state=ke.REJECTED,this.debug(`handleChannelEvents: erroring due to second leader being created`,{event:n}),console.error(m`Detected multiple UniversalStore leaders created with the same id "${this.id}".
|
|
9
|
+
Only one leader can exists at a time, your stores are now in an invalid state.
|
|
10
|
+
Leaders detected:
|
|
11
|
+
this: ${JSON.stringify(this.actor,null,2)}
|
|
12
|
+
other: ${JSON.stringify(r.actor,null,2)}`);break}i&&(this.debug(`handleChannelEvents: forwarding event`,{channelEvent:t}),this.emitToChannel(n,{actor:r.actor,forwardingActor:this.actor}))}if(this.actor.type===e.ActorType.FOLLOWER)switch(n.type){case e.InternalEventType.EXISTING_STATE_RESPONSE:if(this.debug(`handleChannelEvents: Setting state from leader's existing state response`,{event:n}),this.syncing?.state!==ke.PENDING)break;this.syncing.resolve?.();let t={type:e.InternalEventType.SET_STATE,payload:{state:n.payload,previousState:this.state}};this.state=n.payload,this.emitToListeners(t,r);break}switch(n.type){case e.InternalEventType.SET_STATE:this.debug(`handleChannelEvents: Setting state`,{event:n}),this.state=n.payload.state;break}this.emitToListeners(n,{actor:r.actor})}debug(t,n){this.debugging&&console.debug(m`[UniversalStore::${this.id}::${this.environment??e.Environment.UNKNOWN}]
|
|
13
|
+
${t}`,JSON.stringify({data:n,actor:this.actor,state:this.state,status:this.status},null,2))}static __reset(){e.preparation.reject(Error(`reset`)),e.setupPreparationPromise(),e.isInternalConstructing=!1}};Ae.ActorType={LEADER:`LEADER`,FOLLOWER:`FOLLOWER`},Ae.Environment={SERVER:`SERVER`,MANAGER:`MANAGER`,PREVIEW:`PREVIEW`,UNKNOWN:`UNKNOWN`,MOCK:`MOCK`},Ae.InternalEventType={EXISTING_STATE_REQUEST:`__EXISTING_STATE_REQUEST`,EXISTING_STATE_RESPONSE:`__EXISTING_STATE_RESPONSE`,SET_STATE:`__SET_STATE`,LEADER_CREATED:`__LEADER_CREATED`,FOLLOWER_CREATED:`__FOLLOWER_CREATED`},Ae.Status={UNPREPARED:`UNPREPARED`,SYNCING:`SYNCING`,READY:`READY`,ERROR:`ERROR`},Ae.isInternalConstructing=!1,Ae.setupPreparationPromise();var je=Ae,Me=Object.create,Ne=Object.defineProperty,Pe=Object.getOwnPropertyDescriptor,Fe=Object.getOwnPropertyNames,Ie=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty,I=(e,t)=>function(){return t||(0,e[Fe(e)[0]])((t={exports:{}}).exports,t),t.exports},Re=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of Fe(t))!Le.call(e,i)&&i!==n&&Ne(e,i,{get:()=>t[i],enumerable:!(r=Pe(t,i))||r.enumerable});return e},ze=(e,t,n)=>(n=e==null?{}:Me(Ie(e)),Re(t||!e||!e.__esModule?Ne(n,`default`,{value:e,enumerable:!0}):n,e)),Be=[`bubbles`,`cancelBubble`,`cancelable`,`composed`,`currentTarget`,`defaultPrevented`,`eventPhase`,`isTrusted`,`returnValue`,`srcElement`,`target`,`timeStamp`,`type`],Ve=[`detail`];function He(e){let t=Be.filter(t=>e[t]!==void 0).reduce((t,n)=>(t[n]=e[n],t),{});if(e instanceof CustomEvent)for(let n of Ve.filter(t=>e[t]!==void 0))t[n]=e[n];return t}var Ue=I({"node_modules/.pnpm/es-object-atoms@1.1.1/node_modules/es-object-atoms/index.js"(e,t){t.exports=Object}}),We=I({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(e,t){t.exports=Error}}),Ge=I({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(e,t){t.exports=EvalError}}),Ke=I({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(e,t){t.exports=RangeError}}),qe=I({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(e,t){t.exports=ReferenceError}}),Je=I({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(e,t){t.exports=SyntaxError}}),Ye=I({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(e,t){t.exports=TypeError}}),Xe=I({"node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(e,t){t.exports=URIError}}),Ze=I({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/abs.js"(e,t){t.exports=Math.abs}}),Qe=I({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/floor.js"(e,t){t.exports=Math.floor}}),$e=I({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/max.js"(e,t){t.exports=Math.max}}),et=I({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/min.js"(e,t){t.exports=Math.min}}),tt=I({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/pow.js"(e,t){t.exports=Math.pow}}),nt=I({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/round.js"(e,t){t.exports=Math.round}}),rt=I({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/isNaN.js"(e,t){t.exports=Number.isNaN||function(e){return e!==e}}}),it=I({"node_modules/.pnpm/math-intrinsics@1.1.0/node_modules/math-intrinsics/sign.js"(e,t){var n=rt();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}}}),at=I({"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/gOPD.js"(e,t){t.exports=Object.getOwnPropertyDescriptor}}),ot=I({"node_modules/.pnpm/gopd@1.2.0/node_modules/gopd/index.js"(e,t){var n=at();if(n)try{n([],`length`)}catch{n=null}t.exports=n}}),st=I({"node_modules/.pnpm/es-define-property@1.0.1/node_modules/es-define-property/index.js"(e,t){var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n}}),ct=I({"node_modules/.pnpm/has-symbols@1.1.0/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 e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}}}),lt=I({"node_modules/.pnpm/has-symbols@1.1.0/node_modules/has-symbols/index.js"(e,t){var n=typeof Symbol<`u`&&Symbol,r=ct();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}}}),ut=I({"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Reflect.getPrototypeOf.js"(e,t){t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null}}),dt=I({"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/Object.getPrototypeOf.js"(e,t){t.exports=Ue().getPrototypeOf||null}}),ft=I({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(e,t){var n=`Function.prototype.bind called on incompatible `,r=Object.prototype.toString,i=Math.max,a=`[object Function]`,o=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},s=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},c=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||r.apply(t)!==a)throw TypeError(n+t);for(var l=s(arguments,1),u,d=function(){if(this instanceof u){var n=t.apply(this,o(l,arguments));return Object(n)===n?n:this}return t.apply(e,o(l,arguments))},f=i(0,t.length-l.length),p=[],m=0;m<f;m++)p[m]=`$`+m;if(u=Function(`binder`,`return function (`+c(p,`,`)+`){ return binder.apply(this,arguments); }`)(d),t.prototype){var h=function(){};h.prototype=t.prototype,u.prototype=new h,h.prototype=null}return u}}}),pt=I({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(e,t){var n=ft();t.exports=Function.prototype.bind||n}}),mt=I({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionCall.js"(e,t){t.exports=Function.prototype.call}}),ht=I({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/functionApply.js"(e,t){t.exports=Function.prototype.apply}}),gt=I({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/reflectApply.js"(e,t){t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply}}),_t=I({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/actualApply.js"(e,t){var n=pt(),r=ht(),i=mt();t.exports=gt()||n.call(i,r)}}),vt=I({"node_modules/.pnpm/call-bind-apply-helpers@1.0.2/node_modules/call-bind-apply-helpers/index.js"(e,t){var n=pt(),r=Ye(),i=mt(),a=_t();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}}}),yt=I({"node_modules/.pnpm/dunder-proto@1.0.1/node_modules/dunder-proto/get.js"(e,t){var n=vt(),r=ot(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`?(function(e){return s(e==null?e:o(e))}):!1}}),bt=I({"node_modules/.pnpm/get-proto@1.0.1/node_modules/get-proto/index.js"(e,t){var n=ut(),r=dt(),i=yt();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null}}),xt=I({"node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(e,t){var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=pt().call(n,r)}}),St=I({"node_modules/.pnpm/get-intrinsic@1.3.0/node_modules/get-intrinsic/index.js"(e,t){var n,r=Ue(),i=We(),a=Ge(),o=Ke(),s=qe(),c=Je(),l=Ye(),u=Xe(),d=Ze(),f=Qe(),p=$e(),m=et(),h=tt(),g=nt(),_=it(),v=Function,y=function(e){try{return v(`"use strict"; return (`+e+`).constructor;`)()}catch{}},b=ot(),x=st(),S=function(){throw new l},C=b?(function(){try{return arguments.callee,S}catch{try{return b(arguments,`callee`).get}catch{return S}}})():S,w=lt()(),T=bt(),E=dt(),D=ut(),O=ht(),k=mt(),A={},j=typeof Uint8Array>`u`||!T?n:T(Uint8Array),M={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":w&&T?T([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":w&&T?T(T([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!w||!T?n:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!w||!T?n:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":w&&T?T(``[Symbol.iterator]()):n,"%Symbol%":w?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":C,"%TypedArray%":j,"%TypeError%":l,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":k,"%Function.prototype.apply%":O,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":E,"%Math.abs%":d,"%Math.floor%":f,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":h,"%Math.round%":g,"%Math.sign%":_,"%Reflect.getPrototypeOf%":D};if(T)try{null.error}catch(e){N=T(T(e)),M[`%Error.prototype%`]=N}var N,P=function e(t){var n;if(t===`%AsyncFunction%`)n=y(`async function () {}`);else if(t===`%GeneratorFunction%`)n=y(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=y(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&T&&(n=T(i.prototype))}return M[t]=n,n},ee={__proto__:null,"%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`]},te=pt(),ne=xt(),re=te.call(k,Array.prototype.concat),ie=te.call(O,Array.prototype.splice),ae=te.call(k,String.prototype.replace),F=te.call(k,String.prototype.slice),oe=te.call(k,RegExp.prototype.exec),se=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ce=/\\(\\)?/g,le=function(e){var t=F(e,0,1),n=F(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return ae(e,se,function(e,t,n,i){r[r.length]=n?ae(i,ce,`$1`):t||e}),r},ue=function(e,t){var n=e,r;if(ne(ee,n)&&(r=ee[n],n=`%`+r[0]+`%`),ne(M,n)){var i=M[n];if(i===A&&(i=P(n)),typeof i>`u`&&!t)throw new l(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new l(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new l(`"allowMissing" argument must be a boolean`);if(oe(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=le(e),r=n.length>0?n[0]:``,i=ue(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(r=u[0],ie(n,re([0,1],u)));for(var d=1,f=!0;d<n.length;d+=1){var p=n[d],m=F(p,0,1),h=F(p,-1);if((m===`"`||m===`'`||m==="`"||h===`"`||h===`'`||h==="`")&&m!==h)throw new c(`property names with quotes must have matching quotes`);if((p===`constructor`||!f)&&(s=!0),r+=`.`+p,a=`%`+r+`%`,ne(M,a))o=M[a];else if(o!=null){if(!(p in o)){if(!t)throw new l(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(b&&d+1>=n.length){var g=b(o,p);f=!!g,o=f&&`get`in g&&!(`originalValue`in g.get)?g.get:o[p]}else f=ne(o,p),o=o[p];f&&!s&&(M[a]=o)}}return o}}}),Ct=I({"node_modules/.pnpm/call-bound@1.0.4/node_modules/call-bound/index.js"(e,t){var n=St(),r=vt(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}}}),wt=I({"node_modules/.pnpm/has-tostringtag@1.0.2/node_modules/has-tostringtag/shams.js"(e,t){var n=ct();t.exports=function(){return n()&&!!Symbol.toStringTag}}}),Tt=I({"node_modules/.pnpm/is-regex@1.2.1/node_modules/is-regex/index.js"(e,t){var n=Ct(),r=wt()(),i=xt(),a=ot(),o;r?(s=n(`RegExp.prototype.exec`),c={},l=function(){throw c},u={toString:l,valueOf:l},typeof Symbol.toPrimitive==`symbol`&&(u[Symbol.toPrimitive]=l),o=function(e){if(!e||typeof e!=`object`)return!1;var t=a(e,`lastIndex`);if(!(t&&i(t,`value`)))return!1;try{s(e,u)}catch(e){return e===c}}):(d=n(`Object.prototype.toString`),f=`[object RegExp]`,o=function(e){return!e||typeof e!=`object`&&typeof e!=`function`?!1:d(e)===f});var s,c,l,u,d,f;t.exports=o}}),Et=I({"node_modules/.pnpm/is-function@1.0.2/node_modules/is-function/index.js"(e,t){t.exports=r;var n=Object.prototype.toString;function r(e){if(!e)return!1;var t=n.call(e);return t===`[object Function]`||typeof e==`function`&&t!==`[object RegExp]`||typeof window<`u`&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)}}}),Dt=I({"node_modules/.pnpm/safe-regex-test@1.1.0/node_modules/safe-regex-test/index.js"(e,t){var n=Ct(),r=Tt(),i=n(`RegExp.prototype.exec`),a=Ye();t.exports=function(e){if(!r(e))throw new a("`regex` must be a RegExp");return function(t){return i(e,t)!==null}}}}),Ot=I({"node_modules/.pnpm/is-symbol@1.1.1/node_modules/is-symbol/index.js"(e,t){var n=Ct(),r=n(`Object.prototype.toString`),i=lt()(),a=Dt();i?(o=n(`Symbol.prototype.toString`),s=a(/^Symbol\(.*\)$/),c=function(e){return typeof e.valueOf()==`symbol`?s(o(e)):!1},t.exports=function(e){if(typeof e==`symbol`)return!0;if(!e||typeof e!=`object`||r(e)!==`[object Symbol]`)return!1;try{return c(e)}catch{return!1}}):t.exports=function(e){return!1};var o,s,c}}),kt=ze(Tt()),At=ze(Et()),jt=ze(Ot());function Mt(e){return typeof e==`object`&&!!e&&Array.isArray(e)===!1}var Nt=typeof global==`object`&&global&&global.Object===Object&&global,Pt=typeof self==`object`&&self&&self.Object===Object&&self,Ft=Nt||Pt||Function(`return this`)(),It=Ft.Symbol,Lt=Object.prototype,Rt=Lt.hasOwnProperty,zt=Lt.toString,Bt=It?It.toStringTag:void 0;function Vt(e){var t=Rt.call(e,Bt),n=e[Bt];try{e[Bt]=void 0;var r=!0}catch{}var i=zt.call(e);return r&&(t?e[Bt]=n:delete e[Bt]),i}var Ht=Vt,Ut=Object.prototype.toString;function Wt(e){return Ut.call(e)}var Gt=Wt,Kt=`[object Null]`,qt=`[object Undefined]`,Jt=It?It.toStringTag:void 0;function Yt(e){return e==null?e===void 0?qt:Kt:Jt&&Jt in Object(e)?Ht(e):Gt(e)}var Xt=Yt;function Zt(e){return typeof e==`object`&&!!e}var Qt=Zt,$t=`[object Symbol]`;function en(e){return typeof e==`symbol`||Qt(e)&&Xt(e)==$t}var tn=en;function nn(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var rn=nn,an=Array.isArray,on=1/0,sn=It?It.prototype:void 0,cn=sn?sn.toString:void 0;function ln(e){if(typeof e==`string`)return e;if(an(e))return rn(e,ln)+``;if(tn(e))return cn?cn.call(e):``;var t=e+``;return t==`0`&&1/e==-on?`-0`:t}var un=ln;function dn(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var fn=dn,pn=`[object AsyncFunction]`,mn=`[object Function]`,hn=`[object GeneratorFunction]`,gn=`[object Proxy]`;function _n(e){if(!fn(e))return!1;var t=Xt(e);return t==mn||t==hn||t==pn||t==gn}var vn=_n,yn=Ft[`__core-js_shared__`],bn=(function(){var e=/[^.]+$/.exec(yn&&yn.keys&&yn.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``})();function xn(e){return!!bn&&bn in e}var Sn=xn,Cn=Function.prototype.toString;function wn(e){if(e!=null){try{return Cn.call(e)}catch{}try{return e+``}catch{}}return``}var Tn=wn,En=/[\\^$.*+?()[\]{}|]/g,Dn=/^\[object .+?Constructor\]$/,On=Function.prototype,kn=Object.prototype,An=On.toString,jn=kn.hasOwnProperty,Mn=RegExp(`^`+An.call(jn).replace(En,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Nn(e){return!fn(e)||Sn(e)?!1:(vn(e)?Mn:Dn).test(Tn(e))}var Pn=Nn;function Fn(e,t){return e?.[t]}var In=Fn;function Ln(e,t){var n=In(e,t);return Pn(n)?n:void 0}var Rn=Ln;function zn(e,t){return e===t||e!==e&&t!==t}var Bn=zn,Vn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hn=/^\w*$/;function Un(e,t){if(an(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||tn(e)?!0:Hn.test(e)||!Vn.test(e)||t!=null&&e in Object(t)}var Wn=Un,Gn=Rn(Object,`create`);function Kn(){this.__data__=Gn?Gn(null):{},this.size=0}var qn=Kn;function Jn(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Yn=Jn,Xn=`__lodash_hash_undefined__`,Zn=Object.prototype.hasOwnProperty;function Qn(e){var t=this.__data__;if(Gn){var n=t[e];return n===Xn?void 0:n}return Zn.call(t,e)?t[e]:void 0}var $n=Qn,er=Object.prototype.hasOwnProperty;function tr(e){var t=this.__data__;return Gn?t[e]!==void 0:er.call(t,e)}var nr=tr,rr=`__lodash_hash_undefined__`;function ir(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Gn&&t===void 0?rr:t,this}var ar=ir;function or(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}or.prototype.clear=qn,or.prototype.delete=Yn,or.prototype.get=$n,or.prototype.has=nr,or.prototype.set=ar;var sr=or;function cr(){this.__data__=[],this.size=0}var lr=cr;function ur(e,t){for(var n=e.length;n--;)if(Bn(e[n][0],t))return n;return-1}var dr=ur,fr=Array.prototype.splice;function pr(e){var t=this.__data__,n=dr(t,e);return n<0?!1:(n==t.length-1?t.pop():fr.call(t,n,1),--this.size,!0)}var mr=pr;function hr(e){var t=this.__data__,n=dr(t,e);return n<0?void 0:t[n][1]}var gr=hr;function _r(e){return dr(this.__data__,e)>-1}var vr=_r;function yr(e,t){var n=this.__data__,r=dr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var br=yr;function xr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}xr.prototype.clear=lr,xr.prototype.delete=mr,xr.prototype.get=gr,xr.prototype.has=vr,xr.prototype.set=br;var Sr=xr,Cr=Rn(Ft,`Map`);function wr(){this.size=0,this.__data__={hash:new sr,map:new(Cr||Sr),string:new sr}}var Tr=wr;function Er(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var Dr=Er;function Or(e,t){var n=e.__data__;return Dr(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var kr=Or;function Ar(e){var t=kr(this,e).delete(e);return this.size-=t?1:0,t}var jr=Ar;function Mr(e){return kr(this,e).get(e)}var Nr=Mr;function Pr(e){return kr(this,e).has(e)}var Fr=Pr;function Ir(e,t){var n=kr(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var Lr=Ir;function Rr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Rr.prototype.clear=Tr,Rr.prototype.delete=jr,Rr.prototype.get=Nr,Rr.prototype.has=Fr,Rr.prototype.set=Lr;var zr=Rr,Br=`Expected a function`;function Vr(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Br);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Vr.Cache||zr),n}Vr.Cache=zr;var Hr=Vr,Ur=500;function Wr(e){var t=Hr(e,function(e){return n.size===Ur&&n.clear(),e}),n=t.cache;return t}var Gr=Wr,Kr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qr=/\\(\\)?/g,Jr=Gr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Kr,function(e,n,r,i){t.push(r?i.replace(qr,`$1`):n||e)}),t});function Yr(e){return e==null?``:un(e)}var Xr=Yr;function Zr(e,t){return an(e)?e:Wn(e,t)?[e]:Jr(Xr(e))}var Qr=Zr,$r=1/0;function ei(e){if(typeof e==`string`||tn(e))return e;var t=e+``;return t==`0`&&1/e==-$r?`-0`:t}var ti=ei;function ni(e,t){t=Qr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[ti(t[n++])];return n&&n==r?e:void 0}var ri=ni;function ii(e,t,n){var r=e==null?void 0:ri(e,t);return r===void 0?n:r}var ai=ii,oi=Mt,si=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{3})?Z$/,ci=e=>e.match(/^[\[\{\"\}].*[\]\}\"]$/);function li(e){if(!oi(e))return e;let t=e,n=!1;return typeof Event<`u`&&e instanceof Event&&(t=He(t),n=!0),t=Object.keys(t).reduce((e,r)=>{try{t[r]&&t[r].toJSON,e[r]=t[r]}catch{n=!0}return e},{}),n?t:e}var ui=function(e){let t,n,r,i;return function(a,o){try{if(a===``)return i=[],t=new Map([[o,`[]`]]),n=new Map,r=[],o;let s=n.get(this)||this;for(;r.length&&s!==r[0];)r.shift(),i.pop();if(typeof o==`boolean`)return o;if(o===void 0)return e.allowUndefined?`_undefined_`:void 0;if(o===null)return null;if(typeof o==`number`)return o===-1/0?`_-Infinity_`:o===1/0?`_Infinity_`:Number.isNaN(o)?`_NaN_`:o;if(typeof o==`bigint`)return`_bigint_${o.toString()}`;if(typeof o==`string`)return si.test(o)?e.allowDate?`_date_${o}`:void 0:o;if((0,kt.default)(o))return e.allowRegExp?`_regexp_${o.flags}|${o.source}`:void 0;if((0,At.default)(o))return;if((0,jt.default)(o)){if(!e.allowSymbol)return;let t=Symbol.keyFor(o);return t===void 0?`_symbol_${o.toString().slice(7,-1)}`:`_gsymbol_${t}`}if(r.length>=e.maxDepth)return Array.isArray(o)?`[Array(${o.length})]`:`[Object]`;if(o===this)return`_duplicate_${JSON.stringify(i)}`;if(o instanceof Error&&e.allowError)return{__isConvertedError__:!0,errorProperties:{...o.cause?{cause:o.cause}:{},...o,name:o.name,message:o.message,stack:o.stack,"_constructor-name_":o.constructor.name}};if(o?.constructor?.name&&o.constructor.name!==`Object`&&!Array.isArray(o)){let e=t.get(o);if(!e){let e={__isClassInstance__:!0,__className__:o.constructor.name,...Object.getOwnPropertyNames(o).reduce((e,t)=>{try{e[t]=o[t]}catch{}return e},{})};return i.push(a),r.unshift(e),t.set(o,JSON.stringify(i)),o!==e&&n.set(o,e),e}return`_duplicate_${e}`}let c=t.get(o);if(!c){let e=Array.isArray(o)?o:li(o);return i.push(a),r.unshift(e),t.set(o,JSON.stringify(i)),o!==e&&n.set(o,e),e}return`_duplicate_${c}`}catch{return}}},di=function(e){let t=[],n;return function(r,i){if(r===``&&(n=i,t.forEach(({target:e,container:t,replacement:r})=>{let i=ci(r)?JSON.parse(r):r.split(`.`);i.length===0?t[e]=n:t[e]=ai(n,i)})),r===`_constructor-name_`)return i;if(oi(i)&&i.__isConvertedError__){let{message:e,...t}=i.errorProperties,n=Error(e);return Object.assign(n,t),n}if(typeof i==`string`&&i.startsWith(`_regexp_`)&&e.allowRegExp){let[,e,t]=i.match(/_regexp_([^|]*)\|(.*)/)||[];return new RegExp(t,e)}return typeof i==`string`&&i.startsWith(`_date_`)&&e.allowDate?new Date(i.replace(`_date_`,``)):typeof i==`string`&&i.startsWith(`_duplicate_`)?(t.push({target:r,container:this,replacement:i.replace(/^_duplicate_/,``)}),null):typeof i==`string`&&i.startsWith(`_symbol_`)&&e.allowSymbol?Symbol(i.replace(`_symbol_`,``)):typeof i==`string`&&i.startsWith(`_gsymbol_`)&&e.allowSymbol?Symbol.for(i.replace(`_gsymbol_`,``)):typeof i==`string`&&i===`_-Infinity_`?-1/0:typeof i==`string`&&i===`_Infinity_`?1/0:typeof i==`string`&&i===`_NaN_`?NaN:typeof i==`string`&&i.startsWith(`_bigint_`)&&typeof BigInt==`function`?BigInt(i.replace(`_bigint_`,``)):i}},fi={maxDepth:10,space:void 0,allowRegExp:!0,allowDate:!0,allowError:!0,allowUndefined:!0,allowSymbol:!0},pi=(e,t={})=>{let n={...fi,...t};return JSON.stringify(li(e),ui(n),t.space)},mi=()=>{let e=new Map;return function t(n){oi(n)&&Object.entries(n).forEach(([r,i])=>{i===`_undefined_`?n[r]=void 0:e.get(i)||(e.set(i,!0),t(i))}),Array.isArray(n)&&n.forEach((r,i)=>{r===`_undefined_`?(e.set(r,!0),n[i]=void 0):e.get(r)||(e.set(r,!0),t(r))})}},hi=(e,t={})=>{let n={...fi,...t},r=JSON.parse(e,di(n));return mi()(r),r};function gi({code:e,category:t}){return`SB_${t}_${String(e).padStart(4,`0`)}`}function _i(e){if(/^(?!.*storybook\.js\.org)|[?&]ref=error\b/.test(e))return e;try{let t=new URL(e);return t.searchParams.set(`ref`,`error`),t.toString()}catch{return e}}var vi=class e extends Error{constructor(t){super(e.getFullMessage(t)),this.data={},this.fromStorybook=!0,this.isHandledError=!1,this.subErrors=[],this.category=t.category,this.documentation=t.documentation??!1,this.code=t.code,this.isHandledError=t.isHandledError??!1,this.name=t.name,this.subErrors=t.subErrors??[]}get fullErrorCode(){return gi({code:this.code,category:this.category})}get name(){let e=this._name||this.constructor.name;return`${this.fullErrorCode} (${e})`}set name(e){this._name=e}static getFullMessage({documentation:e,code:t,category:n,message:r}){let i;return e===!0?i=`https://storybook.js.org/error/${gi({code:t,category:n})}?ref=error`:typeof e==`string`?i=_i(e):Array.isArray(e)&&(i=`
|
|
14
|
+
${e.map(e=>` - ${_i(e)}`).join(`
|
|
15
|
+
`)}`),`${r}${i==null?``:`
|
|
16
|
+
|
|
17
|
+
More info: ${i}
|
|
18
|
+
`}`}},yi=(e=>(e.MANAGER_UNCAUGHT=`MANAGER_UNCAUGHT`,e.MANAGER_UI=`MANAGER_UI`,e.MANAGER_API=`MANAGER_API`,e.MANAGER_CLIENT_LOGGER=`MANAGER_CLIENT-LOGGER`,e.MANAGER_CHANNELS=`MANAGER_CHANNELS`,e.MANAGER_CORE_EVENTS=`MANAGER_CORE-EVENTS`,e.MANAGER_ROUTER=`MANAGER_ROUTER`,e.MANAGER_THEMING=`MANAGER_THEMING`,e))(yi||{}),bi=class extends vi{constructor(e){super({name:`StatusTypeIdMismatchError`,category:`MANAGER_API`,code:1,message:`Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(e.status,null,2)}`}),this.data=e}},xi=(e=>(e.BLOCKS=`BLOCKS`,e.DOCS_TOOLS=`DOCS-TOOLS`,e.PREVIEW_CLIENT_LOGGER=`PREVIEW_CLIENT-LOGGER`,e.PREVIEW_CHANNELS=`PREVIEW_CHANNELS`,e.PREVIEW_CORE_EVENTS=`PREVIEW_CORE-EVENTS`,e.PREVIEW_INSTRUMENTER=`PREVIEW_INSTRUMENTER`,e.PREVIEW_API=`PREVIEW_API`,e.PREVIEW_REACT_DOM_SHIM=`PREVIEW_REACT-DOM-SHIM`,e.PREVIEW_ROUTER=`PREVIEW_ROUTER`,e.PREVIEW_THEMING=`PREVIEW_THEMING`,e.RENDERER_HTML=`RENDERER_HTML`,e.RENDERER_PREACT=`RENDERER_PREACT`,e.RENDERER_REACT=`RENDERER_REACT`,e.RENDERER_SERVER=`RENDERER_SERVER`,e.RENDERER_SVELTE=`RENDERER_SVELTE`,e.RENDERER_VUE=`RENDERER_VUE`,e.RENDERER_VUE3=`RENDERER_VUE3`,e.RENDERER_WEB_COMPONENTS=`RENDERER_WEB-COMPONENTS`,e.FRAMEWORK_NEXTJS=`FRAMEWORK_NEXTJS`,e.ADDON_VITEST=`ADDON_VITEST`,e.ADDON_A11Y=`ADDON_A11Y`,e))(xi||{}),Si=class extends vi{constructor(e){super({name:`StatusTypeIdMismatchError`,category:`PREVIEW_API`,code:16,message:`Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(e.status,null,2)}`}),this.data=e}},Ci=Object.prototype.hasOwnProperty;function wi(e,t,n){for(n of e.keys())if(Ti(n,t))return n}function Ti(e,t){var n,r,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&Ti(e[r],t[r]););return r===-1}if(n===Set){if(e.size!==t.size)return!1;for(r of e)if(i=r,i&&typeof i==`object`&&(i=wi(t,i),!i)||!t.has(i))return!1;return!0}if(n===Map){if(e.size!==t.size)return!1;for(r of e)if(i=r[0],i&&typeof i==`object`&&(i=wi(t,i),!i)||!Ti(r[1],t.get(i)))return!1;return!0}if(n===ArrayBuffer)e=new Uint8Array(e),t=new Uint8Array(t);else if(n===DataView){if((r=e.byteLength)===t.byteLength)for(;r--&&e.getInt8(r)===t.getInt8(r););return r===-1}if(ArrayBuffer.isView(e)){if((r=e.byteLength)===t.byteLength)for(;r--&&e[r]===t[r];);return r===-1}if(!n||typeof e==`object`){for(n in r=0,e)if(Ci.call(e,n)&&++r&&!Ci.call(t,n)||!(n in t)||!Ti(e[n],t[n]))return!1;return Object.keys(t).length===r}}return e!==e&&t!==t}function Ei(e,t){let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i];t(a)?n.push(a):r.push(a)}return[n,r]}function Di(e,t){let n={};for(let r=0;r<e.length;r++){let i=e[r],a=t(i);n[a]=(n[a]??0)+1}return n}var{once:Oi}=__STORYBOOK_MODULE_CLIENT_LOGGER__,ki=t(v(),1),Ai=t(c(),1),ji=/\/([^/]+)\/(?:(.*)_)?([^/]+)?/,Mi=(0,ki.default)(1e3)(e=>{let t={viewMode:void 0,storyId:void 0,refId:void 0};if(e){let[,n,r,i]=e.toLowerCase().match(ji)||[];n&&Object.assign(t,{viewMode:n,storyId:i,refId:r})}return t}),Ni=Symbol(`Deeply equal`),Pi=(e,t)=>{if(typeof e!=typeof t)return t;if(u(e,t))return Ni;if(Array.isArray(e)&&Array.isArray(t)){let n=t.reduce((t,n,r)=>{let i=Pi(e[r],n);return i!==Ni&&(t[r]=i),t},Array(t.length));return t.length>=e.length?n:n.concat(Array(e.length-t.length).fill(void 0))}return S(e)&&S(t)?Object.keys({...e,...t}).reduce((n,r)=>{let i=Pi(e?.[r],t?.[r]);return i===Ni?n:Object.assign(n,{[r]:i})},{}):t},Fi=/^[a-zA-Z0-9 _-]*$/,Ii=/^-?[0-9]+(\.[0-9]+)?$/,Li=/^#([a-f0-9]{3,4}|[a-f0-9]{6}|[a-f0-9]{8})$/i,Ri=/^(rgba?|hsla?)\(([0-9]{1,3}),\s?([0-9]{1,3})%?,\s?([0-9]{1,3})%?,?\s?([0-9](\.[0-9]{1,2})?)?\)$/i,zi=(e=``,t)=>e===null||e===``||!Fi.test(e)?!1:t==null||t instanceof Date||typeof t==`number`||typeof t==`boolean`?!0:typeof t==`string`?Fi.test(t)||Ii.test(t)||Li.test(t)||Ri.test(t):Array.isArray(t)?t.every(t=>zi(e,t)):S(t)?Object.entries(t).every(([e,t])=>zi(e,t)):!1,Bi=e=>e===void 0?`!undefined`:e===null?`!null`:typeof e==`string`?Li.test(e)?`!hex(${e.slice(1)})`:Ri.test(e)?`!${e.replace(/[\s%]/g,``)}`:e:typeof e==`boolean`?`!${e}`:e instanceof Date?`!date(${e.toISOString()})`:Array.isArray(e)?e.map(Bi):S(e)?Object.entries(e).reduce((e,[t,n])=>Object.assign(e,{[t]:Bi(n)}),{}):e,Vi=e=>{switch(e){case`%20`:return`+`;case`%5B`:return`[`;case`%5D`:return`]`;case`%2C`:return`,`;case`%3A`:return`:`}return e},Hi=/%[0-9A-F]{2}/g,Ui=(e,t)=>{let n=Pi(e,t);if(!n||n===Ni)return``;let r=Object.entries(n).reduce((e,[t,n])=>zi(t,n)?Object.assign(e,{[t]:n}):(Oi.warn(m`
|
|
19
|
+
Omitted potentially unsafe URL args.
|
|
20
|
+
|
|
21
|
+
More info: https://storybook.js.org/docs/writing-stories/args?ref=error#setting-args-through-the-url
|
|
22
|
+
`),e),{});return(0,Ai.stringify)(Bi(r),{delimiter:`;`,nesting:!0,nestingSyntax:`js`}).replace(Hi,Vi).split(`;`).map(e=>e.replace(`=`,`:`)).join(`;`)},Wi=(0,ki.default)(1e3)(e=>e===void 0?{}:(0,Ai.parse)(e)),Gi=e=>Wi(e.search?e.search.slice(1):``),Ki=(0,ki.default)(1e3)((e,t,n=!0)=>{if(n){if(typeof t!=`string`)throw Error(`startsWith only works with string targets`);return e&&e.startsWith(t)?{path:e}:null}let r=typeof t==`string`&&e===t,i=e&&t&&e.match(t);return r||i?{path:e}:null}),{global:qi}=__STORYBOOK_MODULE_GLOBAL__;function Ji(){return Ji=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ji.apply(this,arguments)}var Yi;(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(Yi||={});function Xi(e,t){if(e===!1||e===null||typeof e>`u`)throw Error(t)}function Zi(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function Qi(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var $i;(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})($i||={});function ea(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function ta(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?Qi(e):e;return{pathname:n?n.startsWith(`/`)?n:na(n,t):t,search:sa(r),hash:ca(i)}}function na(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ra(e,t,n,r){return`Cannot include a '`+e+`' character in a manually specified `+("`to."+t+"` field ["+JSON.stringify(r)+`]. Please separate it out to the `)+("`to."+n+"` field. Alternatively you may provide the full path as ")+`a string in <Link to="..."> and the router will parse it for you.`}function ia(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function aa(e,t,n,r){r===void 0&&(r=!1);let i;typeof e==`string`?i=Qi(e):(i=Ji({},e),Xi(!i.pathname||!i.pathname.includes(`?`),ra(`?`,`pathname`,`search`,i)),Xi(!i.pathname||!i.pathname.includes(`#`),ra(`#`,`pathname`,`hash`,i)),Xi(!i.search||!i.search.includes(`#`),ra(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(r||o==null)s=n;else{let e=t.length-1;if(o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ta(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var oa=e=>e.join(`/`).replace(/\/\/+/g,`/`),sa=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ca=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e;function la(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ua.apply(this,arguments)}var da=F.createContext(null),fa=F.createContext(null);F.createContext(null);var pa=F.createContext(null),ma=F.createContext(null),ha=F.createContext({outlet:null,matches:[],isDataRoute:!1}),ga=F.createContext(null);function _a(e,t){let{relative:n}=t===void 0?{}:t;va()||Xi(!1);let{basename:r,navigator:i}=F.useContext(pa),{hash:a,pathname:o,search:s}=Ca(e,{relative:n}),c=o;return r!==`/`&&(c=o===`/`?r:oa([r,o])),i.createHref({pathname:c,search:s,hash:a})}function va(){return F.useContext(ma)!=null}function ya(){return va()||Xi(!1),F.useContext(ma).location}function ba(e){F.useContext(pa).static||F.useLayoutEffect(e)}function xa(){let{isDataRoute:e}=F.useContext(ha);return e?Na():Sa()}function Sa(){va()||Xi(!1);let e=F.useContext(da),{basename:t,navigator:n}=F.useContext(pa),{matches:r}=F.useContext(ha),{pathname:i}=ya(),a=JSON.stringify(ia(r).map(e=>e.pathnameBase)),o=F.useRef(!1);return ba(()=>{o.current=!0}),F.useCallback(function(r,s){if(s===void 0&&(s={}),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=aa(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:oa([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}F.createContext(null);function Ca(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=F.useContext(ha),{pathname:i}=ya(),a=JSON.stringify(ia(r).map(e=>e.pathnameBase));return F.useMemo(()=>aa(e,JSON.parse(a),i,n===`path`),[e,a,i,n])}function wa(){let e=Ma(),t=la(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return F.createElement(F.Fragment,null,F.createElement(`h2`,null,`Unexpected Application Error!`),F.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?F.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}F.createElement(wa,null);var Ta=(function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e})(Ta||{}),Ea=(function(e){return e.UseBlocker=`useBlocker`,e.UseLoaderData=`useLoaderData`,e.UseActionData=`useActionData`,e.UseRouteError=`useRouteError`,e.UseNavigation=`useNavigation`,e.UseRouteLoaderData=`useRouteLoaderData`,e.UseMatches=`useMatches`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e.UseRouteId=`useRouteId`,e})(Ea||{});function Da(e){let t=F.useContext(da);return t||Xi(!1),t}function Oa(e){let t=F.useContext(fa);return t||Xi(!1),t}function ka(e){let t=F.useContext(ha);return t||Xi(!1),t}function Aa(e){let t=ka(e),n=t.matches[t.matches.length-1];return n.route.id||Xi(!1),n.route.id}function ja(){return Aa(Ea.UseRouteId)}function Ma(){let e=F.useContext(ga),t=Oa(Ea.UseRouteError),n=Aa(Ea.UseRouteError);return e||t.errors?.[n]}function Na(){let{router:e}=Da(Ta.UseNavigateStable),t=Aa(Ea.UseNavigateStable),n=F.useRef(!1);return ba(()=>{n.current=!0}),F.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,ua({fromRouteId:t},i)))},[e,t])}F.startTransition;var Pa=(function(e){return e[e.pending=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e})(Pa||{});new Promise(()=>{});function Fa(){return Fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fa.apply(this,arguments)}function Ia(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var La=`get`,Ra=`application/x-www-form-urlencoded`;function za(e){return e!=null&&typeof e.tagName==`string`}function Ba(e){return za(e)&&e.tagName.toLowerCase()===`button`}function Va(e){return za(e)&&e.tagName.toLowerCase()===`form`}function Ha(e){return za(e)&&e.tagName.toLowerCase()===`input`}function Ua(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wa(e,t){return e.button===0&&(!t||t===`_self`)&&!Ua(e)}var Ga=null;function Ka(){if(Ga===null)try{new FormData(document.createElement(`form`),0),Ga=!1}catch{Ga=!0}return Ga}var qa=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ja(e){return e!=null&&!qa.has(e)?null:e}function Ya(e,t){let n,r,i,a,o;if(Va(e)){let o=e.getAttribute(`action`);r=o?ea(o,t):null,n=e.getAttribute(`method`)||La,i=Ja(e.getAttribute(`enctype`))||Ra,a=new FormData(e)}else if(Ba(e)||Ha(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ea(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||La,i=Ja(e.getAttribute(`formenctype`))||Ja(o.getAttribute(`enctype`))||Ra,a=new FormData(o,e),!Ka()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?t+`.`:``;a.append(e+`x`,`0`),a.append(e+`y`,`0`)}else t&&a.append(t,r)}}else{if(za(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);n=La,r=null,i=Ra,o=e}return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}var Xa=[`onClick`,`relative`,`reloadDocument`,`replace`,`state`,`target`,`to`,`preventScrollReset`],Za=[`aria-current`,`caseSensitive`,`className`,`end`,`style`,`to`,`children`],Qa=[`reloadDocument`,`replace`,`state`,`method`,`action`,`onSubmit`,`submit`,`relative`,`preventScrollReset`];F.startTransition;var $a=typeof window<`u`&&typeof window.document<`u`&&typeof window.document.createElement<`u`,eo=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,to=F.forwardRef(function(e,t){let{onClick:n,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l}=e,u=Ia(e,Xa),{basename:d}=F.useContext(pa),f,p=!1;if(typeof c==`string`&&eo.test(c)&&(f=c,$a))try{let e=new URL(window.location.href),t=c.startsWith(`//`)?new URL(e.protocol+c):new URL(c),n=ea(t.pathname,d);t.origin===e.origin&&n!=null?c=n+t.search+t.hash:p=!0}catch{}let m=_a(c,{relative:r}),h=oo(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r});function g(e){n&&n(e),e.defaultPrevented||h(e)}return F.createElement(`a`,Fa({},u,{href:f||m,onClick:p||i?n:g,ref:t,target:s}))});F.forwardRef(function(e,t){let{"aria-current":n=`page`,caseSensitive:r=!1,className:i=``,end:a=!1,style:o,to:s,children:c}=e,l=Ia(e,Za),u=Ca(s,{relative:l.relative}),d=ya(),f=F.useContext(fa),{navigator:p}=F.useContext(pa),m=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,h=d.pathname,g=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;r||(h=h.toLowerCase(),g=g?g.toLowerCase():null,m=m.toLowerCase());let _=h===m||!a&&h.startsWith(m)&&h.charAt(m.length)===`/`,v=g!=null&&(g===m||!a&&g.startsWith(m)&&g.charAt(m.length)===`/`),y=_?n:void 0,b;b=typeof i==`function`?i({isActive:_,isPending:v}):[i,_?`active`:null,v?`pending`:null].filter(Boolean).join(` `);let x=typeof o==`function`?o({isActive:_,isPending:v}):o;return F.createElement(to,Fa({},l,{"aria-current":y,className:b,ref:t,style:x,to:s}),typeof c==`function`?c({isActive:_,isPending:v}):c)}),F.forwardRef((e,t)=>{let n=co();return F.createElement(no,Fa({},e,{submit:n,ref:t}))});var no=F.forwardRef((e,t)=>{let{reloadDocument:n,replace:r,state:i,method:a=La,action:o,onSubmit:s,submit:c,relative:l,preventScrollReset:u}=e,d=Ia(e,Qa),f=a.toLowerCase()===`get`?`get`:`post`,p=lo(o,{relative:l});return F.createElement(`form`,Fa({ref:t,method:f,action:p,onSubmit:n?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=t?.getAttribute(`formmethod`)||a;c(t||e.currentTarget,{method:n,replace:r,state:i,relative:l,preventScrollReset:u})}},d))}),ro;(function(e){e.UseScrollRestoration=`useScrollRestoration`,e.UseSubmit=`useSubmit`,e.UseSubmitFetcher=`useSubmitFetcher`,e.UseFetcher=`useFetcher`})(ro||={});var io;(function(e){e.UseFetchers=`useFetchers`,e.UseScrollRestoration=`useScrollRestoration`})(io||={});function ao(e){let t=F.useContext(da);return t||Xi(!1),t}function oo(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o}=t===void 0?{}:t,s=xa(),c=ya(),l=Ca(e,{relative:o});return F.useCallback(t=>{Wa(t,n)&&(t.preventDefault(),s(e,{replace:r===void 0?Zi(c)===Zi(l):r,state:i,preventScrollReset:a,relative:o}))},[c,s,l,r,i,n,e,a,o])}function so(){if(typeof document>`u`)throw Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function co(){let{router:e}=ao(ro.UseSubmit),{basename:t}=F.useContext(pa),n=ja();return F.useCallback(function(r,i){i===void 0&&(i={}),so();let{action:a,method:o,encType:s,formData:c,body:l}=Ya(r,t);e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:c,body:l,formMethod:i.method||o,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n})},[e,t,n])}function lo(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=F.useContext(pa),i=F.useContext(ha);i||Xi(!1);let[a]=i.matches.slice(-1),o=Fa({},Ca(e||`.`,{relative:n})),s=ya();if(e==null&&(o.search=s.search,a.route.index)){let e=new URLSearchParams(o.search);e.delete(`index`),o.search=e.toString()?`?`+e.toString():``}return(!e||e===`.`)&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,`?index&`):`?index`),r!==`/`&&(o.pathname=o.pathname===`/`?r:oa([r,o.pathname])),Zi(o)}var{document:uo}=qi,fo=()=>`${uo.location.pathname}?`,po=({to:e,children:t,...n})=>F.createElement(to,{to:`${fo()}path=${e}`,...n},t);po.displayName=`QueryLink`;var mo=({children:e})=>{let t=ya(),{path:n,singleStory:r}=Gi(t),{viewMode:i,storyId:a,refId:o}=Mi(n);return F.createElement(F.Fragment,null,e({path:n||`/`,location:t,viewMode:i,storyId:a,refId:o,singleStory:r===`true`}))};mo.displayName=`QueryLocation`;function ho({children:e,path:t,startsWith:n=!1}){return F.createElement(mo,null,({path:r,...i})=>e({match:Ki(r,t,n),...i}))}ho.displayName=`QueryMatch`;function go(e){let{children:t,...n}=e;return n.startsWith===void 0&&(n.startsWith=!1),F.createElement(ho,{...n},({match:e})=>e?t:null)}go.displayName=`Route`;var _o=n(((e,t)=>{var n=`2.0.0`,r=256;t.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:r-6,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),vo=n(((e,t)=>{t.exports=typeof process==`object`&&{}.NODE_DEBUG&&/\bsemver\b/i.test({}.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),yo=n(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:i}=_o(),a=vo();e=t.exports={};var o=e.re=[],s=e.safeRe=[],c=e.src=[],l=e.safeSrc=[],u=e.t={},d=0,f=`[a-zA-Z0-9-]`,p=[[`\\s`,1],[`\\d`,i],[f,r]],m=e=>{for(let[t,n]of p)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},h=(e,t,n)=>{let r=m(t),i=d++;a(e,i,t),u[e]=i,c[i]=t,l[i]=r,o[i]=new RegExp(t,n?`g`:void 0),s[i]=new RegExp(r,n?`g`:void 0)};h(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),h(`NUMERICIDENTIFIERLOOSE`,`\\d+`),h(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${f}*`),h(`MAINVERSION`,`(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})\\.(${c[u.NUMERICIDENTIFIER]})`),h(`MAINVERSIONLOOSE`,`(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})\\.(${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASEIDENTIFIER`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIER]})`),h(`PRERELEASEIDENTIFIERLOOSE`,`(?:${c[u.NONNUMERICIDENTIFIER]}|${c[u.NUMERICIDENTIFIERLOOSE]})`),h(`PRERELEASE`,`(?:-(${c[u.PRERELEASEIDENTIFIER]}(?:\\.${c[u.PRERELEASEIDENTIFIER]})*))`),h(`PRERELEASELOOSE`,`(?:-?(${c[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${c[u.PRERELEASEIDENTIFIERLOOSE]})*))`),h(`BUILDIDENTIFIER`,`${f}+`),h(`BUILD`,`(?:\\+(${c[u.BUILDIDENTIFIER]}(?:\\.${c[u.BUILDIDENTIFIER]})*))`),h(`FULLPLAIN`,`v?${c[u.MAINVERSION]}${c[u.PRERELEASE]}?${c[u.BUILD]}?`),h(`FULL`,`^${c[u.FULLPLAIN]}$`),h(`LOOSEPLAIN`,`[v=\\s]*${c[u.MAINVERSIONLOOSE]}${c[u.PRERELEASELOOSE]}?${c[u.BUILD]}?`),h(`LOOSE`,`^${c[u.LOOSEPLAIN]}$`),h(`GTLT`,`((?:<|>)?=?)`),h(`XRANGEIDENTIFIERLOOSE`,`${c[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h(`XRANGEIDENTIFIER`,`${c[u.NUMERICIDENTIFIER]}|x|X|\\*`),h(`XRANGEPLAIN`,`[v=\\s]*(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:\\.(${c[u.XRANGEIDENTIFIER]})(?:${c[u.PRERELEASE]})?${c[u.BUILD]}?)?)?`),h(`XRANGEPLAINLOOSE`,`[v=\\s]*(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${c[u.XRANGEIDENTIFIERLOOSE]})(?:${c[u.PRERELEASELOOSE]})?${c[u.BUILD]}?)?)?`),h(`XRANGE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAIN]}$`),h(`XRANGELOOSE`,`^${c[u.GTLT]}\\s*${c[u.XRANGEPLAINLOOSE]}$`),h(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h(`COERCE`,`${c[u.COERCEPLAIN]}(?:$|[^\\d])`),h(`COERCEFULL`,c[u.COERCEPLAIN]+`(?:${c[u.PRERELEASE]})?(?:${c[u.BUILD]})?(?:$|[^\\d])`),h(`COERCERTL`,c[u.COERCE],!0),h(`COERCERTLFULL`,c[u.COERCEFULL],!0),h(`LONETILDE`,`(?:~>?)`),h(`TILDETRIM`,`(\\s*)${c[u.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,h(`TILDE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAIN]}$`),h(`TILDELOOSE`,`^${c[u.LONETILDE]}${c[u.XRANGEPLAINLOOSE]}$`),h(`LONECARET`,`(?:\\^)`),h(`CARETTRIM`,`(\\s*)${c[u.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,h(`CARET`,`^${c[u.LONECARET]}${c[u.XRANGEPLAIN]}$`),h(`CARETLOOSE`,`^${c[u.LONECARET]}${c[u.XRANGEPLAINLOOSE]}$`),h(`COMPARATORLOOSE`,`^${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]})$|^$`),h(`COMPARATOR`,`^${c[u.GTLT]}\\s*(${c[u.FULLPLAIN]})$|^$`),h(`COMPARATORTRIM`,`(\\s*)${c[u.GTLT]}\\s*(${c[u.LOOSEPLAIN]}|${c[u.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,h(`HYPHENRANGE`,`^\\s*(${c[u.XRANGEPLAIN]})\\s+-\\s+(${c[u.XRANGEPLAIN]})\\s*$`),h(`HYPHENRANGELOOSE`,`^\\s*(${c[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${c[u.XRANGEPLAINLOOSE]})\\s*$`),h(`STAR`,`(<|>)?=?\\s*\\*`),h(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),h(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),bo=n(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),xo=n(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{if(typeof e==`number`&&typeof t==`number`)return e===t?0:e<t?-1:1;let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),So=n(((e,t)=>{var n=vo(),{MAX_LENGTH:r,MAX_SAFE_INTEGER:i}=_o(),{safeRe:a,t:o}=yo(),s=bo(),{compareIdentifiers:c}=xo();t.exports=class e{constructor(t,c){if(c=s(c),t instanceof e){if(t.loose===!!c.loose&&t.includePrerelease===!!c.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>r)throw TypeError(`version is longer than ${r} characters`);n(`SemVer`,t,c),this.options=c,this.loose=!!c.loose,this.includePrerelease=!!c.includePrerelease;let l=t.trim().match(c.loose?a[o.LOOSE]:a[o.FULL]);if(!l)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+l[1],this.minor=+l[2],this.patch=+l[3],this.major>i||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>i||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>i||this.patch<0)throw TypeError(`Invalid patch version`);l[4]?this.prerelease=l[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=l[5]?l[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(n(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),this.major<t.major?-1:this.major>t.major?1:this.minor<t.minor?-1:this.minor>t.minor?1:this.patch<t.patch?-1:this.patch>t.patch?1:0}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let r=0;do{let e=this.prerelease[r],i=t.prerelease[r];if(n(`prerelease compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let r=0;do{let e=this.build[r],i=t.build[r];if(n(`build compare`,r,e,i),e===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(e===void 0)return-1;if(e===i)continue;return c(e,i)}while(++r)}inc(e,t,n){if(e.startsWith(`pre`)){if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(t){let e=`-${t}`.match(this.options.loose?a[o.PRERELEASELOOSE]:a[o.PRERELEASE]);if(!e||e[1]!==t)throw Error(`invalid identifier: ${t}`)}}switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`release`:if(this.prerelease.length===0)throw Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=Number(n)?1:0;if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),c(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),Co=n(((e,t)=>{var n=So();t.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}})),wo=n(((e,t)=>{var n=Co();t.exports=(e,t)=>{let r=n(e,t);return r?r.version:null}})),To=n(((e,t)=>{var n=Co();t.exports=(e,t)=>{let r=n(e.trim().replace(/^[=v]+/,``),t);return r?r.version:null}})),Eo=n(((e,t)=>{var n=So();t.exports=(e,t,r,i,a)=>{typeof r==`string`&&(a=i,i=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,i,a).version}catch{return null}}})),Do=n(((e,t)=>{var n=Co();t.exports=(e,t)=>{let r=n(e,null,!0),i=n(t,null,!0),a=r.compare(i);if(a===0)return null;let o=a>0,s=o?r:i,c=o?i:r,l=!!s.prerelease.length;if(c.prerelease.length&&!l){if(!c.patch&&!c.minor)return`major`;if(c.compareMain(s)===0)return c.minor&&!c.patch?`minor`:`patch`}let u=l?`pre`:``;return r.major===i.major?r.minor===i.minor?r.patch===i.patch?`prerelease`:u+`patch`:u+`minor`:u+`major`}})),Oo=n(((e,t)=>{var n=So();t.exports=(e,t)=>new n(e,t).major})),ko=n(((e,t)=>{var n=So();t.exports=(e,t)=>new n(e,t).minor})),Ao=n(((e,t)=>{var n=So();t.exports=(e,t)=>new n(e,t).patch})),jo=n(((e,t)=>{var n=Co();t.exports=(e,t)=>{let r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}})),Mo=n(((e,t)=>{var n=So();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),No=n(((e,t)=>{var n=Mo();t.exports=(e,t,r)=>n(t,e,r)})),Po=n(((e,t)=>{var n=Mo();t.exports=(e,t)=>n(e,t,!0)})),Fo=n(((e,t)=>{var n=So();t.exports=(e,t,r)=>{let i=new n(e,r),a=new n(t,r);return i.compare(a)||i.compareBuild(a)}})),Io=n(((e,t)=>{var n=Fo();t.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))})),Lo=n(((e,t)=>{var n=Fo();t.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))})),Ro=n(((e,t)=>{var n=Mo();t.exports=(e,t,r)=>n(e,t,r)>0})),zo=n(((e,t)=>{var n=Mo();t.exports=(e,t,r)=>n(e,t,r)<0})),Bo=n(((e,t)=>{var n=Mo();t.exports=(e,t,r)=>n(e,t,r)===0})),Vo=n(((e,t)=>{var n=Mo();t.exports=(e,t,r)=>n(e,t,r)!==0})),Ho=n(((e,t)=>{var n=Mo();t.exports=(e,t,r)=>n(e,t,r)>=0})),Uo=n(((e,t)=>{var n=Mo();t.exports=(e,t,r)=>n(e,t,r)<=0})),Wo=n(((e,t)=>{var n=Bo(),r=Vo(),i=Ro(),a=Ho(),o=zo(),s=Uo();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),Go=n(((e,t)=>{var n=So(),r=Co(),{safeRe:i,t:a}=yo();t.exports=(e,t)=>{if(e instanceof n)return e;if(typeof e==`number`&&(e=String(e)),typeof e!=`string`)return null;t||={};let o=null;if(!t.rtl)o=e.match(t.includePrerelease?i[a.COERCEFULL]:i[a.COERCE]);else{let n=t.includePrerelease?i[a.COERCERTLFULL]:i[a.COERCERTL],r;for(;(r=n.exec(e))&&(!o||o.index+o[0].length!==e.length);)(!o||r.index+r[0].length!==o.index+o[0].length)&&(o=r),n.lastIndex=r.index+r[1].length+r[2].length;n.lastIndex=-1}if(o===null)return null;let s=o[2];return r(`${s}.${o[3]||`0`}.${o[4]||`0`}${t.includePrerelease&&o[5]?`-${o[5]}`:``}${t.includePrerelease&&o[6]?`+${o[6]}`:``}`,t)}})),Ko=n(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),qo=n(((e,t)=>{var n=/\s+/g;t.exports=class e{constructor(t,r){if(r=i(r),t instanceof e)return t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease?t:new e(t.raw,r);if(t instanceof a)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=t.trim().replace(n,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!h(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&g(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&p)|(this.options.loose&&m))+`:`+e,n=r.get(t);if(n)return n;let i=this.options.loose,s=i?c[l.HYPHENRANGELOOSE]:c[l.HYPHENRANGE];e=e.replace(s,O(this.options.includePrerelease)),o(`hyphen replace`,e),e=e.replace(c[l.COMPARATORTRIM],u),o(`comparator trim`,e),e=e.replace(c[l.TILDETRIM],d),o(`tilde trim`,e),e=e.replace(c[l.CARETTRIM],f),o(`caret trim`,e);let g=e.split(` `).map(e=>v(e,this.options)).join(` `).split(/\s+/).map(e=>D(e,this.options));i&&(g=g.filter(e=>(o(`loose invalid filter`,e,this.options),!!e.match(c[l.COMPARATORLOOSE])))),o(`range list`,g);let _=new Map,y=g.map(e=>new a(e,this.options));for(let e of y){if(h(e))return[e];_.set(e.value,e)}_.size>1&&_.has(``)&&_.delete(``);let b=[..._.values()];return r.set(t,b),b}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>_(e,n)&&t.set.some(t=>_(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new s(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(k(this.set[t],e,this.options))return!0;return!1}};var r=new(Ko()),i=bo(),a=Jo(),o=vo(),s=So(),{safeRe:c,t:l,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=yo(),{FLAG_INCLUDE_PRERELEASE:p,FLAG_LOOSE:m}=_o(),h=e=>e.value===`<0.0.0-0`,g=e=>e.value===``,_=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},v=(e,t)=>(e=e.replace(c[l.BUILD],``),o(`comp`,e,t),e=S(e,t),o(`caret`,e),e=b(e,t),o(`tildes`,e),e=w(e,t),o(`xrange`,e),e=E(e,t),o(`stars`,e),e),y=e=>!e||e.toLowerCase()===`x`||e===`*`,b=(e,t)=>e.trim().split(/\s+/).map(e=>x(e,t)).join(` `),x=(e,t)=>{let n=t.loose?c[l.TILDELOOSE]:c[l.TILDE];return e.replace(n,(t,n,r,i,a)=>{o(`tilde`,e,t,n,r,i,a);let s;return y(n)?s=``:y(r)?s=`>=${n}.0.0 <${+n+1}.0.0-0`:y(i)?s=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(o(`replaceTilde pr`,a),s=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):s=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,o(`tilde return`,s),s})},S=(e,t)=>e.trim().split(/\s+/).map(e=>C(e,t)).join(` `),C=(e,t)=>{o(`caret`,e,t);let n=t.loose?c[l.CARETLOOSE]:c[l.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,s)=>{o(`caret`,e,t,n,i,a,s);let c;return y(n)?c=``:y(i)?c=`>=${n}.0.0${r} <${+n+1}.0.0-0`:y(a)?c=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:s?(o(`replaceCaret pr`,s),c=n===`0`?i===`0`?`>=${n}.${i}.${a}-${s} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${s} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${s} <${+n+1}.0.0-0`):(o(`no pr`),c=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),o(`caret return`,c),c})},w=(e,t)=>(o(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>T(e,t)).join(` `)),T=(e,t)=>{e=e.trim();let n=t.loose?c[l.XRANGELOOSE]:c[l.XRANGE];return e.replace(n,(n,r,i,a,s,c)=>{o(`xRange`,e,n,r,i,a,s,c);let l=y(i),u=l||y(a),d=u||y(s),f=d;return r===`=`&&f&&(r=``),c=t.includePrerelease?`-0`:``,l?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&f?(u&&(a=0),s=0,r===`>`?(r=`>=`,u?(i=+i+1,a=0,s=0):(a=+a+1,s=0)):r===`<=`&&(r=`<`,u?i=+i+1:a=+a+1),r===`<`&&(c=`-0`),n=`${r+i}.${a}.${s}${c}`):u?n=`>=${i}.0.0${c} <${+i+1}.0.0-0`:d&&(n=`>=${i}.${a}.0${c} <${i}.${+a+1}.0-0`),o(`xRange return`,n),n})},E=(e,t)=>(o(`replaceStars`,e,t),e.trim().replace(c[l.STAR],``)),D=(e,t)=>(o(`replaceGTE0`,e,t),e.trim().replace(c[t.includePrerelease?l.GTE0PRE:l.GTE0],``)),O=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=y(r)?``:y(i)?`>=${r}.0.0${e?`-0`:``}`:y(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=y(l)?``:y(u)?`<${+l+1}.0.0-0`:y(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),k=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(o(e[n].semver),e[n].semver!==a.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),Jo=n(((e,t)=>{var n=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return n}constructor(t,i){if(i=r(i),t instanceof e){if(t.loose===!!i.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),s(`comparator`,t,i),this.options=i,this.loose=!!i.loose,this.parse(t),this.semver===n?this.value=``:this.value=this.operator+this.semver.version,s(`comp`,this)}parse(e){let t=this.options.loose?i[a.COMPARATORLOOSE]:i[a.COMPARATOR],r=e.match(t);if(!r)throw TypeError(`Invalid comparator: ${e}`);this.operator=r[1]===void 0?``:r[1],this.operator===`=`&&(this.operator=``),r[2]?this.semver=new c(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(s(`Comparator.test`,e,this.options.loose),this.semver===n||e===n)return!0;if(typeof e==`string`)try{e=new c(e,this.options)}catch{return!1}return o(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new l(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new l(this.value,n).test(t.semver):(n=r(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||o(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||o(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var r=bo(),{safeRe:i,t:a}=yo(),o=Wo(),s=vo(),c=So(),l=qo()})),Yo=n(((e,t)=>{var n=qo();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),Xo=n(((e,t)=>{var n=qo();t.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(` `).trim().split(` `))})),Zo=n(((e,t)=>{var n=So(),r=qo();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===-1)&&(a=e,o=new n(a,i))}),a}})),Qo=n(((e,t)=>{var n=So(),r=qo();t.exports=(e,t,i)=>{let a=null,o=null,s=null;try{s=new r(t,i)}catch{return null}return e.forEach(e=>{s.test(e)&&(!a||o.compare(e)===1)&&(a=e,o=new n(a,i))}),a}})),$o=n(((e,t)=>{var n=So(),r=qo(),i=Ro();t.exports=(e,t)=>{e=new r(e,t);let a=new n(`0.0.0`);if(e.test(a)||(a=new n(`0.0.0-0`),e.test(a)))return a;a=null;for(let t=0;t<e.set.length;++t){let r=e.set[t],o=null;r.forEach(e=>{let t=new n(e.semver.version);switch(e.operator){case`>`:t.prerelease.length===0?t.patch++:t.prerelease.push(0),t.raw=t.format();case``:case`>=`:(!o||i(t,o))&&(o=t);break;case`<`:case`<=`:break;default:throw Error(`Unexpected operation: ${e.operator}`)}}),o&&(!a||i(a,o))&&(a=o)}return a&&e.test(a)?a:null}})),es=n(((e,t)=>{var n=qo();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),ts=n(((e,t)=>{var n=So(),r=Jo(),{ANY:i}=r,a=qo(),o=Yo(),s=Ro(),c=zo(),l=Uo(),u=Ho();t.exports=(e,t,d,f)=>{e=new n(e,f),t=new a(t,f);let p,m,h,g,_;switch(d){case`>`:p=s,m=l,h=c,g=`>`,_=`>=`;break;case`<`:p=c,m=u,h=s,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,f))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,p(e.semver,o.semver,f)?o=e:h(e.semver,s.semver,f)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&m(e,s.semver)||s.operator===_&&h(e,s.semver))return!1}return!0}})),ns=n(((e,t)=>{var n=ts();t.exports=(e,t,r)=>n(e,t,`>`,r)})),rs=n(((e,t)=>{var n=ts();t.exports=(e,t,r)=>n(e,t,`<`,r)})),is=n(((e,t)=>{var n=qo();t.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))})),as=n(((e,t)=>{var n=Yo(),r=Mo();t.exports=(e,t,i)=>{let a=[],o=null,s=null,c=e.sort((e,t)=>r(e,t,i));for(let e of c)n(e,t,i)?(s=e,o||=e):(s&&a.push([o,s]),s=null,o=null);o&&a.push([o,null]);let l=[];for(let[e,t]of a)e===t?l.push(e):!t&&e===c[0]?l.push(`*`):t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`);let u=l.join(` || `),d=typeof t.raw==`string`?t.raw:String(t);return u.length<d.length?u:t}})),os=n(((e,t)=>{var n=qo(),r=Jo(),{ANY:i}=r,a=Yo(),o=Mo(),s=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let i=!1;OUTER:for(let n of e.set){for(let e of t.set){let t=u(n,e,r);if(i||=t!==null,t)continue OUTER}if(i)return!1}return!0},c=[new r(`>=0.0.0-0`)],l=[new r(`>=0.0.0`)],u=(e,t,n)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===i){if(t.length===1&&t[0].semver===i)return!0;e=n.includePrerelease?c:l}if(t.length===1&&t[0].semver===i){if(n.includePrerelease)return!0;t=l}let r=new Set,s,u;for(let t of e)t.operator===`>`||t.operator===`>=`?s=d(s,t,n):t.operator===`<`||t.operator===`<=`?u=f(u,t,n):r.add(t.semver);if(r.size>1)return null;let p;if(s&&u&&(p=o(s.semver,u.semver,n),p>0||p===0&&(s.operator!==`>=`||u.operator!==`<=`)))return null;for(let e of r){if(s&&!a(e,String(s),n)||u&&!a(e,String(u),n))return null;for(let r of t)if(!a(e,String(r),n))return!1;return!0}let m,h,g,_,v=u&&!n.includePrerelease&&u.semver.prerelease.length?u.semver:!1,y=s&&!n.includePrerelease&&s.semver.prerelease.length?s.semver:!1;v&&v.prerelease.length===1&&u.operator===`<`&&v.prerelease[0]===0&&(v=!1);for(let e of t){if(_=_||e.operator===`>`||e.operator===`>=`,g=g||e.operator===`<`||e.operator===`<=`,s){if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),e.operator===`>`||e.operator===`>=`){if(m=d(s,e,n),m===e&&m!==s)return!1}else if(s.operator===`>=`&&!a(s.semver,String(e),n))return!1}if(u){if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),e.operator===`<`||e.operator===`<=`){if(h=f(u,e,n),h===e&&h!==u)return!1}else if(u.operator===`<=`&&!a(u.semver,String(e),n))return!1}if(!e.operator&&(u||s)&&p!==0)return!1}return!(s&&g&&!u&&p!==0||u&&_&&!s&&p!==0||y||v)},d=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r>0?e:r<0||t.operator===`>`&&e.operator===`>=`?t:e},f=(e,t,n)=>{if(!e)return t;let r=o(e.semver,t.semver,n);return r<0?e:r>0||t.operator===`<`&&e.operator===`<=`?t:e};t.exports=s})),ss=p(n(((e,t)=>{var n=yo(),r=_o(),i=So(),a=xo();t.exports={parse:Co(),valid:wo(),clean:To(),inc:Eo(),diff:Do(),major:Oo(),minor:ko(),patch:Ao(),prerelease:jo(),compare:Mo(),rcompare:No(),compareLoose:Po(),compareBuild:Fo(),sort:Io(),rsort:Lo(),gt:Ro(),lt:zo(),eq:Bo(),neq:Vo(),gte:Ho(),lte:Uo(),cmp:Wo(),coerce:Go(),Comparator:Jo(),Range:qo(),satisfies:Yo(),toComparators:Xo(),maxSatisfying:Zo(),minSatisfying:Qo(),minVersion:$o(),validRange:es(),outside:ts(),gtr:ns(),ltr:rs(),intersects:is(),simplifyRange:as(),subset:os(),SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:r.SEMVER_SPEC_VERSION,RELEASE_TYPES:r.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}}))(),1),cs=x({"../../node_modules/toggle-selection/index.js"(e,t){t.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case`INPUT`:case`TEXTAREA`:t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type===`Caret`&&e.removeAllRanges(),e.rangeCount||n.forEach(function(t){e.addRange(t)}),t&&t.focus()}}}}),ls=x({"../../node_modules/copy-to-clipboard/index.js"(e,t){var n=cs(),r={"text/plain":`Text`,"text/html":`Url`,default:`Text`},i=`Copy to clipboard: #{key}, Enter`;function a(e){var t=(/mac os x/i.test(navigator.userAgent)?`⌘`:`Ctrl`)+`+C`;return e.replace(/#{\s*key\s*}/g,t)}function o(e,t){var o,s,c,l,u,d,f=!1;t||={},o=t.debug||!1;try{if(c=n(),l=document.createRange(),u=document.getSelection(),d=document.createElement(`span`),d.textContent=e,d.ariaHidden=`true`,d.style.all=`unset`,d.style.position=`fixed`,d.style.top=0,d.style.clip=`rect(0, 0, 0, 0)`,d.style.whiteSpace=`pre`,d.style.webkitUserSelect=`text`,d.style.MozUserSelect=`text`,d.style.msUserSelect=`text`,d.style.userSelect=`text`,d.addEventListener(`copy`,function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),typeof n.clipboardData>`u`){o&&console.warn(`unable to use e.clipboardData`),o&&console.warn(`trying IE specific stuff`),window.clipboardData.clearData();var i=r[t.format]||r.default;window.clipboardData.setData(i,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))}),document.body.appendChild(d),l.selectNodeContents(d),u.addRange(l),!document.execCommand(`copy`))throw Error(`copy command was unsuccessful`);f=!0}catch(n){o&&console.error(`unable to copy using execCommand: `,n),o&&console.warn(`trying IE specific stuff`);try{window.clipboardData.setData(t.format||`text`,e),t.onCopy&&t.onCopy(window.clipboardData),f=!0}catch(n){o&&console.error(`unable to copy using clipboardData: `,n),o&&console.error(`falling back to prompt`),s=a(`message`in t?t.message:i),window.prompt(s,e)}}finally{u&&(typeof u.removeRange==`function`?u.removeRange(l):u.removeAllRanges()),d&&document.body.removeChild(d),c()}return f}t.exports=o}}),us=x({"../../node_modules/picocolors/picocolors.browser.js"(e,t){var n=String,r=function(){return{isColorSupported:!1,reset:n,bold:n,dim:n,italic:n,underline:n,inverse:n,hidden:n,strikethrough:n,black:n,red:n,green:n,yellow:n,blue:n,magenta:n,cyan:n,white:n,gray:n,bgBlack:n,bgRed:n,bgGreen:n,bgYellow:n,bgBlue:n,bgMagenta:n,bgCyan:n,bgWhite:n,blackBright:n,redBright:n,greenBright:n,yellowBright:n,blueBright:n,magentaBright:n,cyanBright:n,whiteBright:n,bgBlackBright:n,bgRedBright:n,bgGreenBright:n,bgYellowBright:n,bgBlueBright:n,bgMagentaBright:n,bgCyanBright:n,bgWhiteBright:n}};t.exports=r(),t.exports.createColors=r}}),ds=x({"../../node_modules/store2/dist/store2.js"(e,t){(function(e,n){var r={version:`2.14.4`,areas:{},apis:{},nsdelim:`.`,inherit:function(e,t){for(var n in e)t.hasOwnProperty(n)||Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n));return t},stringify:function(e,t){return e===void 0||typeof e==`function`?e+``:JSON.stringify(e,t||r.replace)},parse:function(e,t){try{return JSON.parse(e,t||r.revive)}catch{return e}},fn:function(e,t){for(var n in r.storeAPI[e]=t,r.apis)r.apis[n][e]=t},get:function(e,t){return e.getItem(t)},set:function(e,t,n){e.setItem(t,n)},remove:function(e,t){e.removeItem(t)},key:function(e,t){return e.key(t)},length:function(e){return e.length},clear:function(e){e.clear()},Store:function(e,t,n){var i=r.inherit(r.storeAPI,function(e,t,n){return arguments.length===0?i.getAll():typeof t==`function`?i.transact(e,t,n):t===void 0?typeof e==`string`||typeof e==`number`?i.get(e):typeof e==`function`?i.each(e):e?i.setAll(e,t):i.clear():i.set(e,t,n)});i._id=e;try{var a=`__store2_test`;t.setItem(a,`ok`),i._area=t,t.removeItem(a)}catch{i._area=r.storage(`fake`)}return i._ns=n||``,r.areas[e]||(r.areas[e]=i._area),r.apis[i._ns+i._id]||(r.apis[i._ns+i._id]=i),i},storeAPI:{area:function(e,t){var n=this[e];return(!n||!n.area)&&(n=r.Store(e,t,this._ns),this[e]||(this[e]=n)),n},namespace:function(e,t,n){if(n=n||this._delim||r.nsdelim,!e)return this._ns?this._ns.substring(0,this._ns.length-n.length):``;var i=e,a=this[i];if((!a||!a.namespace)&&(a=r.Store(this._id,this._area,this._ns+i+n),a._delim=n,this[i]||(this[i]=a),!t))for(var o in r.areas)a.area(o,r.areas[o]);return a},isFake:function(e){return e?(this._real=this._area,this._area=r.storage(`fake`)):e===!1&&(this._area=this._real||this._area),this._area.name===`fake`},toString:function(){return`store`+(this._ns?`.`+this.namespace():``)+`[`+this._id+`]`},has:function(e){return this._area.has?this._area.has(this._in(e)):this._in(e)in this._area},size:function(){return this.keys().length},each:function(e,t){for(var n=0,i=r.length(this._area);n<i;n++){var a=this._out(r.key(this._area,n));if(a!==void 0&&e.call(this,a,this.get(a),t)===!1)break;i>r.length(this._area)&&(i--,n--)}return t||this},keys:function(e){return this.each(function(e,t,n){n.push(e)},e||[])},get:function(e,t){var n=r.get(this._area,this._in(e)),i;return typeof t==`function`&&(i=t,t=null),n===null?t??n:r.parse(n,i)},getAll:function(e){return this.each(function(e,t,n){n[e]=t},e||{})},transact:function(e,t,n){var r=this.get(e,n),i=t(r);return this.set(e,i===void 0?r:i),this},set:function(e,t,n){var i=this.get(e),a;return i!=null&&n===!1?t:(typeof n==`function`&&(a=n,n=void 0),r.set(this._area,this._in(e),r.stringify(t,a),n)||i)},setAll:function(e,t){var n,r;for(var i in e)r=e[i],this.set(i,r,t)!==r&&(n=!0);return n},add:function(e,t,n){var i=this.get(e);if(i instanceof Array)t=i.concat(t);else if(i!==null){var a=typeof i;if(a===typeof t&&a===`object`){for(var o in t)i[o]=t[o];t=i}else t=i+t}return r.set(this._area,this._in(e),r.stringify(t,n)),t},remove:function(e,t){var n=this.get(e,t);return r.remove(this._area,this._in(e)),n},clear:function(){return this._ns?this.each(function(e){r.remove(this._area,this._in(e))},1):r.clear(this._area),this},clearAll:function(){var e=this._area;for(var t in r.areas)r.areas.hasOwnProperty(t)&&(this._area=r.areas[t],this.clear());return this._area=e,this},_in:function(e){return typeof e!=`string`&&(e=r.stringify(e)),this._ns?this._ns+e:e},_out:function(e){return this._ns?e&&e.indexOf(this._ns)===0?e.substring(this._ns.length):void 0:e}},storage:function(e){return r.inherit(r.storageAPI,{items:{},name:e})},storageAPI:{length:0,has:function(e){return this.items.hasOwnProperty(e)},key:function(e){var t=0;for(var n in this.items)if(this.has(n)&&e===t++)return n},setItem:function(e,t){this.has(e)||this.length++,this.items[e]=t},removeItem:function(e){this.has(e)&&(delete this.items[e],this.length--)},getItem:function(e){return this.has(e)?this.items[e]:null},clear:function(){for(var e in this.items)this.removeItem(e)}}},i=r.Store(`local`,(function(){try{return localStorage}catch{}})());i.local=i,i._=r,i.area(`session`,(function(){try{return sessionStorage}catch{}})()),i.area(`page`,r.storage(`page`)),typeof n==`function`&&n.amd!==void 0?n(`store2`,[],function(){return i}):typeof t<`u`&&t.exports?t.exports=i:(e.store&&(r.conflict=e.store),e.store=i)})(e,e&&e.define)}}),{DOCS_PREPARED:fs,SET_STORIES:ps,SHARED_STATE_CHANGED:ms,SHARED_STATE_SET:hs,STORY_CHANGED:gs,STORY_PREPARED:_s}=__STORYBOOK_MODULE_CORE_EVENTS__,vs=({api:e,state:t})=>(0,F.createContext)({api:e,state:t}),{logger:ys}=__STORYBOOK_MODULE_CLIENT_LOGGER__,bs=(e,...t)=>{let n={};n=f({},e,(e,t)=>{if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.find(e=>e===t||u(e,t))||e.push(t)}),e;if(Array.isArray(e))return ys.log([`the types mismatch, picking`,e]),e});for(let e of t)n=f(n,e,(e,t)=>{if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.find(e=>e===t||u(e,t))||e.push(t)}),e;if(Array.isArray(e))return ys.log([`the types mismatch, picking`,e]),e});return n},xs=(e,...t)=>{let n={};n=f({},e,(e,t)=>{if(Array.isArray(t))return t});for(let e of t)n=f(n,e,(e,t)=>{if(Array.isArray(t))return t});return n},Ss=(...e)=>e.reduce((e,t)=>bs(e,t),{}),{logger:Cs}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{SET_CONFIG:ws}=__STORYBOOK_MODULE_CORE_EVENTS__,{Addon_TypesEnum:Ts}=__STORYBOOK_MODULE_TYPES__,{global:Es}=__STORYBOOK_MODULE_GLOBAL__,{Channel:Ds}=__STORYBOOK_MODULE_CHANNELS__;function Os(){return new Ds({transport:{setHandler:()=>{},send:()=>{}}})}var ks=class{constructor(){this.loaders={},this.elements={},this.config={},this.getChannel=()=>(this.channel||this.setChannel(Os()),this.channel),this.ready=()=>this.promise,this.hasChannel=()=>!!this.channel,this.setChannel=e=>{this.channel=e,this.resolve()},this.setConfig=e=>{Object.assign(this.config,e),this.hasChannel()?this.getChannel().emit(ws,this.config):this.ready().then(e=>{e.emit(ws,this.config)})},this.getConfig=()=>this.config,this.register=(e,t)=>{this.loaders[e]&&Cs.warn(`${e} was loaded twice, this could have bad side-effects`),this.loaders[e]=t},this.loadAddons=e=>{Object.values(this.loaders).forEach(t=>t(e))},this.promise=new Promise(e=>{this.resolve=()=>e(this.getChannel())})}getElements(e){return this.elements[e]||(this.elements[e]={}),this.elements[e]}add(e,t){let{type:n}=t,r=this.getElements(n);r[e]={...t,id:e}}experimental_getRegisteredAddons(){return Object.keys(this.loaders)}},As=`__STORYBOOK_ADDONS_MANAGER`;function js(){return Es[As]||(Es[As]=new ks),Es[As]}js();var Ms={};i(Ms,{ensurePanel:()=>Ps,init:()=>Fs});var{Addon_TypesEnum:Ns}=__STORYBOOK_MODULE_TYPES__;function Ps(e,t,n){let r=Object.keys(e);return r.indexOf(t)>=0?t:r.length?r[0]:n}var Fs=({provider:e,store:t,fullAPI:n})=>{let r={getElements:t=>e.getElements(t),getSelectedPanel:()=>{let{selectedPanel:e}=t.getState();return Ps(r.getElements(Ns.PANEL),e,e)},setSelectedPanel:e=>{t.setState({selectedPanel:e},{persistence:`session`})},setAddonState(e,n,i){let a=typeof n==`function`?n:()=>n;return t.setState(t=>({...t,addons:{...t.addons,[e]:a(t.addons[e])}}),i).then(()=>r.getAddonState(e))},getAddonState:e=>t.getState().addons[e]||globalThis?.STORYBOOK_ADDON_STATE[e]};return{api:r,state:{selectedPanel:Ps(r.getElements(Ns.PANEL),t.getState().selectedPanel),addons:{}}}},Is={};i(Is,{init:()=>Ls});var Ls=({provider:e})=>({api:{getChannel:()=>e.channel,on:(t,n)=>(e.channel?.on(t,n),()=>e.channel?.off(t,n)),off:(t,n)=>e.channel?.off(t,n),once:(t,n)=>e.channel?.once(t,n),emit:(t,n,...r)=>{n?.options?.target&&n.options.target!==`storybook-preview-iframe`&&!n.options.target.startsWith(`storybook-ref-`)&&(n.options.target=n.options.target===`storybook_internal`?`storybook-preview-iframe`:`storybook-ref-${n.options.target}`),e.channel?.emit(t,n,...r)}},state:{}}),Rs={};i(Rs,{init:()=>mc});var{logger:zs}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{GLOBALS_UPDATED:Bs,SET_GLOBALS:Vs,UPDATE_GLOBALS:Hs}=__STORYBOOK_MODULE_CORE_EVENTS__,{logger:Us}=__STORYBOOK_MODULE_CLIENT_LOGGER__,Ws={};i(Ws,{defaultStoryMapper:()=>sc,getSourceType:()=>oc,init:()=>fc});var{global:Gs}=__STORYBOOK_MODULE_GLOBAL__,Ks=t(v(),1),qs=(e,t)=>!Array.isArray(e)||!Array.isArray(t)||!e.length||!t.length?[]:e.reduce((e,n)=>(t.includes(n)&&e.push(n),e),[]),Js=/\s*\/\s*/,Ys=({globalParameters:e,kindParameters:t,stories:n})=>h(n,n=>({...n,parameters:ku(e,t[n.kind],n.parameters)})),Xs=e=>({v:5,entries:Object.entries(e).reduce((e,[t,n])=>{if(!n)return e;let{docsOnly:r,fileName:i,...a}=n.parameters,o={title:n.kind,id:t,name:n.name,importPath:i};if(r)e[t]={type:`docs`,tags:[`stories-mdx`],storiesImports:[],...o};else{let{argTypes:r,args:i,initialArgs:s}=n;e[t]={type:`story`,subtype:`story`,...o,parameters:a,argTypes:r,args:i,initialArgs:s}}return e},{})}),Zs=e=>({v:3,stories:Object.values(e.stories).reduce((e,t)=>(e[t.id]={...t,title:t.kind,name:t.name||t.story,importPath:t.parameters.fileName||``},e),{})}),Qs=e=>{let t=Di(Object.values(e.stories),e=>e.title);return{v:4,entries:Object.values(e.stories).reduce((e,n)=>{let r=`story`;return(n.parameters?.docsOnly||n.name===`Page`&&t[n.title]===1)&&(r=`docs`),e[n.id]={type:r,...r===`docs`&&{tags:[`stories-mdx`],storiesImports:[]},...n},delete e[n.id].story,delete e[n.id].kind,e},{})}},$s=e=>({v:5,entries:Object.values(e.entries).reduce((e,t)=>(e[t.id]={...t,tags:t.tags?[b.DEV,b.TEST,...t.tags]:[b.DEV]},e),{})}),ec=(e,{provider:t,docsOptions:n,filters:r,allStatuses:i})=>{if(!e.v)throw Error(`Composition: Missing stories.json version`);let a=e;a=a.v===2?Zs(a):a,a=a.v===3?Qs(a):a,a=a.v===4?$s(a):a,a=a;let o=Object.values(a.entries),s=Object.values(r),c=o.filter(e=>{let t=i[e.id]??{};return Object.values(t).some(({value:e})=>e===`status-value:error`)||s.every(n=>n({...e,statuses:t}))?!0:o.filter(t=>`parent`in t&&t.parent===e.id).some(e=>s.every(n=>n({...e,statuses:t})))}),{sidebar:l={}}=t.getConfig(),{showRoots:u,collapsedRoots:d=[],renderLabel:f}=l,p=typeof u<`u`,h=c.reduce((e,t)=>{if(n.docsMode&&t.type!==`docs`)return e;let{title:r}=t,i=r.trim().split(Js),a=(!p||u)&&i.length>1?[i.shift()]:[],o=[...a,...i],s=o.reduce((e,t,n)=>{let i=n>0&&e[n-1],a=g(i?`${i}-${t}`:t);if(t.trim()===``)throw Error(m`Invalid title ${r} ending in slash.`);if(i===a)throw Error(m`
|
|
23
|
+
Invalid part '${t}', leading to id === parentId ('${a}'), inside title '${r}'
|
|
24
|
+
|
|
25
|
+
Did you create a path that uses the separator char accidentally, such as 'Vue <docs/>' where '/' is a separator char? See https://github.com/storybookjs/storybook/issues/6128
|
|
26
|
+
`);return e.push(a),e},[]);return s.forEach((n,r)=>{let i=s[r+1]||t.id;a.length&&r===0?e[n]=bs(e[n]||{},{type:`root`,id:n,name:o[r],tags:[],depth:r,renderLabel:f,startCollapsed:d.includes(n),children:[i]}):(!e[n]||e[n].type===`component`)&&r===s.length-1?e[n]=bs(e[n]||{},{type:`component`,id:n,name:o[r],tags:[],parent:s[r-1],depth:r,renderLabel:f,...i&&{children:[i]}}):e[n]=bs(e[n]||{},{type:`group`,id:n,name:o[r],tags:[],parent:s[r-1],depth:r,renderLabel:f,...i&&{children:[i]}})}),e[t.id]={tags:[],...t,depth:s.length,parent:`parent`in t?t.parent:s[s.length-1],renderLabel:f,prepared:!!t.parameters},e},{});function _(e,t){if(e[t.id]||(e[t.id]=t,`children`in t&&t.children&&(t.children.forEach(t=>_(e,h[t])),t.tags=t.children.reduce((t,n)=>t===null?e[n].tags:qs(t,e[n].tags),null)||[])),t.type===`component`){let n=e[t.children[0]];n&&`importPath`in n&&(t.importPath=n.importPath)}return e}let v=Object.values(h).filter(e=>e.type!==`root`&&!e.parent).reduce((e,t)=>_(e,t),{});return v=Object.values(h).filter(e=>e.type===`root`).reduce(_,v),v=Object.values(v).reduce((e,t)=>{if(t.type===`story`&&t.subtype===`test`){let n=e[t.parent],r=e[n.parent];e[r.id]={...r,children:r.children&&r.children.filter(e=>e!==t.id)},e[n.id]={...n,children:(n.children||[]).concat(t.id)},e[t.id]={...t,depth:t.depth+1}}else e[t.id]=t;return e},{}),v},tc=(e,t)=>t?Object.fromEntries(Object.entries(e).map(([e,n])=>{let r=t[e];return n.type===`story`&&r?.type===`story`&&r.prepared?(`children`in r&&delete r.children,[e,{...r,...n,prepared:!0}]):[e,n]})):e,nc=(0,Ks.default)(1)(e=>Object.entries(e).reduce((e,t)=>{let n=t[1];return n.type===`component`&&e.push([...n.children]),e},[])),rc=(0,Ks.default)(1)(e=>Object.keys(e).filter(t=>[`story`,`docs`].includes(e[t].type))),{location:ic,fetch:ac}=Gs,oc=(e,t)=>{let{origin:n,pathname:r}=ic,{origin:i,pathname:a}=new URL(e),o=`${n+r}`.replace(/\/[^\/]*$/,``),s=`${i+a}`.replace(/\/[^\/]*$/,``);return o===s?[`local`,s]:t||e?[`external`,s]:[null,null]},sc=(e,t)=>({...t,kind:t.kind.replace(`|`,`/`)}),cc=(e,t)=>Object.entries(e).reduce((e,[n,r])=>({...e,[n]:{...r,refId:t.id}}),{});async function lc(e){if(!e)return{};try{let t=await e;if(t===!1||t===!0)throw Error(`Unexpected boolean response`);if(!t.ok){if(t.status===401)try{let e=await t.json();if(e.loginUrl)return{loginUrl:e.loginUrl}}catch{}throw Error(`Unexpected response not OK: ${t.statusText}`)}let n=await t.json();return n.entries||n.stories?{storyIndex:n}:n}catch(e){return{indexError:e}}}var uc=e=>{let t=/https?:\/\/(.+:.+)@/,n=e,r,[,i]=e.match(t)||[];return i&&(n=e.replace(`${i}@`,``),r=btoa(`${i}`)),{url:n,authorization:r}},dc=(e,t,n)=>{let{storyMapper:r}=n;return r?Object.entries(e).reduce((e,[n,i])=>({...e,[n]:r(t,i)}),{}):e},fc=({store:e,provider:t,singleStory:n,docsOptions:r={}},{runCheck:i=!0}={})=>{let a={findRef:e=>{let t=a.getRefs();return Object.values(t).find(({url:t})=>t.match(e))},changeRefVersion:async(e,t)=>{let{versions:n,title:r}=a.getRefs()[e],i={id:e,url:t,versions:n,title:r,index:{},filteredIndex:{},expanded:!0};await a.setRef(e,{...i,type:`unknown`},!1),await a.checkRef(i)},changeRefState:(t,n)=>{let{[t]:r,...i}=a.getRefs();i[t]={...r,previewInitialized:n},e.setState({refs:i})},checkRef:async e=>{let{id:t,url:n,version:r,type:i}=e,o=i===`server-checked`,s={},c=r?`?version=${r}`:``,l=o?`omit`:`include`,u=uc(n),d={Accept:`application/json`};u.authorization&&Object.assign(d,{Authorization:`Basic ${u.authorization}`});let[f,p]=await Promise.all([`index.json`,`stories.json`].map(async e=>lc(ac(`${u.url}/${e}${c}`,{headers:d,credentials:l}))));if(!f.indexError||!p.indexError){let e=await lc(ac(`${u.url}/metadata.json${c}`,{headers:d,credentials:l,cache:`no-cache`}).catch(()=>!1));Object.assign(s,{...f.indexError?p:f,...!e.indexError&&e})}else o||(s.indexError={message:m`
|
|
27
|
+
Error: Loading of ref failed
|
|
28
|
+
at fetch (lib/api/src/modules/refs.ts)
|
|
29
|
+
|
|
30
|
+
URL: ${u.url}
|
|
31
|
+
|
|
32
|
+
We weren't able to load the above URL,
|
|
33
|
+
it's possible a CORS error happened.
|
|
34
|
+
|
|
35
|
+
Please check your dev-tools network tab.
|
|
36
|
+
`});let h=e.versions&&Object.keys(e.versions).length?e.versions:s.versions;await a.setRef(t,{id:t,url:u.url,...s,...h?{versions:h}:{},type:s.storyIndex?`lazy`:`auto-inject`})},getRefs:()=>{let{refs:t={}}=e.getState();return t},setRef:async(i,{storyIndex:o,setStoriesData:s,...c},l=!1)=>{if(n)return;let u,d,f,{filters:p}=e.getState(),{storyMapper:m=sc}=t.getConfig(),h=a.getRefs()[i];(o||s)&&(u=s?Xs(dc(s,h,{storyMapper:m})):o,f=ec(o,{provider:t,docsOptions:r,filters:p,allStatuses:{}}),d=ec(o,{provider:t,docsOptions:r,filters:{},allStatuses:{}})),d&&=cc(d,h),f&&=cc(f,h),await a.updateRef(i,{...h,...c,index:d,filteredIndex:f,internal_index:u})},updateRef:async(t,n)=>{let{[t]:r,...i}=a.getRefs();i[t]={...r,...n};let o=Object.keys(s).reduce((e,t)=>(e[t]=i[t],e),{});await e.setState({refs:o})}},o=!n&&Gs.REFS||{},s=o;return i&&new Promise(async e=>{for(let e of Object.values(o))await a.checkRef({...e,stories:{}});e(void 0)}),{api:a,state:{refs:s}}},pc=(e,t)=>{let{source:n,refId:r,type:i}=e,[a,o]=oc(n,r),s;(r||a===`external`)&&(s=r&&t.getRefs()[r]?t.getRefs()[r]:t.findRef(o));let c={source:n,sourceType:a,sourceLocation:o,refId:r,ref:s,type:i};switch(!0){case typeof r==`string`:case a===`local`:case a===`external`:return c;default:return Us.warn(`Received a ${i} frame that was not configured as a ref`),null}},mc=({store:e,fullAPI:t,provider:n})=>{let r={getGlobals(){return e.getState().globals},getUserGlobals(){return e.getState().userGlobals},getStoryGlobals(){return e.getState().storyGlobals},getGlobalTypes(){return e.getState().globalTypes},updateGlobals(e){n.channel?.emit(Hs,{globals:e,options:{target:`storybook-preview-iframe`}})}},i={globals:{},userGlobals:{},storyGlobals:{},globalTypes:{}},a=({globals:t,storyGlobals:n,userGlobals:r})=>{let{globals:i,userGlobals:a,storyGlobals:o}=e.getState();Ti(t,i)||e.setState({globals:t}),Ti(r,a)||e.setState({userGlobals:r}),Ti(n,o)||e.setState({storyGlobals:n})};return n.channel?.on(Bs,function({globals:e,storyGlobals:n,userGlobals:r}){let{ref:i}=pc(this,t);i?zs.warn(`received a GLOBALS_UPDATED from a non-local ref. This is not currently supported.`):a({globals:e,storyGlobals:n,userGlobals:r})}),n.channel?.on(Vs,function({globals:n,globalTypes:i}){let{ref:a}=pc(this,t),o=e.getState()?.globals;a?Object.keys(n).length>0&&zs.warn(`received globals from a non-local ref. This is not currently supported.`):e.setState({globals:n,userGlobals:n,globalTypes:i}),o&&Object.keys(o).length!==0&&!Ti(n,o)&&r.updateGlobals(o)}),{api:r,state:i}},hc={};i(hc,{ActiveTabs:()=>bc,defaultLayoutState:()=>xc,focusableUIElements:()=>Sc,init:()=>Dc});var{SET_CONFIG:gc}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:_c}=__STORYBOOK_MODULE_GLOBAL__,{document:vc}=_c,yc=e=>typeof e==`function`,bc={SIDEBAR:`sidebar`,CANVAS:`canvas`,ADDONS:`addons`},xc={ui:{enableShortcuts:!0},layout:{initialActive:bc.CANVAS,showToolbar:!0,navSize:300,bottomPanelHeight:300,rightPanelWidth:400,recentVisibleSizes:{navSize:300,bottomPanelHeight:300,rightPanelWidth:400},panelPosition:`bottom`,showTabs:!0},layoutCustomisations:{showSidebar:void 0,showToolbar:void 0},selectedPanel:void 0,theme:T()},Sc={storySearchField:`storybook-explorer-searchfield`,storyListMenu:`storybook-explorer-menu`,storyPanelRoot:`storybook-panel-root`},Cc=e=>e.layout.navSize>0,wc=e=>{let{bottomPanelHeight:t,rightPanelWidth:n,panelPosition:r}=e.layout;return r===`bottom`&&t>0||r===`right`&&n>0},Tc=e=>!Cc(e)&&!wc(e),Ec=e=>({navSize:e.navSize>0?e.navSize:e.recentVisibleSizes.navSize,bottomPanelHeight:e.bottomPanelHeight>0?e.bottomPanelHeight:e.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.rightPanelWidth>0?e.rightPanelWidth:e.recentVisibleSizes.rightPanelWidth}),Dc=({store:e,provider:t,singleStory:n})=>{let r={toggleFullscreen(t){return e.setState(e=>{let n=Tc(e),r=typeof t==`boolean`?t:!n;return r===n?{layout:e.layout}:r?{layout:{...e.layout,navSize:0,bottomPanelHeight:0,rightPanelWidth:0,recentVisibleSizes:Ec(e.layout)}}:{layout:{...e.layout,navSize:e.singleStory?0:e.layout.recentVisibleSizes.navSize,bottomPanelHeight:e.layout.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.layout.recentVisibleSizes.rightPanelWidth}}},{persistence:`session`})},togglePanel(t){return e.setState(e=>{let n=wc(e),r=typeof t==`boolean`?t:!n;return r===n?{layout:e.layout}:r?{layout:{...e.layout,bottomPanelHeight:e.layout.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.layout.recentVisibleSizes.rightPanelWidth}}:{layout:{...e.layout,bottomPanelHeight:0,rightPanelWidth:0,recentVisibleSizes:Ec(e.layout)}}},{persistence:`session`})},togglePanelPosition(t){return e.setState(e=>{let n=t||(e.layout.panelPosition===`right`?`bottom`:`right`);return{layout:{...e.layout,panelPosition:n,bottomPanelHeight:e.layout.recentVisibleSizes.bottomPanelHeight,rightPanelWidth:e.layout.recentVisibleSizes.rightPanelWidth}}},{persistence:`permanent`})},toggleNav(t){return e.setState(e=>{if(e.singleStory)return{layout:e.layout};let n=Cc(e),r=typeof t==`boolean`?t:!n;return r===n?{layout:e.layout}:r?{layout:{...e.layout,navSize:e.layout.recentVisibleSizes.navSize}}:{layout:{...e.layout,navSize:0,recentVisibleSizes:Ec(e.layout)}}},{persistence:`session`})},toggleToolbar(t){return e.setState(e=>{let n=typeof t<`u`?t:!e.layout.showToolbar;return{layout:{...e.layout,showToolbar:n}}},{persistence:`session`})},setSizes({navSize:t,bottomPanelHeight:n,rightPanelWidth:r}){return e.setState(e=>{let i={...e.layout,navSize:t??e.layout.navSize,bottomPanelHeight:n??e.layout.bottomPanelHeight,rightPanelWidth:r??e.layout.rightPanelWidth};return{layout:{...i,recentVisibleSizes:Ec(i)}}},{persistence:`session`})},focusOnUIElement(e,t){if(!e)return;let n=Date.now(),r=()=>{let n=vc.getElementById(e);return!n||(n.focus(),n!==vc.activeElement)?!1:(t&&n.select?.(),!0)};if(r())return;let i=setInterval(()=>{if(Date.now()-n>=500){clearInterval(i);return}r()&&clearInterval(i)},50)},getInitialOptions(){let{theme:e,selectedPanel:r,layoutCustomisations:i,...a}=t.getConfig();return{...xc,layout:{...y(xc.layout,o(a,Object.keys(xc.layout))),...n&&{navSize:0}},layoutCustomisations:{...xc.layoutCustomisations,...i??{}},ui:y(xc.ui,o(a,Object.keys(xc.ui))),selectedPanel:r||xc.selectedPanel,theme:e||xc.theme}},getIsFullscreen(){return Tc(e.getState())},getIsPanelShown(){return wc(e.getState())},getIsNavShown(){return Cc(e.getState())},getShowToolbarWithCustomisations(t){let n=e.getState();return yc(n.layoutCustomisations.showToolbar)?n.layoutCustomisations.showToolbar(n,t)??t:t},getShowPanelWithCustomisations(t){let n=e.getState();return yc(n.layoutCustomisations.showPanel)?n.layoutCustomisations.showPanel(n,t)??t:t},getNavSizeWithCustomisations(t){let n=e.getState();if(yc(n.layoutCustomisations.showSidebar)){let e=n.layoutCustomisations.showSidebar(n,t!==0);if(t===0&&e===!0)return n.layout.recentVisibleSizes.navSize;if(t!==0&&e===!1)return 0}return t},setOptions:t=>{let{layout:r,ui:i,selectedPanel:a,theme:s}=e.getState();if(!t)return;let c={...r,...t.layout||{},...o(t,Object.keys(r)),...n&&{navSize:0}},l={...i,...t.ui,...y(t.ui||{},o(t,Object.keys(i)))},d={...s,...t.theme},f={};u(i,l)||(f.ui=l),u(r,c)||(f.layout=c),t.selectedPanel&&!u(a,t.selectedPanel)&&(f.selectedPanel=t.selectedPanel),Object.keys(f).length&&e.setState(f,{persistence:`permanent`}),u(s,d)||e.setState({theme:d})}},i=o(e.getState(),[`layout`,`selectedPanel`]);return t.channel?.on(gc,()=>{r.setOptions(bs(r.getInitialOptions(),i))}),{api:r,state:bs(r.getInitialOptions(),i)}},Oc={};i(Oc,{init:()=>kc});var kc=({store:e})=>({api:{addNotification:t=>{e.setState(({notifications:e})=>{let[n,r]=Ei(e,e=>e.id===t.id);return n.forEach(e=>{e.onClear&&e.onClear({dismissed:!1,timeout:!1})}),{notifications:[...r,t]}})},clearNotification:t=>{e.setState(({notifications:e})=>{let[n,r]=Ei(e,e=>e.id===t);return n.forEach(e=>{e.onClear&&e.onClear({dismissed:!1,timeout:!1})}),{notifications:r}})}},state:{notifications:[]}}),Ac={};i(Ac,{init:()=>Nc});var{OPEN_IN_EDITOR_REQUEST:jc,OPEN_IN_EDITOR_RESPONSE:Mc}=__STORYBOOK_MODULE_CORE_EVENTS__,Nc=({provider:t,fullAPI:n})=>({api:{openInEditor(e){return new Promise(n=>{let{file:r,line:i,column:a}=e,o=e=>{e.file===r&&e.line===i&&e.column===a&&(t.channel?.off(Mc,o),n(e))};t.channel?.on(Mc,o),t.channel?.emit(jc,e)})}},state:{notifications:[]},init:async()=>{let{color:r}=await e(async()=>{let{color:e}=await import(`./theming-BoM3_jXR.js`).then(e=>e.c);return{color:e}},__vite__mapDeps([0,1,2]),import.meta.url);t.channel?.on(Mc,e=>{e.error!==null&&n.addNotification({id:`open-in-editor-error`,content:{headline:`Failed to open in editor`,subHeadline:e.error||`Check the Storybook process on the command line for more details.`},icon:F.createElement(ge,{color:r.negative}),duration:8e3})})}}),Pc={};i(Pc,{init:()=>Fc});var Fc=({provider:e,fullAPI:t})=>({api:e.renderPreview?{renderPreview:e.renderPreview}:{},state:{},init:()=>{e.handleAPI(t)}}),Ic={};i(Ic,{init:()=>Lc});var Lc=({store:e,navigate:t,fullAPI:n})=>({state:{settings:{lastTrackedStoryId:null}},api:{closeSettings:()=>{let{settings:{lastTrackedStoryId:t}}=e.getState();t?n.selectStory(t):n.selectFirstStory()},changeSettingsTab:e=>{t(`/settings/${e}`)},isSettingsScreenActive:()=>{let{path:e}=n.getUrlState();return!!(e||``).match(/^\/settings/)},retrieveSelection(){let{settings:t}=e.getState();return t.lastTrackedStoryId},storeSelection:async()=>{let{storyId:t,settings:n}=e.getState();await e.setState({settings:{...n,lastTrackedStoryId:t}})}}}),Rc={};i(Rc,{controlOrMetaKey:()=>rl,defaultShortcuts:()=>al,init:()=>cl,isMacLike:()=>nl,keys:()=>il});var zc=t(ls(),1),{FORCE_REMOUNT:Bc,PREVIEW_KEYDOWN:Vc,STORIES_COLLAPSE_ALL:Hc,STORIES_EXPAND_ALL:Uc}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:Wc}=__STORYBOOK_MODULE_GLOBAL__,{global:Gc}=__STORYBOOK_MODULE_GLOBAL__,{navigator:Kc}=Gc,qc=()=>Kc&&Kc.platform?!!Kc.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,Jc=()=>qc()?`⌥`:`alt`,Yc=e=>{if([`Meta`,`Alt`,`Control`,`Shift`,`Tab`].includes(e.key))return null;let t=[];e.altKey&&t.push(`alt`),e.ctrlKey&&t.push(`control`),e.metaKey&&t.push(`meta`),e.shiftKey&&t.push(`shift`);let n=e.code?.toUpperCase(),r=n?n.startsWith(`KEY`)&&n.length===4?n.replace(`KEY`,``):n.startsWith(`DIGIT`)?n.replace(`DIGIT`,``):{MINUS:`-`,EQUAL:`=`,BRACKETLEFT:`[`,BRACKETRIGHT:`]`,BACKSLASH:`\\`,SEMICOLON:`;`,QUOTE:`'`,BACKQUOTE:"`",COMMA:`,`,PERIOD:`.`,SLASH:`/`}[n]:void 0;if(e.key&&e.key.length===1&&e.key!==` `){let n=e.key.toUpperCase(),i=r;i&&i.length===1&&i!==n?t.push([n,i]):t.push(n)}else e.key===`Dead`&&r&&t.push(r);return e.key===` `&&t.push(`space`),e.key===`Escape`&&t.push(`escape`),e.key===`ArrowRight`&&t.push(`ArrowRight`),e.key===`ArrowDown`&&t.push(`ArrowDown`),e.key===`ArrowUp`&&t.push(`ArrowUp`),e.key===`ArrowLeft`&&t.push(`ArrowLeft`),t.length>0?t:null},Xc=(e,t)=>!e||!t||(e.join(``).startsWith(`shift/`)&&e.shift(),e.length!==t.length)?!1:!e.find((e,n)=>Array.isArray(e)?!e.includes(t[n]):e!==t[n]),Zc=e=>e===`alt`?Jc():e===`control`?`⌃`:e===`meta`?`⌘`:e===`shift`?`⇧`:e===`Enter`||e===`Backspace`||e===`Esc`||e===`escape`?``:e===` `?`SPACE`:e===`ArrowUp`?`↑`:e===`ArrowDown`?`↓`:e===`ArrowLeft`?`←`:e===`ArrowRight`?`→`:e?.toUpperCase(),Qc=e=>e.map(Zc).join(` `),$c=e=>e.map(e=>e===`+`?`plus`:e===` `?`space`:e).join(`+`),{navigator:el,document:tl}=Wc,nl=()=>el&&el.platform?!!el.platform.match(/(Mac|iPhone|iPod|iPad)/i):!1,rl=()=>nl()?`meta`:`control`;function il(e){return Object.keys(e)}var al=Object.freeze({fullScreen:[`alt`,`F`],togglePanel:[`alt`,`A`],panelPosition:[`alt`,`D`],toggleNav:[`alt`,`S`],toolbar:[`alt`,`T`],search:[rl(),`K`],focusNav:[`1`],focusIframe:[`2`],focusPanel:[`3`],prevComponent:[`alt`,`ArrowUp`],nextComponent:[`alt`,`ArrowDown`],prevStory:[`alt`,`ArrowLeft`],nextStory:[`alt`,`ArrowRight`],shortcutsPage:[rl(),`shift`,`,`],aboutPage:[rl(),`,`],escape:[`escape`],collapseAll:[rl(),`shift`,`ArrowUp`],expandAll:[rl(),`shift`,`ArrowDown`],remount:[`alt`,`R`],openInEditor:[`alt`,`shift`,`E`],openInIsolation:[`alt`,`shift`,`I`],copyStoryLink:[`alt`,`shift`,`L`],goToPreviousLandmark:[`shift`,`F6`],goToNextLandmark:[`F6`]}),ol={};function sl(e){let t=e.target;return!!(/input|textarea/i.test(t.tagName)||t.getAttribute(`contenteditable`)!==null||t.closest(`dialog[open]`))}var cl=({store:e,fullAPI:t,provider:n})=>{let r={getShortcutKeys(){return e.getState().shortcuts},getDefaultShortcuts(){return{...al,...r.getAddonsShortcutDefaults()}},getAddonsShortcuts(){return ol},getAddonsShortcutLabels(){let e={};return Object.entries(r.getAddonsShortcuts()).forEach(([t,{label:n}])=>{e[t]=n}),e},getAddonsShortcutDefaults(){let e={};return Object.entries(r.getAddonsShortcuts()).forEach(([t,{defaultShortcut:n}])=>{e[t]=n}),e},async setShortcuts(t){let{shortcuts:n}=await e.setState(e=>({shortcuts:typeof t==`function`?t(e.shortcuts):t}),{persistence:`permanent`});return n},async restoreAllDefaultShortcuts(){return r.setShortcuts(r.getDefaultShortcuts())},async setShortcut(e,t){return await r.setShortcuts(n=>({...n,[e]:t})),t},async setAddonShortcut(e,t){return await r.setShortcuts(n=>({...n,[`${e}-${t.actionName}`]:t.defaultShortcut})),ol[`${e}-${t.actionName}`]=t,t},async restoreDefaultShortcut(e){let t=r.getDefaultShortcuts()[e];return r.setShortcut(e,t)},handleKeydownEvent(e){let t=Yc(e),n=r.getShortcutKeys(),i=il(n).find(e=>Xc(t,n[e]));i&&r.handleShortcutFeature(i,e)},handleShortcutFeature(n,r){let{ui:{enableShortcuts:i},storyId:a,refId:o,viewMode:s}=e.getState();if(i)switch(r?.preventDefault&&r.preventDefault(),n){case`escape`:t.getIsFullscreen()?t.toggleFullscreen(!1):t.getIsNavShown()&&t.toggleNav(!0);break;case`goToNextLandmark`:case`goToPreviousLandmark`:break;case`focusNav`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsNavShown()||t.toggleNav(!0),t.focusOnUIElement(Sc.storyListMenu);break;case`search`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsNavShown()||t.toggleNav(!0),setTimeout(()=>{t.focusOnUIElement(Sc.storySearchField,!0)},0);break;case`focusIframe`:{let e=tl.getElementById(`storybook-preview-iframe`);if(e)try{e.contentWindow.focus()}catch{}break}case`focusPanel`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsPanelShown()||t.togglePanel(!0),t.focusOnUIElement(Sc.storyPanelRoot);break;case`nextStory`:t.jumpToStory(1);break;case`prevStory`:t.jumpToStory(-1);break;case`nextComponent`:t.jumpToComponent(1);break;case`prevComponent`:t.jumpToComponent(-1);break;case`fullScreen`:t.toggleFullscreen();break;case`togglePanel`:t.togglePanel();break;case`toggleNav`:t.toggleNav();break;case`toolbar`:t.toggleToolbar();break;case`panelPosition`:t.getIsFullscreen()&&t.toggleFullscreen(!1),t.getIsPanelShown()||t.togglePanel(!0),t.togglePanelPosition();break;case`aboutPage`:t.navigate(`/settings/about`);break;case`shortcutsPage`:t.navigate(`/settings/shortcuts`);break;case`collapseAll`:t.emit(Hc);break;case`expandAll`:t.emit(Uc);break;case`remount`:t.emit(Bc,{storyId:a});break;case`openInEditor`:Wc.CONFIG_TYPE===`DEVELOPMENT`&&t.openInEditor({file:t.getCurrentStoryData().importPath});break;case`openInIsolation`:if(a&&s===`story`){let{previewHref:e}=t.getStoryHrefs(a,{refId:o});window.open(e,`_blank`,`noopener,noreferrer`)}break;case`copyStoryLink`:if(a){let{managerHref:e}=t.getStoryHrefs(a,{refId:o});(0,zc.default)(e)}break;default:ol[n].action();break}}},{shortcuts:i=al}=e.getState();return{api:r,state:{shortcuts:il(al).reduce((e,t)=>({...e,[t]:i[t]||al[t]}),al)},init:()=>{tl.addEventListener(`keydown`,e=>{sl(e)||r.handleKeydownEvent(e)}),n.channel?.on(Vc,e=>{r.handleKeydownEvent(e.event)})}}},ll={};i(ll,{init:()=>Ul});var{logger:ul}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{CONFIG_ERROR:dl,CURRENT_STORY_WAS_SET:fl,DOCS_PREPARED:pl,PRELOAD_ENTRIES:ml,RESET_STORY_ARGS:hl,SELECT_STORY:gl,SET_CONFIG:_l,SET_CURRENT_STORY:vl,SET_FILTER:yl,SET_INDEX:bl,SET_STORIES:xl,STORY_ARGS_UPDATED:Sl,STORY_CHANGED:Cl,STORY_INDEX_INVALIDATED:wl,STORY_MISSING:Tl,STORY_PREPARED:El,STORY_SPECIFIED:Dl,UPDATE_STORY_ARGS:Ol}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:kl}=__STORYBOOK_MODULE_GLOBAL__;t(us(),1);var Al=class extends vi{constructor(e){super({name:`StatusTypeIdMismatchError`,category:`CORE-SERVER`,code:16,message:`Status has typeId "${e.status.typeId}" but was added to store with typeId "${e.typeId}". Full status: ${JSON.stringify(e.status,null,2)}`}),this.data=e}},jl={id:`storybook/status`,leader:!0,initialState:{}},Ml={SELECT:`select`};function Nl({universalStatusStore:e,useUniversalStore:t,environment:n}){let r={getAll(){return e.getState()},set(t){e.setState(e=>{let n={...e};for(let e of t){let{storyId:t,typeId:r}=e;n[t]={...n[t]??{},[r]:e}}return n})},onAllStatusChange(t){return e.onStateChange((e,n)=>{t(e,n)})},onSelect(t){return e.subscribe(Ml.SELECT,e=>{t(e.payload)})},selectStatuses:t=>{e.send({type:Ml.SELECT,payload:t})},unset(t){if(!t){e.setState({});return}e.setState(e=>{let n={...e};for(let e of t)delete n[e];return n})},typeId:void 0},i=t=>({getAll:r.getAll,set(r){e.setState(e=>{let i={...e};for(let e of r){let{storyId:r}=e;if(e.typeId!==t)switch(n){case`server`:throw new Al({status:e,typeId:t});case`manager`:throw new bi({status:e,typeId:t});case`preview`:default:throw new Si({status:e,typeId:t})}i[r]={...i[r]??{},[t]:e}}return i})},onAllStatusChange:r.onAllStatusChange,onSelect(n){return e.subscribe(Ml.SELECT,e=>{e.payload.some(e=>e.typeId===t)&&n(e.payload)})},unset(n){e.setState(e=>{let r={...e};for(let e in r)if(r[e]?.[t]&&(!n||n?.includes(e))){let{[t]:n,...i}=r[e];r[e]=i}return r})},typeId:t});return t?{getStatusStoreByTypeId:i,fullStatusStore:r,universalStatusStore:e,useStatusStore:n=>t(e,n)[0]}:{getStatusStoreByTypeId:i,fullStatusStore:r,universalStatusStore:e}}var Pl=(e,t)=>{let n=F.useRef(t?t(e.getState()):e.getState()),r=F.useCallback(r=>e.onStateChange((e,i)=>{if(!t){n.current=e,r();return}let a=t(e);!u(a,t(i))&&(n.current=a,r())}),[e,t]),i=F.useCallback(()=>{let r=e.getState(),i=t?t(r):r;return u(i,n.current)||(n.current=i),n.current},[e,t]);return[F.useSyncExternalStore(r,i),e.setState]},{fullStatusStore:Fl,getStatusStoreByTypeId:Il,useStatusStore:Ll,universalStatusStore:Rl}=Nl({universalStatusStore:je.create({...jl,leader:globalThis.CONFIG_TYPE===`PRODUCTION`}),useUniversalStore:Pl,environment:`manager`}),{fetch:zl}=kl,Bl=`./index.json`,Vl=[`enableShortcuts`,`theme`,`showRoots`];function Hl(e){if(!e||typeof e==`string`)return e;let t={...e};return Vl.forEach(e=>{e in t&&delete t[e]}),t}var Ul=({fullAPI:e,store:t,navigate:n,provider:r,storyId:i,viewMode:a,docsOptions:o={}})=>{let s={storyId:l,getData:(e,t)=>{let n=s.resolveStory(e,t);if(n?.type===`story`||n?.type===`docs`)return n},isPrepared:(e,t)=>{let n=s.getData(e,t);return n?n.type===`story`?n.prepared:!0:!1},resolveStory:(e,n)=>{let{refs:r,index:i}=t.getState();if(!(n&&!r[n]))return n?r?.[n]?.index?.[e]??void 0:i?i[e]:void 0},getCurrentStoryData:()=>{let{storyId:e,refId:n}=t.getState();return s.getData(e,n)},getIndex:()=>{let{internal_index:e}=t.getState();return e},getParameters:(e,t)=>{let{storyId:n,refId:r}=typeof e==`string`?{storyId:e,refId:void 0}:e,i=s.getData(n,r);if([`story`,`docs`].includes(i?.type)){let{parameters:e}=i;if(e)return t?e[t]:e}return null},getCurrentParameter:e=>{let{storyId:n,refId:r}=t.getState();return s.getParameters({storyId:n,refId:r},e)||void 0},jumpToComponent:e=>{let{filteredIndex:n,storyId:r,refs:i,refId:a}=t.getState();if(!s.getData(r,a))return;let o=a?i[a].filteredIndex||{}:n;if(!o)return;let c=s.findSiblingStoryId(r,o,e,!0);c&&s.selectStory(c,void 0,{ref:a})},jumpToStory:e=>{let{filteredIndex:n,storyId:r,refs:i,refId:a}=t.getState(),o=s.getData(r,a);if(!o)return;let c=o.refId?i[o.refId].filteredIndex:n;if(!c)return;let l=s.findSiblingStoryId(r,c,e,!1);l&&s.selectStory(l,void 0,{ref:a})},selectFirstStory:()=>{let{index:e}=t.getState();if(!e)return;let r=Object.keys(e).find(t=>e[t].type===`story`);if(r){s.selectStory(r);return}n(`/`)},selectStory:(e=void 0,r=void 0,i={})=>{let{ref:a}=i,{storyId:o,index:c,filteredIndex:u,refs:d,settings:f}=t.getState(),p=e=>e?.type===`docs`||e?.type===`story`?(t.setState({settings:{...f,lastTrackedStoryId:e.id}}),n(`/${e.type}/${e.refId?`${e.refId}_${e.id}`:e.id}`),!0):!1,m=o?.split(`--`,2)[0],h=a?d[a].index:c,_=a?d[a].filteredIndex:u;if(!(!h||!_))if(r)if(!e)p(h[l(m,r)]);else{let t=a?`${a}_${l(e,r)}`:l(e,r);if(h[t])p(h[t]);else{let t=h[g(e)];if(t?.type===`component`){let e=t.children.find(e=>h[e].name===r);p(e?h[e]:void 0)}}}else{let t=e?h[e]||h[g(e)]:h[m];if(!t)throw Error(`Unknown id or title: '${e}'`);p(t)||p(s.findLeafEntry(_,t.id))}},findLeafEntry(e,t){let n=e[t];if(n.type===`docs`||n.type===`story`)return n;let r=n.children.find(t=>e[t])||n.children[0];return s.findLeafEntry(e,r)},findLeafStoryId(e,t){return s.findLeafEntry(e,t)?.id},findAllLeafStoryIds(e){let{index:n}=t.getState();if(!n)return[];let r=(e,t=[])=>{let i=n[e];return i&&(i.type===`story`&&t.push(i.id),`children`in i&&i.children?.forEach(e=>r(e,t))),t};return r(e,[])},findSiblingStoryId(e,t,n,r){if(r){let r=nc(t),i=r.findIndex(t=>t.includes(e));return i===r.length-1&&n>0||i===0&&n<0?void 0:r[i+n]?r[i+n][0]:void 0}let i=rc(t),a=i.indexOf(e);if(!(a===i.length-1&&n>0)&&!(a===0&&n<0))return i[a+n]},updateStoryArgs:(e,t)=>{let{id:n,refId:i}=e;r.channel?.emit(Ol,{storyId:n,updatedArgs:t,options:{target:i}})},resetStoryArgs:(e,t)=>{let{id:n,refId:i}=e;r.channel?.emit(hl,{storyId:n,argNames:t,options:{target:i}})},fetchIndex:async()=>{try{let e=await zl(Bl);if(e.status!==200)throw Error(await e.text());let t=await e.json();if(t.v<3){ul.warn(`Skipping story index with version v${t.v}, awaiting SET_STORIES.`);return}await s.setIndex(t)}catch(e){await t.setState({indexError:e})}},setIndex:async e=>{let{filteredIndex:n,index:i,filters:a}=t.getState(),s=Fl.getAll(),c=ec(e,{provider:r,docsOptions:o,filters:a,allStatuses:s}),l=ec(e,{provider:r,docsOptions:o,filters:{},allStatuses:s});await t.setState({internal_index:e,filteredIndex:tc(c,n),index:tc(l,i),indexError:void 0})},updateStory:async(n,r,i)=>{if(i){let{id:t,index:a,filteredIndex:o}=i;a&&a[n]&&(a[n]={...a[n],...r}),o&&o[n]&&(o[n]={...o[n],...r}),await e.updateRef(t,{index:a,filteredIndex:o})}else{let{index:e,filteredIndex:i}=t.getState();e&&e[n]&&(e[n]={...e[n],...r}),i&&i[n]&&(i[n]={...i[n],...r}),(e||i)&&await t.setState({index:e,filteredIndex:i})}},updateDocs:async(n,r,i)=>{if(i){let{id:t,index:a,filteredIndex:o}=i;a[n]={...a[n],...r},o[n]={...o[n],...r},await e.updateRef(t,{index:a,filteredIndex:o})}else{let{index:e,filteredIndex:i}=t.getState();e&&(e[n]={...e[n],...r}),i&&(i[n]={...i[n],...r}),(e||i)&&await t.setState({index:e,filteredIndex:i})}},setPreviewInitialized:async n=>{n?e.updateRef(n.id,{previewInitialized:!0}):t.setState({previewInitialized:!0})},experimental_setFilter:async(n,i)=>{await t.setState({filters:{...t.getState().filters,[n]:i}});let{internal_index:a}=t.getState();if(!a)return;await s.setIndex(a);let o=await e.getRefs();Object.entries(o).forEach(([t,{internal_index:n,...r}])=>{e.setRef(t,{...r,storyIndex:n},!0)}),r.channel?.emit(yl,{id:n})}};return r.channel?.on(Dl,function({storyId:i,viewMode:a}){let{sourceType:o}=pc(this,e);if(o===`local`){let e=t.getState(),o=e.path===`/`||e.viewMode===`story`||e.viewMode===`docs`,s=e.viewMode&&e.storyId,c=e.viewMode!==a||e.storyId!==i,{type:l}=e.index?.[e.storyId]||{};o&&(s&&c&&!(l===`root`||l===`component`||l===`group`)?r.channel?.emit(vl,{storyId:e.storyId,viewMode:e.viewMode}):c&&n(`/${a}/${i}`))}}),r.channel?.on(fl,function(){let{ref:t}=pc(this,e);s.setPreviewInitialized(t)}),r.channel?.on(Cl,function(){let{sourceType:t}=pc(this,e);if(t===`local`){let t=s.getCurrentParameter(`options`);t&&e.setOptions(Hl(t))}}),r.channel?.on(El,function({id:n,...i}){let{ref:a,sourceType:o}=pc(this,e);if(s.updateStory(n,{...i,prepared:!0},a),!a&&!t.getState().hasCalledSetOptions){let{options:n}=i.parameters;e.setOptions(Hl(n)),t.setState({hasCalledSetOptions:!0})}if(o===`local`){let{storyId:e,index:n,refId:i}=t.getState();if(!n)return;let a=Array.from(new Set([s.findSiblingStoryId(e,n,1,!0),s.findSiblingStoryId(e,n,-1,!0)])).filter(Boolean);r.channel?.emit(ml,{ids:a,options:{target:i}})}}),r.channel?.on(pl,function({id:t,...n}){let{ref:r}=pc(this,e);s.updateStory(t,{...n,prepared:!0},r)}),r.channel?.on(bl,function(t){let{ref:n}=pc(this,e);if(n)e.setRef(n.id,{...n,storyIndex:t},!0);else{s.setIndex(t);let n=s.getCurrentParameter(`options`);e.setOptions(Hl(n))}}),r.channel?.on(xl,function(t){let{ref:n}=pc(this,e),r=t.v?Ys(t):t.stories;if(n)e.setRef(n.id,{...n,setStoriesData:r},!0);else throw Error(`Cannot call SET_STORIES for local frame`)}),r.channel?.on(gl,function({kind:t,title:n=t,story:r,name:i=r,storyId:a,...o}){let{ref:s}=pc(this,e);s?e.selectStory(a||n,i,{...o,ref:s.id}):e.selectStory(a||n,i,o)}),r.channel?.on(Sl,function({storyId:t,args:n}){let{ref:r}=pc(this,e);s.updateStory(t,{args:n},r)}),r.channel?.on(dl,function(t){let{ref:n}=pc(this,e);s.setPreviewInitialized(n)}),r.channel?.on(Tl,function(t){let{ref:n}=pc(this,e);s.setPreviewInitialized(n)}),r.channel?.on(_l,()=>{let e=r.getConfig();e?.sidebar?.filters&&t.setState({filters:{...t.getState().filters,...e?.sidebar?.filters}})}),Fl.onAllStatusChange(async()=>{let{internal_index:n}=t.getState();if(!n)return;await s.setIndex(n);let r=await e.getRefs();Object.entries(r).forEach(([t,{internal_index:n,...r}])=>{e.setRef(t,{...r,storyIndex:n},!0)})}),{api:s,state:{storyId:i,viewMode:a,hasCalledSetOptions:!1,previewInitialized:!1,filters:r.getConfig()?.sidebar?.filters||{}},init:async()=>{r.channel?.on(wl,()=>s.fetchIndex()),await s.fetchIndex()}}},Wl={};i(Wl,{init:()=>ru});var{GLOBALS_UPDATED:Gl,NAVIGATE_URL:Kl,SET_CURRENT_STORY:ql,STORY_ARGS_UPDATED:Jl,UPDATE_QUERY_PARAMS:Yl}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:Xl}=__STORYBOOK_MODULE_GLOBAL__,Zl=t(c(),1),Ql=e=>{if(e===`true`||e===`1`)return!0;if(e===`false`||e===`0`)return!1},$l=e=>Object.fromEntries(e.split(`;`).map(e=>e.split(`:`)).map(([e,t])=>[e,encodeURIComponent(t)]).filter(([e,t])=>e&&t)),eu=(e,t)=>{let n=$l(e),r=$l(t);return Object.entries({...n,...r}).map(([e,t])=>`${e}:${t}`).join(`;`)},tu,nu=({state:{location:e,path:t,viewMode:n,storyId:r},singleStory:i})=>{let{full:a,panel:o,nav:s,shortcuts:c,addonPanel:l,tabs:u,path:d,...f}=Gi(e),p,m,h;Ql(a)===!0?(p=0,m=0,h=0):Ql(a)===!1&&(p=xc.layout.navSize,m=xc.layout.bottomPanelHeight,h=xc.layout.rightPanelWidth),i||(Ql(s)===!0&&(p=xc.layout.navSize),Ql(s)===!1&&(p=0)),Ql(o)===!1&&(m=0,h=0);let g={navSize:p,bottomPanelHeight:m,rightPanelWidth:h,panelPosition:[`right`,`bottom`].includes(o)?o:void 0,showTabs:Ql(u)},_={enableShortcuts:Ql(c)},v=l||void 0,y=r,b=Ti(tu,f)?tu:f;return tu=b,{viewMode:n,layout:g,ui:_,selectedPanel:v,location:e,path:t,customQueryParams:b,storyId:y}},ru=e=>{let{store:t,navigate:n,provider:r,fullAPI:i}=e,a=(e,t={},r={})=>n([e,...Object.entries(t).filter(([,e])=>e).sort(([e],[t])=>e<t?-1:1).map(([e,t])=>`${e}=${t}`)].join(`&`),r),o={getStoryHrefs(e,n={}){let{id:r,refId:a}=i.getCurrentStoryData()??{},o=e===r&&n.refId===a,{customQueryParams:s,location:c,refs:l}=t.getState(),{base:u,inheritArgs:f=o,inheritGlobals:p=!0,queryParams:m={},refId:h,viewMode:g=`story`}=n;if(h&&!l[h])throw Error(`Invalid refId: ${h}`);let _=c.pathname||`/`,v=Xl.window.location.origin+_,y=Xl.STORYBOOK_NETWORK_ADDRESS??v,b=u===`origin`?v:u===`network`?y:_,x=h?l[h].url+`/iframe.html`:Xl.PREVIEW_URL||`${b.replace(/\/[^/]*$/,`/`)}iframe.html`,S=h?`&refId=${encodeURIComponent(h)}`:``,{args:C=``,globals:w=``,...T}=m,E=f?eu(s?.args??``,C):C,D=p?eu(s?.globals??``,w):w,O=(0,Zl.stringify)(T,{nesting:!0,nestingSyntax:`js`}),k=(0,Zl.stringify)(d(T,[`id`,`viewMode`]),{nesting:!0,nestingSyntax:`js`});return E&&=`&args=${E}`,D&&=`&globals=${D}`,O&&=`&${O}`,k&&=`&${k}`,{managerHref:`${b}?path=/${g}/${h?`${h}_`:``}${e}${E}${D}${O}`,previewHref:`${x}?id=${e}&viewMode=${g}${S}${E}${h?``:D}${k}`}},getQueryParam(e){let{customQueryParams:n}=t.getState();return n?n[e]:void 0},getUrlState(){let{location:e,path:n,customQueryParams:r,storyId:i,url:a,viewMode:o}=t.getState();return{path:n,hash:e.hash??``,queryParams:r,storyId:i,url:a,viewMode:o}},setQueryParams(e){let{customQueryParams:n}=t.getState(),i={},a={...n,...Object.entries(e).reduce((e,[t,n])=>(n!==null&&(e[t]=n),e),i)};Ti(n,a)||(t.setState({customQueryParams:a}),r.channel?.emit(Yl,a))},applyQueryParams(e,t){let{path:n,hash:r=``,queryParams:i}=o.getUrlState();a(`${n}${r}`,{...i,...e},t),o.setQueryParams(e)},navigateUrl(e,t){n(e,{plain:!0,...t})}},s=()=>{let{path:e,hash:t=``,queryParams:n,viewMode:r}=o.getUrlState();if(r!==`story`)return;let s=i.getCurrentStoryData();if(s?.type!==`story`)return;let{args:c,initialArgs:l}=s,u=Ui(l,c);a(`${e}${t}`,{...n,args:u},{replace:!0}),o.setQueryParams({args:u})};r.channel?.on(ql,()=>s());let c;return r.channel?.on(Jl,()=>{`requestIdleCallback`in Xl.window?(c&&Xl.window.cancelIdleCallback(c),c=Xl.window.requestIdleCallback(s,{timeout:1e3})):(c&&clearTimeout(c),setTimeout(s,100))}),r.channel?.on(Gl,({userGlobals:e,initialGlobals:t})=>{let{path:n,hash:r=``,queryParams:i}=o.getUrlState(),s=Ui(t,bs(t,e));a(`${n}${r}`,{...i,globals:s},{replace:!0}),o.setQueryParams({globals:s})}),r.channel?.on(Kl,(e,t)=>{o.navigateUrl(e,t)}),{api:o,state:nu(e)}},iu={};i(iu,{init:()=>du});var au=t(v(),1),{global:ou}=__STORYBOOK_MODULE_GLOBAL__,su=`10.2.8`,{VERSIONCHECK:cu}=ou,lu=(0,au.default)(1)(()=>{try{return{...JSON.parse(cu).data||{}}}catch{return{}}}),uu=e=>e.includes(`vue`)?`vue`:e,du=({store:e})=>{let{dismissedVersionNotification:t}=e.getState(),n={versions:{current:{version:su},...lu()},dismissedVersionNotification:t},r={getCurrentVersion:()=>{let{versions:{current:t}}=e.getState();return t},getLatestVersion:()=>{let{versions:{latest:t,next:n,current:r}}=e.getState();return r&&ss.default.prerelease(r.version)&&n?t&&ss.default.gt(t.version,n.version)?t:n:t},getDocsUrl:({asset:t,subpath:n=t,versioned:r,renderer:i,ref:a=`ui`})=>{let{versions:o}=e.getState(),s=o.latest?.version,c=o.current?.version,l=c?.startsWith(`0.0.0`)&&s||c,u=`https://storybook.js.org/${t?`docs-assets`:`docs`}/`;if(t&&l)u+=`${ss.default.major(l)}.${ss.default.minor(l)}/`;else if(r&&l&&s){let e=ss.default.diff(s,l);e===`patch`||e===null||(u+=`${ss.default.major(l)}.${ss.default.minor(l)}/`)}let[d,f]=n?.split(`#`)||[];if(d&&(u+=t?d:`${d}/`),i&&typeof ou.STORYBOOK_RENDERER<`u`){let e=ou.STORYBOOK_RENDERER;e&&(u+=`?renderer=${uu(e)}`)}return a&&(u+=`${u.includes(`?`)?`&`:`?`}ref=${a}`),f&&(u+=`#${f}`),u},versionUpdateAvailable:()=>{let e=r.getLatestVersion(),t=r.getCurrentVersion();if(e){if(!e.version||!t.version)return!0;let n=ss.default.prerelease(t.version)?`${ss.default.major(t.version)}.${ss.default.minor(t.version)}.${ss.default.patch(t.version)}`:t.version,r=ss.default.diff(n,e.version);return ss.default.gt(e.version,n)&&r!==`patch`&&!r.includes(`pre`)}return!1}};return{init:async()=>{let{versions:t={}}=e.getState(),{latest:n,next:r}=lu();await e.setState({versions:{...t,latest:n,next:r}})},state:n,api:r}},fu={};i(fu,{init:()=>bu});var{REQUEST_WHATS_NEW_DATA:pu,RESULT_WHATS_NEW_DATA:mu,SET_WHATS_NEW_CACHE:hu,TOGGLE_WHATS_NEW_NOTIFICATIONS:gu}=__STORYBOOK_MODULE_CORE_EVENTS__,{global:_u}=__STORYBOOK_MODULE_GLOBAL__,vu=`whats-new`,yu=({color:e=`currentColor`,size:t=14})=>F.createElement(`svg`,{width:t,height:t,viewBox:`0 0 14 14`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`},F.createElement(`path`,{fillRule:`evenodd`,clipRule:`evenodd`,d:`M2.042.616a.704.704 0 00-.66.729L1.816 12.9c.014.367.306.66.672.677l9.395.422h.032a.704.704 0 00.704-.703V.704c0-.015 0-.03-.002-.044a.704.704 0 00-.746-.659l-.773.049.057 1.615a.105.105 0 01-.17.086l-.52-.41-.617.468a.105.105 0 01-.168-.088L9.746.134 2.042.616zm8.003 4.747c-.247.192-2.092.324-2.092.05.04-1.045-.429-1.091-.689-1.091-.247 0-.662.075-.662.634 0 .57.607.893 1.32 1.27 1.014.538 2.24 1.188 2.24 2.823 0 1.568-1.273 2.433-2.898 2.433-1.676 0-3.141-.678-2.976-3.03.065-.275 2.197-.21 2.197 0-.026.971.195 1.256.753 1.256.43 0 .624-.236.624-.634 0-.602-.633-.958-1.361-1.367-.987-.554-2.148-1.205-2.148-2.7 0-1.494 1.027-2.489 2.86-2.489 1.832 0 2.832.98 2.832 2.845z`,fill:e})),bu=({fullAPI:e,store:t,provider:n})=>{let r={whatsNewData:void 0};function i(e){t.setState({whatsNewData:e}),r.whatsNewData=e}let a={isWhatsNewUnread(){return r.whatsNewData?.status===`SUCCESS`&&!r.whatsNewData.postIsRead},whatsNewHasBeenRead(){r.whatsNewData?.status===`SUCCESS`&&(s({lastReadPost:r.whatsNewData.url}),i({...r.whatsNewData,postIsRead:!0}),e.clearNotification(vu))},toggleWhatsNewNotifications(){r.whatsNewData?.status===`SUCCESS`&&(i({...r.whatsNewData,disableWhatsNewNotifications:!r.whatsNewData.disableWhatsNewNotifications}),n.channel?.emit(gu,{disableWhatsNewNotifications:r.whatsNewData.disableWhatsNewNotifications}))}};function o(){return n.channel?.emit(pu),new Promise(e=>n.channel?.once(mu,({data:t})=>e(t)))}function s(e){n.channel?.emit(hu,e)}return{init:async()=>{if(_u.CONFIG_TYPE!==`DEVELOPMENT`)return;let t=await o();i(t);let n=e.getUrlState();!(n?.path===`/onboarding`||n.queryParams?.onboarding===`true`)&&t.status===`SUCCESS`&&!t.disableWhatsNewNotifications&&t.showNotification&&e.addNotification({id:vu,link:`/settings/whats-new`,content:{headline:t.title,subHeadline:`Learn what's new in Storybook`},icon:F.createElement(yu,null),onClear({dismissed:e}){e&&s({lastDismissedPost:t.url})}})},state:r,api:a}},xu=t(ds(),1);(e=>{e.fn(`set`,function(t,n){return e.set(this._area,this._in(t),pi(n,{maxDepth:50}))}),e.fn(`get`,function(t,n){let r=e.get(this._area,this._in(t));return r===null?n||r:hi(r)})})(xu.default._);var Su=`@storybook/manager/store`;function Cu(e){return e.get(Su)||{}}function wu(e,t){return e.set(Su,t)}function Tu(e,t){return wu(e,{...Cu(e),...t})}var Eu=class{constructor({setState:e,getState:t}){this.upstreamSetState=e,this.upstreamGetState=t}getInitialState(e){return{...e,...Cu(xu.default.local),...Cu(xu.default.session)}}getState(){return this.upstreamGetState()}async setState(e,t,n){let r,i;typeof t==`function`?(r=t,i=n):i=t;let{persistence:a=`none`}=i||{},o={},s={};typeof e==`function`?o=t=>(s=e(t),s):(o=e,s=o);let c=await new Promise(e=>{this.upstreamSetState(o,()=>{e(this.getState())})});return a!==`none`&&await Tu(a===`session`?xu.default.session:xu.default.local,s),r&&r(c),c}},{ActiveTabs:Du}=hc,Ou=vs({api:void 0,state:Ss({})}),ku=(...e)=>xs({},...e),Au=class extends F.Component{constructor(e){super(e),this.api={},this.initModules=()=>{this.modules.forEach(e=>{`init`in e&&e.init()})};let{location:t,path:n,refId:r,viewMode:i=e.docsOptions.docsMode?`docs`:e.viewMode,singleStory:a,storyId:o,docsOptions:s,navigate:c}=e,l=new Eu({getState:()=>this.state,setState:(e,t)=>(this.setState(e,()=>t(this.state)),this.state)}),u={location:t,path:n,viewMode:i,singleStory:a,storyId:o,refId:r},d={docsOptions:s};this.state=l.getInitialState(Ss({...u,...d}));let f={navigate:c,store:l,provider:e.provider};this.modules=[Pc,Is,Ms,hc,Oc,Ic,Rc,ll,Ws,Rs,Wl,iu,fu,Ac].map(e=>e.init({...u,...d,...f,state:this.state,fullAPI:this.api}));let p=Ss(this.state,...this.modules.map(e=>e.state)),m=Object.assign(this.api,{navigate:c},...this.modules.map(e=>e.api));this.state=p,this.api=m}static getDerivedStateFromProps(e,t){return t.path===e.path?null:{...t,location:e.location,path:e.path,refId:e.refId,viewMode:e.viewMode,storyId:e.storyId}}shouldComponentUpdate(e,t){let n=this.props,r=this.state;return n.path!==e.path||!u(r,t)}render(){let{children:e}=this.props,t={state:this.state,api:this.api};return F.createElement(ju,{effect:this.initModules},F.createElement(Ou.Provider,{value:t},F.createElement(Nu,null,e)))}};Au.displayName=`Manager`;var ju=({children:e,effect:t})=>(F.useEffect(t,[]),e),Mu=e=>e;function Nu({filter:e=Mu,children:t}){let n=(0,F.useContext)(Ou),r=(0,F.useRef)(t),i=(0,F.useRef)(e);if(typeof r.current!=`function`)return F.createElement(F.Fragment,null,r.current);let a=i.current(n);return(0,F.useMemo)(()=>{let e=r.current;return F.createElement(e,{...a})},(0,F.useMemo)(()=>[...Object.entries(a).reduce((e,t)=>e.concat(t),[])],[n.state]))}globalThis.STORYBOOK_ADDON_STATE={};var{STORYBOOK_ADDON_STATE:Pu}=globalThis,{Channel:Fu}=__STORYBOOK_MODULE_CHANNELS__,Iu={id:`storybook/test-provider`,leader:!0,initialState:{}};function Lu({universalTestProviderStore:e,useUniversalStore:t}){let n={settingsChanged:()=>{e.untilReady().then(()=>{e.send({type:`settings-changed`})})},onRunAll:t=>e.subscribe(`run-all`,t),onClearAll:t=>e.subscribe(`clear-all`,t)},r={...n,getFullState:e.getState,setFullState:e.setState,onSettingsChanged:t=>e.subscribe(`settings-changed`,t),runAll:async()=>{await e.untilReady(),e.send({type:`run-all`})},clearAll:async()=>{await e.untilReady(),e.send({type:`clear-all`})}},i=t=>{let r=()=>e.getState()[t]??`test-provider-state:pending`,i=n=>{e.untilReady().then(()=>{e.setState(e=>({...e,[t]:n}))})};return{...n,testProviderId:t,getState:r,setState:i,runWithState:async e=>{i(`test-provider-state:running`);try{await e(),i(`test-provider-state:succeeded`)}catch{i(`test-provider-state:crashed`)}}}};return t?{getTestProviderStoreById:i,fullTestProviderStore:r,universalTestProviderStore:e,useTestProviderStore:n=>t(e,n)[0]}:{getTestProviderStoreById:i,fullTestProviderStore:r,universalTestProviderStore:e}}var{fullTestProviderStore:Ru,getTestProviderStoreById:zu,useTestProviderStore:Bu,universalTestProviderStore:Vu}=Lu({universalTestProviderStore:je.create({...Iu,leader:globalThis.CONFIG_TYPE===`PRODUCTION`}),useUniversalStore:Pl});je.create({id:`storybook/checklist`,initialState:{items:{accessibilityTests:{status:`open`},autodocs:{status:`open`},ciTests:{status:`open`},controls:{status:`open`},coverage:{status:`open`},guidedTour:{status:`open`},installA11y:{status:`open`},installChromatic:{status:`open`},installDocs:{status:`open`},installVitest:{status:`open`},mdxDocs:{status:`open`},moreComponents:{status:`open`},moreStories:{status:`open`},onboardingSurvey:{status:`open`},organizeStories:{status:`open`},publishStorybook:{status:`open`},renderComponent:{status:`open`},runTests:{status:`open`},viewports:{status:`open`},visualTests:{status:`open`},whatsNewStorybook10:{status:`open`},writeInteractions:{status:`open`}},widget:{}},leader:globalThis.CONFIG_TYPE===`PRODUCTION`});var Hu=n((e=>{var t=s();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),s=r[0].inst,l=r[1];return o(function(){s.value=n,s.getSnapshot=t,u(s)&&l({inst:s})},[e,n,t]),a(function(){return u(s)&&l({inst:s}),e(function(){u(s)&&l({inst:s})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Uu=n(((e,t)=>{t.exports=Hu()})),Wu=r({A:()=>Qu,ActionList:()=>$b,Bar:()=>QT,Blockquote:()=>$u,Button:()=>Rb,Code:()=>ld,DL:()=>ud,Div:()=>dd,EmptyTabContent:()=>hE,ErrorFormatter:()=>cS,FlexBar:()=>nE,Form:()=>qS,H1:()=>fd,H2:()=>pd,H3:()=>md,H4:()=>hd,H5:()=>gd,H6:()=>_d,HR:()=>vd,IconButton:()=>Bb,Img:()=>yd,LI:()=>bd,Link:()=>Pd,ListItem:()=>UT,Loader:()=>DD,OL:()=>xd,P:()=>Sd,Popover:()=>XS,PopoverProvider:()=>kT,Pre:()=>Cd,ResetWrapper:()=>Zu,ScrollArea:()=>re,Select:()=>fC,Separator:()=>ME,Span:()=>wd,SyntaxHighlighter:()=>id,TT:()=>Td,TabBar:()=>EE,TabButton:()=>lE,TabList:()=>YE,TabPanel:()=>ZE,TabWrapper:()=>OE,Table:()=>Ed,Tabs:()=>AE,TabsState:()=>jE,TabsView:()=>cD,ToggleButton:()=>Vb,Toolbar:()=>PE,Tooltip:()=>AT,TooltipLinkList:()=>qT,TooltipNote:()=>Zd,TooltipProvider:()=>Fb,UL:()=>Dd,Zoom:()=>Qx,codeCommon:()=>Yu,components:()=>AD,convertToReactAriaPlacement:()=>Nb,createCopyToClipboardFunction:()=>ie,nameSpaceClassNames:()=>L,resetComponents:()=>jD,useTabsState:()=>iD,withReset:()=>R}),Gu=_(),Ku=p(ne(),1),qu=Uu(),L=({...e},t)=>{let n=[e.class,e.className];return delete e.class,e.className=[`sbdocs`,`sbdocs-${t}`,...n].filter(Boolean).join(` `),e},Ju=({theme:e})=>({margin:`20px 0 8px`,padding:0,cursor:`text`,position:`relative`,color:e.color.defaultText,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:`none`},"& tt, & code":{fontSize:`inherit`}}),Yu=({theme:e})=>({lineHeight:1,margin:`0 2px`,padding:`3px 5px`,whiteSpace:`nowrap`,borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base===`light`?`1px solid hsl(0 0 0 / 0.05)`:`1px solid hsl(0 0 100 / 0.05)`,color:e.color.defaultText,backgroundColor:e.base===`light`?`hsl(0 0 0 / 0.01)`:`hsl(0 0 100 / 0.02)`}),R=({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,WebkitTapHighlightColor:`rgba(0, 0, 0, 0)`,WebkitOverflowScrolling:`touch`}),Xu={margin:`16px 0`},Zu=N.div(R),Qu=N(({href:e=``,...t})=>{let n=/^\//.test(e)?`./?path=${e}`:e,r=/^#.*/.test(e)?`_self`:`_top`;return F.createElement(`a`,{href:n,target:r,...t})})(R,({theme:e})=>({fontSize:`inherit`,lineHeight:`24px`,color:e.color.secondary,textDecoration:`none`,"&.absent":{color:`#cc0000`},"&.anchor":{display:`block`,paddingLeft:30,marginLeft:-30,cursor:`pointer`,position:`absolute`,top:0,left:0,bottom:0}})),$u=N.blockquote(R,Xu,({theme:e})=>({borderLeft:`4px solid ${e.color.medium}`,padding:`0 15px`,color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}})),ed=[],td=null,nd=(0,F.lazy)(async()=>{let{SyntaxHighlighter:t}=await e(async()=>{let{SyntaxHighlighter:e}=await import(`./syntaxhighlighter-ED5Y7EFY-BYKOC5Jx.js`);return{SyntaxHighlighter:e}},__vite__mapDeps([3,1,2,4,5,0,6]),import.meta.url);return ed.length>0&&(ed.forEach(e=>{t.registerLanguage(...e)}),ed=[]),td===null&&(td=t),{default:e=>F.createElement(t,{...e})}}),rd=(0,F.lazy)(async()=>{let[{SyntaxHighlighter:t},{formatter:n}]=await Promise.all([e(()=>import(`./syntaxhighlighter-ED5Y7EFY-BYKOC5Jx.js`),__vite__mapDeps([3,1,2,4,5,0,6]),import.meta.url),e(()=>import(`./formatter-EIJCOSYU-C3MpZZqp.js`),__vite__mapDeps([7,1,2]),import.meta.url)]);return ed.length>0&&(ed.forEach(e=>{t.registerLanguage(...e)}),ed=[]),td===null&&(td=t),{default:e=>F.createElement(t,{...e,formatter:n})}}),id=e=>F.createElement(F.Suspense,{fallback:F.createElement(`div`,null)},e.format===!1?F.createElement(nd,{...e}):F.createElement(rd,{...e}));id.registerLanguage=(...e)=>{if(td!==null){td.registerLanguage(...e);return}ed.push(e)};var ad=e=>typeof e==`string`,od=/[\n\r]/g,sd=N.code(({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,display:`inline-block`,paddingLeft:2,paddingRight:2,verticalAlign:`baseline`,color:`inherit`}),Yu),cd=N(id)(({theme:e})=>({fontFamily:e.typography.fonts.mono,fontSize:`${e.typography.size.s2-1}px`,lineHeight:`19px`,margin:`25px 0 40px`,borderRadius:e.appBorderRadius,boxShadow:e.base===`light`?`rgba(0, 0, 0, 0.10) 0 1px 3px 0`:`rgba(0, 0, 0, 0.20) 0 2px 5px 0`,"pre.prismjs":{padding:20,background:`inherit`}})),ld=({className:e,children:t,...n})=>{let r=(e||``).match(/lang-(\S+)/),i=F.Children.toArray(t);return i.filter(ad).some(e=>e.match(od))?F.createElement(cd,{bordered:!0,copyable:!0,language:r?.[1]??`text`,format:!1,...n},t):F.createElement(sd,{...n,className:e},i)},ud=N.dl(R,Xu,{padding:0,"& dt":{fontSize:`14px`,fontWeight:`bold`,fontStyle:`italic`,padding:0,margin:`16px 0 4px`},"& dt:first-of-type":{padding:0},"& dt > :first-of-type":{marginTop:0},"& dt > :last-child":{marginBottom:0},"& dd":{margin:`0 0 16px`,padding:`0 15px`},"& dd > :first-of-type":{marginTop:0},"& dd > :last-child":{marginBottom:0}}),dd=N.div(R),fd=N.h1(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold})),pd=N.h2(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`})),md=N.h3(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.m1}px`})),hd=N.h4(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.s3}px`})),gd=N.h5(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.s2}px`})),_d=N.h6(R,Ju,({theme:e})=>({fontSize:`${e.typography.size.s2}px`,color:e.color.dark})),vd=N.hr(({theme:e})=>({border:`0 none`,borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0})),yd=N.img({maxWidth:`100%`}),bd=N.li(R,({theme:e})=>({fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:`24px`,"& + li":{marginTop:`.25em`},"& ul, & ol":{marginTop:`.25em`,marginBottom:0},"& code":Yu({theme:e})})),xd=N.ol(R,Xu,{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},{listStyle:`decimal`}),Sd=N.p(R,Xu,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:`24px`,color:e.color.defaultText,"& code":Yu({theme:e})})),Cd=N.pre(R,Xu,({theme:e})=>({fontFamily:e.typography.fonts.mono,WebkitFontSmoothing:`antialiased`,MozOsxFontSmoothing:`grayscale`,lineHeight:`18px`,padding:`11px 1rem`,whiteSpace:`pre-wrap`,color:`inherit`,borderRadius:3,margin:`1rem 0`,"&:not(.prismjs)":{background:`transparent`,border:`none`,borderRadius:0,padding:0,margin:0},"& pre, &.prismjs":{padding:15,margin:0,whiteSpace:`pre-wrap`,color:`inherit`,fontSize:`13px`,lineHeight:`19px`,code:{color:`inherit`,fontSize:`inherit`}},"& code":{whiteSpace:`pre`},"& code, & tt":{border:`none`}})),wd=N.span(R,({theme:e})=>({"&.frame":{display:`block`,overflow:`hidden`,"& > span":{border:`1px solid ${e.color.medium}`,display:`block`,float:`left`,overflow:`hidden`,margin:`13px 0 0`,padding:7,width:`auto`},"& span img":{display:`block`,float:`left`},"& span span":{clear:`both`,color:e.color.darkest,display:`block`,padding:`5px 0 0`}},"&.align-center":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`center`},"& span img":{margin:`0 auto`,textAlign:`center`}},"&.align-right":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px 0 0`,textAlign:`right`},"& span img":{margin:0,textAlign:`right`}},"&.float-left":{display:`block`,marginRight:13,overflow:`hidden`,float:`left`,"& span":{margin:`13px 0 0`}},"&.float-right":{display:`block`,marginLeft:13,overflow:`hidden`,float:`right`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`right`}}})),Td=N.title(Yu),Ed=N.table(R,Xu,({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:`24px`,padding:0,borderCollapse:`collapse`,"& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:e.appContentBg,margin:0,padding:0},"& tr:nth-of-type(2n)":{backgroundColor:e.base===`dark`?e.color.darker:e.color.lighter},"& tr th":{fontWeight:`bold`,color:e.color.defaultText,border:`1px solid ${e.appBorderColor}`,margin:0,padding:`6px 13px`},"& tr td":{border:`1px solid ${e.appBorderColor}`,color:e.color.defaultText,margin:0,padding:`6px 13px`},"& tr th :first-of-type, & tr td :first-of-type":{marginTop:0},"& tr th :last-child, & tr td :last-child":{marginBottom:0}})),Dd=N.ul(R,Xu,{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},{listStyle:`disc`}),Od={h1:e=>F.createElement(fd,{...L(e,`h1`)}),h2:e=>F.createElement(pd,{...L(e,`h2`)}),h3:e=>F.createElement(md,{...L(e,`h3`)}),h4:e=>F.createElement(hd,{...L(e,`h4`)}),h5:e=>F.createElement(gd,{...L(e,`h5`)}),h6:e=>F.createElement(_d,{...L(e,`h6`)}),pre:e=>F.createElement(Cd,{...L(e,`pre`)}),a:e=>F.createElement(Qu,{...L(e,`a`)}),hr:e=>F.createElement(vd,{...L(e,`hr`)}),dl:e=>F.createElement(ud,{...L(e,`dl`)}),blockquote:e=>F.createElement($u,{...L(e,`blockquote`)}),table:e=>F.createElement(Ed,{...L(e,`table`)}),img:e=>F.createElement(yd,{...L(e,`img`)}),div:e=>F.createElement(dd,{...L(e,`div`)}),span:e=>F.createElement(wd,{...L(e,`span`)}),li:e=>F.createElement(bd,{...L(e,`li`)}),ul:e=>F.createElement(Dd,{...L(e,`ul`)}),ol:e=>F.createElement(xd,{...L(e,`ol`)}),p:e=>F.createElement(Sd,{...L(e,`p`)}),code:e=>F.createElement(ld,{...L(e,`code`)}),tt:e=>F.createElement(Td,{...L(e,`tt`)}),resetwrapper:e=>F.createElement(Zu,{...L(e,`resetwrapper`)})};N.div(({theme:e,compact:t})=>({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:`12px`,minWidth:20,borderRadius:20,padding:t?`4px 7px`:`4px 10px`}),{svg:{height:12,width:12,marginRight:4,marginTop:-2,path:{fill:`currentColor`}}},({theme:e,status:t})=>{switch(t){case`critical`:return{color:e.fgColor.critical,background:e.bgColor.critical,boxShadow:`inset 0 0 0 1px ${e.borderColor.critical}`};case`negative`:return{color:e.fgColor.negative,background:e.bgColor.negative,boxShadow:`inset 0 0 0 1px ${e.borderColor.negative}`};case`warning`:return{color:e.fgColor.warning,background:e.bgColor.warning,boxShadow:`inset 0 0 0 1px ${e.borderColor.warning}`};case`neutral`:return{color:e.fgColor.muted,background:e.base===`dark`?e.barBg:e.background.app,boxShadow:`inset 0 0 0 1px ${C(.8,e.textMutedColor)}`};case`positive`:return{color:e.fgColor.positive,background:e.bgColor.positive,boxShadow:`inset 0 0 0 1px ${e.borderColor.positive}`};case`active`:return{color:e.base===`light`?O(.1,e.color.secondary):e.color.secondary,background:e.background.hoverable,boxShadow:`inset 0 0 0 1px ${C(.9,e.color.secondary)}`};default:return{}}});var kd=0,Ad=e=>e.button===kd&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,jd=(e,t)=>{Ad(e)&&(e.preventDefault(),t(e))},Md=N.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:`0.7em`,width:`0.7em`,marginRight:0,marginLeft:`0.25em`,bottom:`auto`,verticalAlign:`inherit`}}:{},({containsIcon:e})=>e?{svg:{height:`1em`,width:`1em`,verticalAlign:`middle`,position:`relative`,bottom:0,marginRight:0}}:{}),Nd=N.a(({theme:e})=>({display:`inline-block`,transition:`all 150ms ease-out`,textDecoration:`none`,color:e.color.secondary,"&:hover, &:focus":{cursor:`pointer`,color:O(.07,e.color.secondary),"svg path:not([fill])":{fill:O(.07,e.color.secondary)}},"&:active":{color:O(.1,e.color.secondary),"svg path:not([fill])":{fill:O(.1,e.color.secondary)}},svg:{display:`inline-block`,height:`1em`,width:`1em`,verticalAlign:`text-top`,position:`relative`,bottom:`-0.125em`,marginRight:`0.4em`,"& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:n})=>{let r;return t&&(r=[e.textMutedColor,e.color.secondary,e.color.secondary]),n&&(r=[e.color.dark,e.color.secondary,e.color.secondary]),r?{color:r[0],"svg path:not([fill])":{fill:r[0]},"&:hover":{color:r[1],"svg path:not([fill])":{fill:r[1]}},"&:active":{color:r[2],"svg path:not([fill])":{fill:r[2]}}}:{}},({nochrome:e})=>e?{color:`inherit`,"&:hover, &:active":{color:`inherit`,textDecoration:`underline`}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:`none`,padding:0,fontSize:`inherit`}:{}),Pd=(0,F.forwardRef)(({cancel:e=!0,children:t,onClick:n=void 0,withArrow:r=!1,containsIcon:i=!1,className:a=void 0,style:o=void 0,isButton:s=!1,...c},l)=>F.createElement(Nd,{...c,ref:l,isButton:s,role:s?`button`:void 0,onClick:n&&e?e=>jd(e,n):n,className:a},F.createElement(Md,{withArrow:r,containsIcon:i},t,r&&F.createElement(be,null))));Pd.displayName=`Link`,N.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:`1.6`,h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:`transparent`,border:`none`,borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:`pre-wrap`,color:`inherit`,fontSize:`13px`,lineHeight:`19px`},"pre pre code, pre.prismjs code":{color:`inherit`,fontSize:`inherit`},"pre code":{margin:0,padding:0,whiteSpace:`pre`,border:`none`,background:`transparent`},"pre code, pre tt":{backgroundColor:`transparent`,border:`none`},"body > *:first-of-type":{marginTop:`0 !important`},"body > *:last-child":{marginBottom:`0 !important`},a:{color:e.color.secondary,textDecoration:`none`},"a.absent":{color:`#cc0000`},"a.anchor":{display:`block`,paddingLeft:30,marginLeft:-30,cursor:`pointer`,position:`absolute`,top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:`20px 0 10px`,padding:0,cursor:`text`,position:`relative`,"&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:`none`},"& tt, & code":{fontSize:`inherit`}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:`15px 0`},hr:{border:`0 none`,borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:`inline-block`},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:`14px`,fontWeight:`bold`,fontStyle:`italic`,margin:`0 0 15px`,padding:`0 15px`,"&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:`0 15px`,color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:`collapse`,"& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:`white`,margin:0,padding:0,"& th":{fontWeight:`bold`,border:`1px solid ${e.appBorderColor}`,textAlign:`left`,margin:0,padding:`6px 13px`},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:`left`,margin:0,padding:`6px 13px`},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:`100%`},"span.frame":{display:`block`,overflow:`hidden`,"& > span":{border:`1px solid ${e.color.medium}`,display:`block`,float:`left`,overflow:`hidden`,margin:`13px 0 0`,padding:7,width:`auto`},"& span img":{display:`block`,float:`left`},"& span span":{clear:`both`,color:e.color.darkest,display:`block`,padding:`5px 0 0`}},"span.align-center":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`center`},"& span img":{margin:`0 auto`,textAlign:`center`}},"span.align-right":{display:`block`,overflow:`hidden`,clear:`both`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px 0 0`,textAlign:`right`},"& span img":{margin:0,textAlign:`right`}},"span.float-left":{display:`block`,marginRight:13,overflow:`hidden`,float:`left`,"& span":{margin:`13px 0 0`}},"span.float-right":{display:`block`,marginLeft:13,overflow:`hidden`,float:`right`,"& > span":{display:`block`,overflow:`hidden`,margin:`13px auto 0`,textAlign:`right`}},"code, tt":{margin:`0 2px`,padding:`0 5px`,whiteSpace:`nowrap`,border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base===`dark`?e.color.darkest:e.color.dark}}));var{deprecate:Fd}=__STORYBOOK_MODULE_CLIENT_LOGGER__;function Id(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Ld(...e){return t=>{let n=!1,r=e.map(e=>{let r=Id(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Id(e[t],null)}}}}var Rd=Symbol.for(`react.lazy`),zd=F.use;function Bd(e){return typeof e==`object`&&!!e&&`then`in e}function Vd(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Rd&&`_payload`in e&&Bd(e._payload)}function Hd(e){let t=Wd(e),n=F.forwardRef((e,n)=>{let{children:r,...i}=e;Vd(r)&&typeof zd==`function`&&(r=zd(r._payload));let a=F.Children.toArray(r),o=a.find(qd);if(o){let e=o.props.children,r=a.map(t=>t===o?F.Children.count(e)>1?F.Children.only(null):F.isValidElement(e)?e.props.children:null:t);return(0,Gu.jsx)(t,{...i,ref:n,children:F.isValidElement(e)?F.cloneElement(e,void 0,r):null})}return(0,Gu.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Ud=Hd(`Slot`);function Wd(e){let t=F.forwardRef((e,t)=>{let{children:n,...r}=e;if(Vd(n)&&typeof zd==`function`&&(n=zd(n._payload)),F.isValidElement(n)){let e=Yd(n),i=Jd(r,n.props);return n.type!==F.Fragment&&(i.ref=t?Ld(t,e):e),F.cloneElement(n,i)}return F.Children.count(n)>1?F.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gd=Symbol(`radix.slottable`);function Kd(e){let t=({children:e})=>(0,Gu.jsx)(Gu.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=Gd,t}Kd(`Slottable`);function qd(e){return F.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Gd}function Jd(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Yd(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Xd=N.div(({theme:e})=>({padding:`2px 6px`,lineHeight:`16px`,fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:`0 0 5px 0 rgba(0, 0, 0, 0.3)`,borderRadius:4,whiteSpace:`nowrap`,pointerEvents:`none`,zIndex:-1,background:e.base===`light`?`rgba(60, 60, 60, 0.9)`:`rgba(0, 0, 0, 0.95)`})),Zd=({note:e,...t})=>F.createElement(Xd,{...t},e),{deprecate:Qd}=__STORYBOOK_MODULE_CLIENT_LOGGER__,z=typeof document<`u`?F.useLayoutEffect:()=>{};function $d(e){let[t,n]=(0,F.useState)(e),r=(0,F.useRef)(t),i=(0,F.useRef)(null),a=(0,F.useRef)(()=>{if(!i.current)return;let e=i.current.next();if(e.done){i.current=null;return}r.current===e.value?a.current():n(e.value)});return z(()=>{r.current=t,i.current&&a.current()}),[t,(0,F.useCallback)(e=>{i.current=e(r.current),a.current()},[a])]}var ef={prefix:String(Math.round(Math.random()*1e10)),current:0},tf=F.createContext(ef),nf=F.createContext(!1);typeof window<`u`&&window.document&&window.document.createElement;var rf=new WeakMap;function af(e=!1){let t=(0,F.useContext)(tf),n=(0,F.useRef)(null);if(n.current===null&&!e){var r,i;let e=(i=F.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)==null||(r=i.ReactCurrentOwner)==null?void 0:r.current;if(e){let n=rf.get(e);n==null?rf.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,rf.delete(e))}n.current=++t.current}return n.current}function of(e){let t=(0,F.useContext)(tf),n=af(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function sf(e){let t=F.useId(),[n]=(0,F.useState)(ff()),r=n?`react-aria`:`react-aria${ef.prefix}`;return e||`${r}-${t}`}var cf=typeof F.useId==`function`?sf:of;function lf(){return!1}function uf(){return!0}function df(e){return()=>{}}function ff(){return typeof F.useSyncExternalStore==`function`?F.useSyncExternalStore(df,lf,uf):(0,F.useContext)(nf)}var pf=!!(typeof window<`u`&&window.document&&window.document.createElement),mf=new Map,hf;typeof FinalizationRegistry<`u`&&(hf=new FinalizationRegistry(e=>{mf.delete(e)}));function B(e){let[t,n]=(0,F.useState)(e),r=(0,F.useRef)(null),i=cf(t),a=(0,F.useRef)(null);if(hf&&hf.register(a,i),pf){let e=mf.get(i);e&&!e.includes(r)?e.push(r):mf.set(i,[r])}return z(()=>{let e=i;return()=>{hf&&hf.unregister(a),mf.delete(e)}},[i]),(0,F.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),i}function gf(e,t){if(e===t)return e;let n=mf.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=mf.get(t);return r?(r.forEach(t=>t.current=e),e):t}function _f(e=[]){let t=B(),[n,r]=$d(t),i=(0,F.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return z(i,[t,i,...e]),n}function vf(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var V=e=>e?.ownerDocument??document,yf=e=>e&&`window`in e&&e.window===e?e:V(e).defaultView||window;function bf(e){return typeof e==`object`&&!!e&&`nodeType`in e&&typeof e.nodeType==`number`}function xf(e){return bf(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&`host`in e}var Sf=!1;function Cf(){return Sf}function wf(e,t){if(!Cf())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName===`SLOT`&&n.assignedSlot?n.assignedSlot.parentNode:xf(n)?n.host:n.parentNode}return!1}var H=(e=document)=>{var t;if(!Cf())return e.activeElement;let n=e.activeElement;for(;n&&`shadowRoot`in n&&(t=n.shadowRoot)!=null&&t.activeElement;)n=n.shadowRoot.activeElement;return n};function U(e){return Cf()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}var Tf=class{get currentNode(){return this._currentNode}set currentNode(e){if(!wf(this.root,e))throw Error(`Cannot set currentNode to a node that is not contained by the root node.`);let t=[],n=e,r=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let e=n,i=this._doc.createTreeWalker(e,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),n=r=e.host}else n=n.parentNode;let i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});t.push(i),i.currentNode=r,this._currentSetFor.add(i),this._walkerStack=t}get doc(){return this._doc}firstChild(){let e=this.currentNode,t=this.nextNode();return wf(e,t)?(t&&(this.currentNode=t),t):(this.currentNode=e,null)}lastChild(){let e=this._walkerStack[0].lastChild();return e&&(this.currentNode=e),e}nextNode(){let e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){var t;let n;if(typeof this.filter==`function`?n=this.filter(e):(t=this.filter)!=null&&t.acceptNode&&(n=this.filter.acceptNode(e)),n===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let r=this.nextNode();return r&&(this.currentNode=r),r}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.nextNode();return e&&(this.currentNode=e),e}else return null}previousNode(){let e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null;return null}let t=e.previousNode();if(t){if(t.shadowRoot){var n;let e;if(typeof this.filter==`function`?e=this.filter(t):(n=this.filter)!=null&&n.acceptNode&&(e=this.filter.acceptNode(t)),e===NodeFilter.FILTER_ACCEPT)return t&&(this.currentNode=t),t;let r=this.lastChild();return r&&(this.currentNode=r),r}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let e=this.previousNode();return e&&(this.currentNode=e),e}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(e,t,n,r){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=e=>{if(e.nodeType===Node.ELEMENT_NODE){let n=e.shadowRoot;if(n){let e=this._doc.createTreeWalker(n,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(e),NodeFilter.FILTER_ACCEPT}else{var t;if(typeof this.filter==`function`)return this.filter(e);if((t=this.filter)!=null&&t.acceptNode)return this.filter.acceptNode(e);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=t,this.filter=r??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=t,this._walkerStack.unshift(e.createTreeWalker(t,n,this._acceptNode));let i=t.shadowRoot;if(i){let e=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(e)}}};function Ef(e,t,n,r){return Cf()?new Tf(e,t,n,r):e.createTreeWalker(t,n,r)}function Df(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Df(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Of(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Df(e))&&(r&&(r+=` `),r+=t);return r}var kf=Of;function W(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],i=r[e];typeof n==`function`&&typeof i==`function`&&e[0]===`o`&&e[1]===`n`&&e.charCodeAt(2)>=65&&e.charCodeAt(2)<=90?t[e]=vf(n,i):(e===`className`||e===`UNSAFE_className`)&&typeof n==`string`&&typeof i==`string`?t[e]=kf(n,i):e===`id`&&n&&i?t.id=gf(n,i):t[e]=i===void 0?n:i}}return t}function Af(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=jf(e,t);return n||=typeof r==`function`,r});if(n)return()=>{r.forEach((t,n)=>{typeof t==`function`?t():jf(e[n],null)})}}}function jf(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}var Mf=new Set([`id`]),Nf=new Set([`aria-label`,`aria-labelledby`,`aria-describedby`,`aria-details`]),Pf=new Set([`href`,`hrefLang`,`target`,`rel`,`download`,`ping`,`referrerPolicy`]),Ff=new Set([`dir`,`lang`,`hidden`,`inert`,`translate`]),If=new Set(`onClick.onAuxClick.onContextMenu.onDoubleClick.onMouseDown.onMouseEnter.onMouseLeave.onMouseMove.onMouseOut.onMouseOver.onMouseUp.onTouchCancel.onTouchEnd.onTouchMove.onTouchStart.onPointerDown.onPointerMove.onPointerUp.onPointerCancel.onPointerEnter.onPointerLeave.onPointerOver.onPointerOut.onGotPointerCapture.onLostPointerCapture.onScroll.onWheel.onAnimationStart.onAnimationEnd.onAnimationIteration.onTransitionCancel.onTransitionEnd.onTransitionRun.onTransitionStart`.split(`.`)),Lf=/^(data-.*)$/;function G(e,t={}){let{labelable:n,isLink:r,global:i,events:a=i,propNames:o}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(Mf.has(t)||n&&Nf.has(t)||r&&Pf.has(t)||i&&Ff.has(t)||a&&(If.has(t)||t.endsWith(`Capture`)&&If.has(t.slice(0,-7)))||o?.has(t)||Lf.test(t))&&(s[t]=e[t]);return s}function Rf(e){if(Bf())e.focus({preventScroll:!0});else{let t=Vf(e);e.focus(),Hf(t)}}var zf=null;function Bf(){if(zf==null){zf=!1;try{document.createElement(`div`).focus({get preventScroll(){return zf=!0,!0}})}catch{}}return zf}function Vf(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function Hf(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Uf(e){if(typeof window>`u`||window.navigator==null)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function Wf(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function Gf(e){let t=null;return()=>(t??=e(),t)}var Kf=Gf(function(){return Wf(/^Mac/i)}),qf=Gf(function(){return Wf(/^iPhone/i)}),Jf=Gf(function(){return Wf(/^iPad/i)||Kf()&&navigator.maxTouchPoints>1}),Yf=Gf(function(){return qf()||Jf()}),Xf=Gf(function(){return Kf()||Yf()}),Zf=Gf(function(){return Uf(/AppleWebKit/i)&&!Qf()}),Qf=Gf(function(){return Uf(/Chrome/i)}),$f=Gf(function(){return Uf(/Android/i)}),ep=Gf(function(){return Uf(/Firefox/i)}),tp=(0,F.createContext)({isNative:!0,open:op,useHref:e=>e});function np(){return(0,F.useContext)(tp)}function rp(e,t){let n=e.getAttribute(`target`);return(!n||n===`_self`)&&e.origin===location.origin&&!e.hasAttribute(`download`)&&!t.metaKey&&!t.ctrlKey&&!t.altKey&&!t.shiftKey}function ip(e,t,n=!0){var r,i;let{metaKey:a,ctrlKey:o,altKey:s,shiftKey:c}=t;ep()&&!((i=window.event)==null||(r=i.type)==null)&&r.startsWith(`key`)&&e.target===`_blank`&&(Kf()?a=!0:o=!0);let l=Zf()&&Kf()&&!Jf()?new KeyboardEvent(`keydown`,{keyIdentifier:`Enter`,metaKey:a,ctrlKey:o,altKey:s,shiftKey:c}):new MouseEvent(`click`,{metaKey:a,ctrlKey:o,altKey:s,shiftKey:c,detail:1,bubbles:!0,cancelable:!0});ip.isOpening=n,Rf(e),e.dispatchEvent(l),ip.isOpening=!1}ip.isOpening=!1;function ap(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute(`data-href`)){let n=document.createElement(`a`);n.href=e.getAttribute(`data-href`),e.hasAttribute(`data-target`)&&(n.target=e.getAttribute(`data-target`)),e.hasAttribute(`data-rel`)&&(n.rel=e.getAttribute(`data-rel`)),e.hasAttribute(`data-download`)&&(n.download=e.getAttribute(`data-download`)),e.hasAttribute(`data-ping`)&&(n.ping=e.getAttribute(`data-ping`)),e.hasAttribute(`data-referrer-policy`)&&(n.referrerPolicy=e.getAttribute(`data-referrer-policy`)),e.appendChild(n),t(n),e.removeChild(n)}}function op(e,t){ap(e,e=>ip(e,t))}function sp(e){let t=np().useHref(e?.href??``);return{href:e?.href?t:void 0,target:e?.target,rel:e?.rel,download:e?.download,ping:e?.ping,referrerPolicy:e?.referrerPolicy}}function cp(e,t,n,r){!t.isNative&&e.currentTarget instanceof HTMLAnchorElement&&e.currentTarget.href&&!e.isDefaultPrevented()&&rp(e.currentTarget,e)&&n&&(e.preventDefault(),t.open(e.currentTarget,e,n,r))}var lp=new Map,up=new Set;function dp(){if(typeof window>`u`)return;function e(e){return`propertyName`in e}let t=t=>{if(!e(t)||!t.target)return;let r=lp.get(t.target);r||(r=new Set,lp.set(t.target,r),t.target.addEventListener(`transitioncancel`,n,{once:!0})),r.add(t.propertyName)},n=t=>{if(!e(t)||!t.target)return;let r=lp.get(t.target);if(r&&(r.delete(t.propertyName),r.size===0&&(t.target.removeEventListener(`transitioncancel`,n),lp.delete(t.target)),lp.size===0)){for(let e of up)e();up.clear()}};document.body.addEventListener(`transitionrun`,t),document.body.addEventListener(`transitionend`,n)}typeof document<`u`&&(document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,dp):dp());function fp(){for(let[e]of lp)`isConnected`in e&&!e.isConnected&&lp.delete(e)}function pp(e){requestAnimationFrame(()=>{fp(),lp.size===0?e():up.add(e)})}function mp(){let e=(0,F.useRef)(new Map),t=(0,F.useCallback)((t,n,r,i)=>{let a=i?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:a,options:i}),t.addEventListener(n,a,i)},[]),n=(0,F.useCallback)((t,n,r,i)=>{let a=e.current.get(r)?.fn||r;t.removeEventListener(n,a,i),e.current.delete(r)},[]),r=(0,F.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,F.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function hp(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=B(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(` `):i&&=i.trim().split(/\s+/).join(` `),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function gp(e){let t=(0,F.useRef)(null),n=(0,F.useRef)(void 0),r=(0,F.useCallback)(t=>{if(typeof e==`function`){let n=e,r=n(t);return()=>{typeof r==`function`?r():n(null)}}else if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,F.useMemo)(()=>({get current(){return t.current},set current(e){t.current=e,n.current&&=(n.current(),void 0),e!=null&&(n.current=r(e))}}),[r])}var _p=F.useInsertionEffect??z;function K(e){let t=(0,F.useRef)(null);return _p(()=>{t.current=e},[e]),(0,F.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function vp(e,t){let n=(0,F.useRef)(!0),r=(0,F.useRef)(null);z(()=>(n.current=!0,()=>{n.current=!1}),[]),z(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function yp(){return typeof window.ResizeObserver<`u`}function bp(e){let{ref:t,box:n,onResize:r}=e,i=K(r);(0,F.useEffect)(()=>{let e=t?.current;if(e)if(yp()){let t=new window.ResizeObserver(e=>{e.length&&i()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}else return window.addEventListener(`resize`,i,!1),()=>{window.removeEventListener(`resize`,i,!1)}},[t,n])}function xp(e,t){z(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Sp(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Cp(e,t){let n=e;for(Sp(n,t)&&(n=n.parentElement);n&&!Sp(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function wp(e,t){let n=[];for(;e&&e!==document.documentElement;)Sp(e,t)&&n.push(e),e=e.parentElement;return n}function Tp(e){return Kf()?e.metaKey:e.ctrlKey}var Ep=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Dp(e){return e instanceof HTMLInputElement&&!Ep.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}typeof document<`u`&&window.visualViewport;var Op=0,kp=new Map;function Ap(e){let[t,n]=(0,F.useState)();return z(()=>{if(!e)return;let t=kp.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${Op++}`;n(r);let i=document.createElement(`div`);i.id=r,i.style.display=`none`,i.textContent=e,document.body.appendChild(i),t={refCount:0,element:i},kp.set(e,t)}return t.refCount++,()=>{t&&--t.refCount===0&&(t.element.remove(),kp.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function jp(e,t,n,r){let i=K(n),a=n==null;(0,F.useEffect)(()=>{if(a||!e.current)return;let n=e.current;return n.addEventListener(t,i,r),()=>{n.removeEventListener(t,i,r)}},[e,t,r,a])}function Mp(e,t){let n=Np(e,t,`left`),r=Np(e,t,`top`),i=t.offsetWidth,a=t.offsetHeight,o=e.scrollLeft,s=e.scrollTop,{borderTopWidth:c,borderLeftWidth:l,scrollPaddingTop:u,scrollPaddingRight:d,scrollPaddingBottom:f,scrollPaddingLeft:p}=getComputedStyle(e),m=o+parseInt(l,10),h=s+parseInt(c,10),g=m+e.clientWidth,_=h+e.clientHeight,v=parseInt(u,10)||0,y=parseInt(f,10)||0,b=parseInt(d,10)||0,x=parseInt(p,10)||0;n<=o+x?o=n-parseInt(l,10)-x:n+i>g-b&&(o+=n+i-g+b),r<=h+v?s=r-parseInt(c,10)-v:r+a>_-y&&(s+=r+a-_+y),e.scrollLeft=o,e.scrollTop=s}function Np(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function Pp(e,t){if(e&&document.contains(e)){let o=document.scrollingElement||document.documentElement,s=window.getComputedStyle(o).overflow===`hidden`;if(s){let t=wp(e);s||t.push(o);for(let n of t)Mp(n,e)}else{var n;let{left:o,top:s}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)==null||n.call(e,{block:`nearest`});let{left:c,top:l}=e.getBoundingClientRect();if(Math.abs(o-c)>1||Math.abs(s-l)>1){var r,i,a;t==null||(i=t.containingElement)==null||(r=i.scrollIntoView)==null||r.call(i,{block:`center`,inline:`center`}),(a=e.scrollIntoView)==null||a.call(e,{block:`nearest`})}}}}function Fp(e){return e.pointerType===``&&e.isTrusted?!0:$f()&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function Ip(e){return!$f()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`}function Lp(e){let t=F.version.split(`.`);return parseInt(t[0],10)>=19?e:e?`true`:void 0}var Rp=`react-aria-clear-focus`,zp=`react-aria-focus`;function Bp(e,t=!0){let[n,r]=(0,F.useState)(!0),i=n&&t;return z(()=>{if(i&&e.current&&`getAnimations`in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,i]),Hp(e,i,(0,F.useCallback)(()=>r(!1),[])),i}function Vp(e,t){let[n,r]=(0,F.useState)(t?`open`:`closed`);switch(n){case`open`:t||r(`exiting`);break;case`closed`:case`exiting`:t&&r(`open`);break}let i=n===`exiting`;return Hp(e,i,(0,F.useCallback)(()=>{r(e=>e===`exiting`?`closed`:e)},[])),i}function Hp(e,t,n){z(()=>{if(t&&e.current){if(!(`getAnimations`in e.current)){n();return}let t=e.current.getAnimations();if(t.length===0){n();return}let r=!1;return Promise.all(t.map(e=>e.finished)).then(()=>{r||(0,Ku.flushSync)(()=>{n()})}).catch(()=>{}),()=>{r=!0}}},[e,t,n])}var Up=typeof Element<`u`&&`checkVisibility`in Element.prototype;function Wp(e){let t=yf(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!==`none`&&r!==`hidden`&&r!==`collapse`;if(i){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);i=n!==`none`&&r!==`hidden`&&r!==`collapse`}return i}function Gp(e,t){return!e.hasAttribute(`hidden`)&&!e.hasAttribute(`data-react-aria-prevent-focus`)&&(e.nodeName===`DETAILS`&&t&&t.nodeName!==`SUMMARY`?e.hasAttribute(`open`):!0)}function Kp(e,t){return Up?e.checkVisibility({visibilityProperty:!0})&&!e.closest(`[data-react-aria-prevent-focus]`):e.nodeName!==`#comment`&&Wp(e)&&Gp(e,t)&&(!e.parentElement||Kp(e.parentElement,e))}var qp=[`input:not([disabled]):not([type=hidden])`,`select:not([disabled])`,`textarea:not([disabled])`,`button:not([disabled])`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[contenteditable]:not([contenteditable^="false"])`,`permission`],Jp=qp.join(`:not([hidden]),`)+`,[tabindex]:not([disabled]):not([hidden])`;qp.push(`[tabindex]:not([tabindex="-1"]):not([disabled])`);var Yp=qp.join(`:not([hidden]):not([tabindex="-1"]),`);function Xp(e){return e.matches(Jp)&&Kp(e)&&!Qp(e)}function Zp(e){return e.matches(Yp)&&Kp(e)&&!Qp(e)}function Qp(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}var $p=typeof document<`u`?F.useInsertionEffect??F.useLayoutEffect:()=>{};function em(e,t,n){let[r,i]=(0,F.useState)(e||t),a=(0,F.useRef)(r),o=(0,F.useRef)(e!==void 0),s=e!==void 0;(0,F.useEffect)(()=>{o.current,o.current=s},[s]);let c=s?e:r;$p(()=>{a.current=c});let[,l]=(0,F.useReducer)(()=>({}),{});return[c,(0,F.useCallback)((e,...t)=>{let r=typeof e==`function`?e(a.current):e;Object.is(a.current,r)||(a.current=r,i(r),l(),n?.(r,...t))},[n])]}function tm(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function nm(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function rm(e,t){Object.defineProperty(e,`target`,{value:t}),Object.defineProperty(e,`currentTarget`,{value:t})}function im(e){let t=(0,F.useRef)({isFocused:!1,observer:null});z(()=>{let e=t.current;return()=>{e.observer&&=(e.observer.disconnect(),null)}},[]);let n=K(t=>{e?.(t)});return(0,F.useCallback)(e=>{if(e.target instanceof HTMLButtonElement||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement){t.current.isFocused=!0;let r=e.target;r.addEventListener(`focusout`,e=>{t.current.isFocused=!1,r.disabled&&n(nm(e)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){var e;(e=t.current.observer)==null||e.disconnect();let n=r===document.activeElement?null:document.activeElement;r.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:n})),r.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:n}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:[`disabled`]})}},[n])}var am=!1;function om(e){for(;e&&!Xp(e);)e=e.parentElement;let t=yf(e),n=t.document.activeElement;if(!n||n===e)return;am=!0;let r=!1,i=e=>{(e.target===n||r)&&e.stopImmediatePropagation()},a=t=>{(t.target===n||r)&&(t.stopImmediatePropagation(),!e&&!r&&(r=!0,Rf(n),c()))},o=t=>{(t.target===e||r)&&t.stopImmediatePropagation()},s=t=>{(t.target===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,Rf(n),c()))};t.addEventListener(`blur`,i,!0),t.addEventListener(`focusout`,a,!0),t.addEventListener(`focusin`,s,!0),t.addEventListener(`focus`,o,!0);let c=()=>{cancelAnimationFrame(l),t.removeEventListener(`blur`,i,!0),t.removeEventListener(`focusout`,a,!0),t.removeEventListener(`focusin`,s,!0),t.removeEventListener(`focus`,o,!0),am=!1,r=!1},l=requestAnimationFrame(c);return c}var sm=`default`,cm=``,lm=new WeakMap;function um(e){if(Yf()){if(sm===`default`){let t=V(e);cm=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect=`none`}sm=`disabled`}else if(e instanceof HTMLElement||e instanceof SVGElement){let t=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;lm.set(e,e.style[t]),e.style[t]=`none`}}function dm(e){if(Yf()){if(sm!==`disabled`)return;sm=`restoring`,setTimeout(()=>{pp(()=>{if(sm===`restoring`){let t=V(e);t.documentElement.style.webkitUserSelect===`none`&&(t.documentElement.style.webkitUserSelect=cm||``),cm=``,sm=`default`}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&lm.has(e)){let t=lm.get(e),n=`userSelect`in e.style?`userSelect`:`webkitUserSelect`;e.style[n]===`none`&&(e.style[n]=t),e.getAttribute(`style`)===``&&e.removeAttribute(`style`),lm.delete(e)}}var fm=F.createContext({register:()=>{}});fm.displayName=`PressResponderContext`;function pm(e,t){return t.get?t.get.call(e):t.value}function mm(e,t,n){if(!t.has(e))throw TypeError(`attempted to `+n+` private field on non-instance`);return t.get(e)}function hm(e,t){return pm(e,mm(e,t,`get`))}function gm(e,t){if(t.has(e))throw TypeError(`Cannot initialize the same private elements twice on an object`)}function _m(e,t,n){gm(e,t),t.set(e,n)}function vm(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError(`attempted to set read only private field`);t.value=n}}function ym(e,t,n){return vm(e,mm(e,t,`set`),n),n}function bm(e){let t=(0,F.useContext)(fm);if(t){let{register:n,...r}=t;e=W(r,e),n()}return xp(t,e.ref),e}var xm=new WeakMap,Sm=class{continuePropagation(){ym(this,xm,!1)}get shouldStopPropagation(){return hm(this,xm)}constructor(e,t,n,r){_m(this,xm,{writable:!0,value:void 0}),ym(this,xm,!0);let i=(r?.target??n.currentTarget)?.getBoundingClientRect(),a,o=0,s,c=null;n.clientX!=null&&n.clientY!=null&&(s=n.clientX,c=n.clientY),i&&(s!=null&&c!=null?(a=s-i.left,o=c-i.top):(a=i.width/2,o=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=a,this.y=o}},Cm=Symbol(`linkClicked`),wm=`react-aria-pressable-style`,Tm=`data-react-aria-pressable`;function Em(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:a,onClick:o,isDisabled:s,isPressed:c,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:f,...p}=bm(e),[m,h]=(0,F.useState)(!1),g=(0,F.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:_,removeAllGlobalListeners:v}=mp(),y=K((e,t)=>{let i=g.current;if(s||i.didFirePressStart)return!1;let a=!0;if(i.isTriggeringEvent=!0,r){let n=new Sm(`pressstart`,t,e);r(n),a=n.shouldStopPropagation}return n&&n(!0),i.isTriggeringEvent=!1,i.didFirePressStart=!0,h(!0),a}),b=K((e,r,a=!0)=>{let o=g.current;if(!o.didFirePressStart)return!1;o.didFirePressStart=!1,o.isTriggeringEvent=!0;let c=!0;if(i){let t=new Sm(`pressend`,r,e);i(t),c=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&a&&!s){let n=new Sm(`press`,r,e);t(n),c&&=n.shouldStopPropagation}return o.isTriggeringEvent=!1,c}),x=K((e,t)=>{let n=g.current;if(s)return!1;if(a){n.isTriggeringEvent=!0;let r=new Sm(`pressup`,t,e);return a(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0}),S=K(e=>{let t=g.current;if(t.isPressed&&t.target){t.didFirePressStart&&t.pointerType!=null&&b(km(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||dm(t.target);for(let e of t.disposables)e();t.disposables=[]}}),C=K(e=>{u&&S(e)}),w=K(e=>{s||o?.(e)}),T=K((e,t)=>{if(!s&&o){let n=new MouseEvent(`click`,e);rm(n,t),o(nm(n))}}),E=(0,F.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(Om(t.nativeEvent,t.currentTarget)&&wf(t.currentTarget,U(t.nativeEvent))){var r;jm(U(t.nativeEvent),t.key)&&t.preventDefault();let i=!0;if(!e.isPressed&&!t.repeat){e.target=t.currentTarget,e.isPressed=!0,e.pointerType=`keyboard`,i=y(t,`keyboard`);let r=t.currentTarget;_(V(t.currentTarget),`keyup`,vf(t=>{Om(t,r)&&!t.repeat&&wf(r,U(t))&&e.target&&x(km(e.target,t),`keyboard`)},n),!0)}i&&t.stopPropagation(),t.metaKey&&Kf()&&((r=e.metaKeyEvents)==null||r.set(t.key,t.nativeEvent))}else t.key===`Meta`&&(e.metaKeyEvents=new Map)},onClick(t){if(!(t&&!wf(t.currentTarget,U(t.nativeEvent)))&&t&&t.button===0&&!e.isTriggeringEvent&&!ip.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&(e.pointerType===`virtual`||Fp(t.nativeEvent))){let e=y(t,`virtual`),r=x(t,`virtual`),i=b(t,`virtual`);w(t),n=e&&r&&i}else if(e.isPressed&&e.pointerType!==`keyboard`){let r=e.pointerType||t.nativeEvent.pointerType||`virtual`,i=x(km(t.currentTarget,t),r),a=b(km(t.currentTarget,t),r,!0);n=i&&a,e.isOverTarget=!1,w(t),S(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{var n;if(e.isPressed&&e.target&&Om(t,e.target)){var r;jm(U(t),t.key)&&t.preventDefault();let n=U(t),i=wf(e.target,U(t));b(km(e.target,t),`keyboard`,i),i&&T(t,e.target),v(),t.key!==`Enter`&&Dm(e.target)&&wf(e.target,n)&&!t[Cm]&&(t[Cm]=!0,ip(e.target,t,!1)),e.isPressed=!1,(r=e.metaKeyEvents)==null||r.delete(t.key)}else if(t.key===`Meta`&&(n=e.metaKeyEvents)!=null&&n.size){var i;let t=e.metaKeyEvents;e.metaKeyEvents=void 0;for(let n of t.values())(i=e.target)==null||i.dispatchEvent(new KeyboardEvent(`keyup`,n))}};if(typeof PointerEvent<`u`){t.onPointerDown=t=>{if(t.button!==0||!wf(t.currentTarget,U(t.nativeEvent)))return;if(Ip(t.nativeEvent)){e.pointerType=`virtual`;return}e.pointerType=t.pointerType;let i=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||um(e.target),i=y(t,e.pointerType);let a=U(t.nativeEvent);`releasePointerCapture`in a&&a.releasePointerCapture(t.pointerId),_(V(t.currentTarget),`pointerup`,n,!1),_(V(t.currentTarget),`pointercancel`,r,!1)}i&&t.stopPropagation()},t.onMouseDown=t=>{if(wf(t.currentTarget,U(t.nativeEvent))&&t.button===0){if(l){let n=om(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{!wf(t.currentTarget,U(t.nativeEvent))||e.pointerType===`virtual`||t.button===0&&!e.isPressed&&x(t,e.pointerType||t.pointerType)},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!0,y(km(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&e.pointerType!=null&&(e.isOverTarget=!1,b(km(e.target,t),e.pointerType,!1),C(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&t.button===0&&e.target){if(wf(e.target,U(t))&&e.pointerType!=null){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?S(t):(Rf(e.target),e.target.click()))},80);_(t.currentTarget,`click`,()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else S(t);e.isOverTarget=!1}},r=e=>{S(e)};t.onDragStart=e=>{wf(e.currentTarget,U(e.nativeEvent))&&S(e)}}return t},[_,s,l,v,d,S,C,b,y,x,w,T]);return(0,F.useEffect)(()=>{if(!f)return;let e=V(f.current);if(!e||!e.head||e.getElementById(wm))return;let t=e.createElement(`style`);t.id=wm,t.textContent=`
|
|
37
|
+
@layer {
|
|
38
|
+
[${Tm}] {
|
|
39
|
+
touch-action: pan-x pan-y pinch-zoom;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
`.trim(),e.head.prepend(t)},[f]),(0,F.useEffect)(()=>{let e=g.current;return()=>{d||dm(e.target??void 0);for(let t of e.disposables)t();e.disposables=[]}},[d]),{isPressed:c||m,pressProps:W(p,E,{[Tm]:!0})}}function Dm(e){return e.tagName===`A`&&e.hasAttribute(`href`)}function Om(e,t){let{key:n,code:r}=e,i=t,a=i.getAttribute(`role`);return(n===`Enter`||n===` `||n===`Spacebar`||r===`Space`)&&!(i instanceof yf(i).HTMLInputElement&&!Nm(i,n)||i instanceof yf(i).HTMLTextAreaElement||i.isContentEditable)&&!((a===`link`||!a&&Dm(i))&&n!==`Enter`)}function km(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function Am(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!==`submit`&&e.type!==`reset`:!Dm(e)}function jm(e,t){return e instanceof HTMLInputElement?!Nm(e,t):Am(e)}var Mm=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function Nm(e,t){return e.type===`checkbox`||e.type===`radio`?t===` `:Mm.has(e.type)}var Pm=null,Fm=new Set,Im=new Map,Lm=!1,Rm=!1,zm={Tab:!0,Escape:!0};function Bm(e,t){for(let n of Fm)n(e,t)}function Vm(e){return!(e.metaKey||!Kf()&&e.altKey||e.ctrlKey||e.key===`Control`||e.key===`Shift`||e.key===`Meta`)}function Hm(e){Lm=!0,Vm(e)&&(Pm=`keyboard`,Bm(`keyboard`,e))}function Um(e){Pm=`pointer`,(e.type===`mousedown`||e.type===`pointerdown`)&&(Lm=!0,Bm(`pointer`,e))}function Wm(e){Fp(e)&&(Lm=!0,Pm=`virtual`)}function Gm(e){e.target===window||e.target===document||am||!e.isTrusted||(!Lm&&!Rm&&(Pm=`virtual`,Bm(`virtual`,e)),Lm=!1,Rm=!1)}function Km(){am||(Lm=!1,Rm=!0)}function qm(e){if(typeof window>`u`||typeof document>`u`||Im.get(yf(e)))return;let t=yf(e),n=V(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Lm=!0,r.apply(this,arguments)},n.addEventListener(`keydown`,Hm,!0),n.addEventListener(`keyup`,Hm,!0),n.addEventListener(`click`,Wm,!0),t.addEventListener(`focus`,Gm,!0),t.addEventListener(`blur`,Km,!1),typeof PointerEvent<`u`&&(n.addEventListener(`pointerdown`,Um,!0),n.addEventListener(`pointermove`,Um,!0),n.addEventListener(`pointerup`,Um,!0)),t.addEventListener(`beforeunload`,()=>{Jm(e)},{once:!0}),Im.set(t,{focus:r})}var Jm=(e,t)=>{let n=yf(e),r=V(e);t&&r.removeEventListener(`DOMContentLoaded`,t),Im.has(n)&&(n.HTMLElement.prototype.focus=Im.get(n).focus,r.removeEventListener(`keydown`,Hm,!0),r.removeEventListener(`keyup`,Hm,!0),r.removeEventListener(`click`,Wm,!0),n.removeEventListener(`focus`,Gm,!0),n.removeEventListener(`blur`,Km,!1),typeof PointerEvent<`u`&&(r.removeEventListener(`pointerdown`,Um,!0),r.removeEventListener(`pointermove`,Um,!0),r.removeEventListener(`pointerup`,Um,!0)),Im.delete(n))};function Ym(e){let t=V(e),n;return t.readyState===`loading`?(n=()=>{qm(e)},t.addEventListener(`DOMContentLoaded`,n)):qm(e),()=>Jm(e,n)}typeof document<`u`&&Ym();function Xm(){return Pm!==`pointer`}function Zm(){return Pm}function Qm(){qm();let[e,t]=(0,F.useState)(Pm);return(0,F.useEffect)(()=>{let e=()=>{t(Pm)};return Fm.add(e),()=>{Fm.delete(e)}},[]),ff()?null:e}var $m=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function eh(e,t,n){let r=V(n?.target),i=typeof window<`u`?yf(n?.target).HTMLInputElement:HTMLInputElement,a=typeof window<`u`?yf(n?.target).HTMLTextAreaElement:HTMLTextAreaElement,o=typeof window<`u`?yf(n?.target).HTMLElement:HTMLElement,s=typeof window<`u`?yf(n?.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!$m.has(r.activeElement.type)||r.activeElement instanceof a||r.activeElement instanceof o&&r.activeElement.isContentEditable,!(e&&t===`keyboard`&&n instanceof s&&!zm[n.key])}function th(e,t,n){qm(),(0,F.useEffect)(()=>{let t=(t,r)=>{eh(!!n?.isTextInput,t,r)&&e(Xm())};return Fm.add(t),()=>{Fm.delete(t)}},t)}function nh(e){let t=V(e),n=H(t);if(Zm()===`virtual`){let r=n;pp(()=>{H(t)===r&&e.isConnected&&Rf(e)})}else Rf(e)}function rh(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e,a=(0,F.useCallback)(e=>{if(e.target===e.currentTarget)return r&&r(e),i&&i(!1),!0},[r,i]),o=im(a),s=(0,F.useCallback)(e=>{let t=V(e.target),r=t?H(t):H();e.target===e.currentTarget&&r===U(e.nativeEvent)&&(n&&n(e),i&&i(!0),o(e))},[i,n,o]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?a:void 0}}}function ih(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}}),t&&n.stopPropagation()}}function ah(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:ih(e.onKeyDown),onKeyUp:ih(e.onKeyUp)}}}var oh=F.createContext(null);function sh(e){let t=(0,F.useContext)(oh)||{};xp(t,e);let{ref:n,...r}=t;return r}var ch=F.forwardRef(function(e,t){let{children:n,...r}=e,i=gp(t),a={...r,ref:i};return F.createElement(oh.Provider,{value:a},n)});function lh(e,t){let{focusProps:n}=rh(e),{keyboardProps:r}=ah(e),i=W(n,r),a=sh(t),o=e.isDisabled?{}:a,s=(0,F.useRef)(e.autoFocus);(0,F.useEffect)(()=>{s.current&&t.current&&nh(t.current),s.current=!1},[t]);let c=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(c=void 0),{focusableProps:W({...i,tabIndex:c},o)}}var uh=(0,F.forwardRef)(({children:e,...t},n)=>{n=gp(n);let{focusableProps:r}=lh(t,n),i=F.Children.only(e);(0,F.useEffect)(()=>{},[n,t.isDisabled]);let a=i.ref;return F.cloneElement(i,{...W(r,i.props),ref:Af(a,n)})}),dh=F.forwardRef(({children:e,...t},n)=>{n=gp(n);let{pressProps:r}=Em({...t,ref:n}),{focusableProps:i}=lh(t,n),a=F.Children.only(e);(0,F.useEffect)(()=>{},[n,t.isDisabled]);let o=a.ref;return F.cloneElement(a,{...W(r,i,a.props),ref:Af(o,n)})}),fh=F.forwardRef(({children:e,...t},n)=>{let r=(0,F.useRef)(!1),i=(0,F.useContext)(fm);n=gp(n||i?.ref);let a=W(i||{},{...t,ref:n,register(){r.current=!0,i&&i.register()}});return xp(i,n),(0,F.useEffect)(()=>{r.current||=!0},[]),F.createElement(fm.Provider,{value:a},e)});function ph({children:e}){let t=(0,F.useMemo)(()=>({register:()=>{}}),[]);return F.createElement(fm.Provider,{value:t},e)}function mh(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,a=(0,F.useRef)({isFocusWithin:!1}),{addGlobalListener:o,removeAllGlobalListeners:s}=mp(),c=(0,F.useCallback)(e=>{e.currentTarget.contains(e.target)&&a.current.isFocusWithin&&!e.currentTarget.contains(e.relatedTarget)&&(a.current.isFocusWithin=!1,s(),n&&n(e),i&&i(!1))},[n,i,a,s]),l=im(c),u=(0,F.useCallback)(e=>{if(!e.currentTarget.contains(e.target))return;let t=V(e.target),n=H(t);if(!a.current.isFocusWithin&&n===U(e.nativeEvent)){r&&r(e),i&&i(!0),a.current.isFocusWithin=!0,l(e);let n=e.currentTarget;o(t,`focus`,e=>{if(a.current.isFocusWithin&&!wf(n,e.target)){let r=new t.defaultView.FocusEvent(`blur`,{relatedTarget:e.target});rm(r,n),c(nm(r))}},{capture:!0})}},[r,i,l,o,c]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:u,onBlur:c}}}var hh=!1,gh=0;function _h(){hh=!0,setTimeout(()=>{hh=!1},50)}function vh(e){e.pointerType===`touch`&&_h()}function yh(){if(!(typeof document>`u`))return gh===0&&typeof PointerEvent<`u`&&document.addEventListener(`pointerup`,vh),gh++,()=>{gh--,!(gh>0)&&typeof PointerEvent<`u`&&document.removeEventListener(`pointerup`,vh)}}function bh(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[a,o]=(0,F.useState)(!1),s=(0,F.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:``,target:null}).current;(0,F.useEffect)(yh,[]);let{addGlobalListener:c,removeAllGlobalListeners:l}=mp(),{hoverProps:u,triggerHoverEnd:d}=(0,F.useMemo)(()=>{let e=(e,r)=>{if(s.pointerType=r,i||r===`touch`||s.isHovered||!e.currentTarget.contains(e.target))return;s.isHovered=!0;let l=e.currentTarget;s.target=l,c(V(e.target),`pointerover`,e=>{s.isHovered&&s.target&&!wf(s.target,e.target)&&a(e,e.pointerType)},{capture:!0}),t&&t({type:`hoverstart`,target:l,pointerType:r}),n&&n(!0),o(!0)},a=(e,t)=>{let i=s.target;s.pointerType=``,s.target=null,!(t===`touch`||!s.isHovered||!i)&&(s.isHovered=!1,l(),r&&r({type:`hoverend`,target:i,pointerType:t}),n&&n(!1),o(!1))},u={};return typeof PointerEvent<`u`&&(u.onPointerEnter=t=>{hh&&t.pointerType===`mouse`||e(t,t.pointerType)},u.onPointerLeave=e=>{!i&&e.currentTarget.contains(e.target)&&a(e,e.pointerType)}),{hoverProps:u,triggerHoverEnd:a}},[t,n,r,i,s,c,l]);return(0,F.useEffect)(()=>{i&&d({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:u,isHovered:a}}function xh(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,a=(0,F.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=K(e=>{n&&Sh(e,t)&&(i&&i(e),a.current.isPointerDown=!0)}),s=K(e=>{n&&n(e)});(0,F.useEffect)(()=>{let e=a.current;if(r)return;let n=t.current,i=V(n);if(typeof PointerEvent<`u`){let n=n=>{e.isPointerDown&&Sh(n,t)&&s(n),e.isPointerDown=!1};return i.addEventListener(`pointerdown`,o,!0),i.addEventListener(`click`,n,!0),()=>{i.removeEventListener(`pointerdown`,o,!0),i.removeEventListener(`click`,n,!0)}}},[t,r,o,s])}function Sh(e,t){if(e.button>0)return!1;if(e.target){let t=e.target.ownerDocument;if(!t||!t.documentElement.contains(e.target)||e.target.closest(`[data-react-aria-top-layer]`))return!1}return t.current?!e.composedPath().includes(t.current):!1}var Ch=500;function wh(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:a=Ch,accessibilityDescription:o}=e,s=(0,F.useRef)(void 0),{addGlobalListener:c,removeGlobalListener:l}=mp(),{pressProps:u}=Em({isDisabled:t,onPressStart(e){if(e.continuePropagation(),(e.pointerType===`mouse`||e.pointerType===`touch`)&&(n&&n({...e,type:`longpressstart`}),s.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),V(e.target).activeElement!==e.target&&Rf(e.target),i&&i({...e,type:`longpress`}),s.current=void 0},a),e.pointerType===`touch`)){let t=e=>{e.preventDefault()};c(e.target,`contextmenu`,t,{once:!0}),c(window,`pointerup`,()=>{setTimeout(()=>{l(e.target,`contextmenu`,t)},30)},{once:!0})}},onPressEnd(e){s.current&&clearTimeout(s.current),r&&(e.pointerType===`mouse`||e.pointerType===`touch`)&&r({...e,type:`longpressend`})}});return{longPressProps:W(u,Ap(i&&!t?o:void 0))}}var Th=Symbol(`default`);function Eh({values:e,children:t}){for(let[n,r]of e)t=F.createElement(n.Provider,{value:r},t);return t}function Dh(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:a,defaultStyle:o,values:s}=e;return(0,F.useMemo)(()=>{let e,c,l;return e=typeof t==`function`?t({...s,defaultClassName:i}):t,c=typeof n==`function`?n({...s,defaultStyle:o||{}}):n,l=typeof r==`function`?r({...s,defaultChildren:a}):r??a,{className:e??i,style:c||o?{...o,...c}:void 0,children:l??a,"data-rac":``}},[t,n,r,i,a,o,s])}function Oh(e,t){let n=(0,F.useContext)(e);if(t===null)return null;if(n&&typeof n==`object`&&`slots`in n&&n.slots){let e=t||Th;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:`A slot prop is required.`;throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function q(e,t,n){let{ref:r,...i}=Oh(n,e.slot)||{},a=gp((0,F.useMemo)(()=>Af(t,r),[t,r])),o=W(i,e);return`style`in i&&i.style&&`style`in e&&e.style&&(typeof i.style==`function`||typeof e.style==`function`?o.style=t=>{let n=typeof i.style==`function`?i.style(t):i.style,r={...t.defaultStyle,...n},a=typeof e.style==`function`?e.style({...t,defaultStyle:r}):e.style;return{...r,...a}}:o.style={...i.style,...e.style}),[o,a]}function kh(e=!0){let[t,n]=(0,F.useState)(e),r=(0,F.useRef)(!1),i=(0,F.useCallback)(e=>{r.current=!0,n(!!e)},[]);return z(()=>{r.current||n(!1)},[]),[i,t]}var Ah=(0,F.createContext)({placement:`bottom`});(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,Ah);let n=e.placement,r={position:`absolute`,transform:n===`top`||n===`bottom`?`translateX(-50%)`:`translateY(-50%)`};n!=null&&(r[n]=`100%`);let i=Dh({...e,defaultClassName:`react-aria-OverlayArrow`,values:{placement:n}});i.style&&Object.keys(i.style).forEach(e=>i.style[e]===void 0&&delete i.style[e]);let a=G(e);return F.createElement(`div`,{...a,...i,style:{...r,...i.style},ref:t,"data-placement":n})});function jh(e,t){let n=G(e,{labelable:!0}),{hoverProps:r}=bh({onHoverStart:()=>t?.open(!0),onHoverEnd:()=>t?.close()});return{tooltipProps:W(n,r,{role:`tooltip`})}}function Mh(e,t,n){let{isDisabled:r,trigger:i}=e,a=B(),o=(0,F.useRef)(!1),s=(0,F.useRef)(!1),c=()=>{(o.current||s.current)&&t.open(s.current)},l=e=>{!o.current&&!s.current&&t.close(e)};(0,F.useEffect)(()=>{let e=e=>{n&&n.current&&e.key===`Escape`&&(e.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener(`keydown`,e,!0),()=>{document.removeEventListener(`keydown`,e,!0)}},[n,t]);let u=()=>{i!==`focus`&&(Zm()===`pointer`?o.current=!0:o.current=!1,c())},d=()=>{i!==`focus`&&(s.current=!1,o.current=!1,l())},f=()=>{s.current=!1,o.current=!1,l(!0)},p=()=>{Xm()&&(s.current=!0,c())},m=()=>{s.current=!1,o.current=!1,l(!0)},{hoverProps:h}=bh({isDisabled:r,onHoverStart:u,onHoverEnd:d}),{focusableProps:g}=lh({isDisabled:r,onFocus:p,onBlur:m},n);return{triggerProps:{"aria-describedby":t.isOpen?a:void 0,...W(g,h,{onPointerDown:f,onKeyDown:f}),tabIndex:void 0},tooltipProps:{id:a}}}var Nh={top:`top`,bottom:`top`,left:`left`,right:`left`},Ph={top:`bottom`,bottom:`top`,left:`right`,right:`left`},Fh={top:`left`,left:`top`},Ih={top:`height`,left:`width`},Lh={width:`totalWidth`,height:`totalHeight`},Rh={},zh=typeof document<`u`?window.visualViewport:null;function Bh(e){let t=0,n=0,r=0,i=0,a=0,o=0,s={},c=(zh?.scale??1)>1;if(e.tagName===`BODY`){let c=document.documentElement;r=c.clientWidth,i=c.clientHeight,t=zh?.width??r,n=zh?.height??i,s.top=c.scrollTop||e.scrollTop,s.left=c.scrollLeft||e.scrollLeft,zh&&(a=zh.offsetTop,o=zh.offsetLeft)}else ({width:t,height:n,top:a,left:o}=Zh(e,!1)),s.top=e.scrollTop,s.left=e.scrollLeft,r=t,i=n;return Zf()&&(e.tagName===`BODY`||e.tagName===`HTML`)&&c&&(s.top=0,s.left=0,a=zh?.pageTop??0,o=zh?.pageLeft??0),{width:t,height:n,totalWidth:r,totalHeight:i,scroll:s,top:a,left:o}}function Vh(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function Hh(e,t,n,r,i,a,o){let s=i.scroll[e]??0,c=r[Ih[e]],l=r.scroll[Nh[e]]+a,u=c+r.scroll[Nh[e]]-a,d=t-s+o[e]-r[Nh[e]],f=t-s+n+o[e]-r[Nh[e]];return d<l?l-d:f>u?Math.max(u-f,l-d):0}function Uh(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function Wh(e){if(Rh[e])return Rh[e];let[t,n]=e.split(` `),r=Nh[t]||`right`,i=Fh[r];Nh[n]||(n=`center`);let a=Ih[r],o=Ih[i];return Rh[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:a,crossSize:o},Rh[e]}function Gh(e,t,n,r,i,a,o,s,c,l){let{placement:u,crossPlacement:d,axis:f,crossAxis:p,size:m,crossSize:h}=r,g={};g[p]=e[p]??0,d===`center`?g[p]+=((e[h]??0)-(n[h]??0))/2:d!==p&&(g[p]+=(e[h]??0)-(n[h]??0)),g[p]+=a;let _=e[p]-n[h]+c+l,v=e[p]+e[h]-c-l;if(g[p]=tm(g[p],_,v),u===f){let n=s?o[m]:t[Lh[m]];g[Ph[f]]=Math.floor(n-e[f]+i)}else g[f]=Math.floor(e[f]+e[m]+i);return g}function Kh(e,t,n,r,i,a,o,s){let c=r?n.height:t[Lh.height],l=e.top==null?n.top+(c-(e.bottom??0)-o):n.top+e.top,u=s===`top`?Math.max(0,l+o-(t.top+(t.scroll.top??0))-((i.top??0)+(i.bottom??0)+a)):Math.max(0,t.height+t.top+(t.scroll.top??0)-l-((i.top??0)+(i.bottom??0)+a));return Math.min(t.height-a*2,u)}function qh(e,t,n,r,i,a){let{placement:o,axis:s,size:c}=a;return o===s?Math.max(0,n[s]-e[s]-(e.scroll[s]??0)+t[s]-(r[s]??0)-r[Ph[s]]-i):Math.max(0,e[c]+e[s]+e.scroll[s]-t[s]-n[s]-n[c]-(r[s]??0)-r[Ph[s]]-i)}function Jh(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){let g=Wh(e),{size:_,crossAxis:v,crossSize:y,placement:b,crossPlacement:x}=g,S=Gh(t,s,n,g,u,d,l,f,m,h),C=u,w=qh(s,l,t,i,a+u,g);if(o&&r[_]>w){let e=Wh(`${Ph[b]} ${x}`),r=Gh(t,s,n,e,u,d,l,f,m,h);qh(s,l,t,i,a+u,e)>w&&(g=e,S=r,C=u)}let T=`bottom`;g.axis===`top`?g.placement===`top`?T=`top`:g.placement===`bottom`&&(T=`bottom`):g.crossAxis===`top`&&(g.crossPlacement===`top`?T=`bottom`:g.crossPlacement===`bottom`&&(T=`top`));let E=Hh(v,S[v],n[y],s,c,a,l);S[v]+=E;let D=Kh(S,s,l,f,i,a,n.height,T);p&&p<D&&(D=p),n.height=Math.min(n.height,D),S=Gh(t,s,n,g,C,d,l,f,m,h),E=Hh(v,S[v],n[y],s,c,a,l),S[v]+=E;let O={},k=t[v]-S[v]-i[Nh[v]],A=k+.5*t[y],j=m/2+h,M=Nh[v]===`left`?(i.left??0)+(i.right??0):(i.top??0)+(i.bottom??0),N=n[y]-M-m/2-h;O[v]=tm(tm(A,t[v]+m/2-(S[v]+i[Nh[v]]),t[v]+t[y]-m/2-(S[v]+i[Nh[v]])),j,N),{placement:b,crossPlacement:x}=g,m?k=O[v]:x===`right`?k+=t[y]:x===`center`&&(k+=t[y]/2);let P=b===`left`||b===`top`?n[_]:0,ee={x:b===`top`||b===`bottom`?k:P,y:b===`left`||b===`right`?k:P};return{position:S,maxHeight:D,arrowOffsetLeft:O.left,arrowOffsetTop:O.top,placement:b,triggerAnchorPoint:ee}}function Yh(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:i,padding:a,shouldFlip:o,boundaryElement:s,offset:c,crossOffset:l,maxHeight:u,arrowSize:d=0,arrowBoundaryOffset:f=0}=e,p=r instanceof HTMLElement?$h(r):document.documentElement,m=p===document.documentElement,h=window.getComputedStyle(p).position,g=!!h&&h!==`static`,_=m?Zh(n,!1):Qh(n,p,!1);if(!m){let{marginTop:e,marginLeft:t}=window.getComputedStyle(n);_.top+=parseInt(e,10)||0,_.left+=parseInt(t,10)||0}let v=Zh(r,!0),y=Uh(r);v.width+=(y.left??0)+(y.right??0),v.height+=(y.top??0)+(y.bottom??0);let b=Vh(i),x=Bh(s),S=Bh(p),C=s.tagName===`BODY`?Zh(p,!1):Qh(p,s,!1);return p.tagName===`HTML`&&s.tagName===`BODY`&&(S.scroll.top=0,S.scroll.left=0),Jh(t,_,v,b,y,a,o,x,S,C,c,l,g,u,d,f)}function Xh(e,t){let{top:n,left:r,width:i,height:a}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(i=e.offsetWidth,a=e.offsetHeight),{top:n,left:r,width:i,height:a}}function Zh(e,t){let{top:n,left:r,width:i,height:a}=Xh(e,t),{scrollTop:o,scrollLeft:s,clientTop:c,clientLeft:l}=document.documentElement;return{top:n+o-c,left:r+s-l,width:i,height:a}}function Qh(e,t,n){let r=window.getComputedStyle(e),i;if(r.position===`fixed`)i=Xh(e,n);else{i=Zh(e,n);let r=Zh(t,n),a=window.getComputedStyle(t);r.top+=(parseInt(a.borderTopWidth,10)||0)-t.scrollTop,r.left+=(parseInt(a.borderLeftWidth,10)||0)-t.scrollLeft,i.top-=r.top,i.left-=r.left}return i.top-=parseInt(r.marginTop,10)||0,i.left-=parseInt(r.marginLeft,10)||0,i}function $h(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position===`static`&&!eg(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!eg(t);)t=t.parentElement;return t||document.documentElement}function eg(e){let t=window.getComputedStyle(e);return t.transform!==`none`||/transform|perspective/.test(t.willChange)||t.filter!==`none`||t.contain===`paint`||`backdropFilter`in t&&t.backdropFilter!==`none`||`WebkitBackdropFilter`in t&&t.WebkitBackdropFilter!==`none`}var tg=new WeakMap;function ng(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,F.useEffect)(()=>{if(!n||r===null)return;let e=e=>{let n=e.target;if(!t.current||n instanceof Node&&!n.contains(t.current)||e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let i=r||tg.get(t.current);i&&i()};return window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`scroll`,e,!0)}},[n,r,t])}var rg=new Set([`Arab`,`Syrc`,`Samr`,`Mand`,`Thaa`,`Mend`,`Nkoo`,`Adlm`,`Rohg`,`Hebr`]),ig=new Set([`ae`,`ar`,`arc`,`bcc`,`bqi`,`ckb`,`dv`,`fa`,`glk`,`he`,`ku`,`mzn`,`nqo`,`pnb`,`ps`,`sd`,`ug`,`ur`,`yi`]);function ag(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n=typeof t.getTextInfo==`function`?t.getTextInfo():t.textInfo;if(n)return n.direction===`rtl`;if(t.script)return rg.has(t.script)}let t=e.split(`-`)[0];return ig.has(t)}var og=Symbol.for(`react-aria.i18n.locale`);function sg(){let e=typeof window<`u`&&window[og]||typeof navigator<`u`&&(navigator.language||navigator.userLanguage)||`en-US`;try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e=`en-US`}return{locale:e,direction:ag(e)?`rtl`:`ltr`}}var cg=sg(),lg=new Set;function ug(){cg=sg();for(let e of lg)e(cg)}function dg(){let e=ff(),[t,n]=(0,F.useState)(cg);return(0,F.useEffect)(()=>(lg.size===0&&window.addEventListener(`languagechange`,ug),lg.add(n),()=>{lg.delete(n),lg.size===0&&window.removeEventListener(`languagechange`,ug)}),[]),e?{locale:`en-US`,direction:`ltr`}:t}var fg=F.createContext(null);function pg(){let e=dg();return(0,F.useContext)(fg)||e}var mg=function(e,t){return mg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},mg(e,t)};function hg(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);mg(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var J=function(){return J=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},J.apply(this,arguments)};function gg(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function _g(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}function vg(e,t){var n=t&&t.cache?t.cache:Og,r=t&&t.serializer?t.serializer:Eg;return(t&&t.strategy?t.strategy:Cg)(e,{cache:n,serializer:r})}function yg(e){return e==null||typeof e==`number`||typeof e==`boolean`}function bg(e,t,n,r){var i=yg(r)?r:n(r),a=t.get(i);return typeof a>`u`&&(a=e.call(this,r),t.set(i,a)),a}function xg(e,t,n){var r=Array.prototype.slice.call(arguments,3),i=n(r),a=t.get(i);return typeof a>`u`&&(a=e.apply(this,r),t.set(i,a)),a}function Sg(e,t,n,r,i){return n.bind(t,e,r,i)}function Cg(e,t){var n=e.length===1?bg:xg;return Sg(e,this,n,t.cache.create(),t.serializer)}function wg(e,t){return Sg(e,this,xg,t.cache.create(),t.serializer)}function Tg(e,t){return Sg(e,this,bg,t.cache.create(),t.serializer)}var Eg=function(){return JSON.stringify(arguments)},Dg=(function(){function e(){this.cache=Object.create(null)}return e.prototype.get=function(e){return this.cache[e]},e.prototype.set=function(e,t){this.cache[e]=t},e})(),Og={create:function(){return new Dg}},kg={variadic:wg,monadic:Tg},Y;(function(e){e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]=`EXPECT_ARGUMENT_CLOSING_BRACE`,e[e.EMPTY_ARGUMENT=2]=`EMPTY_ARGUMENT`,e[e.MALFORMED_ARGUMENT=3]=`MALFORMED_ARGUMENT`,e[e.EXPECT_ARGUMENT_TYPE=4]=`EXPECT_ARGUMENT_TYPE`,e[e.INVALID_ARGUMENT_TYPE=5]=`INVALID_ARGUMENT_TYPE`,e[e.EXPECT_ARGUMENT_STYLE=6]=`EXPECT_ARGUMENT_STYLE`,e[e.INVALID_NUMBER_SKELETON=7]=`INVALID_NUMBER_SKELETON`,e[e.INVALID_DATE_TIME_SKELETON=8]=`INVALID_DATE_TIME_SKELETON`,e[e.EXPECT_NUMBER_SKELETON=9]=`EXPECT_NUMBER_SKELETON`,e[e.EXPECT_DATE_TIME_SKELETON=10]=`EXPECT_DATE_TIME_SKELETON`,e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]=`UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`,e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]=`EXPECT_SELECT_ARGUMENT_OPTIONS`,e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]=`EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]=`INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]=`EXPECT_SELECT_ARGUMENT_SELECTOR`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]=`EXPECT_PLURAL_ARGUMENT_SELECTOR`,e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]=`EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`,e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]=`EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`,e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]=`INVALID_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]=`DUPLICATE_PLURAL_ARGUMENT_SELECTOR`,e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]=`DUPLICATE_SELECT_ARGUMENT_SELECTOR`,e[e.MISSING_OTHER_CLAUSE=22]=`MISSING_OTHER_CLAUSE`,e[e.INVALID_TAG=23]=`INVALID_TAG`,e[e.INVALID_TAG_NAME=25]=`INVALID_TAG_NAME`,e[e.UNMATCHED_CLOSING_TAG=26]=`UNMATCHED_CLOSING_TAG`,e[e.UNCLOSED_TAG=27]=`UNCLOSED_TAG`})(Y||={});var X;(function(e){e[e.literal=0]=`literal`,e[e.argument=1]=`argument`,e[e.number=2]=`number`,e[e.date=3]=`date`,e[e.time=4]=`time`,e[e.select=5]=`select`,e[e.plural=6]=`plural`,e[e.pound=7]=`pound`,e[e.tag=8]=`tag`})(X||={});var Ag;(function(e){e[e.number=0]=`number`,e[e.dateTime=1]=`dateTime`})(Ag||={});function jg(e){return e.type===X.literal}function Mg(e){return e.type===X.argument}function Ng(e){return e.type===X.number}function Pg(e){return e.type===X.date}function Fg(e){return e.type===X.time}function Ig(e){return e.type===X.select}function Lg(e){return e.type===X.plural}function Rg(e){return e.type===X.pound}function zg(e){return e.type===X.tag}function Bg(e){return!!(e&&typeof e==`object`&&e.type===Ag.number)}function Vg(e){return!!(e&&typeof e==`object`&&e.type===Ag.dateTime)}var Hg=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Ug=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function Wg(e){var t={};return e.replace(Ug,function(e){var n=e.length;switch(e[0]){case`G`:t.era=n===4?`long`:n===5?`narrow`:`short`;break;case`y`:t.year=n===2?`2-digit`:`numeric`;break;case`Y`:case`u`:case`U`:case`r`:throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case`q`:case`Q`:throw RangeError("`q/Q` (quarter) patterns are not supported");case`M`:case`L`:t.month=[`numeric`,`2-digit`,`short`,`long`,`narrow`][n-1];break;case`w`:case`W`:throw RangeError("`w/W` (week) patterns are not supported");case`d`:t.day=[`numeric`,`2-digit`][n-1];break;case`D`:case`F`:case`g`:throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case`E`:t.weekday=n===4?`long`:n===5?`narrow`:`short`;break;case`e`:if(n<4)throw RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-4];break;case`c`:if(n<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=[`short`,`long`,`narrow`,`short`][n-4];break;case`a`:t.hour12=!0;break;case`b`:case`B`:throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case`h`:t.hourCycle=`h12`,t.hour=[`numeric`,`2-digit`][n-1];break;case`H`:t.hourCycle=`h23`,t.hour=[`numeric`,`2-digit`][n-1];break;case`K`:t.hourCycle=`h11`,t.hour=[`numeric`,`2-digit`][n-1];break;case`k`:t.hourCycle=`h24`,t.hour=[`numeric`,`2-digit`][n-1];break;case`j`:case`J`:case`C`:throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case`m`:t.minute=[`numeric`,`2-digit`][n-1];break;case`s`:t.second=[`numeric`,`2-digit`][n-1];break;case`S`:case`A`:throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case`z`:t.timeZoneName=n<4?`short`:`long`;break;case`Z`:case`O`:case`v`:case`V`:case`X`:case`x`:throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return``}),t}var Gg=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function Kg(e){if(e.length===0)throw Error(`Number skeleton cannot be empty`);for(var t=e.split(Gg).filter(function(e){return e.length>0}),n=[],r=0,i=t;r<i.length;r++){var a=i[r].split(`/`);if(a.length===0)throw Error(`Invalid number skeleton`);for(var o=a[0],s=a.slice(1),c=0,l=s;c<l.length;c++)if(l[c].length===0)throw Error(`Invalid number skeleton`);n.push({stem:o,options:s})}return n}function qg(e){return e.replace(/^(.*?)-/,``)}var Jg=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,Yg=/^(@+)?(\+|#+)?[rs]?$/g,Xg=/(\*)(0+)|(#+)(0+)|(0+)/g,Zg=/^(0+)$/;function Qg(e){var t={};return e[e.length-1]===`r`?t.roundingPriority=`morePrecision`:e[e.length-1]===`s`&&(t.roundingPriority=`lessPrecision`),e.replace(Yg,function(e,n,r){return typeof r==`string`?r===`+`?t.minimumSignificantDigits=n.length:n[0]===`#`?t.maximumSignificantDigits=n.length:(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length+(typeof r==`string`?r.length:0)):(t.minimumSignificantDigits=n.length,t.maximumSignificantDigits=n.length),``}),t}function $g(e){switch(e){case`sign-auto`:return{signDisplay:`auto`};case`sign-accounting`:case`()`:return{currencySign:`accounting`};case`sign-always`:case`+!`:return{signDisplay:`always`};case`sign-accounting-always`:case`()!`:return{signDisplay:`always`,currencySign:`accounting`};case`sign-except-zero`:case`+?`:return{signDisplay:`exceptZero`};case`sign-accounting-except-zero`:case`()?`:return{signDisplay:`exceptZero`,currencySign:`accounting`};case`sign-never`:case`+_`:return{signDisplay:`never`}}}function e_(e){var t;if(e[0]===`E`&&e[1]===`E`?(t={notation:`engineering`},e=e.slice(2)):e[0]===`E`&&(t={notation:`scientific`},e=e.slice(1)),t){var n=e.slice(0,2);if(n===`+!`?(t.signDisplay=`always`,e=e.slice(2)):n===`+?`&&(t.signDisplay=`exceptZero`,e=e.slice(2)),!Zg.test(e))throw Error(`Malformed concise eng/scientific notation`);t.minimumIntegerDigits=e.length}return t}function t_(e){return $g(e)||{}}function n_(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];switch(i.stem){case`percent`:case`%`:t.style=`percent`;continue;case`%x100`:t.style=`percent`,t.scale=100;continue;case`currency`:t.style=`currency`,t.currency=i.options[0];continue;case`group-off`:case`,_`:t.useGrouping=!1;continue;case`precision-integer`:case`.`:t.maximumFractionDigits=0;continue;case`measure-unit`:case`unit`:t.style=`unit`,t.unit=qg(i.options[0]);continue;case`compact-short`:case`K`:t.notation=`compact`,t.compactDisplay=`short`;continue;case`compact-long`:case`KK`:t.notation=`compact`,t.compactDisplay=`long`;continue;case`scientific`:t=J(J(J({},t),{notation:`scientific`}),i.options.reduce(function(e,t){return J(J({},e),t_(t))},{}));continue;case`engineering`:t=J(J(J({},t),{notation:`engineering`}),i.options.reduce(function(e,t){return J(J({},e),t_(t))},{}));continue;case`notation-simple`:t.notation=`standard`;continue;case`unit-width-narrow`:t.currencyDisplay=`narrowSymbol`,t.unitDisplay=`narrow`;continue;case`unit-width-short`:t.currencyDisplay=`code`,t.unitDisplay=`short`;continue;case`unit-width-full-name`:t.currencyDisplay=`name`,t.unitDisplay=`long`;continue;case`unit-width-iso-code`:t.currencyDisplay=`symbol`;continue;case`scale`:t.scale=parseFloat(i.options[0]);continue;case`rounding-mode-floor`:t.roundingMode=`floor`;continue;case`rounding-mode-ceiling`:t.roundingMode=`ceil`;continue;case`rounding-mode-down`:t.roundingMode=`trunc`;continue;case`rounding-mode-up`:t.roundingMode=`expand`;continue;case`rounding-mode-half-even`:t.roundingMode=`halfEven`;continue;case`rounding-mode-half-down`:t.roundingMode=`halfTrunc`;continue;case`rounding-mode-half-up`:t.roundingMode=`halfExpand`;continue;case`integer-width`:if(i.options.length>1)throw RangeError(`integer-width stems only accept a single optional option`);i.options[0].replace(Xg,function(e,n,r,i,a,o){if(n)t.minimumIntegerDigits=r.length;else{if(i&&a)throw Error(`We currently do not support maximum integer digits`);if(o)throw Error(`We currently do not support exact integer digits`)}return``});continue}if(Zg.test(i.stem)){t.minimumIntegerDigits=i.stem.length;continue}if(Jg.test(i.stem)){if(i.options.length>1)throw RangeError(`Fraction-precision stems only accept a single optional option`);i.stem.replace(Jg,function(e,n,r,i,a,o){return r===`*`?t.minimumFractionDigits=n.length:i&&i[0]===`#`?t.maximumFractionDigits=i.length:a&&o?(t.minimumFractionDigits=a.length,t.maximumFractionDigits=a.length+o.length):(t.minimumFractionDigits=n.length,t.maximumFractionDigits=n.length),``});var a=i.options[0];a===`w`?t=J(J({},t),{trailingZeroDisplay:`stripIfInteger`}):a&&(t=J(J({},t),Qg(a)));continue}if(Yg.test(i.stem)){t=J(J({},t),Qg(i.stem));continue}var o=$g(i.stem);o&&(t=J(J({},t),o));var s=e_(i.stem);s&&(t=J(J({},t),s))}return t}var r_={"001":[`H`,`h`],419:[`h`,`H`,`hB`,`hb`],AC:[`H`,`h`,`hb`,`hB`],AD:[`H`,`hB`],AE:[`h`,`hB`,`hb`,`H`],AF:[`H`,`hb`,`hB`,`h`],AG:[`h`,`hb`,`H`,`hB`],AI:[`H`,`h`,`hb`,`hB`],AL:[`h`,`H`,`hB`],AM:[`H`,`hB`],AO:[`H`,`hB`],AR:[`h`,`H`,`hB`,`hb`],AS:[`h`,`H`],AT:[`H`,`hB`],AU:[`h`,`hb`,`H`,`hB`],AW:[`H`,`hB`],AX:[`H`],AZ:[`H`,`hB`,`h`],BA:[`H`,`hB`,`h`],BB:[`h`,`hb`,`H`,`hB`],BD:[`h`,`hB`,`H`],BE:[`H`,`hB`],BF:[`H`,`hB`],BG:[`H`,`hB`,`h`],BH:[`h`,`hB`,`hb`,`H`],BI:[`H`,`h`],BJ:[`H`,`hB`],BL:[`H`,`hB`],BM:[`h`,`hb`,`H`,`hB`],BN:[`hb`,`hB`,`h`,`H`],BO:[`h`,`H`,`hB`,`hb`],BQ:[`H`],BR:[`H`,`hB`],BS:[`h`,`hb`,`H`,`hB`],BT:[`h`,`H`],BW:[`H`,`h`,`hb`,`hB`],BY:[`H`,`h`],BZ:[`H`,`h`,`hb`,`hB`],CA:[`h`,`hb`,`H`,`hB`],CC:[`H`,`h`,`hb`,`hB`],CD:[`hB`,`H`],CF:[`H`,`h`,`hB`],CG:[`H`,`hB`],CH:[`H`,`hB`,`h`],CI:[`H`,`hB`],CK:[`H`,`h`,`hb`,`hB`],CL:[`h`,`H`,`hB`,`hb`],CM:[`H`,`h`,`hB`],CN:[`H`,`hB`,`hb`,`h`],CO:[`h`,`H`,`hB`,`hb`],CP:[`H`],CR:[`h`,`H`,`hB`,`hb`],CU:[`h`,`H`,`hB`,`hb`],CV:[`H`,`hB`],CW:[`H`,`hB`],CX:[`H`,`h`,`hb`,`hB`],CY:[`h`,`H`,`hb`,`hB`],CZ:[`H`],DE:[`H`,`hB`],DG:[`H`,`h`,`hb`,`hB`],DJ:[`h`,`H`],DK:[`H`],DM:[`h`,`hb`,`H`,`hB`],DO:[`h`,`H`,`hB`,`hb`],DZ:[`h`,`hB`,`hb`,`H`],EA:[`H`,`h`,`hB`,`hb`],EC:[`h`,`H`,`hB`,`hb`],EE:[`H`,`hB`],EG:[`h`,`hB`,`hb`,`H`],EH:[`h`,`hB`,`hb`,`H`],ER:[`h`,`H`],ES:[`H`,`hB`,`h`,`hb`],ET:[`hB`,`hb`,`h`,`H`],FI:[`H`],FJ:[`h`,`hb`,`H`,`hB`],FK:[`H`,`h`,`hb`,`hB`],FM:[`h`,`hb`,`H`,`hB`],FO:[`H`,`h`],FR:[`H`,`hB`],GA:[`H`,`hB`],GB:[`H`,`h`,`hb`,`hB`],GD:[`h`,`hb`,`H`,`hB`],GE:[`H`,`hB`,`h`],GF:[`H`,`hB`],GG:[`H`,`h`,`hb`,`hB`],GH:[`h`,`H`],GI:[`H`,`h`,`hb`,`hB`],GL:[`H`,`h`],GM:[`h`,`hb`,`H`,`hB`],GN:[`H`,`hB`],GP:[`H`,`hB`],GQ:[`H`,`hB`,`h`,`hb`],GR:[`h`,`H`,`hb`,`hB`],GT:[`h`,`H`,`hB`,`hb`],GU:[`h`,`hb`,`H`,`hB`],GW:[`H`,`hB`],GY:[`h`,`hb`,`H`,`hB`],HK:[`h`,`hB`,`hb`,`H`],HN:[`h`,`H`,`hB`,`hb`],HR:[`H`,`hB`],HU:[`H`,`h`],IC:[`H`,`h`,`hB`,`hb`],ID:[`H`],IE:[`H`,`h`,`hb`,`hB`],IL:[`H`,`hB`],IM:[`H`,`h`,`hb`,`hB`],IN:[`h`,`H`],IO:[`H`,`h`,`hb`,`hB`],IQ:[`h`,`hB`,`hb`,`H`],IR:[`hB`,`H`],IS:[`H`],IT:[`H`,`hB`],JE:[`H`,`h`,`hb`,`hB`],JM:[`h`,`hb`,`H`,`hB`],JO:[`h`,`hB`,`hb`,`H`],JP:[`H`,`K`,`h`],KE:[`hB`,`hb`,`H`,`h`],KG:[`H`,`h`,`hB`,`hb`],KH:[`hB`,`h`,`H`,`hb`],KI:[`h`,`hb`,`H`,`hB`],KM:[`H`,`h`,`hB`,`hb`],KN:[`h`,`hb`,`H`,`hB`],KP:[`h`,`H`,`hB`,`hb`],KR:[`h`,`H`,`hB`,`hb`],KW:[`h`,`hB`,`hb`,`H`],KY:[`h`,`hb`,`H`,`hB`],KZ:[`H`,`hB`],LA:[`H`,`hb`,`hB`,`h`],LB:[`h`,`hB`,`hb`,`H`],LC:[`h`,`hb`,`H`,`hB`],LI:[`H`,`hB`,`h`],LK:[`H`,`h`,`hB`,`hb`],LR:[`h`,`hb`,`H`,`hB`],LS:[`h`,`H`],LT:[`H`,`h`,`hb`,`hB`],LU:[`H`,`h`,`hB`],LV:[`H`,`hB`,`hb`,`h`],LY:[`h`,`hB`,`hb`,`H`],MA:[`H`,`h`,`hB`,`hb`],MC:[`H`,`hB`],MD:[`H`,`hB`],ME:[`H`,`hB`,`h`],MF:[`H`,`hB`],MG:[`H`,`h`],MH:[`h`,`hb`,`H`,`hB`],MK:[`H`,`h`,`hb`,`hB`],ML:[`H`],MM:[`hB`,`hb`,`H`,`h`],MN:[`H`,`h`,`hb`,`hB`],MO:[`h`,`hB`,`hb`,`H`],MP:[`h`,`hb`,`H`,`hB`],MQ:[`H`,`hB`],MR:[`h`,`hB`,`hb`,`H`],MS:[`H`,`h`,`hb`,`hB`],MT:[`H`,`h`],MU:[`H`,`h`],MV:[`H`,`h`],MW:[`h`,`hb`,`H`,`hB`],MX:[`h`,`H`,`hB`,`hb`],MY:[`hb`,`hB`,`h`,`H`],MZ:[`H`,`hB`],NA:[`h`,`H`,`hB`,`hb`],NC:[`H`,`hB`],NE:[`H`],NF:[`H`,`h`,`hb`,`hB`],NG:[`H`,`h`,`hb`,`hB`],NI:[`h`,`H`,`hB`,`hb`],NL:[`H`,`hB`],NO:[`H`,`h`],NP:[`H`,`h`,`hB`],NR:[`H`,`h`,`hb`,`hB`],NU:[`H`,`h`,`hb`,`hB`],NZ:[`h`,`hb`,`H`,`hB`],OM:[`h`,`hB`,`hb`,`H`],PA:[`h`,`H`,`hB`,`hb`],PE:[`h`,`H`,`hB`,`hb`],PF:[`H`,`h`,`hB`],PG:[`h`,`H`],PH:[`h`,`hB`,`hb`,`H`],PK:[`h`,`hB`,`H`],PL:[`H`,`h`],PM:[`H`,`hB`],PN:[`H`,`h`,`hb`,`hB`],PR:[`h`,`H`,`hB`,`hb`],PS:[`h`,`hB`,`hb`,`H`],PT:[`H`,`hB`],PW:[`h`,`H`],PY:[`h`,`H`,`hB`,`hb`],QA:[`h`,`hB`,`hb`,`H`],RE:[`H`,`hB`],RO:[`H`,`hB`],RS:[`H`,`hB`,`h`],RU:[`H`],RW:[`H`,`h`],SA:[`h`,`hB`,`hb`,`H`],SB:[`h`,`hb`,`H`,`hB`],SC:[`H`,`h`,`hB`],SD:[`h`,`hB`,`hb`,`H`],SE:[`H`],SG:[`h`,`hb`,`H`,`hB`],SH:[`H`,`h`,`hb`,`hB`],SI:[`H`,`hB`],SJ:[`H`],SK:[`H`],SL:[`h`,`hb`,`H`,`hB`],SM:[`H`,`h`,`hB`],SN:[`H`,`h`,`hB`],SO:[`h`,`H`],SR:[`H`,`hB`],SS:[`h`,`hb`,`H`,`hB`],ST:[`H`,`hB`],SV:[`h`,`H`,`hB`,`hb`],SX:[`H`,`h`,`hb`,`hB`],SY:[`h`,`hB`,`hb`,`H`],SZ:[`h`,`hb`,`H`,`hB`],TA:[`H`,`h`,`hb`,`hB`],TC:[`h`,`hb`,`H`,`hB`],TD:[`h`,`H`,`hB`],TF:[`H`,`h`,`hB`],TG:[`H`,`hB`],TH:[`H`,`h`],TJ:[`H`,`h`],TL:[`H`,`hB`,`hb`,`h`],TM:[`H`,`h`],TN:[`h`,`hB`,`hb`,`H`],TO:[`h`,`H`],TR:[`H`,`hB`],TT:[`h`,`hb`,`H`,`hB`],TW:[`hB`,`hb`,`h`,`H`],TZ:[`hB`,`hb`,`H`,`h`],UA:[`H`,`hB`,`h`],UG:[`hB`,`hb`,`H`,`h`],UM:[`h`,`hb`,`H`,`hB`],US:[`h`,`hb`,`H`,`hB`],UY:[`h`,`H`,`hB`,`hb`],UZ:[`H`,`hB`,`h`],VA:[`H`,`h`,`hB`],VC:[`h`,`hb`,`H`,`hB`],VE:[`h`,`H`,`hB`,`hb`],VG:[`h`,`hb`,`H`,`hB`],VI:[`h`,`hb`,`H`,`hB`],VN:[`H`,`h`],VU:[`h`,`H`],WF:[`H`,`hB`],WS:[`h`,`H`],XK:[`H`,`hB`,`h`],YE:[`h`,`hB`,`hb`,`H`],YT:[`H`,`hB`],ZA:[`H`,`h`,`hb`,`hB`],ZM:[`h`,`hb`,`H`,`hB`],ZW:[`H`,`h`],"af-ZA":[`H`,`h`,`hB`,`hb`],"ar-001":[`h`,`hB`,`hb`,`H`],"ca-ES":[`H`,`h`,`hB`],"en-001":[`h`,`hb`,`H`,`hB`],"en-HK":[`h`,`hb`,`H`,`hB`],"en-IL":[`H`,`h`,`hb`,`hB`],"en-MY":[`h`,`hb`,`H`,`hB`],"es-BR":[`H`,`h`,`hB`,`hb`],"es-ES":[`H`,`h`,`hB`,`hb`],"es-GQ":[`H`,`h`,`hB`,`hb`],"fr-CA":[`H`,`h`,`hB`],"gl-ES":[`H`,`h`,`hB`],"gu-IN":[`hB`,`hb`,`h`,`H`],"hi-IN":[`hB`,`h`,`H`],"it-CH":[`H`,`h`,`hB`],"it-IT":[`H`,`h`,`hB`],"kn-IN":[`hB`,`h`,`H`],"ml-IN":[`hB`,`h`,`H`],"mr-IN":[`hB`,`hb`,`h`,`H`],"pa-IN":[`hB`,`hb`,`h`,`H`],"ta-IN":[`hB`,`h`,`hb`,`H`],"te-IN":[`hB`,`h`,`H`],"zu-ZA":[`H`,`hB`,`hb`,`h`]};function i_(e,t){for(var n=``,r=0;r<e.length;r++){var i=e.charAt(r);if(i===`j`){for(var a=0;r+1<e.length&&e.charAt(r+1)===i;)a++,r++;var o=1+(a&1),s=a<2?1:3+(a>>1),c=`a`,l=a_(t);for((l==`H`||l==`k`)&&(s=0);s-- >0;)n+=c;for(;o-- >0;)n=l+n}else i===`J`?n+=`H`:n+=i}return n}function a_(e){var t=e.hourCycle;if(t===void 0&&e.hourCycles&&e.hourCycles.length&&(t=e.hourCycles[0]),t)switch(t){case`h24`:return`k`;case`h23`:return`H`;case`h12`:return`h`;case`h11`:return`K`;default:throw Error(`Invalid hourCycle`)}var n=e.language,r;return n!==`root`&&(r=e.maximize().region),(r_[r||``]||r_[n||``]||r_[`${n}-001`]||r_[`001`])[0]}var o_=RegExp(`^${Hg.source}*`),s_=RegExp(`${Hg.source}*\$`);function Z(e,t){return{start:e,end:t}}var c_=!!String.prototype.startsWith&&`_a`.startsWith(`a`,1),l_=!!String.fromCodePoint,u_=!!Object.fromEntries,d_=!!String.prototype.codePointAt,f_=!!String.prototype.trimStart,p_=!!String.prototype.trimEnd,m_=Number.isSafeInteger?Number.isSafeInteger:function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e&&Math.abs(e)<=9007199254740991},h_=!0;try{g_=C_(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`),h_=g_.exec(`a`)?.[0]===`a`}catch{h_=!1}var g_,__=c_?(function(e,t,n){return e.startsWith(t,n)}):(function(e,t,n){return e.slice(n,n+t.length)===t}),v_=l_?String.fromCodePoint:(function(){for(var e=[...arguments],t=``,n=e.length,r=0,i;n>r;){if(i=e[r++],i>1114111)throw RangeError(i+` is not a valid code point`);t+=i<65536?String.fromCharCode(i):String.fromCharCode(((i-=65536)>>10)+55296,i%1024+56320)}return t}),y_=u_?Object.fromEntries:(function(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n],a=i[0];t[a]=i[1]}return t}),b_=d_?(function(e,t){return e.codePointAt(t)}):(function(e,t){var n=e.length;if(!(t<0||t>=n)){var r=e.charCodeAt(t),i;return r<55296||r>56319||t+1===n||(i=e.charCodeAt(t+1))<56320||i>57343?r:(r-55296<<10)+(i-56320)+65536}}),x_=f_?(function(e){return e.trimStart()}):(function(e){return e.replace(o_,``)}),S_=p_?(function(e){return e.trimEnd()}):(function(e){return e.replace(s_,``)});function C_(e,t){return new RegExp(e,t)}var w_;h_?(T_=C_(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`,`yu`),w_=function(e,t){return T_.lastIndex=t,T_.exec(e)[1]??``}):w_=function(e,t){for(var n=[];;){var r=b_(e,t);if(r===void 0||A_(r)||j_(r))break;n.push(r),t+=r>=65536?2:1}return v_.apply(void 0,n)};var T_,E_=(function(){function e(e,t){t===void 0&&(t={}),this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}return e.prototype.parse=function(){if(this.offset()!==0)throw Error(`parser can only be used once`);return this.parseMessage(0,``,!1)},e.prototype.parseMessage=function(e,t,n){for(var r=[];!this.isEOF();){var i=this.char();if(i===123){var a=this.parseArgument(e,n);if(a.err)return a;r.push(a.val)}else{if(i===125&&e>0)break;if(i===35&&(t===`plural`||t===`selectordinal`)){var o=this.clonePosition();this.bump(),r.push({type:X.pound,location:Z(o,this.clonePosition())})}else if(i===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(Y.UNMATCHED_CLOSING_TAG,Z(this.clonePosition(),this.clonePosition()))}else if(i===60&&!this.ignoreTag&&D_(this.peek()||0)){var a=this.parseTag(e,t);if(a.err)return a;r.push(a.val)}else{var a=this.parseLiteral(e,t);if(a.err)return a;r.push(a.val)}}}return{val:r,err:null}},e.prototype.parseTag=function(e,t){var n=this.clonePosition();this.bump();var r=this.parseTagName();if(this.bumpSpace(),this.bumpIf(`/>`))return{val:{type:X.literal,value:`<${r}/>`,location:Z(n,this.clonePosition())},err:null};if(this.bumpIf(`>`)){var i=this.parseMessage(e+1,t,!0);if(i.err)return i;var a=i.val,o=this.clonePosition();if(this.bumpIf(`</`)){if(this.isEOF()||!D_(this.char()))return this.error(Y.INVALID_TAG,Z(o,this.clonePosition()));var s=this.clonePosition();return r===this.parseTagName()?(this.bumpSpace(),this.bumpIf(`>`)?{val:{type:X.tag,value:r,children:a,location:Z(n,this.clonePosition())},err:null}:this.error(Y.INVALID_TAG,Z(o,this.clonePosition()))):this.error(Y.UNMATCHED_CLOSING_TAG,Z(s,this.clonePosition()))}else return this.error(Y.UNCLOSED_TAG,Z(n,this.clonePosition()))}else return this.error(Y.INVALID_TAG,Z(n,this.clonePosition()))},e.prototype.parseTagName=function(){var e=this.offset();for(this.bump();!this.isEOF()&&k_(this.char());)this.bump();return this.message.slice(e,this.offset())},e.prototype.parseLiteral=function(e,t){for(var n=this.clonePosition(),r=``;;){var i=this.tryParseQuote(t);if(i){r+=i;continue}var a=this.tryParseUnquoted(e,t);if(a){r+=a;continue}var o=this.tryParseLeftAngleBracket();if(o){r+=o;continue}break}var s=Z(n,this.clonePosition());return{val:{type:X.literal,value:r,location:s},err:null}},e.prototype.tryParseLeftAngleBracket=function(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!O_(this.peek()||0))?(this.bump(),`<`):null},e.prototype.tryParseQuote=function(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),`'`;case 123:case 60:case 62:case 125:break;case 35:if(e===`plural`||e===`selectordinal`)break;return null;default:return null}this.bump();var t=[this.char()];for(this.bump();!this.isEOF();){var n=this.char();if(n===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(n);this.bump()}return v_.apply(void 0,t)},e.prototype.tryParseUnquoted=function(e,t){if(this.isEOF())return null;var n=this.char();return n===60||n===123||n===35&&(t===`plural`||t===`selectordinal`)||n===125&&e>0?null:(this.bump(),v_(n))},e.prototype.parseArgument=function(e,t){var n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(Y.EMPTY_ARGUMENT,Z(n,this.clonePosition()));var r=this.parseIdentifierIfPossible().value;if(!r)return this.error(Y.MALFORMED_ARGUMENT,Z(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:X.argument,value:r,location:Z(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(Y.MALFORMED_ARGUMENT,Z(n,this.clonePosition()))}},e.prototype.parseIdentifierIfPossible=function(){var e=this.clonePosition(),t=this.offset(),n=w_(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Z(e,this.clonePosition())}},e.prototype.parseArgumentOptions=function(e,t,n,r){var i=this.clonePosition(),a=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(a){case``:return this.error(Y.EXPECT_ARGUMENT_TYPE,Z(i,o));case`number`:case`date`:case`time`:this.bumpSpace();var s=null;if(this.bumpIf(`,`)){this.bumpSpace();var c=this.clonePosition(),l=this.parseSimpleArgStyleIfPossible();if(l.err)return l;var u=S_(l.val);if(u.length===0)return this.error(Y.EXPECT_ARGUMENT_STYLE,Z(this.clonePosition(),this.clonePosition()));s={style:u,styleLocation:Z(c,this.clonePosition())}}var d=this.tryParseArgumentClose(r);if(d.err)return d;var f=Z(r,this.clonePosition());if(s&&__(s?.style,`::`,0)){var p=x_(s.style.slice(2));if(a===`number`){var l=this.parseNumberSkeletonFromString(p,s.styleLocation);return l.err?l:{val:{type:X.number,value:n,location:f,style:l.val},err:null}}else{if(p.length===0)return this.error(Y.EXPECT_DATE_TIME_SKELETON,f);var m=p;this.locale&&(m=i_(p,this.locale));var u={type:Ag.dateTime,pattern:m,location:s.styleLocation,parsedOptions:this.shouldParseSkeletons?Wg(m):{}};return{val:{type:a===`date`?X.date:X.time,value:n,location:f,style:u},err:null}}}return{val:{type:a===`number`?X.number:a===`date`?X.date:X.time,value:n,location:f,style:s?.style??null},err:null};case`plural`:case`selectordinal`:case`select`:var h=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(`,`))return this.error(Y.EXPECT_SELECT_ARGUMENT_OPTIONS,Z(h,J({},h)));this.bumpSpace();var g=this.parseIdentifierIfPossible(),_=0;if(a!==`select`&&g.value===`offset`){if(!this.bumpIf(`:`))return this.error(Y.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Z(this.clonePosition(),this.clonePosition()));this.bumpSpace();var l=this.tryParseDecimalInteger(Y.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,Y.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(l.err)return l;this.bumpSpace(),g=this.parseIdentifierIfPossible(),_=l.val}var v=this.tryParsePluralOrSelectOptions(e,a,t,g);if(v.err)return v;var d=this.tryParseArgumentClose(r);if(d.err)return d;var y=Z(r,this.clonePosition());return a===`select`?{val:{type:X.select,value:n,options:y_(v.val),location:y},err:null}:{val:{type:X.plural,value:n,options:y_(v.val),offset:_,pluralType:a===`plural`?`cardinal`:`ordinal`,location:y},err:null};default:return this.error(Y.INVALID_ARGUMENT_TYPE,Z(i,o))}},e.prototype.tryParseArgumentClose=function(e){return this.isEOF()||this.char()!==125?this.error(Y.EXPECT_ARGUMENT_CLOSING_BRACE,Z(e,this.clonePosition())):(this.bump(),{val:!0,err:null})},e.prototype.parseSimpleArgStyleIfPossible=function(){for(var e=0,t=this.clonePosition();!this.isEOF();)switch(this.char()){case 39:this.bump();var n=this.clonePosition();if(!this.bumpUntil(`'`))return this.error(Y.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,Z(n,this.clonePosition()));this.bump();break;case 123:e+=1,this.bump();break;case 125:if(e>0)--e;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump();break}return{val:this.message.slice(t.offset,this.offset()),err:null}},e.prototype.parseNumberSkeletonFromString=function(e,t){var n=[];try{n=Kg(e)}catch{return this.error(Y.INVALID_NUMBER_SKELETON,t)}return{val:{type:Ag.number,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?n_(n):{}},err:null}},e.prototype.tryParsePluralOrSelectOptions=function(e,t,n,r){for(var i,a=!1,o=[],s=new Set,c=r.value,l=r.location;;){if(c.length===0){var u=this.clonePosition();if(t!==`select`&&this.bumpIf(`=`)){var d=this.tryParseDecimalInteger(Y.EXPECT_PLURAL_ARGUMENT_SELECTOR,Y.INVALID_PLURAL_ARGUMENT_SELECTOR);if(d.err)return d;l=Z(u,this.clonePosition()),c=this.message.slice(u.offset,this.offset())}else break}if(s.has(c))return this.error(t===`select`?Y.DUPLICATE_SELECT_ARGUMENT_SELECTOR:Y.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,l);c===`other`&&(a=!0),this.bumpSpace();var f=this.clonePosition();if(!this.bumpIf(`{`))return this.error(t===`select`?Y.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:Y.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,Z(this.clonePosition(),this.clonePosition()));var p=this.parseMessage(e+1,t,n);if(p.err)return p;var m=this.tryParseArgumentClose(f);if(m.err)return m;o.push([c,{value:p.val,location:Z(f,this.clonePosition())}]),s.add(c),this.bumpSpace(),i=this.parseIdentifierIfPossible(),c=i.value,l=i.location}return o.length===0?this.error(t===`select`?Y.EXPECT_SELECT_ARGUMENT_SELECTOR:Y.EXPECT_PLURAL_ARGUMENT_SELECTOR,Z(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!a?this.error(Y.MISSING_OTHER_CLAUSE,Z(this.clonePosition(),this.clonePosition())):{val:o,err:null}},e.prototype.tryParseDecimalInteger=function(e,t){var n=1,r=this.clonePosition();this.bumpIf(`+`)||this.bumpIf(`-`)&&(n=-1);for(var i=!1,a=0;!this.isEOF();){var o=this.char();if(o>=48&&o<=57)i=!0,a=a*10+(o-48),this.bump();else break}var s=Z(r,this.clonePosition());return i?(a*=n,m_(a)?{val:a,err:null}:this.error(t,s)):this.error(e,s)},e.prototype.offset=function(){return this.position.offset},e.prototype.isEOF=function(){return this.offset()===this.message.length},e.prototype.clonePosition=function(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}},e.prototype.char=function(){var e=this.position.offset;if(e>=this.message.length)throw Error(`out of bound`);var t=b_(this.message,e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t},e.prototype.error=function(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}},e.prototype.bump=function(){if(!this.isEOF()){var e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}},e.prototype.bumpIf=function(e){if(__(this.message,e,this.offset())){for(var t=0;t<e.length;t++)this.bump();return!0}return!1},e.prototype.bumpUntil=function(e){var t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)},e.prototype.bumpTo=function(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){var t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}},e.prototype.bumpSpace=function(){for(;!this.isEOF()&&A_(this.char());)this.bump()},e.prototype.peek=function(){if(this.isEOF())return null;var e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null},e})();function D_(e){return e>=97&&e<=122||e>=65&&e<=90}function O_(e){return D_(e)||e===47}function k_(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function A_(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function j_(e){return e>=33&&e<=35||e===36||e>=37&&e<=39||e===40||e===41||e===42||e===43||e===44||e===45||e>=46&&e<=47||e>=58&&e<=59||e>=60&&e<=62||e>=63&&e<=64||e===91||e===92||e===93||e===94||e===96||e===123||e===124||e===125||e===126||e===161||e>=162&&e<=165||e===166||e===167||e===169||e===171||e===172||e===174||e===176||e===177||e===182||e===187||e===191||e===215||e===247||e>=8208&&e<=8213||e>=8214&&e<=8215||e===8216||e===8217||e===8218||e>=8219&&e<=8220||e===8221||e===8222||e===8223||e>=8224&&e<=8231||e>=8240&&e<=8248||e===8249||e===8250||e>=8251&&e<=8254||e>=8257&&e<=8259||e===8260||e===8261||e===8262||e>=8263&&e<=8273||e===8274||e===8275||e>=8277&&e<=8286||e>=8592&&e<=8596||e>=8597&&e<=8601||e>=8602&&e<=8603||e>=8604&&e<=8607||e===8608||e>=8609&&e<=8610||e===8611||e>=8612&&e<=8613||e===8614||e>=8615&&e<=8621||e===8622||e>=8623&&e<=8653||e>=8654&&e<=8655||e>=8656&&e<=8657||e===8658||e===8659||e===8660||e>=8661&&e<=8691||e>=8692&&e<=8959||e>=8960&&e<=8967||e===8968||e===8969||e===8970||e===8971||e>=8972&&e<=8991||e>=8992&&e<=8993||e>=8994&&e<=9e3||e===9001||e===9002||e>=9003&&e<=9083||e===9084||e>=9085&&e<=9114||e>=9115&&e<=9139||e>=9140&&e<=9179||e>=9180&&e<=9185||e>=9186&&e<=9254||e>=9255&&e<=9279||e>=9280&&e<=9290||e>=9291&&e<=9311||e>=9472&&e<=9654||e===9655||e>=9656&&e<=9664||e===9665||e>=9666&&e<=9719||e>=9720&&e<=9727||e>=9728&&e<=9838||e===9839||e>=9840&&e<=10087||e===10088||e===10089||e===10090||e===10091||e===10092||e===10093||e===10094||e===10095||e===10096||e===10097||e===10098||e===10099||e===10100||e===10101||e>=10132&&e<=10175||e>=10176&&e<=10180||e===10181||e===10182||e>=10183&&e<=10213||e===10214||e===10215||e===10216||e===10217||e===10218||e===10219||e===10220||e===10221||e===10222||e===10223||e>=10224&&e<=10239||e>=10240&&e<=10495||e>=10496&&e<=10626||e===10627||e===10628||e===10629||e===10630||e===10631||e===10632||e===10633||e===10634||e===10635||e===10636||e===10637||e===10638||e===10639||e===10640||e===10641||e===10642||e===10643||e===10644||e===10645||e===10646||e===10647||e===10648||e>=10649&&e<=10711||e===10712||e===10713||e===10714||e===10715||e>=10716&&e<=10747||e===10748||e===10749||e>=10750&&e<=11007||e>=11008&&e<=11055||e>=11056&&e<=11076||e>=11077&&e<=11078||e>=11079&&e<=11084||e>=11085&&e<=11123||e>=11124&&e<=11125||e>=11126&&e<=11157||e===11158||e>=11159&&e<=11263||e>=11776&&e<=11777||e===11778||e===11779||e===11780||e===11781||e>=11782&&e<=11784||e===11785||e===11786||e===11787||e===11788||e===11789||e>=11790&&e<=11798||e===11799||e>=11800&&e<=11801||e===11802||e===11803||e===11804||e===11805||e>=11806&&e<=11807||e===11808||e===11809||e===11810||e===11811||e===11812||e===11813||e===11814||e===11815||e===11816||e===11817||e>=11818&&e<=11822||e===11823||e>=11824&&e<=11833||e>=11834&&e<=11835||e>=11836&&e<=11839||e===11840||e===11841||e===11842||e>=11843&&e<=11855||e>=11856&&e<=11857||e===11858||e>=11859&&e<=11903||e>=12289&&e<=12291||e===12296||e===12297||e===12298||e===12299||e===12300||e===12301||e===12302||e===12303||e===12304||e===12305||e>=12306&&e<=12307||e===12308||e===12309||e===12310||e===12311||e===12312||e===12313||e===12314||e===12315||e===12316||e===12317||e>=12318&&e<=12319||e===12320||e===12336||e===64830||e===64831||e>=65093&&e<=65094}function M_(e){e.forEach(function(e){if(delete e.location,Ig(e)||Lg(e))for(var t in e.options)delete e.options[t].location,M_(e.options[t].value);else Ng(e)&&Bg(e.style)||(Pg(e)||Fg(e))&&Vg(e.style)?delete e.style.location:zg(e)&&M_(e.children)})}function N_(e,t){t===void 0&&(t={}),t=J({shouldParseSkeletons:!0,requiresOtherClause:!0},t);var n=new E_(e,t).parse();if(n.err){var r=SyntaxError(Y[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t?.captureLocation||M_(n.val),n.val}var P_;(function(e){e.MISSING_VALUE=`MISSING_VALUE`,e.INVALID_VALUE=`INVALID_VALUE`,e.MISSING_INTL_API=`MISSING_INTL_API`})(P_||={});var F_=(function(e){hg(t,e);function t(t,n,r){var i=e.call(this,t)||this;return i.code=n,i.originalMessage=r,i}return t.prototype.toString=function(){return`[formatjs Error: ${this.code}] ${this.message}`},t})(Error),I_=(function(e){hg(t,e);function t(t,n,r,i){return e.call(this,`Invalid values for "${t}": "${n}". Options are "${Object.keys(r).join(`", "`)}"`,P_.INVALID_VALUE,i)||this}return t})(F_),L_=(function(e){hg(t,e);function t(t,n,r){return e.call(this,`Value for "${t}" must be of type ${n}`,P_.INVALID_VALUE,r)||this}return t})(F_),R_=(function(e){hg(t,e);function t(t,n){return e.call(this,`The intl string context variable "${t}" was not provided to the string "${n}"`,P_.MISSING_VALUE,n)||this}return t})(F_),z_;(function(e){e[e.literal=0]=`literal`,e[e.object=1]=`object`})(z_||={});function B_(e){return e.length<2?e:e.reduce(function(e,t){var n=e[e.length-1];return!n||n.type!==z_.literal||t.type!==z_.literal?e.push(t):n.value+=t.value,e},[])}function V_(e){return typeof e==`function`}function H_(e,t,n,r,i,a,o){if(e.length===1&&jg(e[0]))return[{type:z_.literal,value:e[0].value}];for(var s=[],c=0,l=e;c<l.length;c++){var u=l[c];if(jg(u)){s.push({type:z_.literal,value:u.value});continue}if(Rg(u)){typeof a==`number`&&s.push({type:z_.literal,value:n.getNumberFormat(t).format(a)});continue}var d=u.value;if(!(i&&d in i))throw new R_(d,o);var f=i[d];if(Mg(u)){(!f||typeof f==`string`||typeof f==`number`)&&(f=typeof f==`string`||typeof f==`number`?String(f):``),s.push({type:typeof f==`string`?z_.literal:z_.object,value:f});continue}if(Pg(u)){var p=typeof u.style==`string`?r.date[u.style]:Vg(u.style)?u.style.parsedOptions:void 0;s.push({type:z_.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(Fg(u)){var p=typeof u.style==`string`?r.time[u.style]:Vg(u.style)?u.style.parsedOptions:r.time.medium;s.push({type:z_.literal,value:n.getDateTimeFormat(t,p).format(f)});continue}if(Ng(u)){var p=typeof u.style==`string`?r.number[u.style]:Bg(u.style)?u.style.parsedOptions:void 0;p&&p.scale&&(f*=p.scale||1),s.push({type:z_.literal,value:n.getNumberFormat(t,p).format(f)});continue}if(zg(u)){var m=u.children,h=u.value,g=i[h];if(!V_(g))throw new L_(h,`function`,o);var _=g(H_(m,t,n,r,i,a).map(function(e){return e.value}));Array.isArray(_)||(_=[_]),s.push.apply(s,_.map(function(e){return{type:typeof e==`string`?z_.literal:z_.object,value:e}}))}if(Ig(u)){var v=u.options[f]||u.options.other;if(!v)throw new I_(u.value,f,Object.keys(u.options),o);s.push.apply(s,H_(v.value,t,n,r,i));continue}if(Lg(u)){var v=u.options[`=${f}`];if(!v){if(!Intl.PluralRules)throw new F_(`Intl.PluralRules is not available in this environment.
|
|
43
|
+
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
44
|
+
`,P_.MISSING_INTL_API,o);var y=n.getPluralRules(t,{type:u.pluralType}).select(f-(u.offset||0));v=u.options[y]||u.options.other}if(!v)throw new I_(u.value,f,Object.keys(u.options),o);s.push.apply(s,H_(v.value,t,n,r,i,f-(u.offset||0)));continue}}return B_(s)}function U_(e,t){return t?J(J(J({},e||{}),t||{}),Object.keys(e).reduce(function(n,r){return n[r]=J(J({},e[r]),t[r]||{}),n},{})):e}function W_(e,t){return t?Object.keys(e).reduce(function(n,r){return n[r]=U_(e[r],t[r]),n},J({},e)):e}function G_(e){return{create:function(){return{get:function(t){return e[t]},set:function(t,n){e[t]=n}}}}}function K_(e){return e===void 0&&(e={number:{},dateTime:{},pluralRules:{}}),{getNumberFormat:vg(function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.NumberFormat).bind.apply(e,_g([void 0],t,!1)))},{cache:G_(e.number),strategy:kg.variadic}),getDateTimeFormat:vg(function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.DateTimeFormat).bind.apply(e,_g([void 0],t,!1)))},{cache:G_(e.dateTime),strategy:kg.variadic}),getPluralRules:vg(function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return new((e=Intl.PluralRules).bind.apply(e,_g([void 0],t,!1)))},{cache:G_(e.pluralRules),strategy:kg.variadic})}}(function(){function e(t,n,r,i){n===void 0&&(n=e.defaultLocale);var a=this;if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=function(e){var t=a.formatToParts(e);if(t.length===1)return t[0].value;var n=t.reduce(function(e,t){return!e.length||t.type!==z_.literal||typeof e[e.length-1]!=`string`?e.push(t.value):e[e.length-1]+=t.value,e},[]);return n.length<=1?n[0]||``:n},this.formatToParts=function(e){return H_(a.ast,a.locales,a.formatters,a.formats,e,void 0,a.message)},this.resolvedOptions=function(){return{locale:a.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(a.locales)[0]}},this.getAst=function(){return a.ast},this.locales=n,this.resolvedLocale=e.resolveLocale(n),typeof t==`string`){if(this.message=t,!e.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");var o=i||{};o.formatters;var s=gg(o,[`formatters`]);this.ast=e.__parse(t,J(J({},s),{locale:this.resolvedLocale}))}else this.ast=t;if(!Array.isArray(this.ast))throw TypeError(`A message must be provided as a String or AST.`);this.formats=W_(e.formats,r),this.formatters=i&&i.formatters||K_(this.formatterCache)}return Object.defineProperty(e,`defaultLocale`,{get:function(){return e.memoizedDefaultLocale||=new Intl.NumberFormat().resolvedOptions().locale,e.memoizedDefaultLocale},enumerable:!1,configurable:!0}),e.memoizedDefaultLocale=null,e.resolveLocale=function(e){if(!(typeof Intl.Locale>`u`)){var t=Intl.NumberFormat.supportedLocalesOf(e);return t.length>0?new Intl.Locale(t[0]):new Intl.Locale(typeof e==`string`?e:e[0])}},e.__parse=N_,e.formats={number:{integer:{maximumFractionDigits:0},currency:{style:`currency`},percent:{style:`percent`}},date:{short:{month:`numeric`,day:`numeric`,year:`2-digit`},medium:{month:`short`,day:`numeric`,year:`numeric`},long:{month:`long`,day:`numeric`,year:`numeric`},full:{weekday:`long`,month:`long`,day:`numeric`,year:`numeric`}},time:{short:{hour:`numeric`,minute:`numeric`},medium:{hour:`numeric`,minute:`numeric`,second:`numeric`},long:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`},full:{hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`short`}}},e})();var q_=Symbol.for(`react-aria.i18n.locale`),J_=Symbol.for(`react-aria.i18n.strings`),Y_,X_=class e{getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=Z_(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(t){if(typeof window>`u`)return null;let n=window[q_];if(Y_===void 0){let t=window[J_];if(!t)return null;Y_={};for(let r in t)Y_[r]=new e({[n]:t[r]},n)}let r=Y_?.[t];if(!r)throw Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(e,t=`en-US`){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}};function Z_(e,t,n=`en-US`){if(t[e])return t[e];let r=Q_(e);if(t[r])return t[r];for(let e in t)if(e.startsWith(r+`-`))return t[e];return t[n]}function Q_(e){return Intl.Locale?new Intl.Locale(e).language:e.split(`-`)[0]}var $_=new Map,ev=new Map,tv=class{format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return typeof n==`function`?n(t,this):n}plural(e,t,n=`cardinal`){let r=t[`=`+e];if(r)return typeof r==`function`?r():r;let i=this.locale+`:`+n,a=$_.get(i);return a||(a=new Intl.PluralRules(this.locale,{type:n}),$_.set(i,a)),r=t[a.select(e)]||t.other,typeof r==`function`?r():r}number(e){let t=ev.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),ev.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return typeof n==`function`?n():n}constructor(e,t){this.locale=e,this.strings=t}},nv=new WeakMap;function rv(e){let t=nv.get(e);return t||(t=new X_(e),nv.set(e,t)),t}function iv(e,t){return t&&X_.getGlobalDictionaryForPackage(t)||rv(e)}function av(e,t){let{locale:n}=pg(),r=iv(e,t);return(0,F.useMemo)(()=>new tv(n,r),[n,r])}var ov=1080,sv=24*ov,cv=29,lv=12*ov+793;cv*sv+lv;var uv=new Map,dv=!1;try{dv=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var fv=!1;try{fv=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var pv={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},mv=class{format(e){let t=``;if(t=!dv&&this.options.signDisplay!=null?gv(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!fv){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=pv[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.format(e)} \u2013 ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!dv&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!fv&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=hv(e,t),this.options=t}};function hv(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!fv){var r;let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!((r=pv[e])!=null&&r[n]))throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let i=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(uv.has(i))return uv.get(i);let a=new Intl.NumberFormat(e,t);return uv.set(i,a),a}function gv(e,t,n){if(t===`auto`)return e.format(n);if(t===`never`)return e.format(Math.abs(n));{let r=!1;if(t===`always`?r=n>0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}else return e.format(n)}}function _v(e={}){let{locale:t}=pg();return(0,F.useMemo)(()=>new mv(t,e),[t,e])}var vv=new Map;function yv(e){let{locale:t}=pg(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(vv.has(n))return vv.get(n);let r=new Intl.Collator(t,e);return vv.set(n,r),r}var bv=typeof document<`u`?window.visualViewport:null;function xv(e){let{direction:t}=pg(),{arrowSize:n,targetRef:r,overlayRef:i,arrowRef:a,scrollRef:o=i,placement:s=`bottom`,containerPadding:c=12,shouldFlip:l=!0,boundaryElement:u=typeof document<`u`?document.body:null,offset:d=0,crossOffset:f=0,shouldUpdatePosition:p=!0,isOpen:m=!0,onClose:h,maxHeight:g,arrowBoundaryOffset:_=0}=e,[v,y]=(0,F.useState)(null),b=[p,s,i.current,r.current,a?.current,o.current,c,l,u,d,f,m,t,g,_,n],x=(0,F.useRef)(bv?.scale);(0,F.useEffect)(()=>{m&&(x.current=bv?.scale)},[m]);let S=(0,F.useCallback)(()=>{if(p===!1||!m||!i.current||!r.current||!u||bv?.scale!==x.current)return;let e=null;if(o.current&&o.current.contains(document.activeElement)){let t=document.activeElement?.getBoundingClientRect(),n=o.current.getBoundingClientRect();e={type:`top`,offset:(t?.top??0)-n.top},e.offset>n.height/2&&(e.type=`bottom`,e.offset=(t?.bottom??0)-n.bottom)}let h=i.current;!g&&i.current&&(h.style.top=`0px`,h.style.bottom=``,h.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+`px`);let v=Yh({placement:Cv(s,t),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:c,shouldFlip:l,boundaryElement:u,offset:d,crossOffset:f,maxHeight:g,arrowSize:n??(a?.current?Xh(a.current,!0).width:0),arrowBoundaryOffset:_});if(v.position){if(h.style.top=``,h.style.bottom=``,h.style.left=``,h.style.right=``,Object.keys(v.position).forEach(e=>h.style[e]=v.position[e]+`px`),h.style.maxHeight=v.maxHeight==null?``:v.maxHeight+`px`,e&&document.activeElement&&o.current){let t=document.activeElement.getBoundingClientRect(),n=o.current.getBoundingClientRect(),r=t[e.type]-n[e.type];o.current.scrollTop+=r-e.offset}y(v)}},b);z(S,b),Sv(S),bp({ref:i,onResize:S}),bp({ref:r,onResize:S});let C=(0,F.useRef)(!1);z(()=>{let e,t=()=>{C.current=!0,clearTimeout(e),e=setTimeout(()=>{C.current=!1},500),S()},n=()=>{C.current&&t()};return bv?.addEventListener(`resize`,t),bv?.addEventListener(`scroll`,n),()=>{bv?.removeEventListener(`resize`,t),bv?.removeEventListener(`scroll`,n)}},[S]);let w=(0,F.useCallback)(()=>{C.current||h?.()},[h,C]);return ng({triggerRef:r,isOpen:m,onClose:h&&w}),{overlayProps:{style:{position:v?`absolute`:`fixed`,top:v?void 0:0,left:v?void 0:0,zIndex:1e5,...v?.position,maxHeight:v?.maxHeight??`100vh`}},placement:v?.placement??null,triggerAnchorPoint:v?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":`true`,role:`presentation`,style:{left:v?.arrowOffsetLeft,top:v?.arrowOffsetTop}},updatePosition:S}}function Sv(e){z(()=>(window.addEventListener(`resize`,e,!1),()=>{window.removeEventListener(`resize`,e,!1)}),[e])}function Cv(e,t){return t===`rtl`?e.replace(`start`,`right`).replace(`end`,`left`):e.replace(`start`,`left`).replace(`end`,`right`)}var wv=F.createContext(null),Tv=`react-aria-focus-scope-restore`,Q=null;function Ev(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,a=(0,F.useRef)(null),o=(0,F.useRef)(null),s=(0,F.useRef)([]),{parentNode:c}=(0,F.useContext)(wv)||{},l=(0,F.useMemo)(()=>new Yv({scopeRef:s}),[s]);z(()=>{let e=c||$.root;if($.getTreeNode(e.scopeRef)&&Q&&!Iv(Q,e.scopeRef)){let t=$.getTreeNode(Q);t&&(e=t)}e.addChild(l),$.addNode(l)},[l,c]),z(()=>{let e=$.getTreeNode(s);e&&(e.contain=!!n)},[n]),z(()=>{let e=a.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==o.current;)t.push(e),e.addEventListener(Tv,n),e=e.nextSibling;return s.current=t,()=>{for(let e of t)e.removeEventListener(Tv,n)}},[t]),Vv(s,r,n),jv(s,n),Uv(s,r,n),Bv(s,i),(0,F.useEffect)(()=>{let e=H(V(s.current?s.current[0]:void 0)),t=null;if(Nv(e,s.current)){for(let n of $.traverse())n.scopeRef&&Nv(e,n.scopeRef.current)&&(t=n);t===$.getTreeNode(s)&&(Q=t.scopeRef)}},[s]),z(()=>()=>{var e,t;let n=((t=$.getTreeNode(s))==null||(e=t.parent)==null?void 0:e.scopeRef)??null;(s===Q||Iv(s,Q))&&(!n||$.getTreeNode(n))&&(Q=n),$.removeTreeNode(s)},[s]);let u=(0,F.useMemo)(()=>Dv(s),[]),d=(0,F.useMemo)(()=>({focusManager:u,parentNode:l}),[l,u]);return F.createElement(wv.Provider,{value:d},F.createElement(`span`,{"data-focus-scope-start":!0,hidden:!0,ref:a}),t,F.createElement(`span`,{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function Dv(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||H(V(n[0]??void 0)),c=n[0].previousElementSibling,l=Gv(Ov(n),{tabbable:i,accept:o},n);l.currentNode=Nv(s,n)?s:c;let u=l.nextNode();return!u&&a&&(l.currentNode=c,u=l.nextNode()),u&&Lv(u,!0),u},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:a,accept:o}=t,s=r||H(V(n[0]??void 0)),c=n[n.length-1].nextElementSibling,l=Gv(Ov(n),{tabbable:i,accept:o},n);l.currentNode=Nv(s,n)?s:c;let u=l.previousNode();return!u&&a&&(l.currentNode=c,u=l.previousNode()),u&&Lv(u,!0),u},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Gv(Ov(n),{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let o=a.nextNode();return o&&Lv(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,a=Gv(Ov(n),{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let o=a.previousNode();return o&&Lv(o,!0),o}}}function Ov(e){return e[0].parentElement}function kv(e){let t=$.getTreeNode(Q);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function Av(e){if(e.checked)return!0;let t=[];if(!e.form)t=[...V(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)].filter(e=>!e.form);else{var n,r;t=[...((r=e.form)==null||(n=r.elements)==null?void 0:n.namedItem(e.name))??[]]}return t?!t.some(e=>e.checked):!1}function jv(e,t){let n=(0,F.useRef)(void 0),r=(0,F.useRef)(void 0);z(()=>{let i=e.current;if(!t){r.current&&=(cancelAnimationFrame(r.current),void 0);return}let a=V(i?i[0]:void 0),o=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!kv(e)||t.isComposing)return;let n=H(a),r=e.current;if(!r||!Nv(n,r))return;let i=Gv(Ov(r),{tabbable:!0},r);if(!n)return;i.currentNode=n;let o=t.shiftKey?i.previousNode():i.nextNode();o||=(i.currentNode=t.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,t.shiftKey?i.previousNode():i.nextNode()),t.preventDefault(),o&&Lv(o,!0)},s=t=>{(!Q||Iv(Q,e))&&Nv(U(t),e.current)?(Q=e,n.current=U(t)):kv(e)&&!Pv(U(t),e)?n.current?n.current.focus():Q&&Q.current&&zv(Q.current):kv(e)&&(n.current=U(t))},c=t=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let r=Zm(),i=(r===`virtual`||r===null)&&$f()&&Qf(),o=H(a);if(!i&&o&&kv(e)&&!Pv(o,e)){Q=e;let r=U(t);if(r&&r.isConnected){var s;n.current=r,(s=n.current)==null||s.focus()}else Q.current&&zv(Q.current)}})};return a.addEventListener(`keydown`,o,!1),a.addEventListener(`focusin`,s,!1),i?.forEach(e=>e.addEventListener(`focusin`,s,!1)),i?.forEach(e=>e.addEventListener(`focusout`,c,!1)),()=>{a.removeEventListener(`keydown`,o,!1),a.removeEventListener(`focusin`,s,!1),i?.forEach(e=>e.removeEventListener(`focusin`,s,!1)),i?.forEach(e=>e.removeEventListener(`focusout`,c,!1))}},[e,t]),z(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Mv(e){return Pv(e)}function Nv(e,t){return!e||!t?!1:t.some(t=>t.contains(e))}function Pv(e,t=null){if(e instanceof Element&&e.closest(`[data-react-aria-top-layer]`))return!0;for(let{scopeRef:n}of $.traverse($.getTreeNode(t)))if(n&&Nv(e,n.current))return!0;return!1}function Fv(e){return Pv(e,Q)}function Iv(e,t){let n=$.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function Lv(e,t=!1){if(e!=null&&!t)try{nh(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function Rv(e,t=!0){let n=e[0].previousElementSibling,r=Ov(e),i=Gv(r,{tabbable:t},e);i.currentNode=n;let a=i.nextNode();return t&&!a&&(r=Ov(e),i=Gv(r,{tabbable:!1},e),i.currentNode=n,a=i.nextNode()),a}function zv(e,t=!0){Lv(Rv(e,t))}function Bv(e,t){let n=F.useRef(t);(0,F.useEffect)(()=>{n.current&&(Q=e,!Nv(H(V(e.current?e.current[0]:void 0)),Q.current)&&e.current&&zv(e.current)),n.current=!1},[e])}function Vv(e,t,n){z(()=>{if(t||n)return;let r=e.current,i=V(r?r[0]:void 0),a=t=>{let n=U(t);Nv(n,e.current)?Q=e:Mv(n)||(Q=null)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,t,n])}function Hv(e){let t=$.getTreeNode(Q);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function Uv(e,t,n){let r=(0,F.useRef)(typeof document<`u`?H(V(e.current?e.current[0]:void 0)):null);z(()=>{let r=e.current,i=V(r?r[0]:void 0);if(!t||n)return;let a=()=>{(!Q||Iv(Q,e))&&Nv(H(i),e.current)&&(Q=e)};return i.addEventListener(`focusin`,a,!1),r?.forEach(e=>e.addEventListener(`focusin`,a,!1)),()=>{i.removeEventListener(`focusin`,a,!1),r?.forEach(e=>e.removeEventListener(`focusin`,a,!1))}},[e,n]),z(()=>{let r=V(e.current?e.current[0]:void 0);if(!t)return;let i=t=>{if(t.key!==`Tab`||t.altKey||t.ctrlKey||t.metaKey||!kv(e)||t.isComposing)return;let n=r.activeElement;if(!Pv(n,e)||!Hv(e))return;let i=$.getTreeNode(e);if(!i)return;let a=i.nodeToRestore,o=Gv(r.body,{tabbable:!0});o.currentNode=n;let s=t.shiftKey?o.previousNode():o.nextNode();if((!a||!a.isConnected||a===r.body)&&(a=void 0,i.nodeToRestore=void 0),(!s||!Pv(s,e))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(Pv(s,e));t.preventDefault(),t.stopPropagation(),s?Lv(s,!0):Mv(a)?Lv(a,!0):n.blur()}};return n||r.addEventListener(`keydown`,i,!0),()=>{n||r.removeEventListener(`keydown`,i,!0)}},[e,t,n]),z(()=>{let n=V(e.current?e.current[0]:void 0);if(!t)return;let i=$.getTreeNode(e);if(i)return i.nodeToRestore=r.current??void 0,()=>{let r=$.getTreeNode(e);if(!r)return;let i=r.nodeToRestore,a=H(n);if(t&&i&&(a&&Pv(a,e)||a===n.body&&Hv(e))){let t=$.clone();requestAnimationFrame(()=>{if(n.activeElement===n.body){let n=t.getTreeNode(e);for(;n;){if(n.nodeToRestore&&n.nodeToRestore.isConnected){Wv(n.nodeToRestore);return}n=n.parent}for(n=t.getTreeNode(e);n;){if(n.scopeRef&&n.scopeRef.current&&$.getTreeNode(n.scopeRef)){Wv(Rv(n.scopeRef.current,!0));return}n=n.parent}}})}}},[e,t])}function Wv(e){e.dispatchEvent(new CustomEvent(Tv,{bubbles:!0,cancelable:!0}))&&Lv(e)}function Gv(e,t,n){let r=t?.tabbable?Zp:Xp,i=V(e?.nodeType===Node.ELEMENT_NODE?e:null),a=Ef(i,e||i,NodeFilter.SHOW_ELEMENT,{acceptNode(e){var i;return!(t==null||(i=t.from)==null)&&i.contains(e)||t?.tabbable&&e.tagName===`INPUT`&&e.getAttribute(`type`)===`radio`&&(!Av(e)||a.currentNode.tagName===`INPUT`&&a.currentNode.type===`radio`&&a.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||Nv(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t?.from&&(a.currentNode=t.from),a}function Kv(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,c=i||H(V(r)),l=Gv(r,{tabbable:a,accept:s});r.contains(c)&&(l.currentNode=c);let u=l.nextNode();return!u&&o&&(l.currentNode=r,u=l.nextNode()),u&&Lv(u,!0),u},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:a=t.tabbable,wrap:o=t.wrap,accept:s=t.accept}=n,c=i||H(V(r)),l=Gv(r,{tabbable:a,accept:s});if(r.contains(c))l.currentNode=c;else{let e=qv(l);return e&&Lv(e,!0),e??null}let u=l.previousNode();if(!u&&o){l.currentNode=r;let e=qv(l);if(!e)return null;u=e}return u&&Lv(u,!0),u??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=Gv(r,{tabbable:i,accept:a}).nextNode();return o&&Lv(o,!0),o},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:a=t.accept}=n,o=qv(Gv(r,{tabbable:i,accept:a}));return o&&Lv(o,!0),o??null}}}function qv(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}var Jv=class e{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let i=new Yv({scopeRef:e});r.addChild(i),i.parent=r,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&Nv(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let t=new e;for(let e of this.traverse())t.addTreeNode(e.scopeRef,e.parent?.scopeRef??null,e.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new Yv({scopeRef:null}),this.fastMap.set(null,this.root)}},Yv=class{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}},$=new Jv;function Xv(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=(0,F.useRef)({isFocused:!1,isFocusVisible:t||Xm()}),[a,o]=(0,F.useState)(!1),[s,c]=(0,F.useState)(()=>i.current.isFocused&&i.current.isFocusVisible),l=(0,F.useCallback)(()=>c(i.current.isFocused&&i.current.isFocusVisible),[]),u=(0,F.useCallback)(e=>{i.current.isFocused=e,o(e),l()},[l]);th(e=>{i.current.isFocusVisible=e,l()},[],{isTextInput:n});let{focusProps:d}=rh({isDisabled:r,onFocusChange:u}),{focusWithinProps:f}=mh({isDisabled:!r,onFocusWithinChange:u});return{isFocused:a,isFocusVisible:s,focusProps:r?f:d}}function Zv(e,t){let n=t?.isDisabled,[r,i]=(0,F.useState)(!1);return z(()=>{if(e?.current&&!n){let t=()=>{e.current&&i(!!Gv(e.current,{tabbable:!0}).nextNode())};t();let n=new MutationObserver(t);return n.observe(e.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:[`tabIndex`,`disabled`]}),()=>{n.disconnect()}}}),n?!1:r}function Qv(e){let t=ty(V(e));t!==e&&(t&&$v(t,e),e&&ey(e,t))}function $v(e,t){e.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:t}))}function ey(e,t){e.dispatchEvent(new FocusEvent(`focus`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusin`,{bubbles:!0,relatedTarget:t}))}function ty(e){let t=H(e),n=t?.getAttribute(`aria-activedescendant`);return n&&e.getElementById(n)||t}var ny=[];function ry(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:a=!1,isKeyboardDismissDisabled:o=!1,shouldCloseOnInteractOutside:s}=e;(0,F.useEffect)(()=>{if(i&&!ny.includes(t))return ny.push(t),()=>{let e=ny.indexOf(t);e>=0&&ny.splice(e,1)}},[i,t]);let c=()=>{ny[ny.length-1]===t&&n&&n()},l=e=>{(!s||s(e.target))&&ny[ny.length-1]===t&&(e.stopPropagation(),e.preventDefault())},u=e=>{(!s||s(e.target))&&(ny[ny.length-1]===t&&(e.stopPropagation(),e.preventDefault()),c())},d=e=>{e.key===`Escape`&&!o&&!e.nativeEvent.isComposing&&(e.stopPropagation(),e.preventDefault(),c())};xh({ref:t,onInteractOutside:a&&i?u:void 0,onInteractOutsideStart:l});let{focusWithinProps:f}=mh({isDisabled:!r,onBlurWithin:e=>{!e.relatedTarget||Fv(e.relatedTarget)||(!s||s(e.relatedTarget))&&n?.()}}),p=e=>{e.target===e.currentTarget&&e.preventDefault()};return{overlayProps:{onKeyDown:d,...f},underlayProps:{onPointerDown:p}}}function iy(e,t,n){let{type:r}=e,{isOpen:i}=t;(0,F.useEffect)(()=>{n&&n.current&&tg.set(n.current,t.close)});let a;r===`menu`?a=!0:r===`listbox`&&(a=`listbox`);let o=B();return{triggerProps:{"aria-haspopup":a,"aria-expanded":i,"aria-controls":i?o:void 0,onPress:t.toggle},overlayProps:{id:o}}}var ay=typeof document<`u`&&window.visualViewport,oy=0,sy;function cy(e={}){let{isDisabled:t}=e;z(()=>{if(!t)return oy++,oy===1&&(sy=Yf()?uy():ly()),()=>{oy--,oy===0&&sy()}},[t])}function ly(){let e=window.innerWidth-document.documentElement.clientWidth;return vf(e>0&&(`scrollbarGutter`in document.documentElement.style?dy(document.documentElement,`scrollbarGutter`,`stable`):dy(document.documentElement,`paddingRight`,`${e}px`)),dy(document.documentElement,`overflow`,`hidden`))}function uy(){let e,t=!1,n=n=>{let r=n.target;e=Sp(r)?r:Cp(r,!0),t=!1;let i=r.ownerDocument.defaultView.getSelection();i&&!i.isCollapsed&&i.containsNode(r,!0)&&(t=!0),`selectionStart`in r&&`selectionEnd`in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(t=!0)},r=document.createElement(`style`);r.textContent=`@layer {
|
|
45
|
+
* {
|
|
46
|
+
overscroll-behavior: contain;
|
|
47
|
+
}
|
|
48
|
+
}`,document.head.prepend(r);let i=n=>{if(!(n.touches.length===2||t)){if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&n.preventDefault()}},a=e=>{let t=e.target,n=e.relatedTarget;n&&Dp(n)?(n.focus({preventScroll:!0}),py(n,Dp(t))):n||(t.parentElement?.closest(`[tabindex]`))?.focus({preventScroll:!0})},o=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(e){let t=document.activeElement!=null&&Dp(document.activeElement);o.call(this,{...e,preventScroll:!0}),(!e||!e.preventScroll)&&py(this,t)};let s=vf(fy(document,`touchstart`,n,{passive:!1,capture:!0}),fy(document,`touchmove`,i,{passive:!1,capture:!0}),fy(document,`blur`,a,!0));return()=>{s(),r.remove(),HTMLElement.prototype.focus=o}}function dy(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function fy(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function py(e,t){t||!ay?my(e):ay.addEventListener(`resize`,()=>my(e),{once:!0})}function my(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=Cp(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top<t.top||r.bottom>t.top+n.clientHeight){let n=t.bottom;ay&&(n=Math.min(n,ay.offsetTop+ay.height));let i=r.top-t.top-((n-t.top)/2-r.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+i)),behavior:`smooth`})}}n=e.parentElement}}var hy=(0,F.createContext)({});function gy(){return(0,F.useContext)(hy)??{}}var _y=F.createContext(null);function vy(e){let{children:t}=e,n=(0,F.useContext)(_y),[r,i]=(0,F.useState)(0),a=(0,F.useMemo)(()=>({parent:n,modalCount:r,addModal(){i(e=>e+1),n&&n.addModal()},removeModal(){i(e=>e-1),n&&n.removeModal()}}),[n,r]);return F.createElement(_y.Provider,{value:a},t)}function yy(){let e=(0,F.useContext)(_y);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function by(e){let{modalProviderProps:t}=yy();return F.createElement(`div`,{"data-overlay-container":!0,...e,...t})}function xy(e){return F.createElement(vy,null,F.createElement(by,e))}function Sy(e){let t=ff(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=gy();if(!e.portalContainer&&i&&(n=i()),F.useEffect(()=>{if(n?.closest(`[data-overlay-container]`))throw Error(`An OverlayContainer must not be inside another container. Please change the portalContainer prop.`)},[n]),!n)return null;let a=F.createElement(xy,r);return Ku.createPortal(a,n)}var Cy={};Cy={dismiss:`تجاهل`};var wy={};wy={dismiss:`Отхвърляне`};var Ty={};Ty={dismiss:`Odstranit`};var Ey={};Ey={dismiss:`Luk`};var Dy={};Dy={dismiss:`Schließen`};var Oy={};Oy={dismiss:`Απόρριψη`};var ky={};ky={dismiss:`Dismiss`};var Ay={};Ay={dismiss:`Descartar`};var jy={};jy={dismiss:`Lõpeta`};var My={};My={dismiss:`Hylkää`};var Ny={};Ny={dismiss:`Rejeter`};var Py={};Py={dismiss:`התעלם`};var Fy={};Fy={dismiss:`Odbaci`};var Iy={};Iy={dismiss:`Elutasítás`};var Ly={};Ly={dismiss:`Ignora`};var Ry={};Ry={dismiss:`閉じる`};var zy={};zy={dismiss:`무시`};var By={};By={dismiss:`Atmesti`};var Vy={};Vy={dismiss:`Nerādīt`};var Hy={};Hy={dismiss:`Lukk`};var Uy={};Uy={dismiss:`Negeren`};var Wy={};Wy={dismiss:`Zignoruj`};var Gy={};Gy={dismiss:`Descartar`};var Ky={};Ky={dismiss:`Dispensar`};var qy={};qy={dismiss:`Revocare`};var Jy={};Jy={dismiss:`Пропустить`};var Yy={};Yy={dismiss:`Zrušiť`};var Xy={};Xy={dismiss:`Opusti`};var Zy={};Zy={dismiss:`Odbaci`};var Qy={};Qy={dismiss:`Avvisa`};var $y={};$y={dismiss:`Kapat`};var eb={};eb={dismiss:`Скасувати`};var tb={};tb={dismiss:`取消`};var nb={};nb={dismiss:`關閉`};var rb={};rb={"ar-AE":Cy,"bg-BG":wy,"cs-CZ":Ty,"da-DK":Ey,"de-DE":Dy,"el-GR":Oy,"en-US":ky,"es-ES":Ay,"et-EE":jy,"fi-FI":My,"fr-FR":Ny,"he-IL":Py,"hr-HR":Fy,"hu-HU":Iy,"it-IT":Ly,"ja-JP":Ry,"ko-KR":zy,"lt-LT":By,"lv-LV":Vy,"nb-NO":Hy,"nl-NL":Uy,"pl-PL":Wy,"pt-BR":Gy,"pt-PT":Ky,"ro-RO":qy,"ru-RU":Jy,"sk-SK":Yy,"sl-SI":Xy,"sr-SP":Zy,"sv-SE":Qy,"tr-TR":$y,"uk-UA":eb,"zh-CN":tb,"zh-TW":nb};var ib={border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`};function ab(e={}){let{style:t,isFocusable:n}=e,[r,i]=(0,F.useState)(!1),{focusWithinProps:a}=mh({isDisabled:!n,onFocusWithinChange:e=>i(e)}),o=(0,F.useMemo)(()=>r?t:t?{...ib,...t}:ib,[r]);return{visuallyHiddenProps:{...a,style:o}}}function ob(e){let{children:t,elementType:n=`div`,isFocusable:r,style:i,...a}=e,{visuallyHiddenProps:o}=ab(e);return F.createElement(n,W(a,o),t)}function sb(e){return e&&e.__esModule?e.default:e}function cb(e){let{onDismiss:t,...n}=e,r=hp(n,av(sb(rb),`@react-aria/overlays`).format(`dismiss`)),i=()=>{t&&t()};return F.createElement(ob,null,F.createElement(`button`,{...r,tabIndex:-1,onClick:i,style:{width:1,height:1}}))}var lb=typeof HTMLElement<`u`&&`inert`in HTMLElement.prototype,ub=new WeakMap,db=[];function fb(e,t){let n=yf(e?.[0]),r=t instanceof n.Element?{root:t}:t,i=r?.root??document.body,a=r?.shouldUseInert&&lb,o=new Set(e),s=new Set,c=e=>a&&e instanceof n.HTMLElement?e.inert:e.getAttribute(`aria-hidden`)===`true`,l=(e,t)=>{a&&e instanceof n.HTMLElement?e.inert=t:t?e.setAttribute(`aria-hidden`,`true`):(e.removeAttribute(`aria-hidden`),e instanceof n.HTMLElement&&(e.inert=!1))},u=e=>{for(let t of e.querySelectorAll(`[data-live-announcer], [data-react-aria-top-layer]`))o.add(t);let t=e=>{if(s.has(e)||o.has(e)||e.parentElement&&s.has(e.parentElement)&&e.parentElement.getAttribute(`role`)!==`row`)return NodeFilter.FILTER_REJECT;for(let t of o)if(e.contains(t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);if(r===NodeFilter.FILTER_ACCEPT&&d(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;e!=null;)d(e),e=n.nextNode()}},d=e=>{let t=ub.get(e)??0;c(e)&&t===0||(t===0&&l(e,!0),s.add(e),ub.set(e,t+1))};db.length&&db[db.length-1].disconnect(),u(i);let f=new MutationObserver(e=>{for(let t of e)if(t.type===`childList`&&![...o,...s].some(e=>e.contains(t.target)))for(let e of t.addedNodes)(e instanceof HTMLElement||e instanceof SVGElement)&&(e.dataset.liveAnnouncer===`true`||e.dataset.reactAriaTopLayer===`true`)?o.add(e):e instanceof Element&&u(e)});f.observe(i,{childList:!0,subtree:!0});let p={visibleNodes:o,hiddenNodes:s,observe(){f.observe(i,{childList:!0,subtree:!0})},disconnect(){f.disconnect()}};return db.push(p),()=>{f.disconnect();for(let e of s){let t=ub.get(e);t!=null&&(t===1?(l(e,!1),ub.delete(e)):ub.set(e,t-1))}p===db[db.length-1]?(db.pop(),db.length&&db[db.length-1].observe()):db.splice(db.indexOf(p),1)}}function pb(e){let t=db[db.length-1];if(t&&!t.visibleNodes.has(e))return t.visibleNodes.add(e),()=>{t.visibleNodes.delete(e)}}function mb(e,t){let{triggerRef:n,popoverRef:r,groupRef:i,isNonModal:a,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:s,...c}=e,l=c.trigger===`SubmenuTrigger`,{overlayProps:u,underlayProps:d}=ry({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!a||l,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:s},i??r),{overlayProps:f,arrowProps:p,placement:m,triggerAnchorPoint:h}=xv({...c,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:a&&!l?t.close:null});return cy({isDisabled:a||!t.isOpen}),(0,F.useEffect)(()=>{if(t.isOpen&&r.current)return a?pb(i?.current??r.current):fb([i?.current??r.current],{shouldUseInert:!0})},[a,t.isOpen,r,i]),{popoverProps:W(u,f),arrowProps:p,underlayProps:d,placement:m,triggerAnchorPoint:h}}var hb=F.createContext(null);function gb(e){let t=ff(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,a]=(0,F.useState)(!1),o=(0,F.useMemo)(()=>({contain:i,setContain:a}),[i,a]),{getContainer:s}=gy();if(!e.portalContainer&&s&&(n=s()),!n)return null;let c=e.children;return e.disableFocusManagement||(c=F.createElement(Ev,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},c)),c=F.createElement(hb.Provider,{value:o},F.createElement(ph,null,c)),Ku.createPortal(c,n)}function _b(){let e=(0,F.useContext)(hb)?.setContain;z(()=>{e?.(!0)},[e])}function vb(e,t,n){let{overlayProps:r,underlayProps:i}=ry({...e,isOpen:t.isOpen,onClose:t.close},n);return cy({isDisabled:!t.isOpen}),_b(),(0,F.useEffect)(()=>{if(t.isOpen&&n.current)return fb([n.current],{shouldUseInert:!0})},[t.isOpen,n]),{modalProps:W(r),underlayProps:i}}function yb(e){let[t,n]=em(e.isOpen,e.defaultOpen||!1,e.onOpenChange);return{isOpen:t,setOpen:n,open:(0,F.useCallback)(()=>{n(!0)},[n]),close:(0,F.useCallback)(()=>{n(!1)},[n]),toggle:(0,F.useCallback)(()=>{n(!t)},[n,t])}}var bb=1500,xb=500,Sb={},Cb=0,wb=!1,Tb=null,Eb=null;function Db(e={}){let{delay:t=bb,closeDelay:n=xb}=e,{isOpen:r,open:i,close:a}=yb(e),o=(0,F.useMemo)(()=>`${++Cb}`,[]),s=(0,F.useRef)(null),c=(0,F.useRef)(a),l=()=>{Sb[o]=f},u=()=>{for(let e in Sb)e!==o&&(Sb[e](!0),delete Sb[e])},d=()=>{s.current&&clearTimeout(s.current),s.current=null,u(),l(),wb=!0,i(),Tb&&=(clearTimeout(Tb),null),Eb&&=(clearTimeout(Eb),null)},f=e=>{e||n<=0?(s.current&&clearTimeout(s.current),s.current=null,c.current()):s.current||=setTimeout(()=>{s.current=null,c.current()},n),Tb&&=(clearTimeout(Tb),null),wb&&(Eb&&clearTimeout(Eb),Eb=setTimeout(()=>{delete Sb[o],Eb=null,wb=!1},Math.max(xb,n)))},p=()=>{u(),l(),!r&&!Tb&&!wb?Tb=setTimeout(()=>{Tb=null,wb=!0,d()},t):r||d()};return(0,F.useEffect)(()=>{c.current=a},[a]),(0,F.useEffect)(()=>()=>{s.current&&clearTimeout(s.current),Sb[o]&&delete Sb[o]},[o]),{isOpen:r,open:e=>{!e&&t>0&&!s.current?p():d()},close:f}}var Ob=(0,F.createContext)(null),kb=(0,F.createContext)(null);function Ab(e){let t=Db(e),n=(0,F.useRef)(null),{triggerProps:r,tooltipProps:i}=Mh(e,t,n);return F.createElement(Eh,{values:[[Ob,t],[kb,{...i,triggerRef:n}]]},F.createElement(ch,{...r,ref:n},e.children))}var jb=(0,F.forwardRef)(function({UNSTABLE_portalContainer:e,...t},n){[t,n]=q(t,n,kb);let r=(0,F.useContext)(Ob),i=Db(t),a=t.isOpen!=null||t.defaultOpen!=null||!r?i:r,o=Vp(n,a.isOpen)||t.isExiting||!1;return!a.isOpen&&!o?null:F.createElement(Sy,{portalContainer:e},F.createElement(Mb,{...t,tooltipRef:n,isExiting:o}))});function Mb(e){let t=(0,F.useContext)(Ob),n=(0,F.useRef)(null),{overlayProps:r,arrowProps:i,placement:a,triggerAnchorPoint:o}=xv({placement:e.placement||`top`,targetRef:e.triggerRef,overlayRef:e.tooltipRef,arrowRef:n,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,containerPadding:e.containerPadding,onClose:()=>t.close(!0)}),s=Bp(e.tooltipRef,!!a)||e.isEntering||!1,c=Dh({...e,defaultClassName:`react-aria-Tooltip`,values:{placement:a,isEntering:s,isExiting:e.isExiting,state:t}});e=W(e,r);let{tooltipProps:l}=jh(e,t),u=G(e,{global:!0});return F.createElement(`div`,{...W(u,c,l),ref:e.tooltipRef,style:{...r.style,"--trigger-anchor-point":o?`${o.x}px ${o.y}px`:void 0,...c.style},"data-placement":a??void 0,"data-entering":s||void 0,"data-exiting":e.isExiting||void 0},F.createElement(Ah.Provider,{value:{...i,placement:a,ref:n}},c.children))}var Nb=(0,t(v(),1).default)(1e3)(e=>e===`left-end`?`left bottom`:e===`right-end`?`right bottom`:e===`left-start`?`left top`:e===`right-start`?`right top`:e.replace(`-`,` `));N.div({width:500,height:500,paddingTop:100,overflowY:`scroll`,background:`#eee`,position:`relative`});var Pb=(0,F.forwardRef)((e,t)=>F.createElement(`button`,{...e,ref:t,style:{width:120,height:50,margin:10}}));Pb.displayName=`Trigger`;var Fb=({triggerOnFocusOnly:e=!1,placement:t=`top`,offset:n=8,tooltip:r,children:i,defaultVisible:a,startOpen:o,delayShow:s=400,delayHide:c=200,visible:l,onVisibleChange:u,...d})=>{let f=Nb(t),p=F.Children.only(i);o!==void 0&&Qd("The `startOpen` prop is deprecated. Please use `defaultVisible` instead.");let[m,h]=(0,F.useState)(a??o??!1),g=(0,F.useCallback)(e=>{h(e),u?.(e)},[u]);return F.createElement(Ab,{delay:s,closeDelay:c,isOpen:l??m,onOpenChange:g,trigger:e?`focus`:void 0,...d},F.createElement(uh,null,F.cloneElement(p,{"aria-describedby":null})),F.createElement(jb,{"data-testid":`tooltip`,placement:f,offset:n,onOpenChange:g,style:{outline:`none`},...d},r))},Ib=({children:e,disableAllTooltips:t,shortcut:n,tooltip:r})=>{let i=(0,F.useMemo)(()=>{let e=document?.body?.getAttribute(`data-shortcuts-enabled`)!==`false`;if(!(!r&&(!n||!e)))return[r,n&&e&&`[${Qc(n)}]`].filter(Boolean).join(` `)},[n,r]);return i?F.createElement(Fb,{placement:`top`,tooltip:F.createElement(Zd,{note:i}),visible:t?!1:void 0},e):F.createElement(F.Fragment,null,e)};Ib.displayName=`InteractiveTooltipWrapper`;function Lb(e=``){let t=e.toLowerCase().trim().replace(/\s+/g,`-`);return{ariaDescriptionAttrs:{"aria-describedby":e?t:void 0},AriaDescription:()=>e?F.createElement(`span`,{id:t,hidden:!0},e):null}}var Rb=(0,F.forwardRef)(({as:e=`button`,asChild:t=!1,animation:n=`none`,size:r=`small`,variant:i=`outline`,padding:a=`medium`,disabled:o=!1,readOnly:s=!1,active:c,onClick:l,ariaLabel:u,ariaDescription:d=void 0,tooltip:f=void 0,shortcut:p=void 0,disableAllTooltips:m=!1,...h},g)=>{let _=t?Ud:e,v;!s&&(u===void 0||u===``)&&(v=`ariaLabel`,Fd(`The 'ariaLabel' prop on 'Button' will become mandatory in Storybook 11. Buttons with text content should set 'ariaLabel={false}' to indicate that they are accessible as-is. Buttons without text content must provide a meaningful 'ariaLabel' for accessibility. The button content is: ${h.children}.`)),c!==void 0&&(v=`active`,Fd("The `active` prop on `Button` is deprecated and will be removed in Storybook 11. Use specialized components like `ToggleButton` or `Select` instead."));let{ariaDescriptionAttrs:y,AriaDescription:b}=Lb(d),x=(0,F.useMemo)(()=>p?$c(p):void 0,[p]),[S,C]=(0,F.useState)(!1),w=e=>{l&&l(e),n!==`none`&&C(!0)};return(0,F.useEffect)(()=>{let e=setTimeout(()=>{S&&C(!1)},1e3);return()=>clearTimeout(e)},[S]),F.createElement(F.Fragment,null,F.createElement(Ib,{disableAllTooltips:m,shortcut:p,tooltip:f||(u===!1?void 0:u)},F.createElement(zb,{"data-deprecated":v,as:_,ref:g,variant:i,size:r,padding:a,disabled:o||s,readOnly:s,active:c,animating:S,animation:n,onClick:w,"aria-label":!s&&u!==!1?u:void 0,"aria-keyshortcuts":s?void 0:x,...s?{}:y,...h})),F.createElement(b,null))});Rb.displayName=`Button`;var zb=N(`button`,{shouldForwardProp:e=>w(e)})(({theme:e,variant:t,size:n,disabled:r,readOnly:i,active:a,animating:o,animation:s=`none`,padding:c})=>({border:0,cursor:i?`inherit`:r?`not-allowed`:`pointer`,display:`inline-flex`,gap:`6px`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,padding:c===`none`?0:c===`small`&&n===`small`?`0 7px`:c===`small`&&n===`medium`?`0 9px`:n===`small`?`0 10px`:n===`medium`?`0 12px`:0,height:n===`small`?`28px`:`32px`,position:`relative`,textAlign:`center`,textDecoration:`none`,transitionProperty:`background, box-shadow`,transitionDuration:`150ms`,transitionTimingFunction:`ease-out`,verticalAlign:`top`,whiteSpace:`nowrap`,userSelect:`none`,opacity:r&&!i?.5:1,margin:0,fontSize:`${e.typography.size.s1}px`,fontWeight:e.typography.weight.bold,lineHeight:`1`,background:t===`solid`?e.base===`light`?e.color.secondary:O(.18,e.color.secondary):t===`outline`?e.button.background:t===`ghost`&&a?C(.93,e.barSelectedColor):`transparent`,color:t===`solid`?e.color.lightest:t===`outline`?e.input.color:t===`ghost`&&a?e.base===`light`?O(.1,e.color.secondary):e.color.secondary:t===`ghost`?e.textMutedColor:e.input.color,boxShadow:t===`outline`?`${e.button.border} 0 0 0 1px inset`:`none`,borderRadius:e.input.borderRadius,flexShrink:0,...!i&&{"&:hover":{color:t===`ghost`?e.color.secondary:void 0,background:(()=>{let n=e.color.secondary;return t===`solid`&&(n=e.base===`light`?D(.1,e.color.secondary):O(.3,e.color.secondary)),t===`outline`&&(n=e.button.background),t===`ghost`?C(.86,e.color.secondary):e.base===`light`?O(.02,n):D(.03,n)})()},"&:active":{color:t===`ghost`?e.color.secondary:void 0,background:(()=>{let n=e.color.secondary;return t===`solid`&&(n=e.color.secondary),t===`outline`&&(n=e.button.background),t===`ghost`?e.background.hoverable:e.base===`light`?O(.02,n):D(.03,n)})()},"&:focus-visible":{outline:`2px solid ${ee(e.color.secondary,1)}`,outlineOffset:2,zIndex:`1`},".sb-bar &:focus-visible, .sb-list &:focus-visible":{outlineOffset:0}},"> svg":{flex:`0 0 auto`,animation:o&&s!==`none`?`${e.animation[s]} 1000ms ease-out`:``}})),Bb=(0,F.forwardRef)((e,t)=>(Fd("`IconButton` is deprecated and will be removed in Storybook 11, use `Button` instead."),F.createElement(Rb,{ref:t,...e,"data-deprecated":`IconButton`})));Bb.displayName=`IconButton`;var Vb=(0,F.forwardRef)(({pressed:e,...t},n)=>F.createElement(Hb,{role:`switch`,"aria-checked":e,ref:n,pressed:e,...t}));Vb.displayName=`ToggleButton`;var Hb=N(Rb)(({theme:e,variant:t=`outline`,pressed:n})=>({...n?{...t===`solid`?{background:e.base===`lighten`?O(.1,e.color.secondary):O(.2,e.color.secondary)}:{},...t===`outline`?{background:C(.94,e.barSelectedColor),boxShadow:`${e.barSelectedColor} 0 0 0 1px inset`,color:e.barSelectedColor}:{},...t===`ghost`?{background:C(.93,e.barSelectedColor),color:e.base===`light`?O(.1,e.color.secondary):e.color.secondary}:{}}:{}})),Ub=N.li(({active:e,theme:t})=>({display:`flex`,alignItems:`center`,justifyContent:`space-between`,flex:`0 0 auto`,overflow:`hidden`,minHeight:32,gap:4,fontSize:t.typography.size.s1,fontWeight:e?t.typography.weight.bold:t.typography.weight.regular,color:e?`var(--listbox-item-active-color)`:t.color.defaultText,"--listbox-item-active-color":t.base===`light`?O(.1,t.color.secondary):t.color.secondary,"--listbox-item-muted-color":e?`var(--listbox-item-active-color)`:t.color.mediumdark,'&[aria-disabled="true"]':{opacity:.5,cursor:`not-allowed`},'&[aria-selected="true"]':{color:`var(--listbox-item-active-color)`,fontWeight:t.typography.weight.bold,"--listbox-item-muted-color":`var(--listbox-item-active-color)`},"&:not(:hover, :has(:focus-visible)) svg + input":{position:`absolute`,opacity:0},'&[role="option"]':{cursor:`pointer`,borderRadius:t.input.borderRadius,outlineOffset:-2,padding:`0 9px`,gap:8,"&:hover":{background:C(.86,t.color.secondary)},"&:focus-visible":{outline:`2px solid ${t.color.secondary}`}},"@supports (interpolate-size: allow-keywords)":{interpolateSize:`allow-keywords`,transitionBehavior:`allow-discrete`,transitionDuration:`var(--transition-duration, 0.2s)`,transitionProperty:`opacity, block-size, content-visibility`},"@media (prefers-reduced-motion: reduce)":{transition:`none`}}),({transitionStatus:e})=>{switch(e){case`preEnter`:case`exiting`:case`exited`:return{opacity:0,blockSize:0,contentVisibility:`hidden`};default:return{opacity:1,blockSize:`auto`,contentVisibility:`visible`}}}),Wb=N(Ub)(({targetId:e})=>({gap:0,[`& [data-target-id="${e}"]`]:{inlineSize:`auto`,marginLeft:4,opacity:1,"@supports (interpolate-size: allow-keywords)":{interpolateSize:`allow-keywords`,transitionProperty:`inline-size, margin-left, opacity, padding-inline`,transitionDuration:`var(--transition-duration, 0.2s)`}},[`&:not(:hover, :has(:focus-visible)) [data-target-id="${e}"]`]:{inlineSize:0,marginLeft:0,opacity:0,paddingInline:0}})),Gb=N(Rb)(({size:e})=>({gap:e===`small`?6:8,"&:focus-visible":{outlineOffset:-2}})),Kb=N(Vb)({"&:focus-visible":{outlineOffset:-2}}),qb=(0,F.forwardRef)(function({padding:e=`small`,size:t=`medium`,variant:n=`ghost`,...r},i){return F.createElement(Gb,{...r,variant:n,padding:e,size:t,ref:i})}),Jb=(0,F.forwardRef)(function({padding:e=`small`,size:t=`medium`,variant:n=`ghost`,...r},i){return F.createElement(Kb,{...r,variant:n,padding:e,size:t,ref:i})}),Yb=N(qb)(({theme:e})=>({height:`auto`,minHeight:32,flex:`0 1 100%`,textAlign:`start`,justifyContent:`space-between`,fontWeight:`inherit`,color:`inherit`,"&:hover":{color:`inherit`},"& input:enabled:focus-visible":{outline:`none`},"&:has(input:focus-visible)":{outline:`2px solid ${e.color.secondary}`,outlineOffset:-2}})),Xb=e=>F.createElement(Yb,{as:`a`,...e}),Zb=N.div(({theme:e})=>({display:`flex`,flexDirection:`column`,justifyContent:`center`,flexGrow:1,minWidth:0,padding:`8px 0`,lineHeight:`16px`,"& > *":{margin:0,whiteSpace:`normal`},"& > span":{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},"& small":{fontSize:`inherit`,color:e.textMutedColor},"&:first-child":{paddingLeft:8},"&:last-child":{paddingRight:8},'button > &:first-child, [role="option"] > &:first-child':{paddingLeft:0},'button > &:last-child, [role="option"] > &:last-child':{paddingRight:0}})),Qb=N.div({display:`flex`,alignItems:`center`,justifyContent:`center`,flex:`0 0 14px`,width:14,height:14,color:`var(--listbox-item-muted-color)`}),$b=Object.assign(N.ul(({theme:e,onClick:t})=>({listStyle:`none`,margin:0,padding:4,cursor:t?`pointer`:`default`,"& + *":{borderTop:`1px solid ${e.appBorderColor}`}})),{Item:Ub,HoverItem:Wb,Button:qb,Toggle:Jb,Action:Yb,Link:Xb,Text:Zb,Icon:Qb}),ex=N.div(({collapsed:e=!1})=>({blockSize:e?0:`auto`,contentVisibility:e?`hidden`:`visible`,transform:e?`translateY(-10px)`:`translateY(0)`,opacity:e?0:1,overflow:`hidden`,"@supports (interpolate-size: allow-keywords)":{interpolateSize:`allow-keywords`,transition:`all var(--transition-duration, 0.2s)`,transitionBehavior:`allow-discrete`},"@media (prefers-reduced-motion: reduce)":{transition:`none`}}));Object.assign(function({children:e,summary:t,collapsed:n,disabled:r,initialCollapsed:i,storageKey:a,state:o,...s}){let c=nx({collapsed:n,disabled:r,initialCollapsed:i,storageKey:a}),l=o||c;return F.createElement(F.Fragment,null,typeof t==`function`?t(l):t,F.createElement(ex,{...s,id:l.contentId,collapsed:l.isCollapsed,"aria-hidden":l.isCollapsed},typeof e==`function`?e(l):e))},{Content:ex});var tx=(e,t)=>{let[n,r]=(0,F.useState)(()=>{try{return JSON.parse(sessionStorage.getItem(e))??t}catch{return t}});return(0,F.useEffect)(()=>{try{e&&sessionStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),[n,r]},nx=({collapsed:e,disabled:t,initialCollapsed:n=e,storageKey:r})=>{let[i,a]=tx(r&&`useCollapsible:${r}`,!!n);(0,F.useEffect)(()=>{e!==void 0&&a(e)},[e,a]);let o=(0,F.useCallback)(e=>{e?.stopPropagation(),t||a(e=>!e)},[t,a]),s=B();return{contentId:s,isCollapsed:i,isDisabled:!!t,setCollapsed:a,toggleCollapsed:o,toggleProps:{disabled:t,onClick:o,"aria-controls":s,"aria-expanded":!i}}},rx=M({"0%":{opacity:0},"5%":{opacity:1},"25%":{opacity:1},"30%":{opacity:0}}),ix=M({"0%":{transform:`rotate(0deg)`},"10%":{transform:`rotate(10deg)`},"40%":{transform:`rotate(170deg)`},"50%":{transform:`rotate(180deg)`},"60%":{transform:`rotate(190deg)`},"90%":{transform:`rotate(350deg)`},"100%":{transform:`rotate(360deg)`}}),ax=M({to:{backgroundPositionX:`36%`}}),ox=N.div(({theme:e})=>({borderRadius:e.appBorderRadius,backgroundColor:e.background.content,position:`relative`})),sx=N.div(({animation:e=`none`,color:t,theme:n})=>({position:`relative`,width:`100%`,padding:1,overflow:`hidden`,backgroundColor:n.background.content,borderRadius:n.appBorderRadius+1,boxShadow:`inset 0 0 0 1px ${e===`none`&&t&&n.color[t]||n.appBorderColor}, var(--card-box-shadow, transparent 0 0)`,transition:`box-shadow 1s`,"@supports (interpolate-size: allow-keywords)":{interpolateSize:`allow-keywords`,transition:`all var(--transition-duration, 0.2s), box-shadow 1s`,transitionBehavior:`allow-discrete`},"@media (prefers-reduced-motion: reduce)":{transition:`box-shadow 1s`},"&:before":{content:`""`,display:e===`none`?`none`:`block`,position:`absolute`,left:0,top:0,width:`100%`,height:`100%`,opacity:1,...e===`rainbow`&&{animation:`${ax} 10s infinite linear, ${rx} 60s infinite linear`,backgroundImage:`linear-gradient(45deg,rgb(234, 0, 0),rgb(255, 157, 0),rgb(255, 208, 0),rgb(0, 172, 0),rgb(0, 166, 255),rgb(181, 0, 181), rgb(234, 0, 0),rgb(255, 157, 0),rgb(255, 208, 0),rgb(0, 172, 0),rgb(0, 166, 255),rgb(181, 0, 181))`,backgroundSize:`1000%`,backgroundPositionX:`100%`},...e===`spin`&&{left:`50%`,top:`50%`,marginLeft:`calc(max(100vw, 100vh) * -0.5)`,marginTop:`calc(max(100vw, 100vh) * -0.5)`,height:`max(100vw, 100vh)`,width:`max(100vw, 100vh)`,animation:`${ix} 3s linear infinite`,backgroundImage:t===`negative`?`conic-gradient(transparent 90deg, #FC521F 150deg, #FFAE00 210deg, transparent 270deg)`:`conic-gradient(transparent 90deg, #029CFD 150deg, #37D5D3 210deg, transparent 270deg)`}}}));Object.assign((0,F.forwardRef)(function({outlineAnimation:e=`none`,outlineColor:t,outlineAttrs:n={},...r},i){return F.createElement(sx,{animation:e,color:t,ref:i,...n},F.createElement(ox,{...r}))}),{Content:ox,Outline:sx});var{deprecate:cx}=__STORYBOOK_MODULE_CLIENT_LOGGER__,lx=[`preEnter`,`entering`,`entered`,`preExit`,`exiting`,`exited`,`unmounted`],ux=e=>({_s:e,status:lx[e],isEnter:e<3,isMounted:e!==6,isResolved:e===2||e>4}),dx=e=>e?6:5,fx=(e,t)=>{switch(e){case 1:case 0:return 2;case 4:case 3:return dx(t)}},px=e=>typeof e==`object`?[e.enter,e.exit]:[e,e],mx=(e,t)=>setTimeout(()=>{isNaN(document.body.offsetTop)||e(t+1)},0),hx=(e,t,n,r,i)=>{clearTimeout(r.current);let a=ux(e);t(a),n.current=a,i&&i({current:a})},gx=({enter:e=!0,exit:t=!0,preEnter:n,preExit:r,timeout:i,initialEntered:a,mountOnEnter:o,unmountOnExit:s,onStateChange:c}={})=>{let[l,u]=(0,F.useState)(()=>ux(a?2:dx(o))),d=(0,F.useRef)(l),f=(0,F.useRef)(),[p,m]=px(i),h=(0,F.useCallback)(()=>{let e=fx(d.current._s,s);e&&hx(e,u,d,f,c)},[c,s]);return[l,(0,F.useCallback)(i=>{let a=e=>{switch(hx(e,u,d,f,c),e){case 1:p>=0&&(f.current=setTimeout(h,p));break;case 4:m>=0&&(f.current=setTimeout(h,m));break;case 0:case 3:f.current=mx(a,e);break}},o=d.current.isEnter;typeof i!=`boolean`&&(i=!o),i?!o&&a(e?n?0:1:2):o&&a(t?r?3:4:dx(s))},[h,c,e,t,n,r,p,m,s]),h]};function _x(e){let t=e=>typeof window<`u`?window.matchMedia(e).matches:!1,[n,r]=(0,F.useState)(t(e));function i(){r(t(e))}return(0,F.useEffect)(()=>{let t=window.matchMedia(e);return i(),t.addEventListener(`change`,i),()=>{t.removeEventListener(`change`,i)}},[e]),n}var vx={};i(vx,{Actions:()=>Hx,Close:()=>Nx,CloseButton:()=>Fx,Col:()=>Rx,Container:()=>Mx,Content:()=>Ix,Description:()=>Vx,Dialog:()=>Px,Error:()=>Wx,ErrorWrapper:()=>Ux,Header:()=>zx,Overlay:()=>jx,Row:()=>Lx,Title:()=>Bx});var{deprecate:yx}=__STORYBOOK_MODULE_CLIENT_LOGGER__;(0,F.createContext)(null),(0,F.createContext)(null),(0,F.createContext)(null),(0,F.createContext)(null),(0,F.createContext)(null);var bx=(0,F.createContext)({}),xx=(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,bx);let{children:n,level:r=3,className:i,...a}=e,o=`h${r}`;return F.createElement(o,{...a,ref:t,className:i??`react-aria-Heading`},n)}),Sx=(0,F.createContext)({}),Cx=(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,Sx);let{elementType:n=`span`,...r}=e;return F.createElement(n,{className:`react-aria-Text`,...r,ref:t})}),wx=M({from:{opacity:0},to:{opacity:1}}),Tx=M({from:{opacity:1},to:{opacity:0}}),Ex=M({from:{maxHeight:0},to:{}}),Dx=M({from:{opacity:0,transform:`translate(-50%, -50%) scale(0.9)`},to:{opacity:1,transform:`translate(-50%, -50%) scale(1)`}}),Ox=M({from:{opacity:1,transform:`translate(-50%, -50%) scale(1)`},to:{opacity:0,transform:`translate(-50%, -50%) scale(0.9)`}}),kx=M({from:{opacity:0,maxHeight:`0px`},to:{opacity:1,maxHeight:`80vh`}}),Ax=M({from:{opacity:1,maxHeight:`80vh`},to:{opacity:0,maxHeight:`0px`}}),jx=N.div(({$status:e,$transitionDuration:t})=>({backdropFilter:`blur(24px)`,background:`rgba(0, 0, 0, 0.4)`,position:`absolute`,inset:0,width:`100%`,height:`100%`,zIndex:90,"@media (prefers-reduced-motion: no-preference)":{animation:e===`exiting`||e===`preExit`?`${Tx} ${t}ms`:`${wx} ${t}ms`,animationFillMode:`forwards`}})),Mx=N.div(({theme:e})=>({backgroundColor:e.background.bar,borderRadius:6,boxShadow:`0px 4px 67px 0px #00000040`,position:`absolute`,overflow:`auto`,zIndex:100,"&:focus-visible":{outline:`none`}}),({theme:e,width:t,height:n,$variant:r,$status:i,$transitionDuration:a})=>r===`dialog`?{top:`50%`,left:`50%`,width:t??740,height:n??`auto`,maxWidth:`calc(100% - 40px)`,maxHeight:`85vh`,"@media (prefers-reduced-motion: no-preference)":{willChange:`transform, opacity`,animationTimingFunction:`cubic-bezier(0.32, 0.72, 0, 1)`,animation:i===`exiting`||i===`preExit`?`${Ox} ${a}ms`:`${Dx} ${a}ms`,animationFillMode:`forwards !important`},"@media (prefers-reduced-motion: reduce)":{transform:`translate(-50%, -50%) scale(1)`}}:{bottom:`0`,left:`0`,right:`0`,borderRadius:`10px 10px 0 0`,overflow:`hidden`,width:t??`100%`,height:n??`80%`,maxWidth:`100%`,background:e.background.content,"@supports (interpolate-size: allow-keywords)":{interpolateSize:`allow-keywords`},"@media (prefers-reduced-motion: no-preference)":{animationTimingFunction:`cubic-bezier(.9,.16,.77,.64)`,animation:i===`exiting`||i===`preExit`?`${Ax} ${a}ms`:`${kx} ${a}ms`,animationFillMode:`forwards !important`}}),Nx=({asChild:e,children:t,onClick:n,...r})=>{let{close:i}=(0,F.useContext)(Gx);if(e&&F.isValidElement(t)){let e=e=>{n?.(e),t.props.onClick?.(e),i?.()};return F.cloneElement(t,{...r,onClick:e})}return F.createElement(Rb,{type:`button`,padding:`small`,ariaLabel:`Close modal`,variant:`ghost`,shortcut:[`Escape`],onClick:i},F.createElement(fe,null))},Px={Close:()=>(yx(`Modal.Dialog.Close is deprecated, please use Modal.Close instead.`),F.createElement(Nx,{"data-deprecated":`Modal.Dialog.Close`}))},Fx=({ariaLabel:e,...t})=>(yx(`Modal.CloseButton is deprecated, please use Modal.Close instead.`),F.createElement(Nx,{asChild:!0},F.createElement(Rb,{ariaLabel:e||`Close`,"data-deprecated":`Modal.CloseButton`,...t},F.createElement(fe,null)))),Ix=N.div({display:`flex`,flexDirection:`column`,margin:16,gap:16}),Lx=N.div({display:`flex`,justifyContent:`space-between`,gap:16}),Rx=N.div({display:`flex`,flexDirection:`column`,gap:4}),zx=({hasClose:e=!0,onClose:t,...n})=>F.createElement(Lx,null,F.createElement(Rx,{...n}),e&&F.createElement(Nx,{onClick:t})),Bx=N(e=>F.createElement(xx,{level:2,...e}))(({theme:e})=>({margin:0,fontSize:e.typography.size.s3,fontWeight:e.typography.weight.bold})),Vx=N(Cx)(({theme:e})=>({position:`relative`,zIndex:1,margin:0,fontSize:e.typography.size.s2})),Hx=N.div({display:`flex`,flexDirection:`row-reverse`,gap:8}),Ux=N.div(({theme:e})=>({maxHeight:100,overflow:`auto`,"@media (prefers-reduced-motion: no-preference)":{animation:`${Ex} 300ms, ${wx} 300ms`},backgroundColor:e.background.critical,color:e.color.lightest,fontSize:e.typography.size.s2,"& > div":{position:`relative`,padding:`8px 16px`}})),Wx=({children:e,...t})=>F.createElement(Ux,{...t},F.createElement(`div`,null,e)),Gx=(0,F.createContext)({});function Kx({container:e,portalSelector:t,children:n,width:r,height:i,ariaLabel:a,dismissOnClickOutside:o=!0,dismissOnEscape:s=!0,className:c,open:l,onEscapeKeyDown:u,onInteractOutside:d,onOpenChange:f,defaultOpen:p,transitionDuration:m=200,variant:h=`dialog`,...g}){let _;(a===void 0||a===``)&&(_=`ariaLabel`,cx("The `ariaLabel` prop on `Modal` will become mandatory in Storybook 11.")),u!==void 0&&(_=`onEscapeKeyDown`,cx("The `onEscapeKeyDown` prop is deprecated and will be removed in Storybook 11. Use `dismissOnEscape` instead.")),d!==void 0&&(_=`onInteractOutside`,cx("The `onInteractOutside` prop is deprecated and will be removed in Storybook 11. Use `dismissOnInteractOutside` instead."));let v=(0,F.useRef)(null),[{status:y,isMounted:b},x]=gx({timeout:_x(`(prefers-reduced-motion: reduce)`)?0:m,mountOnEnter:!0,unmountOnExit:!0}),S=yb({isOpen:l||b,defaultOpen:p,onOpenChange:e=>{x(e),f?.(e)}}),C=()=>{S.close()},{modalProps:w,underlayProps:T}=vb({isDismissable:o,isKeyboardDismissDisabled:!0,shouldCloseOnInteractOutside:d?e=>{let t=new MouseEvent(`click`,{bubbles:!0,cancelable:!0,relatedTarget:e});return d(t),!t.defaultPrevented}:void 0},S,v);if((0,F.useEffect)(()=>{let e=l??p??!1;e&&!b?x(!0):!e&&b&&x(!1)},[l,p,b,x]),(0,F.useEffect)(()=>{b&&(l||p)&&f?.(!0)},[b]),(0,F.useEffect)(()=>{if(b&&(l||p)&&v.current)return fb([v.current],{shouldUseInert:!0})},[b,l,p,v]),!b||y===`exited`||y===`unmounted`)return null;let E=W(w,{onKeyDown:e=>{e.key===`Escape`?s&&(u?.(e.nativeEvent),e.nativeEvent.defaultPrevented||C()):w.onKeyDown?.(e)}}),D=e??(t?document.querySelector(t):void 0);return F.createElement(gb,{disableFocusManagement:!0,portalContainer:D||void 0},F.createElement(Ev,{restoreFocus:!0,contain:!0,autoFocus:!0},F.createElement(jx,{$status:y,$transitionDuration:m,...T}),F.createElement(`div`,{role:`dialog`,"aria-label":a,ref:v,...E},F.createElement(Gx.Provider,{value:{close:C}},F.createElement(Mx,{"data-deprecated":_,$variant:h,$status:y,$transitionDuration:m,className:c,width:r,height:i,...g},n)))))}Object.assign(Kx,vx),N.div(({theme:e,col:t,row:n=1})=>t?{display:`inline-block`,verticalAlign:`inherit`,"& > *":{marginLeft:t*e.layoutMargin,verticalAlign:`inherit`},[`& > *:first-child${k}`]:{marginLeft:0}}:{"& > *":{marginTop:n*e.layoutMargin},[`& > *:first-child${k}`]:{marginTop:0}},({theme:e,outer:t,col:n,row:r})=>{switch(!0){case!!(t&&n):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&r):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),N.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),N.div(),N.div(({theme:e})=>({padding:30,textAlign:`center`,color:e.color.defaultText,fontSize:e.typography.size.s2-1}));function qx(e,t){var n=(0,F.useRef)(null),r=(0,F.useRef)(null);r.current=t;var i=(0,F.useRef)(null);(0,F.useEffect)(function(){a()});var a=(0,F.useCallback)(function(){var t=i.current,a=r.current,o=t||(a?a instanceof Element?a:a.current:null);n.current&&n.current.element===o&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:o,subscriber:e,cleanup:o?e(o):void 0})},[e]);return(0,F.useEffect)(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),(0,F.useCallback)(function(e){i.current=e,a()},[a])}function Jx(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t===`contentBoxSize`?e.contentRect[n===`inlineSize`?`width`:`height`]:void 0}function Yx(e){e===void 0&&(e={});var t=e.onResize,n=(0,F.useRef)(void 0);n.current=t;var r=e.round||Math.round,i=(0,F.useRef)(),a=(0,F.useState)({width:void 0,height:void 0}),o=a[0],s=a[1],c=(0,F.useRef)(!1);(0,F.useEffect)(function(){return c.current=!1,function(){c.current=!0}},[]);var l=(0,F.useRef)({width:void 0,height:void 0}),u=qx((0,F.useCallback)(function(t){return(!i.current||i.current.box!==e.box||i.current.round!==r)&&(i.current={box:e.box,round:r,instance:new ResizeObserver(function(t){var i=t[0],a=e.box===`border-box`?`borderBoxSize`:e.box===`device-pixel-content-box`?`devicePixelContentBoxSize`:`contentBoxSize`,o=Jx(i,a,`inlineSize`),u=Jx(i,a,`blockSize`),d=o?r(o):void 0,f=u?r(u):void 0;if(l.current.width!==d||l.current.height!==f){var p={width:d,height:f};l.current.width=d,l.current.height=f,n.current?n.current(p):c.current||s(p)}})}),i.current.instance.observe(t,{box:e.box}),function(){i.current&&i.current.instance.unobserve(t)}},[e.box,r]),e.ref);return(0,F.useMemo)(function(){return{ref:u,width:o.width,height:o.height}},[u,o.width,o.height])}var Xx=N.div(({centered:e=!1,scale:t=1,elementHeight:n})=>({height:n||`auto`,transformOrigin:e?`center top`:`left top`,transform:`scale(${1/t})`}));function Zx({centered:e,scale:t,children:n}){let r=(0,F.useRef)(null),[i,a]=(0,F.useState)(0),o=(0,F.useCallback)(({height:e})=>{e&&a(e/t)},[t]);return(0,F.useEffect)(()=>{r.current&&a(r.current.getBoundingClientRect().height)},[t]),Yx({ref:r,onResize:o}),F.createElement(Xx,{centered:e,scale:t,elementHeight:i},F.createElement(`div`,{ref:r,className:`innerZoomElementWrapper`},n))}var Qx={Element:Zx,IFrame:class extends F.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:n}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),n!==e.active&&this.iframe.setAttribute(`data-is-storybook`,e.active?`true`:`false`),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${1/e*100}%`,height:`${1/e*100}%`,transform:`scale(${e})`,transformOrigin:`top left`})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${1/e*100}%`,height:`${1/e*100}%`,transform:`scale(${e})`,transformOrigin:`top left`})}render(){let{children:e}=this.props;return F.createElement(F.Fragment,null,e)}}},{global:$x}=__STORYBOOK_MODULE_GLOBAL__,{document:eS}=$x,tS=N.strong(({theme:e})=>({color:e.color.orange})),nS=N.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:`underline`})),rS=N.em(({theme:e})=>({color:e.textMutedColor})),iS=/(Error): (.*)\n/,aS=/at (?:(.*) )?\(?(.+)\)?/,oS=/([^@]+)?(?:\/<)?@(.+)?/,sS=/([^@]+)?@(.+)?/,cS=({error:e})=>{if(!e)return F.createElement(F.Fragment,null,`This error has no stack or message`);if(!e.stack)return F.createElement(F.Fragment,null,e.message||`This error has no stack or message`);let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message}
|
|
49
|
+
|
|
50
|
+
${t}`);let n=t.match(iS);if(!n)return F.createElement(F.Fragment,null,t);let[,r,i]=n,[,...a]=t.split(/\n/).slice(1).map(e=>{let t=e.match(aS)||e.match(oS)||e.match(sS);return t?{name:(t[1]||``).replace(`/<`,``),location:t[2].replace(eS.location.origin,``)}:null}).filter(Boolean);return F.createElement(F.Fragment,null,F.createElement(`span`,null,r),`: `,F.createElement(tS,null,i),F.createElement(`br`,null),a.map((e,t)=>e?.name?F.createElement(F.Fragment,{key:t},` `,`at `,F.createElement(nS,null,e.name),` (`,F.createElement(rS,null,e.location),`)`,F.createElement(`br`,null)):F.createElement(F.Fragment,{key:t},` `,`at `,F.createElement(rS,null,e?.location),F.createElement(`br`,null))))},lS=N.input(({theme:e})=>({appearance:`none`,backgroundColor:e.input.background,border:`1px solid ${e.base===`dark`?`hsl(0 0 100 / 0.4)`:`hsl(0 0 0 / 0.44)`}`,borderRadius:2,display:`grid`,flexShrink:0,height:14,margin:0,placeContent:`center`,transition:`background-color 0.1s`,width:14,"&:enabled":{cursor:`pointer`},"&:disabled":{backgroundColor:`transparent`,borderColor:e.input.border},"&:disabled:checked, &:disabled:indeterminate":{backgroundColor:e.base===`dark`?P.dark:e.color.mediumdark},"&:checked, &:indeterminate":{border:`none`,backgroundColor:P.secondary},"&:checked::before":{content:`""`,width:14,height:14,background:`no-repeat center url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='m3 7 2.5 2.5L11 4'/%3E%3C/svg%3E")`},"&:indeterminate::before":{content:`""`,width:8,height:2,background:`white`},"&:enabled:focus-visible":{outline:`2px solid ${e.color.secondary}`,outlineOffset:2}})),uS=e=>F.createElement(lS,{...e,type:`checkbox`}),dS=N.label(({theme:e})=>({display:`flex`,borderBottom:`1px solid ${e.appBorderColor}`,margin:`0 15px`,padding:`8px 0`,"&:last-child":{marginBottom:`3rem`}})),fS=N.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:`flex`,justifyContent:`flex-start`,alignItems:`center`,lineHeight:`16px`})),pS=({label:e,children:t,...n})=>F.createElement(dS,{...n},e?F.createElement(fS,null,F.createElement(`span`,null,e)):null,t),mS=(({size:e})=>{switch(e){case`100%`:return{width:`100%`};case`flex`:return{flex:1};default:return{display:`inline`}}}),hS=(({align:e})=>{switch(e){case`end`:return{textAlign:`right`};case`center`:return{textAlign:`center`};default:return{textAlign:`left`}}}),gS=(({valid:e,theme:t})=>{switch(e){case`valid`:return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case`error`:return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case`warn`:return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:default:return{}}}),_S={appearance:`none`,border:`0 none`,boxSizing:`inherit`,display:`block`,margin:` 0`,background:`transparent`,padding:0,fontSize:`inherit`,position:`relative`},vS=(({theme:e})=>({..._S,transition:`box-shadow 200ms ease-out, opacity 200ms ease-out`,color:e.input.color||`inherit`,background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:`20px`,padding:`6px 10px`,boxSizing:`border-box`,height:32,'&[type="file"]':{height:`auto`},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:`none`,"@media (forced-colors: active)":{outline:`1px solid highlight`}},'&[disabled], &[aria-disabled="true"]':{background:e.base===`light`?e.color.lighter:`transparent`,cursor:`not-allowed`},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}})),yS=N.div({position:`relative`,width:`100%`}),bS=N.div(({theme:e})=>({position:`absolute`,left:0,right:0,top:0,bottom:0,display:`flex`,alignItems:`center`,pointerEvents:`none`,overflow:`hidden`,color:e.textMutedColor,"span:first-of-type":{opacity:0}}),e=>{let{fontSize:t,lineHeight:n,padding:r}=vS(e);return{fontSize:t,lineHeight:n,padding:r}}),xS=Object.assign(N((0,F.forwardRef)(function({size:e,valid:t,align:n,value:r,suffix:i,...a},o){let s=B();return F.createElement(yS,null,F.createElement(`input`,{...a,value:r,ref:o,"aria-describedby":i?s:void 0}),i&&F.createElement(bS,{"aria-hidden":!0},F.createElement(`span`,null,r),F.createElement(`span`,{id:s},i)))}))(vS,mS,hS,gS,{minHeight:32,width:`100%`}),{displayName:`Input`}),SS=N.input(({theme:e})=>({appearance:`none`,backgroundColor:e.input.background,border:`1px solid ${e.base===`dark`?`hsl(0 0 100 / 0.4)`:`hsl(0 0 0 / 0.44)`}`,borderRadius:8,display:`grid`,flexShrink:0,height:16,margin:-1,placeContent:`center`,transition:`background-color 0.1s`,width:16,"&:enabled":{cursor:`pointer`},"&:disabled":{backgroundColor:`transparent`,borderColor:e.input.border},"&:disabled:checked":{backgroundColor:e.base===`dark`?P.dark:e.color.mediumdark,borderColor:e.base===`dark`?P.dark:e.color.mediumdark},"&:checked":{backgroundColor:P.secondary,borderColor:P.secondary,boxShadow:`inset 0 0 0 2px ${e.input.background}`},"&:enabled:focus-visible":{outline:`2px solid ${e.color.secondary}`,outlineOffset:2}})),CS=e=>F.createElement(SS,{...e,type:`radio`}),wS=N.select(mS,({theme:e})=>({appearance:`none`,background:`calc(100% - 12px) center no-repeat url("data:image/svg+xml,%3Csvg width='8' height='4' viewBox='0 0 8 4' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1.30303 0.196815C1.13566 0.0294472 0.864304 0.0294472 0.696937 0.196815C0.529569 0.364182 0.529569 0.635539 0.696937 0.802906L3.69694 3.80291C3.8643 3.97027 4.13566 3.97027 4.30303 3.80291L7.30303 0.802906C7.4704 0.635539 7.4704 0.364182 7.30303 0.196815C7.13566 0.0294473 6.8643 0.0294473 6.69694 0.196815L3.99998 2.89377L1.30303 0.196815Z' fill='%2373828C'/%3E%3C/svg%3E%0A")`,backgroundSize:10,padding:`6px 30px 6px 10px`,"@supports (appearance: base-select)":{appearance:`base-select`,background:e.input.background,padding:`6px 10px`},transition:`box-shadow 200ms ease-out, opacity 200ms ease-out`,color:e.input.color||`inherit`,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:`20px`,boxSizing:`border-box`,border:`none`,cursor:`pointer`,"& > button":{display:`flex`,alignItems:`center`,justifyContent:`space-between`,width:`100%`,gap:8,"& > svg":{width:14,height:14,color:e.textMutedColor}},"&:has(option:not([hidden]):checked)":{color:e.color.defaultText},"&:focus-visible, &:focus-within":{outline:`none`,boxShadow:`${e.color.secondary} 0 0 0 1px inset`},"&::picker-icon":{display:`none`},"&::picker(select)":{appearance:`base-select`,border:`1px solid ${e.input.border}`,padding:4,marginTop:4,background:e.base===`light`?E(e.background.app):e.background.app,filter:`
|
|
51
|
+
drop-shadow(0 5px 5px rgba(0,0,0,0.05))
|
|
52
|
+
drop-shadow(0 0 3px rgba(0,0,0,0.1))
|
|
53
|
+
`,borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1,cursor:`default`,transition:`opacity 100ms ease-in-out, transform 100ms ease-in-out`,transformOrigin:`top`,transform:`translateY(0)`,opacity:1,"@starting-style":{transform:`translateY(-0.25rem) scale(0.95)`,opacity:0}},"& optgroup label":{display:`block`,padding:`3px 6px`},"& option":{lineHeight:`18px`,padding:`7px 10px`,borderRadius:4,outline:`none`,cursor:`pointer`,color:e.color.defaultText,"&::checkmark":{display:`none`},"&:hover, &:focus-visible":{backgroundColor:e.background.hoverable},"&:checked":{color:e.color.secondary,fontWeight:e.typography.weight.bold},"&:disabled":{backgroundColor:`transparent`,cursor:`default`,color:e.color.defaultText}}})),TS=({children:e,...t})=>F.createElement(wS,{...t},!a()&&F.createElement(`button`,null,F.createElement(`selectedcontent`,null),F.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},F.createElement(`path`,{d:`m6 9 6 6 6-6`}))),F.createElement(`optgroup`,null,e)),ES=F.useLayoutEffect,DS=function(e){var t=F.useRef(e);return ES(function(){t.current=e}),t},OS=function(e,t){if(typeof e==`function`){e(t);return}e.current=t},kS=function(e,t){var n=F.useRef();return F.useCallback(function(r){e.current=r,n.current&&OS(n.current,null),n.current=t,t&&OS(t,r)},[t])},AS={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`},jS=function(e){Object.keys(AS).forEach(function(t){e.style.setProperty(t,AS[t],`important`)})},MS=null,NS=function(e,t){var n=e.scrollHeight;return t.sizingStyle.boxSizing===`border-box`?n+t.borderSize:n-t.paddingSize};function PS(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),MS||(MS=document.createElement(`textarea`),MS.setAttribute(`tabindex`,`-1`),MS.setAttribute(`aria-hidden`,`true`),jS(MS)),MS.parentNode===null&&document.body.appendChild(MS);var i=e.paddingSize,a=e.borderSize,o=e.sizingStyle,s=o.boxSizing;Object.keys(o).forEach(function(e){var t=e;MS.style[t]=o[t]}),jS(MS),MS.value=t;var c=NS(MS,e);MS.value=t,c=NS(MS,e),MS.value=`x`;var l=MS.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);var d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}var FS=function(){},IS=function(e,t){return e.reduce(function(e,n){return e[n]=t[n],e},{})},LS=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],RS=!!document.documentElement.currentStyle,zS=function(e){var t=window.getComputedStyle(e);if(t===null)return null;var n=IS(LS,t),r=n.boxSizing;return r===``?null:(RS&&r===`border-box`&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+`px`),{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)})};function BS(e,t,n){var r=DS(n);F.useLayoutEffect(function(){var n=function(e){return r.current(e)};if(e)return e.addEventListener(t,n),function(){return e.removeEventListener(t,n)}},[])}var VS=function(e,t){BS(document.body,`reset`,function(n){e.current.form===n.target&&t(n)})},HS=function(e){BS(window,`resize`,e)},US=function(e){BS(document.fonts,`loadingdone`,e)},WS=[`cacheMeasurements`,`maxRows`,`minRows`,`onChange`,`onHeightChange`],GS=F.forwardRef(function(e,t){var n=e.cacheMeasurements,r=e.maxRows,i=e.minRows,a=e.onChange,o=a===void 0?FS:a,s=e.onHeightChange,c=s===void 0?FS:s,l=ae(e,WS),u=l.value!==void 0,d=F.useRef(null),f=kS(d,t),p=F.useRef(0),m=F.useRef(),h=function(){var e=d.current,t=n&&m.current?m.current:zS(e);if(t){m.current=t;var a=PS(t,e.value||e.placeholder||`x`,i,r),o=a[0],s=a[1];p.current!==o&&(p.current=o,e.style.setProperty(`height`,o+`px`,`important`),c(o,{rowHeight:s}))}};return F.useLayoutEffect(h),VS(d,function(){if(!u){var e=d.current.value;requestAnimationFrame(function(){var t=d.current;t&&e!==t.value&&h()})}}),HS(h),US(h),F.createElement(`textarea`,te({},l,{onChange:function(e){u||h(),o(e)},ref:f}))}),KS=Object.assign(N((0,F.forwardRef)(function({size:e,valid:t,align:n,...r},i){return F.createElement(GS,{...r,ref:i})}))(vS,mS,hS,gS,({height:e=400})=>({overflow:`visible`,maxHeight:e})),{displayName:`Textarea`}),qS=Object.assign(N.form({boxSizing:`border-box`,width:`100%`}),{Field:pS,Input:xS,Select:TS,Textarea:KS,Button:Rb,Checkbox:uS,Radio:CS}),JS=N.div(({hasCloseButton:e,padding:t})=>({display:`inline-block`,position:`relative`,minHeight:e?36:void 0,zIndex:2147483647,colorScheme:`light dark`,padding:t}),({theme:e,hasChrome:t})=>t?{filter:`
|
|
54
|
+
drop-shadow(0px 5px 5px rgba(0,0,0,0.05))
|
|
55
|
+
drop-shadow(0 1px 3px rgba(0,0,0,0.1))
|
|
56
|
+
`,borderRadius:e.appBorderRadius+2,fontSize:e.typography.size.s1}:{},({theme:e,bgColor:t})=>t===`default`&&{background:e.base===`light`?E(e.background.app):e.background.app,color:e.color.defaultText},({theme:e,bgColor:t})=>t===`inverse`&&{background:e.base===`light`?e.color.darkest:e.color.lightest,color:e.color.inverseText},({theme:e,bgColor:t})=>(t===`positive`||t===`negative`||t===`warning`)&&{background:e.background[t],color:e.color[`${t}Text`]}),YS=N(Rb)({position:`absolute`,top:4,right:4}),XS=(0,F.forwardRef)(({children:e,color:t=`default`,hasChrome:n=!0,hideLabel:r=`Close`,onHide:i,padding:a=8,...o},s)=>F.createElement(JS,{bgColor:t,hasChrome:n,hasCloseButton:!!i,padding:a,ref:s,...o},e,i&&F.createElement(YS,{ariaLabel:r,onClick:i,padding:`small`,variant:`ghost`,size:`small`},F.createElement(he,null))));XS.displayName=`Popover`;var ZS=({id:e,title:t,description:n,icon:r,aside:i,children:a,isSelected:o,isActive:s,onClick:c,onFocus:l,onKeyDown:u,shouldLookDisabled:d=!1,...f})=>F.createElement($b.Item,{...f,id:e,role:`option`,tabIndex:s?0:-1,"aria-selected":o,"aria-disabled":d?!0:void 0,onClick:c,onFocus:l,onKeyDown:u},a??F.createElement(F.Fragment,null,r&&F.createElement($b.Icon,null,r),F.createElement($b.Text,null,F.createElement(`p`,null,t),n&&F.createElement(`small`,null,n)),i));ZS.displayName=`SelectOption`;var QS=5,$S=Symbol.for(`undefined`);function eC(e){return e==null||typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`symbol`}function tC(e){return{...e,type:`option`,value:iC(e.value)}}function nC(e){return`type`in e&&e.type===`reset`?e:tC(e)}function rC(e){if(e!==$S)return e}function iC(e){return e===void 0?$S:e}var aC=N(`ul`)({minWidth:180,height:`100%`,borderRadius:6,overflow:`hidden auto`,listStyle:`none`,margin:0,padding:4});function oC(e,{value:t}){return`${e}-opt-${String(t)??`sb-reset`}`}var sC=N.span(({theme:e})=>({appearance:`none`,color:e.textMutedColor,fontSize:12}));function cC(e,t){return t===void 0?[]:eC(t)?e.filter(e=>e.value===t).map(tC):e.filter(e=>t.some(t=>e.value===t)).map(tC)}var lC=N(Rb)(({$isOpen:e,$hasSelection:t,theme:n})=>e||t?{boxShadow:`none`,background:C(.93,n.barSelectedColor),color:n.base===`light`?O(.1,n.color.secondary):n.color.secondary}:{}),uC=N.div({position:`fixed`,inset:0,zIndex:1e3}),dC=({children:e,handleClose:t,triggerRef:n})=>{let r=F.useRef(null);xh({ref:r,onInteractOutside:t}),(0,F.useEffect)(()=>{if(r.current)return fb([r.current],{shouldUseInert:!0})},[]);let{overlayProps:i}=xv({targetRef:n,overlayRef:r,placement:`bottom start`,offset:8,maxHeight:504,isOpen:!0}),{overlayProps:a,underlayProps:o}=ry({isOpen:!0,onClose:t,isDismissable:!0,shouldCloseOnBlur:!1,isKeyboardDismissDisabled:!0},r),s=A();return i.style={...i.style,overflow:`hidden auto`,scrollbarColor:`${s.barTextColor} transparent`,scrollbarWidth:`thin`},F.createElement(gb,{disableFocusManagement:!0,...a},F.createElement(uC,{...o}),F.createElement(XS,{hasChrome:!0,ref:r,padding:0,...i},e))},fC=(0,F.forwardRef)(({children:e,icon:t,disabled:n=!1,options:r,defaultOptions:i,multiSelect:a=!1,onReset:o,padding:s=`small`,resetLabel:c,onSelect:l,onDeselect:u,onChange:d,tooltip:f,ariaLabel:p,showSelectedOptionTitle:m=!0,...h},g)=>{let[_,v]=(0,F.useState)(h.defaultOpen||!1),[y,b]=(0,F.useState)(!1),x=gp(g),S=(0,F.useMemo)(()=>`select-`+Math.random().toString(36).substring(2,15),[]),C=`${S}-listbox`,w=(0,F.useRef)(null),T=yb({isOpen:_&&!n,onOpenChange:v}),E=(0,F.useCallback)(()=>{v(!1),b(!0)},[]);(0,F.useEffect)(()=>{!T.isOpen&&y&&(x.current?.focus(),b(!1))},[T.isOpen,y,x]);let[D,O]=(0,F.useState)(cC(r,i)),k=(0,F.useCallback)(e=>{e.type===`reset`?(d?.([]),o?.(),O([])):O(a?t=>{let n=[];return t?.some(t=>t.value===e.value)?(u?.(rC(e.value)),n=t?.filter(t=>t.value!==e.value)??[]):(l?.(rC(e.value)),n=[...t??[],e]),d?.(n.map(e=>rC(e.value))),n}:t=>t.every(t=>t.value!==e.value)?(l?.(rC(e.value)),d?.([rC(e.value)]),[e]):t)},[a,d,l,u,o]),A=(0,F.useMemo)(()=>o?{type:`reset`,value:void 0,title:c??`Reset selection`,icon:F.createElement(Ee,null),description:void 0,children:void 0}:void 0,[o,c]),j=(0,F.useMemo)(()=>A?[A,...r]:r,[r,A]);(0,F.useEffect)(()=>{i&&O(cC(r,i))},[i,r]);let[M,N]=(0,F.useState)(void 0),P=(0,F.useCallback)((e,t=!0)=>{N(nC(e)),!a&&t&&k(nC(e))},[a,k]),ee=(0,F.useCallback)((e=1)=>{if(!_||!M){P(j[e===1?0:Math.min(e,j.length-1)]);return}let t=j.findIndex(e=>M.type===`reset`?`type`in e&&e.type===`reset`:iC(e.value)===M.value),n=t+e,r;r=n>=j.length&&t===j.length-1?j[0]:j[Math.min(j.length-1,n)],P(r)},[_,M,P,j]),te=(0,F.useCallback)((e=1)=>{if(!_||!M){P(j[Math.max(0,j.length-e)]);return}let t=j.findIndex(e=>M.type===`reset`?`type`in e&&e.type===`reset`:iC(e.value)===M.value),n=t-e,r;r=n<0&&t===0?j[j.length-1]:j[Math.max(0,n)],P(r)},[_,M,P,j]),ne=(0,F.useCallback)(e=>{let t=t=>{e.preventDefault(),P(j[t]),v(!0)},n=j.findIndex(e=>D.some(t=>t.value===iC(e.value))),r=n!==-1,i=A&&!r?1:0,a=j.length-1;e.key===`Enter`||e.key===` `?t(r?Math.min(n,a):i):e.key===`ArrowDown`?t(r?Math.min(n+1,a):i):e.key===`ArrowUp`?t(r?Math.max(n-1,i):a):e.key===`Home`?t(i):e.key===`End`?t(a):e.key===`PageDown`?t(Math.min((r?n:i)+QS,a)):e.key===`PageUp`&&t(Math.max(0,(r?n:a)-QS))},[j,A,P,D]),re=(0,F.useCallback)(e=>{e.key===`Tab`?E():e.preventDefault(),e.key===`Escape`?E():e.key===`ArrowDown`?ee():e.key===`ArrowUp`?te():e.key===`Home`?P(j[0]):e.key===`End`?P(j[j.length-1]):e.key===`PageDown`?ee(QS):e.key===`PageUp`&&te(QS)},[E,ee,te,j,P]);(0,F.useEffect)(()=>{if(_&&M){let e=document.getElementById(oC(S,M));e&&(e.scrollIntoView({block:`nearest`}),e.focus())}else _&&w.current?.focus()},[_,M,S]);let ie=(0,F.useMemo)(()=>D.length===1?`${p} ${D[0].title}`:D.length?`${p}, ${D.length} values selected`:p,[p,D]);return F.createElement(F.Fragment,null,F.createElement(lC,{...h,variant:`ghost`,ariaLabel:ie,tooltip:f??p,disableAllTooltips:_,id:S,ref:x,padding:s,$isOpen:_,$hasSelection:!!D.length,"aria-disabled":n,disabled:n,onClick:()=>{_?E():v(!0)},tabIndex:_?-1:0,onKeyDown:ne,role:`button`,"aria-controls":_?C:void 0,"aria-expanded":_,"aria-haspopup":`listbox`},!a&&F.createElement(F.Fragment,null,t,m&&D[0]?.title||e),a&&F.createElement(F.Fragment,null,t,e,!!D.length&&F.createElement(sC,{"aria-label":`${D.length} ${D.length>1?`items`:`item`} selected`},D?.length))),T.isOpen&&F.createElement(dC,{handleClose:E,triggerRef:x},F.createElement(aC,{"aria-label":p,role:`listbox`,id:C,ref:w,"aria-multiselectable":a,onKeyDown:re,tabIndex:_?0:-1},j.map(e=>({option:nC(e),externalOption:e})).map(({externalOption:e,option:t})=>{let n=D?.some(e=>e.value===t.value)&&t!==A,r=t===A;return F.createElement(ZS,{key:t.value===void 0?`sb-reset`:String(t.value),title:t.title,description:t.description,aside:t.aside,icon:!r&&a?F.createElement(qS.Checkbox,{checked:n,hidden:!0,role:`presentation`}):t.icon,id:oC(S,t),isActive:_&&M?.value===t.value,isSelected:n,onClick:()=>{k(t),a||E()},onFocus:()=>P(e,!1),shouldLookDisabled:r&&D.length===0&&a,onKeyDown:e=>{e.key===`Enter`||e.key===` `?(e.preventDefault(),k(t),a||E()):e.key===`Tab`&&(a||k(t),E())}},t.children)}))))});fC.displayName=`Select`;var pC=class{get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}},mC=class extends pC{filter(e,t,n){let[r,i]=bC(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}},hC=class extends pC{};hC.type=`header`;var gC=class extends pC{};gC.type=`loader`;var _C=class extends mC{filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};_C.type=`item`;var vC=class extends mC{filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}};vC.type=`section`;var yC=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=bC(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};function bC(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey?e.getItem(o.nextKey):null}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e?(a=t.getItem(e),a.nextKey=null):a=null}return[i?.key??null,a?.key??null]}var xC=class{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}},SC=class e extends xC{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+(this.node?.type===`item`?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){var t,n,r,i,a,o,s;let c=this.nextVisibleSibling,l=this.getMutableNode();if(l!=null){l.index=this.index,l.level=this.level;var u;if(l.parentKey=this.parentNode instanceof e&&(u=this.parentNode.node?.key)!=null?u:null,l.prevKey=((n=this.previousVisibleSibling)==null||(t=n.node)==null?void 0:t.key)??null,l.nextKey=(c==null||(r=c.node)==null?void 0:r.key)??null,l.hasChildNodes=!!this.firstChild,l.firstChildKey=((a=this.firstVisibleChild)==null||(i=a.node)==null?void 0:i.key)??null,l.lastChildKey=((s=this.lastVisibleChild)==null||(o=s.node)==null?void 0:o.key)??null,(l.colSpan!=null||l.colIndex!=null)&&c){let e=(l.colIndex??l.index)+(l.colSpan??1);if(c.node!=null&&e!==c.node.colIndex){let t=c.getMutableNode();t.colIndex=e}}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}},CC=class extends xC{get isConnected(){return this.isMounted}createElement(e){return new SC(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){if(e.node!=null){for(let t of e)this.removeNode(t);this.getMutableCollection().removeNode(e.node.key)}}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof SC&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof SC&&(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,t,n,r;this.nextCollection.commit(((t=this.firstVisibleChild)==null||(e=t.node)==null?void 0:e.key)??null,((r=this.lastVisibleChild)==null||(n=r.node)==null?void 0:n.key)??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}};function wC(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,F.useMemo)(()=>new WeakMap,a);return(0,F.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=o.get(a);if(!n){n=t(a);let e=n.props.id??a.key??a.id;if(e==null)throw Error(`Could not determine key for item`);r&&(e=r+`:`+e),n=(0,F.cloneElement)(n,i?{key:e,id:e,value:a}:{key:e}),o.set(a,n)}e.push(n)}return e}else if(typeof t!=`function`)return t},[t,n,o,r,i])}if(typeof HTMLTemplateElement<`u`){let e=Object.getOwnPropertyDescriptor(Node.prototype,`firstChild`).get;Object.defineProperty(HTMLTemplateElement.prototype,`firstChild`,{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}var TC=(0,F.createContext)(!1);function EC(e){if((0,F.useContext)(TC))return F.createElement(F.Fragment,null,e.children);let t=F.createElement(TC.Provider,{value:!0},e.children);return F.createElement(`template`,{"data-react-aria-hidden":!0},t)}function DC(e){let t=(t,n)=>(0,F.useContext)(TC)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,F.forwardRef)(t)}function OC(){return(0,F.useContext)(TC)}var kC=(0,F.createContext)(!1),AC=(0,F.createContext)(null);function jC(e){if((0,F.useContext)(AC))return e.content;let{collection:t,document:n}=FC(e.createCollection);return F.createElement(F.Fragment,null,F.createElement(EC,null,F.createElement(AC.Provider,{value:n},e.content)),F.createElement(MC,{render:e.children,collection:t}))}function MC({collection:e,render:t}){return t(e)}function NC(e,t,n){let r=ff(),i=(0,F.useRef)(r);return i.current=r,(0,qu.useSyncExternalStore)(e,(0,F.useCallback)(()=>i.current?n():t(),[t,n]))}var PC=typeof F.useSyncExternalStore==`function`?F.useSyncExternalStore:NC;function FC(e){let[t]=(0,F.useState)(()=>new CC(e?.()||new yC)),n=PC((0,F.useCallback)(e=>t.subscribe(e),[t]),(0,F.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,F.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t]));return z(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:n,document:t}}var IC=(0,F.createContext)(null);function LC(e){var t;return t=class extends pC{},t.type=e,t}function RC(e,t,n,r,i,a){typeof e==`string`&&(e=LC(e));let o=(0,F.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,F.useContext)(IC);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?F.createElement(IC.Provider,{value:o},i):null}return F.createElement(e.type,{ref:o},i)}function zC(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,F.forwardRef)((r,i)=>{let a=(0,F.useContext)(oh);if(!(0,F.useContext)(kC)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return RC(e,r,i,`children`in r?r.children:null,null,e=>F.createElement(oh.Provider,{value:a},F.createElement(n,{node:e})))});return r.displayName=t.name,r}function BC(e,t,n=VC){let r=({node:e})=>t(e.props,e.props.ref,e),i=(0,F.forwardRef)((t,i)=>RC(e,t,i,null,n(t),e=>F.createElement(r,{node:e}))??F.createElement(F.Fragment,null));return i.displayName=t.name,i}function VC(e){return wC({...e,addIdAndValue:!0})}var HC=(0,F.createContext)(null);function UC(e){let t=(0,F.useContext)(HC),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope||t?.idScope,i=VC({...e,idScope:r,dependencies:n});return(0,F.useContext)(AC)&&(i=F.createElement(WC,null,i)),t=(0,F.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),F.createElement(HC.Provider,{value:t},i)}function WC({children:e}){let t=(0,F.useContext)(AC),n=(0,F.useMemo)(()=>F.createElement(AC.Provider,{value:null},F.createElement(kC.Provider,{value:!0},e)),[e]);return ff()?F.createElement(IC.Provider,{value:t},n):(0,Ku.createPortal)(n,t)}var GC=(0,F.createContext)({});DC(function(e,t){[e,t]=q(e,t,GC);let{elementType:n=`label`,...r}=e;return F.createElement(n,{className:`react-aria-Label`,...r,ref:t})});function KC(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:a=`label`}=e;t=B(t);let o=B(),s={};n&&(r=r?`${o} ${r}`:o,s={id:o,htmlFor:a===`label`?t:void 0});let c=hp({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:c}}function qC(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:a,formatOptions:o={style:`percent`}}=e,s=G(e,{labelable:!0}),{labelProps:c,fieldProps:l}=KC({...e,labelElementType:`span`});t=tm(t,n,r);let u=(t-n)/(r-n),d=_v(o);if(!a&&!i){let e=o.style===`percent`?u:t;i=d.format(e)}return{progressBarProps:W(s,{...l,"aria-valuenow":a?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":a?void 0:i,role:`progressbar`}),labelProps:c}}var JC=(0,F.createContext)(null);(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,JC);let{value:n=0,minValue:r=0,maxValue:i=100,isIndeterminate:a=!1}=e;n=tm(n,r,i);let[o,s]=kh(!e[`aria-label`]&&!e[`aria-labelledby`]),{progressBarProps:c,labelProps:l}=qC({...e,label:s}),u=a?void 0:(n-r)/(i-r)*100,d=Dh({...e,defaultClassName:`react-aria-ProgressBar`,values:{percentage:u,valueText:c[`aria-valuetext`],isIndeterminate:a}}),f=G(e,{global:!0});return F.createElement(`div`,{...W(f,d,c),ref:t,slot:e.slot||void 0},F.createElement(GC.Provider,{value:{...l,ref:o,elementType:`span`}},d.children))});var YC=null;function XC(e,t=`assertive`,n=7e3){YC?YC.announce(e,t,n):(YC=new ZC,(typeof IS_REACT_ACT_ENVIRONMENT==`boolean`?IS_REACT_ACT_ENVIRONMENT:typeof jest<`u`)?YC.announce(e,t,n):setTimeout(()=>{YC?.isAttached()&&YC?.announce(e,t,n)},100))}var ZC=class{isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement(`div`);return t.setAttribute(`role`,`log`),t.setAttribute(`aria-live`,e),t.setAttribute(`aria-relevant`,`additions`),t}destroy(){this.node&&=(document.body.removeChild(this.node),null)}announce(e,t=`assertive`,n=7e3){var r,i;if(!this.node)return;let a=document.createElement(`div`);typeof e==`object`?(a.setAttribute(`role`,`img`),a.setAttribute(`aria-labelledby`,e[`aria-labelledby`])):a.textContent=e,t===`assertive`?(r=this.assertiveLog)==null||r.appendChild(a):(i=this.politeLog)==null||i.appendChild(a),e!==``&&setTimeout(()=>{a.remove()},n)}clear(e){this.node&&((!e||e===`assertive`)&&this.assertiveLog&&(this.assertiveLog.innerHTML=``),(!e||e===`polite`)&&this.politeLog&&(this.politeLog.innerHTML=``))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<`u`&&(this.node=document.createElement(`div`),this.node.dataset.liveAnnouncer=`true`,Object.assign(this.node.style,{border:0,clip:`rect(0 0 0 0)`,clipPath:`inset(50%)`,height:`1px`,margin:`-1px`,overflow:`hidden`,padding:0,position:`absolute`,width:`1px`,whiteSpace:`nowrap`}),this.assertiveLog=this.createLog(`assertive`),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog(`polite`),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}};function QC(e,t){let{elementType:n=`button`,isDisabled:r,onPress:i,onPressStart:a,onPressEnd:o,onPressUp:s,onPressChange:c,preventFocusOnPress:l,allowFocusWhenDisabled:u,onClick:d,href:f,target:p,rel:m,type:h=`button`}=e,g;g=n===`button`?{type:h,disabled:r,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:`button`,href:n===`a`&&!r?f:void 0,target:n===`a`?p:void 0,type:n===`input`?h:void 0,disabled:n===`input`?r:void 0,"aria-disabled":!r||n===`input`?void 0:r,rel:n===`a`?m:void 0};let{pressProps:_,isPressed:v}=Em({onPressStart:a,onPressEnd:o,onPressChange:c,onPress:i,onPressUp:s,onClick:d,isDisabled:r,preventFocusOnPress:l,ref:t}),{focusableProps:y}=lh(e,t);u&&(y.tabIndex=r?-1:y.tabIndex);let b=W(y,_,G(e,{labelable:!0}));return{isPressed:v,buttonProps:W(g,b,{"aria-haspopup":e[`aria-haspopup`],"aria-expanded":e[`aria-expanded`],"aria-controls":e[`aria-controls`],"aria-pressed":e[`aria-pressed`],"aria-current":e[`aria-current`],"aria-disabled":e[`aria-disabled`]})}}var $C=(0,F.createContext)({});DC(function(e,t){[e,t]=q(e,t,$C),e=ew(e);let n=e,{isPending:r}=n,{buttonProps:i,isPressed:a}=QC(e,t),{focusProps:o,isFocused:s,isFocusVisible:c}=Xv(e),{hoverProps:l,isHovered:u}=bh({...e,isDisabled:e.isDisabled||r}),d={isHovered:u,isPressed:(n.isPressed||a)&&!r,isFocused:s,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:r??!1},f=Dh({...e,values:d,defaultClassName:`react-aria-Button`}),p=B(i.id),m=B(),h=i[`aria-labelledby`];r&&(h?h=`${h} ${m}`:i[`aria-label`]&&(h=`${p} ${m}`));let g=(0,F.useRef)(r);(0,F.useEffect)(()=>{let e={"aria-labelledby":h||p};(!g.current&&s&&r||g.current&&s&&!r)&&XC(e,`assertive`),g.current=r},[r,s,h,p]);let _=G(e,{global:!0});return delete _.onClick,F.createElement(`button`,{...W(_,f,i,o,l),type:i.type===`submit`&&r?`button`:i.type,id:p,ref:t,"aria-labelledby":h,slot:e.slot||void 0,"aria-disabled":r?`true`:i[`aria-disabled`],"data-disabled":e.isDisabled||void 0,"data-pressed":d.isPressed||void 0,"data-hovered":u||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":c||void 0},F.createElement(JC.Provider,{value:{id:m}},f.children))});function ew(e){return e.isPending&&(e.onPress=void 0,e.onPressStart=void 0,e.onPressEnd=void 0,e.onPressChange=void 0,e.onPressUp=void 0,e.onKeyDown=void 0,e.onKeyUp=void 0,e.onClick=void 0,e.href=void 0),e}var tw=(0,F.createContext)(null),nw=(0,F.createContext)(null),rw=(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,tw);let n=(0,F.useContext)(DT),r=yb(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,a=Vp(t,i.isOpen)||e.isExiting||!1,o=OC(),{direction:s}=pg();if(o){let t=e.children;return typeof t==`function`&&(t=t({trigger:e.trigger||null,placement:`bottom`,isEntering:!1,isExiting:!1,defaultChildren:null})),F.createElement(F.Fragment,null,t)}return i&&!i.isOpen&&!a?null:F.createElement(iw,{...e,triggerRef:e.triggerRef,state:i,popoverRef:t,isExiting:a,dir:s})});function iw({state:e,isExiting:t,UNSTABLE_portalContainer:n,clearContexts:r,...i}){let a=(0,F.useRef)(null),o=(0,F.useRef)(null),s=(0,F.useContext)(nw),c=s&&i.trigger===`SubmenuTrigger`,{popoverProps:l,underlayProps:u,arrowProps:d,placement:f,triggerAnchorPoint:p}=mb({...i,offset:i.offset??8,arrowRef:a,groupRef:c?s:o},e),m=i.popoverRef,h=Bp(m,!!f)||i.isEntering||!1,g=Dh({...i,defaultClassName:`react-aria-Popover`,values:{trigger:i.trigger||null,placement:f,isEntering:h,isExiting:t}}),_=!i.isNonModal||i.trigger===`SubmenuTrigger`,[v,y]=(0,F.useState)(!1);z(()=>{m.current&&y(_&&!m.current.querySelector(`[role=dialog]`))},[m,_]),(0,F.useEffect)(()=>{v&&i.trigger!==`SubmenuTrigger`&&m.current&&!m.current.contains(document.activeElement)&&nh(m.current)},[v,m,i.trigger]);let b=(0,F.useMemo)(()=>{let e=g.children;if(r)for(let t of r)e=F.createElement(t.Provider,{value:null},e);return e},[g.children,r]),x={...l.style,"--trigger-anchor-point":p?`${p.x}px ${p.y}px`:void 0,...g.style},S=F.createElement(`div`,{...W(G(i,{global:!0}),l),...g,role:v?`dialog`:void 0,tabIndex:v?-1:void 0,"aria-label":i[`aria-label`],"aria-labelledby":i[`aria-labelledby`],ref:m,slot:i.slot||void 0,style:x,dir:i.dir,"data-trigger":i.trigger,"data-placement":f,"data-entering":h||void 0,"data-exiting":t||void 0},!i.isNonModal&&F.createElement(cb,{onDismiss:e.close}),F.createElement(Ah.Provider,{value:{...d,placement:f,ref:a}},b),F.createElement(cb,{onDismiss:e.close}));return c?F.createElement(gb,{...i,shouldContainFocus:v,isExiting:t,portalContainer:n??s?.current??void 0},S):F.createElement(gb,{...i,shouldContainFocus:v,isExiting:t,portalContainer:n},!i.isNonModal&&e.isOpen&&F.createElement(`div`,{"data-testid":`underlay`,...u,style:{position:`fixed`,inset:0}}),F.createElement(`div`,{ref:o,style:{display:`contents`}},F.createElement(nw.Provider,{value:o},S)))}var aw=(0,F.createContext)(null);BC(`section`,(e,t,n)=>{let{name:r,render:i}=(0,F.useContext)(aw);return i(e,t,n,`react-aria-Section`)});var ow={CollectionRoot({collection:e,renderDropIndicator:t}){return sw(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return sw(e,t,n)}};function sw(e,t,n){return wC({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){let r=t.render(t);return!n||t.type!==`item`?r:F.createElement(F.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,cw(e,t,n))}})}function cw(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r&&(!a||r.parentKey!==a.parentKey&&a.level<r.level);){let t=n({type:`item`,key:r.key,dropPosition:`after`});(0,F.isValidElement)(t)&&s.push((0,F.cloneElement)(t,{key:`${r.key}-after`})),r=r.parentKey==null?null:e.getItem(r.parentKey)}}return s}var lw=(0,F.createContext)(ow);function uw(e){return(0,F.useMemo)(()=>e==null?null:new Set([e]),[e])}var dw=(0,F.createContext)(null),fw=(0,F.createContext)(null),pw=(0,F.createContext)({});zC(hC,function(e,t){return[e,t]=q(e,t,pw),F.createElement(`header`,{className:`react-aria-Header`,...e,ref:t},e.children)});var mw=(0,F.createContext)({});(0,F.forwardRef)(function(e,t){return[e,t]=q(e,t,mw),F.createElement(`kbd`,{dir:`ltr`,...e,ref:t})});function hw(e){let t=G(e,{labelable:!0}),n;return e.orientation===`vertical`&&(n=`vertical`),e.elementType===`hr`?{separatorProps:t}:{separatorProps:{...t,role:`separator`,"aria-orientation":n}}}var gw=(0,F.createContext)({}),_w=class extends pC{filter(e,t){let n=t.getItem(this.prevKey);if(n&&n.type!==`separator`){let n=this.clone();return t.addDescendants(n,e),n}return null}};_w.type=`separator`,zC(_w,function(e,t){[e,t]=q(e,t,gw);let{elementType:n,orientation:r,style:i,className:a,slot:o,...s}=e,c=n||`hr`;c===`hr`&&r===`vertical`&&(c=`div`);let{separatorProps:l}=hw({...s,elementType:n,orientation:r}),u=G(e,{global:!0});return F.createElement(c,{...W(u,l),style:i,className:a??`react-aria-Separator`,ref:t,slot:o||void 0})});var vw=new WeakMap;function yw(e){return Xf()?e.altKey:e.ctrlKey}function bw(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var xw=new WeakMap;function Sw(e){let t=B();return xw.set(e,t),t}function Cw(e){return xw.get(e)}var ww=1e3;function Tw(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,F.useRef)({search:``,timeout:void 0}).current;return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{let a=Ew(e.key);if(!(!a||e.ctrlKey||e.metaKey||!e.currentTarget.contains(e.target)||i.search.length===0&&a===` `)){if(a===` `&&i.search.trim().length>0&&(e.preventDefault(),`continuePropagation`in e||e.stopPropagation()),i.search+=a,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.search,n.focusedKey);e??=t.getKeyForSearch(i.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=``},ww)}}:void 0}}}function Ew(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function Dw(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:a=!1,disallowEmptySelection:o=!1,disallowSelectAll:s=!1,escapeKeyBehavior:c=`clearSelection`,selectOnFocus:l=t.selectionBehavior===`replace`,disallowTypeAhead:u=!1,shouldUseVirtualFocus:d,allowsTabNavigation:f=!1,isVirtualized:p,scrollRef:m=r,linkBehavior:h=`action`}=e,{direction:g}=pg(),_=np(),v=e=>{var i;if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!((i=r.current)!=null&&i.contains(e.target)))return;let u=(n,i)=>{if(n!=null){if(t.isLink(n)&&h===`selection`&&l&&!yw(e)){(0,Ku.flushSync)(()=>{t.setFocusedKey(n,i)});let a=bw(r,n),o=t.getItemProps(n);a&&_.open(a,e,o.href,o.routerOptions);return}if(t.setFocusedKey(n,i),t.isLink(n)&&h===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):l&&!yw(e)&&t.replaceSelection(n)}};switch(e.key){case`ArrowDown`:if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.call(n):n.getKeyBelow?.call(n,t.focusedKey);r==null&&a&&(r=n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r))}break;case`ArrowUp`:if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.call(n):n.getKeyAbove?.call(n,t.focusedKey);r==null&&a&&(r=n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r))}break;case`ArrowLeft`:if(n.getKeyLeftOf){let r=t.focusedKey==null?null:n.getKeyLeftOf?.call(n,t.focusedKey);r==null&&a&&(r=g===`rtl`?n.getFirstKey?.call(n,t.focusedKey):n.getLastKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r,g===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(n.getKeyRightOf){let r=t.focusedKey==null?null:n.getKeyRightOf?.call(n,t.focusedKey);r==null&&a&&(r=g===`rtl`?n.getLastKey?.call(n,t.focusedKey):n.getFirstKey?.call(n,t.focusedKey)),r!=null&&(e.preventDefault(),u(r,g===`rtl`?`last`:`first`))}break;case`Home`:if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getFirstKey(t.focusedKey,Tp(e));t.setFocusedKey(r),r!=null&&(Tp(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`End`:if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getLastKey(t.focusedKey,Tp(e));t.setFocusedKey(r),r!=null&&(Tp(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):l&&t.replaceSelection(r))}break;case`PageDown`:if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);r!=null&&(e.preventDefault(),u(r))}break;case`PageUp`:if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);r!=null&&(e.preventDefault(),u(r))}break;case`a`:Tp(e)&&t.selectionMode===`multiple`&&s!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:c===`clearSelection`&&!o&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!f){if(e.shiftKey)r.current.focus();else{let e=Gv(r.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);t&&!t.contains(document.activeElement)&&Rf(t)}break}}},y=(0,F.useRef)({top:0,left:0});jp(m,`scroll`,p?void 0:()=>{y.current={top:m.current?.scrollTop??0,left:m.current?.scrollLeft??0}});let b=e=>{if(t.isFocused){e.currentTarget.contains(e.target)||t.setFocused(!1);return}if(e.currentTarget.contains(e.target)){if(t.setFocused(!0),t.focusedKey==null){let r=e=>{e!=null&&(t.setFocusedKey(e),l&&!t.isSelected(e)&&t.replaceSelection(e))},i=e.relatedTarget;i&&e.currentTarget.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_FOLLOWING?r(t.lastSelectedKey??n.getLastKey?.call(n)):r(t.firstSelectedKey??n.getFirstKey?.call(n))}else !p&&m.current&&(m.current.scrollTop=y.current.top,m.current.scrollLeft=y.current.left);if(t.focusedKey!=null&&m.current){let e=bw(r,t.focusedKey);e instanceof HTMLElement&&(!e.contains(document.activeElement)&&!d&&Rf(e),Zm()===`keyboard`&&Pp(e,{containingElement:r.current}))}}},x=e=>{e.currentTarget.contains(e.relatedTarget)||t.setFocused(!1)},S=(0,F.useRef)(!1);jp(r,zp,d?e=>{let{detail:n}=e;e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(S.current=!0)}:void 0);let C=K(()=>{let e=n.getFirstKey?.call(n)??null;if(e==null){let e=H();Qv(r.current),ey(e,null),t.collection.size>0&&(S.current=!1)}else t.setFocusedKey(e),S.current=!1});vp(()=>{S.current&&C()},[t.collection,C]);let w=K(()=>{t.collection.size>0&&(S.current=!1)});vp(()=>{w()},[t.focusedKey,w]),jp(r,Rp,d?e=>{var n;e.stopPropagation(),t.setFocused(!1),(n=e.detail)!=null&&n.clearFocusKey&&t.setFocusedKey(null)}:void 0);let T=(0,F.useRef)(i),E=(0,F.useRef)(!1);(0,F.useEffect)(()=>{if(T.current){let e=null;i===`first`&&(e=n.getFirstKey?.call(n)??null),i===`last`&&(e=n.getLastKey?.call(n)??null);let a=t.selectedKeys;if(a.size){for(let n of a)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!d&&r.current&&nh(r.current),t.collection.size>0&&(T.current=!1,E.current=!0)}});let D=(0,F.useRef)(t.focusedKey),O=(0,F.useRef)(null);(0,F.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==D.current||E.current)&&m.current&&r.current){let e=Zm(),n=bw(r,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||E.current)&&(O.current&&cancelAnimationFrame(O.current),O.current=requestAnimationFrame(()=>{m.current&&(Mp(m.current,n),e!==`virtual`&&Pp(n,{containingElement:r.current}))}))}!d&&t.isFocused&&t.focusedKey==null&&D.current!=null&&r.current&&nh(r.current),D.current=t.focusedKey,E.current=!1}),(0,F.useEffect)(()=>()=>{O.current&&cancelAnimationFrame(O.current)},[]),jp(r,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let k={onKeyDown:v,onFocus:b,onBlur:x,onMouseDown(e){m.current===e.target&&e.preventDefault()}},{typeSelectProps:A}=Tw({keyboardDelegate:n,selectionManager:t});u||(k=W(A,k));let j;d||(j=t.focusedKey==null?0:-1);let M=Sw(t.collection);return{collectionProps:W(k,{tabIndex:j,"data-collection":M})}}function Ow(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:a,shouldUseVirtualFocus:o,focus:s,isDisabled:c,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d=`action`}=e,f=np();t=B(t);let p=e=>{if(e.pointerType===`keyboard`&&yw(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(d===`selection`&&i.current){let t=n.getItemProps(r);f.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(d===`override`||d===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(Tp(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,F.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(o?Qv(i.current):s?s():document.activeElement!==i.current&&i.current&&nh(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,o]),c||=n.isDisabled(r);let m={};!o&&!c?m={tabIndex:r===n.focusedKey?0:-1,onFocus(e){e.target===i.current&&n.setFocusedKey(r)}}:c&&(m.onMouseDown=e=>{e.preventDefault()});let h=n.isLink(r)&&d===`override`,g=l&&e.UNSTABLE_itemBehavior===`action`,_=n.isLink(r)&&d!==`selection`&&d!==`none`,v=!c&&n.canSelectItem(r)&&!h&&!g,y=(l||_)&&!c,b=y&&(n.selectionBehavior===`replace`?!v:!v||n.isEmpty),x=y&&v&&n.selectionBehavior===`replace`,S=b||x,C=(0,F.useRef)(null),w=S&&v,T=(0,F.useRef)(!1),E=(0,F.useRef)(!1),D=n.getItemProps(r),O=e=>{if(l){var t;l(),(t=i.current)==null||t.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))}_&&i.current&&f.open(i.current,e,D.href,D.routerOptions)},k={ref:i};if(a?(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,e.pointerType===`keyboard`&&(!S||Aw())&&p(e)},u?(k.onPressUp=b?void 0:e=>{e.pointerType===`mouse`&&v&&p(e)},k.onPress=b?O:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&v&&p(e)}):k.onPress=e=>{if(b||x&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!kw())return;O(e)}else e.pointerType!==`keyboard`&&v&&p(e)}):(k.onPressStart=e=>{C.current=e.pointerType,T.current=w,E.current=b,v&&(e.pointerType===`mouse`&&!b||e.pointerType===`keyboard`&&(!y||Aw()))&&p(e)},k.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&S&&kw()||e.pointerType===`mouse`&&E.current)&&(S?O(e):v&&p(e))}),m[`data-collection`]=Cw(n.collection),m[`data-key`]=r,k.preventFocusOnPress=o,o&&(k=W(k,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),D)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])D[e]&&(k[e]=vf(k[e],D[e]));let{pressProps:A,isPressed:j}=Em(k),M=x?e=>{C.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),O(e))}:void 0,{longPressProps:N}=wh({isDisabled:!w,onLongPress(e){e.pointerType===`touch`&&(p(e),n.setSelectionBehavior(`toggle`))}}),P=e=>{C.current===`touch`&&T.current&&e.preventDefault()},ee=d!==`none`&&n.isLink(r)?e=>{ip.isOpening||e.preventDefault()}:void 0;return{itemProps:W(m,v||b||o&&!c?A:{},w?N:{},{onDoubleClick:M,onDragStartCapture:P,onClick:ee,id:t},o?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:j,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:c,allowsSelection:v,hasAction:S}}function kw(){return window.event?.key===`Enter`}function Aw(){let e=window.event;return e?.key===` `||e?.code===`Space`}var jw=class{getItemRect(e){let t=this.ref.current;if(!t)return null;let n=e==null?null:bw(this.ref,e);if(!n)return null;let r=t.getBoundingClientRect(),i=n.getBoundingClientRect();return{x:i.left-r.left-t.clientLeft+t.scrollLeft,y:i.top-r.top-t.clientTop+t.scrollTop,width:i.width,height:i.height}}getContentSize(){let e=this.ref.current;return{width:e?.scrollWidth??0,height:e?.scrollHeight??0}}getVisibleRect(){let e=this.ref.current;return{x:e?.scrollLeft??0,y:e?.scrollTop??0,width:e?.clientWidth??0,height:e?.clientHeight??0}}constructor(e){this.ref=e}},Mw=class{isDisabled(e){return this.disabledBehavior===`all`&&(e.props?.isDisabled||this.disabledKeys.has(e.key))}findNextNonDisabled(e,t){let n=e;for(;n!=null;){let e=this.collection.getItem(n);if(e?.type===`item`&&!this.isDisabled(e))return n;n=t(n)}return null}getNextKey(e){let t=e;return t=this.collection.getKeyAfter(t),this.findNextNonDisabled(t,e=>this.collection.getKeyAfter(e))}getPreviousKey(e){let t=e;return t=this.collection.getKeyBefore(t),this.findNextNonDisabled(t,e=>this.collection.getKeyBefore(e))}findKey(e,t,n){let r=e,i=this.layoutDelegate.getItemRect(r);if(!i||r==null)return null;let a=i;do{if(r=t(r),r==null)break;i=this.layoutDelegate.getItemRect(r)}while(i&&n(a,i)&&r!=null);return r}isSameRow(e,t){return e.y===t.y||e.x!==t.x}isSameColumn(e,t){return e.x===t.x||e.y!==t.y}getKeyBelow(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getNextKey(e),this.isSameRow):this.getNextKey(e)}getKeyAbove(e){return this.layout===`grid`&&this.orientation===`vertical`?this.findKey(e,e=>this.getPreviousKey(e),this.isSameRow):this.getPreviousKey(e)}getNextColumn(e,t){return t?this.getPreviousKey(e):this.getNextKey(e)}getKeyRightOf(e){let t=this.direction===`ltr`?`getKeyRightOf`:`getKeyLeftOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`rtl`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`rtl`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`rtl`):null}getKeyLeftOf(e){let t=this.direction===`ltr`?`getKeyLeftOf`:`getKeyRightOf`;return this.layoutDelegate[t]?(e=this.layoutDelegate[t](e),this.findNextNonDisabled(e,e=>this.layoutDelegate[t](e))):this.layout===`grid`?this.orientation===`vertical`?this.getNextColumn(e,this.direction===`ltr`):this.findKey(e,e=>this.getNextColumn(e,this.direction===`ltr`),this.isSameColumn):this.orientation===`horizontal`?this.getNextColumn(e,this.direction===`ltr`):null}getFirstKey(){let e=this.collection.getFirstKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyAfter(e))}getLastKey(){let e=this.collection.getLastKey();return this.findNextNonDisabled(e,e=>this.collection.getKeyBefore(e))}getKeyPageAbove(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!Sp(t))return this.getFirstKey();let r=e;if(this.orientation===`horizontal`){let e=Math.max(0,n.x+n.width-this.layoutDelegate.getVisibleRect().width);for(;n&&n.x>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.max(0,n.y+n.height-this.layoutDelegate.getVisibleRect().height);for(;n&&n.y>e&&r!=null;)r=this.getKeyAbove(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getFirstKey()}getKeyPageBelow(e){let t=this.ref.current,n=this.layoutDelegate.getItemRect(e);if(!n)return null;if(t&&!Sp(t))return this.getLastKey();let r=e;if(this.orientation===`horizontal`){let e=Math.min(this.layoutDelegate.getContentSize().width,n.y-n.width+this.layoutDelegate.getVisibleRect().width);for(;n&&n.x<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}else{let e=Math.min(this.layoutDelegate.getContentSize().height,n.y-n.height+this.layoutDelegate.getVisibleRect().height);for(;n&&n.y<e&&r!=null;)r=this.getKeyBelow(r),n=r==null?null:this.layoutDelegate.getItemRect(r)}return r??this.getLastKey()}getKeyForSearch(e,t){if(!this.collator)return null;let n=this.collection,r=t||this.getFirstKey();for(;r!=null;){let t=n.getItem(r);if(!t)return null;let i=t.textValue.slice(0,e.length);if(t.textValue&&this.collator.compare(i,e)===0)return r;r=this.getNextKey(r)}return null}constructor(...e){if(e.length===1){let t=e[0];this.collection=t.collection,this.ref=t.ref,this.collator=t.collator,this.disabledKeys=t.disabledKeys||new Set,this.disabledBehavior=t.disabledBehavior||`all`,this.orientation=t.orientation||`vertical`,this.direction=t.direction,this.layout=t.layout||`stack`,this.layoutDelegate=t.layoutDelegate||new jw(t.ref)}else this.collection=e[0],this.disabledKeys=e[1],this.ref=e[2],this.collator=e[3],this.layout=`stack`,this.orientation=`vertical`,this.disabledBehavior=`all`,this.layoutDelegate=new jw(this.ref);this.layout===`stack`&&this.orientation===`vertical`&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}};function Nw(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:a,layoutDelegate:o}=e,s=yv({usage:`search`,sensitivity:`base`}),c=t.disabledBehavior,l=(0,F.useMemo)(()=>a||new Mw({collection:n,disabledKeys:r,disabledBehavior:c,ref:i,collator:s,layoutDelegate:o}),[a,o,n,r,i,s,c]),{collectionProps:u}=Dw({...e,ref:i,selectionManager:t,keyboardDelegate:l});return{listProps:u}}function Pw(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:a,...o}=e;!e[`aria-label`]&&e[`aria-labelledby`];let s=G(e,{labelable:!0}),{listProps:c}=Nw({...o,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:`override`});return vw.set(t,{onClose:e.onClose,onAction:e.onAction,shouldUseVirtualFocus:e.shouldUseVirtualFocus}),{menuProps:W(s,{onKeyDown:i,onKeyUp:a},{role:`menu`,...c,onKeyDown:t=>{var n;(t.key!==`Escape`||e.shouldUseVirtualFocus)&&((n=c.onKeyDown)==null||n.call(c,t))}})}}function Fw(e){return null}Fw.getCollectionNode=function*(e,t){let{childItems:n,title:r,children:i}=e,a=e.title||e.children,o=e.textValue||(typeof a==`string`?a:``)||e[`aria-label`]||``;!o&&t?.suppressTextValueWarning,yield{type:`item`,props:e,rendered:a,textValue:o,"aria-label":e[`aria-label`],hasChildNodes:Iw(e),*childNodes(){if(n)for(let e of n)yield{type:`item`,value:e};else if(r){let e=[];F.Children.forEach(i,t=>{e.push({type:`item`,element:t})}),yield*e}}}};function Iw(e){return e.hasChildItems==null?!!(e.childItems||e.title&&F.Children.count(e.children)>0):e.hasChildItems}var Lw=Fw;function Rw(e){return null}Rw.getCollectionNode=function*(e){let{children:t,title:n,items:r}=e;yield{type:`section`,props:e,hasChildNodes:!0,rendered:n,"aria-label":e[`aria-label`],*childNodes(){if(typeof t==`function`){if(!r)throw Error(`props.children was a function but props.items is missing`);for(let e of r)yield{type:`item`,value:e,renderer:t}}else{let e=[];F.Children.forEach(t,t=>{e.push({type:`item`,element:t})}),yield*e}}}};var zw=class{build(e,t){return this.context=t,Bw(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(F.isValidElement(t)&&t.type===F.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];F.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(F.isValidElement(e.element)&&e.element.type===F.Fragment){let i=[];F.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(F.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:Vw(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${Hw(t.type)}> in <${Hw(r?.type??`unknown parent type`)}>. Only <${Hw(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:r?r.level+1:0,index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Bw(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function Bw(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function Vw(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Hw(e){return e[0].toUpperCase()+e.slice(1)}function Uw(e,t,n){let r=(0,F.useMemo)(()=>new zw,[]),{children:i,items:a,collection:o}=e;return(0,F.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}function Ww(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function Gw(e){return Kw(e,0)}function Kw(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function qw(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Jw(e,t),t],i=[...Jw(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function Jw(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var Yw=new WeakMap;function Xw(e){let t=Yw.get(e);if(t!=null)return t;let n=0,r=t=>{for(let i of t)i.type===`section`?r(Ww(i,e)):i.type===`item`&&n++};return r(e),Yw.set(e,n),n}function Zw(e,t,n){let{id:r,key:i,closeOnSelect:a,isVirtualized:o,"aria-haspopup":s,onPressStart:c,onPressUp:l,onPress:u,onPressChange:d,onPressEnd:f,onClick:p,onHoverStart:m,onHoverChange:h,onHoverEnd:g,onKeyDown:_,onKeyUp:v,onFocus:y,onFocusChange:b,onBlur:x,selectionManager:S=t.selectionManager}=e,C=!!s,w=C&&e[`aria-expanded`]===`true`,T=e.isDisabled??S.isDisabled(i),E=e.isSelected??S.isSelected(i),D=vw.get(t),O=t.collection.getItem(i),k=e.onClose||D.onClose,A=np(),j=()=>{var t;if(!C&&(!(O==null||(t=O.props)==null)&&t.onAction?O.props.onAction():e.onAction&&e.onAction(i),D.onAction)){let e=D.onAction;e(i)}},M=`menuitem`;C||(S.selectionMode===`single`?M=`menuitemradio`:S.selectionMode===`multiple`&&(M=`menuitemcheckbox`));let N=_f(),P=_f(),ee=_f(),te={id:r,"aria-disabled":T||void 0,role:M,"aria-label":e[`aria-label`],"aria-labelledby":N,"aria-describedby":[P,ee].filter(Boolean).join(` `)||void 0,"aria-controls":e[`aria-controls`],"aria-haspopup":s,"aria-expanded":e[`aria-expanded`]};S.selectionMode!==`none`&&!C&&(te[`aria-checked`]=E),o&&(te[`aria-posinset`]=O?.index,te[`aria-setsize`]=Xw(t.collection));let ne=(0,F.useRef)(!1),re=e=>{d?.(e),ne.current=e},ie=(0,F.useRef)(null),ae=e=>{e.pointerType!==`keyboard`&&(ie.current={pointerType:e.pointerType}),e.pointerType===`mouse`&&(ne.current||e.target.click()),l?.(e)},oe=e=>{p?.(e),j(),cp(e,A,O.props.href,O?.props.routerOptions);let t=ie.current?.pointerType===`keyboard`?ie.current?.key===`Enter`||S.selectionMode===`none`||S.isLink(i):S.selectionMode!==`multiple`||S.isLink(i);t=a??t,k&&!C&&t&&k(),ie.current=null},{itemProps:se,isFocused:ce}=Ow({id:r,selectionManager:S,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:`none`,shouldUseVirtualFocus:D.shouldUseVirtualFocus}),{pressProps:le,isPressed:ue}=Em({onPressStart:c,onPress:u,onPressUp:ae,onPressChange:re,onPressEnd:f,isDisabled:T}),{hoverProps:de}=bh({isDisabled:T,onHoverStart(e){!Xm()&&!(w&&s)&&(S.setFocused(!0),S.setFocusedKey(i)),m?.(e)},onHoverChange:h,onHoverEnd:g}),{keyboardProps:fe}=ah({onKeyDown:e=>{if(e.repeat){e.continuePropagation();return}switch(e.key){case` `:ie.current={pointerType:`keyboard`,key:` `},e.target.click();break;case`Enter`:ie.current={pointerType:`keyboard`,key:`Enter`},e.target.tagName!==`A`&&e.target.click();break;default:C||e.continuePropagation(),_?.(e);break}},onKeyUp:v}),{focusProps:pe}=rh({onBlur:x,onFocus:y,onFocusChange:b}),me=G(O?.props);delete me.id;let he=sp(O?.props);return{menuItemProps:{...te,...W(me,he,C?{onFocus:se.onFocus,"data-collection":se[`data-collection`],"data-key":se[`data-key`]}:se,le,de,fe,pe,D.shouldUseVirtualFocus||C?{onMouseDown:e=>e.preventDefault()}:void 0,T?void 0:{onClick:oe}),tabIndex:se.tabIndex!=null&&w&&!D.shouldUseVirtualFocus?-1:se.tabIndex},labelProps:{id:N},descriptionProps:{id:P},keyboardShortcutProps:{id:ee},isFocused:ce,isFocusVisible:ce&&S.isFocused&&Xm()&&!w,isSelected:E,isPressed:ue,isDisabled:T}}function Qw(e){let{heading:t,"aria-label":n}=e,r=B();return{itemProps:{role:`presentation`},headingProps:t?{id:r,role:`presentation`}:{},groupProps:{role:`group`,"aria-label":n,"aria-labelledby":t?r:void 0}}}var $w=2,eT=50,tT=1e3,nT=Math.PI/12;function rT(e){let{menuRef:t,submenuRef:n,isOpen:r,isDisabled:i}=e,a=(0,F.useRef)(void 0),o=(0,F.useRef)(void 0),s=(0,F.useRef)(0),c=(0,F.useRef)(void 0),l=(0,F.useRef)(void 0),u=(0,F.useRef)(void 0),d=(0,F.useRef)(2),[f,p]=(0,F.useState)(!1);bp({ref:n,onResize:()=>{n.current&&(o.current=n.current.getBoundingClientRect(),u.current=void 0)}});let m=()=>{p(!1),d.current=$w,a.current=void 0},h=Qm(),g=K(e=>{f&&e.preventDefault()});(0,F.useEffect)(()=>{f&&t.current?t.current.style.pointerEvents=`none`:t.current.style.pointerEvents=``},[t,f]),(0,F.useEffect)(()=>{let e=n.current,f=t.current;if(i||!e||!r||h!==`pointer`||!f){m();return}o.current=e.getBoundingClientRect();let _=e=>{if(e.pointerType===`touch`||e.pointerType===`pen`)return;let t=Date.now();if(t-s.current<eT)return;clearTimeout(c.current),clearTimeout(l.current);let{clientX:n,clientY:r}=e;if(!a.current){a.current={x:n,y:r};return}if(!o.current)return;if(u.current||=n>o.current.right?`left`:`right`,n<f.getBoundingClientRect().left||n>f.getBoundingClientRect().right||r<f.getBoundingClientRect().top||r>f.getBoundingClientRect().bottom){m();return}let i=a.current.x,h=a.current.y,g=u.current===`right`?o.current.left-i:i-o.current.right,_=Math.atan2(h-o.current.top,g)+nT,v=Math.atan2(h-o.current.bottom,g)-nT,y=Math.atan2(h-r,u.current===`left`?-(n-i):n-i),b=y<_&&y>v;d.current=b?Math.min(d.current+1,$w):Math.max(d.current-1,0),d.current>=$w?p(!0):p(!1),s.current=t,a.current={x:n,y:r},b&&(c.current=setTimeout(()=>{m(),l.current=setTimeout(()=>{let e=document.elementFromPoint(n,r);e&&f.contains(e)&&e.dispatchEvent(new PointerEvent(`pointerover`,{bubbles:!0,cancelable:!0}))},100)},tT))};return window.addEventListener(`pointermove`,_),window.addEventListener(`pointerdown`,g,!0),()=>{window.removeEventListener(`pointermove`,_),window.removeEventListener(`pointerdown`,g,!0),clearTimeout(c.current),clearTimeout(l.current),d.current=$w}},[i,r,t,h,p,g,n])}function iT(e,t,n){let{parentMenuRef:r,submenuRef:i,type:a=`menu`,isDisabled:o,delay:s=200,shouldUseVirtualFocus:c}=e,l=B(),u=B(),{direction:d}=pg(),f=(0,F.useRef)(void 0),p=(0,F.useCallback)(()=>{f.current&&=(clearTimeout(f.current),void 0)},[f]),m=K(e=>{p(),t.open(e)}),h=K(()=>{p(),t.close()});z(()=>()=>{p()},[p]);let g=e=>{if(e.currentTarget.contains(document.activeElement))switch(e.key){case`ArrowLeft`:d===`ltr`&&e.currentTarget.contains(e.target)&&(e.preventDefault(),e.stopPropagation(),h(),!c&&n.current&&Rf(n.current));break;case`ArrowRight`:d===`rtl`&&e.currentTarget.contains(e.target)&&(e.preventDefault(),e.stopPropagation(),h(),!c&&n.current&&Rf(n.current));break;case`Escape`:var t;(t=i.current)!=null&&t.contains(e.target)&&(e.stopPropagation(),h(),!c&&n.current&&Rf(n.current));break}},_={id:u,"aria-labelledby":l,submenuLevel:t.submenuLevel,...a===`menu`&&{onClose:t.closeAll,autoFocus:t.focusStrategy??void 0,onKeyDown:g}},v=e=>{switch(e.key){case`ArrowRight`:o||(d===`ltr`?(e.preventDefault(),t.isOpen||m(`first`),a===`menu`&&i?.current&&document.activeElement===n?.current&&Rf(i.current)):t.isOpen?h():e.continuePropagation());break;case`ArrowLeft`:o||(d===`rtl`?(e.preventDefault(),t.isOpen||m(`first`),a===`menu`&&i?.current&&document.activeElement===n?.current&&Rf(i.current)):t.isOpen?h():e.continuePropagation());break;default:e.continuePropagation();break}},y=e=>{!o&&(e.pointerType===`virtual`||e.pointerType===`keyboard`)&&m(`first`)},b=e=>{!o&&(e.pointerType===`touch`||e.pointerType===`mouse`)&&m()},x=e=>{o||(e&&!t.isOpen?f.current||=setTimeout(()=>{m()},s):e||p())};jp(r,`focusin`,e=>{var i;t.isOpen&&(i=r.current)!=null&&i.contains(e.target)&&e.target!==n.current&&h()});let S=e=>e!==n.current;return rT({menuRef:r,submenuRef:i,isOpen:t.isOpen,isDisabled:o}),{submenuTriggerProps:{id:l,"aria-controls":t.isOpen?u:void 0,"aria-haspopup":o?void 0:a,"aria-expanded":t.isOpen?`true`:`false`,onPressStart:y,onPress:b,onHoverChange:x,onKeyDown:v,isOpen:t.isOpen},submenuProps:_,popoverProps:{isNonModal:!0,shouldCloseOnInteractOutside:S}}}function aT(e){let t=yb(e),[n,r]=(0,F.useState)(null),[i,a]=(0,F.useState)([]),o=()=>{a([]),t.close()};return{focusStrategy:n,...t,open(e=null){r(e),t.open()},toggle(e=null){r(e),t.toggle()},close(){o()},expandedKeysStack:i,openSubmenu:(e,t)=>{a(n=>t>n.length?n:[...n.slice(0,t),e])},closeSubmenu:(e,t)=>{a(n=>n[t]===e?n.slice(0,t):n)}}}function oT(e,t){let{triggerKey:n}=e,{expandedKeysStack:r,openSubmenu:i,closeSubmenu:a,close:o}=t,[s]=(0,F.useState)(r?.length),c=(0,F.useMemo)(()=>r[s]===n,[r,n,s]),[l,u]=(0,F.useState)(null),d=(0,F.useCallback)(e=>{u(e??null),i(n,s)},[i,s,n]),f=(0,F.useCallback)(()=>{u(null),a(n,s)},[a,s,n]),p=(0,F.useCallback)(e=>{u(e??null),c?f():d(e)},[f,d,c]);return(0,F.useMemo)(()=>({focusStrategy:l,isOpen:c,open:d,close:f,closeAll:o,submenuLevel:s,setOpen:()=>{},toggle:p}),[c,d,f,o,l,p,s])}var sT=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!=null?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!=null?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}constructor(e,{expandedKeys:t}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,t||=new Set;let n=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&(e.type===`section`||t.has(e.key)))for(let t of e.childNodes)n(t)};for(let t of e)n(t);let r=null,i=0;for(let[e,t]of this.keyMap)r?(r.nextKey=e,t.prevKey=r.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=i++),r=t,r.nextKey=void 0;this.lastKey=r?.key??null}},cT=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function lT(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function uT(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,F.useRef)(!1),[,s]=(0,F.useState)(!1),c=(0,F.useRef)(null),l=(0,F.useRef)(null),[,u]=(0,F.useState)(null),[d,f]=em((0,F.useMemo)(()=>dT(e.selectedKeys),[e.selectedKeys]),(0,F.useMemo)(()=>dT(e.defaultSelectedKeys,new cT),[e.defaultSelectedKeys]),e.onSelectionChange),p=(0,F.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[m,h]=(0,F.useState)(i);i===`replace`&&m===`toggle`&&typeof d==`object`&&d.size===0&&h(`replace`);let g=(0,F.useRef)(i);return(0,F.useEffect)(()=>{i!==g.current&&(h(i),g.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:m,setSelectionBehavior:h,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return l.current},setFocusedKey(e,t=`first`){c.current=e,l.current=t,u(e)},selectedKeys:d,setSelectedKeys(e){(r||!lT(e,d))&&f(e)},disabledKeys:p,disabledBehavior:a}}function dT(e,t){return e?e===`all`?`all`:new cT(e):t}var fT=class e{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&qw(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&qw(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new cT([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new cT(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?qw(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){var n;if((n=this.layoutDelegate)!=null&&n.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let r=[],i=e;for(;i!=null;){let e=this.collection.getItem(i);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&r.push(i),i===t)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n=new cT(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new cT([t],t,t):new cT;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new cT;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=[],t=n=>{for(;n!=null;){if(this.canSelectItem(n)){let r=this.collection.getItem(n);r?.type===`item`&&e.push(n),r?.hasChildNodes&&(this.allowsCellSelection||r.type!==`item`)&&t(Gw(Ww(r,this.collection))?.key??null)}n=this.collection.getKeyAfter(n)}};return t(this.collection.getFirstKey()),e}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new cT)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){var t;if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=this.collection.getItem(e);return!(!n||!(n==null||(t=n.props)==null)&&t.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){var t,n;return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))==null||(t=n.props)==null)&&t.isDisabled))}isLink(e){var t,n;return!!(!((n=this.collection.getItem(e))==null||(t=n.props)==null)&&t.href)}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null}};function pT(e){let{onExpandedChange:t}=e,[n,r]=em(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=uT(e),a=(0,F.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),o=Uw(e,(0,F.useCallback)(e=>new sT(e,{expandedKeys:n}),[n]),null);return(0,F.useEffect)(()=>{i.focusedKey!=null&&!o.getItem(i.focusedKey)&&i.setFocusedKey(null)},[o,i.focusedKey]),{collection:o,expandedKeys:n,disabledKeys:a,toggleKey:e=>{r(mT(n,e))},setExpandedKeys:r,selectionManager:new fT(o,i)}}function mT(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}var hT=(0,F.createContext)(null),gT=(0,F.createContext)(null),_T=(0,F.createContext)(null),vT=(0,F.createContext)(null),yT=(0,F.createContext)(null),bT=class extends pC{filter(e,t,n){let r=e.getItem(this.firstChildKey);if(r&&n(r.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};bT.type=`submenutrigger`,BC(bT,(e,t,n)=>{let{CollectionBranch:r}=(0,F.useContext)(lw),i=(0,F.useContext)(gT),a=(0,F.useContext)(_T),o=oT({triggerKey:n.key},a),s=(0,F.useRef)(null),c=gp(t),{parentMenuRef:l,shouldUseVirtualFocus:u}=(0,F.useContext)(yT),{submenuTriggerProps:d,submenuProps:f,popoverProps:p}=iT({parentMenuRef:l,submenuRef:s,delay:e.delay,shouldUseVirtualFocus:u},o,c);return F.createElement(Eh,{values:[[wT,{...d,onAction:void 0,ref:c}],[hT,{ref:s,...f}],[DT,o],[tw,{trigger:`SubmenuTrigger`,triggerRef:c,placement:`end top`,"aria-labelledby":f[`aria-labelledby`],...p}]]},F.createElement(r,{collection:i.collection,parent:n}),e.children[1])},e=>e.children[0]),(0,F.forwardRef)(function(e,t){return[e,t]=q(e,t,hT),F.createElement(jC,{content:F.createElement(UC,e)},n=>F.createElement(xT,{props:e,collection:n,menuRef:t}))});function xT({props:e,collection:t,menuRef:n}){[e,n]=q(e,n,dw);let{filter:r,...i}=e,a=(0,F.useMemo)(()=>r?t.filter(r):t,[t,r]),o=pT({...e,collection:a,children:void 0}),s=(0,F.useContext)(_T),{isVirtualized:c,CollectionRoot:l}=(0,F.useContext)(lw),{menuProps:u}=Pw({...e,isVirtualized:c,onClose:e.onClose||s?.close},o,n),d=Dh({defaultClassName:`react-aria-Menu`,className:e.className,style:e.style,values:{isEmpty:o.collection.size===0}}),f=null;o.collection.size===0&&e.renderEmptyState&&(f=F.createElement(`div`,{role:`menuitem`,style:{display:`contents`}},e.renderEmptyState()));let p=G(e,{global:!0});return F.createElement(Ev,null,F.createElement(`div`,{...W(p,d,u),ref:n,slot:e.slot||void 0,"data-empty":o.collection.size===0||void 0,onScroll:e.onScroll},F.createElement(Eh,{values:[[gT,o],[gw,{elementType:`div`}],[aw,{name:`MenuSection`,render:CT}],[yT,{parentMenuRef:n,shouldUseVirtualFocus:i?.shouldUseVirtualFocus}],[wT,null],[dw,null],[fw,null],[vT,o.selectionManager],[_T,s??aT({})]]},F.createElement(l,{collection:o.collection,persistedKeys:uw(o.selectionManager.focusedKey),scrollRef:n})),f))}var ST=class extends fT{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,t){return this.parent.setFocusedKey(e,t)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,t){super(e.collection,t),this.parent=e}};function CT(e,t,n,r=`react-aria-MenuSection`){let i=(0,F.useContext)(gT),{CollectionBranch:a}=(0,F.useContext)(lw),[o,s]=kh(),{headingProps:c,groupProps:l}=Qw({heading:s,"aria-label":n.props[`aria-label`]??void 0}),u=Dh({defaultClassName:r,className:n.props?.className,style:n.props?.style,values:{}}),d=(0,F.useContext)(vT),f=uT(e),p=e.selectionMode==null?d:new ST(d,f),m=G(e,{global:!0});return delete m.id,F.createElement(`section`,{...W(m,u,l),ref:t},F.createElement(Eh,{values:[[pw,{...c,ref:o}],[vT,p]]},F.createElement(a,{collection:i.collection,parent:n})))}BC(vC,CT);var wT=(0,F.createContext)(null);zC(_C,function(e,t,n){[e,t]=q(e,t,wT);let r=Oh(wT)?.id,i=(0,F.useContext)(gT),a=gp(t),o=(0,F.useContext)(vT),{menuItemProps:s,labelProps:c,descriptionProps:l,keyboardShortcutProps:u,...d}=Zw({...e,id:r,key:n.key,selectionManager:o},i,a),{hoverProps:f,isHovered:p}=bh({isDisabled:d.isDisabled}),m=Dh({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-MenuItem`,values:{...d,isHovered:p,isFocusVisible:d.isFocusVisible,selectionMode:o.selectionMode,selectionBehavior:o.selectionBehavior,hasSubmenu:!!e[`aria-haspopup`],isOpen:e[`aria-expanded`]===`true`}}),h=e.href?`a`:`div`,g=G(e,{global:!0});return delete g.id,delete g.onClick,F.createElement(h,{...W(g,m,s,f),ref:a,"data-disabled":d.isDisabled||void 0,"data-hovered":p||void 0,"data-focused":d.isFocused||void 0,"data-focus-visible":d.isFocusVisible||void 0,"data-pressed":d.isPressed||void 0,"data-selected":d.isSelected||void 0,"data-selection-mode":o.selectionMode===`none`?void 0:o.selectionMode,"data-has-submenu":!!e[`aria-haspopup`]||void 0,"data-open":e[`aria-expanded`]===`true`||void 0},F.createElement(Eh,{values:[[Sx,{slots:{[Th]:c,label:c,description:l}}],[mw,u]]},m.children))});function TT(e,t){let{role:n=`dialog`}=e,r=_f();r=e[`aria-label`]?void 0:r;let i=(0,F.useRef)(!1);return(0,F.useEffect)(()=>{if(t.current&&!t.current.contains(document.activeElement)){nh(t.current);let e=setTimeout(()=>{(document.activeElement===t.current||document.activeElement===document.body)&&(i.current=!0,t.current&&(t.current.blur(),nh(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),_b(),{dialogProps:{...G(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e[`aria-labelledby`]||r,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:r}}}var ET=(0,F.createContext)(null),DT=(0,F.createContext)(null);function OT(e){let t=aT(e),n=(0,F.useRef)(null),{triggerProps:r,overlayProps:i}=iy({type:`dialog`},t,n),[a,o]=(0,F.useState)(null);return bp({ref:n,onResize:(0,F.useCallback)(()=>{n.current&&o(n.current.offsetWidth+`px`)},[n])}),r.id=B(),i[`aria-labelledby`]=r.id,F.createElement(Eh,{values:[[DT,t],[_T,t],[ET,i],[tw,{trigger:`DialogTrigger`,triggerRef:n,"aria-labelledby":i[`aria-labelledby`],style:{"--trigger-width":a}}]]},F.createElement(fh,{...r,ref:n,isPressed:t.isOpen},e.children))}(0,F.forwardRef)(function(e,t){let n=e[`aria-labelledby`];[e,t]=q(e,t,ET);let{dialogProps:r,titleProps:i}=TT({...e,"aria-labelledby":n},t),a=(0,F.useContext)(DT);!r[`aria-label`]&&!r[`aria-labelledby`]&&e[`aria-labelledby`]&&(r[`aria-labelledby`]=e[`aria-labelledby`]);let o=Dh({defaultClassName:`react-aria-Dialog`,className:e.className,style:e.style,children:e.children,values:{close:a?.close||(()=>{})}}),s=G(e,{global:!0});return F.createElement(`section`,{...W(s,o,r),ref:t,slot:e.slot||void 0},F.createElement(Eh,{values:[[bx,{slots:{[Th]:{},title:{...i,level:2}}}],[$C,{slots:{[Th]:{},close:{onPress:()=>a?.close()}}}]]},o.children))});var kT=({placement:e=`bottom-start`,hasChrome:t=!0,hasCloseButton:n=!1,closeLabel:r,offset:i=8,padding:a,popover:o,children:s,defaultVisible:c,visible:l,onVisibleChange:u,...d})=>{let f=Nb(e),[p,m]=(0,F.useState)(c??!1),h=(0,F.useCallback)(e=>{m(e),u?.(e)},[u]),g=(0,F.useCallback)(()=>h(!1),[h]);return F.createElement(OT,{defaultOpen:c,isOpen:l??p,onOpenChange:h,...d},F.createElement(dh,null,s),F.createElement(rw,{placement:f,offset:i,style:{outline:`none`}},F.createElement(XS,{hasChrome:t,hideLabel:r,onHide:n?g:void 0,padding:a},typeof o==`function`?o({onHide:g}):o)))},AT=(0,F.forwardRef)((e,t)=>F.createElement(XS,{ref:t,...e}));AT.displayName=`Tooltip`,(0,F.lazy)(()=>e(()=>import(`./WithTooltip-65CFNBJE-Ch1PW1bh.js`),__vite__mapDeps([8,1,2,4,5,0]),import.meta.url).then(e=>({default:e.WithTooltip}))),(0,F.lazy)(()=>e(()=>import(`./WithTooltip-65CFNBJE-Ch1PW1bh.js`),__vite__mapDeps([8,1,2,4,5,0]),import.meta.url).then(e=>({default:e.WithTooltipPure})));var{deprecate:jT}=__STORYBOOK_MODULE_CLIENT_LOGGER__;N.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),N.span(),N.div(({theme:e})=>({marginTop:8,textAlign:`center`,"> *":{margin:`0 8px`,fontWeight:e.typography.weight.bold}})),N.div(({theme:e})=>({color:e.color.defaultText,lineHeight:`18px`})),N.div({padding:15,width:280,boxSizing:`border-box`});var{deprecate:MT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,NT=t(v(),1),{deprecate:PT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,FT=N(({active:e,loading:t,disabled:n,...r})=>F.createElement(`span`,{...r}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:`inline-block`,flex:`none`,...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:t.textMutedColor}:{}),IT=N.span({display:`flex`,"& svg":{height:12,width:12,margin:`3px 0`,verticalAlign:`top`}}),LT=N.span({flex:1,textAlign:`left`,display:`flex`,flexDirection:`column`,minWidth:0},({isIndented:e})=>e?{marginLeft:24}:{}),RT=N.span(({theme:e})=>({fontSize:`11px`,lineHeight:`14px`}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),zT=N.span(({active:e,theme:t})=>e?{color:t.color.secondary}:{},()=>({display:`flex`,maxWidth:14})),BT=N.button(({theme:e})=>({width:`100%`,minWidth:0,border:`none`,borderRadius:e.appBorderRadius,background:`none`,fontSize:e.typography.size.s1,transition:`background 150ms ease-out`,color:e.color.dark,textDecoration:`none`,justifyContent:`space-between`,lineHeight:`18px`,padding:`7px 10px`,display:`flex`,alignItems:`center`,"& > * + *":{paddingLeft:10},"&:focus-visible":{outline:`2px solid ${e.color.secondary}`,outlineOffset:0}}),({theme:e,href:t,onClick:n})=>(t||n)&&{cursor:`pointer`,"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}},({theme:e,as:t})=>t===`label`&&{"&:has(input:not(:disabled))":{cursor:`pointer`,"&:hover":{background:e.background.hoverable}}},({disabled:e})=>e&&{cursor:`not-allowed`}),VT=(0,NT.default)(100)(({onClick:e,input:t,href:n,LinkWrapper:r})=>({...e&&{as:`button`,role:`button`,onClick:e},...t&&{as:`label`},...n&&{as:`a`,role:`link`,href:n,...r&&{as:r,to:n}}})),HT=(0,F.forwardRef)((e,t)=>{let{loading:n=!1,title:r=F.createElement(`span`,null,`Loading state`),center:i=null,right:a=null,active:o=!1,disabled:s=!1,isIndented:c=!1,href:l=void 0,onClick:u=void 0,icon:d,input:f,LinkWrapper:p=void 0,...m}=e,h={active:o,disabled:s},g=VT(e),_=d||f;return PT("`ListItem` is deprecated and will be removed in Storybook 11, use `MenuItem` instead."),F.createElement(BT,{"data-deprecated":`ListItem`,ref:t,...m,...h,...g},F.createElement(F.Fragment,null,_&&F.createElement(zT,{...h},_),r||i?F.createElement(LT,{isIndented:c&&!_},r&&F.createElement(FT,{...h,loading:n},r),i&&F.createElement(RT,{...h},i)):null,a&&F.createElement(IT,{...h},a)))});HT.displayName=`ListItem`;var UT=HT,WT=N.div({minWidth:180,overflow:`hidden`,overflowY:`auto`,maxHeight:504},({theme:e})=>({borderRadius:e.appBorderRadius+2}),({theme:e})=>e.base===`dark`?{background:e.background.content}:{}),GT=N.div(({theme:e})=>({padding:4,"& + &":{borderTop:`1px solid ${e.appBorderColor}`}})),KT=({id:e,onClick:t,...n})=>{let{active:r,disabled:i,title:a,href:o}=n,s=(0,F.useCallback)(n=>t?.(n,{id:e,active:r,disabled:i,title:a,href:o}),[t,e,r,i,a,o]);return F.createElement(UT,{id:`list-item-${e}`,...n,...t&&{onClick:s}})},qT=({links:e,LinkWrapper:t,...n})=>{MT("`TooltipLinkList` is deprecated and will be removed in Storybook 11, use `ActionList` or `MenuItem` and `WithMenu` instead.");let r=Array.isArray(e[0])?e:[e],i=r.some(e=>e.some(e=>`icon`in e&&e.icon||`input`in e&&e.input));return F.createElement(WT,{"data-deprecated":`TooltipLinkList`,...n,className:`sb-list`},r.filter(e=>e.length).map((e,n)=>F.createElement(GT,{key:e.map(e=>e.id).join(`~${n}~`)},e.map(e=>`content`in e?F.createElement(F.Fragment,{key:e.id},e.content):F.createElement(KT,{key:e.id,isIndented:i,LinkWrapper:t,...e})))))},{deprecate:JT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{deprecate:YT}=__STORYBOOK_MODULE_CLIENT_LOGGER__,XT=N.div(({backgroundColor:e,border:t=!1,innerStyle:n={},scrollable:r,theme:i})=>({color:i.barTextColor,width:`100%`,minHeight:40,flexShrink:0,scrollbarColor:`${i.barTextColor} ${t?e||i.barBg:`transparent`}`,scrollbarWidth:`thin`,overflow:r?`auto`:`hidden`,overflowY:`hidden`,display:`flex`,alignItems:`center`,gap:r?0:6,paddingInline:r?0:6,...t?{boxShadow:`${i.appBorderColor} 0 -1px 0 0 inset`,background:e||i.barBg}:{},...n})),ZT=N.div(({innerStyle:e})=>({minHeight:40,display:`flex`,alignItems:`center`,width:`100%`,gap:6,paddingInline:6,...e})),QT=(0,F.forwardRef)(({scrollable:e=!0,children:t,innerStyle:n,...r},i)=>F.createElement(XT,{...r,ref:i,innerStyle:e?void 0:n,scrollable:e},e?F.createElement(ZT,{innerStyle:n},t):t));QT.displayName=`Bar`;var $T=N.div({display:`flex`,whiteSpace:`nowrap`,flexBasis:`auto`,marginLeft:3,marginRight:10},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{gap:6}:{});$T.displayName=`Side`;var eE=N.div(({bgColor:e})=>({display:`flex`,justifyContent:`space-between`,position:`relative`,flexWrap:`nowrap`,flexShrink:0,height:40,width:`100%`,backgroundColor:e||``})),tE=N(QT)({paddingInline:0}),nE=({children:e,backgroundColor:t,className:n=``,...r})=>{YT(`FlexBar is deprecated. Use Bar with justifyContent: "space-between" instead.`);let[i,a]=F.Children.toArray(e);return F.createElement(tE,{"data-deprecated":`FlexBar`,backgroundColor:t,className:`sb-bar ${n}`,...r},F.createElement(eE,{bgColor:t},F.createElement($T,{scrollable:r.scrollable,left:!0},i),a?F.createElement($T,{right:!0},a):null))};nE.displayName=`FlexBar`;var{deprecate:rE}=__STORYBOOK_MODULE_CLIENT_LOGGER__,iE=e=>typeof e.props.href==`string`,aE=e=>typeof e.props.href!=`string`;function oE({children:e,...t},n){let r={props:t,ref:n};if(iE(r))return F.createElement(`a`,{ref:r.ref,...r.props},e);if(aE(r))return F.createElement(`button`,{ref:r.ref,type:`button`,...r.props},e);throw Error(`invalid props`)}var sE=(0,F.forwardRef)(oE);sE.displayName=`ButtonOrLink`;var cE=N(sE,{shouldForwardProp:w})({whiteSpace:`normal`,display:`inline-flex`,overflow:`hidden`,verticalAlign:`top`,justifyContent:`center`,alignItems:`center`,textAlign:`center`,textDecoration:`none`,"&:empty":{display:`none`},"&[hidden]":{display:`none`}},({theme:e})=>({padding:`0 15px`,transition:`color 0.2s linear, border-bottom-color 0.2s linear`,height:40,lineHeight:`12px`,cursor:`pointer`,background:`transparent`,border:`0 solid transparent`,borderTop:`3px solid transparent`,borderBottom:`3px solid transparent`,fontWeight:`bold`,fontSize:13,"&:focus":{outline:`0 none`,borderBottomColor:e.barSelectedColor}}),({active:e,textColor:t,theme:n})=>e?{color:t||n.barSelectedColor,borderBottomColor:n.barSelectedColor}:{color:t||n.barTextColor,borderBottomColor:`transparent`,"&:hover":{color:n.barHoverColor}}),lE=(0,F.forwardRef)((e,t)=>(rE("The `TabButton` component is deprecated. Use `TabList` instead."),F.createElement(cE,{"data-deprecated":`TabButton`,ref:t,...e})));lE.displayName=`TabButton`;var uE=N.div(({theme:e})=>({height:`100%`,display:`flex`,padding:30,alignItems:`center`,justifyContent:`center`,flexDirection:`column`,gap:15,background:e.background.content})),dE=N.div({display:`flex`,flexDirection:`column`,gap:4,maxWidth:415}),fE=N.div(({theme:e})=>({fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,textAlign:`center`,color:e.color.defaultText})),pE=N.div(({theme:e})=>({fontSize:e.typography.size.s2-1})),mE=N.div(({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s2-1,textAlign:`center`,color:e.textMutedColor})),hE=({title:e,description:t,footer:n})=>F.createElement(uE,null,F.createElement(dE,null,F.createElement(fE,null,e),t&&F.createElement(mE,null,t)),n&&F.createElement(pE,null,n)),{deprecate:gE}=__STORYBOOK_MODULE_CLIENT_LOGGER__,_E=N.div(({active:e})=>e?{display:`block`}:{display:`none`}),vE=e=>(gE("The `childrenToList` tabs helper is deprecated. Use `TabsView` instead."),F.Children.toArray(e).map(({props:{title:e,id:t,color:n,children:r}})=>{let i=Array.isArray(r)?r[0]:r;return{title:e,id:t,...n?{color:n}:{},render:typeof i==`function`?i:({active:e})=>F.createElement(_E,{active:e,role:`tabpanel`},i)}})),{deprecate:yE}=__STORYBOOK_MODULE_CLIENT_LOGGER__,bE=N.span(({theme:e,isActive:t})=>({display:`inline-block`,width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:`3px solid transparent`,borderLeft:`3px solid transparent`,borderTop:`3px solid`,transition:`transform .1s ease-out`})),xE=N(lE)(({active:e,theme:t,preActive:n})=>`
|
|
57
|
+
color: ${n||e?t.barSelectedColor:t.barTextColor};
|
|
58
|
+
.addon-collapsible-icon {
|
|
59
|
+
color: ${n||e?t.barSelectedColor:t.barTextColor};
|
|
60
|
+
}
|
|
61
|
+
&:hover {
|
|
62
|
+
color: ${t.barHoverColor};
|
|
63
|
+
.addon-collapsible-icon {
|
|
64
|
+
color: ${t.barHoverColor};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
`);function SE(e){yE("The `useList` tabs hook is deprecated. Use `TabsView` instead.");let t=(0,F.useRef)(),n=(0,F.useRef)(),r=(0,F.useRef)(new Map),{width:i=1}=Yx({ref:t}),[a,o]=(0,F.useState)(e),[s,c]=(0,F.useState)([]),l=(0,F.useRef)(e),u=(0,F.useCallback)(({menuName:e,actions:t})=>{let i=s.some(({active:e})=>e),[a,o]=(0,F.useState)(!1);return F.createElement(F.Fragment,null,F.createElement(kT,{visible:a,onVisibleChange:o,placement:`bottom`,popover:F.createElement(qT,{links:s.map(({title:e,id:n,color:r,active:i})=>({id:n,title:e,color:r,active:i,onClick:e=>{e.preventDefault(),t.onSelect(n)}}))})},F.createElement(xE,{id:`addons-menu-button`,ref:n,active:i,preActive:a,style:{visibility:s.length?`visible`:`hidden`},"aria-hidden":!s.length,className:`tabbutton`,type:`button`,role:`tab`},e,F.createElement(bE,{className:`addon-collapsible-icon`,isActive:i||a}))),s.map(({title:e,id:t,color:n},i)=>{let a=`index-${i}`;return F.createElement(lE,{id:`tabbutton-${g(t)??a}`,style:{visibility:`hidden`},"aria-hidden":!0,tabIndex:-1,ref:e=>{r.current.set(t,e)},className:`tabbutton`,type:`button`,key:t,textColor:n,role:`tab`},e)}))},[s]),d=(0,F.useCallback)(()=>{if(!t.current||!n.current)return;let{x:i,width:u}=t.current.getBoundingClientRect(),{width:d}=n.current.getBoundingClientRect(),f=s.length?i+u-d:i+u,p=[],m=0,h=e.filter(e=>{let{id:t}=e,n=r.current.get(t),{width:a=0}=n?.getBoundingClientRect()||{},o=i+m+a>f;return(!o||!n)&&p.push(e),m+=a,o});(p.length!==a.length||l.current!==e)&&(o(p),c(h),l.current=e)},[s.length,e,a]);return(0,F.useLayoutEffect)(d,[d,i]),{tabRefs:r,addonsRef:n,tabBarRef:t,visibleList:a,invisibleList:s,AddonTab:u}}var CE=`/* emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason */`,wE=N.div(({theme:e,bordered:t})=>t?{backgroundClip:`padding-box`,border:`1px solid ${e.appBorderColor}`,borderRadius:e.appBorderRadius,overflow:`hidden`,boxSizing:`border-box`}:{},({absolute:e})=>e?{width:`100%`,height:`100%`,boxSizing:`border-box`,display:`flex`,flexDirection:`column`}:{display:`block`}),TE=N.div({overflow:`hidden`,"&:first-of-type":{marginLeft:-3},whiteSpace:`nowrap`,flexGrow:1}),EE=(0,F.forwardRef)((e,t)=>(JT("The `TabBar` component is deprecated. Use `TabsView` instead."),F.createElement(TE,{"data-deprecated":`TabBar`,...e,ref:t})));EE.displayName=`TabBar`;var DE=N.div({display:`block`,position:`relative`,container:`tab-content / inline-size`},({theme:e})=>({fontSize:e.typography.size.s2-1,background:e.background.content}),({bordered:e,theme:t})=>e?{borderRadius:`0 0 ${t.appBorderRadius-1}px ${t.appBorderRadius-1}px`}:{},({absolute:e,bordered:t})=>e?{height:`calc(100% - ${t?42:40}px)`,position:`absolute`,left:0+(t?1:0),right:0+(t?1:0),bottom:0+(t?1:0),top:40+(t?1:0),overflow:`auto`,[`& > *:first-child${CE}`]:{position:`absolute`,left:0+(t?1:0),right:0+(t?1:0),bottom:0+(t?1:0),top:0+(t?1:0),height:`calc(100% - ${t?2:0}px)`,overflow:`auto`}}:{}),OE=(0,F.forwardRef)(({active:e,render:t,children:n},r)=>(JT("The `TabWrapper` component is deprecated. Use `TabsView` instead."),F.createElement(_E,{"data-deprecated":`TabWrapper`,ref:r,active:e},t?t():n)));OE.displayName=`TabWrapper`;var kE=class extends F.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(`Error rendering addon panel`),console.error(e),console.error(t.componentStack)}render(){return this.state.hasError&&this.props.active?F.createElement(hE,{title:`This addon has errors`,description:`Check your browser logs and addon code to pinpoint what went wrong. This issue was not caused by Storybook.`}):this.props.children}},AE=(0,F.memo)(({children:e,selected:t=null,actions:n,absolute:r=!1,bordered:i=!1,tools:a=null,backgroundColor:o,id:s=null,menuName:c=`Tabs`,emptyState:l,showToolsWhenEmpty:u})=>{JT("The `Tabs` component is deprecated. Use `TabsView` instead.");let d=(0,F.useMemo)(()=>vE(e).map((e,n)=>({...e,active:t?e.id===t:n===0})),[e,t]),{visibleList:f,tabBarRef:p,tabRefs:m,AddonTab:h}=SE(d),_=l??F.createElement(hE,{title:`Nothing found`});return!u&&d.length===0?_:F.createElement(wE,{"data-deprecated":`Tabs`,absolute:r,bordered:i,id:s},F.createElement(nE,{scrollable:!1,border:!0,backgroundColor:o},F.createElement(EE,{style:{whiteSpace:`normal`},ref:p,role:`tablist`},f.map(({title:e,id:t,active:r,color:i},a)=>{let o=`index-${a}`;return F.createElement(lE,{id:`tabbutton-${g(t)??o}`,ref:e=>{m.current.set(t,e)},className:`tabbutton ${r?`tabbutton-active`:``}`,type:`button`,key:t,active:r,textColor:i,onClick:e=>{e.preventDefault(),n.onSelect(t)},role:`tab`,"aria-selected":r},typeof e==`function`?F.createElement(`title`,null):e)}),F.createElement(h,{menuName:c,actions:n})),a),F.createElement(DE,{id:`panel-tab-content`,bordered:i,absolute:r},d.length?d.map(({id:e,active:t,render:n})=>F.createElement(kE,{key:e,active:t},F.createElement(n,{active:t},null))):_))});AE.displayName=`Tabs`;var jE=class extends F.Component{constructor(e){super(e),this.handlers={onSelect:e=>this.setState({selected:e})},JT("The `TabsState` class is deprecated. Use `TabsView` instead."),this.state={selected:e.initial}}render(){let{bordered:e=!1,absolute:t=!1,children:n,backgroundColor:r,menuName:i}=this.props,{selected:a}=this.state;return F.createElement(AE,{bordered:e,absolute:t,selected:a,backgroundColor:r,menuName:i,actions:this.handlers},n)}};jE.defaultProps={children:[],initial:null,absolute:!1,bordered:!1,backgroundColor:``,menuName:void 0};var ME=N.span(({theme:e})=>({display:`inline-block`,width:1,height:20,background:e.appBorderColor,marginLeft:2,marginRight:2}),({force:e})=>e?{}:{"& + &":{display:`none`}});ME.displayName=`Separator`,N.div(({theme:e})=>({fontSize:e.typography.size.s2-1,height:`100%`}));function NE(e,t){let{"aria-label":n,"aria-labelledby":r,orientation:i=`horizontal`}=e,[a,o]=(0,F.useState)(!1);z(()=>{var e;o(!!(t.current&&(e=t.current.parentElement)!=null&&e.closest(`[role="toolbar"]`)))});let{direction:s}=pg(),c=s===`rtl`&&i===`horizontal`,l=Kv(t),u=e=>{if(e.currentTarget.contains(e.target)){if(i===`horizontal`&&e.key===`ArrowRight`||i===`vertical`&&e.key===`ArrowDown`)c?l.focusPrevious():l.focusNext();else if(i===`horizontal`&&e.key===`ArrowLeft`||i===`vertical`&&e.key===`ArrowUp`)c?l.focusNext():l.focusPrevious();else if(e.key===`Tab`){e.stopPropagation(),d.current=document.activeElement,e.shiftKey?l.focusFirst():l.focusLast();return}else return;e.stopPropagation(),e.preventDefault()}},d=(0,F.useRef)(null),f=e=>{!e.currentTarget.contains(e.relatedTarget)&&!d.current&&(d.current=e.target)},p=e=>{var n;if(d.current&&!e.currentTarget.contains(e.relatedTarget)&&(n=t.current)!=null&&n.contains(e.target)){var r;(r=d.current)==null||r.focus(),d.current=null}};return{toolbarProps:{...G(e,{labelable:!0}),role:a?`group`:`toolbar`,"aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:a?void 0:u,onFocusCapture:a?void 0:p,onBlurCapture:a?void 0:f}}}var PE=({"aria-label":e,"aria-labelledby":t,...n})=>{let r=(0,F.useRef)(null),{toolbarProps:i}=NE({"aria-label":e,"aria-labelledby":t,orientation:`horizontal`},r);return F.createElement(QT,{ref:r,...i,...n})},FE=new WeakMap;function IE(e,t,n){return e?(typeof t==`string`&&(t=t.replace(/\s+/g,``)),`${FE.get(e)}-${n}-${t}`):``}function LE(e,t,n){let{key:r,isDisabled:i,shouldSelectOnPressUp:a}=e,{selectionManager:o,selectedKey:s}=t,c=r===s,l=i||t.isDisabled||t.selectionManager.isDisabled(r),{itemProps:u,isPressed:d}=Ow({selectionManager:o,key:r,ref:n,isDisabled:l,shouldSelectOnPressUp:a,linkBehavior:`selection`}),f=IE(t,r,`tab`),p=IE(t,r,`tabpanel`),{tabIndex:m}=u,h=t.collection.getItem(r),g=G(h?.props,{labelable:!0});delete g.id;let _=sp(h?.props),{focusableProps:v}=lh({isDisabled:l},n);return{tabProps:W(g,v,_,u,{id:f,"aria-selected":c,"aria-disabled":l||void 0,"aria-controls":c?p:void 0,tabIndex:l?void 0:m,role:`tab`}),isSelected:c,isDisabled:l,isPressed:d}}function RE(e,t,n){let r=Zv(n)?void 0:0,i=IE(t,e.id??t?.selectedKey,`tabpanel`);return{tabPanelProps:W(hp({...e,id:i,"aria-labelledby":IE(t,t?.selectedKey,`tab`)}),{tabIndex:r,role:`tabpanel`,"aria-describedby":e[`aria-describedby`],"aria-details":e[`aria-details`]})}}var zE=class{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){var t,n;return this.disabledKeys.has(e)||!!(!((n=this.collection.getItem(e))==null||(t=n.props)==null)&&t.isDisabled)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let t=e;do t=this.collection.getKeyAfter(t),t??=this.collection.getFirstKey();while(t!=null&&this.isDisabled(t));return t}getPreviousKey(e){let t=e;do t=this.collection.getKeyBefore(t),t??=this.collection.getLastKey();while(t!=null&&this.isDisabled(t));return t}constructor(e,t,n,r=new Set){this.collection=e,this.flipDirection=t===`rtl`&&n===`horizontal`,this.disabledKeys=r,this.tabDirection=n===`horizontal`}};function BE(e,t,n){let{orientation:r=`horizontal`,keyboardActivation:i=`automatic`}=e,{collection:a,selectionManager:o,disabledKeys:s}=t,{direction:c}=pg(),{collectionProps:l}=Dw({ref:n,selectionManager:o,keyboardDelegate:(0,F.useMemo)(()=>new zE(a,c,r,s),[a,s,r,c]),selectOnFocus:i===`automatic`,disallowEmptySelection:!0,scrollRef:n,linkBehavior:`selection`}),u=B();return FE.set(t,u),{tabListProps:{...W(l,hp({...e,id:u})),role:`tablist`,"aria-orientation":r,tabIndex:void 0}}}var VE=N.button({whiteSpace:`normal`,display:`inline-flex`,overflow:`hidden`,verticalAlign:`top`,justifyContent:`center`,alignItems:`center`,textAlign:`center`,textDecoration:`none`,scrollSnapAlign:`start`,"&:empty":{display:`none`},"&[hidden]":{display:`none`}},({theme:e})=>({padding:`0 15px`,transition:`color 0.2s linear, border-bottom-color 0.2s linear`,height:40,lineHeight:`12px`,cursor:`pointer`,background:`transparent`,border:`0 solid transparent`,borderTop:`3px solid transparent`,borderBottom:`3px solid transparent`,fontWeight:`bold`,fontSize:13,"&:focus-visible":{outline:`0 none`,boxShadow:`inset 0 0 0 2px ${e.barSelectedColor}`}}),({isSelected:e,theme:t})=>e?{color:t.barSelectedColor,borderBottomColor:t.barSelectedColor}:{color:t.barTextColor,borderBottomColor:`transparent`,"&:hover":{color:t.barHoverColor}}),HE=N.div({display:`flex`,alignItems:`center`,flexShrink:0,position:`relative`,overflow:`hidden`}),UE=N.div({display:`flex`,overflowX:`auto`,scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitScrollbar:`none`,scrollSnapType:`x mandatory`,flex:1,"&::-webkit-scrollbar":{display:`none`}}),WE=N.div({display:`flex`,flexShrink:0}),GE=28,KE=N.div(({$showStartBorder:e,$showEndBorder:t,theme:n})=>({flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:6,boxShadow:e?`inset 1px 0 0 ${n.appBorderColor}`:t?`inset -1px 0 0 ${n.appBorderColor}`:`none`})),qE=N(Rb)({flexShrink:0,paddingInline:0,width:16}),JE=({item:e,state:t})=>{let{rendered:n}=e,r=F.useRef(null),{tabProps:i,isDisabled:a,isPressed:o,isSelected:s}=LE(e,t,r);return F.createElement(VE,{...i,isDisabled:a,isPressed:o,isSelected:s,className:`tabbutton ${s?`tabbutton-active`:``}`,ref:r},n)},YE=({state:e,...t})=>{let n=(0,F.useRef)(null),r=(0,F.useRef)(null),i=(0,F.useRef)(null),{tabListProps:a}=BE({orientation:`horizontal`},e,i),[o,s]=(0,F.useState)(!1),[c,l]=(0,F.useState)(!1),[u,d]=(0,F.useState)(!1),f=(0,F.useCallback)(()=>{let e=r.current,t=n.current;if(!e||!t)return;let{scrollLeft:i,scrollWidth:a,clientWidth:c}=e,u=a>t.clientWidth-(o?GE*2:0);s(u),u?(l(i>0),d(i<a-c)):(l(!1),d(!1))},[o]),p=(0,F.useCallback)(()=>{f()},[f]);(0,F.useEffect)(()=>{let e=r.current;if(!e||typeof window>`u`)return;e.addEventListener(`scroll`,p,{passive:!0});let t=null;typeof ResizeObserver<`u`&&(t=new ResizeObserver(p),t.observe(e));let n=setTimeout(p,0);return()=>{clearTimeout(n),e.removeEventListener(`scroll`,p),t&&t.disconnect()}},[p]);let m=(0,F.useCallback)(e=>{let t=r.current,i=n.current;if(!t||!i||typeof window>`u`)return;let a=i.clientWidth-GE*2,o=e===`backward`?-a:a;typeof t.scrollBy==`function`?t.scrollBy({left:o,behavior:`smooth`}):t.scrollLeft+=o},[]),h=(0,F.useCallback)(()=>m(`backward`),[m]),g=(0,F.useCallback)(()=>m(`forward`),[m]);return F.createElement(HE,{...t,ref:n,"data-show-scroll-buttons":o},o&&F.createElement(KE,{$showEndBorder:c},F.createElement(qE,{variant:`ghost`,padding:`small`,size:`small`,ariaLabel:`Scroll backward`,disabled:!c,onClick:h,tabIndex:-1},F.createElement(Ce,null))),F.createElement(UE,{ref:r},F.createElement(WE,{ref:i,...a},[...e.collection].map(t=>F.createElement(JE,{key:t.key,item:t,state:e})))),o&&F.createElement(KE,{$showStartBorder:u},F.createElement(qE,{variant:`ghost`,padding:`small`,size:`small`,ariaLabel:`Scroll forward`,disabled:!u,onClick:g,tabIndex:-1},F.createElement(we,null))))},XE=N.div({overflowY:`hidden`,height:`100%`}),ZE=({hasScrollbar:e=!0,renderAllChildren:t=!1,state:n})=>{let r=(0,F.useRef)(null),i=n,{tabPanelProps:a}=RE(i.selectedItem??{},i,r);return(t?[...i.collection]:[i.selectedItem]).filter(e=>!!e).map(t=>{let n=i.selectedKey===t.key;return F.createElement(XE,{key:t.key,ref:n?r:void 0,...n?a:{},id:n?`${a.id}`.replace(/null$/,`${t.key}`):void 0,hidden:n?void 0:!0},e?F.createElement(re,{vertical:!0},t.props.children):t.props.children)})},QE=class{*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let t=this.keyMap.get(e);var n;return t&&(n=t.prevKey)!=null?n:null}getKeyAfter(e){let t=this.keyMap.get(e);var n;return t&&(n=t.nextKey)!=null?n:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){let t=[...this.getKeys()];return this.getItem(t[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let t=e=>{if(this.keyMap.set(e.key,e),e.childNodes&&e.type===`section`)for(let n of e.childNodes)t(n)};for(let n of e)t(n);let n=null,r=0,i=0;for(let[e,t]of this.keyMap)n?(n.nextKey=e,t.prevKey=n.key):(this.firstKey=e,t.prevKey=void 0),t.type===`item`&&(t.index=r++),(t.type===`section`||t.type===`item`)&&i++,n=t,n.nextKey=void 0;this._size=i,this.lastKey=n?.key??null}};function $E(e){let{filter:t,layoutDelegate:n}=e,r=uT(e),i=(0,F.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=Uw(e,(0,F.useCallback)(e=>t?new QE(t(e)):new QE(e),[t]),(0,F.useMemo)(()=>({suppressTextValueWarning:e.suppressTextValueWarning}),[e.suppressTextValueWarning])),o=(0,F.useMemo)(()=>new fT(a,r,{layoutDelegate:n}),[a,r,n]);return eD(a,o),{collection:a,disabledKeys:i,selectionManager:o}}function eD(e,t){let n=(0,F.useRef)(null);(0,F.useEffect)(()=>{if(t.focusedKey!=null&&!e.getItem(t.focusedKey)&&n.current){let r=n.current.getItem(t.focusedKey),i=[...n.current.getKeys()].map(e=>{let t=n.current.getItem(e);return t?.type===`item`?t:null}).filter(e=>e!==null),a=[...e.getKeys()].map(t=>{let n=e.getItem(t);return n?.type===`item`?n:null}).filter(e=>e!==null),o=(i?.length??0)-(a?.length??0),s=Math.min(o>1?Math.max((r?.index??0)-o+1,0):r?.index??0,(a?.length??0)-1),c=null,l=!1;for(;s>=0;){if(!t.isDisabled(a[s].key)){c=a[s];break}s<a.length-1&&!l?s++:(l=!0,s>(r?.index??0)&&(s=r?.index??0),s--)}t.setFocusedKey(c?c.key:null)}n.current=e},[e,t])}function tD(e){let[t,n]=em(e.selectedKey,e.defaultSelectedKey??null,e.onSelectionChange),r=(0,F.useMemo)(()=>t==null?[]:[t],[t]),{collection:i,disabledKeys:a,selectionManager:o}=$E({...e,selectionMode:`single`,disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:r,onSelectionChange:r=>{if(r===`all`)return;let i=r.values().next().value??null;i===t&&e.onSelectionChange&&e.onSelectionChange(i),n(i)}});return{collection:i,disabledKeys:a,selectionManager:o,selectedKey:t,setSelectedKey:n,selectedItem:t==null?null:i.getItem(t)}}function nD(e){let t=tD({...e,onSelectionChange:e.onSelectionChange?t=>{var n;t!=null&&((n=e.onSelectionChange)==null||n.call(e,t))}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:e.defaultSelectedKey??rD(e.collection,e.disabledKeys?new Set(e.disabledKeys):new Set)??void 0}),{selectionManager:n,collection:r,selectedKey:i}=t,a=(0,F.useRef)(i);return(0,F.useEffect)(()=>{let o=i;e.selectedKey==null&&(n.isEmpty||o==null||!r.getItem(o))&&(o=rD(r,t.disabledKeys),o!=null&&n.setSelectedKeys([o])),(o!=null&&n.focusedKey==null||!n.isFocused&&o!==a.current)&&n.setFocusedKey(o),a.current=o}),{...t,isDisabled:e.isDisabled||!1}}function rD(e,t){let n=null;if(e){var r,i,a,o;for(n=e.getFirstKey();n!=null&&(t.has(n)||!((i=e.getItem(n))==null||(r=i.props)==null)&&r.isDisabled)&&n!==e.getLastKey();)n=e.getKeyAfter(n);n!=null&&(t.has(n)||!((o=e.getItem(n))==null||(a=o.props)==null)&&a.isDisabled)&&n===e.getLastKey()&&(n=e.getFirstKey())}return n}var iD=({defaultSelected:e,onSelectionChange:t,selected:n,tabs:r})=>nD({children:r.map(({children:e,id:t,"aria-label":n,title:r})=>F.createElement(Lw,{key:t,"aria-label":n,title:typeof r==`function`?F.createElement(r,null):r},typeof e==`function`?F.createElement(e,null):e)),disabledKeys:r.filter(({isDisabled:e})=>e).map(({id:e})=>e),defaultSelectedKey:e,onSelectionChange:e=>t?.(`${e}`),selectedKey:n}),aD=N.div({display:`flex`,flexDirection:`column`,height:`100%`}),oD=N(ZE)(()=>({flex:1})),sD=N(YE)(({$simulatedGap:e})=>({flex:`1 1 0%`,'&[data-show-scroll-buttons="true"]':{marginInlineEnd:e}})),cD=({backgroundColor:e,barInnerStyle:t,defaultSelected:n,emptyState:r,onSelectionChange:i,panelProps:a={},selected:o,showToolsWhenEmpty:s,tabs:c,tools:l,...u})=>{let d=iD({defaultSelected:n,onSelectionChange:i,selected:o,tabs:c}),f=r??F.createElement(hE,{title:`Nothing found`}),p=c.length>0;return!s&&!p?f:F.createElement(aD,{...u},F.createElement(QT,{scrollable:!1,border:!0,backgroundColor:e,innerStyle:{display:`flex`,justifyContent:`space-between`,paddingInlineStart:0,paddingInlineEnd:10,"> *:not(:last-child)":{order:2},"> *":{flexShrink:0},...t,gap:0}},l,p?F.createElement(sD,{state:d,$simulatedGap:t?.gap??6}):F.createElement(`div`,null)),p?F.createElement(oD,{state:d,...a}):f)},lD=(0,F.createContext)(null),uD=(0,F.createContext)(null),dD=(0,F.forwardRef)(function(e,t){[e,t]=q(e,t,lD);let{children:n,orientation:r=`horizontal`}=e;return n=(0,F.useMemo)(()=>typeof n==`function`?n({orientation:r,defaultChildren:null}):n,[n,r]),F.createElement(jC,{content:n},n=>F.createElement(fD,{props:e,collection:n,tabsRef:t}))});function fD({props:e,tabsRef:t,collection:n}){let{orientation:r=`horizontal`}=e,i=nD({...e,collection:n,children:void 0}),{focusProps:a,isFocused:o,isFocusVisible:s}=Xv({within:!0}),c=(0,F.useMemo)(()=>({orientation:r,isFocusWithin:o,isFocusVisible:s}),[r,o,s]),l=Dh({...e,defaultClassName:`react-aria-Tabs`,values:c}),u=G(e,{global:!0});return F.createElement(`div`,{...W(u,l,a),ref:t,slot:e.slot||void 0,"data-focused":o||void 0,"data-orientation":r,"data-focus-visible":s||void 0,"data-disabled":i.isDisabled||void 0},F.createElement(Eh,{values:[[lD,e],[uD,i]]},l.children))}var pD=(0,F.forwardRef)(function(e,t){return(0,F.useContext)(uD)?F.createElement(mD,{props:e,forwardedRef:t}):F.createElement(UC,e)});function mD({props:e,forwardedRef:t}){let n=(0,F.useContext)(uD),{CollectionRoot:r}=(0,F.useContext)(lw),{orientation:i=`horizontal`,keyboardActivation:a=`automatic`}=Oh(lD),o=gp(t),{tabListProps:s}=BE({...e,orientation:i,keyboardActivation:a},n,o),c=Dh({...e,children:null,defaultClassName:`react-aria-TabList`,values:{orientation:i,state:n}}),l=G(e,{global:!0});return delete l.id,F.createElement(`div`,{...W(l,c,s),ref:o,"data-orientation":i||void 0},F.createElement(r,{collection:n.collection,persistedKeys:uw(n.selectionManager.focusedKey)}))}var hD=class extends pC{};hD.type=`item`;var gD=zC(hD,(e,t,n)=>{let r=(0,F.useContext)(uD),i=gp(t),{tabProps:a,isSelected:o,isDisabled:s,isPressed:c}=LE({key:n.key,...e},r,i),{focusProps:l,isFocused:u,isFocusVisible:d}=Xv(),{hoverProps:f,isHovered:p}=bh({isDisabled:s,onHoverStart:e.onHoverStart,onHoverEnd:e.onHoverEnd,onHoverChange:e.onHoverChange}),m=Dh({...e,id:void 0,children:n.rendered,defaultClassName:`react-aria-Tab`,values:{isSelected:o,isDisabled:s,isFocused:u,isFocusVisible:d,isPressed:c,isHovered:p}}),h=n.props.href?`a`:`div`,g=G(e,{global:!0});return delete g.id,delete g.onClick,F.createElement(h,{...W(g,m,a,l,f),ref:i,"data-selected":o||void 0,"data-disabled":s||void 0,"data-focused":u||void 0,"data-focus-visible":d||void 0,"data-pressed":c||void 0,"data-hovered":p||void 0},m.children)}),_D=DC(function(e,t){let n=(0,F.useContext)(uD),r=gp(t),{id:i,...a}=e,{tabPanelProps:o}=RE(e,n,r),{focusProps:s,isFocused:c,isFocusVisible:l}=Xv(),u=n.selectedKey===e.id,d=Dh({...e,defaultClassName:`react-aria-TabPanel`,values:{isFocused:c,isFocusVisible:l,isInert:Lp(!u),state:n}});if(!u&&!e.shouldForceMount)return null;let f=G(a,{global:!0});delete f.id;let p=u?W(f,o,s,d):d;return F.createElement(`div`,{...p,ref:r,"data-focused":c||void 0,"data-focus-visible":l||void 0,inert:Lp(!u||e.inert),"data-inert":u?void 0:`true`},F.createElement(Eh,{values:[[lD,null],[uD,null]]},F.createElement(lw.Provider,{value:ow},d.children)))});N.div({display:`flex`,alignItems:`center`,flexShrink:0,position:`relative`,overflow:`hidden`}),N.div({display:`flex`,overflowX:`auto`,scrollbarWidth:`none`,msOverflowStyle:`none`,WebkitScrollbar:`none`,scrollSnapType:`x mandatory`,flex:1,"&::-webkit-scrollbar":{display:`none`}}),N(pD)({display:`flex`,flexShrink:0}),N.div(({$showStartBorder:e,$showEndBorder:t,theme:n})=>({flexShrink:0,display:`flex`,alignItems:`center`,justifyContent:`center`,padding:6,boxShadow:e?`inset 1px 0 0 ${n.appBorderColor}`:t?`inset -1px 0 0 ${n.appBorderColor}`:`none`})),N(Rb)({flexShrink:0,paddingInline:0,width:16}),N(_D)({overflowY:`hidden`,height:`100%`,display:`block`,'&[inert="true"]':{display:`none`}}),N(dD)(({$simulatedGap:e})=>({display:`flex`,flexDirection:`column`,height:`100%`,".tablist":{flex:`1 1 100%`},".tablist.tablist-has-scroll":{marginInlineEnd:e},"& > :not(:first-child)":{flex:1}})),N(gD)(({theme:e})=>({whiteSpace:`normal`,display:`inline-flex`,overflow:`hidden`,verticalAlign:`top`,justifyContent:`center`,alignItems:`center`,textAlign:`center`,textDecoration:`none`,scrollSnapAlign:`start`,"&:empty":{display:`none`},"&[hidden]":{display:`none`},padding:`0 15px`,transition:`color 0.2s linear, border-bottom-color 0.2s linear`,height:40,lineHeight:`12px`,cursor:`pointer`,background:`transparent`,border:`0 solid transparent`,borderTop:`3px solid transparent`,borderBottom:`3px solid transparent`,fontWeight:`bold`,fontSize:13,"&:focus-visible":{outline:`0 none`,boxShadow:`inset 0 0 0 2px ${e.barSelectedColor}`},color:e.barTextColor,borderBottomColor:`transparent`,"&:hover":{color:e.barHoverColor},"&[data-selected]":{color:e.barSelectedColor,borderBottomColor:e.barSelectedColor}}));var vD=M`
|
|
68
|
+
from {
|
|
69
|
+
transform: rotate(0deg);
|
|
70
|
+
}
|
|
71
|
+
to {
|
|
72
|
+
transform: rotate(360deg);
|
|
73
|
+
}
|
|
74
|
+
`,yD=N.div(({size:e=32})=>({borderRadius:`50%`,cursor:`progress`,display:`inline-block`,overflow:`hidden`,position:`absolute`,transition:`all 200ms ease-out`,verticalAlign:`top`,top:`50%`,left:`50%`,marginTop:-(e/2),marginLeft:-(e/2),height:e,width:e,zIndex:4,borderWidth:2,borderStyle:`solid`,borderColor:`rgba(97, 97, 97, 0.29)`,borderTopColor:`rgb(100,100,100)`,animation:`${vD} 0.7s linear infinite`,mixBlendMode:`difference`})),bD=N.div({position:`absolute`,display:`flex`,flexDirection:`column`,justifyContent:`center`,alignItems:`center`,width:`100%`,height:`100%`}),xD=N.div(({theme:e})=>({position:`relative`,width:`80%`,marginBottom:`0.75rem`,maxWidth:300,height:5,borderRadius:5,background:C(.8,e.color.secondary),overflow:`hidden`,cursor:`progress`})),SD=N.div(({theme:e})=>({position:`absolute`,top:0,left:0,height:`100%`,background:e.color.secondary})),CD=N.div(({theme:e})=>({minHeight:`2em`,fontSize:`${e.typography.size.s1}px`,color:e.textMutedColor})),wD=N(le)(({theme:e})=>({width:20,height:20,marginBottom:`0.5rem`,color:e.textMutedColor})),TD=M`
|
|
75
|
+
from { content: "..." }
|
|
76
|
+
33% { content: "." }
|
|
77
|
+
66% { content: ".." }
|
|
78
|
+
to { content: "..." }
|
|
79
|
+
`,ED=N.span({"&::after":{content:`'...'`,animation:`${TD} 1s linear infinite`,animationDelay:`1s`,display:`inline-block`,width:`1em`,height:`auto`}}),DD=({progress:e,error:t,size:n,...r})=>{if(t)return F.createElement(bD,{"aria-label":t.toString(),"aria-live":`polite`,role:`status`,...r},F.createElement(wD,null),F.createElement(CD,null,t.message));if(e){let{value:t,modules:n}=e,{message:i}=e;return n&&(i+=` ${n.complete} / ${n.total} modules`),F.createElement(bD,{"aria-label":`Content is loading...`,"aria-live":`polite`,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":t*100,"aria-valuetext":i,role:`progressbar`,...r},F.createElement(xD,null,F.createElement(SD,{style:{width:`${t*100}%`}})),F.createElement(CD,null,i,t<1&&F.createElement(ED,{key:i})))}return F.createElement(yD,{"aria-label":`Content is loading...`,"aria-live":`polite`,role:`status`,size:n,...r})},OD=M({"0%":{transform:`rotate(0deg)`},"100%":{transform:`rotate(360deg)`}});N.div(({size:e})=>({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,minWidth:e,minHeight:e})),N.svg(({size:e,width:t})=>({position:`absolute`,width:`${e}px!important`,height:`${e}px!important`,transform:`rotate(-90deg)`,circle:{r:(e-Math.ceil(t))/2,cx:e/2,cy:e/2,opacity:.15,fill:`transparent`,stroke:`currentColor`,strokeWidth:t,strokeLinecap:`round`,strokeDasharray:Math.PI*(e-Math.ceil(t))}}),({progress:e})=>e&&{circle:{opacity:.75}},({spinner:e})=>e&&{animation:`${OD} 1s linear infinite`,circle:{opacity:.25}});var{deprecate:kD}=__STORYBOOK_MODULE_CLIENT_LOGGER__;N.pre`
|
|
80
|
+
line-height: 18px;
|
|
81
|
+
padding: 11px 1rem;
|
|
82
|
+
white-space: pre-wrap;
|
|
83
|
+
background: rgba(0, 0, 0, 0.05);
|
|
84
|
+
color: ${P.darkest};
|
|
85
|
+
border-radius: 3px;
|
|
86
|
+
margin: 1rem 0;
|
|
87
|
+
width: 100%;
|
|
88
|
+
display: block;
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
font-family: ${j.fonts.mono};
|
|
91
|
+
font-size: ${j.size.s2-1}px;
|
|
92
|
+
`;var AD=Od,jD={};Object.keys(Od).forEach(e=>{jD[e]=(0,F.forwardRef)((t,n)=>(0,F.createElement)(e,{...t,ref:n}))});export{ve as A,ye as C,ue as D,xe as E,ce as F,Te as M,oe as N,_e as O,se as P,pe as S,Se as T,Yu as _,qS as a,L as b,Pd as c,Zu as d,id as f,Qx as g,PE as h,cS as i,me as j,de as k,DD as l,Vb as m,ld as n,pd as o,cD as p,hE as r,md as s,Rb as t,kT as u,AD as v,be as w,R as x,Wu as y};
|