From b0fb239d1c20945a2bc23824bd8b2de18401a8d5 Mon Sep 17 00:00:00 2001 From: mnlfischer Date: Wed, 23 Oct 2024 13:06:25 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages-storybook=20from=20@?= =?UTF-8?q?=20abusix/hailstorm@aea239c5043bdc444ca6a4c48d231ffd68fd851c=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...B3LPFtYd.js => Color-ERTF36HU-rlRgfIB0.js} | 2 +- ...Q.js => DocsRenderer-CFRXHY34-CfxJRWUd.js} | 2 +- .../{badge-Da1HxQE-.js => badge-BIezdMmM.js} | 2 +- ...-gP-6Aq3K.js => badge.stories-DloSsjdd.js} | 2 +- ...{button-Cwplw9FX.js => button-CNKqPViR.js} | 2 +- ...B_08GyF3.js => button.stories-D9pdHdIx.js} | 2 +- ...BGz9dfF0.js => dialog.stories-BX6_XaCw.js} | 2 +- ...-CVX8W8q9.js => entry-preview-Dr1n3Wdx.js} | 2 +- ...V6.js => featured-tag.stories-Du1zMPkV.js} | 2 +- ...eld-BtJxu7hP.js => form-field-2xLK_lYH.js} | 2 +- ...s => form-field-group.stories-CNEhqW5L.js} | 2 +- ...on-DlSTEzH7.js => icon-button-k2wtPfcV.js} | 2 +- ...lnz.js => icon-button.stories-0-APhIQ1.js} | 2 +- .../{icons-Dp8Wmtux.js => icons-BtgjIq6b.js} | 2 +- ...{iframe-B1Sidt8M.js => iframe-9T-PF226.js} | 4 +- .../{index-bmGcrzev.js => index-B27qxNgk.js} | 2 +- assets/index-BgfbgFhO.js | 4 + .../{index-D4CCEPie.js => index-D_yKE35a.js} | 8 +- .../{index-BwmOyQc7.js => index-VyeKKq5j.js} | 2 +- assets/index-h1jAayoZ.js | 4 - assets/link.stories-2GyWZWrZ.js | 19 --- assets/link.stories-BsuBz4ei.js | 19 +++ ...YhiM9ac.js => listbox.stories-Buiq_fV8.js} | 2 +- assets/{menu-BbZFQK8W.js => menu-6dEOZWfD.js} | 2 +- ...3CClY.js => menu-item.stories-BTxqC4cZ.js} | 2 +- ...s-CgnJSCFe.js => menu.stories-xNzefD_l.js} | 2 +- ....js => multi-combobox.stories-BDk-Xj5k.js} | 2 +- assets/navigation.stories-DFpQPa8H.js | 105 ++++++++++++++ assets/navigation.stories-_4qlPrgP.js | 105 -------------- ...-5EuFEmkX.js => panel.stories-B05jnSyq.js} | 2 +- assets/popover-menu.stories-C3Er2s3-.js | 34 +++++ assets/popover-menu.stories-DcT5PR_I.js | 34 ----- ...review-Dsbj-GgD.js => preview-BXpCwDS1.js} | 4 +- ...review-CL0FZwLC.js => preview-BbTc69zT.js} | 0 ...view-kJxS59jD.css => preview-o0cxRMzs.css} | 0 ...mSkEW.js => radio-box.stories-CJwvD2av.js} | 2 +- ...lVt.js => radio-input.stories-BrZdO4Rq.js} | 2 +- ...Wz.js => search-input.stories-CTxLO1lU.js} | 2 +- ...eowXPCk.js => section.stories-c2uXgnH6.js} | 2 +- ...qghgW.js => sidesheet.stories-Iwuc9DOn.js} | 2 +- ...js => single-combobox.stories-DuoRfe_y.js} | 2 +- assets/tab.stories-BExfMg0Y.js | 52 +++++++ assets/tab.stories-CVEumuZ5.js | 49 ------- ...> table-unvirtualized.stories-D4Z2ULmw.js} | 2 +- assets/table-virtualized.stories-CZFEUGuD.js | 133 ++++++++++++++++++ assets/table-virtualized.stories-KaRUCWoS.js | 133 ------------------ ...I3td.js => text-input.stories-B1dwyupg.js} | 2 +- ...EphPuj.js => textarea.stories-BxDua9o8.js} | 2 +- ...4pljqyk.js => tooltip.stories-DmTKg58f.js} | 2 +- ...fj0D-rE.js => top-bar.stories-BeIujtwl.js} | 2 +- iframe.html | 2 +- project.json | 2 +- 52 files changed, 390 insertions(+), 387 deletions(-) rename assets/{Color-ERTF36HU-B3LPFtYd.js => Color-ERTF36HU-rlRgfIB0.js} (99%) rename assets/{DocsRenderer-CFRXHY34-D9viofLQ.js => DocsRenderer-CFRXHY34-CfxJRWUd.js} (90%) rename assets/{badge-Da1HxQE-.js => badge-BIezdMmM.js} (91%) rename assets/{badge.stories-gP-6Aq3K.js => badge.stories-DloSsjdd.js} (96%) rename assets/{button-Cwplw9FX.js => button-CNKqPViR.js} (76%) rename assets/{button.stories-B_08GyF3.js => button.stories-D9pdHdIx.js} (97%) rename assets/{dialog.stories-BGz9dfF0.js => dialog.stories-BX6_XaCw.js} (97%) rename assets/{entry-preview-CVX8W8q9.js => entry-preview-Dr1n3Wdx.js} (99%) rename assets/{featured-tag.stories-CsNO07V6.js => featured-tag.stories-Du1zMPkV.js} (94%) rename assets/{form-field-BtJxu7hP.js => form-field-2xLK_lYH.js} (65%) rename assets/{form-field-group.stories-D6_h9T9i.js => form-field-group.stories-CNEhqW5L.js} (95%) rename assets/{icon-button-DlSTEzH7.js => icon-button-k2wtPfcV.js} (76%) rename assets/{icon-button.stories-CERmelnz.js => icon-button.stories-0-APhIQ1.js} (90%) rename assets/{icons-Dp8Wmtux.js => icons-BtgjIq6b.js} (98%) rename assets/{iframe-B1Sidt8M.js => iframe-9T-PF226.js} (73%) rename assets/{index-bmGcrzev.js => index-B27qxNgk.js} (92%) create mode 100644 assets/index-BgfbgFhO.js rename assets/{index-D4CCEPie.js => index-D_yKE35a.js} (99%) rename assets/{index-BwmOyQc7.js => index-VyeKKq5j.js} (96%) delete mode 100644 assets/index-h1jAayoZ.js delete mode 100644 assets/link.stories-2GyWZWrZ.js create mode 100644 assets/link.stories-BsuBz4ei.js rename assets/{listbox.stories-DYhiM9ac.js => listbox.stories-Buiq_fV8.js} (96%) rename assets/{menu-BbZFQK8W.js => menu-6dEOZWfD.js} (70%) rename assets/{menu-item.stories-C6z3CClY.js => menu-item.stories-BTxqC4cZ.js} (95%) rename assets/{menu.stories-CgnJSCFe.js => menu.stories-xNzefD_l.js} (96%) rename assets/{multi-combobox.stories-B81csaxo.js => multi-combobox.stories-BDk-Xj5k.js} (97%) create mode 100644 assets/navigation.stories-DFpQPa8H.js delete mode 100644 assets/navigation.stories-_4qlPrgP.js rename assets/{panel.stories-5EuFEmkX.js => panel.stories-B05jnSyq.js} (96%) create mode 100644 assets/popover-menu.stories-C3Er2s3-.js delete mode 100644 assets/popover-menu.stories-DcT5PR_I.js rename assets/{preview-Dsbj-GgD.js => preview-BXpCwDS1.js} (70%) rename assets/{preview-CL0FZwLC.js => preview-BbTc69zT.js} (100%) rename assets/{preview-kJxS59jD.css => preview-o0cxRMzs.css} (100%) rename assets/{radio-box.stories-ClLmSkEW.js => radio-box.stories-CJwvD2av.js} (89%) rename assets/{radio-input.stories-D9_eflVt.js => radio-input.stories-BrZdO4Rq.js} (93%) rename assets/{search-input.stories-CrW1iZWz.js => search-input.stories-CTxLO1lU.js} (95%) rename assets/{section.stories-BeowXPCk.js => section.stories-c2uXgnH6.js} (98%) rename assets/{sidesheet.stories-DC5qghgW.js => sidesheet.stories-Iwuc9DOn.js} (98%) rename assets/{single-combobox.stories-JqBGE505.js => single-combobox.stories-DuoRfe_y.js} (95%) create mode 100644 assets/tab.stories-BExfMg0Y.js delete mode 100644 assets/tab.stories-CVEumuZ5.js rename assets/{table-unvirtualized.stories-D8gQE_lR.js => table-unvirtualized.stories-D4Z2ULmw.js} (99%) create mode 100644 assets/table-virtualized.stories-CZFEUGuD.js delete mode 100644 assets/table-virtualized.stories-KaRUCWoS.js rename assets/{text-input.stories-BT2GI3td.js => text-input.stories-B1dwyupg.js} (96%) rename assets/{textarea.stories-82EphPuj.js => textarea.stories-BxDua9o8.js} (95%) rename assets/{tooltip.stories-D4pljqyk.js => tooltip.stories-DmTKg58f.js} (97%) rename assets/{top-bar.stories-Dfj0D-rE.js => top-bar.stories-BeIujtwl.js} (98%) diff --git a/assets/Color-ERTF36HU-B3LPFtYd.js b/assets/Color-ERTF36HU-rlRgfIB0.js similarity index 99% rename from assets/Color-ERTF36HU-B3LPFtYd.js rename to assets/Color-ERTF36HU-rlRgfIB0.js index ffe39703..dfd660ff 100644 --- a/assets/Color-ERTF36HU-B3LPFtYd.js +++ b/assets/Color-ERTF36HU-rlRgfIB0.js @@ -1 +1 @@ -import{al as Me,am as ie,an as Ce,ao as $,a2 as ue,a0 as $e,H as Oe,ap as Ie,aq as Ne}from"./index-D4CCEPie.js";import{g as fe,R as h,r as m}from"./index-0d5eMwbi.js";import"./iframe-B1Sidt8M.js";import"../sb-preview/runtime.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";var Se={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Se,he={};for(const e of Object.keys(F))he[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var de=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,c;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const i=(o+a)/2;return a===o?c=0:i<=.5?c=s/(a+o):c=s/(2-a-o),[l,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,c=e[2]/255,i=Math.max(s,l,c),d=i-Math.min(s,l,c),f=function(g){return(i-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/i,t=f(s),n=f(l),r=f(c),s===i?o=r-n:l===i?o=1/3+t-r:c===i&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,i*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Re(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=he[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Re(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,c=[0,0,0];for(let i=0;i<3;i++)a=t+1/3*-(i-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,c[i]=s*255;return c};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,c,s];case 1:return[l,r,s];case 2:return[s,r,c];case 3:return[s,l,r];case 4:return[c,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const c=n+a*(l-n);let i,d,f;switch(s){default:case 6:case 0:i=l,d=c,f=n;break;case 1:i=c,d=l,f=n;break;case 2:i=n,d=l,f=c;break;case 3:i=n,d=c,f=l;break;case 4:i=c,d=n,f=l;break;case 5:i=l,d=n,f=c;break}return[i*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,c=o**3,i=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,s=i>.008856?i:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,c;return s<1?l=a/(1-s):l=0,s<=0?c=0:o===t?c=(n-r)/s%6:o===n?c=2+(r-t)/s:c=4+(t-n)/s,c/=6,c%=1,[c*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let c=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return c=(1-n)*r,[(n*o[0]+c)*255,(n*o[1]+c)*255,(n*o[2]+c)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const X=de;function je(){const e={},t=Object.keys(X);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Be(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{N[e]={},Object.defineProperty(N[e],"channels",{value:K[e].channels}),Object.defineProperty(N[e],"labels",{value:K[e].labels});const t=Pe(e);Object.keys(t).forEach(r=>{const o=t[r];N[e][r]=Be(o),N[e][r].raw=qe(o)})});var Xe=N;const _=fe(Xe);var De=Me,We=function(){return De.Date.now()},Ke=We,Ve=/\s/;function Ae(e){for(var t=e.length;t--&&Ve.test(e.charAt(t)););return t}var Ge=Ae,Ue=Ge,Ye=/^\s+/;function Je(e){return e&&e.slice(0,Ue(e)+1).replace(Ye,"")}var Qe=Je,Ze=Qe,te=ie,et=Ce,ne=NaN,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^0o[0-7]+$/i,ot=parseInt;function at(e){if(typeof e=="number")return e;if(et(e))return ne;if(te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ze(e);var n=nt.test(e);return n||rt.test(e)?ot(e.slice(2),n?2:8):tt.test(e)?ne:+e}var st=at,lt=ie,W=Ke,re=st,ct="Expected a function",it=Math.max,ut=Math.min;function ft(e,t,n){var r,o,a,s,l,c,i=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError(ct);t=re(t)||0,lt(n)&&(d=!!n.leading,f="maxWait"in n,a=f?it(re(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,H=o;return r=o=void 0,i=v,s=e.apply(H,C),s}function j(v){return i=v,l=setTimeout(b,t),d?x(v):s}function M(v){var C=v-c,H=v-i,ee=t-C;return f?ut(ee,a-H):ee}function p(v){var C=v-c,H=v-i;return c===void 0||C>=t||C<0||f&&H>=a}function b(){var v=W();if(p(v))return w(v);l=setTimeout(b,M(v))}function w(v){return l=void 0,g&&r?x(v):(r=o=void 0,s)}function E(){l!==void 0&&clearTimeout(l),i=0,r=c=o=l=void 0}function k(){return l===void 0?s:w(W())}function O(){var v=W(),C=p(v);if(r=arguments,o=this,c=v,C){if(l===void 0)return j(c);if(f)return clearTimeout(l),l=setTimeout(b,t),x(c)}return l===void 0&&(l=setTimeout(b,t)),s}return O.cancel=E,O.flush=k,O}var ht=ft;const dt=fe(ht);function I(){return(I=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function V(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var R=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(oe(o.current,p,l.current)):M(!1)},j=function(){return M(!1)};function M(p){var b=c.current,w=A(o.current),E=p?w.addEventListener:w.removeEventListener;E(b?"touchmove":"mousemove",x),E(b?"touchend":"mouseup",j)}return[function(p){var b=p.nativeEvent,w=o.current;if(w&&(ae(b),!function(k,O){return O&&!z(k)}(b,c.current)&&w)){if(z(b)){c.current=!0;var E=b.changedTouches||[];E.length&&(l.current=E[0].identifier)}w.focus(),a(oe(w,b,l.current)),M(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),s({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},M]},[s,a]),d=i[0],f=i[1],g=i[2];return m.useEffect(function(){return g},[g]),h.createElement("div",I({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),T=function(e){return e.filter(Boolean).join(" ")},Z=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=T(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},gt={grad:.9,turn:360,rad:360/(2*Math.PI)},mt=function(e){return be(G(e))},G=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},bt=function(e,t){return t===void 0&&(t="deg"),Number(e)*(gt[t]||1)},vt=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?pt({h:bt(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},pt=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},yt=function(e){return wt(me(e))},ge=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},U=function(e){var t=ge(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=ge(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},me=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),i=a%6;return{r:y(255*[r,l,s,s,c,r][i]),g:y(255*[c,r,r,l,s,s][i]),b:y(255*[s,s,c,r,r,l][i]),a:y(o,2)}},xt=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?be({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},wt=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(y(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},be=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},ve=h.memo(function(e){var t=e.hue,n=e.onChange,r=T(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Q,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:R(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(Z,{className:"react-colorful__hue-pointer",left:t/360,color:U({h:t,s:100,v:100,a:1})})))}),pe=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:U({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Q,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:R(t.s+100*o.left,0,100),v:R(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(Z,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:U(t)})))}),ye=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},xe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},kt=function(e,t){return e.toLowerCase()===t.toLowerCase()||ye(G(e),G(t))};function we(e,t,n){var r=V(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,l.current.color)){var i=e.toHsva(t);l.current={hsva:i,color:t},s(i)}},[t,e]),m.useEffect(function(){var i;ye(a,l.current.hsva)||e.equal(i=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:i},r(i))},[a,e,r]);var c=m.useCallback(function(i){s(function(d){return Object.assign({},d,i)})},[]);return[a,c]}var _t=typeof window<"u"?m.useLayoutEffect:m.useEffect,Et=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},se=new Map,ke=function(e){_t(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!se.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,se.set(t,n);var r=Et();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Mt=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",I({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d,className:"react-colorful__last-control"}))},Ct={defaultColor:"000",toHsva:mt,fromHsva:function(e){return yt({h:e.h,s:e.s,v:e.v,a:1})},equal:kt},$t=function(e){return h.createElement(Mt,I({},e,{colorModel:Ct}))},Ot=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},a=T(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Q,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:R(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(Z,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},_e=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",I({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d}),h.createElement(Ot,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},It={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:vt,fromHsva:B,equal:xe},Nt=function(e){return h.createElement(_e,I({},e,{colorModel:It}))},St={defaultColor:"rgba(0, 0, 0, 1)",toHsva:xt,fromHsva:function(e){var t=me(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:xe},Rt=function(e){return h.createElement(_e,I({},e,{colorModel:St}))},jt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Ht=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),zt=$.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Ft=$($e)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Tt=$.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Pt=$.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Lt=`url('data:image/svg+xml;charset=utf-8,')`,le=({value:e,style:t,...n})=>{let r=`linear-gradient(${e}, ${e}), ${Lt}, linear-gradient(#fff, #fff)`;return h.createElement(Pt,{...n,style:{...t,backgroundImage:r}})},qt=$(Oe.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=$(Ie)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),L=Object.values(Ee),Xt=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Dt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Wt=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Kt=/^\s*#?([0-9a-f]{3})\s*$/i,Vt={hex:$t,rgb:Rt,hsl:Nt},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(Xt);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},S=e=>{if(!e)return;let t=!0;if(Dt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.rgb.hsl([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([s,l,c]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${i})`,hex:`#${_.rgb.hex([s,l,c]).toLowerCase()}`}}if(Wt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.hsl.rgb([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([s,l,c]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${i})`,hsl:e,hex:`#${_.hsl.hex([s,l,c]).toLowerCase()}`}}let n=e.replace("#",""),r=_.keyword.rgb(n)||_.hex.rgb(n),o=_.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{_.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},At=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return q[n];if(n!=="hex")return(t==null?void 0:t[n])||q[n];if(!t.hex.startsWith("#"))try{return`#${_.keyword.hex(t.hex)}`}catch{return q.hex}let r=t.hex.match(Kt);if(!r)return Y.test(t.hex)?t.hex:q.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Gt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>S(n)),[s,l]=m.useState((o==null?void 0:o.colorSpace)||"hex");m.useEffect(()=>{let f=e||"",g=S(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let c=m.useMemo(()=>At(n,o,s).toLowerCase(),[n,o,s]),i=m.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(s)+1;f>=L.length&&(f=0),l(L[f]);let g=(o==null?void 0:o[L[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:c,updateValue:i,color:o,colorSpace:s,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,o]=m.useState(t!=null&&t.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(l=>typeof l=="string"?S(l):l.title?{...S(l.color),keyword:l.title}:S(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=m.useCallback(l=>{l!=null&&l.valid&&(a.some(c=>D(c[n])===D(l[n]))||o(c=>c.concat(l)))},[n,a]);return{presets:a,addPreset:s}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1,argType:l})=>{var E;let c=m.useCallback(dt(n,200),[n]),{value:i,realValue:d,updateValue:f,color:g,colorSpace:x,cycleColorSpace:j}=Gt(t,c),{presets:M,addPreset:p}=Ut(a,g,x),b=Vt[x],w=!!((E=l==null?void 0:l.table)!=null&&E.readonly);return h.createElement(jt,{"aria-readonly":w},h.createElement(Ht,{startOpen:s,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(zt,null,h.createElement(b,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:o}),M.length>0&&h.createElement(Tt,null,M.map((k,O)=>h.createElement(ue,{key:`${k.value}-${O}`,hasChrome:!1,tooltip:h.createElement(Ft,{note:k.keyword||k.value})},h.createElement(le,{value:k[x],active:g&&D(k[x])===D(g[x]),onClick:()=>f(k.value)})))))},h.createElement(le,{value:d,style:{margin:4}})),h.createElement(qt,{id:Ne(e),value:i,onChange:k=>f(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),i?h.createElement(Bt,{onClick:j}):null)},sn=Yt;export{Yt as ColorControl,sn as default}; +import{al as Me,am as ie,an as Ce,ao as $,a2 as ue,a0 as $e,H as Oe,ap as Ie,aq as Ne}from"./index-D_yKE35a.js";import{g as fe,R as h,r as m}from"./index-0d5eMwbi.js";import"./iframe-9T-PF226.js";import"../sb-preview/runtime.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";var Se={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Se,he={};for(const e of Object.keys(F))he[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var de=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,c;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const i=(o+a)/2;return a===o?c=0:i<=.5?c=s/(a+o):c=s/(2-a-o),[l,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,c=e[2]/255,i=Math.max(s,l,c),d=i-Math.min(s,l,c),f=function(g){return(i-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/i,t=f(s),n=f(l),r=f(c),s===i?o=r-n:l===i?o=1/3+t-r:c===i&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,i*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Re(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=he[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Re(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,c=[0,0,0];for(let i=0;i<3;i++)a=t+1/3*-(i-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,c[i]=s*255;return c};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,c,s];case 1:return[l,r,s];case 2:return[s,r,c];case 3:return[s,l,r];case 4:return[c,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const c=n+a*(l-n);let i,d,f;switch(s){default:case 6:case 0:i=l,d=c,f=n;break;case 1:i=c,d=l,f=n;break;case 2:i=n,d=l,f=c;break;case 3:i=n,d=c,f=l;break;case 4:i=c,d=n,f=l;break;case 5:i=l,d=n,f=c;break}return[i*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,c=o**3,i=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=c>.008856?c:(o-16/116)/7.787,s=i>.008856?i:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,c;return s<1?l=a/(1-s):l=0,s<=0?c=0:o===t?c=(n-r)/s%6:o===n?c=2+(r-t)/s:c=4+(t-n)/s,c/=6,c%=1,[c*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let c=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return c=(1-n)*r,[(n*o[0]+c)*255,(n*o[1]+c)*255,(n*o[2]+c)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const X=de;function je(){const e={},t=Object.keys(X);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function Be(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{N[e]={},Object.defineProperty(N[e],"channels",{value:K[e].channels}),Object.defineProperty(N[e],"labels",{value:K[e].labels});const t=Pe(e);Object.keys(t).forEach(r=>{const o=t[r];N[e][r]=Be(o),N[e][r].raw=qe(o)})});var Xe=N;const _=fe(Xe);var De=Me,We=function(){return De.Date.now()},Ke=We,Ve=/\s/;function Ae(e){for(var t=e.length;t--&&Ve.test(e.charAt(t)););return t}var Ge=Ae,Ue=Ge,Ye=/^\s+/;function Je(e){return e&&e.slice(0,Ue(e)+1).replace(Ye,"")}var Qe=Je,Ze=Qe,te=ie,et=Ce,ne=NaN,tt=/^[-+]0x[0-9a-f]+$/i,nt=/^0b[01]+$/i,rt=/^0o[0-7]+$/i,ot=parseInt;function at(e){if(typeof e=="number")return e;if(et(e))return ne;if(te(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=te(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ze(e);var n=nt.test(e);return n||rt.test(e)?ot(e.slice(2),n?2:8):tt.test(e)?ne:+e}var st=at,lt=ie,W=Ke,re=st,ct="Expected a function",it=Math.max,ut=Math.min;function ft(e,t,n){var r,o,a,s,l,c,i=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError(ct);t=re(t)||0,lt(n)&&(d=!!n.leading,f="maxWait"in n,a=f?it(re(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,H=o;return r=o=void 0,i=v,s=e.apply(H,C),s}function j(v){return i=v,l=setTimeout(b,t),d?x(v):s}function M(v){var C=v-c,H=v-i,ee=t-C;return f?ut(ee,a-H):ee}function p(v){var C=v-c,H=v-i;return c===void 0||C>=t||C<0||f&&H>=a}function b(){var v=W();if(p(v))return w(v);l=setTimeout(b,M(v))}function w(v){return l=void 0,g&&r?x(v):(r=o=void 0,s)}function E(){l!==void 0&&clearTimeout(l),i=0,r=c=o=l=void 0}function k(){return l===void 0?s:w(W())}function O(){var v=W(),C=p(v);if(r=arguments,o=this,c=v,C){if(l===void 0)return j(c);if(f)return clearTimeout(l),l=setTimeout(b,t),x(c)}return l===void 0&&(l=setTimeout(b,t)),s}return O.cancel=E,O.flush=k,O}var ht=ft;const dt=fe(ht);function I(){return(I=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function V(e){var t=m.useRef(e),n=m.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var R=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(oe(o.current,p,l.current)):M(!1)},j=function(){return M(!1)};function M(p){var b=c.current,w=A(o.current),E=p?w.addEventListener:w.removeEventListener;E(b?"touchmove":"mousemove",x),E(b?"touchend":"mouseup",j)}return[function(p){var b=p.nativeEvent,w=o.current;if(w&&(ae(b),!function(k,O){return O&&!z(k)}(b,c.current)&&w)){if(z(b)){c.current=!0;var E=b.changedTouches||[];E.length&&(l.current=E[0].identifier)}w.focus(),a(oe(w,b,l.current)),M(!0)}},function(p){var b=p.which||p.keyCode;b<37||b>40||(p.preventDefault(),s({left:b===39?.05:b===37?-.05:0,top:b===40?.05:b===38?-.05:0}))},M]},[s,a]),d=i[0],f=i[1],g=i[2];return m.useEffect(function(){return g},[g]),h.createElement("div",I({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),T=function(e){return e.filter(Boolean).join(" ")},Z=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=T(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},gt={grad:.9,turn:360,rad:360/(2*Math.PI)},mt=function(e){return be(G(e))},G=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},bt=function(e,t){return t===void 0&&(t="deg"),Number(e)*(gt[t]||1)},vt=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?pt({h:bt(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},pt=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},yt=function(e){return wt(me(e))},ge=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},U=function(e){var t=ge(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},B=function(e){var t=ge(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},me=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),c=r*(1-(1-t+a)*n),i=a%6;return{r:y(255*[r,l,s,s,c,r][i]),g:y(255*[c,r,r,l,s,s][i]),b:y(255*[s,s,c,r,r,l][i]),a:y(o,2)}},xt=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?be({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},P=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},wt=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?P(y(255*o)):"";return"#"+P(t)+P(n)+P(r)+a},be=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},ve=h.memo(function(e){var t=e.hue,n=e.onChange,r=T(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Q,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:R(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(Z,{className:"react-colorful__hue-pointer",left:t/360,color:U({h:t,s:100,v:100,a:1})})))}),pe=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:U({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Q,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:R(t.s+100*o.left,0,100),v:R(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(Z,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:U(t)})))}),ye=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},xe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},kt=function(e,t){return e.toLowerCase()===t.toLowerCase()||ye(G(e),G(t))};function we(e,t,n){var r=V(n),o=m.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=m.useRef({color:t,hsva:a});m.useEffect(function(){if(!e.equal(t,l.current.color)){var i=e.toHsva(t);l.current={hsva:i,color:t},s(i)}},[t,e]),m.useEffect(function(){var i;ye(a,l.current.hsva)||e.equal(i=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:i},r(i))},[a,e,r]);var c=m.useCallback(function(i){s(function(d){return Object.assign({},d,i)})},[]);return[a,c]}var _t=typeof window<"u"?m.useLayoutEffect:m.useEffect,Et=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},se=new Map,ke=function(e){_t(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!se.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,se.set(t,n);var r=Et();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},Mt=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",I({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d,className:"react-colorful__last-control"}))},Ct={defaultColor:"000",toHsva:mt,fromHsva:function(e){return yt({h:e.h,s:e.s,v:e.v,a:1})},equal:kt},$t=function(e){return h.createElement(Mt,I({},e,{colorModel:Ct}))},Ot=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},a=T(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Q,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:R(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(Z,{className:"react-colorful__alpha-pointer",left:n.a,color:B(n)})))},_e=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=m.useRef(null);ke(l);var c=we(n,o,a),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",I({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d}),h.createElement(Ot,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},It={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:vt,fromHsva:B,equal:xe},Nt=function(e){return h.createElement(_e,I({},e,{colorModel:It}))},St={defaultColor:"rgba(0, 0, 0, 1)",toHsva:xt,fromHsva:function(e){var t=me(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:xe},Rt=function(e){return h.createElement(_e,I({},e,{colorModel:St}))},jt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Ht=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),zt=$.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Ft=$($e)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Tt=$.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Pt=$.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Lt=`url('data:image/svg+xml;charset=utf-8,')`,le=({value:e,style:t,...n})=>{let r=`linear-gradient(${e}, ${e}), ${Lt}, linear-gradient(#fff, #fff)`;return h.createElement(Pt,{...n,style:{...t,backgroundImage:r}})},qt=$(Oe.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=$(Ie)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),L=Object.values(Ee),Xt=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Dt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Wt=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Kt=/^\s*#?([0-9a-f]{3})\s*$/i,Vt={hex:$t,rgb:Rt,hsl:Nt},q={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(Xt);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},S=e=>{if(!e)return;let t=!0;if(Dt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.rgb.hsl([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.rgb.keyword([s,l,c]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${i})`,hex:`#${_.rgb.hex([s,l,c]).toLowerCase()}`}}if(Wt.test(e)){let[s,l,c,i]=ce(e),[d,f,g]=_.hsl.rgb([s,l,c])||[0,0,0];return{valid:t,value:e,keyword:_.hsl.keyword([s,l,c]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${i})`,hsl:e,hex:`#${_.hsl.hex([s,l,c]).toLowerCase()}`}}let n=e.replace("#",""),r=_.keyword.rgb(n)||_.hex.rgb(n),o=_.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{_.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},At=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return q[n];if(n!=="hex")return(t==null?void 0:t[n])||q[n];if(!t.hex.startsWith("#"))try{return`#${_.keyword.hex(t.hex)}`}catch{return q.hex}let r=t.hex.match(Kt);if(!r)return Y.test(t.hex)?t.hex:q.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Gt=(e,t)=>{let[n,r]=m.useState(e||""),[o,a]=m.useState(()=>S(n)),[s,l]=m.useState((o==null?void 0:o.colorSpace)||"hex");m.useEffect(()=>{let f=e||"",g=S(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let c=m.useMemo(()=>At(n,o,s).toLowerCase(),[n,o,s]),i=m.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=m.useCallback(()=>{let f=L.indexOf(s)+1;f>=L.length&&(f=0),l(L[f]);let g=(o==null?void 0:o[L[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:c,updateValue:i,color:o,colorSpace:s,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,o]=m.useState(t!=null&&t.valid?[t]:[]);m.useEffect(()=>{t===void 0&&o([])},[t]);let a=m.useMemo(()=>(e||[]).map(l=>typeof l=="string"?S(l):l.title?{...S(l.color),keyword:l.title}:S(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=m.useCallback(l=>{l!=null&&l.valid&&(a.some(c=>D(c[n])===D(l[n]))||o(c=>c.concat(l)))},[n,a]);return{presets:a,addPreset:s}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1,argType:l})=>{var E;let c=m.useCallback(dt(n,200),[n]),{value:i,realValue:d,updateValue:f,color:g,colorSpace:x,cycleColorSpace:j}=Gt(t,c),{presets:M,addPreset:p}=Ut(a,g,x),b=Vt[x],w=!!((E=l==null?void 0:l.table)!=null&&E.readonly);return h.createElement(jt,{"aria-readonly":w},h.createElement(Ht,{startOpen:s,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(zt,null,h.createElement(b,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:o}),M.length>0&&h.createElement(Tt,null,M.map((k,O)=>h.createElement(ue,{key:`${k.value}-${O}`,hasChrome:!1,tooltip:h.createElement(Ft,{note:k.keyword||k.value})},h.createElement(le,{value:k[x],active:g&&D(k[x])===D(g[x]),onClick:()=>f(k.value)})))))},h.createElement(le,{value:d,style:{margin:4}})),h.createElement(qt,{id:Ne(e),value:i,onChange:k=>f(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),i?h.createElement(Bt,{onClick:j}):null)},sn=Yt;export{Yt as ColorControl,sn as default}; diff --git a/assets/DocsRenderer-CFRXHY34-D9viofLQ.js b/assets/DocsRenderer-CFRXHY34-CfxJRWUd.js similarity index 90% rename from assets/DocsRenderer-CFRXHY34-D9viofLQ.js rename to assets/DocsRenderer-CFRXHY34-CfxJRWUd.js index 5d29a5ef..631e9d0a 100644 --- a/assets/DocsRenderer-CFRXHY34-D9viofLQ.js +++ b/assets/DocsRenderer-CFRXHY34-CfxJRWUd.js @@ -1,2 +1,2 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CFK-oMtb.js","./index-0d5eMwbi.js"])))=>i.map(i=>d[i]); -import{_ as p}from"./iframe-B1Sidt8M.js";import{R as e,r as c}from"./index-0d5eMwbi.js";import{af as l,ag as u,ah as h,ai as E}from"./index-D4CCEPie.js";import{renderElement as d,unmountElement as x}from"./react-18-BH3B7EqY.js";import"../sb-preview/runtime.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";var _={code:l,a:u,...h},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},O=class{constructor(){this.render=async(t,r,n)=>{let s={..._,...r==null?void 0:r.components},a=E;return new Promise((i,m)=>{p(async()=>{const{MDXProvider:o}=await import("./index-CFK-oMtb.js");return{MDXProvider:o}},__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:o})=>d(e.createElement(D,{showException:m,key:Math.random()},e.createElement(o,{components:s},e.createElement(a,{context:t,docsParameter:r}))),n)).then(()=>i())})},this.unmount=t=>{x(t)}}};export{O as DocsRenderer,_ as defaultComponents}; +import{_ as p}from"./iframe-9T-PF226.js";import{R as e,r as c}from"./index-0d5eMwbi.js";import{af as l,ag as u,ah as h,ai as E}from"./index-D_yKE35a.js";import{renderElement as d,unmountElement as x}from"./react-18-BH3B7EqY.js";import"../sb-preview/runtime.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";var _={code:l,a:u,...h},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},O=class{constructor(){this.render=async(t,r,n)=>{let s={..._,...r==null?void 0:r.components},a=E;return new Promise((i,m)=>{p(async()=>{const{MDXProvider:o}=await import("./index-CFK-oMtb.js");return{MDXProvider:o}},__vite__mapDeps([0,1]),import.meta.url).then(({MDXProvider:o})=>d(e.createElement(D,{showException:m,key:Math.random()},e.createElement(o,{components:s},e.createElement(a,{context:t,docsParameter:r}))),n)).then(()=>i())})},this.unmount=t=>{x(t)}}};export{O as DocsRenderer,_ as defaultComponents}; diff --git a/assets/badge-Da1HxQE-.js b/assets/badge-BIezdMmM.js similarity index 91% rename from assets/badge-Da1HxQE-.js rename to assets/badge-BIezdMmM.js index 95ea3726..1ec9c6ee 100644 --- a/assets/badge-Da1HxQE-.js +++ b/assets/badge-BIezdMmM.js @@ -1 +1 @@ -import{j as u}from"./jsx-runtime-C798UXYj.js";import{c as i}from"./class-names-DnY5YZNL.js";const o={primary:"bg-primary-100 text-primary-500",violet:"bg-violet-100 text-violet-800",green:"bg-success-100 text-success-600",neutral:"bg-neutral-200 text-neutral-800",yellow:"bg-warning-100 text-warning-600",teal:"bg-teal-100 text-teal-800",orange:"bg-orange-100 text-orange-800",pink:"bg-pink-300 text-pink-800",red:"bg-danger-100 text-danger-600",purple:"bg-purple-100 text-purple-800"},p={rounded:"rounded-full",default:"rounded"},t=({type:a="primary",shape:r="default",children:n,onClick:e})=>{const l=e?"cursor-pointer":"pointer-events-none";return u.jsx("div",{tabIndex:e?0:void 0,role:"button","aria-label":"Badge",className:i("inline-flex h-4 items-center px-2 text-xs font-semibold uppercase tracking-wide",o[a],p[r],l),onClick:e,onKeyDown:e,children:n})};try{t.displayName="Badge",t.__docgenInfo={description:"",displayName:"Badge",props:{type:{defaultValue:{value:"primary"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"neutral"'},{value:'"violet"'},{value:'"green"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}},shape:{defaultValue:{value:"default"},description:"",name:"shape",required:!1,type:{name:"enum",value:[{value:'"rounded"'},{value:'"default"'}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}export{t as B}; +import{j as u}from"./jsx-runtime-C798UXYj.js";import{c as i}from"./class-names-DnY5YZNL.js";const o={primary:"bg-primary-100 text-primary-500",violet:"bg-violet-100 text-violet-800",green:"bg-success-100 text-success-600",neutral:"bg-neutral-200 text-neutral-800",yellow:"bg-warning-100 text-warning-600",teal:"bg-teal-100 text-teal-800",orange:"bg-orange-100 text-orange-800",pink:"bg-pink-300 text-pink-800",red:"bg-danger-100 text-danger-600",purple:"bg-purple-100 text-purple-800"},p={rounded:"rounded-full",default:"rounded"},t=({type:a="primary",shape:r="default",children:n,onClick:e})=>{const l=e?"cursor-pointer":"pointer-events-none";return u.jsx("div",{tabIndex:e?0:void 0,role:"button","aria-label":"Badge",className:i("inline-flex h-4 items-center px-2 text-xs font-semibold uppercase tracking-wide",o[a],p[r],l),onClick:e,onKeyDown:e,children:n})};try{t.displayName="Badge",t.__docgenInfo={description:"",displayName:"Badge",props:{type:{defaultValue:{value:"primary"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"violet"'},{value:'"green"'},{value:'"neutral"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}},shape:{defaultValue:{value:"default"},description:"",name:"shape",required:!1,type:{name:"enum",value:[{value:'"rounded"'},{value:'"default"'}]}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}export{t as B}; diff --git a/assets/badge.stories-gP-6Aq3K.js b/assets/badge.stories-DloSsjdd.js similarity index 96% rename from assets/badge.stories-gP-6Aq3K.js rename to assets/badge.stories-DloSsjdd.js index 9d7e814d..a3a43dcd 100644 --- a/assets/badge.stories-gP-6Aq3K.js +++ b/assets/badge.stories-DloSsjdd.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-C798UXYj.js";import{B as g}from"./badge-Da1HxQE-.js";import{h as n}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";const y=["primary","violet","green","neutral","yellow","teal","orange","pink","red","purple"],u=["default","rounded"],B={title:"Badge",component:g,args:{children:"Badge Label"},argTypes:{onClick:n}},a={},s={args:{onClick:void 0},argTypes:{type:n,shape:n},render:({children:m,...h})=>r.jsx("div",{className:"container grid grid-cols-2 gap-4",children:u.map(e=>r.jsxs("div",{className:"grid gap-4",children:[r.jsx("header",{children:e}),y.map(o=>r.jsx(g,{...h,shape:e,type:o,children:m},e+o))]},e))})};var d,p,t;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(t=(p=a.parameters)==null?void 0:p.docs)==null?void 0:t.source}}};var i,l,c;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{ +import{j as r}from"./jsx-runtime-C798UXYj.js";import{B as g}from"./badge-BIezdMmM.js";import{h as n}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";const y=["primary","violet","green","neutral","yellow","teal","orange","pink","red","purple"],u=["default","rounded"],B={title:"Badge",component:g,args:{children:"Badge Label"},argTypes:{onClick:n}},a={},s={args:{onClick:void 0},argTypes:{type:n,shape:n},render:({children:m,...h})=>r.jsx("div",{className:"container grid grid-cols-2 gap-4",children:u.map(e=>r.jsxs("div",{className:"grid gap-4",children:[r.jsx("header",{children:e}),y.map(o=>r.jsx(g,{...h,shape:e,type:o,children:m},e+o))]},e))})};var d,p,t;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(t=(p=a.parameters)==null?void 0:p.docs)==null?void 0:t.source}}};var i,l,c;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`{ args: { onClick: undefined }, diff --git a/assets/button-Cwplw9FX.js b/assets/button-CNKqPViR.js similarity index 76% rename from assets/button-Cwplw9FX.js rename to assets/button-CNKqPViR.js index fe00d244..9bfc222c 100644 --- a/assets/button-Cwplw9FX.js +++ b/assets/button-CNKqPViR.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-C798UXYj.js";import{c as g}from"./class-names-DnY5YZNL.js";import{S as c}from"./spinner-CrXB3JgE.js";const m={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"text-neutral-700 bg-neutral-0 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-800 active:bg-neutral-100 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:border-neutral-300 disabled:bg-neutral-0 fill-neutral-0",minimal:"text-neutral-700 hover:bg-neutral-100 hover:text-neutral-800 active:bg-neutral-200 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:bg-neutral-0 fill-neutral-0 underline",danger:"text-neutral-0 bg-danger-500 hover:bg-danger-500 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-400 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600 disabled:fill-danger-100"},l={primary:"text-neutral-0",secondary:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",minimal:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",danger:"","danger-secondary":""},u=({variant:e="primary",className:o,children:d,loading:a,LeftIcon:t,RightIcon:n,...i})=>{const s=g("group flex h-8 items-center gap-2 whitespace-nowrap rounded px-4 text-xs font-semibold focus:outline-none disabled:cursor-not-allowed",m[e],o);return r.jsxs("button",{className:s,...i,children:[a?r.jsx(c,{size:"small"}):null,t&&!a?r.jsx(t,{className:`${l[e]} h-3 w-3`}):null,d,n?r.jsx(n,{className:`${l[e]} h-3 w-3`}):null]})};try{u.displayName="Button",u.__docgenInfo={description:"",displayName:"Button",props:{variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"danger"'},{value:'"primary"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},RightIcon:{defaultValue:null,description:"",name:"RightIcon",required:!1,type:{name:"ElementType"}}}}}catch{}export{u as B}; +import{j as r}from"./jsx-runtime-C798UXYj.js";import{c as g}from"./class-names-DnY5YZNL.js";import{S as c}from"./spinner-CrXB3JgE.js";const m={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"text-neutral-700 bg-neutral-0 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-800 active:bg-neutral-100 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:border-neutral-300 disabled:bg-neutral-0 fill-neutral-0",minimal:"text-neutral-700 hover:bg-neutral-100 hover:text-neutral-800 active:bg-neutral-200 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:bg-neutral-0 fill-neutral-0 underline",danger:"text-neutral-0 bg-danger-500 hover:bg-danger-500 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-400 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600 disabled:fill-danger-100"},l={primary:"text-neutral-0",secondary:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",minimal:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",danger:"","danger-secondary":""},i=({variant:e="primary",className:o,children:u,loading:a,LeftIcon:n,RightIcon:t,...d})=>{const s=g("group flex h-8 items-center gap-2 whitespace-nowrap rounded px-4 text-xs font-semibold focus:outline-none disabled:cursor-not-allowed",m[e],o);return r.jsxs("button",{className:s,...d,children:[a?r.jsx(c,{size:"small"}):null,n&&!a?r.jsx(n,{className:`${l[e]} h-3 w-3`}):null,u,t?r.jsx(t,{className:`${l[e]} h-3 w-3`}):null]})};try{i.displayName="Button",i.__docgenInfo={description:"",displayName:"Button",props:{variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"danger"'},{value:'"primary"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},RightIcon:{defaultValue:null,description:"",name:"RightIcon",required:!1,type:{name:"ElementType"}}}}}catch{}export{i as B}; diff --git a/assets/button.stories-B_08GyF3.js b/assets/button.stories-D9pdHdIx.js similarity index 97% rename from assets/button.stories-B_08GyF3.js rename to assets/button.stories-D9pdHdIx.js index 206edbcd..cb5147d3 100644 --- a/assets/button.stories-B_08GyF3.js +++ b/assets/button.stories-D9pdHdIx.js @@ -1,4 +1,4 @@ -import{j as c}from"./jsx-runtime-C798UXYj.js";import{B}from"./button-Cwplw9FX.js";import{S as j,a as R,b as D}from"./zoom-to-fit-icon-DdsCB6de.js";import{h as k}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";import"./spinner-CrXB3JgE.js";const A=["primary","secondary","minimal","danger","danger-secondary"],s={undefined:void 0,ChatIcon:j,DiagramTreeIcon:R,LockIcon:D},i={description:"Icon component",options:Object.keys(s),mapping:s},z={title:"Button",component:B,args:{children:"Badge Label",LeftIcon:void 0,RightIcon:void 0,loading:!1},argTypes:{onClick:k,LeftIcon:i,RightIcon:i}},r={},e={args:{LeftIcon:s.ChatIcon,RightIcon:s.LockIcon}},o={args:{loading:!0}},a={args:{disabled:!0}},n={argTypes:{type:k},render:({children:C,...T})=>c.jsx("div",{className:"flex flex-col gap-4",children:A.map(t=>c.jsx(B,{...T,type:"button",variant:t,children:C},t))})};var d,p,m;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var g,l,u;e.parameters={...e.parameters,docs:{...(g=e.parameters)==null?void 0:g.docs,source:{originalSource:`{ +import{j as c}from"./jsx-runtime-C798UXYj.js";import{B}from"./button-CNKqPViR.js";import{S as j,a as R,b as D}from"./zoom-to-fit-icon-DdsCB6de.js";import{h as k}from"./storybook-utils-C5xEhci0.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";import"./spinner-CrXB3JgE.js";const A=["primary","secondary","minimal","danger","danger-secondary"],s={undefined:void 0,ChatIcon:j,DiagramTreeIcon:R,LockIcon:D},i={description:"Icon component",options:Object.keys(s),mapping:s},z={title:"Button",component:B,args:{children:"Badge Label",LeftIcon:void 0,RightIcon:void 0,loading:!1},argTypes:{onClick:k,LeftIcon:i,RightIcon:i}},r={},e={args:{LeftIcon:s.ChatIcon,RightIcon:s.LockIcon}},o={args:{loading:!0}},a={args:{disabled:!0}},n={argTypes:{type:k},render:({children:C,...T})=>c.jsx("div",{className:"flex flex-col gap-4",children:A.map(t=>c.jsx(B,{...T,type:"button",variant:t,children:C},t))})};var d,p,m;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:"{}",...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var g,l,u;e.parameters={...e.parameters,docs:{...(g=e.parameters)==null?void 0:g.docs,source:{originalSource:`{ args: { LeftIcon: icons.ChatIcon, RightIcon: icons.LockIcon diff --git a/assets/dialog.stories-BGz9dfF0.js b/assets/dialog.stories-BX6_XaCw.js similarity index 97% rename from assets/dialog.stories-BGz9dfF0.js rename to assets/dialog.stories-BX6_XaCw.js index 9f8b05cc..988b7014 100644 --- a/assets/dialog.stories-BGz9dfF0.js +++ b/assets/dialog.stories-BX6_XaCw.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as l}from"./index-0d5eMwbi.js";import{g as O,h as c}from"./storybook-utils-C5xEhci0.js";import{H as R}from"./description-D9Ee5mtv.js";import{y as M,j as q,Y as A}from"./dialog-CQKMlc6b.js";import{z as W,F as v}from"./transition-CZnz1fcq.js";import{j as G,k as E}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as f}from"./class-names-DnY5YZNL.js";import{I as z}from"./icon-button-DlSTEzH7.js";import{B as b}from"./button-Cwplw9FX.js";import{F as a}from"./form-field-BtJxu7hP.js";import{T as x}from"./toggle-Bp5D17gs.js";import{A as P}from"./alert-WFlrTABt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./keyboard-C2Ifhsxt.js";import"./use-event-listener-CochUv0b.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./index-BoyHNU0R.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./use-inert-others-CzqV763I.js";import"./use-tab-direction-BMI6OSML.js";import"./hidden-BrNieFV6.js";import"./close-provider-CZp7Lqob.js";import"./open-closed-DC3t9YEZ.js";import"./use-is-mounted-DT-lZL-u.js";import"./active-element-history-DI7yoVCB.js";import"./spinner-CrXB3JgE.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./form-fields-B2NmhAAW.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./badge-Da1HxQE-.js";import"./index-h1jAayoZ.js";import"./tag-C9CGXtt3.js";const d=({isShown:o,children:s,className:r,isCloseable:n=!0,footer:t,footerPosition:i="end",onClose:g,title:_,hasBackground:L=!0,position:w="center"})=>{const p=(H=!1)=>{n&&g&&g(H)};return e.jsx(W,{show:o,as:l.Fragment,children:e.jsxs(M,{as:"div",onClose:p,children:[L?e.jsx(v,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e.jsx("div",{className:"fixed inset-0 z-40 bg-modal-background","aria-hidden":"true",onClick:()=>p(!0)})}):null,e.jsx("div",{className:f("fixed inset-0 z-50 flex overflow-y-auto p-8",w==="bottom-right"&&"items-end justify-end",w==="center"&&"items-center justify-center"),children:e.jsx(v,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:e.jsxs(q,{className:f("flex w-[736px] transform flex-col overflow-y-auto rounded-md bg-neutral-0 shadow-lg transition-all",!t&&"pb-8",r),children:[e.jsxs("div",{className:"relative mx-10 mt-10",children:[e.jsx(A,{className:"mb-6 pr-12 text-lg font-semibold text-neutral-900",children:_}),n&&e.jsx(z,{className:"absolute right-0 top-0",Icon:G,variant:"minimal",onClick:()=>p(!1)}),e.jsx(R,{as:"div",children:s})]}),!!t&&e.jsx("div",{id:"dialog-footer",className:f("sticky bottom-0 left-0 flex flex-row gap-2 bg-neutral-0 px-10 pb-8 pt-8",i==="end"?"justify-end":"justify-start"),children:t})]})})})]})})};try{d.displayName="Dialog",d.__docgenInfo={description:"",displayName:"Dialog",props:{isShown:{defaultValue:null,description:"",name:"isShown",required:!1,type:{name:"boolean"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"((submitted: boolean) => void)"}},isCloseable:{defaultValue:{value:"true"},description:"",name:"isCloseable",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},footer:{defaultValue:null,description:"",name:"footer",required:!1,type:{name:"ReactNode"}},footerPosition:{defaultValue:{value:"end"},description:"",name:"footerPosition",required:!1,type:{name:"enum",value:[{value:'"end"'},{value:'"start"'}]}},hasBackground:{defaultValue:{value:"true"},description:"",name:"hasBackground",required:!1,type:{name:"boolean"}},position:{defaultValue:{value:"center"},description:"",name:"position",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"bottom-right"'}]}}}}}catch{}const y=()=>{},Y=()=>e.jsx("span",{children:"test footer 🍭"}),B=({onClose:o})=>e.jsxs(e.Fragment,{children:[e.jsx(b,{variant:"secondary",onClick:()=>o==null?void 0:o(!1),children:"Cancel"}),e.jsx(b,{variant:"primary",LeftIcon:E,onClick:()=>o==null?void 0:o(!0),children:"Confirm"})]}),F={undefined:void 0,SpanFooter:e.jsx(Y,{}),buttons:e.jsx(B,{})},Q={options:Object.keys(F),mapping:F},Ve={title:"Dialog",component:d,parameters:{...O("Modal showing on top of the screen"),inlineStories:!1},args:{title:"Dialog Title",children:"Dialog Description",isShown:!1,footer:void 0},argTypes:{isShown:c,onClose:c,footer:Q},render:({children:o,...s})=>{const[r,n]=l.useState(!1),t=()=>n(i=>!i);return e.jsxs("div",{className:"body-font",children:[e.jsx("button",{type:"button",onClick:t,className:"bg-neutral-100 px-4 py-2 shadow",children:"show Modal"}),e.jsx(d,{...s,isShown:r,onClose:t,children:o})]})}},h={},m={argTypes:{footer:c},render:({children:o,...s})=>{const[r,n]=l.useState(!1),t=()=>n(i=>!i);return e.jsxs("div",{className:"body-font",children:[e.jsx("button",{type:"button",onClick:t,className:"bg-neutral-100 px-4 py-2 shadow",children:"show Modal"}),e.jsx(d,{...s,footer:e.jsx(B,{onClose:()=>n(!1)}),isShown:r,onClose:t,children:o})]})}},u={args:{children:e.jsxs(e.Fragment,{children:[e.jsx(x.Switch,{checked:!0,ariaLabel:"test",onChange:y}),e.jsx("p",{className:"py-10",children:"Paragraph Content"}),e.jsxs(a,{children:[e.jsxs(a.LabelGroup,{children:[e.jsx(a.Label,{htmlFor:"value",children:"Label"}),e.jsx(a.Description,{id:"value-description",children:"Description"})]}),e.jsxs(a.RadioInput,{id:"value",value:"value_1",onChange:y,children:[e.jsx(a.RadioInput.Option,{value:"value_1",children:"Value 1"}),e.jsx(a.RadioInput.Option,{value:"value_2",children:"Value 2"}),e.jsx(a.RadioInput.Option,{value:"value_3",disabled:!0,children:"Value 3"})]})]}),e.jsx("p",{className:"py-5",children:` +import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as l}from"./index-0d5eMwbi.js";import{g as O,h as c}from"./storybook-utils-C5xEhci0.js";import{H as R}from"./description-D9Ee5mtv.js";import{y as M,j as q,Y as A}from"./dialog-CQKMlc6b.js";import{z as W,F as v}from"./transition-CZnz1fcq.js";import{j as G,k as E}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as f}from"./class-names-DnY5YZNL.js";import{I as z}from"./icon-button-k2wtPfcV.js";import{B as b}from"./button-CNKqPViR.js";import{F as a}from"./form-field-2xLK_lYH.js";import{T as x}from"./toggle-Bp5D17gs.js";import{A as P}from"./alert-WFlrTABt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./keyboard-C2Ifhsxt.js";import"./use-event-listener-CochUv0b.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./index-BoyHNU0R.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./use-inert-others-CzqV763I.js";import"./use-tab-direction-BMI6OSML.js";import"./hidden-BrNieFV6.js";import"./close-provider-CZp7Lqob.js";import"./open-closed-DC3t9YEZ.js";import"./use-is-mounted-DT-lZL-u.js";import"./active-element-history-DI7yoVCB.js";import"./spinner-CrXB3JgE.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./form-fields-B2NmhAAW.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./badge-BIezdMmM.js";import"./index-BgfbgFhO.js";import"./tag-C9CGXtt3.js";const d=({isShown:o,children:s,className:r,isCloseable:n=!0,footer:t,footerPosition:i="end",onClose:g,title:_,hasBackground:L=!0,position:w="center"})=>{const p=(H=!1)=>{n&&g&&g(H)};return e.jsx(W,{show:o,as:l.Fragment,children:e.jsxs(M,{as:"div",onClose:p,children:[L?e.jsx(v,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e.jsx("div",{className:"fixed inset-0 z-40 bg-modal-background","aria-hidden":"true",onClick:()=>p(!0)})}):null,e.jsx("div",{className:f("fixed inset-0 z-50 flex overflow-y-auto p-8",w==="bottom-right"&&"items-end justify-end",w==="center"&&"items-center justify-center"),children:e.jsx(v,{as:l.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4",enterTo:"opacity-100 translate-y-0",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 translate-y-4",children:e.jsxs(q,{className:f("flex w-[736px] transform flex-col overflow-y-auto rounded-md bg-neutral-0 shadow-lg transition-all",!t&&"pb-8",r),children:[e.jsxs("div",{className:"relative mx-10 mt-10",children:[e.jsx(A,{className:"mb-6 pr-12 text-lg font-semibold text-neutral-900",children:_}),n&&e.jsx(z,{className:"absolute right-0 top-0",Icon:G,variant:"minimal",onClick:()=>p(!1)}),e.jsx(R,{as:"div",children:s})]}),!!t&&e.jsx("div",{id:"dialog-footer",className:f("sticky bottom-0 left-0 flex flex-row gap-2 bg-neutral-0 px-10 pb-8 pt-8",i==="end"?"justify-end":"justify-start"),children:t})]})})})]})})};try{d.displayName="Dialog",d.__docgenInfo={description:"",displayName:"Dialog",props:{isShown:{defaultValue:null,description:"",name:"isShown",required:!1,type:{name:"boolean"}},title:{defaultValue:null,description:"",name:"title",required:!1,type:{name:"string"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"((submitted: boolean) => void)"}},isCloseable:{defaultValue:{value:"true"},description:"",name:"isCloseable",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},footer:{defaultValue:null,description:"",name:"footer",required:!1,type:{name:"ReactNode"}},footerPosition:{defaultValue:{value:"end"},description:"",name:"footerPosition",required:!1,type:{name:"enum",value:[{value:'"end"'},{value:'"start"'}]}},hasBackground:{defaultValue:{value:"true"},description:"",name:"hasBackground",required:!1,type:{name:"boolean"}},position:{defaultValue:{value:"center"},description:"",name:"position",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"bottom-right"'}]}}}}}catch{}const y=()=>{},Y=()=>e.jsx("span",{children:"test footer 🍭"}),B=({onClose:o})=>e.jsxs(e.Fragment,{children:[e.jsx(b,{variant:"secondary",onClick:()=>o==null?void 0:o(!1),children:"Cancel"}),e.jsx(b,{variant:"primary",LeftIcon:E,onClick:()=>o==null?void 0:o(!0),children:"Confirm"})]}),F={undefined:void 0,SpanFooter:e.jsx(Y,{}),buttons:e.jsx(B,{})},Q={options:Object.keys(F),mapping:F},Ve={title:"Dialog",component:d,parameters:{...O("Modal showing on top of the screen"),inlineStories:!1},args:{title:"Dialog Title",children:"Dialog Description",isShown:!1,footer:void 0},argTypes:{isShown:c,onClose:c,footer:Q},render:({children:o,...s})=>{const[r,n]=l.useState(!1),t=()=>n(i=>!i);return e.jsxs("div",{className:"body-font",children:[e.jsx("button",{type:"button",onClick:t,className:"bg-neutral-100 px-4 py-2 shadow",children:"show Modal"}),e.jsx(d,{...s,isShown:r,onClose:t,children:o})]})}},h={},m={argTypes:{footer:c},render:({children:o,...s})=>{const[r,n]=l.useState(!1),t=()=>n(i=>!i);return e.jsxs("div",{className:"body-font",children:[e.jsx("button",{type:"button",onClick:t,className:"bg-neutral-100 px-4 py-2 shadow",children:"show Modal"}),e.jsx(d,{...s,footer:e.jsx(B,{onClose:()=>n(!1)}),isShown:r,onClose:t,children:o})]})}},u={args:{children:e.jsxs(e.Fragment,{children:[e.jsx(x.Switch,{checked:!0,ariaLabel:"test",onChange:y}),e.jsx("p",{className:"py-10",children:"Paragraph Content"}),e.jsxs(a,{children:[e.jsxs(a.LabelGroup,{children:[e.jsx(a.Label,{htmlFor:"value",children:"Label"}),e.jsx(a.Description,{id:"value-description",children:"Description"})]}),e.jsxs(a.RadioInput,{id:"value",value:"value_1",onChange:y,children:[e.jsx(a.RadioInput.Option,{value:"value_1",children:"Value 1"}),e.jsx(a.RadioInput.Option,{value:"value_2",children:"Value 2"}),e.jsx(a.RadioInput.Option,{value:"value_3",disabled:!0,children:"Value 3"})]})]}),e.jsx("p",{className:"py-5",children:` "Oh, hush, hush, my child!" said Van Helsing. "God does not purchase souls in this wise; and the Devil, though he may purchase, does not keep faith. But God is merciful and just, and knows your pain and your devotion to that dear Madam diff --git a/assets/entry-preview-CVX8W8q9.js b/assets/entry-preview-Dr1n3Wdx.js similarity index 99% rename from assets/entry-preview-CVX8W8q9.js rename to assets/entry-preview-Dr1n3Wdx.js index 71403f3a..8a4e4fc7 100644 --- a/assets/entry-preview-CVX8W8q9.js +++ b/assets/entry-preview-Dr1n3Wdx.js @@ -1,5 +1,5 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./react-18-BH3B7EqY.js","./index-0d5eMwbi.js","./index-BoyHNU0R.js"])))=>i.map(i=>d[i]); -import{_ as er}from"./iframe-B1Sidt8M.js";import{_ as tr}from"./chunk-H6MOWX77-DTQOW814.js";import{g as rr,r as j,R as ie}from"./index-0d5eMwbi.js";import{r as nr}from"./index-BoyHNU0R.js";import"../sb-preview/runtime.js";var Me={exports:{}};const sr="2.0.0",wt=256,ir=Number.MAX_SAFE_INTEGER||9007199254740991,ar=16,or=wt-6,lr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ge={MAX_LENGTH:wt,MAX_SAFE_COMPONENT_LENGTH:ar,MAX_SAFE_BUILD_LENGTH:or,MAX_SAFE_INTEGER:ir,RELEASE_TYPES:lr,SEMVER_SPEC_VERSION:sr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Oe={};const ur=typeof process=="object"&&Oe&&Oe.NODE_DEBUG&&/\bsemver\b/i.test(Oe.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Re=ur;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=ge,i=Re;t=e.exports={};const l=t.re=[],u=t.safeRe=[],a=t.src=[],o=t.t={};let h=0;const p="[a-zA-Z0-9-]",L=[["\\s",1],["\\d",s],[p,n]],m=V=>{for(const[b,Y]of L)V=V.split(`${b}*`).join(`${b}{0,${Y}}`).split(`${b}+`).join(`${b}{1,${Y}}`);return V},d=(V,b,Y)=>{const w=m(b),W=h++;i(V,W,b),o[V]=W,a[W]=b,l[W]=new RegExp(b,Y?"g":void 0),u[W]=new RegExp(w,Y?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${a[o.NUMERICIDENTIFIER]}|${a[o.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${a[o.NUMERICIDENTIFIERLOOSE]}|${a[o.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${a[o.PRERELEASEIDENTIFIER]}(?:\\.${a[o.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${a[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[o.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",`${p}+`),d("BUILD",`(?:\\+(${a[o.BUILDIDENTIFIER]}(?:\\.${a[o.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${a[o.MAINVERSION]}${a[o.PRERELEASE]}?${a[o.BUILD]}?`),d("FULL",`^${a[o.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${a[o.MAINVERSIONLOOSE]}${a[o.PRERELEASELOOSE]}?${a[o.BUILD]}?`),d("LOOSE",`^${a[o.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${a[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${a[o.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:${a[o.PRERELEASE]})?${a[o.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:${a[o.PRERELEASELOOSE]})?${a[o.BUILD]}?)?)?`),d("XRANGE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),d("COERCE",`${a[o.COERCEPLAIN]}(?:$|[^\\d])`),d("COERCEFULL",a[o.COERCEPLAIN]+`(?:${a[o.PRERELEASE]})?(?:${a[o.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",a[o.COERCE],!0),d("COERCERTLFULL",a[o.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${a[o.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${a[o.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${a[o.LONECARET]}${a[o.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${a[o.LONECARET]}${a[o.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${a[o.GTLT]}\\s*(${a[o.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]}|${a[o.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${a[o.XRANGEPLAIN]})\\s+-\\s+(${a[o.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${a[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[o.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Me,Me.exports);var le=Me.exports;const cr=Object.freeze({loose:!0}),hr=Object.freeze({}),fr=e=>e?typeof e!="object"?cr:e:hr;var Ve=fr;const et=/^[0-9]+$/,Ct=(e,t)=>{const r=et.test(e),n=et.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:eCt(t,e);var _t={compareIdentifiers:Ct,rcompareIdentifiers:pr};const he=Re,{MAX_LENGTH:tt,MAX_SAFE_INTEGER:fe}=ge,{safeRe:rt,t:nt}=le,Er=Ve,{compareIdentifiers:K}=_t;let mr=class G{constructor(t,r){if(r=Er(r),t instanceof G){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>tt)throw new TypeError(`version is longer than ${tt} characters`);he("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?rt[nt.LOOSE]:rt[nt.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>fe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>fe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>fe||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let i=[r,s];n===!1&&(i=[r]),K(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var C=mr;const st=C,dr=(e,t,r=!1)=>{if(e instanceof st)return e;try{return new st(e,t)}catch(n){if(!r)return null;throw n}};var J=dr;const vr=J,$r=(e,t)=>{const r=vr(e,t);return r?r.version:null};var gr=$r;const Rr=J,yr=(e,t)=>{const r=Rr(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var Ir=yr;const it=C,Lr=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new it(e instanceof it?e.version:e,r).inc(t,n,s).version}catch{return null}};var Nr=Lr;const at=J,Sr=(e,t)=>{const r=at(e,null,!0),n=at(t,null,!0),s=r.compare(n);if(s===0)return null;const i=s>0,l=i?r:n,u=i?n:r,a=!!l.prerelease.length;if(!!u.prerelease.length&&!a)return!u.patch&&!u.minor?"major":l.patch?"patch":l.minor?"minor":"major";const h=a?"pre":"";return r.major!==n.major?h+"major":r.minor!==n.minor?h+"minor":r.patch!==n.patch?h+"patch":"prerelease"};var Tr=Sr;const Or=C,Ar=(e,t)=>new Or(e,t).major;var wr=Ar;const Cr=C,_r=(e,t)=>new Cr(e,t).minor;var Dr=_r;const Pr=C,br=(e,t)=>new Pr(e,t).patch;var xr=br;const Ur=J,Fr=(e,t)=>{const r=Ur(e,t);return r&&r.prerelease.length?r.prerelease:null};var Gr=Fr;const ot=C,jr=(e,t,r)=>new ot(e,r).compare(new ot(t,r));var U=jr;const Mr=U,Xr=(e,t,r)=>Mr(t,e,r);var Vr=Xr;const Yr=U,Wr=(e,t)=>Yr(e,t,!0);var Hr=Wr;const lt=C,kr=(e,t,r)=>{const n=new lt(e,r),s=new lt(t,r);return n.compare(s)||n.compareBuild(s)};var Ye=kr;const qr=Ye,Br=(e,t)=>e.sort((r,n)=>qr(r,n,t));var Kr=Br;const zr=Ye,Zr=(e,t)=>e.sort((r,n)=>zr(n,r,t));var Jr=Zr;const Qr=U,en=(e,t,r)=>Qr(e,t,r)>0;var ye=en;const tn=U,rn=(e,t,r)=>tn(e,t,r)<0;var We=rn;const nn=U,sn=(e,t,r)=>nn(e,t,r)===0;var Dt=sn;const an=U,on=(e,t,r)=>an(e,t,r)!==0;var Pt=on;const ln=U,un=(e,t,r)=>ln(e,t,r)>=0;var He=un;const cn=U,hn=(e,t,r)=>cn(e,t,r)<=0;var ke=hn;const fn=Dt,pn=Pt,En=ye,mn=He,dn=We,vn=ke,$n=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return fn(e,r,n);case"!=":return pn(e,r,n);case">":return En(e,r,n);case">=":return mn(e,r,n);case"<":return dn(e,r,n);case"<=":return vn(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var bt=$n;const gn=C,Rn=J,{safeRe:pe,t:Ee}=le,yn=(e,t)=>{if(e instanceof gn)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?pe[Ee.COERCEFULL]:pe[Ee.COERCE]);else{const a=t.includePrerelease?pe[Ee.COERCERTLFULL]:pe[Ee.COERCERTL];let o;for(;(o=a.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||o.index+o[0].length!==r.index+r[0].length)&&(r=o),a.lastIndex=o.index+o[1].length+o[2].length;a.lastIndex=-1}if(r===null)return null;const n=r[2],s=r[3]||"0",i=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",u=t.includePrerelease&&r[6]?`+${r[6]}`:"";return Rn(`${n}.${s}.${i}${l}${u}`,t)};var In=yn,Ae,ut;function Ln(){return ut||(ut=1,Ae=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Ae}var Nn=I;I.Node=q;I.create=I;function I(e){var t=this;if(t instanceof I||(t=new I),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(s){t.push(s)});else if(arguments.length>0)for(var r=0,n=arguments.length;r1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)r=e(r,n.value,s),n=n.next;return r};I.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)r=e(r,n.value,s),n=n.prev;return r};I.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};I.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};I.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new I;if(tthis.length&&(t=this.length);for(var n=0,s=this.head;s!==null&&nthis.length&&(t=this.length);for(var n=this.length,s=this.tail;s!==null&&n>t;n--)s=s.prev;for(;s!==null&&n>e;n--,s=s.prev)r.push(s.value);return r};I.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,s=this.head;s!==null&&n1;class wn{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[H]=t.max||1/0;const r=t.length||we;if(this[z]=typeof r!="function"?we:r,this[ae]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[k]=t.maxAge||0,this[M]=t.dispose,this[ct]=t.noDisposeOnSet||!1,this[xt]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[H]=t||1/0,re(this)}get max(){return this[H]}set allowStale(t){this[ae]=!!t}get allowStale(){return this[ae]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[k]=t,re(this)}get maxAge(){return this[k]}set lengthCalculator(t){typeof t!="function"&&(t=we),t!==this[z]&&(this[z]=t,this[X]=0,this[A].forEach(r=>{r.length=this[z](r.value,r.key),this[X]+=r.length})),re(this)}get lengthCalculator(){return this[z]}get length(){return this[X]}get itemCount(){return this[A].length}rforEach(t,r){r=r||this;for(let n=this[A].tail;n!==null;){const s=n.prev;ht(this,t,n,r),n=s}}forEach(t,r){r=r||this;for(let n=this[A].head;n!==null;){const s=n.next;ht(this,t,n,r),n=s}}keys(){return this[A].toArray().map(t=>t.key)}values(){return this[A].toArray().map(t=>t.value)}reset(){this[M]&&this[A]&&this[A].length&&this[A].forEach(t=>this[M](t.key,t.value)),this[x]=new Map,this[A]=new An,this[X]=0}dump(){return this[A].map(t=>de(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[A]}set(t,r,n){if(n=n||this[k],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const s=n?Date.now():0,i=this[z](r,t);if(this[x].has(t)){if(i>this[H])return Z(this,this[x].get(t)),!1;const a=this[x].get(t).value;return this[M]&&(this[ct]||this[M](t,a.value)),a.now=s,a.maxAge=n,a.value=r,this[X]+=i-a.length,a.length=i,this.get(t),re(this),!0}const l=new Cn(t,r,i,s,n);return l.length>this[H]?(this[M]&&this[M](t,r),!1):(this[X]+=l.length,this[A].unshift(l),this[x].set(t,this[A].head),re(this),!0)}has(t){if(!this[x].has(t))return!1;const r=this[x].get(t).value;return!de(this,r)}get(t){return Ce(this,t,!0)}peek(t){return Ce(this,t,!1)}pop(){const t=this[A].tail;return t?(Z(this,t),t.value):null}del(t){Z(this,this[x].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const s=t[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{const l=i-r;l>0&&this.set(s.k,s.v,l)}}}prune(){this[x].forEach((t,r)=>Ce(this,r,!1))}}const Ce=(e,t,r)=>{const n=e[x].get(t);if(n){const s=n.value;if(de(e,s)){if(Z(e,n),!e[ae])return}else r&&(e[xt]&&(n.value.now=Date.now()),e[A].unshiftNode(n));return s.value}},de=(e,t)=>{if(!t||!t.maxAge&&!e[k])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[k]&&r>e[k]},re=e=>{if(e[X]>e[H])for(let t=e[A].tail;e[X]>e[H]&&t!==null;){const r=t.prev;Z(e,t),t=r}},Z=(e,t)=>{if(t){const r=t.value;e[M]&&e[M](r.key,r.value),e[X]-=r.length,e[x].delete(r.key),e[A].removeNode(t)}};class Cn{constructor(t,r,n,s,i){this.key=t,this.value=r,this.length=n,this.now=s,this.maxAge=i||0}}const ht=(e,t,r,n)=>{let s=r.value;de(e,s)&&(Z(e,r),e[ae]||(s=void 0)),s&&t.call(n,s.value,s.key,e)};var _n=wn,_e,ft;function F(){if(ft)return _e;ft=1;class e{constructor(c,g){if(g=n(g),c instanceof e)return c.loose===!!g.loose&&c.includePrerelease===!!g.includePrerelease?c:new e(c.raw,g);if(c instanceof s)return this.raw=c.value,this.set=[[c]],this.format(),this;if(this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease,this.raw=c.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(v=>this.parseRange(v.trim())).filter(v=>v.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const v=this.set[0];if(this.set=this.set.filter($=>!d($[0])),this.set.length===0)this.set=[v];else if(this.set.length>1){for(const $ of this.set)if($.length===1&&V($[0])){this.set=[$];break}}}this.format()}format(){return this.range=this.set.map(c=>c.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(c){const v=((this.options.includePrerelease&&L)|(this.options.loose&&m))+":"+c,$=r.get(v);if($)return $;const E=this.options.loose,R=E?u[a.HYPHENRANGELOOSE]:u[a.HYPHENRANGE];c=c.replace(R,Jt(this.options.includePrerelease)),i("hyphen replace",c),c=c.replace(u[a.COMPARATORTRIM],o),i("comparator trim",c),c=c.replace(u[a.TILDETRIM],h),i("tilde trim",c),c=c.replace(u[a.CARETTRIM],p),i("caret trim",c);let N=c.split(" ").map(T=>Y(T,this.options)).join(" ").split(/\s+/).map(T=>Zt(T,this.options));E&&(N=N.filter(T=>(i("loose invalid filter",T,this.options),!!T.match(u[a.COMPARATORLOOSE])))),i("range list",N);const y=new Map,S=N.map(T=>new s(T,this.options));for(const T of S){if(d(T))return[T];y.set(T.value,T)}y.size>1&&y.has("")&&y.delete("");const D=[...y.values()];return r.set(v,D),D}intersects(c,g){if(!(c instanceof e))throw new TypeError("a Range is required");return this.set.some(v=>b(v,g)&&c.set.some($=>b($,g)&&v.every(E=>$.every(R=>E.intersects(R,g)))))}test(c){if(!c)return!1;if(typeof c=="string")try{c=new l(c,this.options)}catch{return!1}for(let g=0;gf.value==="<0.0.0-0",V=f=>f.value==="",b=(f,c)=>{let g=!0;const v=f.slice();let $=v.pop();for(;g&&v.length;)g=v.every(E=>$.intersects(E,c)),$=v.pop();return g},Y=(f,c)=>(i("comp",f,c),f=kt(f,c),i("caret",f),f=W(f,c),i("tildes",f),f=Bt(f,c),i("xrange",f),f=zt(f,c),i("stars",f),f),w=f=>!f||f.toLowerCase()==="x"||f==="*",W=(f,c)=>f.trim().split(/\s+/).map(g=>Ht(g,c)).join(" "),Ht=(f,c)=>{const g=c.loose?u[a.TILDELOOSE]:u[a.TILDE];return f.replace(g,(v,$,E,R,N)=>{i("tilde",f,v,$,E,R,N);let y;return w($)?y="":w(E)?y=`>=${$}.0.0 <${+$+1}.0.0-0`:w(R)?y=`>=${$}.${E}.0 <${$}.${+E+1}.0-0`:N?(i("replaceTilde pr",N),y=`>=${$}.${E}.${R}-${N} <${$}.${+E+1}.0-0`):y=`>=${$}.${E}.${R} <${$}.${+E+1}.0-0`,i("tilde return",y),y})},kt=(f,c)=>f.trim().split(/\s+/).map(g=>qt(g,c)).join(" "),qt=(f,c)=>{i("caret",f,c);const g=c.loose?u[a.CARETLOOSE]:u[a.CARET],v=c.includePrerelease?"-0":"";return f.replace(g,($,E,R,N,y)=>{i("caret",f,$,E,R,N,y);let S;return w(E)?S="":w(R)?S=`>=${E}.0.0${v} <${+E+1}.0.0-0`:w(N)?E==="0"?S=`>=${E}.${R}.0${v} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.0${v} <${+E+1}.0.0-0`:y?(i("replaceCaret pr",y),E==="0"?R==="0"?S=`>=${E}.${R}.${N}-${y} <${E}.${R}.${+N+1}-0`:S=`>=${E}.${R}.${N}-${y} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.${N}-${y} <${+E+1}.0.0-0`):(i("no pr"),E==="0"?R==="0"?S=`>=${E}.${R}.${N}${v} <${E}.${R}.${+N+1}-0`:S=`>=${E}.${R}.${N}${v} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.${N} <${+E+1}.0.0-0`),i("caret return",S),S})},Bt=(f,c)=>(i("replaceXRanges",f,c),f.split(/\s+/).map(g=>Kt(g,c)).join(" ")),Kt=(f,c)=>{f=f.trim();const g=c.loose?u[a.XRANGELOOSE]:u[a.XRANGE];return f.replace(g,(v,$,E,R,N,y)=>{i("xRange",f,v,$,E,R,N,y);const S=w(E),D=S||w(R),T=D||w(N),te=T;return $==="="&&te&&($=""),y=c.includePrerelease?"-0":"",S?$===">"||$==="<"?v="<0.0.0-0":v="*":$&&te?(D&&(R=0),N=0,$===">"?($=">=",D?(E=+E+1,R=0,N=0):(R=+R+1,N=0)):$==="<="&&($="<",D?E=+E+1:R=+R+1),$==="<"&&(y="-0"),v=`${$+E}.${R}.${N}${y}`):D?v=`>=${E}.0.0${y} <${+E+1}.0.0-0`:T&&(v=`>=${E}.${R}.0${y} <${E}.${+R+1}.0-0`),i("xRange return",v),v})},zt=(f,c)=>(i("replaceStars",f,c),f.trim().replace(u[a.STAR],"")),Zt=(f,c)=>(i("replaceGTE0",f,c),f.trim().replace(u[c.includePrerelease?a.GTE0PRE:a.GTE0],"")),Jt=f=>(c,g,v,$,E,R,N,y,S,D,T,te,Hi)=>(w(v)?g="":w($)?g=`>=${v}.0.0${f?"-0":""}`:w(E)?g=`>=${v}.${$}.0${f?"-0":""}`:R?g=`>=${g}`:g=`>=${g}${f?"-0":""}`,w(S)?y="":w(D)?y=`<${+S+1}.0.0-0`:w(T)?y=`<${S}.${+D+1}.0-0`:te?y=`<=${S}.${D}.${T}-${te}`:f?y=`<${S}.${D}.${+T+1}-0`:y=`<=${y}`,`${g} ${y}`.trim()),Qt=(f,c,g)=>{for(let v=0;v0){const $=f[v].semver;if($.major===c.major&&$.minor===c.minor&&$.patch===c.patch)return!0}return!1}return!0};return _e}var De,pt;function Ie(){if(pt)return De;pt=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(h,p){if(p=r(p),h instanceof t){if(h.loose===!!p.loose)return h;h=h.value}h=h.trim().split(/\s+/).join(" "),l("comparator",h,p),this.options=p,this.loose=!!p.loose,this.parse(h),this.semver===e?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(h){const p=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],L=h.match(p);if(!L)throw new TypeError(`Invalid comparator: ${h}`);this.operator=L[1]!==void 0?L[1]:"",this.operator==="="&&(this.operator=""),L[2]?this.semver=new u(L[2],this.options.loose):this.semver=e}toString(){return this.value}test(h){if(l("Comparator.test",h,this.options.loose),this.semver===e||h===e)return!0;if(typeof h=="string")try{h=new u(h,this.options)}catch{return!1}return i(h,this.operator,this.semver,this.options)}intersects(h,p){if(!(h instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(h.value,p).test(this.value):h.operator===""?h.value===""?!0:new a(this.value,p).test(h.semver):(p=r(p),p.includePrerelease&&(this.value==="<0.0.0-0"||h.value==="<0.0.0-0")||!p.includePrerelease&&(this.value.startsWith("<0.0.0")||h.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&h.operator.startsWith(">")||this.operator.startsWith("<")&&h.operator.startsWith("<")||this.semver.version===h.semver.version&&this.operator.includes("=")&&h.operator.includes("=")||i(this.semver,"<",h.semver,p)&&this.operator.startsWith(">")&&h.operator.startsWith("<")||i(this.semver,">",h.semver,p)&&this.operator.startsWith("<")&&h.operator.startsWith(">")))}}De=t;const r=Ve,{safeRe:n,t:s}=le,i=bt,l=Re,u=C,a=F();return De}const Dn=F(),Pn=(e,t,r)=>{try{t=new Dn(t,r)}catch{return!1}return t.test(e)};var Le=Pn;const bn=F(),xn=(e,t)=>new bn(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Un=xn;const Fn=C,Gn=F(),jn=(e,t,r)=>{let n=null,s=null,i=null;try{i=new Gn(t,r)}catch{return null}return e.forEach(l=>{i.test(l)&&(!n||s.compare(l)===-1)&&(n=l,s=new Fn(n,r))}),n};var Mn=jn;const Xn=C,Vn=F(),Yn=(e,t,r)=>{let n=null,s=null,i=null;try{i=new Vn(t,r)}catch{return null}return e.forEach(l=>{i.test(l)&&(!n||s.compare(l)===1)&&(n=l,s=new Xn(n,r))}),n};var Wn=Yn;const Pe=C,Hn=F(),Et=ye,kn=(e,t)=>{e=new Hn(e,t);let r=new Pe("0.0.0");if(e.test(r)||(r=new Pe("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n{const u=new Pe(l.semver.version);switch(l.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||Et(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),i&&(!r||Et(r,i))&&(r=i)}return r&&e.test(r)?r:null};var qn=kn;const Bn=F(),Kn=(e,t)=>{try{return new Bn(e,t).range||"*"}catch{return null}};var zn=Kn;const Zn=C,Ut=Ie(),{ANY:Jn}=Ut,Qn=F(),es=Le,mt=ye,dt=We,ts=ke,rs=He,ns=(e,t,r,n)=>{e=new Zn(e,n),t=new Qn(t,n);let s,i,l,u,a;switch(r){case">":s=mt,i=ts,l=dt,u=">",a=">=";break;case"<":s=dt,i=rs,l=mt,u="<",a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(es(e,t,n))return!1;for(let o=0;o{m.semver===Jn&&(m=new Ut(">=0.0.0")),p=p||m,L=L||m,s(m.semver,p.semver,n)?p=m:l(m.semver,L.semver,n)&&(L=m)}),p.operator===u||p.operator===a||(!L.operator||L.operator===u)&&i(e,L.semver))return!1;if(L.operator===a&&l(e,L.semver))return!1}return!0};var qe=ns;const ss=qe,is=(e,t,r)=>ss(e,t,">",r);var as=is;const os=qe,ls=(e,t,r)=>os(e,t,"<",r);var us=ls;const vt=F(),cs=(e,t,r)=>(e=new vt(e,r),t=new vt(t,r),e.intersects(t,r));var hs=cs;const fs=Le,ps=U;var Es=(e,t,r)=>{const n=[];let s=null,i=null;const l=e.sort((h,p)=>ps(h,p,r));for(const h of l)fs(h,t,r)?(i=h,s||(s=h)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);const u=[];for(const[h,p]of n)h===p?u.push(h):!p&&h===l[0]?u.push("*"):p?h===l[0]?u.push(`<=${p}`):u.push(`${h} - ${p}`):u.push(`>=${h}`);const a=u.join(" || "),o=typeof t.raw=="string"?t.raw:String(t);return a.length{if(e===t)return!0;e=new $t(e,r),t=new $t(t,r);let n=!1;e:for(const s of e.set){for(const i of t.set){const l=vs(s,i,r);if(n=n||l!==null,l)continue e}if(n)return!1}return!0},ds=[new Be(">=0.0.0-0")],gt=[new Be(">=0.0.0")],vs=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===be){if(t.length===1&&t[0].semver===be)return!0;r.includePrerelease?e=ds:e=gt}if(t.length===1&&t[0].semver===be){if(r.includePrerelease)return!0;t=gt}const n=new Set;let s,i;for(const m of e)m.operator===">"||m.operator===">="?s=Rt(s,m,r):m.operator==="<"||m.operator==="<="?i=yt(i,m,r):n.add(m.semver);if(n.size>1)return null;let l;if(s&&i){if(l=Ke(s.semver,i.semver,r),l>0)return null;if(l===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const m of n){if(s&&!ne(m,String(s),r)||i&&!ne(m,String(i),r))return null;for(const d of t)if(!ne(m,String(d),r))return!1;return!0}let u,a,o,h,p=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,L=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&i.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(const m of t){if(h=h||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(L&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===L.major&&m.semver.minor===L.minor&&m.semver.patch===L.patch&&(L=!1),m.operator===">"||m.operator===">="){if(u=Rt(s,m,r),u===m&&u!==s)return!1}else if(s.operator===">="&&!ne(s.semver,String(m),r))return!1}if(i){if(p&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===p.major&&m.semver.minor===p.minor&&m.semver.patch===p.patch&&(p=!1),m.operator==="<"||m.operator==="<="){if(a=yt(i,m,r),a===m&&a!==i)return!1}else if(i.operator==="<="&&!ne(i.semver,String(m),r))return!1}if(!m.operator&&(i||s)&&l!==0)return!1}return!(s&&o&&!i&&l!==0||i&&h&&!s&&l!==0||L||p)},Rt=(e,t,r)=>{if(!e)return t;const n=Ke(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},yt=(e,t,r)=>{if(!e)return t;const n=Ke(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var $s=ms;const xe=le,It=ge,gs=C,Lt=_t,Rs=J,ys=gr,Is=Ir,Ls=Nr,Ns=Tr,Ss=wr,Ts=Dr,Os=xr,As=Gr,ws=U,Cs=Vr,_s=Hr,Ds=Ye,Ps=Kr,bs=Jr,xs=ye,Us=We,Fs=Dt,Gs=Pt,js=He,Ms=ke,Xs=bt,Vs=In,Ys=Ie(),Ws=F(),Hs=Le,ks=Un,qs=Mn,Bs=Wn,Ks=qn,zs=zn,Zs=qe,Js=as,Qs=us,ei=hs,ti=Es,ri=$s;var ni={parse:Rs,valid:ys,clean:Is,inc:Ls,diff:Ns,major:Ss,minor:Ts,patch:Os,prerelease:As,compare:ws,rcompare:Cs,compareLoose:_s,compareBuild:Ds,sort:Ps,rsort:bs,gt:xs,lt:Us,eq:Fs,neq:Gs,gte:js,lte:Ms,cmp:Xs,coerce:Vs,Comparator:Ys,Range:Ws,satisfies:Hs,toComparators:ks,maxSatisfying:qs,minSatisfying:Bs,minVersion:Ks,validRange:zs,outside:Zs,gtr:Js,ltr:Qs,intersects:ei,simplifyRange:ti,subset:ri,SemVer:gs,re:xe.re,src:xe.src,tokens:xe.t,SEMVER_SPEC_VERSION:It.SEMVER_SPEC_VERSION,RELEASE_TYPES:It.RELEASE_TYPES,compareIdentifiers:Lt.compareIdentifiers,rcompareIdentifiers:Lt.rcompareIdentifiers};const Nt=rr(ni);var O={};/** +import{_ as er}from"./iframe-9T-PF226.js";import{_ as tr}from"./chunk-H6MOWX77-DTQOW814.js";import{g as rr,r as j,R as ie}from"./index-0d5eMwbi.js";import{r as nr}from"./index-BoyHNU0R.js";import"../sb-preview/runtime.js";var Me={exports:{}};const sr="2.0.0",wt=256,ir=Number.MAX_SAFE_INTEGER||9007199254740991,ar=16,or=wt-6,lr=["major","premajor","minor","preminor","patch","prepatch","prerelease"];var ge={MAX_LENGTH:wt,MAX_SAFE_COMPONENT_LENGTH:ar,MAX_SAFE_BUILD_LENGTH:or,MAX_SAFE_INTEGER:ir,RELEASE_TYPES:lr,SEMVER_SPEC_VERSION:sr,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Oe={};const ur=typeof process=="object"&&Oe&&Oe.NODE_DEBUG&&/\bsemver\b/i.test(Oe.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};var Re=ur;(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:s}=ge,i=Re;t=e.exports={};const l=t.re=[],u=t.safeRe=[],a=t.src=[],o=t.t={};let h=0;const p="[a-zA-Z0-9-]",L=[["\\s",1],["\\d",s],[p,n]],m=V=>{for(const[b,Y]of L)V=V.split(`${b}*`).join(`${b}{0,${Y}}`).split(`${b}+`).join(`${b}{1,${Y}}`);return V},d=(V,b,Y)=>{const w=m(b),W=h++;i(V,W,b),o[V]=W,a[W]=b,l[W]=new RegExp(b,Y?"g":void 0),u[W]=new RegExp(w,Y?"g":void 0)};d("NUMERICIDENTIFIER","0|[1-9]\\d*"),d("NUMERICIDENTIFIERLOOSE","\\d+"),d("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),d("MAINVERSION",`(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})\\.(${a[o.NUMERICIDENTIFIER]})`),d("MAINVERSIONLOOSE",`(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})\\.(${a[o.NUMERICIDENTIFIERLOOSE]})`),d("PRERELEASEIDENTIFIER",`(?:${a[o.NUMERICIDENTIFIER]}|${a[o.NONNUMERICIDENTIFIER]})`),d("PRERELEASEIDENTIFIERLOOSE",`(?:${a[o.NUMERICIDENTIFIERLOOSE]}|${a[o.NONNUMERICIDENTIFIER]})`),d("PRERELEASE",`(?:-(${a[o.PRERELEASEIDENTIFIER]}(?:\\.${a[o.PRERELEASEIDENTIFIER]})*))`),d("PRERELEASELOOSE",`(?:-?(${a[o.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${a[o.PRERELEASEIDENTIFIERLOOSE]})*))`),d("BUILDIDENTIFIER",`${p}+`),d("BUILD",`(?:\\+(${a[o.BUILDIDENTIFIER]}(?:\\.${a[o.BUILDIDENTIFIER]})*))`),d("FULLPLAIN",`v?${a[o.MAINVERSION]}${a[o.PRERELEASE]}?${a[o.BUILD]}?`),d("FULL",`^${a[o.FULLPLAIN]}$`),d("LOOSEPLAIN",`[v=\\s]*${a[o.MAINVERSIONLOOSE]}${a[o.PRERELEASELOOSE]}?${a[o.BUILD]}?`),d("LOOSE",`^${a[o.LOOSEPLAIN]}$`),d("GTLT","((?:<|>)?=?)"),d("XRANGEIDENTIFIERLOOSE",`${a[o.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),d("XRANGEIDENTIFIER",`${a[o.NUMERICIDENTIFIER]}|x|X|\\*`),d("XRANGEPLAIN",`[v=\\s]*(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:\\.(${a[o.XRANGEIDENTIFIER]})(?:${a[o.PRERELEASE]})?${a[o.BUILD]}?)?)?`),d("XRANGEPLAINLOOSE",`[v=\\s]*(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:\\.(${a[o.XRANGEIDENTIFIERLOOSE]})(?:${a[o.PRERELEASELOOSE]})?${a[o.BUILD]}?)?)?`),d("XRANGE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAIN]}$`),d("XRANGELOOSE",`^${a[o.GTLT]}\\s*${a[o.XRANGEPLAINLOOSE]}$`),d("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),d("COERCE",`${a[o.COERCEPLAIN]}(?:$|[^\\d])`),d("COERCEFULL",a[o.COERCEPLAIN]+`(?:${a[o.PRERELEASE]})?(?:${a[o.BUILD]})?(?:$|[^\\d])`),d("COERCERTL",a[o.COERCE],!0),d("COERCERTLFULL",a[o.COERCEFULL],!0),d("LONETILDE","(?:~>?)"),d("TILDETRIM",`(\\s*)${a[o.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",d("TILDE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAIN]}$`),d("TILDELOOSE",`^${a[o.LONETILDE]}${a[o.XRANGEPLAINLOOSE]}$`),d("LONECARET","(?:\\^)"),d("CARETTRIM",`(\\s*)${a[o.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",d("CARET",`^${a[o.LONECARET]}${a[o.XRANGEPLAIN]}$`),d("CARETLOOSE",`^${a[o.LONECARET]}${a[o.XRANGEPLAINLOOSE]}$`),d("COMPARATORLOOSE",`^${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]})$|^$`),d("COMPARATOR",`^${a[o.GTLT]}\\s*(${a[o.FULLPLAIN]})$|^$`),d("COMPARATORTRIM",`(\\s*)${a[o.GTLT]}\\s*(${a[o.LOOSEPLAIN]}|${a[o.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",d("HYPHENRANGE",`^\\s*(${a[o.XRANGEPLAIN]})\\s+-\\s+(${a[o.XRANGEPLAIN]})\\s*$`),d("HYPHENRANGELOOSE",`^\\s*(${a[o.XRANGEPLAINLOOSE]})\\s+-\\s+(${a[o.XRANGEPLAINLOOSE]})\\s*$`),d("STAR","(<|>)?=?\\s*\\*"),d("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),d("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Me,Me.exports);var le=Me.exports;const cr=Object.freeze({loose:!0}),hr=Object.freeze({}),fr=e=>e?typeof e!="object"?cr:e:hr;var Ve=fr;const et=/^[0-9]+$/,Ct=(e,t)=>{const r=et.test(e),n=et.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:eCt(t,e);var _t={compareIdentifiers:Ct,rcompareIdentifiers:pr};const he=Re,{MAX_LENGTH:tt,MAX_SAFE_INTEGER:fe}=ge,{safeRe:rt,t:nt}=le,Er=Ve,{compareIdentifiers:K}=_t;let mr=class G{constructor(t,r){if(r=Er(r),t instanceof G){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease)return t;t=t.version}else if(typeof t!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>tt)throw new TypeError(`version is longer than ${tt} characters`);he("SemVer",t,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?rt[nt.LOOSE]:rt[nt.FULL]);if(!n)throw new TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+n[1],this.minor=+n[2],this.patch=+n[3],this.major>fe||this.major<0)throw new TypeError("Invalid major version");if(this.minor>fe||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>fe||this.patch<0)throw new TypeError("Invalid patch version");n[4]?this.prerelease=n[4].split(".").map(s=>{if(/^[0-9]+$/.test(s)){const i=+s;if(i>=0&&i=0;)typeof this.prerelease[i]=="number"&&(this.prerelease[i]++,i=-2);if(i===-1){if(r===this.prerelease.join(".")&&n===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(s)}}if(r){let i=[r,s];n===!1&&(i=[r]),K(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=i):this.prerelease=i}break}default:throw new Error(`invalid increment argument: ${t}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};var C=mr;const st=C,dr=(e,t,r=!1)=>{if(e instanceof st)return e;try{return new st(e,t)}catch(n){if(!r)return null;throw n}};var J=dr;const vr=J,$r=(e,t)=>{const r=vr(e,t);return r?r.version:null};var gr=$r;const Rr=J,yr=(e,t)=>{const r=Rr(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null};var Ir=yr;const it=C,Lr=(e,t,r,n,s)=>{typeof r=="string"&&(s=n,n=r,r=void 0);try{return new it(e instanceof it?e.version:e,r).inc(t,n,s).version}catch{return null}};var Nr=Lr;const at=J,Sr=(e,t)=>{const r=at(e,null,!0),n=at(t,null,!0),s=r.compare(n);if(s===0)return null;const i=s>0,l=i?r:n,u=i?n:r,a=!!l.prerelease.length;if(!!u.prerelease.length&&!a)return!u.patch&&!u.minor?"major":l.patch?"patch":l.minor?"minor":"major";const h=a?"pre":"";return r.major!==n.major?h+"major":r.minor!==n.minor?h+"minor":r.patch!==n.patch?h+"patch":"prerelease"};var Tr=Sr;const Or=C,Ar=(e,t)=>new Or(e,t).major;var wr=Ar;const Cr=C,_r=(e,t)=>new Cr(e,t).minor;var Dr=_r;const Pr=C,br=(e,t)=>new Pr(e,t).patch;var xr=br;const Ur=J,Fr=(e,t)=>{const r=Ur(e,t);return r&&r.prerelease.length?r.prerelease:null};var Gr=Fr;const ot=C,jr=(e,t,r)=>new ot(e,r).compare(new ot(t,r));var U=jr;const Mr=U,Xr=(e,t,r)=>Mr(t,e,r);var Vr=Xr;const Yr=U,Wr=(e,t)=>Yr(e,t,!0);var Hr=Wr;const lt=C,kr=(e,t,r)=>{const n=new lt(e,r),s=new lt(t,r);return n.compare(s)||n.compareBuild(s)};var Ye=kr;const qr=Ye,Br=(e,t)=>e.sort((r,n)=>qr(r,n,t));var Kr=Br;const zr=Ye,Zr=(e,t)=>e.sort((r,n)=>zr(n,r,t));var Jr=Zr;const Qr=U,en=(e,t,r)=>Qr(e,t,r)>0;var ye=en;const tn=U,rn=(e,t,r)=>tn(e,t,r)<0;var We=rn;const nn=U,sn=(e,t,r)=>nn(e,t,r)===0;var Dt=sn;const an=U,on=(e,t,r)=>an(e,t,r)!==0;var Pt=on;const ln=U,un=(e,t,r)=>ln(e,t,r)>=0;var He=un;const cn=U,hn=(e,t,r)=>cn(e,t,r)<=0;var ke=hn;const fn=Dt,pn=Pt,En=ye,mn=He,dn=We,vn=ke,$n=(e,t,r,n)=>{switch(t){case"===":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e===r;case"!==":return typeof e=="object"&&(e=e.version),typeof r=="object"&&(r=r.version),e!==r;case"":case"=":case"==":return fn(e,r,n);case"!=":return pn(e,r,n);case">":return En(e,r,n);case">=":return mn(e,r,n);case"<":return dn(e,r,n);case"<=":return vn(e,r,n);default:throw new TypeError(`Invalid operator: ${t}`)}};var bt=$n;const gn=C,Rn=J,{safeRe:pe,t:Ee}=le,yn=(e,t)=>{if(e instanceof gn)return e;if(typeof e=="number"&&(e=String(e)),typeof e!="string")return null;t=t||{};let r=null;if(!t.rtl)r=e.match(t.includePrerelease?pe[Ee.COERCEFULL]:pe[Ee.COERCE]);else{const a=t.includePrerelease?pe[Ee.COERCERTLFULL]:pe[Ee.COERCERTL];let o;for(;(o=a.exec(e))&&(!r||r.index+r[0].length!==e.length);)(!r||o.index+o[0].length!==r.index+r[0].length)&&(r=o),a.lastIndex=o.index+o[1].length+o[2].length;a.lastIndex=-1}if(r===null)return null;const n=r[2],s=r[3]||"0",i=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",u=t.includePrerelease&&r[6]?`+${r[6]}`:"";return Rn(`${n}.${s}.${i}${l}${u}`,t)};var In=yn,Ae,ut;function Ln(){return ut||(ut=1,Ae=function(e){e.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next)yield t.value}}),Ae}var Nn=I;I.Node=q;I.create=I;function I(e){var t=this;if(t instanceof I||(t=new I),t.tail=null,t.head=null,t.length=0,e&&typeof e.forEach=="function")e.forEach(function(s){t.push(s)});else if(arguments.length>0)for(var r=0,n=arguments.length;r1)r=t;else if(this.head)n=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=0;n!==null;s++)r=e(r,n.value,s),n=n.next;return r};I.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else if(this.tail)n=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var s=this.length-1;n!==null;s--)r=e(r,n.value,s),n=n.prev;return r};I.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;r!==null;t++)e[t]=r.value,r=r.next;return e};I.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;r!==null;t++)e[t]=r.value,r=r.prev;return e};I.prototype.slice=function(e,t){t=t||this.length,t<0&&(t+=this.length),e=e||0,e<0&&(e+=this.length);var r=new I;if(tthis.length&&(t=this.length);for(var n=0,s=this.head;s!==null&&nthis.length&&(t=this.length);for(var n=this.length,s=this.tail;s!==null&&n>t;n--)s=s.prev;for(;s!==null&&n>e;n--,s=s.prev)r.push(s.value);return r};I.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,s=this.head;s!==null&&n1;class wn{constructor(t){if(typeof t=="number"&&(t={max:t}),t||(t={}),t.max&&(typeof t.max!="number"||t.max<0))throw new TypeError("max must be a non-negative number");this[H]=t.max||1/0;const r=t.length||we;if(this[z]=typeof r!="function"?we:r,this[ae]=t.stale||!1,t.maxAge&&typeof t.maxAge!="number")throw new TypeError("maxAge must be a number");this[k]=t.maxAge||0,this[M]=t.dispose,this[ct]=t.noDisposeOnSet||!1,this[xt]=t.updateAgeOnGet||!1,this.reset()}set max(t){if(typeof t!="number"||t<0)throw new TypeError("max must be a non-negative number");this[H]=t||1/0,re(this)}get max(){return this[H]}set allowStale(t){this[ae]=!!t}get allowStale(){return this[ae]}set maxAge(t){if(typeof t!="number")throw new TypeError("maxAge must be a non-negative number");this[k]=t,re(this)}get maxAge(){return this[k]}set lengthCalculator(t){typeof t!="function"&&(t=we),t!==this[z]&&(this[z]=t,this[X]=0,this[A].forEach(r=>{r.length=this[z](r.value,r.key),this[X]+=r.length})),re(this)}get lengthCalculator(){return this[z]}get length(){return this[X]}get itemCount(){return this[A].length}rforEach(t,r){r=r||this;for(let n=this[A].tail;n!==null;){const s=n.prev;ht(this,t,n,r),n=s}}forEach(t,r){r=r||this;for(let n=this[A].head;n!==null;){const s=n.next;ht(this,t,n,r),n=s}}keys(){return this[A].toArray().map(t=>t.key)}values(){return this[A].toArray().map(t=>t.value)}reset(){this[M]&&this[A]&&this[A].length&&this[A].forEach(t=>this[M](t.key,t.value)),this[x]=new Map,this[A]=new An,this[X]=0}dump(){return this[A].map(t=>de(this,t)?!1:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)}).toArray().filter(t=>t)}dumpLru(){return this[A]}set(t,r,n){if(n=n||this[k],n&&typeof n!="number")throw new TypeError("maxAge must be a number");const s=n?Date.now():0,i=this[z](r,t);if(this[x].has(t)){if(i>this[H])return Z(this,this[x].get(t)),!1;const a=this[x].get(t).value;return this[M]&&(this[ct]||this[M](t,a.value)),a.now=s,a.maxAge=n,a.value=r,this[X]+=i-a.length,a.length=i,this.get(t),re(this),!0}const l=new Cn(t,r,i,s,n);return l.length>this[H]?(this[M]&&this[M](t,r),!1):(this[X]+=l.length,this[A].unshift(l),this[x].set(t,this[A].head),re(this),!0)}has(t){if(!this[x].has(t))return!1;const r=this[x].get(t).value;return!de(this,r)}get(t){return Ce(this,t,!0)}peek(t){return Ce(this,t,!1)}pop(){const t=this[A].tail;return t?(Z(this,t),t.value):null}del(t){Z(this,this[x].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const s=t[n],i=s.e||0;if(i===0)this.set(s.k,s.v);else{const l=i-r;l>0&&this.set(s.k,s.v,l)}}}prune(){this[x].forEach((t,r)=>Ce(this,r,!1))}}const Ce=(e,t,r)=>{const n=e[x].get(t);if(n){const s=n.value;if(de(e,s)){if(Z(e,n),!e[ae])return}else r&&(e[xt]&&(n.value.now=Date.now()),e[A].unshiftNode(n));return s.value}},de=(e,t)=>{if(!t||!t.maxAge&&!e[k])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[k]&&r>e[k]},re=e=>{if(e[X]>e[H])for(let t=e[A].tail;e[X]>e[H]&&t!==null;){const r=t.prev;Z(e,t),t=r}},Z=(e,t)=>{if(t){const r=t.value;e[M]&&e[M](r.key,r.value),e[X]-=r.length,e[x].delete(r.key),e[A].removeNode(t)}};class Cn{constructor(t,r,n,s,i){this.key=t,this.value=r,this.length=n,this.now=s,this.maxAge=i||0}}const ht=(e,t,r,n)=>{let s=r.value;de(e,s)&&(Z(e,r),e[ae]||(s=void 0)),s&&t.call(n,s.value,s.key,e)};var _n=wn,_e,ft;function F(){if(ft)return _e;ft=1;class e{constructor(c,g){if(g=n(g),c instanceof e)return c.loose===!!g.loose&&c.includePrerelease===!!g.includePrerelease?c:new e(c.raw,g);if(c instanceof s)return this.raw=c.value,this.set=[[c]],this.format(),this;if(this.options=g,this.loose=!!g.loose,this.includePrerelease=!!g.includePrerelease,this.raw=c.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(v=>this.parseRange(v.trim())).filter(v=>v.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const v=this.set[0];if(this.set=this.set.filter($=>!d($[0])),this.set.length===0)this.set=[v];else if(this.set.length>1){for(const $ of this.set)if($.length===1&&V($[0])){this.set=[$];break}}}this.format()}format(){return this.range=this.set.map(c=>c.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(c){const v=((this.options.includePrerelease&&L)|(this.options.loose&&m))+":"+c,$=r.get(v);if($)return $;const E=this.options.loose,R=E?u[a.HYPHENRANGELOOSE]:u[a.HYPHENRANGE];c=c.replace(R,Jt(this.options.includePrerelease)),i("hyphen replace",c),c=c.replace(u[a.COMPARATORTRIM],o),i("comparator trim",c),c=c.replace(u[a.TILDETRIM],h),i("tilde trim",c),c=c.replace(u[a.CARETTRIM],p),i("caret trim",c);let N=c.split(" ").map(T=>Y(T,this.options)).join(" ").split(/\s+/).map(T=>Zt(T,this.options));E&&(N=N.filter(T=>(i("loose invalid filter",T,this.options),!!T.match(u[a.COMPARATORLOOSE])))),i("range list",N);const y=new Map,S=N.map(T=>new s(T,this.options));for(const T of S){if(d(T))return[T];y.set(T.value,T)}y.size>1&&y.has("")&&y.delete("");const D=[...y.values()];return r.set(v,D),D}intersects(c,g){if(!(c instanceof e))throw new TypeError("a Range is required");return this.set.some(v=>b(v,g)&&c.set.some($=>b($,g)&&v.every(E=>$.every(R=>E.intersects(R,g)))))}test(c){if(!c)return!1;if(typeof c=="string")try{c=new l(c,this.options)}catch{return!1}for(let g=0;gf.value==="<0.0.0-0",V=f=>f.value==="",b=(f,c)=>{let g=!0;const v=f.slice();let $=v.pop();for(;g&&v.length;)g=v.every(E=>$.intersects(E,c)),$=v.pop();return g},Y=(f,c)=>(i("comp",f,c),f=kt(f,c),i("caret",f),f=W(f,c),i("tildes",f),f=Bt(f,c),i("xrange",f),f=zt(f,c),i("stars",f),f),w=f=>!f||f.toLowerCase()==="x"||f==="*",W=(f,c)=>f.trim().split(/\s+/).map(g=>Ht(g,c)).join(" "),Ht=(f,c)=>{const g=c.loose?u[a.TILDELOOSE]:u[a.TILDE];return f.replace(g,(v,$,E,R,N)=>{i("tilde",f,v,$,E,R,N);let y;return w($)?y="":w(E)?y=`>=${$}.0.0 <${+$+1}.0.0-0`:w(R)?y=`>=${$}.${E}.0 <${$}.${+E+1}.0-0`:N?(i("replaceTilde pr",N),y=`>=${$}.${E}.${R}-${N} <${$}.${+E+1}.0-0`):y=`>=${$}.${E}.${R} <${$}.${+E+1}.0-0`,i("tilde return",y),y})},kt=(f,c)=>f.trim().split(/\s+/).map(g=>qt(g,c)).join(" "),qt=(f,c)=>{i("caret",f,c);const g=c.loose?u[a.CARETLOOSE]:u[a.CARET],v=c.includePrerelease?"-0":"";return f.replace(g,($,E,R,N,y)=>{i("caret",f,$,E,R,N,y);let S;return w(E)?S="":w(R)?S=`>=${E}.0.0${v} <${+E+1}.0.0-0`:w(N)?E==="0"?S=`>=${E}.${R}.0${v} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.0${v} <${+E+1}.0.0-0`:y?(i("replaceCaret pr",y),E==="0"?R==="0"?S=`>=${E}.${R}.${N}-${y} <${E}.${R}.${+N+1}-0`:S=`>=${E}.${R}.${N}-${y} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.${N}-${y} <${+E+1}.0.0-0`):(i("no pr"),E==="0"?R==="0"?S=`>=${E}.${R}.${N}${v} <${E}.${R}.${+N+1}-0`:S=`>=${E}.${R}.${N}${v} <${E}.${+R+1}.0-0`:S=`>=${E}.${R}.${N} <${+E+1}.0.0-0`),i("caret return",S),S})},Bt=(f,c)=>(i("replaceXRanges",f,c),f.split(/\s+/).map(g=>Kt(g,c)).join(" ")),Kt=(f,c)=>{f=f.trim();const g=c.loose?u[a.XRANGELOOSE]:u[a.XRANGE];return f.replace(g,(v,$,E,R,N,y)=>{i("xRange",f,v,$,E,R,N,y);const S=w(E),D=S||w(R),T=D||w(N),te=T;return $==="="&&te&&($=""),y=c.includePrerelease?"-0":"",S?$===">"||$==="<"?v="<0.0.0-0":v="*":$&&te?(D&&(R=0),N=0,$===">"?($=">=",D?(E=+E+1,R=0,N=0):(R=+R+1,N=0)):$==="<="&&($="<",D?E=+E+1:R=+R+1),$==="<"&&(y="-0"),v=`${$+E}.${R}.${N}${y}`):D?v=`>=${E}.0.0${y} <${+E+1}.0.0-0`:T&&(v=`>=${E}.${R}.0${y} <${E}.${+R+1}.0-0`),i("xRange return",v),v})},zt=(f,c)=>(i("replaceStars",f,c),f.trim().replace(u[a.STAR],"")),Zt=(f,c)=>(i("replaceGTE0",f,c),f.trim().replace(u[c.includePrerelease?a.GTE0PRE:a.GTE0],"")),Jt=f=>(c,g,v,$,E,R,N,y,S,D,T,te,Hi)=>(w(v)?g="":w($)?g=`>=${v}.0.0${f?"-0":""}`:w(E)?g=`>=${v}.${$}.0${f?"-0":""}`:R?g=`>=${g}`:g=`>=${g}${f?"-0":""}`,w(S)?y="":w(D)?y=`<${+S+1}.0.0-0`:w(T)?y=`<${S}.${+D+1}.0-0`:te?y=`<=${S}.${D}.${T}-${te}`:f?y=`<${S}.${D}.${+T+1}-0`:y=`<=${y}`,`${g} ${y}`.trim()),Qt=(f,c,g)=>{for(let v=0;v0){const $=f[v].semver;if($.major===c.major&&$.minor===c.minor&&$.patch===c.patch)return!0}return!1}return!0};return _e}var De,pt;function Ie(){if(pt)return De;pt=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(h,p){if(p=r(p),h instanceof t){if(h.loose===!!p.loose)return h;h=h.value}h=h.trim().split(/\s+/).join(" "),l("comparator",h,p),this.options=p,this.loose=!!p.loose,this.parse(h),this.semver===e?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(h){const p=this.options.loose?n[s.COMPARATORLOOSE]:n[s.COMPARATOR],L=h.match(p);if(!L)throw new TypeError(`Invalid comparator: ${h}`);this.operator=L[1]!==void 0?L[1]:"",this.operator==="="&&(this.operator=""),L[2]?this.semver=new u(L[2],this.options.loose):this.semver=e}toString(){return this.value}test(h){if(l("Comparator.test",h,this.options.loose),this.semver===e||h===e)return!0;if(typeof h=="string")try{h=new u(h,this.options)}catch{return!1}return i(h,this.operator,this.semver,this.options)}intersects(h,p){if(!(h instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new a(h.value,p).test(this.value):h.operator===""?h.value===""?!0:new a(this.value,p).test(h.semver):(p=r(p),p.includePrerelease&&(this.value==="<0.0.0-0"||h.value==="<0.0.0-0")||!p.includePrerelease&&(this.value.startsWith("<0.0.0")||h.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&h.operator.startsWith(">")||this.operator.startsWith("<")&&h.operator.startsWith("<")||this.semver.version===h.semver.version&&this.operator.includes("=")&&h.operator.includes("=")||i(this.semver,"<",h.semver,p)&&this.operator.startsWith(">")&&h.operator.startsWith("<")||i(this.semver,">",h.semver,p)&&this.operator.startsWith("<")&&h.operator.startsWith(">")))}}De=t;const r=Ve,{safeRe:n,t:s}=le,i=bt,l=Re,u=C,a=F();return De}const Dn=F(),Pn=(e,t,r)=>{try{t=new Dn(t,r)}catch{return!1}return t.test(e)};var Le=Pn;const bn=F(),xn=(e,t)=>new bn(e,t).set.map(r=>r.map(n=>n.value).join(" ").trim().split(" "));var Un=xn;const Fn=C,Gn=F(),jn=(e,t,r)=>{let n=null,s=null,i=null;try{i=new Gn(t,r)}catch{return null}return e.forEach(l=>{i.test(l)&&(!n||s.compare(l)===-1)&&(n=l,s=new Fn(n,r))}),n};var Mn=jn;const Xn=C,Vn=F(),Yn=(e,t,r)=>{let n=null,s=null,i=null;try{i=new Vn(t,r)}catch{return null}return e.forEach(l=>{i.test(l)&&(!n||s.compare(l)===1)&&(n=l,s=new Xn(n,r))}),n};var Wn=Yn;const Pe=C,Hn=F(),Et=ye,kn=(e,t)=>{e=new Hn(e,t);let r=new Pe("0.0.0");if(e.test(r)||(r=new Pe("0.0.0-0"),e.test(r)))return r;r=null;for(let n=0;n{const u=new Pe(l.semver.version);switch(l.operator){case">":u.prerelease.length===0?u.patch++:u.prerelease.push(0),u.raw=u.format();case"":case">=":(!i||Et(u,i))&&(i=u);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${l.operator}`)}}),i&&(!r||Et(r,i))&&(r=i)}return r&&e.test(r)?r:null};var qn=kn;const Bn=F(),Kn=(e,t)=>{try{return new Bn(e,t).range||"*"}catch{return null}};var zn=Kn;const Zn=C,Ut=Ie(),{ANY:Jn}=Ut,Qn=F(),es=Le,mt=ye,dt=We,ts=ke,rs=He,ns=(e,t,r,n)=>{e=new Zn(e,n),t=new Qn(t,n);let s,i,l,u,a;switch(r){case">":s=mt,i=ts,l=dt,u=">",a=">=";break;case"<":s=dt,i=rs,l=mt,u="<",a="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(es(e,t,n))return!1;for(let o=0;o{m.semver===Jn&&(m=new Ut(">=0.0.0")),p=p||m,L=L||m,s(m.semver,p.semver,n)?p=m:l(m.semver,L.semver,n)&&(L=m)}),p.operator===u||p.operator===a||(!L.operator||L.operator===u)&&i(e,L.semver))return!1;if(L.operator===a&&l(e,L.semver))return!1}return!0};var qe=ns;const ss=qe,is=(e,t,r)=>ss(e,t,">",r);var as=is;const os=qe,ls=(e,t,r)=>os(e,t,"<",r);var us=ls;const vt=F(),cs=(e,t,r)=>(e=new vt(e,r),t=new vt(t,r),e.intersects(t,r));var hs=cs;const fs=Le,ps=U;var Es=(e,t,r)=>{const n=[];let s=null,i=null;const l=e.sort((h,p)=>ps(h,p,r));for(const h of l)fs(h,t,r)?(i=h,s||(s=h)):(i&&n.push([s,i]),i=null,s=null);s&&n.push([s,null]);const u=[];for(const[h,p]of n)h===p?u.push(h):!p&&h===l[0]?u.push("*"):p?h===l[0]?u.push(`<=${p}`):u.push(`${h} - ${p}`):u.push(`>=${h}`);const a=u.join(" || "),o=typeof t.raw=="string"?t.raw:String(t);return a.length{if(e===t)return!0;e=new $t(e,r),t=new $t(t,r);let n=!1;e:for(const s of e.set){for(const i of t.set){const l=vs(s,i,r);if(n=n||l!==null,l)continue e}if(n)return!1}return!0},ds=[new Be(">=0.0.0-0")],gt=[new Be(">=0.0.0")],vs=(e,t,r)=>{if(e===t)return!0;if(e.length===1&&e[0].semver===be){if(t.length===1&&t[0].semver===be)return!0;r.includePrerelease?e=ds:e=gt}if(t.length===1&&t[0].semver===be){if(r.includePrerelease)return!0;t=gt}const n=new Set;let s,i;for(const m of e)m.operator===">"||m.operator===">="?s=Rt(s,m,r):m.operator==="<"||m.operator==="<="?i=yt(i,m,r):n.add(m.semver);if(n.size>1)return null;let l;if(s&&i){if(l=Ke(s.semver,i.semver,r),l>0)return null;if(l===0&&(s.operator!==">="||i.operator!=="<="))return null}for(const m of n){if(s&&!ne(m,String(s),r)||i&&!ne(m,String(i),r))return null;for(const d of t)if(!ne(m,String(d),r))return!1;return!0}let u,a,o,h,p=i&&!r.includePrerelease&&i.semver.prerelease.length?i.semver:!1,L=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1;p&&p.prerelease.length===1&&i.operator==="<"&&p.prerelease[0]===0&&(p=!1);for(const m of t){if(h=h||m.operator===">"||m.operator===">=",o=o||m.operator==="<"||m.operator==="<=",s){if(L&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===L.major&&m.semver.minor===L.minor&&m.semver.patch===L.patch&&(L=!1),m.operator===">"||m.operator===">="){if(u=Rt(s,m,r),u===m&&u!==s)return!1}else if(s.operator===">="&&!ne(s.semver,String(m),r))return!1}if(i){if(p&&m.semver.prerelease&&m.semver.prerelease.length&&m.semver.major===p.major&&m.semver.minor===p.minor&&m.semver.patch===p.patch&&(p=!1),m.operator==="<"||m.operator==="<="){if(a=yt(i,m,r),a===m&&a!==i)return!1}else if(i.operator==="<="&&!ne(i.semver,String(m),r))return!1}if(!m.operator&&(i||s)&&l!==0)return!1}return!(s&&o&&!i&&l!==0||i&&h&&!s&&l!==0||L||p)},Rt=(e,t,r)=>{if(!e)return t;const n=Ke(e.semver,t.semver,r);return n>0?e:n<0||t.operator===">"&&e.operator===">="?t:e},yt=(e,t,r)=>{if(!e)return t;const n=Ke(e.semver,t.semver,r);return n<0?e:n>0||t.operator==="<"&&e.operator==="<="?t:e};var $s=ms;const xe=le,It=ge,gs=C,Lt=_t,Rs=J,ys=gr,Is=Ir,Ls=Nr,Ns=Tr,Ss=wr,Ts=Dr,Os=xr,As=Gr,ws=U,Cs=Vr,_s=Hr,Ds=Ye,Ps=Kr,bs=Jr,xs=ye,Us=We,Fs=Dt,Gs=Pt,js=He,Ms=ke,Xs=bt,Vs=In,Ys=Ie(),Ws=F(),Hs=Le,ks=Un,qs=Mn,Bs=Wn,Ks=qn,zs=zn,Zs=qe,Js=as,Qs=us,ei=hs,ti=Es,ri=$s;var ni={parse:Rs,valid:ys,clean:Is,inc:Ls,diff:Ns,major:Ss,minor:Ts,patch:Os,prerelease:As,compare:ws,rcompare:Cs,compareLoose:_s,compareBuild:Ds,sort:Ps,rsort:bs,gt:xs,lt:Us,eq:Fs,neq:Gs,gte:js,lte:Ms,cmp:Xs,coerce:Vs,Comparator:Ys,Range:Ws,satisfies:Hs,toComparators:ks,maxSatisfying:qs,minSatisfying:Bs,minVersion:Ks,validRange:zs,outside:Zs,gtr:Js,ltr:Qs,intersects:ei,simplifyRange:ti,subset:ri,SemVer:gs,re:xe.re,src:xe.src,tokens:xe.t,SEMVER_SPEC_VERSION:It.SEMVER_SPEC_VERSION,RELEASE_TYPES:It.RELEASE_TYPES,compareIdentifiers:Lt.compareIdentifiers,rcompareIdentifiers:Lt.rcompareIdentifiers};const Nt=rr(ni);var O={};/** * @license React * react-dom-test-utils.production.min.js * diff --git a/assets/featured-tag.stories-CsNO07V6.js b/assets/featured-tag.stories-Du1zMPkV.js similarity index 94% rename from assets/featured-tag.stories-CsNO07V6.js rename to assets/featured-tag.stories-Du1zMPkV.js index 9a5b6ec8..49d9fb4d 100644 --- a/assets/featured-tag.stories-CsNO07V6.js +++ b/assets/featured-tag.stories-Du1zMPkV.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as x}from"./index-0d5eMwbi.js";import{F as a}from"./featured-tag-DLvaNKCm.js";import{P as h}from"./panel-BTNit_je.js";import{F as r}from"./form-field-BtJxu7hP.js";import"./class-names-DnY5YZNL.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-Da1HxQE-.js";import"./index-h1jAayoZ.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const K={title:"Input/FeaturedTag",component:a},j=()=>{const[c,l]=x.useState("value_1");return e.jsx("div",{className:"w-96",children:e.jsx(r,{children:e.jsxs(r.RadioBox,{value:c,onChange:u=>{l(u)},id:"value",children:[e.jsxs(r.RadioBox.Option,{value:"option_1",children:["Option 1",e.jsx(a,{children:"Recommended!"})]}),e.jsx(r.RadioBox.Option,{value:"option_2",children:"Option 2"}),e.jsx(r.RadioBox.Option,{value:"option_3",children:"Option 3"})]})})})},o={render:()=>e.jsx(j,{})},t={render:()=>e.jsx("div",{className:"w-96",children:e.jsxs(h,{className:"relative",children:[e.jsx("p",{children:"This example uses a Panel component"}),e.jsx(a,{children:"Recommended!"})]})})};var i,n,m;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as x}from"./index-0d5eMwbi.js";import{F as a}from"./featured-tag-DLvaNKCm.js";import{P as h}from"./panel-BTNit_je.js";import{F as r}from"./form-field-2xLK_lYH.js";import"./class-names-DnY5YZNL.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-BIezdMmM.js";import"./index-BgfbgFhO.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const K={title:"Input/FeaturedTag",component:a},j=()=>{const[c,l]=x.useState("value_1");return e.jsx("div",{className:"w-96",children:e.jsx(r,{children:e.jsxs(r.RadioBox,{value:c,onChange:u=>{l(u)},id:"value",children:[e.jsxs(r.RadioBox.Option,{value:"option_1",children:["Option 1",e.jsx(a,{children:"Recommended!"})]}),e.jsx(r.RadioBox.Option,{value:"option_2",children:"Option 2"}),e.jsx(r.RadioBox.Option,{value:"option_3",children:"Option 3"})]})})})},o={render:()=>e.jsx(j,{})},t={render:()=>e.jsx("div",{className:"w-96",children:e.jsxs(h,{className:"relative",children:[e.jsx("p",{children:"This example uses a Panel component"}),e.jsx(a,{children:"Recommended!"})]})})};var i,n,m;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`{ render: () => { return ; } diff --git a/assets/form-field-BtJxu7hP.js b/assets/form-field-2xLK_lYH.js similarity index 65% rename from assets/form-field-BtJxu7hP.js rename to assets/form-field-2xLK_lYH.js index 5f5b7ac0..c0250948 100644 --- a/assets/form-field-BtJxu7hP.js +++ b/assets/form-field-2xLK_lYH.js @@ -1 +1 @@ -import{j as u}from"./jsx-runtime-C798UXYj.js";import{e as To,as as ke,gz as $o,g as wo,j as Vo}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as H}from"./class-names-DnY5YZNL.js";import{$ as Ee,a as Ce,w as Zt,e as eo}from"./use-resolve-button-type-D_6M6Au0.js";import{r as d,R as P}from"./index-0d5eMwbi.js";import{l as Rt,T as Tt,j as $t,p as to}from"./form-fields-B2NmhAAW.js";import{o as g,M as Pe,L as ne,u as oe,n as re,D as ae,y as ie,p as wt,W as ve,s as Le,a as We}from"./use-sync-refs-DqQDZvJ6.js";import{a as De,U as Vt,H as Mo,w as oo}from"./description-D9Ee5mtv.js";import{Q as Mt,K as qe,u as Pt,I as Ne}from"./label-BBnH-iCi.js";import{r as Be}from"./bugs-DpEN4NTH.js";import{_ as jt,A as Po,h as jo,j as Fo,F as ge,P as Jt,T as Wt}from"./focus-management-DaVlPEX1.js";import{o as w,u as ro}from"./keyboard-C2Ifhsxt.js";import{r as te}from"./index-BoyHNU0R.js";import{F as ko,u as no,c as V,f as _e,s as Lo,a as Do}from"./use-text-value-ehRDfXkw.js";import{M as ao,y as lo,x as io,R as so,b as uo,d as Xe,F as qo}from"./floating-ERp4LevH.js";import{y as co}from"./use-inert-others-CzqV763I.js";import{R as po,n as Ft,m as mo,f as bo,r as fo,a as Bo}from"./portal-CLj4HHuk.js";import{c as vo,i as be,u as go,x as xo,R as yo}from"./open-closed-DC3t9YEZ.js";import{B as ho}from"./badge-Da1HxQE-.js";import{u as Ao}from"./index-h1jAayoZ.js";import{E as Go}from"./use-event-listener-CochUv0b.js";import{m as Xt,r as Yt}from"./active-element-history-DI7yoVCB.js";import{T as Uo}from"./tag-C9CGXtt3.js";function Ho(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function kt(e=Ho){return d.useCallback((t,r)=>{if(typeof e=="string"){let o=e;return(t==null?void 0:t[o])===(r==null?void 0:r[o])}return e(t,r)},[e])}function _o(e){let t=d.useRef({value:"",selectionStart:null,selectionEnd:null});return Go(e,"blur",r=>{let o=r.target;o instanceof HTMLInputElement&&(t.current={value:o.value,selectionStart:o.selectionStart,selectionEnd:o.selectionEnd})}),g(()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:r,selectionEnd:o}=t.current;r!==null&&o!==null&&e.setSelectionRange(r,o)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}function Ko({children:e,freeze:t}){let r=je(t,e);return P.createElement(P.Fragment,null,r)}function je(e,t){let[r,o]=d.useState(t);return!e&&r!==t&&o(t),e?r:t}var Lt=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Lt||{}),zo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(zo||{}),Qo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Qo||{}),Jo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Jo||{}),Wo=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.SetTyping=3]="SetTyping",e[e.RegisterOption=4]="RegisterOption",e[e.UnregisterOption=5]="UnregisterOption",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",e[e.SetInputElement=8]="SetInputElement",e[e.SetButtonElement=9]="SetButtonElement",e[e.SetOptionsElement=10]="SetOptionsElement",e))(Wo||{});function ze(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=t(e.options.slice()),a=o.length>0&&o[0].dataRef.current.order!==null?o.sort((l,n)=>l.dataRef.current.order-n.dataRef.current.order):jt(o,l=>l.dataRef.current.domRef.current),f=r?a.indexOf(r):null;return f===-1&&(f=null),{options:a,activeOptionIndex:f}}let Xo={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,r;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((r=e.dataRef.current)!=null&&r.value){let o=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(o!==-1)return{...e,activeOptionIndex:o,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3(e,t){return e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping}},2(e,t){var r,o,a,f;if((r=e.dataRef.current)!=null&&r.disabled||e.optionsElement&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let{options:p,disabled:m}=e.virtual,v=t.focus===V.Specific?t.idx:_e(t,{resolveItems:()=>p,resolveActiveIndex:()=>{var s,b;return(b=(s=e.activeOptionIndex)!=null?s:p.findIndex(h=>!m(h)))!=null?b:null},resolveDisabled:m,resolveId(){throw new Error("Function not implemented.")}}),I=(a=t.trigger)!=null?a:2;return e.activeOptionIndex===v&&e.activationTrigger===I?e:{...e,activeOptionIndex:v,activationTrigger:I,isTyping:!1,__demoMode:!1}}let l=ze(e);if(l.activeOptionIndex===null){let p=l.options.findIndex(m=>!m.dataRef.current.disabled);p!==-1&&(l.activeOptionIndex=p)}let n=t.focus===V.Specific?t.idx:_e(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled}),i=(f=t.trigger)!=null?f:2;return e.activeOptionIndex===n&&e.activationTrigger===i?e:{...e,...l,isTyping:!1,activeOptionIndex:n,activationTrigger:i,__demoMode:!1}},4:(e,t)=>{var r,o,a;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:[...e.options,t.payload]};let f=t.payload,l=ze(e,i=>(i.push(f),i));e.activeOptionIndex===null&&(o=e.dataRef.current)!=null&&o.isSelected(t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(f));let n={...e,...l,activationTrigger:2};return(a=e.dataRef.current)!=null&&a.__demoMode&&e.dataRef.current.value===void 0&&(n.activeOptionIndex=0),n},5:(e,t)=>{var r;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:e.options.filter(a=>a.id!==t.id)};let o=ze(e,a=>{let f=a.findIndex(l=>l.id===t.id);return f!==-1&&a.splice(f,1),a});return{...e,...o,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var r,o;if(e.virtual===null)return{...e,virtual:{options:t.options,disabled:(r=t.disabled)!=null?r:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let a=e.activeOptionIndex;if(e.activeOptionIndex!==null){let f=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);f!==-1?a=f:a=null}return{...e,activeOptionIndex:a,virtual:{options:t.options,disabled:(o=t.disabled)!=null?o:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},Dt=d.createContext(null);Dt.displayName="ComboboxActionsContext";function Re(e){let t=d.useContext(Dt);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Re),r}return t}let Oo=d.createContext(null);function Yo(e){let t=he("VirtualProvider"),{options:r}=t.virtual,[o,a]=d.useMemo(()=>{let p=t.optionsElement;if(!p)return[0,0];let m=window.getComputedStyle(p);return[parseFloat(m.paddingBlockStart||m.paddingTop),parseFloat(m.paddingBlockEnd||m.paddingBottom)]},[t.optionsElement]),f=Ao({enabled:r.length!==0,scrollPaddingStart:o,scrollPaddingEnd:a,count:r.length,estimateSize(){return 40},getScrollElement(){return t.optionsElement},overscan:12}),[l,n]=d.useState(0);re(()=>{n(p=>p+1)},[r]);let i=f.getVirtualItems();return i.length===0?null:P.createElement(Oo.Provider,{value:f},P.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:p=>{p&&t.activationTrigger!==0&&t.activeOptionIndex!==null&&r.length>t.activeOptionIndex&&f.scrollToIndex(t.activeOptionIndex)}},i.map(p=>{var m;return P.createElement(d.Fragment,{key:p.key},P.cloneElement((m=e.children)==null?void 0:m.call(e,{...e.slot,option:r[p.index]}),{key:`${l}-${p.key}`,"data-index":p.index,"aria-setsize":r.length,"aria-posinset":p.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${p.start}px)`,overflowAnchor:"none"}}))})))}let Oe=d.createContext(null);Oe.displayName="ComboboxDataContext";function he(e){let t=d.useContext(Oe);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,he),r}return t}function Zo(e,t){return oe(t.type,Xo,e,t)}let er=d.Fragment;function tr(e,t){var r,o;let a=De(),{value:f,defaultValue:l,onChange:n,form:i,name:p,by:m,disabled:v=a||!1,onClose:I,__demoMode:s=!1,multiple:b=!1,immediate:h=!1,virtual:x=null,nullable:D,...j}=e,R=Rt(l),[N=b?[]:void 0,M]=Tt(f,n,R),[S,_]=d.useReducer(Zo,{dataRef:d.createRef(),comboboxState:s?0:1,isTyping:!1,options:[],virtual:x?{options:x.options,disabled:(r=x.disabled)!=null?r:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:s}),E=d.useRef(!1),T=d.useRef({static:!1,hold:!1}),F=kt(m),y=g(O=>x?m===null?x.options.indexOf(O):x.options.findIndex(U=>F(U,O)):S.options.findIndex(U=>F(U.dataRef.current.value,O))),q=d.useCallback(O=>oe(C.mode,{1:()=>N.some(U=>F(U,O)),0:()=>F(N,O)}),[N]),J=g(O=>S.activeOptionIndex===y(O)),C=d.useMemo(()=>({...S,immediate:h,optionsPropsRef:T,value:N,defaultValue:R,disabled:v,mode:b?1:0,virtual:x?S.virtual:null,get activeOptionIndex(){if(E.current&&S.activeOptionIndex===null&&(x?x.options.length>0:S.options.length>0)){if(x){let U=x.options.findIndex(ue=>{var we,Qt;return!((Qt=(we=x.disabled)==null?void 0:we.call(x,ue))!=null&&Qt)});if(U!==-1)return U}let O=S.options.findIndex(U=>!U.dataRef.current.disabled);if(O!==-1)return O}return S.activeOptionIndex},calculateIndex:y,compare:F,isSelected:q,isActive:J}),[N,R,v,b,s,S,x]);re(()=>{var O;x&&_({type:7,options:x.options,disabled:(O=x.disabled)!=null?O:null})},[x,x==null?void 0:x.options,x==null?void 0:x.disabled]),re(()=>{S.dataRef.current=C},[C]);let B=C.comboboxState===0;po(B,[C.buttonElement,C.inputElement,C.optionsElement],()=>W.closeCombobox());let X=d.useMemo(()=>{var O,U,ue;return{open:C.comboboxState===0,disabled:v,activeIndex:C.activeOptionIndex,activeOption:C.activeOptionIndex===null?null:C.virtual?C.virtual.options[(O=C.activeOptionIndex)!=null?O:0]:(ue=(U=C.options[C.activeOptionIndex])==null?void 0:U.dataRef.current.value)!=null?ue:null,value:N}},[C,v,N]),Z=g(()=>{if(C.activeOptionIndex!==null){if(W.setIsTyping(!1),C.virtual)c(C.virtual.options[C.activeOptionIndex]);else{let{dataRef:O}=C.options[C.activeOptionIndex];c(O.current.value)}W.goToOption(V.Specific,C.activeOptionIndex)}}),ee=g(()=>{_({type:0}),E.current=!0}),le=g(()=>{_({type:1}),E.current=!1,I==null||I()}),se=g(O=>{_({type:3,isTyping:O})}),k=g((O,U,ue)=>(E.current=!1,O===V.Specific?_({type:2,focus:V.Specific,idx:U,trigger:ue}):_({type:2,focus:O,trigger:ue}))),G=g((O,U)=>(_({type:4,payload:{id:O,dataRef:U}}),()=>{C.isActive(U.current.value)&&(E.current=!0),_({type:5,id:O})})),c=g(O=>oe(C.mode,{0(){return M==null?void 0:M(O)},1(){let U=C.value.slice(),ue=U.findIndex(we=>F(we,O));return ue===-1?U.push(O):U.splice(ue,1),M==null?void 0:M(U)}})),L=g(O=>{_({type:6,trigger:O})}),$=g(O=>{_({type:8,element:O})}),K=g(O=>{_({type:9,element:O})}),z=g(O=>{_({type:10,element:O})}),W=d.useMemo(()=>({onChange:c,registerOption:G,goToOption:k,setIsTyping:se,closeCombobox:le,openCombobox:ee,setActivationTrigger:L,selectActiveOption:Z,setInputElement:$,setButtonElement:K,setOptionsElement:z}),[]),[de,He]=qe(),Ke=t===null?{}:{ref:t},A=d.useCallback(()=>{if(R!==void 0)return M==null?void 0:M(R)},[M,R]),Q=ae();return P.createElement(He,{value:de,props:{htmlFor:(o=C.inputElement)==null?void 0:o.id},slot:{open:C.comboboxState===0,disabled:v}},P.createElement(ao,null,P.createElement(Dt.Provider,{value:W},P.createElement(Oe.Provider,{value:C},P.createElement(vo,{value:oe(C.comboboxState,{0:be.Open,1:be.Closed})},p!=null&&P.createElement($t,{disabled:v,data:N!=null?{[p]:N}:{},form:i,onReset:A}),Q({ourProps:Ke,theirProps:j,slot:X,defaultTag:er,name:"Combobox"}))))))}let or="input";function rr(e,t){var r,o,a,f,l;let n=he("Combobox.Input"),i=Re("Combobox.Input"),p=d.useId(),m=Pt(),{id:v=m||`headlessui-combobox-input-${p}`,onChange:I,displayValue:s,disabled:b=n.disabled||!1,autoFocus:h=!1,type:x="text",...D}=e,j=d.useRef(null),R=ie(j,t,lo(),i.setInputElement),N=Ft(n.inputElement),M=wt(),S=g(()=>{i.onChange(null),n.optionsElement&&(n.optionsElement.scrollTop=0),i.goToOption(V.Nothing)}),_=d.useMemo(()=>{var c;return typeof s=="function"&&n.value!==void 0?(c=s(n.value))!=null?c:"":typeof n.value=="string"?n.value:""},[n.value,s]);Xt(([c,L],[$,K])=>{if(n.isTyping)return;let z=j.current;z&&((K===0&&L===1||c!==$)&&(z.value=c),requestAnimationFrame(()=>{if(n.isTyping||!z||(N==null?void 0:N.activeElement)!==z)return;let{selectionStart:W,selectionEnd:de}=z;Math.abs((de??0)-(W??0))===0&&W===0&&z.setSelectionRange(z.value.length,z.value.length)}))},[_,n.comboboxState,N,n.isTyping]),Xt(([c],[L])=>{if(c===0&&L===1){if(n.isTyping)return;let $=j.current;if(!$)return;let K=$.value,{selectionStart:z,selectionEnd:W,selectionDirection:de}=$;$.value="",$.value=K,de!==null?$.setSelectionRange(z,W,de):$.setSelectionRange(z,W)}},[n.comboboxState]);let E=d.useRef(!1),T=g(()=>{E.current=!0}),F=g(()=>{M.nextFrame(()=>{E.current=!1})}),y=g(c=>{switch(i.setIsTyping(!0),c.key){case w.Enter:if(n.comboboxState!==0||E.current)return;if(c.preventDefault(),c.stopPropagation(),n.activeOptionIndex===null){i.closeCombobox();return}i.selectActiveOption(),n.mode===0&&i.closeCombobox();break;case w.ArrowDown:return c.preventDefault(),c.stopPropagation(),oe(n.comboboxState,{0:()=>i.goToOption(V.Next),1:()=>i.openCombobox()});case w.ArrowUp:return c.preventDefault(),c.stopPropagation(),oe(n.comboboxState,{0:()=>i.goToOption(V.Previous),1:()=>{te.flushSync(()=>i.openCombobox()),n.value||i.goToOption(V.Last)}});case w.Home:if(c.shiftKey)break;return c.preventDefault(),c.stopPropagation(),i.goToOption(V.First);case w.PageUp:return c.preventDefault(),c.stopPropagation(),i.goToOption(V.First);case w.End:if(c.shiftKey)break;return c.preventDefault(),c.stopPropagation(),i.goToOption(V.Last);case w.PageDown:return c.preventDefault(),c.stopPropagation(),i.goToOption(V.Last);case w.Escape:return n.comboboxState!==0?void 0:(c.preventDefault(),n.optionsElement&&!n.optionsPropsRef.current.static&&c.stopPropagation(),n.mode===0&&n.value===null&&S(),i.closeCombobox());case w.Tab:if(n.comboboxState!==0)return;n.mode===0&&n.activationTrigger!==1&&i.selectActiveOption(),i.closeCombobox();break}}),q=g(c=>{I==null||I(c),n.mode===0&&c.target.value===""&&S(),i.openCombobox()}),J=g(c=>{var L,$,K;let z=(L=c.relatedTarget)!=null?L:Yt.find(W=>W!==c.currentTarget);if(!(($=n.optionsElement)!=null&&$.contains(z))&&!((K=n.buttonElement)!=null&&K.contains(z))&&n.comboboxState===0)return c.preventDefault(),n.mode===0&&n.value===null&&S(),i.closeCombobox()}),C=g(c=>{var L,$,K;let z=(L=c.relatedTarget)!=null?L:Yt.find(W=>W!==c.currentTarget);($=n.buttonElement)!=null&&$.contains(z)||(K=n.optionsElement)!=null&&K.contains(z)||n.disabled||n.immediate&&n.comboboxState!==0&&M.microTask(()=>{te.flushSync(()=>i.openCombobox()),i.setActivationTrigger(1)})}),B=Ne(),X=Vt(),{isFocused:Z,focusProps:ee}=Ee({autoFocus:h}),{isHovered:le,hoverProps:se}=Ce({isDisabled:b}),k=d.useMemo(()=>({open:n.comboboxState===0,disabled:b,hover:le,focus:Z,autofocus:h}),[n,le,Z,h,b]),G=ve({ref:R,id:v,role:"combobox",type:x,"aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-activedescendant":n.activeOptionIndex===null?void 0:n.virtual?(o=n.options.find(c=>!c.dataRef.current.disabled&&n.compare(c.dataRef.current.value,n.virtual.options[n.activeOptionIndex])))==null?void 0:o.id:(a=n.options[n.activeOptionIndex])==null?void 0:a.id,"aria-labelledby":B,"aria-describedby":X,"aria-autocomplete":"list",defaultValue:(l=(f=e.defaultValue)!=null?f:n.defaultValue!==void 0?s==null?void 0:s(n.defaultValue):null)!=null?l:n.defaultValue,disabled:b||void 0,autoFocus:h,onCompositionStart:T,onCompositionEnd:F,onKeyDown:y,onChange:q,onFocus:C,onBlur:J},ee,se);return ae()({ourProps:G,theirProps:D,slot:k,defaultTag:or,name:"Combobox.Input"})}let nr="button";function ar(e,t){var r;let o=he("Combobox.Button"),a=Re("Combobox.Button"),f=ie(t,a.setButtonElement),l=d.useId(),{id:n=`headlessui-combobox-button-${l}`,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=_o(o.inputElement),I=g(_=>{switch(_.key){case w.Space:case w.Enter:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&te.flushSync(()=>a.openCombobox()),v();return;case w.ArrowDown:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&(te.flushSync(()=>a.openCombobox()),o.value||a.goToOption(V.First)),v();return;case w.ArrowUp:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&(te.flushSync(()=>a.openCombobox()),o.value||a.goToOption(V.Last)),v();return;case w.Escape:if(o.comboboxState!==0)return;_.preventDefault(),o.optionsElement&&!o.optionsPropsRef.current.static&&_.stopPropagation(),te.flushSync(()=>a.closeCombobox()),v();return;default:return}}),s=g(_=>{_.preventDefault(),!Be(_.currentTarget)&&(_.button===Lt.Left&&(o.comboboxState===0?a.closeCombobox():a.openCombobox()),v())}),b=Ne([n]),{isFocusVisible:h,focusProps:x}=Ee({autoFocus:p}),{isHovered:D,hoverProps:j}=Ce({isDisabled:i}),{pressed:R,pressProps:N}=Zt({disabled:i}),M=d.useMemo(()=>({open:o.comboboxState===0,active:R||o.comboboxState===0,disabled:i,value:o.value,hover:D,focus:h}),[o,D,h,R,i]),S=ve({ref:f,id:n,type:eo(e,o.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=o.optionsElement)==null?void 0:r.id,"aria-expanded":o.comboboxState===0,"aria-labelledby":b,disabled:i||void 0,autoFocus:p,onMouseDown:s,onKeyDown:I},x,j,N);return ae()({ourProps:S,theirProps:m,slot:M,defaultTag:nr,name:"Combobox.Button"})}let lr="div",ir=Pe.RenderStrategy|Pe.Static;function sr(e,t){var r,o,a;let f=d.useId(),{id:l=`headlessui-combobox-options-${f}`,hold:n=!1,anchor:i,portal:p=!1,modal:m=!0,transition:v=!1,...I}=e,s=he("Combobox.Options"),b=Re("Combobox.Options"),h=io(i);h&&(p=!0);let[x,D]=so(h),[j,R]=d.useState(null),N=uo(),M=ie(t,h?x:null,b.setOptionsElement,R),S=Ft(s.optionsElement),_=go(),[E,T]=xo(v,j,_!==null?(_&be.Open)===be.Open:s.comboboxState===0);mo(E,s.inputElement,b.closeCombobox);let F=s.__demoMode?!1:m&&s.comboboxState===0;bo(F,S);let y=s.__demoMode?!1:m&&s.comboboxState===0;co(y,{allowed:d.useCallback(()=>[s.inputElement,s.buttonElement,s.optionsElement],[s.inputElement,s.buttonElement,s.optionsElement])}),re(()=>{var G;s.optionsPropsRef.current.static=(G=e.static)!=null?G:!1},[s.optionsPropsRef,e.static]),re(()=>{s.optionsPropsRef.current.hold=n},[s.optionsPropsRef,n]),ko(s.comboboxState===0,{container:s.optionsElement,accept(G){return G.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:G.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(G){G.setAttribute("role","none")}});let q=Ne([(r=s.buttonElement)==null?void 0:r.id]),J=d.useMemo(()=>({open:s.comboboxState===0,option:void 0}),[s.comboboxState]),C=g(()=>{b.setActivationTrigger(0)}),B=g(G=>{G.preventDefault(),b.setActivationTrigger(0)}),X=ve(h?N():{},{"aria-labelledby":q,role:"listbox","aria-multiselectable":s.mode===1?!0:void 0,id:l,ref:M,style:{...I.style,...D,"--input-width":Xe(s.inputElement,!0).width,"--button-width":Xe(s.buttonElement,!0).width},onWheel:s.activationTrigger===0?void 0:C,onMouseDown:B,...yo(T)}),Z=E&&s.comboboxState===1,ee=je(Z,(o=s.virtual)==null?void 0:o.options),le=je(Z,s.value),se=g(G=>s.compare(le,G));if(s.virtual){if(ee===void 0)throw new Error("Missing `options` in virtual mode");Object.assign(I,{children:P.createElement(Oe.Provider,{value:ee!==s.virtual.options?{...s,virtual:{...s.virtual,options:ee}}:s},P.createElement(Yo,{slot:J},I.children))})}let k=ae();return P.createElement(fo,{enabled:p?e.static||E:!1},P.createElement(Oe.Provider,{value:s.mode===1?s:{...s,isSelected:se}},k({ourProps:X,theirProps:{...I,children:P.createElement(Ko,{freeze:Z},typeof I.children=="function"?(a=I.children)==null?void 0:a.call(I,J):I.children)},slot:J,defaultTag:lr,features:ir,visible:E,name:"Combobox.Options"})))}let ur="div";function dr(e,t){var r,o,a,f;let l=he("Combobox.Option"),n=Re("Combobox.Option"),i=d.useId(),{id:p=`headlessui-combobox-option-${i}`,value:m,disabled:v=(a=(o=(r=l.virtual)==null?void 0:r.disabled)==null?void 0:o.call(r,m))!=null?a:!1,order:I=null,...s}=e,b=_o(l.inputElement),h=l.virtual?l.activeOptionIndex===l.calculateIndex(m):l.activeOptionIndex===null?!1:((f=l.options[l.activeOptionIndex])==null?void 0:f.id)===p,x=l.isSelected(m),D=d.useRef(null),j=Le({disabled:v,value:m,domRef:D,order:I}),R=d.useContext(Oo),N=ie(t,D,R?R.measureElement:null),M=g(()=>{n.setIsTyping(!1),n.onChange(m)});re(()=>n.registerOption(p,j),[j,p]);let S=d.useRef(!(l.virtual||l.__demoMode));re(()=>{if(!l.virtual&&!l.__demoMode)return We().requestAnimationFrame(()=>{S.current=!0})},[l.virtual,l.__demoMode]),re(()=>{if(S.current&&l.comboboxState===0&&h&&l.activationTrigger!==0)return We().requestAnimationFrame(()=>{var B,X;(X=(B=D.current)==null?void 0:B.scrollIntoView)==null||X.call(B,{block:"nearest"})})},[D,h,l.comboboxState,l.activationTrigger,l.activeOptionIndex]);let _=g(B=>{B.preventDefault(),B.button===Lt.Left&&(v||(M(),Bo()||requestAnimationFrame(()=>b()),l.mode===0&&n.closeCombobox()))}),E=g(()=>{if(v)return n.goToOption(V.Nothing);let B=l.calculateIndex(m);n.goToOption(V.Specific,B)}),T=no(),F=g(B=>T.update(B)),y=g(B=>{if(!T.wasMoved(B)||v||h)return;let X=l.calculateIndex(m);n.goToOption(V.Specific,X,0)}),q=g(B=>{T.wasMoved(B)&&(v||h&&(l.optionsPropsRef.current.hold||n.goToOption(V.Nothing)))}),J=d.useMemo(()=>({active:h,focus:h,selected:x,disabled:v}),[h,x,v]),C={id:p,ref:N,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":x,disabled:void 0,onMouseDown:_,onFocus:E,onPointerEnter:F,onMouseEnter:F,onPointerMove:y,onMouseMove:y,onPointerLeave:q,onMouseLeave:q};return ae()({ourProps:C,theirProps:s,slot:J,defaultTag:ur,name:"Combobox.Option"})}let cr=ne(tr),Ae=ne(ar),qt=ne(rr),pr=Mt,Bt=ne(sr),Te=ne(dr),Io=Object.assign(cr,{Input:qt,Button:Ae,Label:pr,Options:Bt,Option:Te});var mr=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(mr||{}),br=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(br||{}),fr=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(fr||{}),vr=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(vr||{});function Qe(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=jt(t(e.options.slice()),f=>f.dataRef.current.domRef.current),a=r?o.indexOf(r):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let gr={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(a=>r(a.dataRef.current.value));return o!==-1&&(t=o),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,o,a,f,l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let n={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===V.Nothing)return{...n,activeOptionIndex:null};if(t.focus===V.Specific)return{...n,activeOptionIndex:e.options.findIndex(m=>m.id===t.id)};if(t.focus===V.Previous){let m=e.activeOptionIndex;if(m!==null){let v=e.options[m].dataRef.current.domRef,I=_e(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});if(I!==null){let s=e.options[I].dataRef.current.domRef;if(((o=v.current)==null?void 0:o.previousElementSibling)===s.current||((a=s.current)==null?void 0:a.previousElementSibling)===null)return{...n,activeOptionIndex:I}}}}else if(t.focus===V.Next){let m=e.activeOptionIndex;if(m!==null){let v=e.options[m].dataRef.current.domRef,I=_e(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});if(I!==null){let s=e.options[I].dataRef.current.domRef;if(((f=v.current)==null?void 0:f.nextElementSibling)===s.current||((l=s.current)==null?void 0:l.nextElementSibling)===null)return{...n,activeOptionIndex:I}}}}let i=Qe(e),p=_e(t,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});return{...n,...i,activeOptionIndex:p}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,o=e.searchQuery+t.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(l=>{var n;return!l.dataRef.current.disabled&&((n=l.dataRef.current.textValue)==null?void 0:n.startsWith(o))}),f=a?e.options.indexOf(a):-1;return f===-1||f===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:f,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},o=Qe(e,a=>[...a,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(r)),{...e,...o}},6:(e,t)=>{let r=Qe(e,o=>{let a=o.findIndex(f=>f.id===t.id);return a!==-1&&o.splice(a,1),o});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},At=d.createContext(null);At.displayName="ListboxActionsContext";function Ge(e){let t=d.useContext(At);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ge),r}return t}let Ue=d.createContext(null);Ue.displayName="ListboxDataContext";function $e(e){let t=d.useContext(Ue);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,$e),r}return t}function xr(e,t){return oe(t.type,gr,e,t)}let yr=d.Fragment;function hr(e,t){var r;let o=De(),{value:a,defaultValue:f,form:l,name:n,onChange:i,by:p,invalid:m=!1,disabled:v=o||!1,horizontal:I=!1,multiple:s=!1,__demoMode:b=!1,...h}=e;const x=I?"horizontal":"vertical";let D=ie(t),j=Rt(f),[R=s?[]:void 0,N]=Tt(a,i,j),[M,S]=d.useReducer(xr,{dataRef:d.createRef(),listboxState:b?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:b}),_=d.useRef({static:!1,hold:!1}),E=d.useRef(new Map),T=kt(p),F=d.useCallback(A=>oe(y.mode,{1:()=>R.some(Q=>T(Q,A)),0:()=>T(R,A)}),[R]),y=d.useMemo(()=>({...M,value:R,disabled:v,invalid:m,mode:s?1:0,orientation:x,compare:T,isSelected:F,optionsPropsRef:_,listRef:E}),[R,v,m,s,M,E]);re(()=>{M.dataRef.current=y},[y]);let q=y.listboxState===0;po(q,[y.buttonElement,y.optionsElement],(A,Q)=>{var O;S({type:1}),Po(Q,jo.Loose)||(A.preventDefault(),(O=y.buttonElement)==null||O.focus())});let J=d.useMemo(()=>({open:y.listboxState===0,disabled:v,invalid:m,value:R}),[y,v,R,m]),C=g(A=>{let Q=y.options.find(O=>O.id===A);Q&&k(Q.dataRef.current.value)}),B=g(()=>{if(y.activeOptionIndex!==null){let{dataRef:A,id:Q}=y.options[y.activeOptionIndex];k(A.current.value),S({type:2,focus:V.Specific,id:Q})}}),X=g(()=>S({type:0})),Z=g(()=>S({type:1})),ee=wt(),le=g((A,Q,O)=>{ee.dispose(),ee.microTask(()=>A===V.Specific?S({type:2,focus:V.Specific,id:Q,trigger:O}):S({type:2,focus:A,trigger:O}))}),se=g((A,Q)=>(S({type:5,id:A,dataRef:Q}),()=>S({type:6,id:A}))),k=g(A=>oe(y.mode,{0(){return N==null?void 0:N(A)},1(){let Q=y.value.slice(),O=Q.findIndex(U=>T(U,A));return O===-1?Q.push(A):Q.splice(O,1),N==null?void 0:N(Q)}})),G=g(A=>S({type:3,value:A})),c=g(()=>S({type:4})),L=g(A=>{S({type:7,element:A})}),$=g(A=>{S({type:8,element:A})}),K=d.useMemo(()=>({onChange:k,registerOption:se,goToOption:le,closeListbox:Z,openListbox:X,selectActiveOption:B,selectOption:C,search:G,clearSearch:c,setButtonElement:L,setOptionsElement:$}),[]),[z,W]=qe({inherit:!0}),de={ref:D},He=d.useCallback(()=>{if(j!==void 0)return N==null?void 0:N(j)},[N,j]),Ke=ae();return P.createElement(W,{value:z,props:{htmlFor:(r=y.buttonElement)==null?void 0:r.id},slot:{open:y.listboxState===0,disabled:v}},P.createElement(ao,null,P.createElement(At.Provider,{value:K},P.createElement(Ue.Provider,{value:y},P.createElement(vo,{value:oe(y.listboxState,{0:be.Open,1:be.Closed})},n!=null&&R!=null&&P.createElement($t,{disabled:v,data:{[n]:R},form:l,onReset:He}),Ke({ourProps:de,theirProps:h,slot:J,defaultTag:yr,name:"Listbox"}))))))}let _r="button";function Or(e,t){var r;let o=$e("Listbox.Button"),a=Ge("Listbox.Button"),f=d.useId(),l=Pt(),{id:n=l||`headlessui-listbox-button-${f}`,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=ie(t,lo(),a.setButtonElement),I=qo(),s=g(y=>{switch(y.key){case w.Enter:to(y.currentTarget);break;case w.Space:case w.ArrowDown:y.preventDefault(),te.flushSync(()=>a.openListbox()),o.value||a.goToOption(V.First);break;case w.ArrowUp:y.preventDefault(),te.flushSync(()=>a.openListbox()),o.value||a.goToOption(V.Last);break}}),b=g(y=>{switch(y.key){case w.Space:y.preventDefault();break}}),h=g(y=>{var q;if(Be(y.currentTarget))return y.preventDefault();o.listboxState===0?(te.flushSync(()=>a.closeListbox()),(q=o.buttonElement)==null||q.focus({preventScroll:!0})):(y.preventDefault(),a.openListbox())}),x=g(y=>y.preventDefault()),D=Ne([n]),j=Vt(),{isFocusVisible:R,focusProps:N}=Ee({autoFocus:p}),{isHovered:M,hoverProps:S}=Ce({isDisabled:i}),{pressed:_,pressProps:E}=Zt({disabled:i}),T=d.useMemo(()=>({open:o.listboxState===0,active:_||o.listboxState===0,disabled:i,invalid:o.invalid,value:o.value,hover:M,focus:R,autofocus:p}),[o.listboxState,o.value,i,M,R,_,o.invalid,p]),F=ve(I(),{ref:v,id:n,type:eo(e,o.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=o.optionsElement)==null?void 0:r.id,"aria-expanded":o.listboxState===0,"aria-labelledby":D,"aria-describedby":j,disabled:i||void 0,autoFocus:p,onKeyDown:s,onKeyUp:b,onKeyPress:x,onClick:h},N,S,E);return ae()({ourProps:F,theirProps:m,slot:T,defaultTag:_r,name:"Listbox.Button"})}let So=d.createContext(!1),Ir="div",Sr=Pe.RenderStrategy|Pe.Static;function Er(e,t){var r,o;let a=d.useId(),{id:f=`headlessui-listbox-options-${a}`,anchor:l,portal:n=!1,modal:i=!0,transition:p=!1,...m}=e,v=io(l),[I,s]=d.useState(null);v&&(n=!0);let b=$e("Listbox.Options"),h=Ge("Listbox.Options"),x=Ft(b.optionsElement),D=go(),[j,R]=xo(p,I,D!==null?(D&be.Open)===be.Open:b.listboxState===0);mo(j,b.buttonElement,h.closeListbox);let N=b.__demoMode?!1:i&&b.listboxState===0;bo(N,x);let M=b.__demoMode?!1:i&&b.listboxState===0;co(M,{allowed:d.useCallback(()=>[b.buttonElement,b.optionsElement],[b.buttonElement,b.optionsElement])});let S=b.listboxState!==0,_=Lo(S,b.buttonElement)?!1:j,E=j&&b.listboxState===1,T=je(E,b.value),F=g(c=>b.compare(T,c)),y=d.useMemo(()=>{var c;if(v==null||!((c=v==null?void 0:v.to)!=null&&c.includes("selection")))return null;let L=b.options.findIndex($=>F($.dataRef.current.value));return L===-1&&(L=0),L},[v,b.options]),q=(()=>{if(v==null)return;if(y===null)return{...v,inner:void 0};let c=Array.from(b.listRef.current.values());return{...v,inner:{listRef:{current:c},index:y}}})(),[J,C]=so(q),B=uo(),X=ie(t,v?J:null,h.setOptionsElement,s),Z=wt();d.useEffect(()=>{var c;let L=b.optionsElement;L&&b.listboxState===0&&L!==((c=ro(L))==null?void 0:c.activeElement)&&(L==null||L.focus({preventScroll:!0}))},[b.listboxState,b.optionsElement]);let ee=g(c=>{var L,$;switch(Z.dispose(),c.key){case w.Space:if(b.searchQuery!=="")return c.preventDefault(),c.stopPropagation(),h.search(c.key);case w.Enter:if(c.preventDefault(),c.stopPropagation(),b.activeOptionIndex!==null){let{dataRef:K}=b.options[b.activeOptionIndex];h.onChange(K.current.value)}b.mode===0&&(te.flushSync(()=>h.closeListbox()),(L=b.buttonElement)==null||L.focus({preventScroll:!0}));break;case oe(b.orientation,{vertical:w.ArrowDown,horizontal:w.ArrowRight}):return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Next);case oe(b.orientation,{vertical:w.ArrowUp,horizontal:w.ArrowLeft}):return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Previous);case w.Home:case w.PageUp:return c.preventDefault(),c.stopPropagation(),h.goToOption(V.First);case w.End:case w.PageDown:return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Last);case w.Escape:c.preventDefault(),c.stopPropagation(),te.flushSync(()=>h.closeListbox()),($=b.buttonElement)==null||$.focus({preventScroll:!0});return;case w.Tab:c.preventDefault(),c.stopPropagation(),te.flushSync(()=>h.closeListbox()),Fo(b.buttonElement,c.shiftKey?ge.Previous:ge.Next);break;default:c.key.length===1&&(h.search(c.key),Z.setTimeout(()=>h.clearSearch(),350));break}}),le=(r=b.buttonElement)==null?void 0:r.id,se=d.useMemo(()=>({open:b.listboxState===0}),[b.listboxState]),k=ve(v?B():{},{id:f,ref:X,"aria-activedescendant":b.activeOptionIndex===null||(o=b.options[b.activeOptionIndex])==null?void 0:o.id,"aria-multiselectable":b.mode===1?!0:void 0,"aria-labelledby":le,"aria-orientation":b.orientation,onKeyDown:ee,role:"listbox",tabIndex:b.listboxState===0?0:void 0,style:{...m.style,...C,"--button-width":Xe(b.buttonElement,!0).width},...yo(R)}),G=ae();return P.createElement(fo,{enabled:n?e.static||j:!1},P.createElement(Ue.Provider,{value:b.mode===1?b:{...b,isSelected:F}},G({ourProps:k,theirProps:m,slot:se,defaultTag:Ir,features:Sr,visible:_,name:"Listbox.Options"})))}let Cr="div";function Nr(e,t){let r=d.useId(),{id:o=`headlessui-listbox-option-${r}`,disabled:a=!1,value:f,...l}=e,n=d.useContext(So)===!0,i=$e("Listbox.Option"),p=Ge("Listbox.Option"),m=i.activeOptionIndex!==null?i.options[i.activeOptionIndex].id===o:!1,v=i.isSelected(f),I=d.useRef(null),s=Do(I),b=Le({disabled:a,value:f,domRef:I,get textValue(){return s()}}),h=ie(t,I,T=>{T?i.listRef.current.set(o,T):i.listRef.current.delete(o)});re(()=>{if(!i.__demoMode&&i.listboxState===0&&m&&i.activationTrigger!==0)return We().requestAnimationFrame(()=>{var T,F;(F=(T=I.current)==null?void 0:T.scrollIntoView)==null||F.call(T,{block:"nearest"})})},[I,m,i.__demoMode,i.listboxState,i.activationTrigger,i.activeOptionIndex]),re(()=>{if(!n)return p.registerOption(o,b)},[b,o,n]);let x=g(T=>{var F;if(a)return T.preventDefault();p.onChange(f),i.mode===0&&(te.flushSync(()=>p.closeListbox()),(F=i.buttonElement)==null||F.focus({preventScroll:!0}))}),D=g(()=>{if(a)return p.goToOption(V.Nothing);p.goToOption(V.Specific,o)}),j=no(),R=g(T=>{j.update(T),!a&&(m||p.goToOption(V.Specific,o,0))}),N=g(T=>{j.wasMoved(T)&&(a||m||p.goToOption(V.Specific,o,0))}),M=g(T=>{j.wasMoved(T)&&(a||m&&p.goToOption(V.Nothing))}),S=d.useMemo(()=>({active:m,focus:m,selected:v,disabled:a,selectedOption:v&&n}),[m,v,a,n]),_=n?{}:{id:o,ref:h,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":v,disabled:void 0,onClick:x,onFocus:D,onPointerEnter:R,onMouseEnter:R,onPointerMove:N,onMouseMove:N,onPointerLeave:M,onMouseLeave:M},E=ae();return!v&&n?null:E({ourProps:_,theirProps:l,slot:S,defaultTag:Cr,name:"Listbox.Option"})}let Rr=d.Fragment;function Tr(e,t){let{options:r,placeholder:o,...a}=e,f={ref:ie(t)},l=$e("ListboxSelectedOption"),n=d.useMemo(()=>({}),[]),i=l.value===void 0||l.value===null||l.mode===1&&Array.isArray(l.value)&&l.value.length===0,p=ae();return P.createElement(So.Provider,{value:!0},p({ourProps:f,theirProps:{...a,children:P.createElement(P.Fragment,null,o&&i?o:r)},slot:n,defaultTag:Rr,name:"ListboxSelectedOption"}))}let $r=ne(hr),Eo=ne(Or),wr=Mt,Co=ne(Er),No=ne(Nr),Vr=ne(Tr),Mr=Object.assign($r,{Button:Eo,Label:wr,Options:Co,Option:No,SelectedOption:Vr});var Pr=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(Pr||{});let jr={0(e,t){let r=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:jt(r,o=>o.element.current)}},1(e,t){let r=e.options.slice(),o=e.options.findIndex(a=>a.id===t.id);return o===-1?e:(r.splice(o,1),{...e,options:r})}},Gt=d.createContext(null);Gt.displayName="RadioGroupDataContext";function Ut(e){let t=d.useContext(Gt);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ut),r}return t}let Ht=d.createContext(null);Ht.displayName="RadioGroupActionsContext";function Kt(e){let t=d.useContext(Ht);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Kt),r}return t}function Fr(e,t){return oe(t.type,jr,e,t)}let kr="div";function Lr(e,t){let r=d.useId(),o=De(),{id:a=`headlessui-radiogroup-${r}`,value:f,form:l,name:n,onChange:i,by:p,disabled:m=o||!1,defaultValue:v,...I}=e,s=kt(p),[b,h]=d.useReducer(Fr,{options:[]}),x=b.options,[D,j]=qe(),[R,N]=oo(),M=d.useRef(null),S=ie(M,t),_=Rt(v),[E,T]=Tt(f,i,_),F=d.useMemo(()=>x.find(k=>!k.propsRef.current.disabled),[x]),y=d.useMemo(()=>x.some(k=>s(k.propsRef.current.value,E)),[x,E]),q=g(k=>{var G;if(m||s(k,E))return!1;let c=(G=x.find(L=>s(L.propsRef.current.value,k)))==null?void 0:G.propsRef.current;return c!=null&&c.disabled?!1:(T==null||T(k),!0)}),J=g(k=>{let G=M.current;if(!G)return;let c=ro(G),L=x.filter($=>$.propsRef.current.disabled===!1).map($=>$.element.current);switch(k.key){case w.Enter:to(k.currentTarget);break;case w.ArrowLeft:case w.ArrowUp:if(k.preventDefault(),k.stopPropagation(),Jt(L,ge.Previous|ge.WrapAround)===Wt.Success){let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break;case w.ArrowRight:case w.ArrowDown:if(k.preventDefault(),k.stopPropagation(),Jt(L,ge.Next|ge.WrapAround)===Wt.Success){let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break;case w.Space:{k.preventDefault(),k.stopPropagation();let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break}}),C=g(k=>(h({type:0,...k}),()=>h({type:1,id:k.id}))),B=d.useMemo(()=>({value:E,firstOption:F,containsCheckedOption:y,disabled:m,compare:s,...b}),[E,F,y,m,s,b]),X=d.useMemo(()=>({registerOption:C,change:q}),[C,q]),Z={ref:S,id:a,role:"radiogroup","aria-labelledby":D,"aria-describedby":R,onKeyDown:J},ee=d.useMemo(()=>({value:E}),[E]),le=d.useCallback(()=>{if(_!==void 0)return q(_)},[q,_]),se=ae();return P.createElement(N,{name:"RadioGroup.Description"},P.createElement(j,{name:"RadioGroup.Label"},P.createElement(Ht.Provider,{value:X},P.createElement(Gt.Provider,{value:B},n!=null&&P.createElement($t,{disabled:m,data:{[n]:E||"on"},overrides:{type:"radio",checked:E!=null},form:l,onReset:le}),se({ourProps:Z,theirProps:I,slot:ee,defaultTag:kr,name:"RadioGroup"})))))}let Dr="div";function qr(e,t){var r;let o=Ut("RadioGroup.Option"),a=Kt("RadioGroup.Option"),f=d.useId(),{id:l=`headlessui-radiogroup-option-${f}`,value:n,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=d.useRef(null),I=ie(v,t),[s,b]=qe(),[h,x]=oo(),D=Le({value:n,disabled:i});re(()=>a.registerOption({id:l,element:v,propsRef:D}),[l,a,v,D]);let j=g(q=>{var J;if(Be(q.currentTarget))return q.preventDefault();a.change(n)&&((J=v.current)==null||J.focus())}),R=((r=o.firstOption)==null?void 0:r.id)===l,{isFocusVisible:N,focusProps:M}=Ee({autoFocus:p}),{isHovered:S,hoverProps:_}=Ce({isDisabled:i}),E=o.compare(o.value,n),T=ve({ref:I,id:l,role:"radio","aria-checked":E?"true":"false","aria-labelledby":s,"aria-describedby":h,"aria-disabled":i?!0:void 0,tabIndex:i?-1:E||!o.containsCheckedOption&&R?0:-1,onClick:i?void 0:j,autoFocus:p},M,_),F=d.useMemo(()=>({checked:E,disabled:i,active:N,hover:S,focus:N,autofocus:p}),[E,i,S,N,p]),y=ae();return P.createElement(x,{name:"RadioGroup.Description"},P.createElement(b,{name:"RadioGroup.Label"},y({ourProps:T,theirProps:m,slot:F,defaultTag:Dr,name:"RadioGroup.Option"})))}let Br="span";function Ar(e,t){var r;let o=Ut("Radio"),a=Kt("Radio"),f=d.useId(),l=Pt(),n=De(),{id:i=l||`headlessui-radio-${f}`,value:p,disabled:m=o.disabled||n||!1,autoFocus:v=!1,...I}=e,s=d.useRef(null),b=ie(s,t),h=Ne(),x=Vt(),D=Le({value:p,disabled:m});re(()=>a.registerOption({id:i,element:s,propsRef:D}),[i,a,s,D]);let j=g(y=>{var q;if(Be(y.currentTarget))return y.preventDefault();a.change(p)&&((q=s.current)==null||q.focus())}),{isFocusVisible:R,focusProps:N}=Ee({autoFocus:v}),{isHovered:M,hoverProps:S}=Ce({isDisabled:m}),_=((r=o.firstOption)==null?void 0:r.id)===i,E=o.compare(o.value,p),T=ve({ref:b,id:i,role:"radio","aria-checked":E?"true":"false","aria-labelledby":h,"aria-describedby":x,"aria-disabled":m?!0:void 0,tabIndex:m?-1:E||!o.containsCheckedOption&&_?0:-1,autoFocus:v,onClick:m?void 0:j},N,S),F=d.useMemo(()=>({checked:E,disabled:m,hover:M,focus:R,autofocus:v}),[E,m,M,R,v]);return ae()({ourProps:T,theirProps:I,slot:F,defaultTag:Br,name:"Radio"})}let Gr=ne(Lr),Ur=ne(qr),zt=ne(Ar),Hr=Mt,Kr=Mo,Ro=Object.assign(Gr,{Option:Ur,Radio:zt,Label:Hr,Description:Kr});const Ye=({id:e,children:t})=>u.jsx("p",{id:`${e}-description`,className:"paragraph-100 text-neutral-700",children:t});try{Ye.displayName="FormFieldDescription",Ye.__docgenInfo={description:"",displayName:"FormFieldDescription",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}}}catch{}const Ze=({children:e})=>u.jsxs("div",{className:"mt-0.5 flex items-center gap-1",children:[u.jsx(To,{className:"h-3 w-3 fill-danger-500"}),u.jsx("p",{className:"paragraph-100 text-danger-500",children:e})]});try{Ze.displayName="FormFieldErrorMessage",Ze.__docgenInfo={description:"",displayName:"FormFieldErrorMessage",props:{}}}catch{}const et=({htmlFor:e,children:t,optional:r})=>u.jsxs("div",{className:"flex items-baseline gap-1 text-neutral-800",children:[u.jsx("label",{htmlFor:e,className:"headline-400",children:t}),r?u.jsx("div",{className:"paragraph-100",children:"(Optional)"}):null]});try{et.displayName="FormFieldLabel",et.__docgenInfo={description:"",displayName:"FormFieldLabel",props:{htmlFor:{defaultValue:null,description:"",name:"htmlFor",required:!0,type:{name:"string"}},optional:{defaultValue:null,description:"",name:"optional",required:!1,type:{name:"boolean"}}}}}catch{}const tt=({children:e})=>u.jsx("div",{className:"mb-2 flex flex-col gap-1",children:e});try{tt.displayName="FormFieldLabelGroup",tt.__docgenInfo={description:"",displayName:"FormFieldLabelGroup",props:{}}}catch{}const ot=({children:e,value:t,disabled:r})=>u.jsx(zt,{value:t,className:"max-w-fit cursor-pointer focus:outline-none",disabled:r,children:({checked:o,disabled:a})=>u.jsxs("div",{className:"flex items-center gap-3",children:[o?u.jsx("span",{className:H("relative inline-block h-4 w-4 rounded-full bg-primary-400 hover:bg-primary-500 active:bg-primary-600",a&&"bg-neutral-100 hover:bg-neutral-100 active:bg-neutral-100"),children:u.jsx("span",{className:H("absolute inset-0 m-auto block h-2 w-2 rounded-full bg-neutral-0",a&&"bg-neutral-500")})}):u.jsx("span",{className:H("inline-block h-4 w-4 rounded-full border border-neutral-400 hover:border-neutral-600 active:border-neutral-500 active:bg-neutral-100",a&&"border-0 bg-neutral-100")}),u.jsx("p",{className:H("paragraph-200",a&&"text-neutral-600"),children:e})]})});try{ot.displayName="RadioInputOption",ot.__docgenInfo={description:"",displayName:"RadioInputOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Fe=({id:e,children:t,value:r,onChange:o})=>u.jsx(Ro,{id:e,value:r,onChange:o,children:t});Fe.Option=ot;try{Fe.displayName="RadioInput",Fe.__docgenInfo={description:"",displayName:"RadioInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}}}}}catch{}const zr="target-field",Qr=H("[.group.form-field-group_&:first-child_.target-field]:rounded-r-none [.group.form-field-group_&:first-child_.target-field]:border-r-0","[.group.form-field-group_&:not(:first-child):not(:last-child)_.target-field]:rounded-none [.group.form-field-group_&:not(:first-child):not(:last-child)_.target-field]:border-r-0","[.group.form-field-group_&:last-child_.target-field]:border-l-1 [.group.form-field-group_&:last-child_.target-field]:rounded-l-none"),rt=({ariaDescribedBy:e,type:t="text",LeftIcon:r,readOnly:o,autoSelect:a,error:f,disabled:l,className:n,...i})=>{const p=d.useRef(null),m=()=>{a&&p.current&&p.current.select()};return u.jsxs("div",{className:H("relative w-full",Qr),children:[r?u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3","aria-hidden":"true",children:u.jsx(r,{className:"text-gray-400 h-3.5 w-3.5 fill-neutral-600"})}):null,u.jsx("input",{ref:p,"aria-describedby":e,onMouseOver:m,onFocus:m,onClick:m,type:t,className:H(zr,"paragraph-100 relative block h-8 w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",r&&"pl-9",o&&"bg-primary-50",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!f&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",f&&!l&&"border-danger-500",n),readOnly:o,disabled:l,...i})]})};try{rt.displayName="TextInput",rt.__docgenInfo={description:"",displayName:"TextInput",props:{type:{defaultValue:{value:"text"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"text"'},{value:'"email"'},{value:'"date"'},{value:'"password"'}]}},autoSelect:{defaultValue:null,description:"",name:"autoSelect",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}}}}}catch{}const nt=({id:e,value:t,onChange:r,placeholder:o,ariaDescribedBy:a,error:f,disabled:l,rows:n,cols:i,className:p})=>u.jsx("textarea",{id:e,name:e,value:t,onChange:r,placeholder:o,"aria-describedby":a,className:H("paragraph-100 block min-h-[2rem] w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!f&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",f&&!l&&"border-danger-500",p),disabled:l,rows:n,cols:i});try{nt.displayName="Textarea",nt.__docgenInfo={description:"",displayName:"Textarea",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},rows:{defaultValue:null,description:"",name:"rows",required:!1,type:{name:"number"}},cols:{defaultValue:null,description:"",name:"cols",required:!1,type:{name:"number"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const Jr={left:"text-left",center:"text-center",right:"text-right"},at=({id:e,placeholder:t,value:r,min:o,max:a,onChange:f,ariaDescribedBy:l,LeftIcon:n,textAlign:i="left",readOnly:p,error:m,disabled:v})=>u.jsxs("div",{className:"relative w-full",children:[n?u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3","aria-hidden":"true",children:u.jsx(n,{className:"text-gray-400 h-4 w-4 fill-neutral-600"})}):null,u.jsx("input",{id:e,name:e,value:r,readOnly:p,onChange:f,placeholder:t,"aria-describedby":l,type:"number",min:o,max:a,className:H("paragraph-100 block w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",Jr[i],n&&"pl-9",p&&"bg-neutral-100",v&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!m&&!v&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",m&&!v&&"border-danger-500"),disabled:v})]});try{at.displayName="NumberInput",at.__docgenInfo={description:"",displayName:"NumberInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}},textAlign:{defaultValue:{value:"left"},description:"",name:"textAlign",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"left"'},{value:'"right"'}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((event: ChangeEvent) => void)"}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!0,type:{name:"string"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},min:{defaultValue:null,description:"",name:"min",required:!1,type:{name:"number"}},max:{defaultValue:null,description:"",name:"max",required:!1,type:{name:"number"}}}}}catch{}const lt=({children:e})=>u.jsx(Co,{className:"absolute mt-1 max-h-60 w-full list-none overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",children:e});try{lt.displayName="ListboxOptions",lt.__docgenInfo={description:"",displayName:"ListboxOptions",props:{}}}catch{}const it=({children:e,badgeType:t="neutral"})=>u.jsx("div",{className:"flex items-center",children:u.jsx(ho,{type:t,children:e})});try{it.displayName="ListboxBadgeOption",it.__docgenInfo={description:"",displayName:"ListboxBadgeOption",props:{badgeType:{defaultValue:{value:"neutral"},description:"",name:"badgeType",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"neutral"'},{value:'"violet"'},{value:'"green"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}}}}}catch{}const st=({children:e,LeftIcon:t})=>u.jsxs("div",{className:"flex items-center gap-2",children:[t?u.jsx(t,{className:"h-3 w-3 fill-neutral-500 ui-selected:fill-primary-500"}):null,u.jsx("div",{className:"paragraph-100",children:e})]});try{st.displayName="ListboxTextOption",st.__docgenInfo={description:"",displayName:"ListboxTextOption",props:{LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}}}}}catch{}const Ve={base:"relative cursor-pointer px-3 py-2 ",selected:"bg-primary-100 text-primary-500 before:absolute before:bottom-0 before:left-0 before:top-0 before:block before:w-[2px] before:rounded-r-md before:bg-primary-400",active:"bg-neutral-50 bg-primary-100",disabled:"cursor-not-allowed bg-neutral-50 text-neutral-400"},Ie=({value:e,disabled:t,children:r})=>u.jsx(No,{value:e,as:d.Fragment,disabled:t,children:({active:o,selected:a})=>u.jsx("li",{className:H(Ve.base,o&&Ve.active,a&&Ve.selected,t&&Ve.disabled),children:r})});Ie.BadgeOption=it;Ie.TextOption=st;try{Ie.displayName="ListboxOption",Ie.__docgenInfo={description:"",displayName:"ListboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const ut=({placeholder:e,value:t,badgeType:r="neutral"})=>t?u.jsx(ho,{type:r,children:t}):u.jsx("div",{className:"paragraph-100 text-neutral-600",children:e});try{ut.displayName="ListboxButtonBadgeValue",ut.__docgenInfo={description:"",displayName:"ListboxButtonBadgeValue",props:{placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | null"}},badgeType:{defaultValue:{value:"neutral"},description:"",name:"badgeType",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"neutral"'},{value:'"violet"'},{value:'"green"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}}}}}catch{}const dt=({placeholder:e,value:t})=>t?u.jsx("div",{className:"paragraph-100",children:t}):u.jsx("div",{className:"paragraph-100 text-neutral-600 group-hover:text-neutral-700",children:e});try{dt.displayName="ListboxButtonTextValue",dt.__docgenInfo={description:"",displayName:"ListboxButtonTextValue",props:{placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | null"}}}}}catch{}const Se=({children:e,disabled:t})=>u.jsxs(Eo,{disabled:t,className:H("group flex h-8 w-full cursor-pointer items-center rounded border border-neutral-400 bg-neutral-0 py-2 pl-3 pr-8 outline-none hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",t&&"cursor-not-allowed border-neutral-300 bg-neutral-100 text-neutral-600 hover:border-neutral-300"),children:[e,u.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100 focus:outline-none",children:u.jsx(ke,{className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})})]});Se.BadgeValue=ut;Se.TextValue=dt;try{Se.displayName="ListboxButton",Se.__docgenInfo={description:"",displayName:"ListboxButton",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Wr=H("[.group.form-field-group_&:first-child_button]:rounded-r-none [.group.form-field-group_&:first-child_button]:border-r-0","[.group.form-field-group_&:not(:first-child):not(:last-child)_button]:rounded-none [.group.form-field-group_&:not(:first-child):not(:last-child)_button]:border-r-0","[.group.form-field-group_&:last-child_button]:rounded-l-none"),xe=({children:e,value:t,onChange:r,className:o})=>u.jsx(Mr,{value:t,onChange:r,children:u.jsx("div",{className:H("relative w-full",Wr,o),children:e})});xe.Button=Se;xe.Options=lt;xe.Option=Ie;try{xe.displayName="Listbox",xe.__docgenInfo={description:"",displayName:"Listbox",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const ct=({value:e,children:t})=>u.jsx(Te,{value:e,className:"paragraph-100 flex cursor-pointer items-center gap-1 px-3 py-2 text-neutral-700 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{ct.displayName="MultiComboboxCustomOption",ct.__docgenInfo={description:"",displayName:"MultiComboboxCustomOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const pt=({children:e})=>u.jsx("div",{className:"px-3 py-2 ui-selected:bg-primary-100",children:e});try{pt.displayName="MultiComboboxEmptyOption",pt.__docgenInfo={description:"",displayName:"MultiComboboxEmptyOption",props:{}}}catch{}const mt=({id:e,displayValue:t,placeholder:r,onChange:o,showButton:a=!0,disabled:f=!1,...l})=>u.jsxs("div",{className:"relative",children:[u.jsx(qt,{id:e,name:e,placeholder:r,displayValue:()=>t,onChange:o,className:H("paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200",f&&"cursor-not-allowed border-neutral-300 bg-neutral-100 text-neutral-600 hover:border-neutral-300"),...l}),a&&!f?u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{name:"caret-down",className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})}):null]});try{mt.displayName="MultiComboboxInput",mt.__docgenInfo={description:"",displayName:"MultiComboboxInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},displayValue:{defaultValue:null,description:"",name:"displayValue",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},showButton:{defaultValue:{value:"true"},description:"",name:"showButton",required:!1,type:{name:"boolean"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"string"}},autoFocus:{defaultValue:null,description:"",name:"autoFocus",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | ((bag: InputRenderPropArg) => string)"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},as:{defaultValue:null,description:"",name:"as",required:!1,type:{name:"enum",value:[{value:'"input"'}]}},refName:{defaultValue:null,description:"",name:"refName",required:!1,type:{name:"string"}}}}}catch{}const bt=({value:e,children:t})=>u.jsxs(Te,{value:e,className:"relative flex cursor-pointer items-center px-3 py-2 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:[t,u.jsx("div",{className:"absolute inset-y-0 right-3 hidden items-center fill-primary-500 ui-selected:flex",children:u.jsx($o,{})})]});try{bt.displayName="MultiComboboxOption",bt.__docgenInfo={description:"",displayName:"MultiComboboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const ft=({children:e,className:t})=>u.jsx(Bt,{hold:!0,className:H("absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",t),children:e});try{ft.displayName="MultiComboboxOptions",ft.__docgenInfo={description:"",displayName:"MultiComboboxOptions",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const vt=({children:e})=>u.jsx("div",{className:"flex flex-wrap gap-2",children:e});try{vt.displayName="MultiComboboxResultsBadges",vt.__docgenInfo={description:"",displayName:"MultiComboboxResultsBadges",props:{}}}catch{}const gt=({children:e})=>u.jsx("div",{className:"paragraph-100 mt-2 text-neutral-900",children:e});try{gt.displayName="MultiComboboxResultsLabel",gt.__docgenInfo={description:"",displayName:"MultiComboboxResultsLabel",props:{}}}catch{}const xt=({children:e})=>u.jsx("div",{className:"flex flex-wrap gap-2",children:e});try{xt.displayName="MultiComboboxResultsTags",xt.__docgenInfo={description:"",displayName:"MultiComboboxResultsTags",props:{}}}catch{}const yt=({children:e})=>u.jsx("div",{className:"paragraph-100",children:e});try{yt.displayName="MultiComboboxResultsText",yt.__docgenInfo={description:"",displayName:"MultiComboboxResultsText",props:{}}}catch{}const fe=({children:e})=>u.jsx("div",{className:"flex flex-col gap-2",children:e});fe.Label=gt;fe.Text=yt;fe.Badges=vt;fe.Tags=xt;try{fe.displayName="MultiComboboxResults",fe.__docgenInfo={description:"",displayName:"MultiComboboxResults",props:{}}}catch{}const ce=({value:e,onChange:t,children:r})=>u.jsx(Io,{multiple:!0,value:e,onChange:t,children:u.jsx("div",{className:"relative",children:r})});ce.Input=mt;ce.Options=ft;ce.Option=bt;ce.CustomOption=ct;ce.EmptyOption=pt;ce.Results=fe;try{ce.displayName="MultiCombobox",ce.__docgenInfo={description:"",displayName:"MultiCombobox",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue[]"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue[]) => void"}}}}}catch{}const ht=({value:e,children:t})=>u.jsx(Te,{value:e,className:"paragraph-100 flex cursor-pointer items-center gap-1 px-3 py-2 text-neutral-700 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{ht.displayName="SingleComboboxCustomOption",ht.__docgenInfo={description:"",displayName:"SingleComboboxCustomOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const _t=({children:e})=>u.jsx("div",{className:"px-3 py-2 ui-selected:bg-primary-100",children:e});try{_t.displayName="SingleComboboxEmptyOption",_t.__docgenInfo={description:"",displayName:"SingleComboboxEmptyOption",props:{}}}catch{}const Ot=({id:e,displayValue:t,placeholder:r,onChange:o,showButton:a=!0})=>u.jsxs("div",{className:"relative",children:[u.jsx(qt,{id:e,name:e,placeholder:r,displayValue:t,onChange:o,className:"paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200 disabled:border-neutral-300 disabled:bg-neutral-100 disabled:text-neutral-600"}),a?u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{name:"caret-down",className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})}):null]});try{Ot.displayName="SingleComboboxInput",Ot.__docgenInfo={description:"",displayName:"SingleComboboxInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},displayValue:{defaultValue:null,description:"",name:"displayValue",required:!1,type:{name:"((item: TValue) => string)"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},showButton:{defaultValue:{value:"true"},description:"",name:"showButton",required:!1,type:{name:"boolean"}}}}}catch{}const It=({children:e})=>u.jsx(Bt,{hold:!0,className:"absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",children:e});try{It.displayName="SingleComboboxOptions",It.__docgenInfo={description:"",displayName:"SingleComboboxOptions",props:{}}}catch{}const St=({onUnselect:e,children:t})=>u.jsx("div",{className:"relative",children:u.jsxs("div",{className:"paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200",children:[u.jsx(Uo,{onClick:e,children:t}),u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})})]})});try{St.displayName="SingleComboboxResultInput",St.__docgenInfo={description:"",displayName:"SingleComboboxResultInput",props:{onUnselect:{defaultValue:null,description:"",name:"onUnselect",required:!0,type:{name:"() => void"}}}}}catch{}const Et=({value:e,children:t})=>u.jsx(Te,{value:e,className:"relative flex cursor-pointer items-center px-3 py-2 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{Et.displayName="SingleComboboxOption",Et.__docgenInfo={description:"",displayName:"SingleComboboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const pe=({value:e,onChange:t,children:r,disabled:o})=>u.jsx(Io,{value:e,onChange:t,disabled:o,children:u.jsx("div",{className:"relative",children:r})});pe.Input=Ot;pe.ResultInput=St;pe.Options=It;pe.Option=Et;pe.EmptyOption=_t;pe.CustomOption=ht;try{pe.displayName="SingleCombobox",pe.__docgenInfo={description:"",displayName:"SingleCombobox",props:{value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"TValue"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue) => void"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Ct=({children:e})=>u.jsx("div",{className:"form-field-group group flex w-full flex-row",children:e});try{Ct.displayName="FormFieldGroup",Ct.__docgenInfo={description:"",displayName:"FormFieldGroup",props:{}}}catch{}const Nt=({ariaDescribedBy:e,readOnly:t,autoSelect:r,onClear:o,error:a,value:f,disabled:l,className:n,...i})=>{const p=d.useRef(null),m=!t&&!l&&f!==void 0&&f!=="",v=d.useCallback(()=>{r&&p.current&&p.current.select()},[r]),I=d.useCallback(s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),s.stopPropagation(),o())},[o]);return u.jsxs("div",{className:H("relative w-full"),children:[u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3","aria-hidden":"true",children:u.jsx(wo,{className:"text-gray-400 h-3.5 w-3.5 fill-neutral-600"})}),u.jsx("input",{ref:p,"aria-describedby":e,onMouseOver:v,onFocus:v,onClick:v,type:"search",className:H("paragraph-100 relative block h-8 w-full rounded border border-neutral-400 py-2 pl-9 pr-8 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",t&&"bg-neutral-100",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!a&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",a&&!l&&"border-danger-500",n),readOnly:t,disabled:l,value:f,...i}),m?u.jsx("div",{className:"absolute inset-y-0 right-0 z-10 flex items-center justify-center pr-2",children:u.jsx("button",{type:"button","aria-label":"Clear search input",tabIndex:0,onClick:o,onKeyDown:I,className:"rounded bg-neutral-100 p-0.5 hover:bg-neutral-200",children:u.jsx(Vo,{className:"h-3 w-3 fill-neutral-600"})})}):null]})};try{Nt.displayName="SearchInput",Nt.__docgenInfo={description:"",displayName:"SearchInput",props:{autoSelect:{defaultValue:null,description:"",name:"autoSelect",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},onClear:{defaultValue:null,description:"",name:"onClear",required:!0,type:{name:"() => void"}}}}}catch{}const Je={base:"group relative flex items-center gap-3 rounded-lg bg-neutral-0 border p-4 border-neutral-300 hover:border-primary-600 hover:bg-primary-50 cursor-pointer focus:outline-none data-[focus]:outline-2 data-[focus]:outline-primary-200",checked:"border-primary-600 bg-primary-600 hover:bg-primary-600 hover:text-neutral-0",disabled:"bg-neutral-100 group-hover:border-neutral-300 group-hover:bg-neutral-100 hover:border-neutral-300 hover:bg-neutral-100 cursor-not-allowed"},Me={base:"relative inline-block h-4 w-4 shrink-0 rounded-full bg-neutral-0 border border-neutral-300",unchecked:"group-hover:border-primary-600 group-hover:bg-neutral-0",checked:"border-transparent",disabled:"bg-neutral-200 border-neutral-200 group-hover:border-neutral-200 group-hover:bg-neutral-200"},Xr=({children:e})=>u.jsx("h2",{className:"headline-500 text-neutral-900 group-[.is-checked]:text-neutral-0 group-[.is-disabled]:text-neutral-500",children:e}),Yr=({children:e})=>u.jsx("p",{className:"paragraph-200 text-neutral-800 group-[.is-checked]:text-neutral-0 group-[.is-disabled]:text-neutral-500",children:e}),me=({children:e,value:t,disabled:r,className:o})=>u.jsx(zt,{value:t,disabled:r,as:d.Fragment,children:({checked:a,disabled:f})=>u.jsxs("div",{className:H(Je.base,a&&H("is-checked",Je.checked),f&&H("is-disabled",Je.disabled)),children:[u.jsx("div",{className:H(Me.base,!a&&Me.unchecked,a&&Me.checked,f&&Me.disabled),children:a&&u.jsx("div",{className:H("absolute inset-0 m-auto block h-2 w-2 rounded-full bg-primary-600",f&&"bg-neutral-500")})}),u.jsx("div",{className:H("flex flex-col",o),children:e})]})});me.Title=Xr;me.Description=Yr;try{me.displayName="RadioBoxOption",me.__docgenInfo={description:"",displayName:"RadioBoxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}try{me.Title.displayName="RadioBoxOption.Title",me.Title.__docgenInfo={description:"",displayName:"RadioBoxOption.Title",props:{}}}catch{}try{me.Description.displayName="RadioBoxOption.Description",me.Description.__docgenInfo={description:"",displayName:"RadioBoxOption.Description",props:{}}}catch{}const ye=({id:e,value:t,children:r,onChange:o,className:a})=>u.jsx(Ro,{id:e,value:t,onChange:o,className:a,children:r});ye.Option=me;try{ye.displayName="RadioBox",ye.__docgenInfo={description:"",displayName:"RadioBox",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}try{ye.Option.displayName="RadioBox.Option",ye.Option.__docgenInfo={description:"",displayName:"RadioBox.Option",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const Y=({children:e})=>u.jsx("div",{className:"w-full",children:e});Y.LabelGroup=tt;Y.Label=et;Y.Description=Ye;Y.ErrorMessage=Ze;Y.TextInput=rt;Y.Textarea=nt;Y.RadioInput=Fe;Y.NumberInput=at;Y.Listbox=xe;Y.MultiCombobox=ce;Y.SingleCombobox=pe;Y.Group=Ct;Y.SearchInput=Nt;Y.RadioBox=ye;try{Y.displayName="FormField",Y.__docgenInfo={description:"",displayName:"FormField",props:{}}}catch{}export{Y as F,ye as R,pe as S,Ct as a}; +import{j as u}from"./jsx-runtime-C798UXYj.js";import{e as To,as as ke,gz as $o,g as wo,j as Vo}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as H}from"./class-names-DnY5YZNL.js";import{$ as Ee,a as Ce,w as Zt,e as eo}from"./use-resolve-button-type-D_6M6Au0.js";import{r as d,R as P}from"./index-0d5eMwbi.js";import{l as Rt,T as Tt,j as $t,p as to}from"./form-fields-B2NmhAAW.js";import{o as g,M as Pe,L as ne,u as oe,n as re,D as ae,y as ie,p as wt,W as ve,s as Le,a as We}from"./use-sync-refs-DqQDZvJ6.js";import{a as De,U as Vt,H as Mo,w as oo}from"./description-D9Ee5mtv.js";import{Q as Mt,K as qe,u as Pt,I as Ne}from"./label-BBnH-iCi.js";import{r as Be}from"./bugs-DpEN4NTH.js";import{_ as jt,A as Po,h as jo,j as Fo,F as ge,P as Jt,T as Wt}from"./focus-management-DaVlPEX1.js";import{o as w,u as ro}from"./keyboard-C2Ifhsxt.js";import{r as te}from"./index-BoyHNU0R.js";import{F as ko,u as no,c as V,f as _e,s as Lo,a as Do}from"./use-text-value-ehRDfXkw.js";import{M as ao,y as lo,x as io,R as so,b as uo,d as Xe,F as qo}from"./floating-ERp4LevH.js";import{y as co}from"./use-inert-others-CzqV763I.js";import{R as po,n as Ft,m as mo,f as bo,r as fo,a as Bo}from"./portal-CLj4HHuk.js";import{c as vo,i as be,u as go,x as xo,R as yo}from"./open-closed-DC3t9YEZ.js";import{B as ho}from"./badge-BIezdMmM.js";import{u as Ao}from"./index-BgfbgFhO.js";import{E as Go}from"./use-event-listener-CochUv0b.js";import{m as Xt,r as Yt}from"./active-element-history-DI7yoVCB.js";import{T as Uo}from"./tag-C9CGXtt3.js";function Ho(e,t){return e!==null&&t!==null&&typeof e=="object"&&typeof t=="object"&&"id"in e&&"id"in t?e.id===t.id:e===t}function kt(e=Ho){return d.useCallback((t,r)=>{if(typeof e=="string"){let o=e;return(t==null?void 0:t[o])===(r==null?void 0:r[o])}return e(t,r)},[e])}function _o(e){let t=d.useRef({value:"",selectionStart:null,selectionEnd:null});return Go(e,"blur",r=>{let o=r.target;o instanceof HTMLInputElement&&(t.current={value:o.value,selectionStart:o.selectionStart,selectionEnd:o.selectionEnd})}),g(()=>{if(document.activeElement!==e&&e instanceof HTMLInputElement&&e.isConnected){if(e.focus({preventScroll:!0}),e.value!==t.current.value)e.setSelectionRange(e.value.length,e.value.length);else{let{selectionStart:r,selectionEnd:o}=t.current;r!==null&&o!==null&&e.setSelectionRange(r,o)}t.current={value:"",selectionStart:null,selectionEnd:null}}})}function Ko({children:e,freeze:t}){let r=je(t,e);return P.createElement(P.Fragment,null,r)}function je(e,t){let[r,o]=d.useState(t);return!e&&r!==t&&o(t),e?r:t}var Lt=(e=>(e[e.Left=0]="Left",e[e.Right=2]="Right",e))(Lt||{}),zo=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(zo||{}),Qo=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(Qo||{}),Jo=(e=>(e[e.Pointer=0]="Pointer",e[e.Focus=1]="Focus",e[e.Other=2]="Other",e))(Jo||{}),Wo=(e=>(e[e.OpenCombobox=0]="OpenCombobox",e[e.CloseCombobox=1]="CloseCombobox",e[e.GoToOption=2]="GoToOption",e[e.SetTyping=3]="SetTyping",e[e.RegisterOption=4]="RegisterOption",e[e.UnregisterOption=5]="UnregisterOption",e[e.SetActivationTrigger=6]="SetActivationTrigger",e[e.UpdateVirtualConfiguration=7]="UpdateVirtualConfiguration",e[e.SetInputElement=8]="SetInputElement",e[e.SetButtonElement=9]="SetButtonElement",e[e.SetOptionsElement=10]="SetOptionsElement",e))(Wo||{});function ze(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=t(e.options.slice()),a=o.length>0&&o[0].dataRef.current.order!==null?o.sort((l,n)=>l.dataRef.current.order-n.dataRef.current.order):jt(o,l=>l.dataRef.current.domRef.current),f=r?a.indexOf(r):null;return f===-1&&(f=null),{options:a,activeOptionIndex:f}}let Xo={1(e){var t;return(t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===1?e:{...e,activeOptionIndex:null,comboboxState:1,isTyping:!1,activationTrigger:2,__demoMode:!1}},0(e){var t,r;if((t=e.dataRef.current)!=null&&t.disabled||e.comboboxState===0)return e;if((r=e.dataRef.current)!=null&&r.value){let o=e.dataRef.current.calculateIndex(e.dataRef.current.value);if(o!==-1)return{...e,activeOptionIndex:o,comboboxState:0,__demoMode:!1}}return{...e,comboboxState:0,__demoMode:!1}},3(e,t){return e.isTyping===t.isTyping?e:{...e,isTyping:t.isTyping}},2(e,t){var r,o,a,f;if((r=e.dataRef.current)!=null&&r.disabled||e.optionsElement&&!((o=e.dataRef.current)!=null&&o.optionsPropsRef.current.static)&&e.comboboxState===1)return e;if(e.virtual){let{options:p,disabled:m}=e.virtual,v=t.focus===V.Specific?t.idx:_e(t,{resolveItems:()=>p,resolveActiveIndex:()=>{var s,b;return(b=(s=e.activeOptionIndex)!=null?s:p.findIndex(h=>!m(h)))!=null?b:null},resolveDisabled:m,resolveId(){throw new Error("Function not implemented.")}}),I=(a=t.trigger)!=null?a:2;return e.activeOptionIndex===v&&e.activationTrigger===I?e:{...e,activeOptionIndex:v,activationTrigger:I,isTyping:!1,__demoMode:!1}}let l=ze(e);if(l.activeOptionIndex===null){let p=l.options.findIndex(m=>!m.dataRef.current.disabled);p!==-1&&(l.activeOptionIndex=p)}let n=t.focus===V.Specific?t.idx:_e(t,{resolveItems:()=>l.options,resolveActiveIndex:()=>l.activeOptionIndex,resolveId:p=>p.id,resolveDisabled:p=>p.dataRef.current.disabled}),i=(f=t.trigger)!=null?f:2;return e.activeOptionIndex===n&&e.activationTrigger===i?e:{...e,...l,isTyping:!1,activeOptionIndex:n,activationTrigger:i,__demoMode:!1}},4:(e,t)=>{var r,o,a;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:[...e.options,t.payload]};let f=t.payload,l=ze(e,i=>(i.push(f),i));e.activeOptionIndex===null&&(o=e.dataRef.current)!=null&&o.isSelected(t.payload.dataRef.current.value)&&(l.activeOptionIndex=l.options.indexOf(f));let n={...e,...l,activationTrigger:2};return(a=e.dataRef.current)!=null&&a.__demoMode&&e.dataRef.current.value===void 0&&(n.activeOptionIndex=0),n},5:(e,t)=>{var r;if((r=e.dataRef.current)!=null&&r.virtual)return{...e,options:e.options.filter(a=>a.id!==t.id)};let o=ze(e,a=>{let f=a.findIndex(l=>l.id===t.id);return f!==-1&&a.splice(f,1),a});return{...e,...o,activationTrigger:2}},6:(e,t)=>e.activationTrigger===t.trigger?e:{...e,activationTrigger:t.trigger},7:(e,t)=>{var r,o;if(e.virtual===null)return{...e,virtual:{options:t.options,disabled:(r=t.disabled)!=null?r:()=>!1}};if(e.virtual.options===t.options&&e.virtual.disabled===t.disabled)return e;let a=e.activeOptionIndex;if(e.activeOptionIndex!==null){let f=t.options.indexOf(e.virtual.options[e.activeOptionIndex]);f!==-1?a=f:a=null}return{...e,activeOptionIndex:a,virtual:{options:t.options,disabled:(o=t.disabled)!=null?o:()=>!1}}},8:(e,t)=>e.inputElement===t.element?e:{...e,inputElement:t.element},9:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},10:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},Dt=d.createContext(null);Dt.displayName="ComboboxActionsContext";function Re(e){let t=d.useContext(Dt);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Re),r}return t}let Oo=d.createContext(null);function Yo(e){let t=he("VirtualProvider"),{options:r}=t.virtual,[o,a]=d.useMemo(()=>{let p=t.optionsElement;if(!p)return[0,0];let m=window.getComputedStyle(p);return[parseFloat(m.paddingBlockStart||m.paddingTop),parseFloat(m.paddingBlockEnd||m.paddingBottom)]},[t.optionsElement]),f=Ao({enabled:r.length!==0,scrollPaddingStart:o,scrollPaddingEnd:a,count:r.length,estimateSize(){return 40},getScrollElement(){return t.optionsElement},overscan:12}),[l,n]=d.useState(0);re(()=>{n(p=>p+1)},[r]);let i=f.getVirtualItems();return i.length===0?null:P.createElement(Oo.Provider,{value:f},P.createElement("div",{style:{position:"relative",width:"100%",height:`${f.getTotalSize()}px`},ref:p=>{p&&t.activationTrigger!==0&&t.activeOptionIndex!==null&&r.length>t.activeOptionIndex&&f.scrollToIndex(t.activeOptionIndex)}},i.map(p=>{var m;return P.createElement(d.Fragment,{key:p.key},P.cloneElement((m=e.children)==null?void 0:m.call(e,{...e.slot,option:r[p.index]}),{key:`${l}-${p.key}`,"data-index":p.index,"aria-setsize":r.length,"aria-posinset":p.index+1,style:{position:"absolute",top:0,left:0,transform:`translateY(${p.start}px)`,overflowAnchor:"none"}}))})))}let Oe=d.createContext(null);Oe.displayName="ComboboxDataContext";function he(e){let t=d.useContext(Oe);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,he),r}return t}function Zo(e,t){return oe(t.type,Xo,e,t)}let er=d.Fragment;function tr(e,t){var r,o;let a=De(),{value:f,defaultValue:l,onChange:n,form:i,name:p,by:m,disabled:v=a||!1,onClose:I,__demoMode:s=!1,multiple:b=!1,immediate:h=!1,virtual:x=null,nullable:D,...j}=e,R=Rt(l),[N=b?[]:void 0,M]=Tt(f,n,R),[S,_]=d.useReducer(Zo,{dataRef:d.createRef(),comboboxState:s?0:1,isTyping:!1,options:[],virtual:x?{options:x.options,disabled:(r=x.disabled)!=null?r:()=>!1}:null,activeOptionIndex:null,activationTrigger:2,inputElement:null,buttonElement:null,optionsElement:null,__demoMode:s}),E=d.useRef(!1),T=d.useRef({static:!1,hold:!1}),F=kt(m),y=g(O=>x?m===null?x.options.indexOf(O):x.options.findIndex(U=>F(U,O)):S.options.findIndex(U=>F(U.dataRef.current.value,O))),q=d.useCallback(O=>oe(C.mode,{1:()=>N.some(U=>F(U,O)),0:()=>F(N,O)}),[N]),J=g(O=>S.activeOptionIndex===y(O)),C=d.useMemo(()=>({...S,immediate:h,optionsPropsRef:T,value:N,defaultValue:R,disabled:v,mode:b?1:0,virtual:x?S.virtual:null,get activeOptionIndex(){if(E.current&&S.activeOptionIndex===null&&(x?x.options.length>0:S.options.length>0)){if(x){let U=x.options.findIndex(ue=>{var we,Qt;return!((Qt=(we=x.disabled)==null?void 0:we.call(x,ue))!=null&&Qt)});if(U!==-1)return U}let O=S.options.findIndex(U=>!U.dataRef.current.disabled);if(O!==-1)return O}return S.activeOptionIndex},calculateIndex:y,compare:F,isSelected:q,isActive:J}),[N,R,v,b,s,S,x]);re(()=>{var O;x&&_({type:7,options:x.options,disabled:(O=x.disabled)!=null?O:null})},[x,x==null?void 0:x.options,x==null?void 0:x.disabled]),re(()=>{S.dataRef.current=C},[C]);let B=C.comboboxState===0;po(B,[C.buttonElement,C.inputElement,C.optionsElement],()=>W.closeCombobox());let X=d.useMemo(()=>{var O,U,ue;return{open:C.comboboxState===0,disabled:v,activeIndex:C.activeOptionIndex,activeOption:C.activeOptionIndex===null?null:C.virtual?C.virtual.options[(O=C.activeOptionIndex)!=null?O:0]:(ue=(U=C.options[C.activeOptionIndex])==null?void 0:U.dataRef.current.value)!=null?ue:null,value:N}},[C,v,N]),Z=g(()=>{if(C.activeOptionIndex!==null){if(W.setIsTyping(!1),C.virtual)c(C.virtual.options[C.activeOptionIndex]);else{let{dataRef:O}=C.options[C.activeOptionIndex];c(O.current.value)}W.goToOption(V.Specific,C.activeOptionIndex)}}),ee=g(()=>{_({type:0}),E.current=!0}),le=g(()=>{_({type:1}),E.current=!1,I==null||I()}),se=g(O=>{_({type:3,isTyping:O})}),k=g((O,U,ue)=>(E.current=!1,O===V.Specific?_({type:2,focus:V.Specific,idx:U,trigger:ue}):_({type:2,focus:O,trigger:ue}))),G=g((O,U)=>(_({type:4,payload:{id:O,dataRef:U}}),()=>{C.isActive(U.current.value)&&(E.current=!0),_({type:5,id:O})})),c=g(O=>oe(C.mode,{0(){return M==null?void 0:M(O)},1(){let U=C.value.slice(),ue=U.findIndex(we=>F(we,O));return ue===-1?U.push(O):U.splice(ue,1),M==null?void 0:M(U)}})),L=g(O=>{_({type:6,trigger:O})}),$=g(O=>{_({type:8,element:O})}),K=g(O=>{_({type:9,element:O})}),z=g(O=>{_({type:10,element:O})}),W=d.useMemo(()=>({onChange:c,registerOption:G,goToOption:k,setIsTyping:se,closeCombobox:le,openCombobox:ee,setActivationTrigger:L,selectActiveOption:Z,setInputElement:$,setButtonElement:K,setOptionsElement:z}),[]),[de,He]=qe(),Ke=t===null?{}:{ref:t},A=d.useCallback(()=>{if(R!==void 0)return M==null?void 0:M(R)},[M,R]),Q=ae();return P.createElement(He,{value:de,props:{htmlFor:(o=C.inputElement)==null?void 0:o.id},slot:{open:C.comboboxState===0,disabled:v}},P.createElement(ao,null,P.createElement(Dt.Provider,{value:W},P.createElement(Oe.Provider,{value:C},P.createElement(vo,{value:oe(C.comboboxState,{0:be.Open,1:be.Closed})},p!=null&&P.createElement($t,{disabled:v,data:N!=null?{[p]:N}:{},form:i,onReset:A}),Q({ourProps:Ke,theirProps:j,slot:X,defaultTag:er,name:"Combobox"}))))))}let or="input";function rr(e,t){var r,o,a,f,l;let n=he("Combobox.Input"),i=Re("Combobox.Input"),p=d.useId(),m=Pt(),{id:v=m||`headlessui-combobox-input-${p}`,onChange:I,displayValue:s,disabled:b=n.disabled||!1,autoFocus:h=!1,type:x="text",...D}=e,j=d.useRef(null),R=ie(j,t,lo(),i.setInputElement),N=Ft(n.inputElement),M=wt(),S=g(()=>{i.onChange(null),n.optionsElement&&(n.optionsElement.scrollTop=0),i.goToOption(V.Nothing)}),_=d.useMemo(()=>{var c;return typeof s=="function"&&n.value!==void 0?(c=s(n.value))!=null?c:"":typeof n.value=="string"?n.value:""},[n.value,s]);Xt(([c,L],[$,K])=>{if(n.isTyping)return;let z=j.current;z&&((K===0&&L===1||c!==$)&&(z.value=c),requestAnimationFrame(()=>{if(n.isTyping||!z||(N==null?void 0:N.activeElement)!==z)return;let{selectionStart:W,selectionEnd:de}=z;Math.abs((de??0)-(W??0))===0&&W===0&&z.setSelectionRange(z.value.length,z.value.length)}))},[_,n.comboboxState,N,n.isTyping]),Xt(([c],[L])=>{if(c===0&&L===1){if(n.isTyping)return;let $=j.current;if(!$)return;let K=$.value,{selectionStart:z,selectionEnd:W,selectionDirection:de}=$;$.value="",$.value=K,de!==null?$.setSelectionRange(z,W,de):$.setSelectionRange(z,W)}},[n.comboboxState]);let E=d.useRef(!1),T=g(()=>{E.current=!0}),F=g(()=>{M.nextFrame(()=>{E.current=!1})}),y=g(c=>{switch(i.setIsTyping(!0),c.key){case w.Enter:if(n.comboboxState!==0||E.current)return;if(c.preventDefault(),c.stopPropagation(),n.activeOptionIndex===null){i.closeCombobox();return}i.selectActiveOption(),n.mode===0&&i.closeCombobox();break;case w.ArrowDown:return c.preventDefault(),c.stopPropagation(),oe(n.comboboxState,{0:()=>i.goToOption(V.Next),1:()=>i.openCombobox()});case w.ArrowUp:return c.preventDefault(),c.stopPropagation(),oe(n.comboboxState,{0:()=>i.goToOption(V.Previous),1:()=>{te.flushSync(()=>i.openCombobox()),n.value||i.goToOption(V.Last)}});case w.Home:if(c.shiftKey)break;return c.preventDefault(),c.stopPropagation(),i.goToOption(V.First);case w.PageUp:return c.preventDefault(),c.stopPropagation(),i.goToOption(V.First);case w.End:if(c.shiftKey)break;return c.preventDefault(),c.stopPropagation(),i.goToOption(V.Last);case w.PageDown:return c.preventDefault(),c.stopPropagation(),i.goToOption(V.Last);case w.Escape:return n.comboboxState!==0?void 0:(c.preventDefault(),n.optionsElement&&!n.optionsPropsRef.current.static&&c.stopPropagation(),n.mode===0&&n.value===null&&S(),i.closeCombobox());case w.Tab:if(n.comboboxState!==0)return;n.mode===0&&n.activationTrigger!==1&&i.selectActiveOption(),i.closeCombobox();break}}),q=g(c=>{I==null||I(c),n.mode===0&&c.target.value===""&&S(),i.openCombobox()}),J=g(c=>{var L,$,K;let z=(L=c.relatedTarget)!=null?L:Yt.find(W=>W!==c.currentTarget);if(!(($=n.optionsElement)!=null&&$.contains(z))&&!((K=n.buttonElement)!=null&&K.contains(z))&&n.comboboxState===0)return c.preventDefault(),n.mode===0&&n.value===null&&S(),i.closeCombobox()}),C=g(c=>{var L,$,K;let z=(L=c.relatedTarget)!=null?L:Yt.find(W=>W!==c.currentTarget);($=n.buttonElement)!=null&&$.contains(z)||(K=n.optionsElement)!=null&&K.contains(z)||n.disabled||n.immediate&&n.comboboxState!==0&&M.microTask(()=>{te.flushSync(()=>i.openCombobox()),i.setActivationTrigger(1)})}),B=Ne(),X=Vt(),{isFocused:Z,focusProps:ee}=Ee({autoFocus:h}),{isHovered:le,hoverProps:se}=Ce({isDisabled:b}),k=d.useMemo(()=>({open:n.comboboxState===0,disabled:b,hover:le,focus:Z,autofocus:h}),[n,le,Z,h,b]),G=ve({ref:R,id:v,role:"combobox",type:x,"aria-controls":(r=n.optionsElement)==null?void 0:r.id,"aria-expanded":n.comboboxState===0,"aria-activedescendant":n.activeOptionIndex===null?void 0:n.virtual?(o=n.options.find(c=>!c.dataRef.current.disabled&&n.compare(c.dataRef.current.value,n.virtual.options[n.activeOptionIndex])))==null?void 0:o.id:(a=n.options[n.activeOptionIndex])==null?void 0:a.id,"aria-labelledby":B,"aria-describedby":X,"aria-autocomplete":"list",defaultValue:(l=(f=e.defaultValue)!=null?f:n.defaultValue!==void 0?s==null?void 0:s(n.defaultValue):null)!=null?l:n.defaultValue,disabled:b||void 0,autoFocus:h,onCompositionStart:T,onCompositionEnd:F,onKeyDown:y,onChange:q,onFocus:C,onBlur:J},ee,se);return ae()({ourProps:G,theirProps:D,slot:k,defaultTag:or,name:"Combobox.Input"})}let nr="button";function ar(e,t){var r;let o=he("Combobox.Button"),a=Re("Combobox.Button"),f=ie(t,a.setButtonElement),l=d.useId(),{id:n=`headlessui-combobox-button-${l}`,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=_o(o.inputElement),I=g(_=>{switch(_.key){case w.Space:case w.Enter:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&te.flushSync(()=>a.openCombobox()),v();return;case w.ArrowDown:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&(te.flushSync(()=>a.openCombobox()),o.value||a.goToOption(V.First)),v();return;case w.ArrowUp:_.preventDefault(),_.stopPropagation(),o.comboboxState===1&&(te.flushSync(()=>a.openCombobox()),o.value||a.goToOption(V.Last)),v();return;case w.Escape:if(o.comboboxState!==0)return;_.preventDefault(),o.optionsElement&&!o.optionsPropsRef.current.static&&_.stopPropagation(),te.flushSync(()=>a.closeCombobox()),v();return;default:return}}),s=g(_=>{_.preventDefault(),!Be(_.currentTarget)&&(_.button===Lt.Left&&(o.comboboxState===0?a.closeCombobox():a.openCombobox()),v())}),b=Ne([n]),{isFocusVisible:h,focusProps:x}=Ee({autoFocus:p}),{isHovered:D,hoverProps:j}=Ce({isDisabled:i}),{pressed:R,pressProps:N}=Zt({disabled:i}),M=d.useMemo(()=>({open:o.comboboxState===0,active:R||o.comboboxState===0,disabled:i,value:o.value,hover:D,focus:h}),[o,D,h,R,i]),S=ve({ref:f,id:n,type:eo(e,o.buttonElement),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":(r=o.optionsElement)==null?void 0:r.id,"aria-expanded":o.comboboxState===0,"aria-labelledby":b,disabled:i||void 0,autoFocus:p,onMouseDown:s,onKeyDown:I},x,j,N);return ae()({ourProps:S,theirProps:m,slot:M,defaultTag:nr,name:"Combobox.Button"})}let lr="div",ir=Pe.RenderStrategy|Pe.Static;function sr(e,t){var r,o,a;let f=d.useId(),{id:l=`headlessui-combobox-options-${f}`,hold:n=!1,anchor:i,portal:p=!1,modal:m=!0,transition:v=!1,...I}=e,s=he("Combobox.Options"),b=Re("Combobox.Options"),h=io(i);h&&(p=!0);let[x,D]=so(h),[j,R]=d.useState(null),N=uo(),M=ie(t,h?x:null,b.setOptionsElement,R),S=Ft(s.optionsElement),_=go(),[E,T]=xo(v,j,_!==null?(_&be.Open)===be.Open:s.comboboxState===0);mo(E,s.inputElement,b.closeCombobox);let F=s.__demoMode?!1:m&&s.comboboxState===0;bo(F,S);let y=s.__demoMode?!1:m&&s.comboboxState===0;co(y,{allowed:d.useCallback(()=>[s.inputElement,s.buttonElement,s.optionsElement],[s.inputElement,s.buttonElement,s.optionsElement])}),re(()=>{var G;s.optionsPropsRef.current.static=(G=e.static)!=null?G:!1},[s.optionsPropsRef,e.static]),re(()=>{s.optionsPropsRef.current.hold=n},[s.optionsPropsRef,n]),ko(s.comboboxState===0,{container:s.optionsElement,accept(G){return G.getAttribute("role")==="option"?NodeFilter.FILTER_REJECT:G.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(G){G.setAttribute("role","none")}});let q=Ne([(r=s.buttonElement)==null?void 0:r.id]),J=d.useMemo(()=>({open:s.comboboxState===0,option:void 0}),[s.comboboxState]),C=g(()=>{b.setActivationTrigger(0)}),B=g(G=>{G.preventDefault(),b.setActivationTrigger(0)}),X=ve(h?N():{},{"aria-labelledby":q,role:"listbox","aria-multiselectable":s.mode===1?!0:void 0,id:l,ref:M,style:{...I.style,...D,"--input-width":Xe(s.inputElement,!0).width,"--button-width":Xe(s.buttonElement,!0).width},onWheel:s.activationTrigger===0?void 0:C,onMouseDown:B,...yo(T)}),Z=E&&s.comboboxState===1,ee=je(Z,(o=s.virtual)==null?void 0:o.options),le=je(Z,s.value),se=g(G=>s.compare(le,G));if(s.virtual){if(ee===void 0)throw new Error("Missing `options` in virtual mode");Object.assign(I,{children:P.createElement(Oe.Provider,{value:ee!==s.virtual.options?{...s,virtual:{...s.virtual,options:ee}}:s},P.createElement(Yo,{slot:J},I.children))})}let k=ae();return P.createElement(fo,{enabled:p?e.static||E:!1},P.createElement(Oe.Provider,{value:s.mode===1?s:{...s,isSelected:se}},k({ourProps:X,theirProps:{...I,children:P.createElement(Ko,{freeze:Z},typeof I.children=="function"?(a=I.children)==null?void 0:a.call(I,J):I.children)},slot:J,defaultTag:lr,features:ir,visible:E,name:"Combobox.Options"})))}let ur="div";function dr(e,t){var r,o,a,f;let l=he("Combobox.Option"),n=Re("Combobox.Option"),i=d.useId(),{id:p=`headlessui-combobox-option-${i}`,value:m,disabled:v=(a=(o=(r=l.virtual)==null?void 0:r.disabled)==null?void 0:o.call(r,m))!=null?a:!1,order:I=null,...s}=e,b=_o(l.inputElement),h=l.virtual?l.activeOptionIndex===l.calculateIndex(m):l.activeOptionIndex===null?!1:((f=l.options[l.activeOptionIndex])==null?void 0:f.id)===p,x=l.isSelected(m),D=d.useRef(null),j=Le({disabled:v,value:m,domRef:D,order:I}),R=d.useContext(Oo),N=ie(t,D,R?R.measureElement:null),M=g(()=>{n.setIsTyping(!1),n.onChange(m)});re(()=>n.registerOption(p,j),[j,p]);let S=d.useRef(!(l.virtual||l.__demoMode));re(()=>{if(!l.virtual&&!l.__demoMode)return We().requestAnimationFrame(()=>{S.current=!0})},[l.virtual,l.__demoMode]),re(()=>{if(S.current&&l.comboboxState===0&&h&&l.activationTrigger!==0)return We().requestAnimationFrame(()=>{var B,X;(X=(B=D.current)==null?void 0:B.scrollIntoView)==null||X.call(B,{block:"nearest"})})},[D,h,l.comboboxState,l.activationTrigger,l.activeOptionIndex]);let _=g(B=>{B.preventDefault(),B.button===Lt.Left&&(v||(M(),Bo()||requestAnimationFrame(()=>b()),l.mode===0&&n.closeCombobox()))}),E=g(()=>{if(v)return n.goToOption(V.Nothing);let B=l.calculateIndex(m);n.goToOption(V.Specific,B)}),T=no(),F=g(B=>T.update(B)),y=g(B=>{if(!T.wasMoved(B)||v||h)return;let X=l.calculateIndex(m);n.goToOption(V.Specific,X,0)}),q=g(B=>{T.wasMoved(B)&&(v||h&&(l.optionsPropsRef.current.hold||n.goToOption(V.Nothing)))}),J=d.useMemo(()=>({active:h,focus:h,selected:x,disabled:v}),[h,x,v]),C={id:p,ref:N,role:"option",tabIndex:v===!0?void 0:-1,"aria-disabled":v===!0?!0:void 0,"aria-selected":x,disabled:void 0,onMouseDown:_,onFocus:E,onPointerEnter:F,onMouseEnter:F,onPointerMove:y,onMouseMove:y,onPointerLeave:q,onMouseLeave:q};return ae()({ourProps:C,theirProps:s,slot:J,defaultTag:ur,name:"Combobox.Option"})}let cr=ne(tr),Ae=ne(ar),qt=ne(rr),pr=Mt,Bt=ne(sr),Te=ne(dr),Io=Object.assign(cr,{Input:qt,Button:Ae,Label:pr,Options:Bt,Option:Te});var mr=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(mr||{}),br=(e=>(e[e.Single=0]="Single",e[e.Multi=1]="Multi",e))(br||{}),fr=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(fr||{}),vr=(e=>(e[e.OpenListbox=0]="OpenListbox",e[e.CloseListbox=1]="CloseListbox",e[e.GoToOption=2]="GoToOption",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterOption=5]="RegisterOption",e[e.UnregisterOption=6]="UnregisterOption",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetOptionsElement=8]="SetOptionsElement",e))(vr||{});function Qe(e,t=r=>r){let r=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,o=jt(t(e.options.slice()),f=>f.dataRef.current.domRef.current),a=r?o.indexOf(r):null;return a===-1&&(a=null),{options:o,activeOptionIndex:a}}let gr={1(e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1,__demoMode:!1}},0(e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let t=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,o=e.options.findIndex(a=>r(a.dataRef.current.value));return o!==-1&&(t=o),{...e,listboxState:0,activeOptionIndex:t,__demoMode:!1}},2(e,t){var r,o,a,f,l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let n={...e,searchQuery:"",activationTrigger:(r=t.trigger)!=null?r:1,__demoMode:!1};if(t.focus===V.Nothing)return{...n,activeOptionIndex:null};if(t.focus===V.Specific)return{...n,activeOptionIndex:e.options.findIndex(m=>m.id===t.id)};if(t.focus===V.Previous){let m=e.activeOptionIndex;if(m!==null){let v=e.options[m].dataRef.current.domRef,I=_e(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});if(I!==null){let s=e.options[I].dataRef.current.domRef;if(((o=v.current)==null?void 0:o.previousElementSibling)===s.current||((a=s.current)==null?void 0:a.previousElementSibling)===null)return{...n,activeOptionIndex:I}}}}else if(t.focus===V.Next){let m=e.activeOptionIndex;if(m!==null){let v=e.options[m].dataRef.current.domRef,I=_e(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:s=>s.id,resolveDisabled:s=>s.dataRef.current.disabled});if(I!==null){let s=e.options[I].dataRef.current.domRef;if(((f=v.current)==null?void 0:f.nextElementSibling)===s.current||((l=s.current)==null?void 0:l.nextElementSibling)===null)return{...n,activeOptionIndex:I}}}}let i=Qe(e),p=_e(t,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:m=>m.id,resolveDisabled:m=>m.dataRef.current.disabled});return{...n,...i,activeOptionIndex:p}},3:(e,t)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==""?0:1,o=e.searchQuery+t.value.toLowerCase(),a=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(l=>{var n;return!l.dataRef.current.disabled&&((n=l.dataRef.current.textValue)==null?void 0:n.startsWith(o))}),f=a?e.options.indexOf(a):-1;return f===-1||f===e.activeOptionIndex?{...e,searchQuery:o}:{...e,searchQuery:o,activeOptionIndex:f,activationTrigger:1}},4(e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===""?e:{...e,searchQuery:""}},5:(e,t)=>{let r={id:t.id,dataRef:t.dataRef},o=Qe(e,a=>[...a,r]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(t.dataRef.current.value)&&(o.activeOptionIndex=o.options.indexOf(r)),{...e,...o}},6:(e,t)=>{let r=Qe(e,o=>{let a=o.findIndex(f=>f.id===t.id);return a!==-1&&o.splice(a,1),o});return{...e,...r,activationTrigger:1}},7:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},8:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element}},At=d.createContext(null);At.displayName="ListboxActionsContext";function Ge(e){let t=d.useContext(At);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ge),r}return t}let Ue=d.createContext(null);Ue.displayName="ListboxDataContext";function $e(e){let t=d.useContext(Ue);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,$e),r}return t}function xr(e,t){return oe(t.type,gr,e,t)}let yr=d.Fragment;function hr(e,t){var r;let o=De(),{value:a,defaultValue:f,form:l,name:n,onChange:i,by:p,invalid:m=!1,disabled:v=o||!1,horizontal:I=!1,multiple:s=!1,__demoMode:b=!1,...h}=e;const x=I?"horizontal":"vertical";let D=ie(t),j=Rt(f),[R=s?[]:void 0,N]=Tt(a,i,j),[M,S]=d.useReducer(xr,{dataRef:d.createRef(),listboxState:b?0:1,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,optionsVisible:!1,buttonElement:null,optionsElement:null,__demoMode:b}),_=d.useRef({static:!1,hold:!1}),E=d.useRef(new Map),T=kt(p),F=d.useCallback(A=>oe(y.mode,{1:()=>R.some(Q=>T(Q,A)),0:()=>T(R,A)}),[R]),y=d.useMemo(()=>({...M,value:R,disabled:v,invalid:m,mode:s?1:0,orientation:x,compare:T,isSelected:F,optionsPropsRef:_,listRef:E}),[R,v,m,s,M,E]);re(()=>{M.dataRef.current=y},[y]);let q=y.listboxState===0;po(q,[y.buttonElement,y.optionsElement],(A,Q)=>{var O;S({type:1}),Po(Q,jo.Loose)||(A.preventDefault(),(O=y.buttonElement)==null||O.focus())});let J=d.useMemo(()=>({open:y.listboxState===0,disabled:v,invalid:m,value:R}),[y,v,R,m]),C=g(A=>{let Q=y.options.find(O=>O.id===A);Q&&k(Q.dataRef.current.value)}),B=g(()=>{if(y.activeOptionIndex!==null){let{dataRef:A,id:Q}=y.options[y.activeOptionIndex];k(A.current.value),S({type:2,focus:V.Specific,id:Q})}}),X=g(()=>S({type:0})),Z=g(()=>S({type:1})),ee=wt(),le=g((A,Q,O)=>{ee.dispose(),ee.microTask(()=>A===V.Specific?S({type:2,focus:V.Specific,id:Q,trigger:O}):S({type:2,focus:A,trigger:O}))}),se=g((A,Q)=>(S({type:5,id:A,dataRef:Q}),()=>S({type:6,id:A}))),k=g(A=>oe(y.mode,{0(){return N==null?void 0:N(A)},1(){let Q=y.value.slice(),O=Q.findIndex(U=>T(U,A));return O===-1?Q.push(A):Q.splice(O,1),N==null?void 0:N(Q)}})),G=g(A=>S({type:3,value:A})),c=g(()=>S({type:4})),L=g(A=>{S({type:7,element:A})}),$=g(A=>{S({type:8,element:A})}),K=d.useMemo(()=>({onChange:k,registerOption:se,goToOption:le,closeListbox:Z,openListbox:X,selectActiveOption:B,selectOption:C,search:G,clearSearch:c,setButtonElement:L,setOptionsElement:$}),[]),[z,W]=qe({inherit:!0}),de={ref:D},He=d.useCallback(()=>{if(j!==void 0)return N==null?void 0:N(j)},[N,j]),Ke=ae();return P.createElement(W,{value:z,props:{htmlFor:(r=y.buttonElement)==null?void 0:r.id},slot:{open:y.listboxState===0,disabled:v}},P.createElement(ao,null,P.createElement(At.Provider,{value:K},P.createElement(Ue.Provider,{value:y},P.createElement(vo,{value:oe(y.listboxState,{0:be.Open,1:be.Closed})},n!=null&&R!=null&&P.createElement($t,{disabled:v,data:{[n]:R},form:l,onReset:He}),Ke({ourProps:de,theirProps:h,slot:J,defaultTag:yr,name:"Listbox"}))))))}let _r="button";function Or(e,t){var r;let o=$e("Listbox.Button"),a=Ge("Listbox.Button"),f=d.useId(),l=Pt(),{id:n=l||`headlessui-listbox-button-${f}`,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=ie(t,lo(),a.setButtonElement),I=qo(),s=g(y=>{switch(y.key){case w.Enter:to(y.currentTarget);break;case w.Space:case w.ArrowDown:y.preventDefault(),te.flushSync(()=>a.openListbox()),o.value||a.goToOption(V.First);break;case w.ArrowUp:y.preventDefault(),te.flushSync(()=>a.openListbox()),o.value||a.goToOption(V.Last);break}}),b=g(y=>{switch(y.key){case w.Space:y.preventDefault();break}}),h=g(y=>{var q;if(Be(y.currentTarget))return y.preventDefault();o.listboxState===0?(te.flushSync(()=>a.closeListbox()),(q=o.buttonElement)==null||q.focus({preventScroll:!0})):(y.preventDefault(),a.openListbox())}),x=g(y=>y.preventDefault()),D=Ne([n]),j=Vt(),{isFocusVisible:R,focusProps:N}=Ee({autoFocus:p}),{isHovered:M,hoverProps:S}=Ce({isDisabled:i}),{pressed:_,pressProps:E}=Zt({disabled:i}),T=d.useMemo(()=>({open:o.listboxState===0,active:_||o.listboxState===0,disabled:i,invalid:o.invalid,value:o.value,hover:M,focus:R,autofocus:p}),[o.listboxState,o.value,i,M,R,_,o.invalid,p]),F=ve(I(),{ref:v,id:n,type:eo(e,o.buttonElement),"aria-haspopup":"listbox","aria-controls":(r=o.optionsElement)==null?void 0:r.id,"aria-expanded":o.listboxState===0,"aria-labelledby":D,"aria-describedby":j,disabled:i||void 0,autoFocus:p,onKeyDown:s,onKeyUp:b,onKeyPress:x,onClick:h},N,S,E);return ae()({ourProps:F,theirProps:m,slot:T,defaultTag:_r,name:"Listbox.Button"})}let So=d.createContext(!1),Ir="div",Sr=Pe.RenderStrategy|Pe.Static;function Er(e,t){var r,o;let a=d.useId(),{id:f=`headlessui-listbox-options-${a}`,anchor:l,portal:n=!1,modal:i=!0,transition:p=!1,...m}=e,v=io(l),[I,s]=d.useState(null);v&&(n=!0);let b=$e("Listbox.Options"),h=Ge("Listbox.Options"),x=Ft(b.optionsElement),D=go(),[j,R]=xo(p,I,D!==null?(D&be.Open)===be.Open:b.listboxState===0);mo(j,b.buttonElement,h.closeListbox);let N=b.__demoMode?!1:i&&b.listboxState===0;bo(N,x);let M=b.__demoMode?!1:i&&b.listboxState===0;co(M,{allowed:d.useCallback(()=>[b.buttonElement,b.optionsElement],[b.buttonElement,b.optionsElement])});let S=b.listboxState!==0,_=Lo(S,b.buttonElement)?!1:j,E=j&&b.listboxState===1,T=je(E,b.value),F=g(c=>b.compare(T,c)),y=d.useMemo(()=>{var c;if(v==null||!((c=v==null?void 0:v.to)!=null&&c.includes("selection")))return null;let L=b.options.findIndex($=>F($.dataRef.current.value));return L===-1&&(L=0),L},[v,b.options]),q=(()=>{if(v==null)return;if(y===null)return{...v,inner:void 0};let c=Array.from(b.listRef.current.values());return{...v,inner:{listRef:{current:c},index:y}}})(),[J,C]=so(q),B=uo(),X=ie(t,v?J:null,h.setOptionsElement,s),Z=wt();d.useEffect(()=>{var c;let L=b.optionsElement;L&&b.listboxState===0&&L!==((c=ro(L))==null?void 0:c.activeElement)&&(L==null||L.focus({preventScroll:!0}))},[b.listboxState,b.optionsElement]);let ee=g(c=>{var L,$;switch(Z.dispose(),c.key){case w.Space:if(b.searchQuery!=="")return c.preventDefault(),c.stopPropagation(),h.search(c.key);case w.Enter:if(c.preventDefault(),c.stopPropagation(),b.activeOptionIndex!==null){let{dataRef:K}=b.options[b.activeOptionIndex];h.onChange(K.current.value)}b.mode===0&&(te.flushSync(()=>h.closeListbox()),(L=b.buttonElement)==null||L.focus({preventScroll:!0}));break;case oe(b.orientation,{vertical:w.ArrowDown,horizontal:w.ArrowRight}):return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Next);case oe(b.orientation,{vertical:w.ArrowUp,horizontal:w.ArrowLeft}):return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Previous);case w.Home:case w.PageUp:return c.preventDefault(),c.stopPropagation(),h.goToOption(V.First);case w.End:case w.PageDown:return c.preventDefault(),c.stopPropagation(),h.goToOption(V.Last);case w.Escape:c.preventDefault(),c.stopPropagation(),te.flushSync(()=>h.closeListbox()),($=b.buttonElement)==null||$.focus({preventScroll:!0});return;case w.Tab:c.preventDefault(),c.stopPropagation(),te.flushSync(()=>h.closeListbox()),Fo(b.buttonElement,c.shiftKey?ge.Previous:ge.Next);break;default:c.key.length===1&&(h.search(c.key),Z.setTimeout(()=>h.clearSearch(),350));break}}),le=(r=b.buttonElement)==null?void 0:r.id,se=d.useMemo(()=>({open:b.listboxState===0}),[b.listboxState]),k=ve(v?B():{},{id:f,ref:X,"aria-activedescendant":b.activeOptionIndex===null||(o=b.options[b.activeOptionIndex])==null?void 0:o.id,"aria-multiselectable":b.mode===1?!0:void 0,"aria-labelledby":le,"aria-orientation":b.orientation,onKeyDown:ee,role:"listbox",tabIndex:b.listboxState===0?0:void 0,style:{...m.style,...C,"--button-width":Xe(b.buttonElement,!0).width},...yo(R)}),G=ae();return P.createElement(fo,{enabled:n?e.static||j:!1},P.createElement(Ue.Provider,{value:b.mode===1?b:{...b,isSelected:F}},G({ourProps:k,theirProps:m,slot:se,defaultTag:Ir,features:Sr,visible:_,name:"Listbox.Options"})))}let Cr="div";function Nr(e,t){let r=d.useId(),{id:o=`headlessui-listbox-option-${r}`,disabled:a=!1,value:f,...l}=e,n=d.useContext(So)===!0,i=$e("Listbox.Option"),p=Ge("Listbox.Option"),m=i.activeOptionIndex!==null?i.options[i.activeOptionIndex].id===o:!1,v=i.isSelected(f),I=d.useRef(null),s=Do(I),b=Le({disabled:a,value:f,domRef:I,get textValue(){return s()}}),h=ie(t,I,T=>{T?i.listRef.current.set(o,T):i.listRef.current.delete(o)});re(()=>{if(!i.__demoMode&&i.listboxState===0&&m&&i.activationTrigger!==0)return We().requestAnimationFrame(()=>{var T,F;(F=(T=I.current)==null?void 0:T.scrollIntoView)==null||F.call(T,{block:"nearest"})})},[I,m,i.__demoMode,i.listboxState,i.activationTrigger,i.activeOptionIndex]),re(()=>{if(!n)return p.registerOption(o,b)},[b,o,n]);let x=g(T=>{var F;if(a)return T.preventDefault();p.onChange(f),i.mode===0&&(te.flushSync(()=>p.closeListbox()),(F=i.buttonElement)==null||F.focus({preventScroll:!0}))}),D=g(()=>{if(a)return p.goToOption(V.Nothing);p.goToOption(V.Specific,o)}),j=no(),R=g(T=>{j.update(T),!a&&(m||p.goToOption(V.Specific,o,0))}),N=g(T=>{j.wasMoved(T)&&(a||m||p.goToOption(V.Specific,o,0))}),M=g(T=>{j.wasMoved(T)&&(a||m&&p.goToOption(V.Nothing))}),S=d.useMemo(()=>({active:m,focus:m,selected:v,disabled:a,selectedOption:v&&n}),[m,v,a,n]),_=n?{}:{id:o,ref:h,role:"option",tabIndex:a===!0?void 0:-1,"aria-disabled":a===!0?!0:void 0,"aria-selected":v,disabled:void 0,onClick:x,onFocus:D,onPointerEnter:R,onMouseEnter:R,onPointerMove:N,onMouseMove:N,onPointerLeave:M,onMouseLeave:M},E=ae();return!v&&n?null:E({ourProps:_,theirProps:l,slot:S,defaultTag:Cr,name:"Listbox.Option"})}let Rr=d.Fragment;function Tr(e,t){let{options:r,placeholder:o,...a}=e,f={ref:ie(t)},l=$e("ListboxSelectedOption"),n=d.useMemo(()=>({}),[]),i=l.value===void 0||l.value===null||l.mode===1&&Array.isArray(l.value)&&l.value.length===0,p=ae();return P.createElement(So.Provider,{value:!0},p({ourProps:f,theirProps:{...a,children:P.createElement(P.Fragment,null,o&&i?o:r)},slot:n,defaultTag:Rr,name:"ListboxSelectedOption"}))}let $r=ne(hr),Eo=ne(Or),wr=Mt,Co=ne(Er),No=ne(Nr),Vr=ne(Tr),Mr=Object.assign($r,{Button:Eo,Label:wr,Options:Co,Option:No,SelectedOption:Vr});var Pr=(e=>(e[e.RegisterOption=0]="RegisterOption",e[e.UnregisterOption=1]="UnregisterOption",e))(Pr||{});let jr={0(e,t){let r=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:jt(r,o=>o.element.current)}},1(e,t){let r=e.options.slice(),o=e.options.findIndex(a=>a.id===t.id);return o===-1?e:(r.splice(o,1),{...e,options:r})}},Gt=d.createContext(null);Gt.displayName="RadioGroupDataContext";function Ut(e){let t=d.useContext(Gt);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Ut),r}return t}let Ht=d.createContext(null);Ht.displayName="RadioGroupActionsContext";function Kt(e){let t=d.useContext(Ht);if(t===null){let r=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Kt),r}return t}function Fr(e,t){return oe(t.type,jr,e,t)}let kr="div";function Lr(e,t){let r=d.useId(),o=De(),{id:a=`headlessui-radiogroup-${r}`,value:f,form:l,name:n,onChange:i,by:p,disabled:m=o||!1,defaultValue:v,...I}=e,s=kt(p),[b,h]=d.useReducer(Fr,{options:[]}),x=b.options,[D,j]=qe(),[R,N]=oo(),M=d.useRef(null),S=ie(M,t),_=Rt(v),[E,T]=Tt(f,i,_),F=d.useMemo(()=>x.find(k=>!k.propsRef.current.disabled),[x]),y=d.useMemo(()=>x.some(k=>s(k.propsRef.current.value,E)),[x,E]),q=g(k=>{var G;if(m||s(k,E))return!1;let c=(G=x.find(L=>s(L.propsRef.current.value,k)))==null?void 0:G.propsRef.current;return c!=null&&c.disabled?!1:(T==null||T(k),!0)}),J=g(k=>{let G=M.current;if(!G)return;let c=ro(G),L=x.filter($=>$.propsRef.current.disabled===!1).map($=>$.element.current);switch(k.key){case w.Enter:to(k.currentTarget);break;case w.ArrowLeft:case w.ArrowUp:if(k.preventDefault(),k.stopPropagation(),Jt(L,ge.Previous|ge.WrapAround)===Wt.Success){let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break;case w.ArrowRight:case w.ArrowDown:if(k.preventDefault(),k.stopPropagation(),Jt(L,ge.Next|ge.WrapAround)===Wt.Success){let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break;case w.Space:{k.preventDefault(),k.stopPropagation();let $=x.find(K=>K.element.current===(c==null?void 0:c.activeElement));$&&q($.propsRef.current.value)}break}}),C=g(k=>(h({type:0,...k}),()=>h({type:1,id:k.id}))),B=d.useMemo(()=>({value:E,firstOption:F,containsCheckedOption:y,disabled:m,compare:s,...b}),[E,F,y,m,s,b]),X=d.useMemo(()=>({registerOption:C,change:q}),[C,q]),Z={ref:S,id:a,role:"radiogroup","aria-labelledby":D,"aria-describedby":R,onKeyDown:J},ee=d.useMemo(()=>({value:E}),[E]),le=d.useCallback(()=>{if(_!==void 0)return q(_)},[q,_]),se=ae();return P.createElement(N,{name:"RadioGroup.Description"},P.createElement(j,{name:"RadioGroup.Label"},P.createElement(Ht.Provider,{value:X},P.createElement(Gt.Provider,{value:B},n!=null&&P.createElement($t,{disabled:m,data:{[n]:E||"on"},overrides:{type:"radio",checked:E!=null},form:l,onReset:le}),se({ourProps:Z,theirProps:I,slot:ee,defaultTag:kr,name:"RadioGroup"})))))}let Dr="div";function qr(e,t){var r;let o=Ut("RadioGroup.Option"),a=Kt("RadioGroup.Option"),f=d.useId(),{id:l=`headlessui-radiogroup-option-${f}`,value:n,disabled:i=o.disabled||!1,autoFocus:p=!1,...m}=e,v=d.useRef(null),I=ie(v,t),[s,b]=qe(),[h,x]=oo(),D=Le({value:n,disabled:i});re(()=>a.registerOption({id:l,element:v,propsRef:D}),[l,a,v,D]);let j=g(q=>{var J;if(Be(q.currentTarget))return q.preventDefault();a.change(n)&&((J=v.current)==null||J.focus())}),R=((r=o.firstOption)==null?void 0:r.id)===l,{isFocusVisible:N,focusProps:M}=Ee({autoFocus:p}),{isHovered:S,hoverProps:_}=Ce({isDisabled:i}),E=o.compare(o.value,n),T=ve({ref:I,id:l,role:"radio","aria-checked":E?"true":"false","aria-labelledby":s,"aria-describedby":h,"aria-disabled":i?!0:void 0,tabIndex:i?-1:E||!o.containsCheckedOption&&R?0:-1,onClick:i?void 0:j,autoFocus:p},M,_),F=d.useMemo(()=>({checked:E,disabled:i,active:N,hover:S,focus:N,autofocus:p}),[E,i,S,N,p]),y=ae();return P.createElement(x,{name:"RadioGroup.Description"},P.createElement(b,{name:"RadioGroup.Label"},y({ourProps:T,theirProps:m,slot:F,defaultTag:Dr,name:"RadioGroup.Option"})))}let Br="span";function Ar(e,t){var r;let o=Ut("Radio"),a=Kt("Radio"),f=d.useId(),l=Pt(),n=De(),{id:i=l||`headlessui-radio-${f}`,value:p,disabled:m=o.disabled||n||!1,autoFocus:v=!1,...I}=e,s=d.useRef(null),b=ie(s,t),h=Ne(),x=Vt(),D=Le({value:p,disabled:m});re(()=>a.registerOption({id:i,element:s,propsRef:D}),[i,a,s,D]);let j=g(y=>{var q;if(Be(y.currentTarget))return y.preventDefault();a.change(p)&&((q=s.current)==null||q.focus())}),{isFocusVisible:R,focusProps:N}=Ee({autoFocus:v}),{isHovered:M,hoverProps:S}=Ce({isDisabled:m}),_=((r=o.firstOption)==null?void 0:r.id)===i,E=o.compare(o.value,p),T=ve({ref:b,id:i,role:"radio","aria-checked":E?"true":"false","aria-labelledby":h,"aria-describedby":x,"aria-disabled":m?!0:void 0,tabIndex:m?-1:E||!o.containsCheckedOption&&_?0:-1,autoFocus:v,onClick:m?void 0:j},N,S),F=d.useMemo(()=>({checked:E,disabled:m,hover:M,focus:R,autofocus:v}),[E,m,M,R,v]);return ae()({ourProps:T,theirProps:I,slot:F,defaultTag:Br,name:"Radio"})}let Gr=ne(Lr),Ur=ne(qr),zt=ne(Ar),Hr=Mt,Kr=Mo,Ro=Object.assign(Gr,{Option:Ur,Radio:zt,Label:Hr,Description:Kr});const Ye=({id:e,children:t})=>u.jsx("p",{id:`${e}-description`,className:"paragraph-100 text-neutral-700",children:t});try{Ye.displayName="FormFieldDescription",Ye.__docgenInfo={description:"",displayName:"FormFieldDescription",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}}}}}catch{}const Ze=({children:e})=>u.jsxs("div",{className:"mt-0.5 flex items-center gap-1",children:[u.jsx(To,{className:"h-3 w-3 fill-danger-500"}),u.jsx("p",{className:"paragraph-100 text-danger-500",children:e})]});try{Ze.displayName="FormFieldErrorMessage",Ze.__docgenInfo={description:"",displayName:"FormFieldErrorMessage",props:{}}}catch{}const et=({htmlFor:e,children:t,optional:r})=>u.jsxs("div",{className:"flex items-baseline gap-1 text-neutral-800",children:[u.jsx("label",{htmlFor:e,className:"headline-400",children:t}),r?u.jsx("div",{className:"paragraph-100",children:"(Optional)"}):null]});try{et.displayName="FormFieldLabel",et.__docgenInfo={description:"",displayName:"FormFieldLabel",props:{htmlFor:{defaultValue:null,description:"",name:"htmlFor",required:!0,type:{name:"string"}},optional:{defaultValue:null,description:"",name:"optional",required:!1,type:{name:"boolean"}}}}}catch{}const tt=({children:e})=>u.jsx("div",{className:"mb-2 flex flex-col gap-1",children:e});try{tt.displayName="FormFieldLabelGroup",tt.__docgenInfo={description:"",displayName:"FormFieldLabelGroup",props:{}}}catch{}const ot=({children:e,value:t,disabled:r})=>u.jsx(zt,{value:t,className:"max-w-fit cursor-pointer focus:outline-none",disabled:r,children:({checked:o,disabled:a})=>u.jsxs("div",{className:"flex items-center gap-3",children:[o?u.jsx("span",{className:H("relative inline-block h-4 w-4 rounded-full bg-primary-400 hover:bg-primary-500 active:bg-primary-600",a&&"bg-neutral-100 hover:bg-neutral-100 active:bg-neutral-100"),children:u.jsx("span",{className:H("absolute inset-0 m-auto block h-2 w-2 rounded-full bg-neutral-0",a&&"bg-neutral-500")})}):u.jsx("span",{className:H("inline-block h-4 w-4 rounded-full border border-neutral-400 hover:border-neutral-600 active:border-neutral-500 active:bg-neutral-100",a&&"border-0 bg-neutral-100")}),u.jsx("p",{className:H("paragraph-200",a&&"text-neutral-600"),children:e})]})});try{ot.displayName="RadioInputOption",ot.__docgenInfo={description:"",displayName:"RadioInputOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Fe=({id:e,children:t,value:r,onChange:o})=>u.jsx(Ro,{id:e,value:r,onChange:o,children:t});Fe.Option=ot;try{Fe.displayName="RadioInput",Fe.__docgenInfo={description:"",displayName:"RadioInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}}}}}catch{}const zr="target-field",Qr=H("[.group.form-field-group_&:first-child_.target-field]:rounded-r-none [.group.form-field-group_&:first-child_.target-field]:border-r-0","[.group.form-field-group_&:not(:first-child):not(:last-child)_.target-field]:rounded-none [.group.form-field-group_&:not(:first-child):not(:last-child)_.target-field]:border-r-0","[.group.form-field-group_&:last-child_.target-field]:border-l-1 [.group.form-field-group_&:last-child_.target-field]:rounded-l-none"),rt=({ariaDescribedBy:e,type:t="text",LeftIcon:r,readOnly:o,autoSelect:a,error:f,disabled:l,className:n,...i})=>{const p=d.useRef(null),m=()=>{a&&p.current&&p.current.select()};return u.jsxs("div",{className:H("relative w-full",Qr),children:[r?u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3","aria-hidden":"true",children:u.jsx(r,{className:"text-gray-400 h-3.5 w-3.5 fill-neutral-600"})}):null,u.jsx("input",{ref:p,"aria-describedby":e,onMouseOver:m,onFocus:m,onClick:m,type:t,className:H(zr,"paragraph-100 relative block h-8 w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",r&&"pl-9",o&&"bg-primary-50",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!f&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",f&&!l&&"border-danger-500",n),readOnly:o,disabled:l,...i})]})};try{rt.displayName="TextInput",rt.__docgenInfo={description:"",displayName:"TextInput",props:{type:{defaultValue:{value:"text"},description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"text"'},{value:'"email"'},{value:'"date"'},{value:'"password"'}]}},autoSelect:{defaultValue:null,description:"",name:"autoSelect",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}}}}}catch{}const nt=({id:e,value:t,onChange:r,placeholder:o,ariaDescribedBy:a,error:f,disabled:l,rows:n,cols:i,className:p})=>u.jsx("textarea",{id:e,name:e,value:t,onChange:r,placeholder:o,"aria-describedby":a,className:H("paragraph-100 block min-h-[2rem] w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!f&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",f&&!l&&"border-danger-500",p),disabled:l,rows:n,cols:i});try{nt.displayName="Textarea",nt.__docgenInfo={description:"",displayName:"Textarea",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},rows:{defaultValue:null,description:"",name:"rows",required:!1,type:{name:"number"}},cols:{defaultValue:null,description:"",name:"cols",required:!1,type:{name:"number"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const Jr={left:"text-left",center:"text-center",right:"text-right"},at=({id:e,placeholder:t,value:r,min:o,max:a,onChange:f,ariaDescribedBy:l,LeftIcon:n,textAlign:i="left",readOnly:p,error:m,disabled:v})=>u.jsxs("div",{className:"relative w-full",children:[n?u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3","aria-hidden":"true",children:u.jsx(n,{className:"text-gray-400 h-4 w-4 fill-neutral-600"})}):null,u.jsx("input",{id:e,name:e,value:r,readOnly:p,onChange:f,placeholder:t,"aria-describedby":l,type:"number",min:o,max:a,className:H("paragraph-100 block w-full rounded border border-neutral-400 py-2 pl-3 pr-2 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",Jr[i],n&&"pl-9",p&&"bg-neutral-100",v&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!m&&!v&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",m&&!v&&"border-danger-500"),disabled:v})]});try{at.displayName="NumberInput",at.__docgenInfo={description:"",displayName:"NumberInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}},textAlign:{defaultValue:{value:"left"},description:"",name:"textAlign",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"left"'},{value:'"right"'}]}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((event: ChangeEvent) => void)"}},readOnly:{defaultValue:null,description:"",name:"readOnly",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!0,type:{name:"string"}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},min:{defaultValue:null,description:"",name:"min",required:!1,type:{name:"number"}},max:{defaultValue:null,description:"",name:"max",required:!1,type:{name:"number"}}}}}catch{}const lt=({children:e})=>u.jsx(Co,{className:"absolute mt-1 max-h-60 w-full list-none overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",children:e});try{lt.displayName="ListboxOptions",lt.__docgenInfo={description:"",displayName:"ListboxOptions",props:{}}}catch{}const it=({children:e,badgeType:t="neutral"})=>u.jsx("div",{className:"flex items-center",children:u.jsx(ho,{type:t,children:e})});try{it.displayName="ListboxBadgeOption",it.__docgenInfo={description:"",displayName:"ListboxBadgeOption",props:{badgeType:{defaultValue:{value:"neutral"},description:"",name:"badgeType",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"violet"'},{value:'"green"'},{value:'"neutral"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}}}}}catch{}const st=({children:e,LeftIcon:t})=>u.jsxs("div",{className:"flex items-center gap-2",children:[t?u.jsx(t,{className:"h-3 w-3 fill-neutral-500 ui-selected:fill-primary-500"}):null,u.jsx("div",{className:"paragraph-100",children:e})]});try{st.displayName="ListboxTextOption",st.__docgenInfo={description:"",displayName:"ListboxTextOption",props:{LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}}}}}catch{}const Ve={base:"relative cursor-pointer px-3 py-2 ",selected:"bg-primary-100 text-primary-500 before:absolute before:bottom-0 before:left-0 before:top-0 before:block before:w-[2px] before:rounded-r-md before:bg-primary-400",active:"bg-neutral-50 bg-primary-100",disabled:"cursor-not-allowed bg-neutral-50 text-neutral-400"},Ie=({value:e,disabled:t,children:r})=>u.jsx(No,{value:e,as:d.Fragment,disabled:t,children:({active:o,selected:a})=>u.jsx("li",{className:H(Ve.base,o&&Ve.active,a&&Ve.selected,t&&Ve.disabled),children:r})});Ie.BadgeOption=it;Ie.TextOption=st;try{Ie.displayName="ListboxOption",Ie.__docgenInfo={description:"",displayName:"ListboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const ut=({placeholder:e,value:t,badgeType:r="neutral"})=>t?u.jsx(ho,{type:r,children:t}):u.jsx("div",{className:"paragraph-100 text-neutral-600",children:e});try{ut.displayName="ListboxButtonBadgeValue",ut.__docgenInfo={description:"",displayName:"ListboxButtonBadgeValue",props:{placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | null"}},badgeType:{defaultValue:{value:"neutral"},description:"",name:"badgeType",required:!1,type:{name:"enum",value:[{value:'"primary"'},{value:'"violet"'},{value:'"green"'},{value:'"neutral"'},{value:'"yellow"'},{value:'"teal"'},{value:'"orange"'},{value:'"pink"'},{value:'"red"'},{value:'"purple"'}]}}}}}catch{}const dt=({placeholder:e,value:t})=>t?u.jsx("div",{className:"paragraph-100",children:t}):u.jsx("div",{className:"paragraph-100 text-neutral-600 group-hover:text-neutral-700",children:e});try{dt.displayName="ListboxButtonTextValue",dt.__docgenInfo={description:"",displayName:"ListboxButtonTextValue",props:{placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string | number | null"}}}}}catch{}const Se=({children:e,disabled:t})=>u.jsxs(Eo,{disabled:t,className:H("group flex h-8 w-full cursor-pointer items-center rounded border border-neutral-400 bg-neutral-0 py-2 pl-3 pr-8 outline-none hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",t&&"cursor-not-allowed border-neutral-300 bg-neutral-100 text-neutral-600 hover:border-neutral-300"),children:[e,u.jsx("div",{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100 focus:outline-none",children:u.jsx(ke,{className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})})]});Se.BadgeValue=ut;Se.TextValue=dt;try{Se.displayName="ListboxButton",Se.__docgenInfo={description:"",displayName:"ListboxButton",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Wr=H("[.group.form-field-group_&:first-child_button]:rounded-r-none [.group.form-field-group_&:first-child_button]:border-r-0","[.group.form-field-group_&:not(:first-child):not(:last-child)_button]:rounded-none [.group.form-field-group_&:not(:first-child):not(:last-child)_button]:border-r-0","[.group.form-field-group_&:last-child_button]:rounded-l-none"),xe=({children:e,value:t,onChange:r,className:o})=>u.jsx(Mr,{value:t,onChange:r,children:u.jsx("div",{className:H("relative w-full",Wr,o),children:e})});xe.Button=Se;xe.Options=lt;xe.Option=Ie;try{xe.displayName="Listbox",xe.__docgenInfo={description:"",displayName:"Listbox",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const ct=({value:e,children:t})=>u.jsx(Te,{value:e,className:"paragraph-100 flex cursor-pointer items-center gap-1 px-3 py-2 text-neutral-700 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{ct.displayName="MultiComboboxCustomOption",ct.__docgenInfo={description:"",displayName:"MultiComboboxCustomOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const pt=({children:e})=>u.jsx("div",{className:"px-3 py-2 ui-selected:bg-primary-100",children:e});try{pt.displayName="MultiComboboxEmptyOption",pt.__docgenInfo={description:"",displayName:"MultiComboboxEmptyOption",props:{}}}catch{}const mt=({id:e,displayValue:t,placeholder:r,onChange:o,showButton:a=!0,disabled:f=!1,...l})=>u.jsxs("div",{className:"relative",children:[u.jsx(qt,{id:e,name:e,placeholder:r,displayValue:()=>t,onChange:o,className:H("paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200",f&&"cursor-not-allowed border-neutral-300 bg-neutral-100 text-neutral-600 hover:border-neutral-300"),...l}),a&&!f?u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{name:"caret-down",className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})}):null]});try{mt.displayName="MultiComboboxInput",mt.__docgenInfo={description:"",displayName:"MultiComboboxInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},displayValue:{defaultValue:null,description:"",name:"displayValue",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},showButton:{defaultValue:{value:"true"},description:"",name:"showButton",required:!1,type:{name:"boolean"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"string"}},autoFocus:{defaultValue:null,description:"",name:"autoFocus",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string | ((bag: InputRenderPropArg) => string)"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},as:{defaultValue:null,description:"",name:"as",required:!1,type:{name:"enum",value:[{value:'"input"'}]}},refName:{defaultValue:null,description:"",name:"refName",required:!1,type:{name:"string"}}}}}catch{}const bt=({value:e,children:t})=>u.jsxs(Te,{value:e,className:"relative flex cursor-pointer items-center px-3 py-2 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:[t,u.jsx("div",{className:"absolute inset-y-0 right-3 hidden items-center fill-primary-500 ui-selected:flex",children:u.jsx($o,{})})]});try{bt.displayName="MultiComboboxOption",bt.__docgenInfo={description:"",displayName:"MultiComboboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const ft=({children:e,className:t})=>u.jsx(Bt,{hold:!0,className:H("absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",t),children:e});try{ft.displayName="MultiComboboxOptions",ft.__docgenInfo={description:"",displayName:"MultiComboboxOptions",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const vt=({children:e})=>u.jsx("div",{className:"flex flex-wrap gap-2",children:e});try{vt.displayName="MultiComboboxResultsBadges",vt.__docgenInfo={description:"",displayName:"MultiComboboxResultsBadges",props:{}}}catch{}const gt=({children:e})=>u.jsx("div",{className:"paragraph-100 mt-2 text-neutral-900",children:e});try{gt.displayName="MultiComboboxResultsLabel",gt.__docgenInfo={description:"",displayName:"MultiComboboxResultsLabel",props:{}}}catch{}const xt=({children:e})=>u.jsx("div",{className:"flex flex-wrap gap-2",children:e});try{xt.displayName="MultiComboboxResultsTags",xt.__docgenInfo={description:"",displayName:"MultiComboboxResultsTags",props:{}}}catch{}const yt=({children:e})=>u.jsx("div",{className:"paragraph-100",children:e});try{yt.displayName="MultiComboboxResultsText",yt.__docgenInfo={description:"",displayName:"MultiComboboxResultsText",props:{}}}catch{}const fe=({children:e})=>u.jsx("div",{className:"flex flex-col gap-2",children:e});fe.Label=gt;fe.Text=yt;fe.Badges=vt;fe.Tags=xt;try{fe.displayName="MultiComboboxResults",fe.__docgenInfo={description:"",displayName:"MultiComboboxResults",props:{}}}catch{}const ce=({value:e,onChange:t,children:r})=>u.jsx(Io,{multiple:!0,value:e,onChange:t,children:u.jsx("div",{className:"relative",children:r})});ce.Input=mt;ce.Options=ft;ce.Option=bt;ce.CustomOption=ct;ce.EmptyOption=pt;ce.Results=fe;try{ce.displayName="MultiCombobox",ce.__docgenInfo={description:"",displayName:"MultiCombobox",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue[]"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue[]) => void"}}}}}catch{}const ht=({value:e,children:t})=>u.jsx(Te,{value:e,className:"paragraph-100 flex cursor-pointer items-center gap-1 px-3 py-2 text-neutral-700 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{ht.displayName="SingleComboboxCustomOption",ht.__docgenInfo={description:"",displayName:"SingleComboboxCustomOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const _t=({children:e})=>u.jsx("div",{className:"px-3 py-2 ui-selected:bg-primary-100",children:e});try{_t.displayName="SingleComboboxEmptyOption",_t.__docgenInfo={description:"",displayName:"SingleComboboxEmptyOption",props:{}}}catch{}const Ot=({id:e,displayValue:t,placeholder:r,onChange:o,showButton:a=!0})=>u.jsxs("div",{className:"relative",children:[u.jsx(qt,{id:e,name:e,placeholder:r,displayValue:t,onChange:o,className:"paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200 disabled:border-neutral-300 disabled:bg-neutral-100 disabled:text-neutral-600"}),a?u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{name:"caret-down",className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})}):null]});try{Ot.displayName="SingleComboboxInput",Ot.__docgenInfo={description:"",displayName:"SingleComboboxInput",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},displayValue:{defaultValue:null,description:"",name:"displayValue",required:!1,type:{name:"((item: TValue) => string)"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(event: ChangeEvent) => void"}},showButton:{defaultValue:{value:"true"},description:"",name:"showButton",required:!1,type:{name:"boolean"}}}}}catch{}const It=({children:e})=>u.jsx(Bt,{hold:!0,className:"absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-neutral-300 bg-neutral-0 shadow-md outline-none ring-0",children:e});try{It.displayName="SingleComboboxOptions",It.__docgenInfo={description:"",displayName:"SingleComboboxOptions",props:{}}}catch{}const St=({onUnselect:e,children:t})=>u.jsx("div",{className:"relative",children:u.jsxs("div",{className:"paragraph-100 flex h-8 w-full items-center rounded border border-neutral-400 py-2 pl-3 pr-8 focus-visible:border-primary-400 focus-visible:ring-2 focus-visible:ring-primary-200",children:[u.jsx(Uo,{onClick:e,children:t}),u.jsx(Ae,{className:"absolute inset-y-0 right-0 flex items-center px-1.5",children:u.jsx("div",{className:"flex h-5 w-5 items-center justify-center rounded rounded-r-md bg-neutral-100",children:u.jsx(ke,{className:"h-3 w-3 fill-neutral-600","aria-hidden":"true"})})})]})});try{St.displayName="SingleComboboxResultInput",St.__docgenInfo={description:"",displayName:"SingleComboboxResultInput",props:{onUnselect:{defaultValue:null,description:"",name:"onUnselect",required:!0,type:{name:"() => void"}}}}}catch{}const Et=({value:e,children:t})=>u.jsx(Te,{value:e,className:"relative flex cursor-pointer items-center px-3 py-2 ui-selected:bg-primary-100 ui-selected:text-primary-500 ui-selected:before:absolute ui-selected:before:bottom-0 ui-selected:before:left-0 ui-selected:before:top-0 ui-selected:before:block ui-selected:before:w-[2px] ui-selected:before:rounded-r-md ui-selected:before:bg-primary-400 ui-active:bg-neutral-50 ui-active:ui-selected:bg-primary-100",children:t});try{Et.displayName="SingleComboboxOption",Et.__docgenInfo={description:"",displayName:"SingleComboboxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"TValue"}}}}}catch{}const pe=({value:e,onChange:t,children:r,disabled:o})=>u.jsx(Io,{value:e,onChange:t,disabled:o,children:u.jsx("div",{className:"relative",children:r})});pe.Input=Ot;pe.ResultInput=St;pe.Options=It;pe.Option=Et;pe.EmptyOption=_t;pe.CustomOption=ht;try{pe.displayName="SingleCombobox",pe.__docgenInfo={description:"",displayName:"SingleCombobox",props:{value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"TValue"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: TValue) => void"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}}}}}catch{}const Ct=({children:e})=>u.jsx("div",{className:"form-field-group group flex w-full flex-row",children:e});try{Ct.displayName="FormFieldGroup",Ct.__docgenInfo={description:"",displayName:"FormFieldGroup",props:{}}}catch{}const Nt=({ariaDescribedBy:e,readOnly:t,autoSelect:r,onClear:o,error:a,value:f,disabled:l,className:n,...i})=>{const p=d.useRef(null),m=!t&&!l&&f!==void 0&&f!=="",v=d.useCallback(()=>{r&&p.current&&p.current.select()},[r]),I=d.useCallback(s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),s.stopPropagation(),o())},[o]);return u.jsxs("div",{className:H("relative w-full"),children:[u.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3","aria-hidden":"true",children:u.jsx(wo,{className:"text-gray-400 h-3.5 w-3.5 fill-neutral-600"})}),u.jsx("input",{ref:p,"aria-describedby":e,onMouseOver:v,onFocus:v,onClick:v,type:"search",className:H("paragraph-100 relative block h-8 w-full rounded border border-neutral-400 py-2 pl-9 pr-8 text-neutral-800 placeholder:text-neutral-600 focus:outline-none",t&&"bg-neutral-100",l&&"cursor-not-allowed bg-neutral-100 text-neutral-600",!a&&!l&&"hover:border-neutral-600 focus:border-primary-400 focus:ring-2 focus:ring-primary-200",a&&!l&&"border-danger-500",n),readOnly:t,disabled:l,value:f,...i}),m?u.jsx("div",{className:"absolute inset-y-0 right-0 z-10 flex items-center justify-center pr-2",children:u.jsx("button",{type:"button","aria-label":"Clear search input",tabIndex:0,onClick:o,onKeyDown:I,className:"rounded bg-neutral-100 p-0.5 hover:bg-neutral-200",children:u.jsx(Vo,{className:"h-3 w-3 fill-neutral-600"})})}):null]})};try{Nt.displayName="SearchInput",Nt.__docgenInfo={description:"",displayName:"SearchInput",props:{autoSelect:{defaultValue:null,description:"",name:"autoSelect",required:!1,type:{name:"boolean"}},ariaDescribedBy:{defaultValue:null,description:"",name:"ariaDescribedBy",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"boolean"}},onClear:{defaultValue:null,description:"",name:"onClear",required:!0,type:{name:"() => void"}}}}}catch{}const Je={base:"group relative flex items-center gap-3 rounded-lg bg-neutral-0 border p-4 border-neutral-300 hover:border-primary-600 hover:bg-primary-50 cursor-pointer focus:outline-none data-[focus]:outline-2 data-[focus]:outline-primary-200",checked:"border-primary-600 bg-primary-600 hover:bg-primary-600 hover:text-neutral-0",disabled:"bg-neutral-100 group-hover:border-neutral-300 group-hover:bg-neutral-100 hover:border-neutral-300 hover:bg-neutral-100 cursor-not-allowed"},Me={base:"relative inline-block h-4 w-4 shrink-0 rounded-full bg-neutral-0 border border-neutral-300",unchecked:"group-hover:border-primary-600 group-hover:bg-neutral-0",checked:"border-transparent",disabled:"bg-neutral-200 border-neutral-200 group-hover:border-neutral-200 group-hover:bg-neutral-200"},Xr=({children:e})=>u.jsx("h2",{className:"headline-500 text-neutral-900 group-[.is-checked]:text-neutral-0 group-[.is-disabled]:text-neutral-500",children:e}),Yr=({children:e})=>u.jsx("p",{className:"paragraph-200 text-neutral-800 group-[.is-checked]:text-neutral-0 group-[.is-disabled]:text-neutral-500",children:e}),me=({children:e,value:t,disabled:r,className:o})=>u.jsx(zt,{value:t,disabled:r,as:d.Fragment,children:({checked:a,disabled:f})=>u.jsxs("div",{className:H(Je.base,a&&H("is-checked",Je.checked),f&&H("is-disabled",Je.disabled)),children:[u.jsx("div",{className:H(Me.base,!a&&Me.unchecked,a&&Me.checked,f&&Me.disabled),children:a&&u.jsx("div",{className:H("absolute inset-0 m-auto block h-2 w-2 rounded-full bg-primary-600",f&&"bg-neutral-500")})}),u.jsx("div",{className:H("flex flex-col",o),children:e})]})});me.Title=Xr;me.Description=Yr;try{me.displayName="RadioBoxOption",me.__docgenInfo={description:"",displayName:"RadioBoxOption",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}try{me.Title.displayName="RadioBoxOption.Title",me.Title.__docgenInfo={description:"",displayName:"RadioBoxOption.Title",props:{}}}catch{}try{me.Description.displayName="RadioBoxOption.Description",me.Description.__docgenInfo={description:"",displayName:"RadioBoxOption.Description",props:{}}}catch{}const ye=({id:e,value:t,children:r,onChange:o,className:a})=>u.jsx(Ro,{id:e,value:t,onChange:o,className:a,children:r});ye.Option=me;try{ye.displayName="RadioBox",ye.__docgenInfo={description:"",displayName:"RadioBox",props:{id:{defaultValue:null,description:"",name:"id",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}try{ye.Option.displayName="RadioBox.Option",ye.Option.__docgenInfo={description:"",displayName:"RadioBox.Option",props:{value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const Y=({children:e})=>u.jsx("div",{className:"w-full",children:e});Y.LabelGroup=tt;Y.Label=et;Y.Description=Ye;Y.ErrorMessage=Ze;Y.TextInput=rt;Y.Textarea=nt;Y.RadioInput=Fe;Y.NumberInput=at;Y.Listbox=xe;Y.MultiCombobox=ce;Y.SingleCombobox=pe;Y.Group=Ct;Y.SearchInput=Nt;Y.RadioBox=ye;try{Y.displayName="FormField",Y.__docgenInfo={description:"",displayName:"FormField",props:{}}}catch{}export{Y as F,ye as R,pe as S,Ct as a}; diff --git a/assets/form-field-group.stories-D6_h9T9i.js b/assets/form-field-group.stories-CNEhqW5L.js similarity index 95% rename from assets/form-field-group.stories-D6_h9T9i.js rename to assets/form-field-group.stories-CNEhqW5L.js index e5bc65e7..f9df9925 100644 --- a/assets/form-field-group.stories-D6_h9T9i.js +++ b/assets/form-field-group.stories-CNEhqW5L.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{a as j,F as r}from"./form-field-BtJxu7hP.js";import"./index-0d5eMwbi.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-Da1HxQE-.js";import"./index-h1jAayoZ.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const q={title:"Input / Combined Fields",component:j},l=({error:i=!1,disabled:s=!1})=>e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",children:"Textfields Only"}),e.jsx(r.Description,{id:"value-description",children:"A group with only textfields"})]}),e.jsxs(r.Group,{children:[e.jsx(r.TextInput,{id:"value",value:"I",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Love",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Abusix",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s})]})]}),e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",children:"Mixed Fields"}),e.jsx(r.Description,{id:"value-description",children:"A group with mixed fields (textfields and listboxes)"})]}),e.jsxs(r.Group,{children:[e.jsx(r.TextInput,{id:"value",value:"I",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Love",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Abusix",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsxs(r.Listbox,{value:"",onChange:()=>{},children:[e.jsx(r.Listbox.Button,{children:e.jsx(r.Listbox.Button.TextValue,{value:"",placeholder:"Listbox"})}),e.jsx("div",{className:"relative z-10",children:e.jsxs(r.Listbox.Options,{children:[e.jsx(r.Listbox.Option,{value:"Option 1",children:e.jsx(r.Listbox.Option.TextOption,{children:"Option 1"})}),e.jsx(r.Listbox.Option,{value:"Option 2",children:e.jsx(r.Listbox.Option.TextOption,{children:"Option 2"})})]})})]})]})]})]}),t={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{})})},o={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{error:!0})})},a={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{disabled:!0})})};var n,d,p;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{a as j,F as r}from"./form-field-2xLK_lYH.js";import"./index-0d5eMwbi.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-BIezdMmM.js";import"./index-BgfbgFhO.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const q={title:"Input / Combined Fields",component:j},l=({error:i=!1,disabled:s=!1})=>e.jsxs("div",{className:"flex flex-col gap-5",children:[e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",children:"Textfields Only"}),e.jsx(r.Description,{id:"value-description",children:"A group with only textfields"})]}),e.jsxs(r.Group,{children:[e.jsx(r.TextInput,{id:"value",value:"I",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Love",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Abusix",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s})]})]}),e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",children:"Mixed Fields"}),e.jsx(r.Description,{id:"value-description",children:"A group with mixed fields (textfields and listboxes)"})]}),e.jsxs(r.Group,{children:[e.jsx(r.TextInput,{id:"value",value:"I",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Love",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsx(r.TextInput,{id:"value",value:"Abusix",placeholder:"Placeholder",onChange:()=>{},ariaDescribedBy:"value-description",error:i,disabled:s}),e.jsxs(r.Listbox,{value:"",onChange:()=>{},children:[e.jsx(r.Listbox.Button,{children:e.jsx(r.Listbox.Button.TextValue,{value:"",placeholder:"Listbox"})}),e.jsx("div",{className:"relative z-10",children:e.jsxs(r.Listbox.Options,{children:[e.jsx(r.Listbox.Option,{value:"Option 1",children:e.jsx(r.Listbox.Option.TextOption,{children:"Option 1"})}),e.jsx(r.Listbox.Option,{value:"Option 2",children:e.jsx(r.Listbox.Option.TextOption,{children:"Option 2"})})]})})]})]})]})]}),t={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{})})},o={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{error:!0})})},a={render:()=>e.jsx("div",{className:"w-120",children:e.jsx(l,{disabled:!0})})};var n,d,p;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`{ render: () =>
diff --git a/assets/icon-button-DlSTEzH7.js b/assets/icon-button-k2wtPfcV.js similarity index 76% rename from assets/icon-button-DlSTEzH7.js rename to assets/icon-button-k2wtPfcV.js index 205e990f..d9b7e93e 100644 --- a/assets/icon-button-DlSTEzH7.js +++ b/assets/icon-button-k2wtPfcV.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-C798UXYj.js";import{c as l}from"./class-names-DnY5YZNL.js";const d={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"bg-neutral-0 text-neutral-600 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-700 active:bg-neutral-100 active:text-neutral-700 focus:ring-2 focus:ring-primary-200 disabled:border-neutral-300 disabled:text-neutral-400 disabled:bg-neutral-0 fill-neutral-600",minimal:"text-neutral-600 hover:text-neutral-700 hover:bg-neutral-100 active:bg-neutral-200 active:text-neutral-700 focus:ring-2 focus:ring-primary-200 focus:bg-neutral-50 disabled:text-neutral-400 disabled:bg-transparent fill-neutral-600",danger:"bg-danger-500 text-neutral-0 hover:bg-danger-600 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-500 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600"},a=({Icon:e,variant:t="primary",className:n,...i})=>r.jsx("button",{type:"button",className:l("inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded focus:outline-none",d[t],n),...i,children:r.jsx(e,{className:"h-3 w-3"})});try{a.displayName="IconButton",a.__docgenInfo={description:"",displayName:"IconButton",props:{Icon:{defaultValue:null,description:"",name:"Icon",required:!0,type:{name:"ElementType"}},variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"danger"'},{value:'"primary"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}}}}}catch{}export{a as I}; +import{j as r}from"./jsx-runtime-C798UXYj.js";import{c as l}from"./class-names-DnY5YZNL.js";const d={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"bg-neutral-0 text-neutral-600 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-700 active:bg-neutral-100 active:text-neutral-700 focus:ring-2 focus:ring-primary-200 disabled:border-neutral-300 disabled:text-neutral-400 disabled:bg-neutral-0 fill-neutral-600",minimal:"text-neutral-600 hover:text-neutral-700 hover:bg-neutral-100 active:bg-neutral-200 active:text-neutral-700 focus:ring-2 focus:ring-primary-200 focus:bg-neutral-50 disabled:text-neutral-400 disabled:bg-transparent fill-neutral-600",danger:"bg-danger-500 text-neutral-0 hover:bg-danger-600 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-500 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600"},a=({Icon:e,variant:n="primary",className:t,...i})=>r.jsx("button",{type:"button",className:l("inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded focus:outline-none",d[n],t),...i,children:r.jsx(e,{className:"h-3 w-3"})});try{a.displayName="IconButton",a.__docgenInfo={description:"",displayName:"IconButton",props:{Icon:{defaultValue:null,description:"",name:"Icon",required:!0,type:{name:"ElementType"}},variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"danger"'},{value:'"primary"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}}}}}catch{}export{a as I}; diff --git a/assets/icon-button.stories-CERmelnz.js b/assets/icon-button.stories-0-APhIQ1.js similarity index 90% rename from assets/icon-button.stories-CERmelnz.js rename to assets/icon-button.stories-0-APhIQ1.js index 9e029bda..7fa51d78 100644 --- a/assets/icon-button.stories-CERmelnz.js +++ b/assets/icon-button.stories-0-APhIQ1.js @@ -1 +1 @@ -import{I as e}from"./icon-button-DlSTEzH7.js";import{i as s}from"./zoom-to-fit-icon-DdsCB6de.js";import"./jsx-runtime-C798UXYj.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";const n=["primary","secondary","minimal","danger","danger-secondary"],l={title:"IconButton",component:e,args:{variant:"primary",disabled:!1,Icon:s},argTypes:{variant:{options:n}}},r={};var a,o,t;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(t=(o=r.parameters)==null?void 0:o.docs)==null?void 0:t.source}}};const u=["Default"];export{r as Default,u as __namedExportsOrder,l as default}; +import{I as e}from"./icon-button-k2wtPfcV.js";import{i as s}from"./zoom-to-fit-icon-DdsCB6de.js";import"./jsx-runtime-C798UXYj.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";const n=["primary","secondary","minimal","danger","danger-secondary"],l={title:"IconButton",component:e,args:{variant:"primary",disabled:!1,Icon:s},argTypes:{variant:{options:n}}},r={};var a,o,t;r.parameters={...r.parameters,docs:{...(a=r.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(t=(o=r.parameters)==null?void 0:o.docs)==null?void 0:t.source}}};const u=["Default"];export{r as Default,u as __namedExportsOrder,l as default}; diff --git a/assets/icons-Dp8Wmtux.js b/assets/icons-BtgjIq6b.js similarity index 98% rename from assets/icons-Dp8Wmtux.js rename to assets/icons-BtgjIq6b.js index af1627c3..f926e8d0 100644 --- a/assets/icons-Dp8Wmtux.js +++ b/assets/icons-BtgjIq6b.js @@ -1,4 +1,4 @@ -import{j as o}from"./jsx-runtime-C798UXYj.js";import{useMDXComponents as I}from"./index-CFK-oMtb.js";import{ae as g,aj as r,ak as t}from"./index-D4CCEPie.js";import{m as S,n as i,o as v,p as l,q as d,r as h,s as u,t as m,u as C,v as p,w as b,x as w,y as f,z as T,A,B as y,C as D,D as L,E as R,F,G as P,H as B,I as k,J as H,K as M,L as G,M as O,N as E,O as N,P as U,Q as x,R as V,T as j,U as z,V as K,W,X as q,Y as J,Z,_,$ as X,a0 as Q,a1 as Y,a2 as $,a3 as oo,a4 as no,a5 as co,a6 as ao,a7 as eo,a8 as Io,a9 as so,aa as go,ab as ro,ac as to,ad as So,ae as io,af as vo,ag as lo,ah as ho,ai as uo,aj as mo,ak as Co,al as po,am as bo,an as wo,ao as fo,ap as To,aq as Ao,ar as yo,as as Do,at as Lo,au as Ro,av as Fo,aw as Po,ax as Bo,ay as ko,az as Ho,S as Mo,aA as Go,l as Oo,aB as Eo,aC as No,aD as Uo,aE as xo,aF as Vo,aG as jo,aH as zo,aI as Ko,aJ as Wo,aK as qo,aL as Jo,aM as Zo,aN as _o,aO as Xo,aP as Qo,aQ as Yo,aR as $o,aS as on,aT as nn,aU as cn,aV as an,aW as en,aX as In,aY as sn,aZ as gn,a_ as rn,a$ as tn,b0 as Sn,b1 as vn,b2 as ln,b3 as dn,b4 as hn,j as un,b5 as mn,b6 as Cn,b7 as pn,b8 as bn,b9 as wn,ba as fn,bb as Tn,bc as An,bd as yn,be as Dn,bf as Ln,bg as Rn,bh as Fn,bi as Pn,bj as Bn,bk as kn,a as Hn,bl as Mn,bm as Gn,bn as On,bo as En,bp as Nn,bq as Un,br as xn,bs as Vn,bt as jn,bu as zn,bv as Kn,bw as Wn,bx as qn,by as Jn,bz as Zn,bA as _n,bB as Xn,bC as Qn,bD as Yn,bE as $n,bF as oc,bG as nc,bH as cc,bI as ac,bJ as ec,bK as Ic,bL as sc,bM as gc,bN as rc,bO as tc,bP as Sc,bQ as ic,bR as vc,f as lc,bS as dc,bT as hc,bU as uc,bV as mc,bW as Cc,bX as pc,bY as bc,bZ as wc,b_ as fc,b$ as Tc,c0 as Ac,c1 as yc,c2 as Dc,c3 as Lc,c4 as Rc,c5 as Fc,c6 as Pc,c7 as Bc,c8 as kc,c9 as Hc,ca as Mc,cb as Gc,cc as Oc,cd as Ec,ce as Nc,cf as Uc,cg as xc,ch as Vc,ci as jc,cj as zc,ck as Kc,cl as Wc,cm as qc,cn as Jc,co as Zc,cp as _c,cq as Xc,cr as Qc,cs as Yc,ct as $c,cu as oa,cv as na,cw as ca,cx as aa,cy as ea,cz as Ia,cA as sa,cB as ga,cC as ra,cD as ta,cE as Sa,cF as ia,cG as va,cH as la,cI as da,cJ as ha,cK as ua,cL as ma,cM as Ca,cN as pa,cO as ba,cP as wa,cQ as fa,cR as Ta,cS as Aa,cT as ya,cU as Da,cV as La,cW as Ra,cX as Fa,cY as Pa,cZ as Ba,c_ as ka,c$ as Ha,d0 as Ma,d1 as Ga,d2 as Oa,d3 as Ea,d4 as Na,d5 as Ua,d6 as xa,d7 as Va,d8 as ja,d9 as za,da as Ka,db as Wa,dc as qa,dd as Ja,de as Za,df as _a,dg as Xa,dh as Qa,di as Ya,dj as $a,dk as oe,dl as ne,dm as ce,dn as ae,dp as ee,dq as Ie,dr as se,ds as ge,dt as re,du as te,dv as Se,c as ie,dw as ve,dx as le,dy as de,dz as he,dA as ue,dB as me,dC as Ce,dD as pe,dE as be,dF as we,dG as fe,dH as Te,dI as Ae,dJ as ye,dK as De,dL as Le,dM as Re,dN as Fe,dO as Pe,dP as Be,dQ as ke,dR as He,dS as Me,dT as Ge,dU as Oe,dV as Ee,dW as Ne,dX as Ue,dY as xe,dZ as Ve,d_ as je,d$ as ze,e0 as Ke,e1 as We,e2 as qe,e3 as Je,e4 as Ze,e5 as _e,e6 as Xe,e7 as Qe,e8 as Ye,e9 as $e,ea as oI,eb as nI,ec as cI,ed as aI,ee as eI,ef as II,eg as sI,b as gI,eh as rI,ei as tI,ej as SI,ek as iI,el as vI,em as lI,en as dI,eo as hI,ep as uI,eq as mI,er as CI,es as pI,et as bI,eu as wI,ev as fI,ew as TI,ex as AI,ey as yI,ez as DI,eA as LI,eB as RI,eC as FI,eD as PI,eE as BI,eF as kI,eG as HI,eH as MI,eI as GI,eJ as OI,eK as EI,eL as NI,eM as UI,eN as xI,eO as VI,eP as jI,eQ as zI,eR as KI,eS as WI,eT as qI,eU as JI,eV as ZI,eW as _I,eX as XI,eY as QI,eZ as YI,e_ as $I,e$ as os,f0 as ns,f1 as cs,f2 as as,f3 as es,f4 as Is,f5 as ss,f6 as gs,f7 as rs,f8 as ts,f9 as Ss,fa as is,fb as vs,fc as ls,fd as ds,fe as hs,ff as us,fg as ms,fh as Cs,fi as ps,fj as bs,fk as ws,fl as fs,fm as Ts,fn as As,fo as ys,fp as Ds,fq as Ls,fr as Rs,fs as Fs,ft as Ps,fu as Bs,fv as ks,fw as Hs,fx as Ms,fy as Gs,fz as Os,fA as Es,fB as Ns,fC as Us,fD as xs,fE as Vs,fF as js,fG as zs,fH as Ks,fI as Ws,fJ as qs,fK as Js,fL as Zs,fM as _s,fN as Xs,fO as Qs,fP as Ys,fQ as $s,fR as og,fS as ng,fT as cg,fU as ag,fV as eg,fW as Ig,fX as sg,fY as gg,fZ as rg,f_ as tg,f$ as Sg,g0 as ig,g1 as vg,g2 as lg,g3 as dg,g4 as hg,g as ug,g5 as mg,g6 as Cg,g7 as pg,g8 as bg,g9 as wg,ga as fg,gb as Tg,gc as Ag,gd as yg,ge as Dg,gf as Lg,gg as Rg,gh as Fg,gi as Pg,gj as Bg,gk as kg,gl as Hg,gm as Mg,gn as Gg,go as Og,gp as Eg,gq as Ng,gr as Ug,gs as xg,gt as Vg,gu as jg,h as zg,gv as Kg,gw as Wg,gx as qg,gy as Jg,gz as Zg,gA as _g,gB as Xg,gC as Qg,gD as Yg,gE as $g,gF as or,gG as nr,gH as cr,gI as ar,gJ as er,gK as Ir,gL as sr,gM as gr,gN as rr,gO as tr,gP as Sr,gQ as ir,gR as vr,gS as lr,gT as dr,gU as hr,gV as ur,gW as mr,gX as Cr,gY as pr,gZ as br,g_ as wr,g$ as fr,h0 as Tr,h1 as Ar,h2 as yr,h3 as Dr,h4 as Lr,h5 as Rr,h6 as Fr,h7 as Pr,h8 as Br,h9 as kr,ha as Hr,hb as Mr,hc as Gr,hd as Or,he as Er,hf as Nr,hg as Ur,hh as xr,hi as Vr,hj as jr,d as zr,k as Kr,hk as Wr,hl as qr,hm as Jr,hn as Zr,ho as _r,hp as Xr,hq as Qr,hr as Yr,hs as $r,ht as ot,hu as nt,hv as ct,hw as at,hx as et,hy as It,hz as st,hA as gt,hB as rt,hC as tt,hD as St,hE as it,hF as vt,hG as lt,hH as dt,hI as ht,hJ as ut,hK as mt,hL as Ct,hM as pt,hN as bt,hO as wt,hP as ft,hQ as Tt,hR as At,hS as yt,hT as Dt,hU as Lt,i as Rt,e as Ft,hV as Pt,hW as Bt,hX as kt,hY as Ht,hZ as Mt,h_ as Gt,h$ as Ot,i0 as Et,i1 as Nt,i2 as Ut,i3 as xt}from"./zoom-to-fit-icon-DdsCB6de.js";import"./index-0d5eMwbi.js";import"./iframe-B1Sidt8M.js";import"../sb-preview/runtime.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";const Vt=Object.freeze(Object.defineProperty({__proto__:null,AddClipIcon:S,AddColumnLeftIcon:i,AddColumnRightIcon:v,AddIcon:l,AddLocationIcon:d,AddRowBottomIcon:h,AddRowTopIcon:u,AddToArtifactIcon:m,AddToFolderIcon:C,AimpointsTargetIcon:p,AirplaneIcon:b,AlignCenterIcon:w,AlignJustifyIcon:f,AlignLeftIcon:T,AlignRightIcon:A,AlignmentBottomIcon:y,AlignmentHorizontalCenterIcon:D,AlignmentLeftIcon:L,AlignmentRightIcon:R,AlignmentTopIcon:F,AlignmentVerticalCenterIcon:P,AnchorIcon:B,AnnotationIcon:k,AntennaIcon:H,AppHeaderIcon:M,ApplicationIcon:G,ApplicationsIcon:O,ArchiveIcon:E,AreaOfInterestIcon:N,ArrayBooleanIcon:U,ArrayDateIcon:x,ArrayFloatingPointIcon:V,ArrayIcon:j,ArrayNumericIcon:z,ArrayStringIcon:K,ArrayTimestampIcon:W,ArrowBottomLeftIcon:q,ArrowBottomRightIcon:J,ArrowDownIcon:Z,ArrowLeftIcon:_,ArrowRightIcon:X,ArrowTopLeftIcon:Q,ArrowTopRightIcon:Y,ArrowUpIcon:$,ArrowsHorizontalIcon:oo,ArrowsVerticalIcon:no,AskIcon:co,AsteriskIcon:ao,AtIcon:eo,AutomaticUpdatesIcon:Io,BacklinkIcon:so,BadgeIcon:go,BanCircleIcon:ro,BankAccountIcon:to,BarcodeIcon:So,BlankIcon:io,BlockedPersonIcon:vo,BoldIcon:lo,BookIcon:ho,BookmarkIcon:uo,BoxIcon:mo,BriefcaseIcon:Co,BringDataIcon:po,BugIcon:bo,BuggyIcon:wo,BuildIcon:fo,CalculatorIcon:To,CalendarIcon:Ao,CameraIcon:yo,CaretDownIcon:Do,CaretLeftIcon:Lo,CaretRightIcon:Ro,CaretUpIcon:Fo,CargoShipIcon:Po,CellTowerIcon:Bo,ChangesIcon:ko,ChartIcon:Ho,ChatIcon:Mo,ChevronBackwardIcon:Go,ChevronDownIcon:Oo,ChevronForwardIcon:Eo,ChevronLeftIcon:No,ChevronRightIcon:Uo,ChevronUpIcon:xo,CircleArrowDownIcon:Vo,CircleArrowLeftIcon:jo,CircleArrowRightIcon:zo,CircleArrowUpIcon:Ko,CircleIcon:Wo,CitationIcon:qo,CleanIcon:Jo,ClipIcon:Zo,ClipboardIcon:_o,CloudDownloadIcon:Xo,CloudIcon:Qo,CloudUploadIcon:Yo,CodeBlockIcon:$o,CodeIcon:on,CogIcon:nn,CollapseAllIcon:cn,ColorFillIcon:an,ColumnLayoutIcon:en,CommentIcon:In,ComparisonIcon:sn,CompassIcon:gn,CompressedIcon:rn,ConfirmIcon:tn,ConsoleIcon:Sn,ContrastIcon:vn,ControlIcon:ln,CreditCardIcon:dn,CrossCircleIcon:hn,CrossIcon:un,CrownIcon:mn,CubeAddIcon:Cn,CubeIcon:pn,CubeRemoveIcon:bn,CurvedRangeChartIcon:wn,CutIcon:fn,CycleIcon:Tn,DashboardIcon:An,DataConnectionIcon:yn,DataLineageIcon:Dn,DatabaseIcon:Ln,DeleteIcon:Rn,DeltaIcon:Fn,DeriveColumnIcon:Pn,DesktopIcon:Bn,DiagnosisIcon:kn,DiagramTreeIcon:Hn,DirectionLeftIcon:Mn,DirectionRightIcon:Gn,DisableIcon:On,DivideIcon:En,DocumentIcon:Nn,DocumentOpenIcon:Un,DocumentShareIcon:xn,DollarIcon:Vn,DotIcon:jn,DoubleCaretHorizontalIcon:zn,DoubleCaretVerticalIcon:Kn,DoubleChevronDownIcon:Wn,DoubleChevronLeftIcon:qn,DoubleChevronRightIcon:Jn,DoubleChevronUpIcon:Zn,DoughnutChartIcon:_n,DownloadIcon:Xn,DragHandleHorizontalIcon:Qn,DragHandleVerticalIcon:Yn,DrawIcon:$n,DrawerLeftFilledIcon:oc,DrawerLeftIcon:nc,DrawerRightFilledIcon:cc,DrawerRightIcon:ac,DriveTimeIcon:ec,DuplicateIcon:Ic,EditIcon:sc,EjectIcon:gc,EmojiIcon:rc,EndorsedIcon:tc,EnvelopeIcon:Sc,EqualsIcon:ic,EraserIcon:vc,ErrorIcon:lc,EuroIcon:dc,ExchangeIcon:hc,ExcludeRowIcon:uc,ExpandAllIcon:mc,ExportIcon:Cc,EyeOffIcon:pc,EyeOnIcon:bc,EyeOpenIcon:wc,FastBackwardIcon:fc,FastForwardIcon:Tc,FeedIcon:Ac,FeedSubscribedIcon:yc,FilmIcon:Dc,FilterIcon:Lc,FilterKeepIcon:Rc,FilterListIcon:Fc,FilterOpenIcon:Pc,FilterRemoveIcon:Bc,FlagIcon:kc,FlameIcon:Hc,FlashIcon:Mc,FloatingPointIcon:Gc,FloppyDiskIcon:Oc,FlowBranchIcon:Ec,FlowEndIcon:Nc,FlowLinearIcon:Uc,FlowReviewBranchIcon:xc,FlowReviewIcon:Vc,FlowsIcon:jc,FolderCloseIcon:zc,FolderNewIcon:Kc,FolderOpenIcon:Wc,FolderSharedIcon:qc,FolderSharedOpenIcon:Jc,FollowerIcon:Zc,FollowingIcon:_c,FontIcon:Xc,ForkIcon:Qc,FormIcon:Yc,FuelIcon:$c,FullCircleIcon:oa,FullStackedChartIcon:na,FullscreenIcon:ca,FunctionIcon:aa,GanttChartIcon:ea,GeofenceIcon:Ia,GeolocationIcon:sa,GeosearchIcon:ga,GitBranchIcon:ra,GitCommitIcon:ta,GitMergeIcon:Sa,GitNewBranchIcon:ia,GitPullIcon:va,GitPushIcon:la,GitRepoIcon:da,GlassIcon:ha,GlobeIcon:ua,GlobeNetworkIcon:ma,GraphIcon:Ca,GraphRemoveIcon:pa,GreaterThanIcon:ba,GreaterThanOrEqualToIcon:wa,GridIcon:fa,GridViewIcon:Ta,GroupObjectsIcon:Aa,GroupedBarChartIcon:ya,HandDownIcon:Da,HandIcon:La,HandLeftIcon:Ra,HandRightIcon:Fa,HandUpIcon:Pa,HatIcon:Ba,HeaderIcon:ka,HeaderOneIcon:Ha,HeaderThreeIcon:Ma,HeaderTwoIcon:Ga,HeadsetIcon:Oa,HeartBrokenIcon:Ea,HeartIcon:Na,HeatGridIcon:Ua,HeatmapIcon:xa,HelicopterIcon:Va,HelpIcon:ja,HelperManagementIcon:za,HighPriorityIcon:Ka,HighVoltagePoleIcon:Wa,HighlightIcon:qa,HistoryIcon:Ja,HomeIcon:Za,HorizontalBarChartAscIcon:_a,HorizontalBarChartDescIcon:Xa,HorizontalBarChartIcon:Qa,HorizontalDistributionIcon:Ya,HorizontalInbetweenIcon:$a,HurricaneIcon:oe,IdNumberIcon:ne,ImageRotateLeftIcon:ce,ImageRotateRightIcon:ae,ImportIcon:ee,InboxFilteredIcon:Ie,InboxGeoIcon:se,InboxIcon:ge,InboxSearchIcon:re,InboxUpdateIcon:te,InfoIcon:Se,InfoSignIcon:ie,InheritanceIcon:ve,InheritedGroupIcon:le,InnerJoinIcon:de,InsertIcon:he,IntersectionIcon:ue,IpAddressIcon:me,IssueClosedIcon:Ce,IssueIcon:pe,IssueNewIcon:be,ItalicIcon:we,JoinTableIcon:fe,KeyBackspaceIcon:Te,KeyCommandIcon:Ae,KeyControlIcon:ye,KeyDeleteIcon:De,KeyEnterIcon:Le,KeyEscapeIcon:Re,KeyIcon:Fe,KeyOptionIcon:Pe,KeyShiftIcon:Be,KeyTabIcon:ke,KnownVehicleIcon:He,LabTestIcon:Me,LabelIcon:Ge,LayerIcon:Oe,LayerOutlineIcon:Ee,LayersIcon:Ne,LayoutAutoIcon:Ue,LayoutBalloonIcon:xe,LayoutCircleIcon:Ve,LayoutGridIcon:je,LayoutGroupByIcon:ze,LayoutHierarchyIcon:Ke,LayoutIcon:We,LayoutLinearIcon:qe,LayoutSkewGridIcon:Je,LayoutSortedClustersIcon:Ze,LearningIcon:_e,LeftJoinIcon:Xe,LessThanIcon:Qe,LessThanOrEqualToIcon:Ye,LifesaverIcon:$e,LightbulbIcon:oI,LightningIcon:nI,LinkIcon:cI,ListColumnsIcon:aI,ListDetailViewIcon:eI,ListIcon:II,LocateIcon:sI,LockIcon:gI,LogInIcon:rI,LogOutIcon:tI,LowVoltagePoleIcon:SI,ManualIcon:iI,ManuallyEnteredDataIcon:vI,ManyToManyIcon:lI,ManyToOneIcon:dI,MapCreateIcon:hI,MapIcon:uI,MapMarkerIcon:mI,MaximizeIcon:CI,MediaIcon:pI,MenuClosedIcon:bI,MenuIcon:wI,MenuOpenIcon:fI,MergeColumnsIcon:TI,MergeLinksIcon:AI,MinimizeIcon:yI,MinusIcon:DI,MobilePhoneIcon:LI,MobileVideoIcon:RI,ModalFilledIcon:FI,ModalIcon:PI,MoonIcon:BI,MoreIcon:kI,MountainIcon:HI,MoveIcon:MI,MugshotIcon:GI,MultiSelectIcon:OI,MusicIcon:EI,NestIcon:NI,NewDrawingIcon:UI,NewGridItemIcon:xI,NewLayerIcon:VI,NewLayersIcon:jI,NewLinkIcon:zI,NewObjectIcon:KI,NewPersonIcon:WI,NewPrescriptionIcon:qI,NewTextBoxIcon:JI,NinjaIcon:ZI,NotEqualToIcon:_I,NotificationsIcon:XI,NotificationsSnoozeIcon:QI,NotificationsUpdatedIcon:YI,NumberedListIcon:$I,NumericalIcon:os,OfficeIcon:ns,OfflineIcon:cs,OilFieldIcon:as,OneColumnIcon:es,OneToManyIcon:Is,OneToOneIcon:ss,OpenApplicationIcon:gs,OutdatedIcon:rs,PageLayoutIcon:ts,PanelStatsIcon:Ss,PanelTableIcon:is,PaperclipIcon:vs,ParagraphIcon:ls,PathIcon:ds,PathSearchIcon:hs,PauseIcon:us,PeopleIcon:ms,PercentageIcon:Cs,PersonIcon:ps,PhoneIcon:bs,PieChartIcon:ws,PinIcon:fs,PivotIcon:Ts,PivotTableIcon:As,PlayIcon:ys,PlaybookIcon:Ds,PlusIcon:Ls,PolygonFilterIcon:Rs,PowerIcon:Fs,PredictiveAnalysisIcon:Ps,PrescriptionIcon:Bs,PresentationIcon:ks,PrintIcon:Hs,ProjectsIcon:Ms,PropertiesIcon:Gs,PropertyIcon:Os,PublishFunctionIcon:Es,PulseIcon:Ns,RainIcon:Us,RandomIcon:xs,RecordIcon:Vs,RectHeightIcon:js,RectWidthIcon:zs,RectangleIcon:Ks,RedoIcon:Ws,RefreshIcon:qs,RegexIcon:Js,RegressionChartIcon:Zs,RemoveColumnIcon:_s,RemoveColumnLeftIcon:Xs,RemoveColumnRightIcon:Qs,RemoveIcon:Ys,RemoveRowBottomIcon:$s,RemoveRowTopIcon:og,RepeatIcon:ng,ResetIcon:cg,ResolveIcon:ag,RigIcon:eg,RightJoinIcon:Ig,RingIcon:sg,RocketIcon:gg,RocketSlantIcon:rg,RotateDocumentIcon:tg,RotatePageIcon:Sg,RouteIcon:ig,SatelliteIcon:vg,SavedIcon:lg,ScatterPlotIcon:dg,SearchAroundIcon:hg,SearchIcon:ug,SearchTemplateIcon:mg,SearchTextIcon:Cg,SegmentedControlIcon:pg,SelectIcon:bg,SelectionIcon:wg,SendMessageIcon:fg,SendToGraphIcon:Tg,SendToIcon:Ag,SendToMapIcon:yg,SeriesAddIcon:Dg,SeriesConfigurationIcon:Lg,SeriesDerivedIcon:Rg,SeriesFilteredIcon:Fg,SeriesSearchIcon:Pg,SettingsBigIcon:Bg,SettingsIcon:kg,ShapesIcon:Hg,ShareIcon:Mg,SharedFilterIcon:Gg,ShieldIcon:Og,ShipIcon:Eg,ShopIcon:Ng,ShoppingCartIcon:Ug,SignalSearchIcon:xg,SimCardIcon:Vg,SlashIcon:jg,SmallCrossIcon:zg,SmallInfoSignIcon:Kg,SmallMinusIcon:Wg,SmallPlusIcon:qg,SmallSquareIcon:Jg,SmallTickIcon:Zg,SnowflakeIcon:_g,SocialMediaIcon:Xg,SortAlphabeticalDescIcon:Qg,SortAlphabeticalIcon:Yg,SortAscIcon:$g,SortDescIcon:or,SortIcon:nr,SortNumericalDescIcon:cr,SortNumericalIcon:ar,SplitColumnsIcon:er,SquareIcon:Ir,StackedChartIcon:sr,StadiumGeometryIcon:gr,StarEmptyIcon:rr,StarIcon:tr,StepBackwardIcon:Sr,StepChartIcon:ir,StepForwardIcon:vr,StopIcon:lr,StopwatchIcon:dr,StrikethroughIcon:hr,StyleIcon:ur,SwapHorizontalIcon:mr,SwapVerticalIcon:Cr,SwitchIcon:pr,SymbolCircleIcon:br,SymbolCrossIcon:wr,SymbolDiamondIcon:fr,SymbolRectangleIcon:Tr,SymbolSquareIcon:Ar,SymbolTriangleDownIcon:yr,SymbolTriangleUpIcon:Dr,SyringeIcon:Lr,TagIcon:Rr,TakeActionIcon:Fr,TankIcon:Pr,TargetIcon:Br,TaxiIcon:kr,TemperatureIcon:Hr,TextHighlightIcon:Mr,ThDerivedIcon:Gr,ThDisconnectIcon:Or,ThFilteredIcon:Er,ThIcon:Nr,ThListIcon:Ur,ThirdPartyIcon:xr,ThumbsDownIcon:Vr,ThumbsUpIcon:jr,TickCircleIcon:zr,TickIcon:Kr,TimeIcon:Wr,TimelineAreaChartIcon:qr,TimelineBarChartIcon:Jr,TimelineEventsIcon:Zr,TimelineLineChartIcon:_r,TintIcon:Xr,TorchIcon:Qr,TractorIcon:Yr,TrainIcon:$r,TranslateIcon:ot,TrashIcon:nt,TreeIcon:ct,TrendingDownIcon:at,TrendingUpIcon:et,TruckIcon:It,TwoColumnsIcon:st,UnarchiveIcon:gt,UnderlineIcon:rt,UndoIcon:tt,UngroupObjectsIcon:St,UnknownVehicleIcon:it,UnlockIcon:vt,UnpinIcon:lt,UnresolveIcon:dt,UpdatedIcon:ht,UploadIcon:ut,UserIcon:mt,VariableIcon:Ct,VerticalBarChartAscIcon:pt,VerticalBarChartDescIcon:bt,VerticalDistributionIcon:wt,VerticalInbetweenIcon:ft,VideoIcon:Tt,VirusIcon:At,VolumeDownIcon:yt,VolumeOffIcon:Dt,VolumeUpIcon:Lt,WalkIcon:Rt,WarningSignIcon:Ft,WaterfallChartIcon:Pt,WavesIcon:Bt,WidgetButtonIcon:kt,WidgetFooterIcon:Ht,WidgetHeaderIcon:Mt,WidgetIcon:Gt,WindIcon:Ot,WrenchIcon:Et,ZoomInIcon:Nt,ZoomOutIcon:Ut,ZoomToFitIcon:xt},Symbol.toStringTag,{value:"Module"}));function e(n){const c={h1:"h1",p:"p",...I(),...n.components};return o.jsxs(o.Fragment,{children:[o.jsx(g,{title:"Icons gallery"}),` +import{j as o}from"./jsx-runtime-C798UXYj.js";import{useMDXComponents as I}from"./index-CFK-oMtb.js";import{ae as g,aj as r,ak as t}from"./index-D_yKE35a.js";import{m as S,n as i,o as v,p as l,q as d,r as h,s as u,t as m,u as C,v as p,w as b,x as w,y as f,z as T,A,B as y,C as D,D as L,E as R,F,G as P,H as B,I as k,J as H,K as M,L as G,M as O,N as E,O as N,P as U,Q as x,R as V,T as j,U as z,V as K,W,X as q,Y as J,Z,_,$ as X,a0 as Q,a1 as Y,a2 as $,a3 as oo,a4 as no,a5 as co,a6 as ao,a7 as eo,a8 as Io,a9 as so,aa as go,ab as ro,ac as to,ad as So,ae as io,af as vo,ag as lo,ah as ho,ai as uo,aj as mo,ak as Co,al as po,am as bo,an as wo,ao as fo,ap as To,aq as Ao,ar as yo,as as Do,at as Lo,au as Ro,av as Fo,aw as Po,ax as Bo,ay as ko,az as Ho,S as Mo,aA as Go,l as Oo,aB as Eo,aC as No,aD as Uo,aE as xo,aF as Vo,aG as jo,aH as zo,aI as Ko,aJ as Wo,aK as qo,aL as Jo,aM as Zo,aN as _o,aO as Xo,aP as Qo,aQ as Yo,aR as $o,aS as on,aT as nn,aU as cn,aV as an,aW as en,aX as In,aY as sn,aZ as gn,a_ as rn,a$ as tn,b0 as Sn,b1 as vn,b2 as ln,b3 as dn,b4 as hn,j as un,b5 as mn,b6 as Cn,b7 as pn,b8 as bn,b9 as wn,ba as fn,bb as Tn,bc as An,bd as yn,be as Dn,bf as Ln,bg as Rn,bh as Fn,bi as Pn,bj as Bn,bk as kn,a as Hn,bl as Mn,bm as Gn,bn as On,bo as En,bp as Nn,bq as Un,br as xn,bs as Vn,bt as jn,bu as zn,bv as Kn,bw as Wn,bx as qn,by as Jn,bz as Zn,bA as _n,bB as Xn,bC as Qn,bD as Yn,bE as $n,bF as oc,bG as nc,bH as cc,bI as ac,bJ as ec,bK as Ic,bL as sc,bM as gc,bN as rc,bO as tc,bP as Sc,bQ as ic,bR as vc,f as lc,bS as dc,bT as hc,bU as uc,bV as mc,bW as Cc,bX as pc,bY as bc,bZ as wc,b_ as fc,b$ as Tc,c0 as Ac,c1 as yc,c2 as Dc,c3 as Lc,c4 as Rc,c5 as Fc,c6 as Pc,c7 as Bc,c8 as kc,c9 as Hc,ca as Mc,cb as Gc,cc as Oc,cd as Ec,ce as Nc,cf as Uc,cg as xc,ch as Vc,ci as jc,cj as zc,ck as Kc,cl as Wc,cm as qc,cn as Jc,co as Zc,cp as _c,cq as Xc,cr as Qc,cs as Yc,ct as $c,cu as oa,cv as na,cw as ca,cx as aa,cy as ea,cz as Ia,cA as sa,cB as ga,cC as ra,cD as ta,cE as Sa,cF as ia,cG as va,cH as la,cI as da,cJ as ha,cK as ua,cL as ma,cM as Ca,cN as pa,cO as ba,cP as wa,cQ as fa,cR as Ta,cS as Aa,cT as ya,cU as Da,cV as La,cW as Ra,cX as Fa,cY as Pa,cZ as Ba,c_ as ka,c$ as Ha,d0 as Ma,d1 as Ga,d2 as Oa,d3 as Ea,d4 as Na,d5 as Ua,d6 as xa,d7 as Va,d8 as ja,d9 as za,da as Ka,db as Wa,dc as qa,dd as Ja,de as Za,df as _a,dg as Xa,dh as Qa,di as Ya,dj as $a,dk as oe,dl as ne,dm as ce,dn as ae,dp as ee,dq as Ie,dr as se,ds as ge,dt as re,du as te,dv as Se,c as ie,dw as ve,dx as le,dy as de,dz as he,dA as ue,dB as me,dC as Ce,dD as pe,dE as be,dF as we,dG as fe,dH as Te,dI as Ae,dJ as ye,dK as De,dL as Le,dM as Re,dN as Fe,dO as Pe,dP as Be,dQ as ke,dR as He,dS as Me,dT as Ge,dU as Oe,dV as Ee,dW as Ne,dX as Ue,dY as xe,dZ as Ve,d_ as je,d$ as ze,e0 as Ke,e1 as We,e2 as qe,e3 as Je,e4 as Ze,e5 as _e,e6 as Xe,e7 as Qe,e8 as Ye,e9 as $e,ea as oI,eb as nI,ec as cI,ed as aI,ee as eI,ef as II,eg as sI,b as gI,eh as rI,ei as tI,ej as SI,ek as iI,el as vI,em as lI,en as dI,eo as hI,ep as uI,eq as mI,er as CI,es as pI,et as bI,eu as wI,ev as fI,ew as TI,ex as AI,ey as yI,ez as DI,eA as LI,eB as RI,eC as FI,eD as PI,eE as BI,eF as kI,eG as HI,eH as MI,eI as GI,eJ as OI,eK as EI,eL as NI,eM as UI,eN as xI,eO as VI,eP as jI,eQ as zI,eR as KI,eS as WI,eT as qI,eU as JI,eV as ZI,eW as _I,eX as XI,eY as QI,eZ as YI,e_ as $I,e$ as os,f0 as ns,f1 as cs,f2 as as,f3 as es,f4 as Is,f5 as ss,f6 as gs,f7 as rs,f8 as ts,f9 as Ss,fa as is,fb as vs,fc as ls,fd as ds,fe as hs,ff as us,fg as ms,fh as Cs,fi as ps,fj as bs,fk as ws,fl as fs,fm as Ts,fn as As,fo as ys,fp as Ds,fq as Ls,fr as Rs,fs as Fs,ft as Ps,fu as Bs,fv as ks,fw as Hs,fx as Ms,fy as Gs,fz as Os,fA as Es,fB as Ns,fC as Us,fD as xs,fE as Vs,fF as js,fG as zs,fH as Ks,fI as Ws,fJ as qs,fK as Js,fL as Zs,fM as _s,fN as Xs,fO as Qs,fP as Ys,fQ as $s,fR as og,fS as ng,fT as cg,fU as ag,fV as eg,fW as Ig,fX as sg,fY as gg,fZ as rg,f_ as tg,f$ as Sg,g0 as ig,g1 as vg,g2 as lg,g3 as dg,g4 as hg,g as ug,g5 as mg,g6 as Cg,g7 as pg,g8 as bg,g9 as wg,ga as fg,gb as Tg,gc as Ag,gd as yg,ge as Dg,gf as Lg,gg as Rg,gh as Fg,gi as Pg,gj as Bg,gk as kg,gl as Hg,gm as Mg,gn as Gg,go as Og,gp as Eg,gq as Ng,gr as Ug,gs as xg,gt as Vg,gu as jg,h as zg,gv as Kg,gw as Wg,gx as qg,gy as Jg,gz as Zg,gA as _g,gB as Xg,gC as Qg,gD as Yg,gE as $g,gF as or,gG as nr,gH as cr,gI as ar,gJ as er,gK as Ir,gL as sr,gM as gr,gN as rr,gO as tr,gP as Sr,gQ as ir,gR as vr,gS as lr,gT as dr,gU as hr,gV as ur,gW as mr,gX as Cr,gY as pr,gZ as br,g_ as wr,g$ as fr,h0 as Tr,h1 as Ar,h2 as yr,h3 as Dr,h4 as Lr,h5 as Rr,h6 as Fr,h7 as Pr,h8 as Br,h9 as kr,ha as Hr,hb as Mr,hc as Gr,hd as Or,he as Er,hf as Nr,hg as Ur,hh as xr,hi as Vr,hj as jr,d as zr,k as Kr,hk as Wr,hl as qr,hm as Jr,hn as Zr,ho as _r,hp as Xr,hq as Qr,hr as Yr,hs as $r,ht as ot,hu as nt,hv as ct,hw as at,hx as et,hy as It,hz as st,hA as gt,hB as rt,hC as tt,hD as St,hE as it,hF as vt,hG as lt,hH as dt,hI as ht,hJ as ut,hK as mt,hL as Ct,hM as pt,hN as bt,hO as wt,hP as ft,hQ as Tt,hR as At,hS as yt,hT as Dt,hU as Lt,i as Rt,e as Ft,hV as Pt,hW as Bt,hX as kt,hY as Ht,hZ as Mt,h_ as Gt,h$ as Ot,i0 as Et,i1 as Nt,i2 as Ut,i3 as xt}from"./zoom-to-fit-icon-DdsCB6de.js";import"./index-0d5eMwbi.js";import"./iframe-9T-PF226.js";import"../sb-preview/runtime.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";const Vt=Object.freeze(Object.defineProperty({__proto__:null,AddClipIcon:S,AddColumnLeftIcon:i,AddColumnRightIcon:v,AddIcon:l,AddLocationIcon:d,AddRowBottomIcon:h,AddRowTopIcon:u,AddToArtifactIcon:m,AddToFolderIcon:C,AimpointsTargetIcon:p,AirplaneIcon:b,AlignCenterIcon:w,AlignJustifyIcon:f,AlignLeftIcon:T,AlignRightIcon:A,AlignmentBottomIcon:y,AlignmentHorizontalCenterIcon:D,AlignmentLeftIcon:L,AlignmentRightIcon:R,AlignmentTopIcon:F,AlignmentVerticalCenterIcon:P,AnchorIcon:B,AnnotationIcon:k,AntennaIcon:H,AppHeaderIcon:M,ApplicationIcon:G,ApplicationsIcon:O,ArchiveIcon:E,AreaOfInterestIcon:N,ArrayBooleanIcon:U,ArrayDateIcon:x,ArrayFloatingPointIcon:V,ArrayIcon:j,ArrayNumericIcon:z,ArrayStringIcon:K,ArrayTimestampIcon:W,ArrowBottomLeftIcon:q,ArrowBottomRightIcon:J,ArrowDownIcon:Z,ArrowLeftIcon:_,ArrowRightIcon:X,ArrowTopLeftIcon:Q,ArrowTopRightIcon:Y,ArrowUpIcon:$,ArrowsHorizontalIcon:oo,ArrowsVerticalIcon:no,AskIcon:co,AsteriskIcon:ao,AtIcon:eo,AutomaticUpdatesIcon:Io,BacklinkIcon:so,BadgeIcon:go,BanCircleIcon:ro,BankAccountIcon:to,BarcodeIcon:So,BlankIcon:io,BlockedPersonIcon:vo,BoldIcon:lo,BookIcon:ho,BookmarkIcon:uo,BoxIcon:mo,BriefcaseIcon:Co,BringDataIcon:po,BugIcon:bo,BuggyIcon:wo,BuildIcon:fo,CalculatorIcon:To,CalendarIcon:Ao,CameraIcon:yo,CaretDownIcon:Do,CaretLeftIcon:Lo,CaretRightIcon:Ro,CaretUpIcon:Fo,CargoShipIcon:Po,CellTowerIcon:Bo,ChangesIcon:ko,ChartIcon:Ho,ChatIcon:Mo,ChevronBackwardIcon:Go,ChevronDownIcon:Oo,ChevronForwardIcon:Eo,ChevronLeftIcon:No,ChevronRightIcon:Uo,ChevronUpIcon:xo,CircleArrowDownIcon:Vo,CircleArrowLeftIcon:jo,CircleArrowRightIcon:zo,CircleArrowUpIcon:Ko,CircleIcon:Wo,CitationIcon:qo,CleanIcon:Jo,ClipIcon:Zo,ClipboardIcon:_o,CloudDownloadIcon:Xo,CloudIcon:Qo,CloudUploadIcon:Yo,CodeBlockIcon:$o,CodeIcon:on,CogIcon:nn,CollapseAllIcon:cn,ColorFillIcon:an,ColumnLayoutIcon:en,CommentIcon:In,ComparisonIcon:sn,CompassIcon:gn,CompressedIcon:rn,ConfirmIcon:tn,ConsoleIcon:Sn,ContrastIcon:vn,ControlIcon:ln,CreditCardIcon:dn,CrossCircleIcon:hn,CrossIcon:un,CrownIcon:mn,CubeAddIcon:Cn,CubeIcon:pn,CubeRemoveIcon:bn,CurvedRangeChartIcon:wn,CutIcon:fn,CycleIcon:Tn,DashboardIcon:An,DataConnectionIcon:yn,DataLineageIcon:Dn,DatabaseIcon:Ln,DeleteIcon:Rn,DeltaIcon:Fn,DeriveColumnIcon:Pn,DesktopIcon:Bn,DiagnosisIcon:kn,DiagramTreeIcon:Hn,DirectionLeftIcon:Mn,DirectionRightIcon:Gn,DisableIcon:On,DivideIcon:En,DocumentIcon:Nn,DocumentOpenIcon:Un,DocumentShareIcon:xn,DollarIcon:Vn,DotIcon:jn,DoubleCaretHorizontalIcon:zn,DoubleCaretVerticalIcon:Kn,DoubleChevronDownIcon:Wn,DoubleChevronLeftIcon:qn,DoubleChevronRightIcon:Jn,DoubleChevronUpIcon:Zn,DoughnutChartIcon:_n,DownloadIcon:Xn,DragHandleHorizontalIcon:Qn,DragHandleVerticalIcon:Yn,DrawIcon:$n,DrawerLeftFilledIcon:oc,DrawerLeftIcon:nc,DrawerRightFilledIcon:cc,DrawerRightIcon:ac,DriveTimeIcon:ec,DuplicateIcon:Ic,EditIcon:sc,EjectIcon:gc,EmojiIcon:rc,EndorsedIcon:tc,EnvelopeIcon:Sc,EqualsIcon:ic,EraserIcon:vc,ErrorIcon:lc,EuroIcon:dc,ExchangeIcon:hc,ExcludeRowIcon:uc,ExpandAllIcon:mc,ExportIcon:Cc,EyeOffIcon:pc,EyeOnIcon:bc,EyeOpenIcon:wc,FastBackwardIcon:fc,FastForwardIcon:Tc,FeedIcon:Ac,FeedSubscribedIcon:yc,FilmIcon:Dc,FilterIcon:Lc,FilterKeepIcon:Rc,FilterListIcon:Fc,FilterOpenIcon:Pc,FilterRemoveIcon:Bc,FlagIcon:kc,FlameIcon:Hc,FlashIcon:Mc,FloatingPointIcon:Gc,FloppyDiskIcon:Oc,FlowBranchIcon:Ec,FlowEndIcon:Nc,FlowLinearIcon:Uc,FlowReviewBranchIcon:xc,FlowReviewIcon:Vc,FlowsIcon:jc,FolderCloseIcon:zc,FolderNewIcon:Kc,FolderOpenIcon:Wc,FolderSharedIcon:qc,FolderSharedOpenIcon:Jc,FollowerIcon:Zc,FollowingIcon:_c,FontIcon:Xc,ForkIcon:Qc,FormIcon:Yc,FuelIcon:$c,FullCircleIcon:oa,FullStackedChartIcon:na,FullscreenIcon:ca,FunctionIcon:aa,GanttChartIcon:ea,GeofenceIcon:Ia,GeolocationIcon:sa,GeosearchIcon:ga,GitBranchIcon:ra,GitCommitIcon:ta,GitMergeIcon:Sa,GitNewBranchIcon:ia,GitPullIcon:va,GitPushIcon:la,GitRepoIcon:da,GlassIcon:ha,GlobeIcon:ua,GlobeNetworkIcon:ma,GraphIcon:Ca,GraphRemoveIcon:pa,GreaterThanIcon:ba,GreaterThanOrEqualToIcon:wa,GridIcon:fa,GridViewIcon:Ta,GroupObjectsIcon:Aa,GroupedBarChartIcon:ya,HandDownIcon:Da,HandIcon:La,HandLeftIcon:Ra,HandRightIcon:Fa,HandUpIcon:Pa,HatIcon:Ba,HeaderIcon:ka,HeaderOneIcon:Ha,HeaderThreeIcon:Ma,HeaderTwoIcon:Ga,HeadsetIcon:Oa,HeartBrokenIcon:Ea,HeartIcon:Na,HeatGridIcon:Ua,HeatmapIcon:xa,HelicopterIcon:Va,HelpIcon:ja,HelperManagementIcon:za,HighPriorityIcon:Ka,HighVoltagePoleIcon:Wa,HighlightIcon:qa,HistoryIcon:Ja,HomeIcon:Za,HorizontalBarChartAscIcon:_a,HorizontalBarChartDescIcon:Xa,HorizontalBarChartIcon:Qa,HorizontalDistributionIcon:Ya,HorizontalInbetweenIcon:$a,HurricaneIcon:oe,IdNumberIcon:ne,ImageRotateLeftIcon:ce,ImageRotateRightIcon:ae,ImportIcon:ee,InboxFilteredIcon:Ie,InboxGeoIcon:se,InboxIcon:ge,InboxSearchIcon:re,InboxUpdateIcon:te,InfoIcon:Se,InfoSignIcon:ie,InheritanceIcon:ve,InheritedGroupIcon:le,InnerJoinIcon:de,InsertIcon:he,IntersectionIcon:ue,IpAddressIcon:me,IssueClosedIcon:Ce,IssueIcon:pe,IssueNewIcon:be,ItalicIcon:we,JoinTableIcon:fe,KeyBackspaceIcon:Te,KeyCommandIcon:Ae,KeyControlIcon:ye,KeyDeleteIcon:De,KeyEnterIcon:Le,KeyEscapeIcon:Re,KeyIcon:Fe,KeyOptionIcon:Pe,KeyShiftIcon:Be,KeyTabIcon:ke,KnownVehicleIcon:He,LabTestIcon:Me,LabelIcon:Ge,LayerIcon:Oe,LayerOutlineIcon:Ee,LayersIcon:Ne,LayoutAutoIcon:Ue,LayoutBalloonIcon:xe,LayoutCircleIcon:Ve,LayoutGridIcon:je,LayoutGroupByIcon:ze,LayoutHierarchyIcon:Ke,LayoutIcon:We,LayoutLinearIcon:qe,LayoutSkewGridIcon:Je,LayoutSortedClustersIcon:Ze,LearningIcon:_e,LeftJoinIcon:Xe,LessThanIcon:Qe,LessThanOrEqualToIcon:Ye,LifesaverIcon:$e,LightbulbIcon:oI,LightningIcon:nI,LinkIcon:cI,ListColumnsIcon:aI,ListDetailViewIcon:eI,ListIcon:II,LocateIcon:sI,LockIcon:gI,LogInIcon:rI,LogOutIcon:tI,LowVoltagePoleIcon:SI,ManualIcon:iI,ManuallyEnteredDataIcon:vI,ManyToManyIcon:lI,ManyToOneIcon:dI,MapCreateIcon:hI,MapIcon:uI,MapMarkerIcon:mI,MaximizeIcon:CI,MediaIcon:pI,MenuClosedIcon:bI,MenuIcon:wI,MenuOpenIcon:fI,MergeColumnsIcon:TI,MergeLinksIcon:AI,MinimizeIcon:yI,MinusIcon:DI,MobilePhoneIcon:LI,MobileVideoIcon:RI,ModalFilledIcon:FI,ModalIcon:PI,MoonIcon:BI,MoreIcon:kI,MountainIcon:HI,MoveIcon:MI,MugshotIcon:GI,MultiSelectIcon:OI,MusicIcon:EI,NestIcon:NI,NewDrawingIcon:UI,NewGridItemIcon:xI,NewLayerIcon:VI,NewLayersIcon:jI,NewLinkIcon:zI,NewObjectIcon:KI,NewPersonIcon:WI,NewPrescriptionIcon:qI,NewTextBoxIcon:JI,NinjaIcon:ZI,NotEqualToIcon:_I,NotificationsIcon:XI,NotificationsSnoozeIcon:QI,NotificationsUpdatedIcon:YI,NumberedListIcon:$I,NumericalIcon:os,OfficeIcon:ns,OfflineIcon:cs,OilFieldIcon:as,OneColumnIcon:es,OneToManyIcon:Is,OneToOneIcon:ss,OpenApplicationIcon:gs,OutdatedIcon:rs,PageLayoutIcon:ts,PanelStatsIcon:Ss,PanelTableIcon:is,PaperclipIcon:vs,ParagraphIcon:ls,PathIcon:ds,PathSearchIcon:hs,PauseIcon:us,PeopleIcon:ms,PercentageIcon:Cs,PersonIcon:ps,PhoneIcon:bs,PieChartIcon:ws,PinIcon:fs,PivotIcon:Ts,PivotTableIcon:As,PlayIcon:ys,PlaybookIcon:Ds,PlusIcon:Ls,PolygonFilterIcon:Rs,PowerIcon:Fs,PredictiveAnalysisIcon:Ps,PrescriptionIcon:Bs,PresentationIcon:ks,PrintIcon:Hs,ProjectsIcon:Ms,PropertiesIcon:Gs,PropertyIcon:Os,PublishFunctionIcon:Es,PulseIcon:Ns,RainIcon:Us,RandomIcon:xs,RecordIcon:Vs,RectHeightIcon:js,RectWidthIcon:zs,RectangleIcon:Ks,RedoIcon:Ws,RefreshIcon:qs,RegexIcon:Js,RegressionChartIcon:Zs,RemoveColumnIcon:_s,RemoveColumnLeftIcon:Xs,RemoveColumnRightIcon:Qs,RemoveIcon:Ys,RemoveRowBottomIcon:$s,RemoveRowTopIcon:og,RepeatIcon:ng,ResetIcon:cg,ResolveIcon:ag,RigIcon:eg,RightJoinIcon:Ig,RingIcon:sg,RocketIcon:gg,RocketSlantIcon:rg,RotateDocumentIcon:tg,RotatePageIcon:Sg,RouteIcon:ig,SatelliteIcon:vg,SavedIcon:lg,ScatterPlotIcon:dg,SearchAroundIcon:hg,SearchIcon:ug,SearchTemplateIcon:mg,SearchTextIcon:Cg,SegmentedControlIcon:pg,SelectIcon:bg,SelectionIcon:wg,SendMessageIcon:fg,SendToGraphIcon:Tg,SendToIcon:Ag,SendToMapIcon:yg,SeriesAddIcon:Dg,SeriesConfigurationIcon:Lg,SeriesDerivedIcon:Rg,SeriesFilteredIcon:Fg,SeriesSearchIcon:Pg,SettingsBigIcon:Bg,SettingsIcon:kg,ShapesIcon:Hg,ShareIcon:Mg,SharedFilterIcon:Gg,ShieldIcon:Og,ShipIcon:Eg,ShopIcon:Ng,ShoppingCartIcon:Ug,SignalSearchIcon:xg,SimCardIcon:Vg,SlashIcon:jg,SmallCrossIcon:zg,SmallInfoSignIcon:Kg,SmallMinusIcon:Wg,SmallPlusIcon:qg,SmallSquareIcon:Jg,SmallTickIcon:Zg,SnowflakeIcon:_g,SocialMediaIcon:Xg,SortAlphabeticalDescIcon:Qg,SortAlphabeticalIcon:Yg,SortAscIcon:$g,SortDescIcon:or,SortIcon:nr,SortNumericalDescIcon:cr,SortNumericalIcon:ar,SplitColumnsIcon:er,SquareIcon:Ir,StackedChartIcon:sr,StadiumGeometryIcon:gr,StarEmptyIcon:rr,StarIcon:tr,StepBackwardIcon:Sr,StepChartIcon:ir,StepForwardIcon:vr,StopIcon:lr,StopwatchIcon:dr,StrikethroughIcon:hr,StyleIcon:ur,SwapHorizontalIcon:mr,SwapVerticalIcon:Cr,SwitchIcon:pr,SymbolCircleIcon:br,SymbolCrossIcon:wr,SymbolDiamondIcon:fr,SymbolRectangleIcon:Tr,SymbolSquareIcon:Ar,SymbolTriangleDownIcon:yr,SymbolTriangleUpIcon:Dr,SyringeIcon:Lr,TagIcon:Rr,TakeActionIcon:Fr,TankIcon:Pr,TargetIcon:Br,TaxiIcon:kr,TemperatureIcon:Hr,TextHighlightIcon:Mr,ThDerivedIcon:Gr,ThDisconnectIcon:Or,ThFilteredIcon:Er,ThIcon:Nr,ThListIcon:Ur,ThirdPartyIcon:xr,ThumbsDownIcon:Vr,ThumbsUpIcon:jr,TickCircleIcon:zr,TickIcon:Kr,TimeIcon:Wr,TimelineAreaChartIcon:qr,TimelineBarChartIcon:Jr,TimelineEventsIcon:Zr,TimelineLineChartIcon:_r,TintIcon:Xr,TorchIcon:Qr,TractorIcon:Yr,TrainIcon:$r,TranslateIcon:ot,TrashIcon:nt,TreeIcon:ct,TrendingDownIcon:at,TrendingUpIcon:et,TruckIcon:It,TwoColumnsIcon:st,UnarchiveIcon:gt,UnderlineIcon:rt,UndoIcon:tt,UngroupObjectsIcon:St,UnknownVehicleIcon:it,UnlockIcon:vt,UnpinIcon:lt,UnresolveIcon:dt,UpdatedIcon:ht,UploadIcon:ut,UserIcon:mt,VariableIcon:Ct,VerticalBarChartAscIcon:pt,VerticalBarChartDescIcon:bt,VerticalDistributionIcon:wt,VerticalInbetweenIcon:ft,VideoIcon:Tt,VirusIcon:At,VolumeDownIcon:yt,VolumeOffIcon:Dt,VolumeUpIcon:Lt,WalkIcon:Rt,WarningSignIcon:Ft,WaterfallChartIcon:Pt,WavesIcon:Bt,WidgetButtonIcon:kt,WidgetFooterIcon:Ht,WidgetHeaderIcon:Mt,WidgetIcon:Gt,WindIcon:Ot,WrenchIcon:Et,ZoomInIcon:Nt,ZoomOutIcon:Ut,ZoomToFitIcon:xt},Symbol.toStringTag,{value:"Module"}));function e(n){const c={h1:"h1",p:"p",...I(),...n.components};return o.jsxs(o.Fragment,{children:[o.jsx(g,{title:"Icons gallery"}),` `,o.jsx(c.h1,{id:"icons-gallery",children:"Icons Gallery"}),` `,o.jsx(c.p,{children:"List of available icons"}),` `,o.jsx(r,{children:Object.entries(Vt).map(([a,s])=>o.jsx(t,{name:a,children:o.jsx(s,{className:"h-6 w-6"})},a))})]})}function $t(n={}){const{wrapper:c}={...I(),...n.components};return c?o.jsx(c,{...n,children:o.jsx(e,{...n})}):e(n)}export{$t as default}; diff --git a/assets/iframe-B1Sidt8M.js b/assets/iframe-9T-PF226.js similarity index 73% rename from assets/iframe-B1Sidt8M.js rename to assets/iframe-9T-PF226.js index da3c9977..eb95373f 100644 --- a/assets/iframe-B1Sidt8M.js +++ b/assets/iframe-9T-PF226.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./alert.stories-DBAGVE4m.js","./jsx-runtime-C798UXYj.js","./index-0d5eMwbi.js","./alert-WFlrTABt.js","./class-names-DnY5YZNL.js","./zoom-to-fit-icon-DdsCB6de.js","./storybook-utils-C5xEhci0.js","./avatar.stories-HUeKQiUe.js","./avatar-Cxzsye4J.js","./badge.stories-gP-6Aq3K.js","./badge-Da1HxQE-.js","./breadcrumb-navigation.stories-C-43rqs3.js","./slot-CyLCZbOE.js","./button-group.stories-COJQKQ4l.js","./button.stories-B_08GyF3.js","./button-Cwplw9FX.js","./spinner-CrXB3JgE.js","./checkbox.stories-BpAp46hW.js","./dialog.stories-BGz9dfF0.js","./description-D9Ee5mtv.js","./use-sync-refs-DqQDZvJ6.js","./dialog-CQKMlc6b.js","./keyboard-C2Ifhsxt.js","./use-event-listener-CochUv0b.js","./portal-CLj4HHuk.js","./focus-management-DaVlPEX1.js","./index-BoyHNU0R.js","./use-server-handoff-complete-JgOu4JLg.js","./use-inert-others-CzqV763I.js","./use-tab-direction-BMI6OSML.js","./hidden-BrNieFV6.js","./close-provider-CZp7Lqob.js","./open-closed-DC3t9YEZ.js","./use-is-mounted-DT-lZL-u.js","./active-element-history-DI7yoVCB.js","./transition-CZnz1fcq.js","./icon-button-DlSTEzH7.js","./form-field-BtJxu7hP.js","./use-resolve-button-type-D_6M6Au0.js","./form-fields-B2NmhAAW.js","./label-BBnH-iCi.js","./bugs-DpEN4NTH.js","./use-text-value-ehRDfXkw.js","./floating-ERp4LevH.js","./index-h1jAayoZ.js","./tag-C9CGXtt3.js","./toggle-Bp5D17gs.js","./disclosure.stories-DwfzQRRi.js","./disclosure-CNBAsrob.js","./divider-line.stories-lM2hRNkL.js","./divider-line-CzbklozI.js","./featured-tag.stories-CsNO07V6.js","./featured-tag-DLvaNKCm.js","./panel-BTNit_je.js","./form-field-group.stories-D6_h9T9i.js","./listbox.stories-DYhiM9ac.js","./multi-combobox.stories-B81csaxo.js","./radio-box.stories-ClLmSkEW.js","./radio-input.stories-D9_eflVt.js","./search-input.stories-CrW1iZWz.js","./single-combobox.stories-JqBGE505.js","./text-input.stories-BT2GI3td.js","./textarea.stories-82EphPuj.js","./icon-button.stories-CERmelnz.js","./inline-alert.stories-CHU6-QPb.js","./last-changed-info.stories-C86MXOjM.js","./link.stories-2GyWZWrZ.js","./menu-info-item.stories-CGoXCqdp.js","./menu-info-item-CC1TeP-c.js","./menu-item.stories-C6z3CClY.js","./menu-BbZFQK8W.js","./menu-separator-yO-BIXMb.js","./menu-title-DpAy2147.js","./menu-separator.stories-D7MgxHW9.js","./menu-title.stories-BpGHFQrG.js","./menu.stories-CgnJSCFe.js","./navigation.stories-_4qlPrgP.js","./usePopper-Cu2KpVtb.js","./popover-DJ9HIBXX.js","./page.stories-BfCGd43p.js","./panel.stories-5EuFEmkX.js","./popover-menu.stories-DcT5PR_I.js","./section.stories-BeowXPCk.js","./sidebar-container.stories-CD7erG3P.js","./sidebar.stories-CTIXw2h_.js","./sidesheet.stories-DC5qghgW.js","./skeleton.stories-DkC3bvFE.js","./spinner-overlay.stories-Ceh5rt6d.js","./spinner.stories-VlGwChGj.js","./tab.stories-CVEumuZ5.js","./table-unvirtualized.stories-D8gQE_lR.js","./table-unvirtualized-B6-rFf74.js","./table-virtualized.stories-KaRUCWoS.js","./tag.stories-D4S3pQPY.js","./toast.stories-Bzmbls-5.js","./toggle.stories-DcNmYdAI.js","./tooltip.stories-D4pljqyk.js","./top-bar.stories-Dfj0D-rE.js","./icons-Dp8Wmtux.js","./index-CFK-oMtb.js","./index-D4CCEPie.js","./index-D-8MO0q_.js","./index-CxJhtZoZ.js","./index-DrFu-skq.js","./index-bmGcrzev.js","./global-styles.stories-MeCc39-H.js","./entry-preview-CVX8W8q9.js","./chunk-H6MOWX77-DTQOW814.js","./entry-preview-docs-Blm_ViJ3.js","./preview-BhhEZcNS.js","./preview-D77C14du.js","./preview-BWzBA1C2.js","./preview-CL0FZwLC.js","./preview-kJxS59jD.css"])))=>i.map(i=>d[i]); -import"../sb-preview/runtime.js";(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const e of o)if(e.type==="childList")for(const i of e.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&a(i)}).observe(document,{childList:!0,subtree:!0});function c(o){const e={};return o.integrity&&(e.integrity=o.integrity),o.referrerPolicy&&(e.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?e.credentials="include":o.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function a(o){if(o.ep)return;o.ep=!0;const e=c(o);fetch(o.href,e)}})();const v="modulepreload",T=function(r,_){return new URL(r,_).href},O={},t=function(_,c,a){let o=Promise.resolve();if(c&&c.length>0){const i=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(c.map(n=>{if(n=T(n,a),n in O)return;O[n]=!0;const p=n.endsWith(".css"),R=p?'[rel="stylesheet"]':"";if(!!a)for(let u=i.length-1;u>=0;u--){const l=i[u];if(l.href===n&&(!p||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${R}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":v,p||(m.as="script"),m.crossOrigin="",m.href=n,d&&m.setAttribute("nonce",d),document.head.appendChild(m),p)return new Promise((u,l)=>{m.addEventListener("load",u),m.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${n}`)))})}))}function e(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return o.then(i=>{for(const s of i||[])s.status==="rejected"&&e(s.reason);return _().catch(e)})},{createBrowserChannel:L}=__STORYBOOK_MODULE_CHANNELS__,{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,E=L({page:"preview"});f.setChannel(E);window.__STORYBOOK_ADDONS_CHANNEL__=E;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=E);const y={"./src/components/alert/alert.stories.tsx":async()=>t(()=>import("./alert.stories-DBAGVE4m.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"./src/components/avatar/avatar.stories.tsx":async()=>t(()=>import("./avatar.stories-HUeKQiUe.js"),__vite__mapDeps([7,1,2,8,6]),import.meta.url),"./src/components/badge/badge.stories.tsx":async()=>t(()=>import("./badge.stories-gP-6Aq3K.js"),__vite__mapDeps([9,1,2,10,4,6]),import.meta.url),"./src/components/breadcrumb-navigation/breadcrumb-navigation.stories.tsx":async()=>t(()=>import("./breadcrumb-navigation.stories-C-43rqs3.js"),__vite__mapDeps([11,1,2,4,12,5]),import.meta.url),"./src/components/button-group/button-group.stories.tsx":async()=>t(()=>import("./button-group.stories-COJQKQ4l.js"),__vite__mapDeps([13,1,2,4]),import.meta.url),"./src/components/button/button.stories.tsx":async()=>t(()=>import("./button.stories-B_08GyF3.js"),__vite__mapDeps([14,1,2,15,4,16,5,6]),import.meta.url),"./src/components/checkbox/checkbox.stories.tsx":async()=>t(()=>import("./checkbox.stories-BpAp46hW.js"),__vite__mapDeps([17,1,2,4,6]),import.meta.url),"./src/components/dialog/dialog.stories.tsx":async()=>t(()=>import("./dialog.stories-BGz9dfF0.js"),__vite__mapDeps([18,1,2,6,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,5,4,36,15,16,37,38,39,40,41,42,43,10,44,45,46,3]),import.meta.url),"./src/components/disclosure/disclosure.stories.tsx":async()=>t(()=>import("./disclosure.stories-DwfzQRRi.js"),__vite__mapDeps([47,1,2,5,4,48,38,22,20,32,31,41]),import.meta.url),"./src/components/divider-line/divider-line.stories.tsx":async()=>t(()=>import("./divider-line.stories-lM2hRNkL.js"),__vite__mapDeps([49,1,2,50]),import.meta.url),"./src/components/featured-tag/featured-tag.stories.tsx":async()=>t(()=>import("./featured-tag.stories-CsNO07V6.js"),__vite__mapDeps([51,1,2,52,4,53,37,5,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/form-field-group.stories.tsx":async()=>t(()=>import("./form-field-group.stories-D6_h9T9i.js"),__vite__mapDeps([54,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/listbox/listbox.stories.tsx":async()=>t(()=>import("./listbox.stories-DYhiM9ac.js"),__vite__mapDeps([55,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/multi-combobox/multi-combobox.stories.tsx":async()=>t(()=>import("./multi-combobox.stories-B81csaxo.js"),__vite__mapDeps([56,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/radio-box/radio-box.stories.tsx":async()=>t(()=>import("./radio-box.stories-ClLmSkEW.js"),__vite__mapDeps([57,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45,52]),import.meta.url),"./src/components/form-field/radio-input/radio-input.stories.tsx":async()=>t(()=>import("./radio-input.stories-D9_eflVt.js"),__vite__mapDeps([58,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/search-input/search-input.stories.tsx":async()=>t(()=>import("./search-input.stories-CrW1iZWz.js"),__vite__mapDeps([59,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/single-combobox/single-combobox.stories.tsx":async()=>t(()=>import("./single-combobox.stories-JqBGE505.js"),__vite__mapDeps([60,1,2,45,4,5,37,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34]),import.meta.url),"./src/components/form-field/text-input/text-input.stories.tsx":async()=>t(()=>import("./text-input.stories-BT2GI3td.js"),__vite__mapDeps([61,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/textarea/textarea.stories.tsx":async()=>t(()=>import("./textarea.stories-82EphPuj.js"),__vite__mapDeps([62,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/icon-button/icon-button.stories.tsx":async()=>t(()=>import("./icon-button.stories-CERmelnz.js"),__vite__mapDeps([63,36,1,2,4,5]),import.meta.url),"./src/components/inline-alert/inline-alert.stories.tsx":async()=>t(()=>import("./inline-alert.stories-CHU6-QPb.js"),__vite__mapDeps([64,1,2,4,5,6]),import.meta.url),"./src/components/last-changed-info/last-changed-info.stories.tsx":async()=>t(()=>import("./last-changed-info.stories-C86MXOjM.js"),__vite__mapDeps([65,1,2,4]),import.meta.url),"./src/components/link/link.stories.tsx":async()=>t(()=>import("./link.stories-2GyWZWrZ.js"),__vite__mapDeps([66,1,2,12,4,5,6]),import.meta.url),"./src/components/menu/menu-info-item/menu-info-item.stories.tsx":async()=>t(()=>import("./menu-info-item.stories-CGoXCqdp.js"),__vite__mapDeps([67,1,2,68]),import.meta.url),"./src/components/menu/menu-item/menu-item.stories.tsx":async()=>t(()=>import("./menu-item.stories-C6z3CClY.js"),__vite__mapDeps([69,1,2,5,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/components/menu/menu-separator/menu-separator.stories.tsx":async()=>t(()=>import("./menu-separator.stories-D7MgxHW9.js"),__vite__mapDeps([73,1,2,71]),import.meta.url),"./src/components/menu/menu-title/menu-title.stories.tsx":async()=>t(()=>import("./menu-title.stories-BpGHFQrG.js"),__vite__mapDeps([74,1,2,72]),import.meta.url),"./src/components/menu/menu.stories.tsx":async()=>t(()=>import("./menu.stories-CgnJSCFe.js"),__vite__mapDeps([75,1,2,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/components/navigation/navigation.stories.tsx":async()=>t(()=>import("./navigation.stories-_4qlPrgP.js"),__vite__mapDeps([76,1,2,5,4,48,38,22,20,32,31,41,77,26,78,43,23,24,25,27,29,30]),import.meta.url),"./src/components/page/page.stories.tsx":async()=>t(()=>import("./page.stories-BfCGd43p.js"),__vite__mapDeps([79,1,2]),import.meta.url),"./src/components/panel/panel.stories.tsx":async()=>t(()=>import("./panel.stories-5EuFEmkX.js"),__vite__mapDeps([80,1,2,53,4,15,16,6,46,19,20,39,26,30,40,38,22,41]),import.meta.url),"./src/components/popover-menu/popover-menu.stories.tsx":async()=>t(()=>import("./popover-menu.stories-DcT5PR_I.js"),__vite__mapDeps([81,1,2,5,77,26,15,4,16,78,38,22,20,43,23,24,25,27,29,30,32,31,41]),import.meta.url),"./src/components/section/section.stories.tsx":async()=>t(()=>import("./section.stories-BeowXPCk.js"),__vite__mapDeps([82,1,2,15,4,16]),import.meta.url),"./src/components/sidebar-container/sidebar-container.stories.tsx":async()=>t(()=>import("./sidebar-container.stories-CD7erG3P.js"),__vite__mapDeps([83,1,2]),import.meta.url),"./src/components/sidebar/sidebar.stories.tsx":async()=>t(()=>import("./sidebar.stories-CTIXw2h_.js"),__vite__mapDeps([84,1,2,4]),import.meta.url),"./src/components/sidesheet/sidesheet.stories.tsx":async()=>t(()=>import("./sidesheet.stories-DC5qghgW.js"),__vite__mapDeps([85,1,2,21,22,20,23,24,25,26,27,28,29,30,31,32,19,33,34,35,15,4,16]),import.meta.url),"./src/components/skeleton/skeleton.stories.tsx":async()=>t(()=>import("./skeleton.stories-DkC3bvFE.js"),__vite__mapDeps([86,1,2,4]),import.meta.url),"./src/components/spinner-overlay/spinner-overlay.stories.tsx":async()=>t(()=>import("./spinner-overlay.stories-Ceh5rt6d.js"),__vite__mapDeps([87,1,2,16,4]),import.meta.url),"./src/components/spinner/spinner.stories.tsx":async()=>t(()=>import("./spinner.stories-VlGwChGj.js"),__vite__mapDeps([88,1,2,16,4]),import.meta.url),"./src/components/tab/tab.stories.tsx":async()=>t(()=>import("./tab.stories-CVEumuZ5.js"),__vite__mapDeps([89,1,2,4,38,22,20,33,30,25,6]),import.meta.url),"./src/components/table-unvirtualized/table-unvirtualized.stories.tsx":async()=>t(()=>import("./table-unvirtualized.stories-D8gQE_lR.js"),__vite__mapDeps([90,1,2,91,4,16,15]),import.meta.url),"./src/components/table-virtualized/table-virtualized.stories.tsx":async()=>t(()=>import("./table-virtualized.stories-KaRUCWoS.js"),__vite__mapDeps([92,1,2,44,26,4,91,16,5,15,36,50]),import.meta.url),"./src/components/tag/tag.stories.tsx":async()=>t(()=>import("./tag.stories-D4S3pQPY.js"),__vite__mapDeps([93,1,2,45,4,5]),import.meta.url),"./src/components/toast/toast.stories.tsx":async()=>t(()=>import("./toast.stories-Bzmbls-5.js"),__vite__mapDeps([94,1,2,5,4]),import.meta.url),"./src/components/toggle/toggle.stories.tsx":async()=>t(()=>import("./toggle.stories-DcNmYdAI.js"),__vite__mapDeps([95,1,2,46,19,20,39,26,30,40,38,22,41,4]),import.meta.url),"./src/components/tooltip/tooltip.stories.tsx":async()=>t(()=>import("./tooltip.stories-D4pljqyk.js"),__vite__mapDeps([96,1,2,6,77,26,4,35,20,33,27,32,15,16]),import.meta.url),"./src/components/top-bar/top-bar.stories.tsx":async()=>t(()=>import("./top-bar.stories-Dfj0D-rE.js"),__vite__mapDeps([97,1,2,4,5,8,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/icons/icons.mdx":async()=>t(()=>import("./icons-Dp8Wmtux.js"),__vite__mapDeps([98,1,2,99,100,26,101,102,103,5]),import.meta.url),"./src/index.mdx":async()=>t(()=>import("./index-bmGcrzev.js"),__vite__mapDeps([104,1,2,99,100,26,101,102,103]),import.meta.url),"./src/styles/global-styles.stories.tsx":async()=>t(()=>import("./global-styles.stories-MeCc39-H.js"),__vite__mapDeps([105,1,2,91,4,16]),import.meta.url)};async function P(r){return y[r]()}const{composeConfigs:I,PreviewWeb:V,ClientApi:b}=__STORYBOOK_MODULE_PREVIEW_API__,D=async(r=[])=>{const _=await Promise.all([r.at(0)??t(()=>import("./entry-preview-CVX8W8q9.js"),__vite__mapDeps([106,107,2,26]),import.meta.url),r.at(1)??t(()=>import("./entry-preview-docs-Blm_ViJ3.js"),__vite__mapDeps([108,107,102,2,103]),import.meta.url),r.at(2)??t(()=>import("./preview-BhhEZcNS.js"),__vite__mapDeps([109,101]),import.meta.url),r.at(3)??t(()=>import("./preview-Dsbj-GgD.js"),[],import.meta.url),r.at(4)??t(()=>import("./preview-aVwhiz9X.js"),[],import.meta.url),r.at(5)??t(()=>import("./preview-D77C14du.js"),__vite__mapDeps([110,103]),import.meta.url),r.at(6)??t(()=>import("./preview-DFmD0pui.js"),[],import.meta.url),r.at(7)??t(()=>import("./preview-CFgKly6U.js"),[],import.meta.url),r.at(8)??t(()=>import("./preview-BWzBA1C2.js"),__vite__mapDeps([111,103]),import.meta.url),r.at(9)??t(()=>import("./preview-DGUiP6tS.js"),[],import.meta.url),r.at(10)??t(()=>import("./preview-DVI_gYQC.js"),[],import.meta.url),r.at(11)??t(()=>import("./preview-CL0FZwLC.js"),__vite__mapDeps([112,113]),import.meta.url)]);return I(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new V(P,D);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{t as _}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./alert.stories-DBAGVE4m.js","./jsx-runtime-C798UXYj.js","./index-0d5eMwbi.js","./alert-WFlrTABt.js","./class-names-DnY5YZNL.js","./zoom-to-fit-icon-DdsCB6de.js","./storybook-utils-C5xEhci0.js","./avatar.stories-HUeKQiUe.js","./avatar-Cxzsye4J.js","./badge.stories-DloSsjdd.js","./badge-BIezdMmM.js","./breadcrumb-navigation.stories-C-43rqs3.js","./slot-CyLCZbOE.js","./button-group.stories-COJQKQ4l.js","./button.stories-D9pdHdIx.js","./button-CNKqPViR.js","./spinner-CrXB3JgE.js","./checkbox.stories-BpAp46hW.js","./dialog.stories-BX6_XaCw.js","./description-D9Ee5mtv.js","./use-sync-refs-DqQDZvJ6.js","./dialog-CQKMlc6b.js","./keyboard-C2Ifhsxt.js","./use-event-listener-CochUv0b.js","./portal-CLj4HHuk.js","./focus-management-DaVlPEX1.js","./index-BoyHNU0R.js","./use-server-handoff-complete-JgOu4JLg.js","./use-inert-others-CzqV763I.js","./use-tab-direction-BMI6OSML.js","./hidden-BrNieFV6.js","./close-provider-CZp7Lqob.js","./open-closed-DC3t9YEZ.js","./use-is-mounted-DT-lZL-u.js","./active-element-history-DI7yoVCB.js","./transition-CZnz1fcq.js","./icon-button-k2wtPfcV.js","./form-field-2xLK_lYH.js","./use-resolve-button-type-D_6M6Au0.js","./form-fields-B2NmhAAW.js","./label-BBnH-iCi.js","./bugs-DpEN4NTH.js","./use-text-value-ehRDfXkw.js","./floating-ERp4LevH.js","./index-BgfbgFhO.js","./tag-C9CGXtt3.js","./toggle-Bp5D17gs.js","./disclosure.stories-DwfzQRRi.js","./disclosure-CNBAsrob.js","./divider-line.stories-lM2hRNkL.js","./divider-line-CzbklozI.js","./featured-tag.stories-Du1zMPkV.js","./featured-tag-DLvaNKCm.js","./panel-BTNit_je.js","./form-field-group.stories-CNEhqW5L.js","./listbox.stories-Buiq_fV8.js","./multi-combobox.stories-BDk-Xj5k.js","./radio-box.stories-CJwvD2av.js","./radio-input.stories-BrZdO4Rq.js","./search-input.stories-CTxLO1lU.js","./single-combobox.stories-DuoRfe_y.js","./text-input.stories-B1dwyupg.js","./textarea.stories-BxDua9o8.js","./icon-button.stories-0-APhIQ1.js","./inline-alert.stories-CHU6-QPb.js","./last-changed-info.stories-C86MXOjM.js","./link.stories-BsuBz4ei.js","./menu-info-item.stories-CGoXCqdp.js","./menu-info-item-CC1TeP-c.js","./menu-item.stories-BTxqC4cZ.js","./menu-6dEOZWfD.js","./menu-separator-yO-BIXMb.js","./menu-title-DpAy2147.js","./menu-separator.stories-D7MgxHW9.js","./menu-title.stories-BpGHFQrG.js","./menu.stories-xNzefD_l.js","./navigation.stories-DFpQPa8H.js","./usePopper-Cu2KpVtb.js","./popover-DJ9HIBXX.js","./page.stories-BfCGd43p.js","./panel.stories-B05jnSyq.js","./popover-menu.stories-C3Er2s3-.js","./section.stories-c2uXgnH6.js","./sidebar-container.stories-CD7erG3P.js","./sidebar.stories-CTIXw2h_.js","./sidesheet.stories-Iwuc9DOn.js","./skeleton.stories-DkC3bvFE.js","./spinner-overlay.stories-Ceh5rt6d.js","./spinner.stories-VlGwChGj.js","./tab.stories-BExfMg0Y.js","./table-unvirtualized.stories-D4Z2ULmw.js","./table-unvirtualized-B6-rFf74.js","./table-virtualized.stories-CZFEUGuD.js","./tag.stories-D4S3pQPY.js","./toast.stories-Bzmbls-5.js","./toggle.stories-DcNmYdAI.js","./tooltip.stories-DmTKg58f.js","./top-bar.stories-BeIujtwl.js","./icons-BtgjIq6b.js","./index-CFK-oMtb.js","./index-D_yKE35a.js","./index-D-8MO0q_.js","./index-CxJhtZoZ.js","./index-DrFu-skq.js","./index-B27qxNgk.js","./global-styles.stories-MeCc39-H.js","./entry-preview-Dr1n3Wdx.js","./chunk-H6MOWX77-DTQOW814.js","./entry-preview-docs-Blm_ViJ3.js","./preview-BhhEZcNS.js","./preview-D77C14du.js","./preview-BWzBA1C2.js","./preview-BbTc69zT.js","./preview-o0cxRMzs.css"])))=>i.map(i=>d[i]); +import"../sb-preview/runtime.js";(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const e of o)if(e.type==="childList")for(const i of e.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&a(i)}).observe(document,{childList:!0,subtree:!0});function c(o){const e={};return o.integrity&&(e.integrity=o.integrity),o.referrerPolicy&&(e.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?e.credentials="include":o.crossOrigin==="anonymous"?e.credentials="omit":e.credentials="same-origin",e}function a(o){if(o.ep)return;o.ep=!0;const e=c(o);fetch(o.href,e)}})();const v="modulepreload",T=function(r,_){return new URL(r,_).href},O={},t=function(_,c,a){let o=Promise.resolve();if(c&&c.length>0){const i=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),d=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));o=Promise.allSettled(c.map(n=>{if(n=T(n,a),n in O)return;O[n]=!0;const p=n.endsWith(".css"),R=p?'[rel="stylesheet"]':"";if(!!a)for(let u=i.length-1;u>=0;u--){const l=i[u];if(l.href===n&&(!p||l.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${R}`))return;const m=document.createElement("link");if(m.rel=p?"stylesheet":v,p||(m.as="script"),m.crossOrigin="",m.href=n,d&&m.setAttribute("nonce",d),document.head.appendChild(m),p)return new Promise((u,l)=>{m.addEventListener("load",u),m.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${n}`)))})}))}function e(i){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=i,window.dispatchEvent(s),!s.defaultPrevented)throw i}return o.then(i=>{for(const s of i||[])s.status==="rejected"&&e(s.reason);return _().catch(e)})},{createBrowserChannel:L}=__STORYBOOK_MODULE_CHANNELS__,{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,E=L({page:"preview"});f.setChannel(E);window.__STORYBOOK_ADDONS_CHANNEL__=E;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=E);const y={"./src/components/alert/alert.stories.tsx":async()=>t(()=>import("./alert.stories-DBAGVE4m.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),"./src/components/avatar/avatar.stories.tsx":async()=>t(()=>import("./avatar.stories-HUeKQiUe.js"),__vite__mapDeps([7,1,2,8,6]),import.meta.url),"./src/components/badge/badge.stories.tsx":async()=>t(()=>import("./badge.stories-DloSsjdd.js"),__vite__mapDeps([9,1,2,10,4,6]),import.meta.url),"./src/components/breadcrumb-navigation/breadcrumb-navigation.stories.tsx":async()=>t(()=>import("./breadcrumb-navigation.stories-C-43rqs3.js"),__vite__mapDeps([11,1,2,4,12,5]),import.meta.url),"./src/components/button-group/button-group.stories.tsx":async()=>t(()=>import("./button-group.stories-COJQKQ4l.js"),__vite__mapDeps([13,1,2,4]),import.meta.url),"./src/components/button/button.stories.tsx":async()=>t(()=>import("./button.stories-D9pdHdIx.js"),__vite__mapDeps([14,1,2,15,4,16,5,6]),import.meta.url),"./src/components/checkbox/checkbox.stories.tsx":async()=>t(()=>import("./checkbox.stories-BpAp46hW.js"),__vite__mapDeps([17,1,2,4,6]),import.meta.url),"./src/components/dialog/dialog.stories.tsx":async()=>t(()=>import("./dialog.stories-BX6_XaCw.js"),__vite__mapDeps([18,1,2,6,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,5,4,36,15,16,37,38,39,40,41,42,43,10,44,45,46,3]),import.meta.url),"./src/components/disclosure/disclosure.stories.tsx":async()=>t(()=>import("./disclosure.stories-DwfzQRRi.js"),__vite__mapDeps([47,1,2,5,4,48,38,22,20,32,31,41]),import.meta.url),"./src/components/divider-line/divider-line.stories.tsx":async()=>t(()=>import("./divider-line.stories-lM2hRNkL.js"),__vite__mapDeps([49,1,2,50]),import.meta.url),"./src/components/featured-tag/featured-tag.stories.tsx":async()=>t(()=>import("./featured-tag.stories-Du1zMPkV.js"),__vite__mapDeps([51,1,2,52,4,53,37,5,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/form-field-group.stories.tsx":async()=>t(()=>import("./form-field-group.stories-CNEhqW5L.js"),__vite__mapDeps([54,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/listbox/listbox.stories.tsx":async()=>t(()=>import("./listbox.stories-Buiq_fV8.js"),__vite__mapDeps([55,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/multi-combobox/multi-combobox.stories.tsx":async()=>t(()=>import("./multi-combobox.stories-BDk-Xj5k.js"),__vite__mapDeps([56,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/radio-box/radio-box.stories.tsx":async()=>t(()=>import("./radio-box.stories-CJwvD2av.js"),__vite__mapDeps([57,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45,52]),import.meta.url),"./src/components/form-field/radio-input/radio-input.stories.tsx":async()=>t(()=>import("./radio-input.stories-BrZdO4Rq.js"),__vite__mapDeps([58,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/search-input/search-input.stories.tsx":async()=>t(()=>import("./search-input.stories-CTxLO1lU.js"),__vite__mapDeps([59,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/single-combobox/single-combobox.stories.tsx":async()=>t(()=>import("./single-combobox.stories-DuoRfe_y.js"),__vite__mapDeps([60,1,2,45,4,5,37,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34]),import.meta.url),"./src/components/form-field/text-input/text-input.stories.tsx":async()=>t(()=>import("./text-input.stories-B1dwyupg.js"),__vite__mapDeps([61,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/form-field/textarea/textarea.stories.tsx":async()=>t(()=>import("./textarea.stories-BxDua9o8.js"),__vite__mapDeps([62,1,2,37,5,4,38,22,20,39,26,30,19,40,41,25,42,43,28,24,27,32,10,44,23,34,45]),import.meta.url),"./src/components/icon-button/icon-button.stories.tsx":async()=>t(()=>import("./icon-button.stories-0-APhIQ1.js"),__vite__mapDeps([63,36,1,2,4,5]),import.meta.url),"./src/components/inline-alert/inline-alert.stories.tsx":async()=>t(()=>import("./inline-alert.stories-CHU6-QPb.js"),__vite__mapDeps([64,1,2,4,5,6]),import.meta.url),"./src/components/last-changed-info/last-changed-info.stories.tsx":async()=>t(()=>import("./last-changed-info.stories-C86MXOjM.js"),__vite__mapDeps([65,1,2,4]),import.meta.url),"./src/components/link/link.stories.tsx":async()=>t(()=>import("./link.stories-BsuBz4ei.js"),__vite__mapDeps([66,1,2,12,4,5,6]),import.meta.url),"./src/components/menu/menu-info-item/menu-info-item.stories.tsx":async()=>t(()=>import("./menu-info-item.stories-CGoXCqdp.js"),__vite__mapDeps([67,1,2,68]),import.meta.url),"./src/components/menu/menu-item/menu-item.stories.tsx":async()=>t(()=>import("./menu-item.stories-BTxqC4cZ.js"),__vite__mapDeps([69,1,2,5,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/components/menu/menu-separator/menu-separator.stories.tsx":async()=>t(()=>import("./menu-separator.stories-D7MgxHW9.js"),__vite__mapDeps([73,1,2,71]),import.meta.url),"./src/components/menu/menu-title/menu-title.stories.tsx":async()=>t(()=>import("./menu-title.stories-BpGHFQrG.js"),__vite__mapDeps([74,1,2,72]),import.meta.url),"./src/components/menu/menu.stories.tsx":async()=>t(()=>import("./menu.stories-xNzefD_l.js"),__vite__mapDeps([75,1,2,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/components/navigation/navigation.stories.tsx":async()=>t(()=>import("./navigation.stories-DFpQPa8H.js"),__vite__mapDeps([76,1,2,5,4,48,38,22,20,32,31,41,77,26,78,43,23,24,25,27,29,30]),import.meta.url),"./src/components/page/page.stories.tsx":async()=>t(()=>import("./page.stories-BfCGd43p.js"),__vite__mapDeps([79,1,2]),import.meta.url),"./src/components/panel/panel.stories.tsx":async()=>t(()=>import("./panel.stories-B05jnSyq.js"),__vite__mapDeps([80,1,2,53,4,15,16,6,46,19,20,39,26,30,40,38,22,41]),import.meta.url),"./src/components/popover-menu/popover-menu.stories.tsx":async()=>t(()=>import("./popover-menu.stories-C3Er2s3-.js"),__vite__mapDeps([81,1,2,5,77,26,15,4,16,78,38,22,20,43,23,24,25,27,29,30,32,31,41]),import.meta.url),"./src/components/section/section.stories.tsx":async()=>t(()=>import("./section.stories-c2uXgnH6.js"),__vite__mapDeps([82,1,2,15,4,16]),import.meta.url),"./src/components/sidebar-container/sidebar-container.stories.tsx":async()=>t(()=>import("./sidebar-container.stories-CD7erG3P.js"),__vite__mapDeps([83,1,2]),import.meta.url),"./src/components/sidebar/sidebar.stories.tsx":async()=>t(()=>import("./sidebar.stories-CTIXw2h_.js"),__vite__mapDeps([84,1,2,4]),import.meta.url),"./src/components/sidesheet/sidesheet.stories.tsx":async()=>t(()=>import("./sidesheet.stories-Iwuc9DOn.js"),__vite__mapDeps([85,1,2,21,22,20,23,24,25,26,27,28,29,30,31,32,19,33,34,35,15,4,16]),import.meta.url),"./src/components/skeleton/skeleton.stories.tsx":async()=>t(()=>import("./skeleton.stories-DkC3bvFE.js"),__vite__mapDeps([86,1,2,4]),import.meta.url),"./src/components/spinner-overlay/spinner-overlay.stories.tsx":async()=>t(()=>import("./spinner-overlay.stories-Ceh5rt6d.js"),__vite__mapDeps([87,1,2,16,4]),import.meta.url),"./src/components/spinner/spinner.stories.tsx":async()=>t(()=>import("./spinner.stories-VlGwChGj.js"),__vite__mapDeps([88,1,2,16,4]),import.meta.url),"./src/components/tab/tab.stories.tsx":async()=>t(()=>import("./tab.stories-BExfMg0Y.js"),__vite__mapDeps([89,1,2,4,38,22,20,33,30,25,6]),import.meta.url),"./src/components/table-unvirtualized/table-unvirtualized.stories.tsx":async()=>t(()=>import("./table-unvirtualized.stories-D4Z2ULmw.js"),__vite__mapDeps([90,1,2,91,4,16,15]),import.meta.url),"./src/components/table-virtualized/table-virtualized.stories.tsx":async()=>t(()=>import("./table-virtualized.stories-CZFEUGuD.js"),__vite__mapDeps([92,1,2,44,26,4,91,16,5,15,36,50]),import.meta.url),"./src/components/tag/tag.stories.tsx":async()=>t(()=>import("./tag.stories-D4S3pQPY.js"),__vite__mapDeps([93,1,2,45,4,5]),import.meta.url),"./src/components/toast/toast.stories.tsx":async()=>t(()=>import("./toast.stories-Bzmbls-5.js"),__vite__mapDeps([94,1,2,5,4]),import.meta.url),"./src/components/toggle/toggle.stories.tsx":async()=>t(()=>import("./toggle.stories-DcNmYdAI.js"),__vite__mapDeps([95,1,2,46,19,20,39,26,30,40,38,22,41,4]),import.meta.url),"./src/components/tooltip/tooltip.stories.tsx":async()=>t(()=>import("./tooltip.stories-DmTKg58f.js"),__vite__mapDeps([96,1,2,6,77,26,4,35,20,33,27,32,15,16]),import.meta.url),"./src/components/top-bar/top-bar.stories.tsx":async()=>t(()=>import("./top-bar.stories-BeIujtwl.js"),__vite__mapDeps([97,1,2,4,5,8,70,38,22,20,26,42,43,28,24,25,27,32,41,19,40,68,71,72]),import.meta.url),"./src/icons/icons.mdx":async()=>t(()=>import("./icons-BtgjIq6b.js"),__vite__mapDeps([98,1,2,99,100,26,101,102,103,5]),import.meta.url),"./src/index.mdx":async()=>t(()=>import("./index-B27qxNgk.js"),__vite__mapDeps([104,1,2,99,100,26,101,102,103]),import.meta.url),"./src/styles/global-styles.stories.tsx":async()=>t(()=>import("./global-styles.stories-MeCc39-H.js"),__vite__mapDeps([105,1,2,91,4,16]),import.meta.url)};async function P(r){return y[r]()}const{composeConfigs:I,PreviewWeb:V,ClientApi:b}=__STORYBOOK_MODULE_PREVIEW_API__,D=async(r=[])=>{const _=await Promise.all([r.at(0)??t(()=>import("./entry-preview-Dr1n3Wdx.js"),__vite__mapDeps([106,107,2,26]),import.meta.url),r.at(1)??t(()=>import("./entry-preview-docs-Blm_ViJ3.js"),__vite__mapDeps([108,107,102,2,103]),import.meta.url),r.at(2)??t(()=>import("./preview-BhhEZcNS.js"),__vite__mapDeps([109,101]),import.meta.url),r.at(3)??t(()=>import("./preview-BXpCwDS1.js"),[],import.meta.url),r.at(4)??t(()=>import("./preview-aVwhiz9X.js"),[],import.meta.url),r.at(5)??t(()=>import("./preview-D77C14du.js"),__vite__mapDeps([110,103]),import.meta.url),r.at(6)??t(()=>import("./preview-DFmD0pui.js"),[],import.meta.url),r.at(7)??t(()=>import("./preview-CFgKly6U.js"),[],import.meta.url),r.at(8)??t(()=>import("./preview-BWzBA1C2.js"),__vite__mapDeps([111,103]),import.meta.url),r.at(9)??t(()=>import("./preview-DGUiP6tS.js"),[],import.meta.url),r.at(10)??t(()=>import("./preview-DVI_gYQC.js"),[],import.meta.url),r.at(11)??t(()=>import("./preview-BbTc69zT.js"),__vite__mapDeps([112,113]),import.meta.url)]);return I(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new V(P,D);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{t as _}; diff --git a/assets/index-bmGcrzev.js b/assets/index-B27qxNgk.js similarity index 92% rename from assets/index-bmGcrzev.js rename to assets/index-B27qxNgk.js index 76915ca4..12adaafd 100644 --- a/assets/index-bmGcrzev.js +++ b/assets/index-B27qxNgk.js @@ -1,4 +1,4 @@ -import{j as n}from"./jsx-runtime-C798UXYj.js";import{useMDXComponents as o}from"./index-CFK-oMtb.js";import{ae as s}from"./index-D4CCEPie.js";import"./index-0d5eMwbi.js";import"./iframe-B1Sidt8M.js";import"../sb-preview/runtime.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";function i(t){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...o(),...t.components};return n.jsxs(n.Fragment,{children:[n.jsx(s,{title:"Home"}),` +import{j as n}from"./jsx-runtime-C798UXYj.js";import{useMDXComponents as o}from"./index-CFK-oMtb.js";import{ae as s}from"./index-D_yKE35a.js";import"./index-0d5eMwbi.js";import"./iframe-9T-PF226.js";import"../sb-preview/runtime.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";function i(t){const e={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...o(),...t.components};return n.jsxs(n.Fragment,{children:[n.jsx(s,{title:"Home"}),` `,n.jsx(e.h1,{id:"hailstorm",children:"Hailstorm"}),` `,n.jsx(e.h2,{id:"introduction",children:"Introduction"}),` `,n.jsx(e.p,{children:"Hailstorm is a design system for Abusix. It is a collection of reusable components, guidelines, and best practices that can be used to build consistent user interfaces across all of our products."}),` diff --git a/assets/index-BgfbgFhO.js b/assets/index-BgfbgFhO.js new file mode 100644 index 00000000..c76aff3b --- /dev/null +++ b/assets/index-BgfbgFhO.js @@ -0,0 +1,4 @@ +import{r as b}from"./index-0d5eMwbi.js";import{r as I}from"./index-BoyHNU0R.js";function g(o,r,e){let s=e.initialDeps??[],t;return()=>{var n,i,l,h;let c;e.key&&((n=e.debug)!=null&&n.call(e))&&(c=Date.now());const a=o();if(!(a.length!==s.length||a.some((m,f)=>s[f]!==m)))return t;s=a;let d;if(e.key&&((i=e.debug)!=null&&i.call(e))&&(d=Date.now()),t=r(...a),e.key&&((l=e.debug)!=null&&l.call(e))){const m=Math.round((Date.now()-c)*100)/100,f=Math.round((Date.now()-d)*100)/100,v=f/16,x=(u,z)=>{for(u=String(u);u.lengthMath.abs(o-r)<1,y=(o,r,e)=>{let s;return function(...t){o.clearTimeout(s),s=o.setTimeout(()=>r.apply(this,t),e)}},O=o=>o,C=o=>{const r=Math.max(o.startIndex-o.overscan,0),e=Math.min(o.endIndex+o.overscan,o.count-1),s=[];for(let t=r;t<=e;t++)s.push(t);return s},T=(o,r)=>{const e=o.scrollElement;if(!e)return;const s=o.targetWindow;if(!s)return;const t=i=>{const{width:l,height:h}=i;r({width:Math.round(l),height:Math.round(h)})};if(t(e.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const n=new s.ResizeObserver(i=>{const l=i[0];if(l!=null&&l.borderBoxSize){const h=l.borderBoxSize[0];if(h){t({width:h.inlineSize,height:h.blockSize});return}}t(e.getBoundingClientRect())});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},E={passive:!0},_=typeof window>"u"?!0:"onscrollend"in window,R=(o,r)=>{const e=o.scrollElement;if(!e)return;const s=o.targetWindow;if(!s)return;let t=0;const n=_?()=>{}:y(s,()=>{r(t,!1)},o.options.isScrollingResetDelay),i=c=>()=>{const{horizontal:a,isRtl:p}=o.options;t=a?e.scrollLeft*(p&&-1||1):e.scrollTop,n(),r(t,c)},l=i(!0),h=i(!1);return h(),e.addEventListener("scroll",l,E),e.addEventListener("scrollend",h,E),()=>{e.removeEventListener("scroll",l),e.removeEventListener("scrollend",h)}},k=(o,r,e)=>{if(r!=null&&r.borderBoxSize){const s=r.borderBoxSize[0];if(s)return Math.round(s[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(o.getBoundingClientRect()[e.options.horizontal?"width":"height"])},D=(o,{adjustments:r=0,behavior:e},s)=>{var t,n;const i=o+r;(n=(t=s.scrollElement)==null?void 0:t.scrollTo)==null||n.call(t,{[s.options.horizontal?"left":"top"]:i,behavior:e})};class F{constructor(r){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const s=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(t=>{t.forEach(n=>{this._measureElement(n.target,n)})}));return{disconnect:()=>{var t;(t=s())==null||t.disconnect(),e=null},observe:t=>{var n;return(n=s())==null?void 0:n.observe(t,{box:"border-box"})},unobserve:t=>{var n;return(n=s())==null?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([s,t])=>{typeof t>"u"&&delete e[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:O,rangeExtractor:C,onChange:()=>{},measureElement:k,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,...e}},this.notify=e=>{var s,t;(t=(s=this.options).onChange)==null||t.call(s,this,e)},this.maybeNotify=g(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.maybeNotify();return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(t=>{this.observer.observe(t)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t=>{this.scrollRect=t,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(t,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,s)=>{const t=new Map,n=new Map;for(let i=s-1;i>=0;i--){const l=e[i];if(t.has(l.lane))continue;const h=n.get(l.lane);if(h==null||l.end>h.end?n.set(l.lane,l):l.endi.end===l.end?i.index-l.index:i.end-l.end)[0]:void 0},this.getMeasurementOptions=g(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,s,t,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i}),{key:!1}),this.getMeasurements=g(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i},l)=>{if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(a=>{this.itemSizeCache.set(a.key,a.size)}));const h=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,h);for(let a=h;athis.options.debug}),this.calculateRange=g(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,s,t)=>this.range=e.length>0&&s>0?A({measurements:e,outerSize:s,scrollOffset:t}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=g(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(e,s,t,n)=>s===null?[]:e({startIndex:s.startIndex,endIndex:s.endIndex,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const s=this.options.indexAttribute,t=e.getAttribute(s);return t?parseInt(t,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(e,s)=>{const t=this.indexFromElement(e),n=this.measurementsCache[t];if(!n)return;const i=n.key,l=this.elementsCache.get(i);l!==e&&(l&&this.observer.unobserve(l),this.observer.observe(e),this.elementsCache.set(i,e)),e.isConnected&&this.resizeItem(t,this.options.measureElement(e,s,this))},this.resizeItem=(e,s)=>{const t=this.measurementsCache[e];if(!t)return;const n=this.itemSizeCache.get(t.key)??t.size,i=s-n;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,i,this):t.start{if(!e){this.elementsCache.forEach((s,t)=>{s.isConnected||(this.observer.unobserve(s),this.elementsCache.delete(t))});return}this._measureElement(e,void 0)},this.getVirtualItems=g(()=>[this.getIndexes(),this.getMeasurements()],(e,s)=>{const t=[];for(let n=0,i=e.length;nthis.options.debug}),this.getVirtualItemForOffset=e=>{const s=this.getMeasurements();if(s.length!==0)return S(s[M(0,s.length-1,t=>S(s[t]).start,e)])},this.getOffsetForAlignment=(e,s)=>{const t=this.getSize(),n=this.getScrollOffset();s==="auto"&&(e<=n?s="start":e>=n+t?s="end":s="start"),s==="start"?e=e:s==="end"?e=e-t:s==="center"&&(e=e-t/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-t;return Math.max(Math.min(h,e),0)},this.getOffsetForIndex=(e,s="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const t=this.measurementsCache[e];if(!t)return;const n=this.getSize(),i=this.getScrollOffset();if(s==="auto")if(t.end>=i+n-this.options.scrollPaddingEnd)s="end";else if(t.start<=i+this.options.scrollPaddingStart)s="start";else return[i,s];const l=s==="end"?t.end+this.options.scrollPaddingEnd:t.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,s),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:s="start",behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,s),{adjustments:void 0,behavior:t})},this.scrollToIndex=(e,{align:s="auto",behavior:t}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const n=this.getOffsetForIndex(e,s);if(!n)return;const[i,l]=n;this._scrollToOffset(i,{adjustments:void 0,behavior:t}),t!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[c]=S(this.getOffsetForIndex(e,l));w(c,this.getScrollOffset())||this.scrollToIndex(e,{align:l,behavior:t})}else this.scrollToIndex(e,{align:l,behavior:t})}))},this.scrollBy=(e,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var e;const s=this.getMeasurements();let t;return s.length===0?t=this.options.paddingStart:t=this.options.lanes===1?((e=s[s.length-1])==null?void 0:e.end)??0:Math.max(...s.slice(-this.options.lanes).map(n=>n.end)),Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:s,behavior:t})=>{this.options.scrollToFn(e,{behavior:t,adjustments:s},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(r)}}const M=(o,r,e,s)=>{for(;o<=r;){const t=(o+r)/2|0,n=e(t);if(ns)r=t-1;else return t}return o>0?o-1:0};function A({measurements:o,outerSize:r,scrollOffset:e}){const s=o.length-1,n=M(0,s,l=>o[l].start,e);let i=n;for(;i({}),{})[1],e={...o,onChange:(t,n)=>{var i;n?I.flushSync(r):r(),(i=o.onChange)==null||i.call(o,t,n)}},[s]=b.useState(()=>new F(e));return s.setOptions(e),b.useEffect(()=>s._didMount(),[]),W(()=>s._willUpdate()),s}function L(o){return j({observeElementRect:T,observeElementOffset:R,scrollToFn:D,...o})}export{L as u}; diff --git a/assets/index-D4CCEPie.js b/assets/index-D_yKE35a.js similarity index 99% rename from assets/index-D4CCEPie.js rename to assets/index-D_yKE35a.js index d554be32..e4facd02 100644 --- a/assets/index-D4CCEPie.js +++ b/assets/index-D_yKE35a.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BwmOyQc7.js","./iframe-B1Sidt8M.js","./index-0d5eMwbi.js","./jsx-runtime-C798UXYj.js","./index-BoyHNU0R.js","./index-D-8MO0q_.js","./index-CxJhtZoZ.js","./index-DrFu-skq.js","./Color-ERTF36HU-B3LPFtYd.js"])))=>i.map(i=>d[i]); -var dS=Object.defineProperty;var pS=(e,t,r)=>t in e?dS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $n=(e,t,r)=>pS(e,typeof t!="symbol"?t+"":t,r);import{_ as $3}from"./iframe-B1Sidt8M.js";import{r as l,R as y,c as $i,g as $s}from"./index-0d5eMwbi.js";import{j as X}from"./jsx-runtime-C798UXYj.js";import{r as Ps,E as P3}from"./index-BoyHNU0R.js";import{O as N3,P as fS}from"./index-D-8MO0q_.js";import{y as Em,D as tc}from"./index-CxJhtZoZ.js";import{d as hS}from"./index-DrFu-skq.js";var mS=Object.create,j3=Object.defineProperty,gS=Object.getOwnPropertyDescriptor,H3=Object.getOwnPropertyNames,vS=Object.getPrototypeOf,yS=Object.prototype.hasOwnProperty,Ra=(e,t)=>function(){return t||(0,e[H3(e)[0]])((t={exports:{}}).exports,t),t.exports},bS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of H3(t))!yS.call(e,a)&&a!==r&&j3(e,a,{get:()=>t[a],enumerable:!(n=gS(t,a))||n.enumerable});return e},wS=(e,t,r)=>(r=e!=null?mS(vS(e)):{},bS(!e||!e.__esModule?j3(r,"default",{value:e,enumerable:!0}):r,e)),Et=e=>`control-${e.replace(/\s+/g,"-")}`,Ns=e=>`set-${e.replace(/\s+/g,"-")}`,ES=Object.create,Mp=Object.defineProperty,xS=Object.getOwnPropertyDescriptor,CS=Object.getOwnPropertyNames,DS=Object.getPrototypeOf,SS=Object.prototype.hasOwnProperty,I=(e,t)=>Mp(e,"name",{value:t,configurable:!0}),Pi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),js=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),AS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of CS(t))!SS.call(e,a)&&a!==r&&Mp(e,a,{get:()=>t[a],enumerable:!(n=xS(t,a))||n.enumerable});return e},$p=(e,t,r)=>(r=e!=null?ES(DS(e)):{},AS(t||!e||!e.__esModule?Mp(r,"default",{value:e,enumerable:!0}):r,e)),kS=js(e=>{(function(){var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,f=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===a||P===f||P===i||P===o||P===p||P===m||typeof P=="object"&&P!==null&&(P.$$typeof===v||P.$$typeof===g||P.$$typeof===s||P.$$typeof===u||P.$$typeof===h||P.$$typeof===x||P.$$typeof===E||P.$$typeof===C||P.$$typeof===b)}I(w,"isValidElementType");function D(P){if(typeof P=="object"&&P!==null){var it=P.$$typeof;switch(it){case r:var kt=P.type;switch(kt){case d:case f:case a:case i:case o:case p:return kt;default:var Vr=kt&&kt.$$typeof;switch(Vr){case u:case h:case v:case g:case s:return Vr;default:return it}}case n:return it}}}I(D,"typeOf");var S=d,A=f,k=u,F=s,T=r,R=h,L=a,z=v,M=g,O=n,$=i,H=o,K=p,N=!1;function W(P){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),te(P)||D(P)===d}I(W,"isAsyncMode");function te(P){return D(P)===f}I(te,"isConcurrentMode");function ue(P){return D(P)===u}I(ue,"isContextConsumer");function re(P){return D(P)===s}I(re,"isContextProvider");function ae(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}I(ae,"isElement");function j(P){return D(P)===h}I(j,"isForwardRef");function Z(P){return D(P)===a}I(Z,"isFragment");function J(P){return D(P)===v}I(J,"isLazy");function ge(P){return D(P)===g}I(ge,"isMemo");function ke(P){return D(P)===n}I(ke,"isPortal");function At(P){return D(P)===i}I(At,"isProfiler");function Ue(P){return D(P)===o}I(Ue,"isStrictMode");function ot(P){return D(P)===p}I(ot,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=A,e.ContextConsumer=k,e.ContextProvider=F,e.Element=T,e.ForwardRef=R,e.Fragment=L,e.Lazy=z,e.Memo=M,e.Portal=O,e.Profiler=$,e.StrictMode=H,e.Suspense=K,e.isAsyncMode=W,e.isConcurrentMode=te,e.isContextConsumer=ue,e.isContextProvider=re,e.isElement=ae,e.isForwardRef=j,e.isFragment=Z,e.isLazy=J,e.isMemo=ge,e.isPortal=ke,e.isProfiler=At,e.isStrictMode=Ue,e.isSuspense=ot,e.isValidElementType=w,e.typeOf=D})()}),_S=js((e,t)=>{t.exports=kS()}),V3=js((e,t)=>{var r=_S(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[r.ForwardRef]=o,s[r.Memo]=i;function u(b){return r.isMemo(b)?i:s[b.$$typeof]||n}I(u,"getStatics");var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,g=Object.prototype;function v(b,x,E){if(typeof x!="string"){if(g){var C=m(x);C&&C!==g&&v(b,C,E)}var w=f(x);h&&(w=w.concat(h(x)));for(var D=u(b),S=u(x),A=0;A{(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){return I(function r(n,a,o){function i(d,f){if(!a[d]){if(!n[d]){var h=typeof Pi=="function"&Πif(!f&&h)return h(d,!0);if(s)return s(d,!0);var p=new Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p}var m=a[d]={exports:{}};n[d][0].call(m.exports,function(g){var v=n[d][1][g];return i(v||g)},m,m.exports,r,n,a,o)}return a[d].exports}I(i,"s");for(var s=typeof Pi=="function"&&Pi,u=0;u=0)return this.lastItem=this.list[s],this.list[s].val},o.prototype.set=function(i,s){var u;return this.lastItem&&this.isEqual(this.lastItem.key,i)?(this.lastItem.val=s,this):(u=this.indexOf(i),u>=0?(this.lastItem=this.list[u],this.list[u].val=s,this):(this.lastItem={key:i,val:s},this.list.push(this.lastItem),this.size++,this))},o.prototype.delete=function(i){var s;if(this.lastItem&&this.isEqual(this.lastItem.key,i)&&(this.lastItem=void 0),s=this.indexOf(i),s>=0)return this.size--,this.list.splice(s,1)[0]},o.prototype.has=function(i){var s;return this.lastItem&&this.isEqual(this.lastItem.key,i)?!0:(s=this.indexOf(i),s>=0?(this.lastItem=this.list[s],!0):!1)},o.prototype.forEach=function(i,s){var u;for(u=0;u0&&(E[x]={cacheItem:g,arg:arguments[x]},C?i(h,E):h.push(E),h.length>d&&s(h.shift())),m.wasMemoized=C,m.numArgs=x+1,b},"memoizerific");return m.limit=d,m.wasMemoized=!1,m.cache=f,m.lru=h,m}};function i(d,f){var h=d.length,p=f.length,m,g,v;for(g=0;g=0&&(h=d[m],p=h.cacheItem.get(h.arg),!p||!p.size);m--)h.cacheItem.delete(h.arg)}I(s,"removeCachedResult");function u(d,f){return d===f||d!==d&&f!==f}I(u,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function Ut(){return Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.map(i=>d[i]); +var dS=Object.defineProperty;var pS=(e,t,r)=>t in e?dS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $n=(e,t,r)=>pS(e,typeof t!="symbol"?t+"":t,r);import{_ as $3}from"./iframe-9T-PF226.js";import{r as l,R as y,c as $i,g as $s}from"./index-0d5eMwbi.js";import{j as X}from"./jsx-runtime-C798UXYj.js";import{r as Ps,E as P3}from"./index-BoyHNU0R.js";import{O as N3,P as fS}from"./index-D-8MO0q_.js";import{y as Em,D as tc}from"./index-CxJhtZoZ.js";import{d as hS}from"./index-DrFu-skq.js";var mS=Object.create,j3=Object.defineProperty,gS=Object.getOwnPropertyDescriptor,H3=Object.getOwnPropertyNames,vS=Object.getPrototypeOf,yS=Object.prototype.hasOwnProperty,Ra=(e,t)=>function(){return t||(0,e[H3(e)[0]])((t={exports:{}}).exports,t),t.exports},bS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of H3(t))!yS.call(e,a)&&a!==r&&j3(e,a,{get:()=>t[a],enumerable:!(n=gS(t,a))||n.enumerable});return e},wS=(e,t,r)=>(r=e!=null?mS(vS(e)):{},bS(!e||!e.__esModule?j3(r,"default",{value:e,enumerable:!0}):r,e)),Et=e=>`control-${e.replace(/\s+/g,"-")}`,Ns=e=>`set-${e.replace(/\s+/g,"-")}`,ES=Object.create,Mp=Object.defineProperty,xS=Object.getOwnPropertyDescriptor,CS=Object.getOwnPropertyNames,DS=Object.getPrototypeOf,SS=Object.prototype.hasOwnProperty,I=(e,t)=>Mp(e,"name",{value:t,configurable:!0}),Pi=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),js=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),AS=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of CS(t))!SS.call(e,a)&&a!==r&&Mp(e,a,{get:()=>t[a],enumerable:!(n=xS(t,a))||n.enumerable});return e},$p=(e,t,r)=>(r=e!=null?ES(DS(e)):{},AS(t||!e||!e.__esModule?Mp(r,"default",{value:e,enumerable:!0}):r,e)),kS=js(e=>{(function(){var t=typeof Symbol=="function"&&Symbol.for,r=t?Symbol.for("react.element"):60103,n=t?Symbol.for("react.portal"):60106,a=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,i=t?Symbol.for("react.profiler"):60114,s=t?Symbol.for("react.provider"):60109,u=t?Symbol.for("react.context"):60110,d=t?Symbol.for("react.async_mode"):60111,f=t?Symbol.for("react.concurrent_mode"):60111,h=t?Symbol.for("react.forward_ref"):60112,p=t?Symbol.for("react.suspense"):60113,m=t?Symbol.for("react.suspense_list"):60120,g=t?Symbol.for("react.memo"):60115,v=t?Symbol.for("react.lazy"):60116,b=t?Symbol.for("react.block"):60121,x=t?Symbol.for("react.fundamental"):60117,E=t?Symbol.for("react.responder"):60118,C=t?Symbol.for("react.scope"):60119;function w(P){return typeof P=="string"||typeof P=="function"||P===a||P===f||P===i||P===o||P===p||P===m||typeof P=="object"&&P!==null&&(P.$$typeof===v||P.$$typeof===g||P.$$typeof===s||P.$$typeof===u||P.$$typeof===h||P.$$typeof===x||P.$$typeof===E||P.$$typeof===C||P.$$typeof===b)}I(w,"isValidElementType");function D(P){if(typeof P=="object"&&P!==null){var it=P.$$typeof;switch(it){case r:var kt=P.type;switch(kt){case d:case f:case a:case i:case o:case p:return kt;default:var Vr=kt&&kt.$$typeof;switch(Vr){case u:case h:case v:case g:case s:return Vr;default:return it}}case n:return it}}}I(D,"typeOf");var S=d,A=f,k=u,F=s,T=r,R=h,L=a,z=v,M=g,O=n,$=i,H=o,K=p,N=!1;function W(P){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),te(P)||D(P)===d}I(W,"isAsyncMode");function te(P){return D(P)===f}I(te,"isConcurrentMode");function ue(P){return D(P)===u}I(ue,"isContextConsumer");function re(P){return D(P)===s}I(re,"isContextProvider");function ae(P){return typeof P=="object"&&P!==null&&P.$$typeof===r}I(ae,"isElement");function j(P){return D(P)===h}I(j,"isForwardRef");function Z(P){return D(P)===a}I(Z,"isFragment");function J(P){return D(P)===v}I(J,"isLazy");function ge(P){return D(P)===g}I(ge,"isMemo");function ke(P){return D(P)===n}I(ke,"isPortal");function At(P){return D(P)===i}I(At,"isProfiler");function Ue(P){return D(P)===o}I(Ue,"isStrictMode");function ot(P){return D(P)===p}I(ot,"isSuspense"),e.AsyncMode=S,e.ConcurrentMode=A,e.ContextConsumer=k,e.ContextProvider=F,e.Element=T,e.ForwardRef=R,e.Fragment=L,e.Lazy=z,e.Memo=M,e.Portal=O,e.Profiler=$,e.StrictMode=H,e.Suspense=K,e.isAsyncMode=W,e.isConcurrentMode=te,e.isContextConsumer=ue,e.isContextProvider=re,e.isElement=ae,e.isForwardRef=j,e.isFragment=Z,e.isLazy=J,e.isMemo=ge,e.isPortal=ke,e.isProfiler=At,e.isStrictMode=Ue,e.isSuspense=ot,e.isValidElementType=w,e.typeOf=D})()}),_S=js((e,t)=>{t.exports=kS()}),V3=js((e,t)=>{var r=_S(),n={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},o={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[r.ForwardRef]=o,s[r.Memo]=i;function u(b){return r.isMemo(b)?i:s[b.$$typeof]||n}I(u,"getStatics");var d=Object.defineProperty,f=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,g=Object.prototype;function v(b,x,E){if(typeof x!="string"){if(g){var C=m(x);C&&C!==g&&v(b,C,E)}var w=f(x);h&&(w=w.concat(h(x)));for(var D=u(b),S=u(x),A=0;A{(function(r){if(typeof e=="object"&&typeof t<"u")t.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var n;typeof window<"u"?n=window:typeof global<"u"?n=global:typeof self<"u"?n=self:n=this,n.memoizerific=r()}})(function(){return I(function r(n,a,o){function i(d,f){if(!a[d]){if(!n[d]){var h=typeof Pi=="function"&Πif(!f&&h)return h(d,!0);if(s)return s(d,!0);var p=new Error("Cannot find module '"+d+"'");throw p.code="MODULE_NOT_FOUND",p}var m=a[d]={exports:{}};n[d][0].call(m.exports,function(g){var v=n[d][1][g];return i(v||g)},m,m.exports,r,n,a,o)}return a[d].exports}I(i,"s");for(var s=typeof Pi=="function"&&Pi,u=0;u=0)return this.lastItem=this.list[s],this.list[s].val},o.prototype.set=function(i,s){var u;return this.lastItem&&this.isEqual(this.lastItem.key,i)?(this.lastItem.val=s,this):(u=this.indexOf(i),u>=0?(this.lastItem=this.list[u],this.list[u].val=s,this):(this.lastItem={key:i,val:s},this.list.push(this.lastItem),this.size++,this))},o.prototype.delete=function(i){var s;if(this.lastItem&&this.isEqual(this.lastItem.key,i)&&(this.lastItem=void 0),s=this.indexOf(i),s>=0)return this.size--,this.list.splice(s,1)[0]},o.prototype.has=function(i){var s;return this.lastItem&&this.isEqual(this.lastItem.key,i)?!0:(s=this.indexOf(i),s>=0?(this.lastItem=this.list[s],!0):!1)},o.prototype.forEach=function(i,s){var u;for(u=0;u0&&(E[x]={cacheItem:g,arg:arguments[x]},C?i(h,E):h.push(E),h.length>d&&s(h.shift())),m.wasMemoized=C,m.numArgs=x+1,b},"memoizerific");return m.limit=d,m.wasMemoized=!1,m.cache=f,m.lru=h,m}};function i(d,f){var h=d.length,p=f.length,m,g,v;for(g=0;g=0&&(h=d[m],p=h.cacheItem.get(h.arg),!p||!p.size);m--)h.cacheItem.delete(h.arg)}I(s,"removeCachedResult");function u(d,f){return d===f||d!==d&&f!==f}I(u,"isEqual")},{"map-or-similar":1}]},{},[3])(3)})});function Ut(){return Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?Ce(Ba,--He):0,fa--,he===10&&(fa=1,Us--),he}I(X3,"prev");function Pe(){return he=He2||ha(he)>3?"":" "}I(Q3,"whitespace");function eb(e,t){for(;--t&&Pe()&&!(he<48||he>102||he>57&&he<65||he>70&&he<97););return za(e,Ro()+(t<6&&mt()==32&&Pe()==32))}I(eb,"escaping");function ql(e){for(;Pe();)switch(he){case e:return He;case 34:case 39:e!==34&&e!==39&&ql(he);break;case 40:e===41&&ql(e);break;case 92:Pe();break}return He}I(ql,"delimiter");function tb(e,t){for(;Pe()&&e+he!==57&&!(e+he===84&&mt()===47););return"/*"+za(t,He-1)+"*"+Hs(e===47?e:Pe())}I(tb,"commenter");function rb(e){for(;!ha(mt());)Pe();return za(e,He)}I(rb,"identifier");function nb(e){return Wp(zo("",null,null,null,[""],e=qp(e),0,[0],e))}I(nb,"compile");function zo(e,t,r,n,a,o,i,s,u){for(var d=0,f=0,h=i,p=0,m=0,g=0,v=1,b=1,x=1,E=0,C="",w=a,D=o,S=n,A=C;b;)switch(g=E,E=Pe()){case 40:if(g!=108&&Ce(A,h-1)==58){Ul(A+=ee(Bo(E),"&","&\f"),"&\f")!=-1&&(x=-1);break}case 34:case 39:case 91:A+=Bo(E);break;case 9:case 10:case 13:case 32:A+=Q3(g);break;case 92:A+=eb(Ro()-1,7);continue;case 47:switch(mt()){case 42:case 47:bo(ab(tb(Pe(),Ro()),t,r),u);break;default:A+="/"}break;case 123*v:s[d++]=dt(A)*x;case 125*v:case 59:case 0:switch(E){case 0:case 125:b=0;case 59+f:x==-1&&(A=ee(A,/\f/g,"")),m>0&&dt(A)-h&&bo(m>32?Md(A+";",n,r,h-1):Md(ee(A," ","")+";",n,r,h-2),u);break;case 59:A+=";";default:if(bo(S=Ld(A,t,r,d,f,a,s,C,w=[],D=[],h),o),E===123)if(f===0)zo(A,t,S,S,w,o,h,s,D);else switch(p===99&&Ce(A,3)===110?100:p){case 100:case 108:case 109:case 115:zo(e,S,S,n&&bo(Ld(e,S,S,0,0,a,s,C,a,w=[],h),D),a,D,h,s,n?w:D);break;default:zo(A,S,S,S,[""],D,0,s,D)}}d=f=m=0,v=x=1,C=A="",h=i;break;case 58:h=1+dt(A),m=g;default:if(v<1){if(E==123)--v;else if(E==125&&v++==0&&X3()==125)continue}switch(A+=Hs(E),E*v){case 38:x=f>0?1:(A+="\f",-1);break;case 44:s[d++]=(dt(A)-1)*x,x=1;break;case 64:mt()===45&&(A+=Bo(Pe())),p=mt(),f=h=dt(C=A+=rb(Ro())),E++;break;case 45:g===45&&dt(A)==2&&(v=0)}}return o}I(zo,"parse");function Ld(e,t,r,n,a,o,i,s,u,d,f){for(var h=a-1,p=a===0?o:[""],m=Vs(p),g=0,v=0,b=0;g0?p[x]+" "+E:ee(E,/&\f/g,p[x])))&&(u[b++]=C);return si(e,t,r,a===0?Hp:s,u,d,f)}I(Ld,"ruleset");function ab(e,t,r){return si(e,t,r,jp,Hs(J3()),pa(e,2,-2),0)}I(ab,"comment");function Md(e,t,r,n){return si(e,t,r,Vp,pa(e,0,n),pa(e,n+1,-1),n)}I(Md,"declaration");function dn(e,t){for(var r="",n=Vs(e),a=0;a-1},"isIgnoringComment"),VS=I(function(e){return function(t,r,n){if(!(t.type!=="rule"||e.compat)){var a=t.value.match(/(:first|:nth|:nth-last)-child/g);if(a){for(var o=!!t.parent,i=o?t.parent.children:n,s=i.length-1;s>=0;s--){var u=i[s];if(u.line=0;r--)if(!lb(t[r]))return!0;return!1},"isPrependedWithRegularRules"),Dm=I(function(e){e.type="",e.value="",e.return="",e.children="",e.props=""},"nullifyElement"),qS=I(function(e,t,r){lb(e)&&(e.parent?(console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),Dm(e)):US(t,r)&&(console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),Dm(e)))},"incorrectImportAlarm");function Gp(e,t){switch(G3(e,t)){case 5103:return ne+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ne+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ne+e+Vl+e+Re+e+e;case 6828:case 4268:return ne+e+Re+e+e;case 6165:return ne+e+Re+"flex-"+e+e;case 5187:return ne+e+ee(e,/(\w+).+(:[^]+)/,ne+"box-$1$2"+Re+"flex-$1$2")+e;case 5443:return ne+e+Re+"flex-item-"+ee(e,/flex-|-self/,"")+e;case 4675:return ne+e+Re+"flex-line-pack"+ee(e,/align-content|flex-|-self/,"")+e;case 5548:return ne+e+Re+ee(e,"shrink","negative")+e;case 5292:return ne+e+Re+ee(e,"basis","preferred-size")+e;case 6060:return ne+"box-"+ee(e,"-grow","")+ne+e+Re+ee(e,"grow","positive")+e;case 4554:return ne+ee(e,/([^-])(transform)/g,"$1"+ne+"$2")+e;case 6187:return ee(ee(ee(e,/(zoom-|grab)/,ne+"$1"),/(image-set)/,ne+"$1"),e,"")+e;case 5495:case 3959:return ee(e,/(image-set\([^]*)/,ne+"$1$`$1");case 4968:return ee(ee(e,/(.+:)(flex-)?(.*)/,ne+"box-pack:$3"+Re+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ne+e+e;case 4095:case 3583:case 4068:case 2532:return ee(e,/(.+)-inline(.+)/,ne+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(dt(e)-1-t>6)switch(Ce(e,t+1)){case 109:if(Ce(e,t+4)!==45)break;case 102:return ee(e,/(.+:)(.+)-([^]+)/,"$1"+ne+"$2-$3$1"+Vl+(Ce(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Ul(e,"stretch")?Gp(ee(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Ce(e,t+1)!==115)break;case 6444:switch(Ce(e,dt(e)-3-(~Ul(e,"!important")&&10))){case 107:return ee(e,":",":"+ne)+e;case 101:return ee(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ne+(Ce(e,14)===45?"inline-":"")+"box$3$1"+ne+"$2$3$1"+Re+"$2box$3")+e}break;case 5936:switch(Ce(e,t+11)){case 114:return ne+e+Re+ee(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ne+e+Re+ee(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ne+e+Re+ee(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ne+e+Re+e+e}return e}I(Gp,"prefix");var WS=I(function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Vp:e.return=Gp(e.value,e.length);break;case W3:return dn([Wn(e,{value:ee(e.value,"@","@"+ne)})],n);case Hp:if(e.length)return Y3(e.props,function(a){switch(K3(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return dn([Wn(e,{props:[ee(a,/:(read-\w+)/,":"+Vl+"$1")]})],n);case"::placeholder":return dn([Wn(e,{props:[ee(a,/:(plac\w+)/,":"+ne+"input-$1")]}),Wn(e,{props:[ee(a,/:(plac\w+)/,":"+Vl+"$1")]}),Wn(e,{props:[ee(a,/:(plac\w+)/,Re+"input-$1")]})],n)}return""})}},"prefixer"),GS=[WS],KS=I(function(e){var t=e.key;if(!t)throw new Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache. If multiple caches share the same key they might "fight" for each other's style elements.`);if(t==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var v=g.getAttribute("data-emotion");v.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var n=e.stylisPlugins||GS;if(/[^a-z-]/.test(t))throw new Error('Emotion key must only contain lower case alphabetical characters and - but "'+t+'" was passed');var a={},o,i=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(g){for(var v=g.getAttribute("data-emotion").split(" "),b=1;b=4;++n,a-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(a){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}I(sb,"murmur2");var XS={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Sm=`You have illegal escape sequence in your template literal, most likely inside content's property value. Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';". @@ -558,7 +558,7 @@ ${t}`);let r=t.match(YO);if(!r)return y.createElement(l.Fragment,null,t);let[,n, * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */const{global:et}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:tee,once:ree,logger:dm}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:x3,composeConfigs:lae,Preview:sae,DocsContext:uae}=__STORYBOOK_MODULE_PREVIEW_API__,{STORY_ARGS_UPDATED:C3,UPDATE_STORY_ARGS:nee,RESET_STORY_ARGS:aee,GLOBALS_UPDATED:D3,NAVIGATE_URL:oee}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var iee=Ra({"../../node_modules/tocbot/src/js/default-options.js"(e,t){t.exports={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(r){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(r){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollOffset:0}}}),lee=Ra({"../../node_modules/tocbot/src/js/build-html.js"(e,t){t.exports=function(r){var n=[].forEach,a=[].some,o=document.body,i,s=!0,u=" ";function d(w,D){var S=D.appendChild(h(w));if(w.children.length){var A=p(w.isCollapsed);w.children.forEach(function(k){d(k,A)}),S.appendChild(A)}}function f(w,D){var S=!1,A=p(S);if(D.forEach(function(k){d(k,A)}),i=w||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),D.length===0?i:i.appendChild(A)}function h(w){var D=document.createElement("li"),S=document.createElement("a");return r.listItemClass&&D.setAttribute("class",r.listItemClass),r.onClick&&(S.onclick=r.onClick),r.includeTitleTags&&S.setAttribute("title",w.textContent),r.includeHtml&&w.childNodes.length?n.call(w.childNodes,function(A){S.appendChild(A.cloneNode(!0))}):S.textContent=w.textContent,S.setAttribute("href",r.basePath+"#"+w.id),S.setAttribute("class",r.linkClass+u+"node-name--"+w.nodeName+u+r.extraLinkClasses),D.appendChild(S),D}function p(w){var D=r.orderedList?"ol":"ul",S=document.createElement(D),A=r.listClass+u+r.extraListClasses;return w&&(A=A+u+r.collapsibleClass,A=A+u+r.isCollapsedClass),S.setAttribute("class",A),S}function m(){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var w;w=document.querySelector(r.scrollContainer).scrollTop}else w=document.documentElement.scrollTop||o.scrollTop;var D=document.querySelector(r.positionFixedSelector);r.fixedSidebarOffset==="auto"&&(r.fixedSidebarOffset=i.offsetTop),w>r.fixedSidebarOffset?D.className.indexOf(r.positionFixedClass)===-1&&(D.className+=u+r.positionFixedClass):D.className=D.className.replace(u+r.positionFixedClass,"")}function g(w){var D=0;return w!==null&&(D=w.offsetTop,r.hasInnerContainers&&(D+=g(w.offsetParent))),D}function v(w,D){return w&&w.className!==D&&(w.className=D),w}function b(w){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var D;D=document.querySelector(r.scrollContainer).scrollTop}else D=document.documentElement.scrollTop||o.scrollTop;r.positionFixedSelector&&m();var S=w,A;if(s&&i!==null&&S.length>0){a.call(S,function(M,O){if(g(M)>D+r.headingsOffset+10){var $=O===0?O:O-1;return A=S[$],!0}else if(O===S.length-1)return A=S[S.length-1],!0});var k=i.querySelector("."+r.activeLinkClass),F=i.querySelector("."+r.linkClass+".node-name--"+A.nodeName+'[href="'+r.basePath+"#"+A.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(k===F)return;var T=i.querySelectorAll("."+r.linkClass);n.call(T,function(M){v(M,M.className.replace(u+r.activeLinkClass,""))});var R=i.querySelectorAll("."+r.listItemClass);n.call(R,function(M){v(M,M.className.replace(u+r.activeListItemClass,""))}),F&&F.className.indexOf(r.activeLinkClass)===-1&&(F.className+=u+r.activeLinkClass);var L=F&&F.parentNode;L&&L.className.indexOf(r.activeListItemClass)===-1&&(L.className+=u+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(M){M.className.indexOf(r.isCollapsedClass)===-1&&(M.className+=u+r.isCollapsedClass)}),F&&F.nextSibling&&F.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&v(F.nextSibling,F.nextSibling.className.replace(u+r.isCollapsedClass,"")),x(F&&F.parentNode.parentNode)}}function x(w){return w&&w.className.indexOf(r.collapsibleClass)!==-1&&w.className.indexOf(r.isCollapsedClass)!==-1?(v(w,w.className.replace(u+r.isCollapsedClass,"")),x(w.parentNode.parentNode)):w}function E(w){var D=w.target||w.srcElement;typeof D.className!="string"||D.className.indexOf(r.linkClass)===-1||(s=!1)}function C(){s=!0}return{enableTocAnimation:C,disableTocAnimation:E,render:f,updateToc:b}}}}),see=Ra({"../../node_modules/tocbot/src/js/parse-content.js"(e,t){t.exports=function(r){var n=[].reduce;function a(h){return h[h.length-1]}function o(h){return+h.nodeName.toUpperCase().replace("H","")}function i(h){try{return h instanceof window.HTMLElement||h instanceof window.parent.HTMLElement}catch{return h instanceof window.HTMLElement}}function s(h){if(!i(h))return h;if(r.ignoreHiddenElements&&(!h.offsetHeight||!h.offsetParent))return null;let p=h.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(h.innerText)):(h.innerText||h.textContent).trim());var m={id:h.id,children:[],nodeName:h.nodeName,headingLevel:o(h),textContent:p};return r.includeHtml&&(m.childNodes=h.childNodes),r.headingObjectCallback?r.headingObjectCallback(m,h):m}function u(h,p){for(var m=s(h),g=m.headingLevel,v=p,b=a(v),x=b?b.headingLevel:0,E=g-x;E>0&&(b=a(v),!(b&&g===b.headingLevel));)b&&b.children!==void 0&&(v=b.children),E--;return g>=r.collapseDepth&&(m.isCollapsed=!0),v.push(m),v}function d(h,p){var m=p;r.ignoreSelector&&(m=p.split(",").map(function(g){return g.trim()+":not("+r.ignoreSelector+")"}));try{return h.querySelectorAll(m)}catch{return console.warn("Headers not found with selector: "+m),null}}function f(h){return n.call(h,function(p,m){var g=s(m);return g&&u(g,p.nest),p},{nest:[]})}return{nestHeadingsArray:f,selectHeadings:d}}}}),uee=Ra({"../../node_modules/tocbot/src/js/update-toc-scroll.js"(e,t){t.exports=function(r){var n=r.tocElement||document.querySelector(r.tocSelector);if(n&&n.scrollHeight>n.clientHeight){var a=n.querySelector("."+r.activeListItemClass);a&&(n.scrollTop=a.offsetTop-r.tocScrollOffset)}}}}),cee=Ra({"../../node_modules/tocbot/src/js/scroll-smooth/index.js"(e){e.initSmoothScrolling=t;function t(n){var a=n.duration,o=n.offset,i=location.hash?d(location.href):location.href;s();function s(){document.body.addEventListener("click",h,!1);function h(p){!u(p.target)||p.target.className.indexOf("no-smooth-scroll")>-1||p.target.href.charAt(p.target.href.length-2)==="#"&&p.target.href.charAt(p.target.href.length-1)==="!"||p.target.className.indexOf(n.linkClass)===-1||r(p.target.hash,{duration:a,offset:o,callback:function(){f(p.target.hash)}})}}function u(h){return h.tagName.toLowerCase()==="a"&&(h.hash.length>0||h.href.charAt(h.href.length-1)==="#")&&(d(h.href)===i||d(h.href)+"#"===i)}function d(h){return h.slice(0,h.lastIndexOf("#"))}function f(h){var p=document.getElementById(h.substring(1));p&&(/^(?:a|select|input|button|textarea)$/i.test(p.tagName)||(p.tabIndex=-1),p.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||g},s=document.querySelector('[id="'+decodeURI(n).split("#").join("")+'"]')||document.querySelector('[id="'+n.split("#").join("")+'"]'),u=typeof n=="string"?i.offset+(n?s&&s.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):n,d=typeof i.duration=="function"?i.duration(u):i.duration,f,h;requestAnimationFrame(function(v){f=v,p(v)});function p(v){h=v-f,window.scrollTo(0,i.easing(h,o,u,d)),h"u"&&!h)return;var p,m=Object.prototype.hasOwnProperty;function g(){for(var E={},C=0;C({backgroundColor:e.base==="light"?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:e.appBorderRadius,border:`1px dashed ${e.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:se(.3,e.color.defaultText),fontSize:e.typography.size.s2})),PD=e=>y.createElement(pee,{...e,className:"docblock-emptyblock sb-unstyled"}),fee=_(Ih)(({theme:e})=>({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"}})),hee=_.div(({theme:e})=>({background:e.background.content,borderRadius:e.appBorderRadius,border:`1px solid ${e.appBorderColor}`,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",margin:"25px 0 40px",padding:"20px 20px 20px 22px"})),gl=_.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${jd}`]:{margin:0}})),mee=()=>y.createElement(hee,null,y.createElement(gl,null),y.createElement(gl,{style:{width:"80%"}}),y.createElement(gl,{style:{width:"30%"}}),y.createElement(gl,{style:{width:"80%"}})),ND=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=hb();if(e)return y.createElement(mee,null);if(t)return y.createElement(PD,null,t);let u=y.createElement(fee,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return u;let d=a?Pd.dark:Pd.light;return y.createElement(mb,{theme:Nd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},u)},ve=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,pm=600,gee=_.h1(de,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${pm}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),vee=_.h2(de,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${pm}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:se(.25,e.color.defaultText)})),yee=_.div(({theme:e})=>{let t={fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},r={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"},"& code":{fontSize:"inherit"}},n={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?se(.1,e.color.defaultText):se(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[ve("a")]:{...t,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}},[ve("blockquote")]:{...t,margin:"16px 0",borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[ve("div")]:t,[ve("dl")]:{...t,margin:"16px 0",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}},[ve("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[ve("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[ve("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[ve("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[ve("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[ve("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[ve("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[ve("img")]:{maxWidth:"100%"},[ve("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[ve("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[ve("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[ve("pre")]:{...t,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"}},[ve("span")]:{...t,"&.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"}}},[ve("table")]:{...t,margin:"16px 0",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}},[ve("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),bee=_.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${pm}px)`]:{}})),wee=({children:e,toc:t})=>y.createElement(bee,{className:"sbdocs sbdocs-wrapper"},y.createElement(yee,{className:"sbdocs sbdocs-content"},e),t),Ju=e=>({borderRadius:e.appBorderRadius,background:e.background.content,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${e.appBorderColor}`}),{window:Eee}=et,xee=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=Eee.document.getElementById(e)}shouldComponentUpdate(e){let{scale:t}=e;return t!==this.props.scale&&this.setIframeBodyStyle({width:`${t*100}%`,height:`${t*100}%`,transform:`scale(${1/t})`,transformOrigin:"top left"}),!1}setIframeBodyStyle(e){return Object.assign(this.iframe.contentDocument.body.style,e)}render(){let{id:e,title:t,src:r,allowFullScreen:n,scale:a,...o}=this.props;return y.createElement("iframe",{id:e,title:t,src:r,...n?{allow:"fullscreen"}:{},loading:"lazy",...o})}},jD=l.createContext({scale:1}),{PREVIEW_URL:Cee}=et,Dee=Cee||"iframe.html",Ip=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,See=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:u,forceInitialArgs:d,renderStoryToElement:f}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let h=t.current,p=f(i,h,{showMain:()=>{},showError:({title:m,description:g})=>o(new Error(`${m} - ${g}`)),showException:m=>o(m)},{autoplay:u,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>p())}},[u,f,i]),a?y.createElement("pre",null,y.createElement(QO,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${Ip(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(HD,null),y.createElement("div",{ref:t,id:`${Ip(e)}-inner`,"data-name":i.name}))},Aee=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement(jD.Consumer,null,({scale:r})=>y.createElement(xee,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:xM(Dee,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),kee=_.strong(({theme:e})=>({color:e.color.orange})),_ee=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement(kee,null,"This story mounts inside of play. Set"," ",y.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay"},"autoplay")," ","to true to view this story."):y.createElement("div",{id:Ip(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(See,{...e}):y.createElement(Aee,{...e}))},HD=()=>y.createElement(EM,null),Fee=_(Ph)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),Iee=_.div({display:"flex",alignItems:"center",gap:4}),Tee=_.div(({theme:e})=>({width:14,height:14,borderRadius:2,margin:"0 7px",backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),Ree=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(Fee,{...o},y.createElement(Iee,{key:"left"},e?[1,2,3].map(i=>y.createElement(Tee,{key:i})):y.createElement(y.Fragment,null,y.createElement(hn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(r$,null)),y.createElement(hn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(n$,null)),y.createElement(hn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(a$,null))))),Bee=_.div(({isColumn:e,columns:t,layout:r})=>({display:e||!t?"block":"flex",position:"relative",flexWrap:"wrap",overflow:"auto",flexDirection:e?"column":"row","& .innerZoomElementWrapper > *":e?{width:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"block"}:{maxWidth:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"inline-block"}}),({layout:e="padded"})=>e==="centered"||e==="padded"?{padding:"30px 20px","& .innerZoomElementWrapper > *":{width:"auto",border:"10px solid transparent!important"}}:{},({layout:e="padded"})=>e==="centered"?{display:"flex",justifyContent:"center",justifyItems:"center",alignContent:"center",alignItems:"center"}:{},({columns:e})=>e&&e>1?{".innerZoomElementWrapper > *":{minWidth:`calc(100% / ${e} - 20px)`}}:{}),S3=_(ND)(({theme:e})=>({margin:0,borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:e.appBorderRadius,borderBottomRightRadius:e.appBorderRadius,border:"none",background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Ot(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Ot(.05,e.background.content)}})),zee=_.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Ju(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),Oee=(e,t,r)=>{switch(!0){case!!(e&&e.error):return{source:null,actionItem:{title:"No code available",className:"docblock-code-toggle docblock-code-toggle--disabled",disabled:!0,onClick:()=>r(!1)}};case t:return{source:y.createElement(S3,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(S3,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function Lee(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var Mee=_(Ree)({position:"absolute",top:0,left:0,right:0,height:40}),$ee=_.div({overflow:"hidden",position:"relative"}),VD=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:u,layout:d="padded",...f})=>{let[h,p]=l.useState(i),{source:m,actionItem:g}=Oee(a,h,p),[v,b]=l.useState(1),x=[u].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),E=a?[g]:[],[C,w]=l.useState(s?[...s]:[]),D=[...E,...C],{window:S}=et,A=l.useCallback(async F=>{let{createCopyToClipboardFunction:T}=await $3(()=>import("./index-BwmOyQc7.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);T()},[]),k=F=>{let T=S.getSelection();T&&T.type==="Range"||(F.preventDefault(),C.filter(R=>R.title==="Copied").length===0&&A(m.props.code).then(()=>{w([...C,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>w(C.filter(R=>R.title!=="Copied")),1500)}))};return y.createElement(zee,{withSource:a,withToolbar:o,...f,className:x.join(" ")},o&&y.createElement(Mee,{isLoading:e,border:!0,zoom:F=>b(v*F),resetZoom:()=>b(1),storyId:Lee(n),baseUrl:"./iframe.html"}),y.createElement(jD.Provider,{value:{scale:v}},y.createElement($ee,{className:"docs-story",onCopyCapture:a&&k},y.createElement(Bee,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(qO.Element,{scale:v},Array.isArray(n)?n.map((F,T)=>y.createElement("div",{key:T},F)):y.createElement("div",null,n))),y.createElement(pf,{actionItems:D}))),a&&h&&m)};_(VD)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var Pee=_.label(({theme:e})=>({lineHeight:"18px",alignItems:"center",marginBottom:8,display:"inline-block",position:"relative",whiteSpace:"nowrap",background:e.boolean.background,borderRadius:"3em",padding:1,'&[aria-disabled="true"]':{opacity:.5,input:{cursor:"not-allowed"}},input:{appearance:"none",width:"100%",height:"100%",position:"absolute",left:0,top:0,margin:0,padding:0,border:"none",background:"transparent",cursor:"pointer",borderRadius:"3em","&:focus":{outline:"none",boxShadow:`${e.color.secondary} 0 0 0 1px inset !important`}},span:{textAlign:"center",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:"1",cursor:"pointer",display:"inline-block",padding:"7px 15px",transition:"all 100ms ease-out",userSelect:"none",borderRadius:"3em",color:se(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${pl(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${pl(.05,e.appBorderColor)} 0 0 0 2px inset`,color:pl(1,e.appBorderColor)},"&:first-of-type":{paddingRight:8},"&:last-of-type":{paddingLeft:8}},"input:checked ~ span:last-of-type, input:not(:checked) ~ span:first-of-type":{background:e.boolean.selectedBackground,boxShadow:e.base==="light"?`${pl(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),Nee=e=>e==="true",jee=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{var f;let i=l.useCallback(()=>r(!1),[r]),s=!!((f=o==null?void 0:o.table)!=null&&f.readonly);if(t===void 0)return y.createElement(In,{variant:"outline",size:"medium",id:Ns(e),onClick:i,disabled:s},"Set boolean");let u=Et(e),d=typeof t=="string"?Nee(t):t;return y.createElement(Pee,{"aria-disabled":s,htmlFor:u,"aria-label":e},y.createElement("input",{id:u,type:"checkbox",onChange:h=>r(h.target.checked),checked:d,role:"switch",disabled:s,name:e,onBlur:n,onFocus:a}),y.createElement("span",{"aria-hidden":"true"},"False"),y.createElement("span",{"aria-hidden":"true"},"True"))},Hee=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},Vee=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},Uee=e=>{let t=new Date(e),r=`000${t.getFullYear()}`.slice(-4),n=`0${t.getMonth()+1}`.slice(-2),a=`0${t.getDate()}`.slice(-2);return`${r}-${n}-${a}`},qee=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},A3=_(Ti.Input)(({readOnly:e})=>({opacity:e?.5:1})),Wee=_.div(({theme:e})=>({flex:1,display:"flex",input:{marginLeft:10,flex:1,height:32,"&::-webkit-calendar-picker-indicator":{opacity:.5,height:12,filter:e.base==="light"?void 0:"invert(1)"}},"input:first-of-type":{marginLeft:0,flexGrow:4},"input:last-of-type":{flexGrow:3}})),Gee=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{var g;let[i,s]=l.useState(!0),u=l.useRef(),d=l.useRef(),f=!!((g=o==null?void 0:o.table)!=null&&g.readonly);l.useEffect(()=>{i!==!1&&(u&&u.current&&(u.current.value=t?Uee(t):""),d&&d.current&&(d.current.value=t?qee(t):""))},[t]);let h=v=>{if(!v.target.value)return r();let b=Hee(v.target.value),x=new Date(t);x.setFullYear(b.getFullYear(),b.getMonth(),b.getDate());let E=x.getTime();E&&r(E),s(!!E)},p=v=>{if(!v.target.value)return r();let b=Vee(v.target.value),x=new Date(t);x.setHours(b.getHours()),x.setMinutes(b.getMinutes());let E=x.getTime();E&&r(E),s(!!E)},m=Et(e);return y.createElement(Wee,null,y.createElement(A3,{type:"date",max:"9999-12-31",ref:u,id:`${m}-date`,name:`${m}-date`,readOnly:f,onChange:h,onFocus:n,onBlur:a}),y.createElement(A3,{type:"time",id:`${m}-time`,name:`${m}-time`,ref:d,onChange:p,readOnly:f,onFocus:n,onBlur:a}),i?null:y.createElement("div",null,"invalid"))},Kee=_.label({display:"flex"}),Yee=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},Zee=_(Ti.Input)(({readOnly:e})=>({opacity:e?.5:1})),Jee=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:s,argType:u})=>{var C;let[d,f]=l.useState(typeof t=="number"?t:""),[h,p]=l.useState(!1),[m,g]=l.useState(null),v=!!((C=u==null?void 0:u.table)!=null&&C.readonly),b=l.useCallback(w=>{f(w.target.value);let D=parseFloat(w.target.value);Number.isNaN(D)?g(new Error(`'${w.target.value}' is not a number`)):(r(D),g(null))},[r,g]),x=l.useCallback(()=>{f("0"),r(0),p(!0)},[p]),E=l.useRef(null);return l.useEffect(()=>{h&&E.current&&E.current.select()},[h]),l.useEffect(()=>{d!==(typeof t=="number"?t:"")&&f(t)},[t]),t===void 0?y.createElement(In,{variant:"outline",size:"medium",id:Ns(e),onClick:x,disabled:v},"Set number"):y.createElement(Kee,null,y.createElement(Zee,{ref:E,id:Et(e),type:"number",onChange:b,size:"flex",placeholder:"Edit number...",value:d,valid:m?"error":null,autoFocus:h,readOnly:v,name:e,min:n,max:a,step:o,onFocus:s,onBlur:i}))},UD=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},Tp=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],qD=(e,t)=>e&&t&&e.map(r=>t[r]),Xee=_.div(({isInline:e})=>e?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},e=>{if(e["aria-readonly"]==="true")return{input:{cursor:"not-allowed"}}}),Qee=_.span({"[aria-readonly=true] &":{opacity:.5}}),ete=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),k3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var p;if(!t)return dm.warn(`Checkbox with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=Tp(r,t),[s,u]=l.useState(i),d=!!((p=o==null?void 0:o.table)!=null&&p.readonly),f=m=>{let g=m.target.value,v=[...s];v.includes(g)?v.splice(v.indexOf(g),1):v.push(g),n(qD(v,t)),u(v)};l.useEffect(()=>{u(Tp(r,t))},[r]);let h=Et(e);return y.createElement(Xee,{"aria-readonly":d,isInline:a},Object.keys(t).map((m,g)=>{let v=`${h}-${g}`;return y.createElement(ete,{key:v,htmlFor:v},y.createElement("input",{type:"checkbox",disabled:d,id:v,name:v,value:m,onChange:f,checked:s==null?void 0:s.includes(m)}),y.createElement(Qee,null,m))}))},tte=_.div(({isInline:e})=>e?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},e=>{if(e["aria-readonly"]==="true")return{input:{cursor:"not-allowed"}}}),rte=_.span({"[aria-readonly=true] &":{opacity:.5}}),nte=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),_3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var d;if(!t)return dm.warn(`Radio with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=UD(r,t),s=Et(e),u=!!((d=o==null?void 0:o.table)!=null&&d.readonly);return y.createElement(tte,{"aria-readonly":u,isInline:a},Object.keys(t).map((f,h)=>{let p=`${s}-${h}`;return y.createElement(nte,{key:p,htmlFor:p},y.createElement("input",{type:"radio",id:p,name:s,disabled:u,value:f,onChange:m=>n(t[m.currentTarget.value]),checked:f===i}),y.createElement(rte,null,f))}))},ate={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},WD=_.select(ate,({theme:e})=>({boxSizing:"border-box",position:"relative",padding:"6px 10px",width:"100%",color:e.input.color||"inherit",background:e.input.background,borderRadius:e.input.borderRadius,boxShadow:`${e.input.border} 0 0 0 1px inset`,fontSize:e.typography.size.s2-1,lineHeight:"20px","&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"::placeholder":{color:e.textMutedColor},"&[multiple]":{overflow:"auto",padding:0,option:{display:"block",padding:"6px 10px",marginLeft:1,marginRight:1}}})),GD=_.span(({theme:e})=>({display:"inline-block",lineHeight:"normal",overflow:"hidden",position:"relative",verticalAlign:"top",width:"100%",svg:{position:"absolute",zIndex:1,pointerEvents:"none",height:"12px",marginTop:"-6px",right:"12px",top:"50%",fill:e.textMutedColor,path:{fill:e.textMutedColor}}})),F3="Choose option...",ote=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{n(r[f.currentTarget.value])},i=UD(t,r)||F3,s=Et(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(GD,null,y.createElement(AC,null),y.createElement(WD,{disabled:u,id:s,value:i,onChange:o},y.createElement("option",{key:"no-selection",disabled:!0},F3),Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},ite=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{let h=Array.from(f.currentTarget.options).filter(p=>p.selected).map(p=>p.value);n(qD(h,r))},i=Tp(t,r),s=Et(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(GD,null,y.createElement(WD,{disabled:u,id:s,multiple:!0,value:i,onChange:o},Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},I3=e=>{let{name:t,options:r}=e;return r?e.isMulti?y.createElement(ite,{...e}):y.createElement(ote,{...e}):(dm.warn(`Select with no options: ${t}`),y.createElement(y.Fragment,null,"-"))},lte=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[(t==null?void 0:t[n])||String(n)]=n,r),{}):e,ste={check:k3,"inline-check":k3,radio:_3,"inline-radio":_3,select:I3,"multi-select":I3},qn=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?lte(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=ste[t];if(o)return y.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},ute="Error",cte="Object",dte="Array",pte="String",fte="Number",hte="Boolean",mte="Date",gte="Null",vte="Undefined",yte="Function",bte="Symbol",KD="ADD_DELTA_TYPE",YD="REMOVE_DELTA_TYPE",ZD="UPDATE_DELTA_TYPE",fm="value",wte="key";function cn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&typeof e[Symbol.iterator]=="function"?"Iterable":Object.prototype.toString.call(e).slice(8,-1)}function JD(e,t){let r=cn(e),n=cn(t);return(r==="Function"||n==="Function")&&n!==r}var hm=class extends l.Component{constructor(e){super(e),this.state={inputRefKey:null,inputRefValue:null},this.refInputValue=this.refInputValue.bind(this),this.refInputKey=this.refInputKey.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onSubmit=this.onSubmit.bind(this)}componentDidMount(){let{inputRefKey:e,inputRefValue:t}=this.state,{onlyValue:r}=this.props;e&&typeof e.focus=="function"&&e.focus(),r&&t&&typeof t.focus=="function"&&t.focus(),document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.onSubmit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.props.handleCancel()))}onSubmit(){let{handleAdd:e,onlyValue:t,onSubmitValueParser:r,keyPath:n,deep:a}=this.props,{inputRefKey:o,inputRefValue:i}=this.state,s={};if(!t){if(!o.value)return;s.key=o.value}s.newValue=r(!1,n,a,s.key,i.value),e(s)}refInputKey(e){this.state.inputRefKey=e}refInputValue(e){this.state.inputRefValue=e}render(){let{handleCancel:e,onlyValue:t,addButtonElement:r,cancelButtonElement:n,inputElementGenerator:a,keyPath:o,deep:i}=this.props,s=l.cloneElement(r,{onClick:this.onSubmit}),u=l.cloneElement(n,{onClick:e}),d=a(fm,o,i),f=l.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),h=null;if(!t){let p=a(wte,o,i);h=l.cloneElement(p,{placeholder:"Key",ref:this.refInputKey})}return y.createElement("span",{className:"rejt-add-value-node"},h,f,u,s)}};hm.defaultProps={onlyValue:!1,addButtonElement:y.createElement("button",null,"+"),cancelButtonElement:y.createElement("button",null,"c")};var XD=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={data:e.data,name:e.name,keyPath:t,deep:e.deep,nextDeep:e.deep+1,collapsed:e.isCollapsed(t,e.deep,e.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveItem=this.handleRemoveItem.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}onChildUpdate(e,t){let{data:r,keyPath:n}=this.state;r[e]=t,this.setState({data:r});let{onUpdate:a}=this.props,o=n.length;a(n[o-1],r)}handleAddMode(){this.setState({addFormVisible:!0})}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleRemoveItem(e){return()=>{let{beforeRemoveAction:t,logger:r}=this.props,{data:n,keyPath:a,nextDeep:o}=this.state,i=n[e];t(e,a,o,i).then(()=>{let s={keyPath:a,deep:o,key:e,oldValue:i,type:YD};n.splice(e,1),this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleAddValueAdd({newValue:e}){let{data:t,keyPath:r,nextDeep:n}=this.state,{beforeAddAction:a,logger:o}=this.props;a(t.length,r,n,e).then(()=>{let i=[...t,e];this.setState({data:i}),this.handleAddValueCancel();let{onUpdate:s,onDeltaUpdate:u}=this.props;s(r[r.length-1],i),u({type:KD,keyPath:r,deep:n,key:i.length-1,newValue:e})}).catch(o.error)}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:ZD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r(void 0)}).catch(n)})}renderCollapsed(){let{name:e,data:t,keyPath:r,deep:n}=this.state,{handleRemove:a,readOnly:o,getStyle:i,dataType:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=i(e,t,r,n,s),h=o(e,t,r,n,s),p=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!h&&p)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,addFormVisible:a,nextDeep:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,delimiter:T,ul:R,addForm:L}=f(e,t,r,n,h),z=d(e,t,r,n,h),M=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),O=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k});return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"["),!a&&M,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},t.map(($,H)=>y.createElement(Xu,{key:H,name:H.toString(),data:$,keyPath:r,deep:o,isCollapsed:i,handleRemove:this.handleRemoveItem(H),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}))),!z&&a&&y.createElement("div",{className:"rejt-add-form",style:L},y.createElement(hm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"]"),!z&&O)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{dataType:o,getStyle:i}=this.props,s=t?this.renderCollapsed():this.renderNotCollapsed(),u=i(e,r,n,a,o);return y.createElement("div",{className:"rejt-array-node"},y.createElement("span",{onClick:this.handleCollapseMode},y.createElement("span",{className:"rejt-name",style:u.name},e," :"," ")),s)}};XD.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var QD=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={value:e.value,name:e.name,keyPath:t,deep:e.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(e,t){return e.value!==t.value?{value:e.value}:null}componentDidUpdate(){let{editEnabled:e,inputRef:t,name:r,value:n,keyPath:a,deep:o}=this.state,{readOnly:i,dataType:s}=this.props,u=i(r,n,a,o,s);e&&!u&&typeof t.focus=="function"&&t.focus()}componentDidMount(){document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.handleEdit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue:e,originalValue:t,logger:r,onSubmitValueParser:n,keyPath:a}=this.props,{inputRef:o,name:i,deep:s}=this.state;if(!o)return;let u=n(!0,a,s,i,o.value);e({value:u,key:i}).then(()=>{JD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,textareaElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=null,x=null,E=s(e,i,n,a,u);if(r&&!E){let C=p(fm,g,a,e,i,u),w=l.cloneElement(f,{onClick:this.handleEdit}),D=l.cloneElement(h,{onClick:this.handleCancelEdit}),S=l.cloneElement(C,{ref:this.refInput,defaultValue:i});b=y.createElement("span",{className:"rejt-edit-form",style:v.editForm},S," ",D,w),x=null}else{b=y.createElement("span",{className:"rejt-value",style:v.value,onClick:E?null:this.handleEditMode},t);let C=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});x=E?null:C}return y.createElement("li",{className:"rejt-function-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," :"," "),b,x)}};QD.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var Xu=class extends l.Component{constructor(e){super(e),this.state={data:e.data,name:e.name,keyPath:e.keyPath,deep:e.deep}}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}render(){let{data:e,name:t,keyPath:r,deep:n}=this.state,{isCollapsed:a,handleRemove:o,handleUpdateValue:i,onUpdate:s,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S}=this.props,A=()=>!0,k=cn(e);switch(k){case ute:return y.createElement(Rp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:A,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case cte:return y.createElement(Rp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case dte:return y.createElement(XD,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case pte:return y.createElement(Er,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case fte:return y.createElement(Er,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case hte:return y.createElement(Er,{name:t,value:e?"true":"false",originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case mte:return y.createElement(Er,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case gte:return y.createElement(Er,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case vte:return y.createElement(Er,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case yte:return y.createElement(QD,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,textareaElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case bte:return y.createElement(Er,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});default:return null}}};Xu.defaultProps={keyPath:[],deep:0};var Rp=class extends l.Component{constructor(e){super(e);let t=e.deep===-1?[]:[...e.keyPath,e.name];this.state={name:e.name,data:e.data,keyPath:t,deep:e.deep,nextDeep:e.deep+1,collapsed:e.isCollapsed(t,e.deep,e.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveValue=this.handleRemoveValue.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}onChildUpdate(e,t){let{data:r,keyPath:n}=this.state;r[e]=t,this.setState({data:r});let{onUpdate:a}=this.props,o=n.length;a(n[o-1],r)}handleAddMode(){this.setState({addFormVisible:!0})}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleAddValueAdd({key:e,newValue:t}){let{data:r,keyPath:n,nextDeep:a}=this.state,{beforeAddAction:o,logger:i}=this.props;o(e,n,a,t).then(()=>{r[e]=t,this.setState({data:r}),this.handleAddValueCancel();let{onUpdate:s,onDeltaUpdate:u}=this.props;s(n[n.length-1],r),u({type:KD,keyPath:n,deep:a,key:e,newValue:t})}).catch(i.error)}handleRemoveValue(e){return()=>{let{beforeRemoveAction:t,logger:r}=this.props,{data:n,keyPath:a,nextDeep:o}=this.state,i=n[e];t(e,a,o,i).then(()=>{let s={keyPath:a,deep:o,key:e,oldValue:i,type:YD};delete n[e],this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:ZD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r()}).catch(n)})}renderCollapsed(){let{name:e,keyPath:t,deep:r,data:n}=this.state,{handleRemove:a,readOnly:o,dataType:i,getStyle:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=s(e,n,t,r,i),h=Object.getOwnPropertyNames(n),p=o(e,n,t,r,i),m=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"{...}"," ",h.length," ",h.length===1?"key":"keys"),!p&&m)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,nextDeep:a,addFormVisible:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,addForm:T,ul:R,delimiter:L}=f(e,t,r,n,h),z=Object.getOwnPropertyNames(t),M=d(e,t,r,n,h),O=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),$=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k}),H=z.map(K=>y.createElement(Xu,{key:K,name:K,data:t[K],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(K),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}));return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"{"),!M&&O,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},H),!M&&o&&y.createElement("div",{className:"rejt-add-form",style:T},y.createElement(hm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"}"),!M&&$)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{getStyle:o,dataType:i}=this.props,s=t?this.renderCollapsed():this.renderNotCollapsed(),u=o(e,r,n,a,i);return y.createElement("div",{className:"rejt-object-node"},y.createElement("span",{onClick:this.handleCollapseMode},y.createElement("span",{className:"rejt-name",style:u.name},e," :"," ")),s)}};Rp.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var Er=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={value:e.value,name:e.name,keyPath:t,deep:e.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(e,t){return e.value!==t.value?{value:e.value}:null}componentDidUpdate(){let{editEnabled:e,inputRef:t,name:r,value:n,keyPath:a,deep:o}=this.state,{readOnly:i,dataType:s}=this.props,u=i(r,n,a,o,s);e&&!u&&typeof t.focus=="function"&&t.focus()}componentDidMount(){document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.handleEdit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue:e,originalValue:t,logger:r,onSubmitValueParser:n,keyPath:a}=this.props,{inputRef:o,name:i,deep:s}=this.state;if(!o)return;let u=n(!0,a,s,i,o.value);e({value:u,key:i}).then(()=>{JD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,inputElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=s(e,i,n,a,u),x=r&&!b,E=p(fm,g,a,e,i,u),C=l.cloneElement(f,{onClick:this.handleEdit}),w=l.cloneElement(h,{onClick:this.handleCancelEdit}),D=l.cloneElement(E,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});return y.createElement("li",{className:"rejt-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," : "),x?y.createElement("span",{className:"rejt-edit-form",style:v.editForm},D," ",w,C):y.createElement("span",{className:"rejt-value",style:v.value,onClick:b?null:this.handleEditMode},String(t)),!b&&!x&&S)}};Er.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};function Ete(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var xte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Cte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Dte={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}},eS=class extends l.Component{constructor(e){super(e),this.state={data:e.data,rootName:e.rootName},this.onUpdate=this.onUpdate.bind(this),this.removeRoot=this.removeRoot.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data||e.rootName!==t.rootName?{data:e.data,rootName:e.rootName}:null}onUpdate(e,t){this.setState({data:t}),this.props.onFullyUpdate(t)}removeRoot(){this.onUpdate(null,null)}render(){let{data:e,rootName:t}=this.state,{isCollapsed:r,onDeltaUpdate:n,readOnly:a,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElement:d,textareaElement:f,minusMenuElement:h,plusMenuElement:p,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x,fallback:E=null}=this.props,C=cn(e),w=a;cn(a)==="Boolean"&&(w=()=>a);let D=d;d&&cn(d)!=="Function"&&(D=()=>d);let S=f;return f&&cn(f)!=="Function"&&(S=()=>f),C==="Object"||C==="Array"?y.createElement("div",{className:"rejt-tree"},y.createElement(Xu,{data:e,name:t,deep:-1,isCollapsed:r,onUpdate:this.onUpdate,onDeltaUpdate:n,readOnly:w,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElementGenerator:D,textareaElementGenerator:S,minusMenuElement:h,plusMenuElement:p,handleRemove:this.removeRoot,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x})):E}};eS.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return xte;case"Array":return Cte;default:return Dte}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>Ete(a),inputElement:()=>y.createElement("input",null),textareaElement:()=>y.createElement("textarea",null),fallback:null};var{window:Ste}=et,Ate=_.div(({theme:e})=>({position:"relative",display:"flex",'&[aria-readonly="true"]':{opacity:.5},".rejt-tree":{marginLeft:"1rem",fontSize:"13px"},".rejt-value-node, .rejt-object-node > .rejt-collapsed, .rejt-array-node > .rejt-collapsed, .rejt-object-node > .rejt-not-collapsed, .rejt-array-node > .rejt-not-collapsed":{"& > svg":{opacity:0,transition:"opacity 0.2s"}},".rejt-value-node:hover, .rejt-object-node:hover > .rejt-collapsed, .rejt-array-node:hover > .rejt-collapsed, .rejt-object-node:hover > .rejt-not-collapsed, .rejt-array-node:hover > .rejt-not-collapsed":{"& > svg":{opacity:1}},".rejt-edit-form button":{display:"none"},".rejt-add-form":{marginLeft:10},".rejt-add-value-node":{display:"inline-flex",alignItems:"center"},".rejt-name":{lineHeight:"22px"},".rejt-not-collapsed-delimiter":{lineHeight:"22px"},".rejt-plus-menu":{marginLeft:5},".rejt-object-node > span > *, .rejt-array-node > span > *":{position:"relative",zIndex:2},".rejt-object-node, .rejt-array-node":{position:"relative"},".rejt-object-node > span:first-of-type::after, .rejt-array-node > span:first-of-type::after, .rejt-collapsed::before, .rejt-not-collapsed::before":{content:'""',position:"absolute",top:0,display:"block",width:"100%",marginLeft:"-1rem",padding:"0 4px 0 1rem",height:22},".rejt-collapsed::before, .rejt-not-collapsed::before":{zIndex:1,background:"transparent",borderRadius:4,transition:"background 0.2s",pointerEvents:"none",opacity:.1},".rejt-object-node:hover, .rejt-array-node:hover":{"& > .rejt-collapsed::before, & > .rejt-not-collapsed::before":{background:e.color.secondary}},".rejt-collapsed::after, .rejt-not-collapsed::after":{content:'""',position:"absolute",display:"inline-block",pointerEvents:"none",width:0,height:0},".rejt-collapsed::after":{left:-8,top:8,borderTop:"3px solid transparent",borderBottom:"3px solid transparent",borderLeft:"3px solid rgba(153,153,153,0.6)"},".rejt-not-collapsed::after":{left:-10,top:10,borderTop:"3px solid rgba(153,153,153,0.6)",borderLeft:"3px solid transparent",borderRight:"3px solid transparent"},".rejt-value":{display:"inline-block",border:"1px solid transparent",borderRadius:4,margin:"1px 0",padding:"0 4px",cursor:"text",color:e.color.defaultText},".rejt-value-node:hover > .rejt-value":{background:e.color.lighter,borderColor:e.appBorderColor}})),Bd=_.button(({theme:e,primary:t})=>({border:0,height:20,margin:1,borderRadius:4,background:t?e.color.secondary:"transparent",color:t?e.color.lightest:e.color.dark,fontWeight:t?"bold":"normal",cursor:"pointer",order:t?"initial":9})),kte=_(s$)(({theme:e,disabled:t})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:t?"not-allowed":"pointer",color:e.textMutedColor,"&:hover":t?{}:{color:e.color.ancillary},"svg + &":{marginLeft:0}})),_te=_(u$)(({theme:e,disabled:t})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:t?"not-allowed":"pointer",color:e.textMutedColor,"&:hover":t?{}:{color:e.color.negative},"svg + &":{marginLeft:0}})),T3=_.input(({theme:e,placeholder:t})=>({outline:0,margin:t?1:"1px 0",padding:"3px 4px",color:e.color.defaultText,background:e.background.app,border:`1px solid ${e.appBorderColor}`,borderRadius:4,lineHeight:"14px",width:t==="Key"?80:120,"&:focus":{border:`1px solid ${e.color.secondary}`}})),Fte=_(hn)(({theme:e})=>({position:"absolute",zIndex:2,top:2,right:2,height:21,padding:"0 3px",background:e.background.bar,border:`1px solid ${e.appBorderColor}`,borderRadius:3,color:e.textMutedColor,fontSize:"9px",fontWeight:"bold",textDecoration:"none",span:{marginLeft:3,marginTop:1}})),Ite=_(Ti.Textarea)(({theme:e})=>({flex:1,padding:"7px 6px",fontFamily:e.typography.fonts.mono,fontSize:"12px",lineHeight:"18px","&::placeholder":{fontFamily:e.typography.fonts.base,fontSize:"13px"},"&:placeholder-shown":{padding:"7px 10px"}})),Tte={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},Rte=e=>{e.currentTarget.dispatchEvent(new Ste.KeyboardEvent("keydown",Tte))},Bte=e=>{e.currentTarget.select()},zte=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),R3=({name:e,value:t,onChange:r,argType:n})=>{var C;let a=hb(),o=l.useMemo(()=>t&&QZ(t),[t]),i=o!=null,[s,u]=l.useState(!i),[d,f]=l.useState(null),h=!!((C=n==null?void 0:n.table)!=null&&C.readonly),p=l.useCallback(w=>{try{w&&r(JSON.parse(w)),f(void 0)}catch(D){f(D)}},[r]),[m,g]=l.useState(!1),v=l.useCallback(()=>{r({}),g(!0)},[g]),b=l.useRef(null);if(l.useEffect(()=>{m&&b.current&&b.current.select()},[m]),!i)return y.createElement(In,{disabled:h,id:Ns(e),onClick:v},"Set object");let x=y.createElement(Ite,{ref:b,id:Et(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:w=>p(w.target.value),placeholder:"Edit JSON string...",autoFocus:m,valid:d?"error":null,readOnly:h}),E=Array.isArray(t)||typeof t=="object"&&(t==null?void 0:t.constructor)===Object;return y.createElement(Ate,{"aria-readonly":h},E&&y.createElement(Fte,{onClick:w=>{w.preventDefault(),u(D=>!D)}},s?y.createElement(i$,null):y.createElement(o$,null),y.createElement("span",null,"RAW")),s?x:y.createElement(eS,{readOnly:h||!E,isCollapsed:E?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:zte(a),cancelButtonElement:y.createElement(Bd,{type:"button"},"Cancel"),editButtonElement:y.createElement(Bd,{type:"submit"},"Save"),addButtonElement:y.createElement(Bd,{type:"submit",primary:!0},"Save"),plusMenuElement:y.createElement(kte,null),minusMenuElement:y.createElement(_te,null),inputElement:(w,D,S,A)=>A?y.createElement(T3,{onFocus:Bte,onBlur:Rte}):y.createElement(T3,null),fallback:x}))},Ote=_.input(({theme:e,min:t,max:r,value:n,disabled:a})=>({"&":{width:"100%",backgroundColor:"transparent",appearance:"none"},"&::-webkit-slider-runnable-track":{background:e.base==="light"?`linear-gradient(to right, + */const{global:et}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:tee,once:ree,logger:dm}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:x3,composeConfigs:lae,Preview:sae,DocsContext:uae}=__STORYBOOK_MODULE_PREVIEW_API__,{STORY_ARGS_UPDATED:C3,UPDATE_STORY_ARGS:nee,RESET_STORY_ARGS:aee,GLOBALS_UPDATED:D3,NAVIGATE_URL:oee}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var iee=Ra({"../../node_modules/tocbot/src/js/default-options.js"(e,t){t.exports={tocSelector:".js-toc",contentSelector:".js-toc-content",headingSelector:"h1, h2, h3",ignoreSelector:".js-toc-ignore",hasInnerContainers:!1,linkClass:"toc-link",extraLinkClasses:"",activeLinkClass:"is-active-link",listClass:"toc-list",extraListClasses:"",isCollapsedClass:"is-collapsed",collapsibleClass:"is-collapsible",listItemClass:"toc-list-item",activeListItemClass:"is-active-li",collapseDepth:0,scrollSmooth:!0,scrollSmoothDuration:420,scrollSmoothOffset:0,scrollEndCallback:function(r){},headingsOffset:1,throttleTimeout:50,positionFixedSelector:null,positionFixedClass:"is-position-fixed",fixedSidebarOffset:"auto",includeHtml:!1,includeTitleTags:!1,onClick:function(r){},orderedList:!0,scrollContainer:null,skipRendering:!1,headingLabelCallback:!1,ignoreHiddenElements:!1,headingObjectCallback:null,basePath:"",disableTocScrollSync:!1,tocScrollOffset:0}}}),lee=Ra({"../../node_modules/tocbot/src/js/build-html.js"(e,t){t.exports=function(r){var n=[].forEach,a=[].some,o=document.body,i,s=!0,u=" ";function d(w,D){var S=D.appendChild(h(w));if(w.children.length){var A=p(w.isCollapsed);w.children.forEach(function(k){d(k,A)}),S.appendChild(A)}}function f(w,D){var S=!1,A=p(S);if(D.forEach(function(k){d(k,A)}),i=w||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),D.length===0?i:i.appendChild(A)}function h(w){var D=document.createElement("li"),S=document.createElement("a");return r.listItemClass&&D.setAttribute("class",r.listItemClass),r.onClick&&(S.onclick=r.onClick),r.includeTitleTags&&S.setAttribute("title",w.textContent),r.includeHtml&&w.childNodes.length?n.call(w.childNodes,function(A){S.appendChild(A.cloneNode(!0))}):S.textContent=w.textContent,S.setAttribute("href",r.basePath+"#"+w.id),S.setAttribute("class",r.linkClass+u+"node-name--"+w.nodeName+u+r.extraLinkClasses),D.appendChild(S),D}function p(w){var D=r.orderedList?"ol":"ul",S=document.createElement(D),A=r.listClass+u+r.extraListClasses;return w&&(A=A+u+r.collapsibleClass,A=A+u+r.isCollapsedClass),S.setAttribute("class",A),S}function m(){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var w;w=document.querySelector(r.scrollContainer).scrollTop}else w=document.documentElement.scrollTop||o.scrollTop;var D=document.querySelector(r.positionFixedSelector);r.fixedSidebarOffset==="auto"&&(r.fixedSidebarOffset=i.offsetTop),w>r.fixedSidebarOffset?D.className.indexOf(r.positionFixedClass)===-1&&(D.className+=u+r.positionFixedClass):D.className=D.className.replace(u+r.positionFixedClass,"")}function g(w){var D=0;return w!==null&&(D=w.offsetTop,r.hasInnerContainers&&(D+=g(w.offsetParent))),D}function v(w,D){return w&&w.className!==D&&(w.className=D),w}function b(w){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var D;D=document.querySelector(r.scrollContainer).scrollTop}else D=document.documentElement.scrollTop||o.scrollTop;r.positionFixedSelector&&m();var S=w,A;if(s&&i!==null&&S.length>0){a.call(S,function(M,O){if(g(M)>D+r.headingsOffset+10){var $=O===0?O:O-1;return A=S[$],!0}else if(O===S.length-1)return A=S[S.length-1],!0});var k=i.querySelector("."+r.activeLinkClass),F=i.querySelector("."+r.linkClass+".node-name--"+A.nodeName+'[href="'+r.basePath+"#"+A.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(k===F)return;var T=i.querySelectorAll("."+r.linkClass);n.call(T,function(M){v(M,M.className.replace(u+r.activeLinkClass,""))});var R=i.querySelectorAll("."+r.listItemClass);n.call(R,function(M){v(M,M.className.replace(u+r.activeListItemClass,""))}),F&&F.className.indexOf(r.activeLinkClass)===-1&&(F.className+=u+r.activeLinkClass);var L=F&&F.parentNode;L&&L.className.indexOf(r.activeListItemClass)===-1&&(L.className+=u+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(M){M.className.indexOf(r.isCollapsedClass)===-1&&(M.className+=u+r.isCollapsedClass)}),F&&F.nextSibling&&F.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&v(F.nextSibling,F.nextSibling.className.replace(u+r.isCollapsedClass,"")),x(F&&F.parentNode.parentNode)}}function x(w){return w&&w.className.indexOf(r.collapsibleClass)!==-1&&w.className.indexOf(r.isCollapsedClass)!==-1?(v(w,w.className.replace(u+r.isCollapsedClass,"")),x(w.parentNode.parentNode)):w}function E(w){var D=w.target||w.srcElement;typeof D.className!="string"||D.className.indexOf(r.linkClass)===-1||(s=!1)}function C(){s=!0}return{enableTocAnimation:C,disableTocAnimation:E,render:f,updateToc:b}}}}),see=Ra({"../../node_modules/tocbot/src/js/parse-content.js"(e,t){t.exports=function(r){var n=[].reduce;function a(h){return h[h.length-1]}function o(h){return+h.nodeName.toUpperCase().replace("H","")}function i(h){try{return h instanceof window.HTMLElement||h instanceof window.parent.HTMLElement}catch{return h instanceof window.HTMLElement}}function s(h){if(!i(h))return h;if(r.ignoreHiddenElements&&(!h.offsetHeight||!h.offsetParent))return null;let p=h.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(h.innerText)):(h.innerText||h.textContent).trim());var m={id:h.id,children:[],nodeName:h.nodeName,headingLevel:o(h),textContent:p};return r.includeHtml&&(m.childNodes=h.childNodes),r.headingObjectCallback?r.headingObjectCallback(m,h):m}function u(h,p){for(var m=s(h),g=m.headingLevel,v=p,b=a(v),x=b?b.headingLevel:0,E=g-x;E>0&&(b=a(v),!(b&&g===b.headingLevel));)b&&b.children!==void 0&&(v=b.children),E--;return g>=r.collapseDepth&&(m.isCollapsed=!0),v.push(m),v}function d(h,p){var m=p;r.ignoreSelector&&(m=p.split(",").map(function(g){return g.trim()+":not("+r.ignoreSelector+")"}));try{return h.querySelectorAll(m)}catch{return console.warn("Headers not found with selector: "+m),null}}function f(h){return n.call(h,function(p,m){var g=s(m);return g&&u(g,p.nest),p},{nest:[]})}return{nestHeadingsArray:f,selectHeadings:d}}}}),uee=Ra({"../../node_modules/tocbot/src/js/update-toc-scroll.js"(e,t){t.exports=function(r){var n=r.tocElement||document.querySelector(r.tocSelector);if(n&&n.scrollHeight>n.clientHeight){var a=n.querySelector("."+r.activeListItemClass);a&&(n.scrollTop=a.offsetTop-r.tocScrollOffset)}}}}),cee=Ra({"../../node_modules/tocbot/src/js/scroll-smooth/index.js"(e){e.initSmoothScrolling=t;function t(n){var a=n.duration,o=n.offset,i=location.hash?d(location.href):location.href;s();function s(){document.body.addEventListener("click",h,!1);function h(p){!u(p.target)||p.target.className.indexOf("no-smooth-scroll")>-1||p.target.href.charAt(p.target.href.length-2)==="#"&&p.target.href.charAt(p.target.href.length-1)==="!"||p.target.className.indexOf(n.linkClass)===-1||r(p.target.hash,{duration:a,offset:o,callback:function(){f(p.target.hash)}})}}function u(h){return h.tagName.toLowerCase()==="a"&&(h.hash.length>0||h.href.charAt(h.href.length-1)==="#")&&(d(h.href)===i||d(h.href)+"#"===i)}function d(h){return h.slice(0,h.lastIndexOf("#"))}function f(h){var p=document.getElementById(h.substring(1));p&&(/^(?:a|select|input|button|textarea)$/i.test(p.tagName)||(p.tabIndex=-1),p.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||g},s=document.querySelector('[id="'+decodeURI(n).split("#").join("")+'"]')||document.querySelector('[id="'+n.split("#").join("")+'"]'),u=typeof n=="string"?i.offset+(n?s&&s.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):n,d=typeof i.duration=="function"?i.duration(u):i.duration,f,h;requestAnimationFrame(function(v){f=v,p(v)});function p(v){h=v-f,window.scrollTo(0,i.easing(h,o,u,d)),h"u"&&!h)return;var p,m=Object.prototype.hasOwnProperty;function g(){for(var E={},C=0;C({backgroundColor:e.base==="light"?"rgba(0,0,0,.01)":"rgba(255,255,255,.01)",borderRadius:e.appBorderRadius,border:`1px dashed ${e.appBorderColor}`,display:"flex",alignItems:"center",justifyContent:"center",padding:20,margin:"25px 0 40px",color:se(.3,e.color.defaultText),fontSize:e.typography.size.s2})),PD=e=>y.createElement(pee,{...e,className:"docblock-emptyblock sb-unstyled"}),fee=_(Ih)(({theme:e})=>({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"}})),hee=_.div(({theme:e})=>({background:e.background.content,borderRadius:e.appBorderRadius,border:`1px solid ${e.appBorderColor}`,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",margin:"25px 0 40px",padding:"20px 20px 20px 22px"})),gl=_.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${jd}`]:{margin:0}})),mee=()=>y.createElement(hee,null,y.createElement(gl,null),y.createElement(gl,{style:{width:"80%"}}),y.createElement(gl,{style:{width:"30%"}}),y.createElement(gl,{style:{width:"80%"}})),ND=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:s}=hb();if(e)return y.createElement(mee,null);if(t)return y.createElement(PD,null,t);let u=y.createElement(fee,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return u;let d=a?Pd.dark:Pd.light;return y.createElement(mb,{theme:Nd({...d,fontCode:s.fonts.mono,fontBase:s.fonts.base})},u)},ve=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,pm=600,gee=_.h1(de,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${pm}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),vee=_.h2(de,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${pm}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:se(.25,e.color.defaultText)})),yee=_.div(({theme:e})=>{let t={fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s3,margin:0,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch"},r={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"},"& code":{fontSize:"inherit"}},n={lineHeight:1,margin:"0 2px",padding:"3px 5px",whiteSpace:"nowrap",borderRadius:3,fontSize:e.typography.size.s2-1,border:e.base==="light"?`1px solid ${e.color.mediumlight}`:`1px solid ${e.color.darker}`,color:e.base==="light"?se(.1,e.color.defaultText):se(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[ve("a")]:{...t,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}},[ve("blockquote")]:{...t,margin:"16px 0",borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},[ve("div")]:t,[ve("dl")]:{...t,margin:"16px 0",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}},[ve("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[ve("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[ve("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[ve("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[ve("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[ve("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[ve("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[ve("img")]:{maxWidth:"100%"},[ve("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[ve("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[ve("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[ve("pre")]:{...t,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"}},[ve("span")]:{...t,"&.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"}}},[ve("table")]:{...t,margin:"16px 0",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}},[ve("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),bee=_.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${pm}px)`]:{}})),wee=({children:e,toc:t})=>y.createElement(bee,{className:"sbdocs sbdocs-wrapper"},y.createElement(yee,{className:"sbdocs sbdocs-content"},e),t),Ju=e=>({borderRadius:e.appBorderRadius,background:e.background.content,boxShadow:e.base==="light"?"rgba(0, 0, 0, 0.10) 0 1px 3px 0":"rgba(0, 0, 0, 0.20) 0 2px 5px 0",border:`1px solid ${e.appBorderColor}`}),{window:Eee}=et,xee=class extends l.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=Eee.document.getElementById(e)}shouldComponentUpdate(e){let{scale:t}=e;return t!==this.props.scale&&this.setIframeBodyStyle({width:`${t*100}%`,height:`${t*100}%`,transform:`scale(${1/t})`,transformOrigin:"top left"}),!1}setIframeBodyStyle(e){return Object.assign(this.iframe.contentDocument.body.style,e)}render(){let{id:e,title:t,src:r,allowFullScreen:n,scale:a,...o}=this.props;return y.createElement("iframe",{id:e,title:t,src:r,...n?{allow:"fullscreen"}:{},loading:"lazy",...o})}},jD=l.createContext({scale:1}),{PREVIEW_URL:Cee}=et,Dee=Cee||"iframe.html",Ip=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,See=e=>{let t=l.useRef(),[r,n]=l.useState(!0),[a,o]=l.useState(),{story:i,height:s,autoplay:u,forceInitialArgs:d,renderStoryToElement:f}=e;return l.useEffect(()=>{if(!(i&&t.current))return()=>{};let h=t.current,p=f(i,h,{showMain:()=>{},showError:({title:m,description:g})=>o(new Error(`${m} - ${g}`)),showException:m=>o(m)},{autoplay:u,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>p())}},[u,f,i]),a?y.createElement("pre",null,y.createElement(QO,{error:a})):y.createElement(y.Fragment,null,s?y.createElement("style",null,`#${Ip(e)} { min-height: ${s}; transform: translateZ(0); overflow: auto }`):null,r&&y.createElement(HD,null),y.createElement("div",{ref:t,id:`${Ip(e)}-inner`,"data-name":i.name}))},Aee=({story:e,height:t="500px"})=>y.createElement("div",{style:{width:"100%",height:t}},y.createElement(jD.Consumer,null,({scale:r})=>y.createElement(xee,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:xM(Dee,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),kee=_.strong(({theme:e})=>({color:e.color.orange})),_ee=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?y.createElement(kee,null,"This story mounts inside of play. Set"," ",y.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay"},"autoplay")," ","to true to view this story."):y.createElement("div",{id:Ip(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?y.createElement(See,{...e}):y.createElement(Aee,{...e}))},HD=()=>y.createElement(EM,null),Fee=_(Ph)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),Iee=_.div({display:"flex",alignItems:"center",gap:4}),Tee=_.div(({theme:e})=>({width:14,height:14,borderRadius:2,margin:"0 7px",backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),Ree=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>y.createElement(Fee,{...o},y.createElement(Iee,{key:"left"},e?[1,2,3].map(i=>y.createElement(Tee,{key:i})):y.createElement(y.Fragment,null,y.createElement(hn,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},y.createElement(r$,null)),y.createElement(hn,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},y.createElement(n$,null)),y.createElement(hn,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},y.createElement(a$,null))))),Bee=_.div(({isColumn:e,columns:t,layout:r})=>({display:e||!t?"block":"flex",position:"relative",flexWrap:"wrap",overflow:"auto",flexDirection:e?"column":"row","& .innerZoomElementWrapper > *":e?{width:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"block"}:{maxWidth:r!=="fullscreen"?"calc(100% - 20px)":"100%",display:"inline-block"}}),({layout:e="padded"})=>e==="centered"||e==="padded"?{padding:"30px 20px","& .innerZoomElementWrapper > *":{width:"auto",border:"10px solid transparent!important"}}:{},({layout:e="padded"})=>e==="centered"?{display:"flex",justifyContent:"center",justifyItems:"center",alignContent:"center",alignItems:"center"}:{},({columns:e})=>e&&e>1?{".innerZoomElementWrapper > *":{minWidth:`calc(100% / ${e} - 20px)`}}:{}),S3=_(ND)(({theme:e})=>({margin:0,borderTopLeftRadius:0,borderTopRightRadius:0,borderBottomLeftRadius:e.appBorderRadius,borderBottomRightRadius:e.appBorderRadius,border:"none",background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Ot(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":Ot(.05,e.background.content)}})),zee=_.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Ju(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),Oee=(e,t,r)=>{switch(!0){case!!(e&&e.error):return{source:null,actionItem:{title:"No code available",className:"docblock-code-toggle docblock-code-toggle--disabled",disabled:!0,onClick:()=>r(!1)}};case t:return{source:y.createElement(S3,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:y.createElement(S3,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function Lee(e){if(l.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var Mee=_(Ree)({position:"absolute",top:0,left:0,right:0,height:40}),$ee=_.div({overflow:"hidden",position:"relative"}),VD=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:s,className:u,layout:d="padded",...f})=>{let[h,p]=l.useState(i),{source:m,actionItem:g}=Oee(a,h,p),[v,b]=l.useState(1),x=[u].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),E=a?[g]:[],[C,w]=l.useState(s?[...s]:[]),D=[...E,...C],{window:S}=et,A=l.useCallback(async F=>{let{createCopyToClipboardFunction:T}=await $3(()=>import("./index-VyeKKq5j.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url);T()},[]),k=F=>{let T=S.getSelection();T&&T.type==="Range"||(F.preventDefault(),C.filter(R=>R.title==="Copied").length===0&&A(m.props.code).then(()=>{w([...C,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>w(C.filter(R=>R.title!=="Copied")),1500)}))};return y.createElement(zee,{withSource:a,withToolbar:o,...f,className:x.join(" ")},o&&y.createElement(Mee,{isLoading:e,border:!0,zoom:F=>b(v*F),resetZoom:()=>b(1),storyId:Lee(n),baseUrl:"./iframe.html"}),y.createElement(jD.Provider,{value:{scale:v}},y.createElement($ee,{className:"docs-story",onCopyCapture:a&&k},y.createElement(Bee,{isColumn:t||!Array.isArray(n),columns:r,layout:d},y.createElement(qO.Element,{scale:v},Array.isArray(n)?n.map((F,T)=>y.createElement("div",{key:T},F)):y.createElement("div",null,n))),y.createElement(pf,{actionItems:D}))),a&&h&&m)};_(VD)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var Pee=_.label(({theme:e})=>({lineHeight:"18px",alignItems:"center",marginBottom:8,display:"inline-block",position:"relative",whiteSpace:"nowrap",background:e.boolean.background,borderRadius:"3em",padding:1,'&[aria-disabled="true"]':{opacity:.5,input:{cursor:"not-allowed"}},input:{appearance:"none",width:"100%",height:"100%",position:"absolute",left:0,top:0,margin:0,padding:0,border:"none",background:"transparent",cursor:"pointer",borderRadius:"3em","&:focus":{outline:"none",boxShadow:`${e.color.secondary} 0 0 0 1px inset !important`}},span:{textAlign:"center",fontSize:e.typography.size.s1,fontWeight:e.typography.weight.bold,lineHeight:"1",cursor:"pointer",display:"inline-block",padding:"7px 15px",transition:"all 100ms ease-out",userSelect:"none",borderRadius:"3em",color:se(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${pl(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${pl(.05,e.appBorderColor)} 0 0 0 2px inset`,color:pl(1,e.appBorderColor)},"&:first-of-type":{paddingRight:8},"&:last-of-type":{paddingLeft:8}},"input:checked ~ span:last-of-type, input:not(:checked) ~ span:first-of-type":{background:e.boolean.selectedBackground,boxShadow:e.base==="light"?`${pl(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),Nee=e=>e==="true",jee=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{var f;let i=l.useCallback(()=>r(!1),[r]),s=!!((f=o==null?void 0:o.table)!=null&&f.readonly);if(t===void 0)return y.createElement(In,{variant:"outline",size:"medium",id:Ns(e),onClick:i,disabled:s},"Set boolean");let u=Et(e),d=typeof t=="string"?Nee(t):t;return y.createElement(Pee,{"aria-disabled":s,htmlFor:u,"aria-label":e},y.createElement("input",{id:u,type:"checkbox",onChange:h=>r(h.target.checked),checked:d,role:"switch",disabled:s,name:e,onBlur:n,onFocus:a}),y.createElement("span",{"aria-hidden":"true"},"False"),y.createElement("span",{"aria-hidden":"true"},"True"))},Hee=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},Vee=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},Uee=e=>{let t=new Date(e),r=`000${t.getFullYear()}`.slice(-4),n=`0${t.getMonth()+1}`.slice(-2),a=`0${t.getDate()}`.slice(-2);return`${r}-${n}-${a}`},qee=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},A3=_(Ti.Input)(({readOnly:e})=>({opacity:e?.5:1})),Wee=_.div(({theme:e})=>({flex:1,display:"flex",input:{marginLeft:10,flex:1,height:32,"&::-webkit-calendar-picker-indicator":{opacity:.5,height:12,filter:e.base==="light"?void 0:"invert(1)"}},"input:first-of-type":{marginLeft:0,flexGrow:4},"input:last-of-type":{flexGrow:3}})),Gee=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{var g;let[i,s]=l.useState(!0),u=l.useRef(),d=l.useRef(),f=!!((g=o==null?void 0:o.table)!=null&&g.readonly);l.useEffect(()=>{i!==!1&&(u&&u.current&&(u.current.value=t?Uee(t):""),d&&d.current&&(d.current.value=t?qee(t):""))},[t]);let h=v=>{if(!v.target.value)return r();let b=Hee(v.target.value),x=new Date(t);x.setFullYear(b.getFullYear(),b.getMonth(),b.getDate());let E=x.getTime();E&&r(E),s(!!E)},p=v=>{if(!v.target.value)return r();let b=Vee(v.target.value),x=new Date(t);x.setHours(b.getHours()),x.setMinutes(b.getMinutes());let E=x.getTime();E&&r(E),s(!!E)},m=Et(e);return y.createElement(Wee,null,y.createElement(A3,{type:"date",max:"9999-12-31",ref:u,id:`${m}-date`,name:`${m}-date`,readOnly:f,onChange:h,onFocus:n,onBlur:a}),y.createElement(A3,{type:"time",id:`${m}-time`,name:`${m}-time`,ref:d,onChange:p,readOnly:f,onFocus:n,onBlur:a}),i?null:y.createElement("div",null,"invalid"))},Kee=_.label({display:"flex"}),Yee=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},Zee=_(Ti.Input)(({readOnly:e})=>({opacity:e?.5:1})),Jee=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:s,argType:u})=>{var C;let[d,f]=l.useState(typeof t=="number"?t:""),[h,p]=l.useState(!1),[m,g]=l.useState(null),v=!!((C=u==null?void 0:u.table)!=null&&C.readonly),b=l.useCallback(w=>{f(w.target.value);let D=parseFloat(w.target.value);Number.isNaN(D)?g(new Error(`'${w.target.value}' is not a number`)):(r(D),g(null))},[r,g]),x=l.useCallback(()=>{f("0"),r(0),p(!0)},[p]),E=l.useRef(null);return l.useEffect(()=>{h&&E.current&&E.current.select()},[h]),l.useEffect(()=>{d!==(typeof t=="number"?t:"")&&f(t)},[t]),t===void 0?y.createElement(In,{variant:"outline",size:"medium",id:Ns(e),onClick:x,disabled:v},"Set number"):y.createElement(Kee,null,y.createElement(Zee,{ref:E,id:Et(e),type:"number",onChange:b,size:"flex",placeholder:"Edit number...",value:d,valid:m?"error":null,autoFocus:h,readOnly:v,name:e,min:n,max:a,step:o,onFocus:s,onBlur:i}))},UD=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},Tp=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],qD=(e,t)=>e&&t&&e.map(r=>t[r]),Xee=_.div(({isInline:e})=>e?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},e=>{if(e["aria-readonly"]==="true")return{input:{cursor:"not-allowed"}}}),Qee=_.span({"[aria-readonly=true] &":{opacity:.5}}),ete=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),k3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var p;if(!t)return dm.warn(`Checkbox with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=Tp(r,t),[s,u]=l.useState(i),d=!!((p=o==null?void 0:o.table)!=null&&p.readonly),f=m=>{let g=m.target.value,v=[...s];v.includes(g)?v.splice(v.indexOf(g),1):v.push(g),n(qD(v,t)),u(v)};l.useEffect(()=>{u(Tp(r,t))},[r]);let h=Et(e);return y.createElement(Xee,{"aria-readonly":d,isInline:a},Object.keys(t).map((m,g)=>{let v=`${h}-${g}`;return y.createElement(ete,{key:v,htmlFor:v},y.createElement("input",{type:"checkbox",disabled:d,id:v,name:v,value:m,onChange:f,checked:s==null?void 0:s.includes(m)}),y.createElement(Qee,null,m))}))},tte=_.div(({isInline:e})=>e?{display:"flex",flexWrap:"wrap",alignItems:"flex-start",label:{display:"inline-flex",marginRight:15}}:{label:{display:"flex"}},e=>{if(e["aria-readonly"]==="true")return{input:{cursor:"not-allowed"}}}),rte=_.span({"[aria-readonly=true] &":{opacity:.5}}),nte=_.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),_3=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var d;if(!t)return dm.warn(`Radio with no options: ${e}`),y.createElement(y.Fragment,null,"-");let i=UD(r,t),s=Et(e),u=!!((d=o==null?void 0:o.table)!=null&&d.readonly);return y.createElement(tte,{"aria-readonly":u,isInline:a},Object.keys(t).map((f,h)=>{let p=`${s}-${h}`;return y.createElement(nte,{key:p,htmlFor:p},y.createElement("input",{type:"radio",id:p,name:s,disabled:u,value:f,onChange:m=>n(t[m.currentTarget.value]),checked:f===i}),y.createElement(rte,null,f))}))},ate={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},WD=_.select(ate,({theme:e})=>({boxSizing:"border-box",position:"relative",padding:"6px 10px",width:"100%",color:e.input.color||"inherit",background:e.input.background,borderRadius:e.input.borderRadius,boxShadow:`${e.input.border} 0 0 0 1px inset`,fontSize:e.typography.size.s2-1,lineHeight:"20px","&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"::placeholder":{color:e.textMutedColor},"&[multiple]":{overflow:"auto",padding:0,option:{display:"block",padding:"6px 10px",marginLeft:1,marginRight:1}}})),GD=_.span(({theme:e})=>({display:"inline-block",lineHeight:"normal",overflow:"hidden",position:"relative",verticalAlign:"top",width:"100%",svg:{position:"absolute",zIndex:1,pointerEvents:"none",height:"12px",marginTop:"-6px",right:"12px",top:"50%",fill:e.textMutedColor,path:{fill:e.textMutedColor}}})),F3="Choose option...",ote=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{n(r[f.currentTarget.value])},i=UD(t,r)||F3,s=Et(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(GD,null,y.createElement(AC,null),y.createElement(WD,{disabled:u,id:s,value:i,onChange:o},y.createElement("option",{key:"no-selection",disabled:!0},F3),Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},ite=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=f=>{let h=Array.from(f.currentTarget.options).filter(p=>p.selected).map(p=>p.value);n(qD(h,r))},i=Tp(t,r),s=Et(e),u=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return y.createElement(GD,null,y.createElement(WD,{disabled:u,id:s,multiple:!0,value:i,onChange:o},Object.keys(r).map(f=>y.createElement("option",{key:f,value:f},f))))},I3=e=>{let{name:t,options:r}=e;return r?e.isMulti?y.createElement(ite,{...e}):y.createElement(ote,{...e}):(dm.warn(`Select with no options: ${t}`),y.createElement(y.Fragment,null,"-"))},lte=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[(t==null?void 0:t[n])||String(n)]=n,r),{}):e,ste={check:k3,"inline-check":k3,radio:_3,"inline-radio":_3,select:I3,"multi-select":I3},qn=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?lte(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=ste[t];if(o)return y.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},ute="Error",cte="Object",dte="Array",pte="String",fte="Number",hte="Boolean",mte="Date",gte="Null",vte="Undefined",yte="Function",bte="Symbol",KD="ADD_DELTA_TYPE",YD="REMOVE_DELTA_TYPE",ZD="UPDATE_DELTA_TYPE",fm="value",wte="key";function cn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)&&typeof e[Symbol.iterator]=="function"?"Iterable":Object.prototype.toString.call(e).slice(8,-1)}function JD(e,t){let r=cn(e),n=cn(t);return(r==="Function"||n==="Function")&&n!==r}var hm=class extends l.Component{constructor(e){super(e),this.state={inputRefKey:null,inputRefValue:null},this.refInputValue=this.refInputValue.bind(this),this.refInputKey=this.refInputKey.bind(this),this.onKeydown=this.onKeydown.bind(this),this.onSubmit=this.onSubmit.bind(this)}componentDidMount(){let{inputRefKey:e,inputRefValue:t}=this.state,{onlyValue:r}=this.props;e&&typeof e.focus=="function"&&e.focus(),r&&t&&typeof t.focus=="function"&&t.focus(),document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.onSubmit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.props.handleCancel()))}onSubmit(){let{handleAdd:e,onlyValue:t,onSubmitValueParser:r,keyPath:n,deep:a}=this.props,{inputRefKey:o,inputRefValue:i}=this.state,s={};if(!t){if(!o.value)return;s.key=o.value}s.newValue=r(!1,n,a,s.key,i.value),e(s)}refInputKey(e){this.state.inputRefKey=e}refInputValue(e){this.state.inputRefValue=e}render(){let{handleCancel:e,onlyValue:t,addButtonElement:r,cancelButtonElement:n,inputElementGenerator:a,keyPath:o,deep:i}=this.props,s=l.cloneElement(r,{onClick:this.onSubmit}),u=l.cloneElement(n,{onClick:e}),d=a(fm,o,i),f=l.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),h=null;if(!t){let p=a(wte,o,i);h=l.cloneElement(p,{placeholder:"Key",ref:this.refInputKey})}return y.createElement("span",{className:"rejt-add-value-node"},h,f,u,s)}};hm.defaultProps={onlyValue:!1,addButtonElement:y.createElement("button",null,"+"),cancelButtonElement:y.createElement("button",null,"c")};var XD=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={data:e.data,name:e.name,keyPath:t,deep:e.deep,nextDeep:e.deep+1,collapsed:e.isCollapsed(t,e.deep,e.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveItem=this.handleRemoveItem.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}onChildUpdate(e,t){let{data:r,keyPath:n}=this.state;r[e]=t,this.setState({data:r});let{onUpdate:a}=this.props,o=n.length;a(n[o-1],r)}handleAddMode(){this.setState({addFormVisible:!0})}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleRemoveItem(e){return()=>{let{beforeRemoveAction:t,logger:r}=this.props,{data:n,keyPath:a,nextDeep:o}=this.state,i=n[e];t(e,a,o,i).then(()=>{let s={keyPath:a,deep:o,key:e,oldValue:i,type:YD};n.splice(e,1),this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleAddValueAdd({newValue:e}){let{data:t,keyPath:r,nextDeep:n}=this.state,{beforeAddAction:a,logger:o}=this.props;a(t.length,r,n,e).then(()=>{let i=[...t,e];this.setState({data:i}),this.handleAddValueCancel();let{onUpdate:s,onDeltaUpdate:u}=this.props;s(r[r.length-1],i),u({type:KD,keyPath:r,deep:n,key:i.length-1,newValue:e})}).catch(o.error)}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:ZD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r(void 0)}).catch(n)})}renderCollapsed(){let{name:e,data:t,keyPath:r,deep:n}=this.state,{handleRemove:a,readOnly:o,getStyle:i,dataType:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=i(e,t,r,n,s),h=o(e,t,r,n,s),p=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!h&&p)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,addFormVisible:a,nextDeep:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,delimiter:T,ul:R,addForm:L}=f(e,t,r,n,h),z=d(e,t,r,n,h),M=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),O=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k});return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"["),!a&&M,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},t.map(($,H)=>y.createElement(Xu,{key:H,name:H.toString(),data:$,keyPath:r,deep:o,isCollapsed:i,handleRemove:this.handleRemoveItem(H),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}))),!z&&a&&y.createElement("div",{className:"rejt-add-form",style:L},y.createElement(hm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:T},"]"),!z&&O)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{dataType:o,getStyle:i}=this.props,s=t?this.renderCollapsed():this.renderNotCollapsed(),u=i(e,r,n,a,o);return y.createElement("div",{className:"rejt-array-node"},y.createElement("span",{onClick:this.handleCollapseMode},y.createElement("span",{className:"rejt-name",style:u.name},e," :"," ")),s)}};XD.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var QD=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={value:e.value,name:e.name,keyPath:t,deep:e.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(e,t){return e.value!==t.value?{value:e.value}:null}componentDidUpdate(){let{editEnabled:e,inputRef:t,name:r,value:n,keyPath:a,deep:o}=this.state,{readOnly:i,dataType:s}=this.props,u=i(r,n,a,o,s);e&&!u&&typeof t.focus=="function"&&t.focus()}componentDidMount(){document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.handleEdit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue:e,originalValue:t,logger:r,onSubmitValueParser:n,keyPath:a}=this.props,{inputRef:o,name:i,deep:s}=this.state;if(!o)return;let u=n(!0,a,s,i,o.value);e({value:u,key:i}).then(()=>{JD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,textareaElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=null,x=null,E=s(e,i,n,a,u);if(r&&!E){let C=p(fm,g,a,e,i,u),w=l.cloneElement(f,{onClick:this.handleEdit}),D=l.cloneElement(h,{onClick:this.handleCancelEdit}),S=l.cloneElement(C,{ref:this.refInput,defaultValue:i});b=y.createElement("span",{className:"rejt-edit-form",style:v.editForm},S," ",D,w),x=null}else{b=y.createElement("span",{className:"rejt-value",style:v.value,onClick:E?null:this.handleEditMode},t);let C=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});x=E?null:C}return y.createElement("li",{className:"rejt-function-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," :"," "),b,x)}};QD.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};var Xu=class extends l.Component{constructor(e){super(e),this.state={data:e.data,name:e.name,keyPath:e.keyPath,deep:e.deep}}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}render(){let{data:e,name:t,keyPath:r,deep:n}=this.state,{isCollapsed:a,handleRemove:o,handleUpdateValue:i,onUpdate:s,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S}=this.props,A=()=>!0,k=cn(e);switch(k){case ute:return y.createElement(Rp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:A,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case cte:return y.createElement(Rp,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case dte:return y.createElement(XD,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:s,onDeltaUpdate:u,readOnly:d,dataType:k,getStyle:f,addButtonElement:h,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,textareaElementGenerator:v,minusMenuElement:b,plusMenuElement:x,beforeRemoveAction:E,beforeAddAction:C,beforeUpdateAction:w,logger:D,onSubmitValueParser:S});case pte:return y.createElement(Er,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case fte:return y.createElement(Er,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case hte:return y.createElement(Er,{name:t,value:e?"true":"false",originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case mte:return y.createElement(Er,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case gte:return y.createElement(Er,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case vte:return y.createElement(Er,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});case yte:return y.createElement(QD,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,textareaElementGenerator:v,minusMenuElement:b,logger:D,onSubmitValueParser:S});case bte:return y.createElement(Er,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:A,dataType:k,getStyle:f,cancelButtonElement:p,editButtonElement:m,inputElementGenerator:g,minusMenuElement:b,logger:D,onSubmitValueParser:S});default:return null}}};Xu.defaultProps={keyPath:[],deep:0};var Rp=class extends l.Component{constructor(e){super(e);let t=e.deep===-1?[]:[...e.keyPath,e.name];this.state={name:e.name,data:e.data,keyPath:t,deep:e.deep,nextDeep:e.deep+1,collapsed:e.isCollapsed(t,e.deep,e.data),addFormVisible:!1},this.handleCollapseMode=this.handleCollapseMode.bind(this),this.handleRemoveValue=this.handleRemoveValue.bind(this),this.handleAddMode=this.handleAddMode.bind(this),this.handleAddValueAdd=this.handleAddValueAdd.bind(this),this.handleAddValueCancel=this.handleAddValueCancel.bind(this),this.handleEditValue=this.handleEditValue.bind(this),this.onChildUpdate=this.onChildUpdate.bind(this),this.renderCollapsed=this.renderCollapsed.bind(this),this.renderNotCollapsed=this.renderNotCollapsed.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data?{data:e.data}:null}onChildUpdate(e,t){let{data:r,keyPath:n}=this.state;r[e]=t,this.setState({data:r});let{onUpdate:a}=this.props,o=n.length;a(n[o-1],r)}handleAddMode(){this.setState({addFormVisible:!0})}handleAddValueCancel(){this.setState({addFormVisible:!1})}handleAddValueAdd({key:e,newValue:t}){let{data:r,keyPath:n,nextDeep:a}=this.state,{beforeAddAction:o,logger:i}=this.props;o(e,n,a,t).then(()=>{r[e]=t,this.setState({data:r}),this.handleAddValueCancel();let{onUpdate:s,onDeltaUpdate:u}=this.props;s(n[n.length-1],r),u({type:KD,keyPath:n,deep:a,key:e,newValue:t})}).catch(i.error)}handleRemoveValue(e){return()=>{let{beforeRemoveAction:t,logger:r}=this.props,{data:n,keyPath:a,nextDeep:o}=this.state,i=n[e];t(e,a,o,i).then(()=>{let s={keyPath:a,deep:o,key:e,oldValue:i,type:YD};delete n[e],this.setState({data:n});let{onUpdate:u,onDeltaUpdate:d}=this.props;u(a[a.length-1],n),d(s)}).catch(r.error)}}handleCollapseMode(){this.setState(e=>({collapsed:!e.collapsed}))}handleEditValue({key:e,value:t}){return new Promise((r,n)=>{let{beforeUpdateAction:a}=this.props,{data:o,keyPath:i,nextDeep:s}=this.state,u=o[e];a(e,i,s,u,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:f}=this.props;d(i[i.length-1],o),f({type:ZD,keyPath:i,deep:s,key:e,newValue:t,oldValue:u}),r()}).catch(n)})}renderCollapsed(){let{name:e,keyPath:t,deep:r,data:n}=this.state,{handleRemove:a,readOnly:o,dataType:i,getStyle:s,minusMenuElement:u}=this.props,{minus:d,collapsed:f}=s(e,n,t,r,i),h=Object.getOwnPropertyNames(n),p=o(e,n,t,r,i),m=l.cloneElement(u,{onClick:a,className:"rejt-minus-menu",style:d});return y.createElement("span",{className:"rejt-collapsed"},y.createElement("span",{className:"rejt-collapsed-text",style:f,onClick:this.handleCollapseMode},"{...}"," ",h.length," ",h.length===1?"key":"keys"),!p&&m)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,nextDeep:a,addFormVisible:o}=this.state,{isCollapsed:i,handleRemove:s,onDeltaUpdate:u,readOnly:d,getStyle:f,dataType:h,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}=this.props,{minus:k,plus:F,addForm:T,ul:R,delimiter:L}=f(e,t,r,n,h),z=Object.getOwnPropertyNames(t),M=d(e,t,r,n,h),O=l.cloneElement(E,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:F}),$=l.cloneElement(x,{onClick:s,className:"rejt-minus-menu",style:k}),H=z.map(K=>y.createElement(Xu,{key:K,name:K,data:t[K],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(K),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:u,readOnly:d,getStyle:f,addButtonElement:p,cancelButtonElement:m,editButtonElement:g,inputElementGenerator:v,textareaElementGenerator:b,minusMenuElement:x,plusMenuElement:E,beforeRemoveAction:C,beforeAddAction:w,beforeUpdateAction:D,logger:S,onSubmitValueParser:A}));return y.createElement("span",{className:"rejt-not-collapsed"},y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"{"),!M&&O,y.createElement("ul",{className:"rejt-not-collapsed-list",style:R},H),!M&&o&&y.createElement("div",{className:"rejt-add-form",style:T},y.createElement(hm,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:p,cancelButtonElement:m,inputElementGenerator:v,keyPath:r,deep:n,onSubmitValueParser:A})),y.createElement("span",{className:"rejt-not-collapsed-delimiter",style:L},"}"),!M&&$)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{getStyle:o,dataType:i}=this.props,s=t?this.renderCollapsed():this.renderNotCollapsed(),u=o(e,r,n,a,i);return y.createElement("div",{className:"rejt-object-node"},y.createElement("span",{onClick:this.handleCollapseMode},y.createElement("span",{className:"rejt-name",style:u.name},e," :"," ")),s)}};Rp.defaultProps={keyPath:[],deep:0,minusMenuElement:y.createElement("span",null," - "),plusMenuElement:y.createElement("span",null," + ")};var Er=class extends l.Component{constructor(e){super(e);let t=[...e.keyPath,e.name];this.state={value:e.value,name:e.name,keyPath:t,deep:e.deep,editEnabled:!1,inputRef:null},this.handleEditMode=this.handleEditMode.bind(this),this.refInput=this.refInput.bind(this),this.handleCancelEdit=this.handleCancelEdit.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onKeydown=this.onKeydown.bind(this)}static getDerivedStateFromProps(e,t){return e.value!==t.value?{value:e.value}:null}componentDidUpdate(){let{editEnabled:e,inputRef:t,name:r,value:n,keyPath:a,deep:o}=this.state,{readOnly:i,dataType:s}=this.props,u=i(r,n,a,o,s);e&&!u&&typeof t.focus=="function"&&t.focus()}componentDidMount(){document.addEventListener("keydown",this.onKeydown)}componentWillUnmount(){document.removeEventListener("keydown",this.onKeydown)}onKeydown(e){e.altKey||e.ctrlKey||e.metaKey||e.shiftKey||e.repeat||((e.code==="Enter"||e.key==="Enter")&&(e.preventDefault(),this.handleEdit()),(e.code==="Escape"||e.key==="Escape")&&(e.preventDefault(),this.handleCancelEdit()))}handleEdit(){let{handleUpdateValue:e,originalValue:t,logger:r,onSubmitValueParser:n,keyPath:a}=this.props,{inputRef:o,name:i,deep:s}=this.state;if(!o)return;let u=n(!0,a,s,i,o.value);e({value:u,key:i}).then(()=>{JD(t,u)||this.handleCancelEdit()}).catch(r.error)}handleEditMode(){this.setState({editEnabled:!0})}refInput(e){this.state.inputRef=e}handleCancelEdit(){this.setState({editEnabled:!1})}render(){let{name:e,value:t,editEnabled:r,keyPath:n,deep:a}=this.state,{handleRemove:o,originalValue:i,readOnly:s,dataType:u,getStyle:d,editButtonElement:f,cancelButtonElement:h,inputElementGenerator:p,minusMenuElement:m,keyPath:g}=this.props,v=d(e,i,n,a,u),b=s(e,i,n,a,u),x=r&&!b,E=p(fm,g,a,e,i,u),C=l.cloneElement(f,{onClick:this.handleEdit}),w=l.cloneElement(h,{onClick:this.handleCancelEdit}),D=l.cloneElement(E,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=l.cloneElement(m,{onClick:o,className:"rejt-minus-menu",style:v.minus});return y.createElement("li",{className:"rejt-value-node",style:v.li},y.createElement("span",{className:"rejt-name",style:v.name},e," : "),x?y.createElement("span",{className:"rejt-edit-form",style:v.editForm},D," ",w,C):y.createElement("span",{className:"rejt-value",style:v.value,onClick:b?null:this.handleEditMode},String(t)),!b&&!x&&S)}};Er.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),editButtonElement:y.createElement("button",null,"e"),cancelButtonElement:y.createElement("button",null,"c"),minusMenuElement:y.createElement("span",null," - ")};function Ete(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var xte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Cte={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},Dte={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}},eS=class extends l.Component{constructor(e){super(e),this.state={data:e.data,rootName:e.rootName},this.onUpdate=this.onUpdate.bind(this),this.removeRoot=this.removeRoot.bind(this)}static getDerivedStateFromProps(e,t){return e.data!==t.data||e.rootName!==t.rootName?{data:e.data,rootName:e.rootName}:null}onUpdate(e,t){this.setState({data:t}),this.props.onFullyUpdate(t)}removeRoot(){this.onUpdate(null,null)}render(){let{data:e,rootName:t}=this.state,{isCollapsed:r,onDeltaUpdate:n,readOnly:a,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElement:d,textareaElement:f,minusMenuElement:h,plusMenuElement:p,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x,fallback:E=null}=this.props,C=cn(e),w=a;cn(a)==="Boolean"&&(w=()=>a);let D=d;d&&cn(d)!=="Function"&&(D=()=>d);let S=f;return f&&cn(f)!=="Function"&&(S=()=>f),C==="Object"||C==="Array"?y.createElement("div",{className:"rejt-tree"},y.createElement(Xu,{data:e,name:t,deep:-1,isCollapsed:r,onUpdate:this.onUpdate,onDeltaUpdate:n,readOnly:w,getStyle:o,addButtonElement:i,cancelButtonElement:s,editButtonElement:u,inputElementGenerator:D,textareaElementGenerator:S,minusMenuElement:h,plusMenuElement:p,handleRemove:this.removeRoot,beforeRemoveAction:m,beforeAddAction:g,beforeUpdateAction:v,logger:b,onSubmitValueParser:x})):E}};eS.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return xte;case"Array":return Cte;default:return Dte}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>Ete(a),inputElement:()=>y.createElement("input",null),textareaElement:()=>y.createElement("textarea",null),fallback:null};var{window:Ste}=et,Ate=_.div(({theme:e})=>({position:"relative",display:"flex",'&[aria-readonly="true"]':{opacity:.5},".rejt-tree":{marginLeft:"1rem",fontSize:"13px"},".rejt-value-node, .rejt-object-node > .rejt-collapsed, .rejt-array-node > .rejt-collapsed, .rejt-object-node > .rejt-not-collapsed, .rejt-array-node > .rejt-not-collapsed":{"& > svg":{opacity:0,transition:"opacity 0.2s"}},".rejt-value-node:hover, .rejt-object-node:hover > .rejt-collapsed, .rejt-array-node:hover > .rejt-collapsed, .rejt-object-node:hover > .rejt-not-collapsed, .rejt-array-node:hover > .rejt-not-collapsed":{"& > svg":{opacity:1}},".rejt-edit-form button":{display:"none"},".rejt-add-form":{marginLeft:10},".rejt-add-value-node":{display:"inline-flex",alignItems:"center"},".rejt-name":{lineHeight:"22px"},".rejt-not-collapsed-delimiter":{lineHeight:"22px"},".rejt-plus-menu":{marginLeft:5},".rejt-object-node > span > *, .rejt-array-node > span > *":{position:"relative",zIndex:2},".rejt-object-node, .rejt-array-node":{position:"relative"},".rejt-object-node > span:first-of-type::after, .rejt-array-node > span:first-of-type::after, .rejt-collapsed::before, .rejt-not-collapsed::before":{content:'""',position:"absolute",top:0,display:"block",width:"100%",marginLeft:"-1rem",padding:"0 4px 0 1rem",height:22},".rejt-collapsed::before, .rejt-not-collapsed::before":{zIndex:1,background:"transparent",borderRadius:4,transition:"background 0.2s",pointerEvents:"none",opacity:.1},".rejt-object-node:hover, .rejt-array-node:hover":{"& > .rejt-collapsed::before, & > .rejt-not-collapsed::before":{background:e.color.secondary}},".rejt-collapsed::after, .rejt-not-collapsed::after":{content:'""',position:"absolute",display:"inline-block",pointerEvents:"none",width:0,height:0},".rejt-collapsed::after":{left:-8,top:8,borderTop:"3px solid transparent",borderBottom:"3px solid transparent",borderLeft:"3px solid rgba(153,153,153,0.6)"},".rejt-not-collapsed::after":{left:-10,top:10,borderTop:"3px solid rgba(153,153,153,0.6)",borderLeft:"3px solid transparent",borderRight:"3px solid transparent"},".rejt-value":{display:"inline-block",border:"1px solid transparent",borderRadius:4,margin:"1px 0",padding:"0 4px",cursor:"text",color:e.color.defaultText},".rejt-value-node:hover > .rejt-value":{background:e.color.lighter,borderColor:e.appBorderColor}})),Bd=_.button(({theme:e,primary:t})=>({border:0,height:20,margin:1,borderRadius:4,background:t?e.color.secondary:"transparent",color:t?e.color.lightest:e.color.dark,fontWeight:t?"bold":"normal",cursor:"pointer",order:t?"initial":9})),kte=_(s$)(({theme:e,disabled:t})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:t?"not-allowed":"pointer",color:e.textMutedColor,"&:hover":t?{}:{color:e.color.ancillary},"svg + &":{marginLeft:0}})),_te=_(u$)(({theme:e,disabled:t})=>({display:"inline-block",verticalAlign:"middle",width:15,height:15,padding:3,marginLeft:5,cursor:t?"not-allowed":"pointer",color:e.textMutedColor,"&:hover":t?{}:{color:e.color.negative},"svg + &":{marginLeft:0}})),T3=_.input(({theme:e,placeholder:t})=>({outline:0,margin:t?1:"1px 0",padding:"3px 4px",color:e.color.defaultText,background:e.background.app,border:`1px solid ${e.appBorderColor}`,borderRadius:4,lineHeight:"14px",width:t==="Key"?80:120,"&:focus":{border:`1px solid ${e.color.secondary}`}})),Fte=_(hn)(({theme:e})=>({position:"absolute",zIndex:2,top:2,right:2,height:21,padding:"0 3px",background:e.background.bar,border:`1px solid ${e.appBorderColor}`,borderRadius:3,color:e.textMutedColor,fontSize:"9px",fontWeight:"bold",textDecoration:"none",span:{marginLeft:3,marginTop:1}})),Ite=_(Ti.Textarea)(({theme:e})=>({flex:1,padding:"7px 6px",fontFamily:e.typography.fonts.mono,fontSize:"12px",lineHeight:"18px","&::placeholder":{fontFamily:e.typography.fonts.base,fontSize:"13px"},"&:placeholder-shown":{padding:"7px 10px"}})),Tte={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},Rte=e=>{e.currentTarget.dispatchEvent(new Ste.KeyboardEvent("keydown",Tte))},Bte=e=>{e.currentTarget.select()},zte=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),R3=({name:e,value:t,onChange:r,argType:n})=>{var C;let a=hb(),o=l.useMemo(()=>t&&QZ(t),[t]),i=o!=null,[s,u]=l.useState(!i),[d,f]=l.useState(null),h=!!((C=n==null?void 0:n.table)!=null&&C.readonly),p=l.useCallback(w=>{try{w&&r(JSON.parse(w)),f(void 0)}catch(D){f(D)}},[r]),[m,g]=l.useState(!1),v=l.useCallback(()=>{r({}),g(!0)},[g]),b=l.useRef(null);if(l.useEffect(()=>{m&&b.current&&b.current.select()},[m]),!i)return y.createElement(In,{disabled:h,id:Ns(e),onClick:v},"Set object");let x=y.createElement(Ite,{ref:b,id:Et(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:w=>p(w.target.value),placeholder:"Edit JSON string...",autoFocus:m,valid:d?"error":null,readOnly:h}),E=Array.isArray(t)||typeof t=="object"&&(t==null?void 0:t.constructor)===Object;return y.createElement(Ate,{"aria-readonly":h},E&&y.createElement(Fte,{onClick:w=>{w.preventDefault(),u(D=>!D)}},s?y.createElement(i$,null):y.createElement(o$,null),y.createElement("span",null,"RAW")),s?x:y.createElement(eS,{readOnly:h||!E,isCollapsed:E?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:zte(a),cancelButtonElement:y.createElement(Bd,{type:"button"},"Cancel"),editButtonElement:y.createElement(Bd,{type:"submit"},"Save"),addButtonElement:y.createElement(Bd,{type:"submit",primary:!0},"Save"),plusMenuElement:y.createElement(kte,null),minusMenuElement:y.createElement(_te,null),inputElement:(w,D,S,A)=>A?y.createElement(T3,{onFocus:Bte,onBlur:Rte}):y.createElement(T3,null),fallback:x}))},Ote=_.input(({theme:e,min:t,max:r,value:n,disabled:a})=>({"&":{width:"100%",backgroundColor:"transparent",appearance:"none"},"&::-webkit-slider-runnable-track":{background:e.base==="light"?`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${Ot(.02,e.input.background)} ${(n-t)/(r-t)*100}%, ${Ot(.02,e.input.background)} 100%)`:`linear-gradient(to right, @@ -576,7 +576,7 @@ ${t}`);let r=t.match(YO);if(!r)return y.createElement(l.Fragment,null,t);let[,n, ${Ot(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${tn(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${tn(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${sr(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),tS=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Lte=_(tS)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),Mte=_.div({display:"flex",alignItems:"center",width:"100%"});function $te(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var Pte=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:u})=>{var m;let d=g=>{r(Yee(g.target.value))},f=t!==void 0,h=l.useMemo(()=>$te(o),[o]),p=!!((m=u==null?void 0:u.table)!=null&&m.readonly);return y.createElement(Mte,{"aria-readonly":p},y.createElement(tS,null,n),y.createElement(Ote,{id:Et(e),type:"range",disabled:p,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(Lte,{numberOFDecimalsPlaces:h,max:a},f?t.toFixed(h):"--"," / ",a))},Nte=_.label({display:"flex"}),jte=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),Hte=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var m;let s=g=>{r(g.target.value)},u=!!((m=i==null?void 0:i.table)!=null&&m.readonly),[d,f]=l.useState(!1),h=l.useCallback(()=>{r(""),f(!0)},[f]);if(t===void 0)return y.createElement(In,{variant:"outline",size:"medium",disabled:u,id:Ns(e),onClick:h},"Set string");let p=typeof t=="string";return y.createElement(Nte,null,y.createElement(Ti.Textarea,{id:Et(e),maxLength:o,onChange:s,disabled:u,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:p?null:"error",name:e,value:p?t:"",onFocus:n,onBlur:a}),o&&y.createElement(jte,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},Vte=_(Ti.Input)({padding:10});function Ute(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var qte=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var u;let o=l.useRef(null),i=(u=a==null?void 0:a.control)==null?void 0:u.readOnly;function s(d){if(!d.target.files)return;let f=Array.from(d.target.files).map(h=>URL.createObjectURL(h));e(f),Ute(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(Vte,{ref:o,id:Et(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},Wte=l.lazy(()=>$3(()=>import("./Color-ERTF36HU-B3LPFtYd.js"),__vite__mapDeps([8,2,1,3,4,5,6,7]),import.meta.url)),Gte=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(Wte,{...e})),Kte={array:R3,object:R3,boolean:jee,color:Gte,date:Gee,number:Jee,check:qn,"inline-check":qn,radio:qn,"inline-radio":qn,select:qn,"multi-select":qn,range:Pte,text:Hte,file:qte},B3=()=>y.createElement(y.Fragment,null,"-"),Yte=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var v;let{key:a,control:o}=e,[i,s]=l.useState(!1),[u,d]=l.useState({value:t});l.useEffect(()=>{i||d({value:t})},[i,t]);let f=l.useCallback(b=>(d({value:b}),r({[a]:b}),b),[r,a]),h=l.useCallback(()=>s(!1),[]),p=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let b=(o==null?void 0:o.disable)!==!0&&((v=e==null?void 0:e.type)==null?void 0:v.name)!=="function";return n&&b?y.createElement(da,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement(B3,null)}let m={name:a,argType:e,value:u.value,onChange:f,onBlur:h,onFocus:p},g=Kte[o.type]||B3;return y.createElement(g,{...m,...o,controlType:o.type})},Zte=_.table(({theme:e})=>({"&&":{borderCollapse:"collapse",borderSpacing:0,border:"none",tr:{border:"none !important",background:"none"},"td, th":{padding:0,border:"none",width:"auto!important"},marginTop:0,marginBottom:0,"th:first-of-type, td:first-of-type":{paddingLeft:0},"th:last-of-type, td:last-of-type":{paddingRight:0},td:{paddingTop:0,paddingBottom:4,"&:not(:first-of-type)":{paddingLeft:10,paddingRight:0}},tbody:{boxShadow:"none",border:"none"},code:jr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),Jte=({tags:e})=>{let t=(e.params||[]).filter(o=>o.description),r=t.length!==0,n=e.deprecated!=null,a=e.returns!=null&&e.returns.description!=null;return!r&&!a&&!n?null:y.createElement(y.Fragment,null,y.createElement(Zte,null,y.createElement("tbody",null,n&&y.createElement("tr",{key:"deprecated"},y.createElement("td",{colSpan:2},y.createElement("strong",null,"Deprecated"),": ",e.deprecated.toString())),r&&t.map(o=>y.createElement("tr",{key:o.name},y.createElement("td",null,y.createElement("code",null,o.name)),y.createElement("td",null,o.description))),a&&y.createElement("tr",{key:"returns"},y.createElement("td",null,y.createElement("code",null,"Returns")),y.createElement("td",null,e.returns.description)))))},Bp=8,z3=_.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),Xte=_.span(jr,({theme:e,simple:t=!1})=>({flex:"0 0 auto",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,wordBreak:"break-word",whiteSpace:"normal",maxWidth:"100%",margin:0,marginRight:"4px",marginBottom:"4px",paddingTop:"2px",paddingBottom:"2px",lineHeight:"13px",...t&&{background:"transparent",border:"0 none",paddingLeft:0}})),Qte=_.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),ere=_.div(jr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),tre=_.div(({theme:e,width:t})=>({width:t,minWidth:200,maxWidth:800,padding:15,fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,boxSizing:"content-box","& code":{padding:"0 !important"}})),rre=_(f$)({marginLeft:4}),nre=_(AC)({marginLeft:4}),are=()=>y.createElement("span",null,"-"),rS=({text:e,simple:t})=>y.createElement(Xte,{simple:t},e),ore=_D(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),ire=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return OJ(t)},O3=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,Bp)),r.map(n=>y.createElement(rS,{key:n,text:n===""?'""':n}))},lre=({value:e,initialExpandedArgs:t})=>{let{summary:r,detail:n}=e,[a,o]=l.useState(!1),[i,s]=l.useState(t||!1);if(r==null)return null;let u=typeof r.toString=="function"?r.toString():r;if(n==null){if(/[(){}[\]<>]/.test(u))return y.createElement(rS,{text:u});let d=ire(u),f=d.length;return f>Bp?y.createElement(z3,{isExpanded:i},O3(d,i),y.createElement(Qte,{onClick:()=>s(!i)},i?"Show less...":`Show ${f-Bp} more...`)):y.createElement(z3,null,O3(d))}return y.createElement(SL,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(tre,{width:ore(n)},y.createElement(Ih,{language:"jsx",format:!1},n))},y.createElement(ere,{className:"sbdocs-expandable"},y.createElement("span",null,u),a?y.createElement(rre,null):y.createElement(nre,null)))},zd=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(are,null):y.createElement(lre,{value:e,initialExpandedArgs:t}),sre=_.span({fontWeight:"bold"}),ure=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),cre=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...jr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),dre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?4:0})),pre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),fre=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),hre=e=>e&&{summary:typeof e=="string"?e:e.name},vl=e=>{var v;let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:u,description:d}=n,f=n.table||{},h=f.type||hre(n.type),p=f.defaultValue||n.defaultValue,m=(v=n.type)==null?void 0:v.required,g=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(fre,{expandable:i},y.createElement(sre,null,u),m?y.createElement(ure,{title:"Required"},"*"):null),o?null:y.createElement("td",null,g&&y.createElement(cre,null,y.createElement(CD,null,d)),f.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(pre,{hasDescription:g},y.createElement(zd,{value:h,initialExpandedArgs:s})),y.createElement(Jte,{tags:f.jsDocTags})):y.createElement(dre,{hasDescription:g},y.createElement(zd,{value:h,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(zd,{value:p,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(Yte,{...e,isHovered:t})):null)},mre=_.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),gre=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),vre=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),yre=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(mre,{inAddonPanel:e},y.createElement(gC,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:y.createElement(y.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:y.createElement(gre,null,e&&y.createElement(y.Fragment,null,y.createElement(da,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(l$,null)," Watch 5m video"),y.createElement(vre,null),y.createElement(da,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(xp,null)," Read docs")),!e&&y.createElement(da,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(xp,null)," Learn how to set that up"))}))},bre=_(d$)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),wre=_(p$)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),Ere=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),xre=_.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),Cre=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),Dre=_.td(()=>({position:"relative"})),Sre=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${tn(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),L3=_.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Od=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=l.useState(n),s=e==="subsection"?Cre:xre,u=(r==null?void 0:r.length)||0,d=e==="subsection"?`${u} item${u!==1?"s":""}`:"",f=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement(Sre,{title:f},y.createElement(s,{colSpan:1},y.createElement(L3,{onClick:h=>i(!o),tabIndex:0},f),y.createElement(Ere,null,o?y.createElement(bre,null):y.createElement(wre,null),t)),y.createElement(Dre,{colSpan:a-1},y.createElement(L3,{onClick:h=>i(!o),tabIndex:-1,style:{outline:"none"}},f),o?null:d)),o?r:null)},yl=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ie=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ye=_.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Te=[2,4,2,2],Are=()=>y.createElement(y.Fragment,null,y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"})))),kre=_.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?se(.25,e.color.defaultText):se(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),_re=_(hn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),Fre=_.span({display:"flex",justifyContent:"space-between"}),Ire={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},Tre=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:u}=(i==null?void 0:i.table)||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)d.ungrouped.push({key:o,...i});else{let f=d.subsections[u]||[];f.push({key:o,...i}),d.subsections[u]=f}r.sections[s]=d}else if(u){let d=r.ungroupedSubsections[u]||[];d.push({key:o,...i}),r.ungroupedSubsections[u]=d}else r.ungrouped.push({key:o,...i})});let n=Ire[t],a=o=>n?Object.keys(o).reduce((i,s)=>({...i,[s]:o[s].sort(n)}),{}):o;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((o,i)=>({...o,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},Rre=(e,t,r)=>{try{return fS(e,t,r)}catch(n){return ree.warn(n.message),!1}},zp=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:i="none",isLoading:s}=e;if("error"in e){let{error:E}=e;return y.createElement(PD,null,E," ",y.createElement(da,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(xp,null)," Read the docs"))}if(s)return y.createElement(Are,null);let{rows:u,args:d,globals:f}="rows"in e&&e,h=Tre(pG(u,E=>{var C;return!((C=E==null?void 0:E.table)!=null&&C.disable)&&Rre(E,d||{},f||{})}),i),p=h.ungrouped.length===0,m=Object.entries(h.sections).length===0,g=Object.entries(h.ungroupedSubsections).length===0;if(p&&m&&g)return y.createElement(yre,{inAddonPanel:a});let v=1;t&&(v+=1),n||(v+=2);let b=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(Fh,null,y.createElement(kre,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},y.createElement("thead",{className:"docblock-argstable-head"},y.createElement("tr",null,y.createElement("th",null,y.createElement("span",null,"Name")),n?null:y.createElement("th",null,y.createElement("span",null,"Description")),n?null:y.createElement("th",null,y.createElement("span",null,"Default")),t?y.createElement("th",null,y.createElement(Fre,null,"Control"," ",!s&&r&&y.createElement(_re,{onClick:()=>r(),title:"Reset controls"},y.createElement(h$,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(E=>y.createElement(vl,{key:E.key,row:E,arg:d&&d[E.key],...x})),Object.entries(h.ungroupedSubsections).map(([E,C])=>y.createElement(Od,{key:E,label:E,level:"subsection",colSpan:v},C.map(w=>y.createElement(vl,{key:w.key,row:w,arg:d&&d[w.key],expandable:b,...x})))),Object.entries(h.sections).map(([E,C])=>y.createElement(Od,{key:E,label:E,level:"section",colSpan:v},C.ungrouped.map(w=>y.createElement(vl,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(C.subsections).map(([w,D])=>y.createElement(Od,{key:w,label:w,level:"subsection",colSpan:v},D.map(S=>y.createElement(vl,{key:S.key,row:S,arg:d&&d[S.key],expandable:b,...x})))))))))},Bre=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(zp,{...r[0][1],...t}):y.createElement(lM,null,r.map((n,a)=>{let[o,i]=n,s=`prop_table_div_${o}`,u="div",d=a===0?t:{sort:t.sort};return y.createElement(u,{key:s,id:s,title:o},({active:f})=>f?y.createElement(zp,{key:`prop_table_${o}`,...i,...d}):null)}))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(de,({theme:e})=>({...Ju(e),margin:"25px 0 40px",padding:"30px 20px"}));_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));_.div(({theme:e})=>({color:e.base==="light"?se(.2,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});_.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));_.div({display:"flex",flexDirection:"row"});_.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));_.div(({theme:e})=>({...Ju(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));_.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});_.div({flex:1,display:"flex",flexDirection:"row"});_.div({display:"flex",alignItems:"flex-start"});_.div({flex:"0 0 30%"});_.div({flex:1});_.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));var zre=_.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2})),Ore=_.div(({theme:e})=>({...Ju(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}})),Lre=_.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"}),Mre=_.div({display:"flex",flexFlow:"row wrap"}),cae=({name:e,children:t})=>y.createElement(Lre,null,y.createElement(Ore,null,t),y.createElement(zre,null,e)),dae=({children:e,...t})=>y.createElement(Fh,null,y.createElement(Mre,{...t,className:"docblock-icongallery sb-unstyled"},e)),$re=e=>`anchor--${e}`,nS=({storyId:e,children:t})=>y.createElement("div",{id:$re(e),className:"sb-anchor"},t);et&&et.__DOCS_CONTEXT__===void 0&&(et.__DOCS_CONTEXT__=l.createContext(null),et.__DOCS_CONTEXT__.displayName="DocsContext");var St=et?et.__DOCS_CONTEXT__:l.createContext(null),zn=(e,t)=>l.useContext(St).resolveOf(e,t),Pre=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),Nre=e=>{if(e)return typeof e=="string"?e.includes("-")?Pre(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function jre(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function aS(e){return eee(e,{allowFunction:!1})}var oS=l.createContext({sources:{}}),iS="--unknown--",Hre=({children:e,channel:t})=>{let[r,n]=l.useState({});return l.useEffect(()=>{let a=(o,i=null,s=!1)=>{let{id:u,args:d=void 0,source:f,format:h}=typeof o=="string"?{id:o,source:i,format:s}:o,p=d?aS(d):iS;n(m=>({...m,[u]:{...m[u],[p]:{code:f,format:h}}}))};return t.on(Em,a),()=>t.off(Em,a)},[]),y.createElement(oS.Provider,{value:{sources:r}},e)},Vre=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[aS(t)])||(a==null?void 0:a[iS])||{code:""}},Ure=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var u,d;let{__isArgsStory:a}=t.parameters,o=((u=t.parameters.docs)==null?void 0:u.source)||{},i=r||o.type||tc.AUTO;if(o.code!==void 0)return o.code;let s=i===tc.DYNAMIC||i===tc.AUTO&&e&&a?e:o.originalSource||"";return((d=n??o.transform)==null?void 0:d(s,t))||s},qre=(e,t,r)=>{var m,g,v,b;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let o=((g=(m=n==null?void 0:n.parameters)==null?void 0:m.docs)==null?void 0:g.source)||{},{code:i}=e,s=e.format??o.format,u=e.language??o.language??"jsx",d=e.dark??o.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:s,language:u,dark:d};let f=t.getStoryContext(n),h=e.__forceInitialArgs?f.initialArgs:f.unmappedArgs,p=Vre(n.id,h,r);return s=p.format??((b=(v=n.parameters.docs)==null?void 0:v.source)==null?void 0:b.format)??!1,{code:Ure({snippet:p.code,storyContext:{...f,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:s,language:u,dark:d}};function Wre(e,t){let r=Gre([e],t);return r&&r[0]}function Gre(e,t){let[r,n]=l.useState({});return l.useEffect(()=>{Promise.all(e.map(async a=>{let o=await t.loadStory(a);n(i=>i[a]===o?i:{...i,[a]:o})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var Kre=(e,t)=>{let{of:r,meta:n}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return n&&t.referenceMeta(n,!1),t.resolveOf(r||"story",["story"]).story.id},Yre=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,o=a.story||{};if(a.disable)return null;if(e.inline??o.inline??!1){let s=e.height??o.height,u=e.autoplay??o.autoplay??!1;return{story:t,inline:!0,height:s,autoplay:u,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??o.height??o.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},Zre=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=l.useContext(St),r=Kre(e,t),n=Wre(r,t);if(!n)return y.createElement(HD,null);let a=Yre(e,n,t);return a?y.createElement(_ee,{...a}):null},Jre=e=>{var p,m,g,v,b,x,E,C,w,D;let t=l.useContext(St),r=l.useContext(oS),{of:n,source:a}=e;if("of"in e&&n===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story:o}=zn(n||"story",["story"]),i=qre({...a,...n&&{of:n}},t,r),s=e.layout??o.parameters.layout??((m=(p=o.parameters.docs)==null?void 0:p.canvas)==null?void 0:m.layout)??"padded",u=e.withToolbar??((v=(g=o.parameters.docs)==null?void 0:g.canvas)==null?void 0:v.withToolbar)??!1,d=e.additionalActions??((x=(b=o.parameters.docs)==null?void 0:b.canvas)==null?void 0:x.additionalActions),f=e.sourceState??((C=(E=o.parameters.docs)==null?void 0:E.canvas)==null?void 0:C.sourceState)??"hidden",h=e.className??((D=(w=o.parameters.docs)==null?void 0:w.canvas)==null?void 0:D.className);return y.createElement(VD,{withSource:f==="none"?void 0:i,isExpanded:f==="shown",withToolbar:u,additionalActions:d,className:h,layout:s},y.createElement(Zre,{of:n||o.moduleExport,meta:e.meta,...e.story}))},Xre=(e,t)=>{let r=Qre(e,t);if(!r)throw new Error("No result when story was defined");return r},Qre=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,o]=l.useState(r.args);l.useEffect(()=>{let u=d=>{d.storyId===n&&o(d.args)};return t.channel.on(C3,u),()=>t.channel.off(C3,u)},[n,t.channel]);let i=l.useCallback(u=>t.channel.emit(nee,{storyId:n,updatedArgs:u}),[n,t.channel]),s=l.useCallback(u=>t.channel.emit(aee,{storyId:n,argNames:u}),[n,t.channel]);return e&&[a,i,s]},ene=(e,t)=>{let r=t.getStoryContext(e),[n,a]=l.useState(r.globals);return l.useEffect(()=>{let o=i=>{a(i.globals)};return t.channel.on(D3,o),()=>t.channel.off(D3,o)},[t.channel]),[n]};function tne(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var rne=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=l.useContext(St),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:s}=n,u=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??u.include,f=e.exclude??u.exclude,h=e.sort??u.sort,[p,m,g]=Xre(n,r),[v]=ene(n,r),b=x3(o,d,f);if(!(s&&Object.keys(s).length>0))return Object.keys(b).length>0||Object.keys(p).length>0?y.createElement(zp,{rows:b,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g}):null;let x=Nre(i),E=Object.fromEntries(Object.entries(s).map(([D,S])=>[D,{rows:x3(tne(S,a),d,f),sort:h}])),C={[x]:{rows:b,sort:h},...E};return y.createElement(Bre,{tabs:C,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g})},{document:lS}=et,nne=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return y.createElement(Bx,null,t);let n=e&&e.split("-");return y.createElement(ND,{language:n&&n[1]||"text",format:!1,code:t,...r})};function mm(e,t){e.channel.emit(oee,t)}var Op=DM.a,ane=({hash:e,children:t})=>{let r=l.useContext(St);return y.createElement(Op,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);lS.getElementById(a)&&mm(r,e)}},t)},one=e=>{let{href:t,target:r,children:n,...a}=e,o=l.useContext(St);return!t||r==="_blank"||/^https?:\/\//.test(t)?y.createElement(Op,{...e}):t.startsWith("#")?y.createElement(ane,{hash:t},n):y.createElement(Op,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),mm(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},sS=["h1","h2","h3","h4","h5","h6"],ine=sS.reduce((e,t)=>({...e,[t]:_(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),lne=_.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),sne=({as:e,id:t,children:r,...n})=>{let a=l.useContext(St),o=ine[e],i=`#${t}`;return y.createElement(o,{id:t,...n},y.createElement(lne,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:s=>{lS.getElementById(t)&&mm(a,i)}},y.createElement(c$,null)),r)},gm=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return y.createElement(sne,{as:t,id:r,...a},n);let o=t,{as:i,...s}=e;return y.createElement(o,{...ce(s,t)})},une=sS.reduce((e,t)=>({...e,[t]:r=>y.createElement(gm,{as:t,...r})}),{}),cne=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(hS`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' + ${tn(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${sr(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),tS=_.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Lte=_(tS)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),Mte=_.div({display:"flex",alignItems:"center",width:"100%"});function $te(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var Pte=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:s,argType:u})=>{var m;let d=g=>{r(Yee(g.target.value))},f=t!==void 0,h=l.useMemo(()=>$te(o),[o]),p=!!((m=u==null?void 0:u.table)!=null&&m.readonly);return y.createElement(Mte,{"aria-readonly":p},y.createElement(tS,null,n),y.createElement(Ote,{id:Et(e),type:"range",disabled:p,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:i}),y.createElement(Lte,{numberOFDecimalsPlaces:h,max:a},f?t.toFixed(h):"--"," / ",a))},Nte=_.label({display:"flex"}),jte=_.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),Hte=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var m;let s=g=>{r(g.target.value)},u=!!((m=i==null?void 0:i.table)!=null&&m.readonly),[d,f]=l.useState(!1),h=l.useCallback(()=>{r(""),f(!0)},[f]);if(t===void 0)return y.createElement(In,{variant:"outline",size:"medium",disabled:u,id:Ns(e),onClick:h},"Set string");let p=typeof t=="string";return y.createElement(Nte,null,y.createElement(Ti.Textarea,{id:Et(e),maxLength:o,onChange:s,disabled:u,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:p?null:"error",name:e,value:p?t:"",onFocus:n,onBlur:a}),o&&y.createElement(jte,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},Vte=_(Ti.Input)({padding:10});function Ute(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var qte=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var u;let o=l.useRef(null),i=(u=a==null?void 0:a.control)==null?void 0:u.readOnly;function s(d){if(!d.target.files)return;let f=Array.from(d.target.files).map(h=>URL.createObjectURL(h));e(f),Ute(n)}return l.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),y.createElement(Vte,{ref:o,id:Et(t),type:"file",name:t,multiple:!0,disabled:i,onChange:s,accept:r,size:"flex"})},Wte=l.lazy(()=>$3(()=>import("./Color-ERTF36HU-rlRgfIB0.js"),__vite__mapDeps([8,2,1,3,4,5,6,7]),import.meta.url)),Gte=e=>y.createElement(l.Suspense,{fallback:y.createElement("div",null)},y.createElement(Wte,{...e})),Kte={array:R3,object:R3,boolean:jee,color:Gte,date:Gee,number:Jee,check:qn,"inline-check":qn,radio:qn,"inline-radio":qn,select:qn,"multi-select":qn,range:Pte,text:Hte,file:qte},B3=()=>y.createElement(y.Fragment,null,"-"),Yte=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var v;let{key:a,control:o}=e,[i,s]=l.useState(!1),[u,d]=l.useState({value:t});l.useEffect(()=>{i||d({value:t})},[i,t]);let f=l.useCallback(b=>(d({value:b}),r({[a]:b}),b),[r,a]),h=l.useCallback(()=>s(!1),[]),p=l.useCallback(()=>s(!0),[]);if(!o||o.disable){let b=(o==null?void 0:o.disable)!==!0&&((v=e==null?void 0:e.type)==null?void 0:v.name)!=="function";return n&&b?y.createElement(da,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):y.createElement(B3,null)}let m={name:a,argType:e,value:u.value,onChange:f,onBlur:h,onFocus:p},g=Kte[o.type]||B3;return y.createElement(g,{...m,...o,controlType:o.type})},Zte=_.table(({theme:e})=>({"&&":{borderCollapse:"collapse",borderSpacing:0,border:"none",tr:{border:"none !important",background:"none"},"td, th":{padding:0,border:"none",width:"auto!important"},marginTop:0,marginBottom:0,"th:first-of-type, td:first-of-type":{paddingLeft:0},"th:last-of-type, td:last-of-type":{paddingRight:0},td:{paddingTop:0,paddingBottom:4,"&:not(:first-of-type)":{paddingLeft:10,paddingRight:0}},tbody:{boxShadow:"none",border:"none"},code:jr({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),Jte=({tags:e})=>{let t=(e.params||[]).filter(o=>o.description),r=t.length!==0,n=e.deprecated!=null,a=e.returns!=null&&e.returns.description!=null;return!r&&!a&&!n?null:y.createElement(y.Fragment,null,y.createElement(Zte,null,y.createElement("tbody",null,n&&y.createElement("tr",{key:"deprecated"},y.createElement("td",{colSpan:2},y.createElement("strong",null,"Deprecated"),": ",e.deprecated.toString())),r&&t.map(o=>y.createElement("tr",{key:o.name},y.createElement("td",null,y.createElement("code",null,o.name)),y.createElement("td",null,o.description))),a&&y.createElement("tr",{key:"returns"},y.createElement("td",null,y.createElement("code",null,"Returns")),y.createElement("td",null,e.returns.description)))))},Bp=8,z3=_.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),Xte=_.span(jr,({theme:e,simple:t=!1})=>({flex:"0 0 auto",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,wordBreak:"break-word",whiteSpace:"normal",maxWidth:"100%",margin:0,marginRight:"4px",marginBottom:"4px",paddingTop:"2px",paddingBottom:"2px",lineHeight:"13px",...t&&{background:"transparent",border:"0 none",paddingLeft:0}})),Qte=_.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),ere=_.div(jr,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),tre=_.div(({theme:e,width:t})=>({width:t,minWidth:200,maxWidth:800,padding:15,fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,boxSizing:"content-box","& code":{padding:"0 !important"}})),rre=_(f$)({marginLeft:4}),nre=_(AC)({marginLeft:4}),are=()=>y.createElement("span",null,"-"),rS=({text:e,simple:t})=>y.createElement(Xte,{simple:t},e),ore=_D(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),ire=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return OJ(t)},O3=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,Bp)),r.map(n=>y.createElement(rS,{key:n,text:n===""?'""':n}))},lre=({value:e,initialExpandedArgs:t})=>{let{summary:r,detail:n}=e,[a,o]=l.useState(!1),[i,s]=l.useState(t||!1);if(r==null)return null;let u=typeof r.toString=="function"?r.toString():r;if(n==null){if(/[(){}[\]<>]/.test(u))return y.createElement(rS,{text:u});let d=ire(u),f=d.length;return f>Bp?y.createElement(z3,{isExpanded:i},O3(d,i),y.createElement(Qte,{onClick:()=>s(!i)},i?"Show less...":`Show ${f-Bp} more...`)):y.createElement(z3,null,O3(d))}return y.createElement(SL,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:y.createElement(tre,{width:ore(n)},y.createElement(Ih,{language:"jsx",format:!1},n))},y.createElement(ere,{className:"sbdocs-expandable"},y.createElement("span",null,u),a?y.createElement(rre,null):y.createElement(nre,null)))},zd=({value:e,initialExpandedArgs:t})=>e==null?y.createElement(are,null):y.createElement(lre,{value:e,initialExpandedArgs:t}),sre=_.span({fontWeight:"bold"}),ure=_.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),cre=_.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...jr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),dre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?4:0})),pre=_.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?se(.1,e.color.defaultText):se(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),fre=_.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),hre=e=>e&&{summary:typeof e=="string"?e:e.name},vl=e=>{var v;let[t,r]=l.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:s}=e,{name:u,description:d}=n,f=n.table||{},h=f.type||hre(n.type),p=f.defaultValue||n.defaultValue,m=(v=n.type)==null?void 0:v.required,g=d!=null&&d!=="";return y.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},y.createElement(fre,{expandable:i},y.createElement(sre,null,u),m?y.createElement(ure,{title:"Required"},"*"):null),o?null:y.createElement("td",null,g&&y.createElement(cre,null,y.createElement(CD,null,d)),f.jsDocTags!=null?y.createElement(y.Fragment,null,y.createElement(pre,{hasDescription:g},y.createElement(zd,{value:h,initialExpandedArgs:s})),y.createElement(Jte,{tags:f.jsDocTags})):y.createElement(dre,{hasDescription:g},y.createElement(zd,{value:h,initialExpandedArgs:s}))),o?null:y.createElement("td",null,y.createElement(zd,{value:p,initialExpandedArgs:s})),a?y.createElement("td",null,y.createElement(Yte,{...e,isHovered:t})):null)},mre=_.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),gre=_.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),vre=_.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),yre=({inAddonPanel:e})=>{let[t,r]=l.useState(!0);return l.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:y.createElement(mre,{inAddonPanel:e},y.createElement(gC,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:y.createElement(y.Fragment,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically."),footer:y.createElement(gre,null,e&&y.createElement(y.Fragment,null,y.createElement(da,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},y.createElement(l$,null)," Watch 5m video"),y.createElement(vre,null),y.createElement(da,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(xp,null)," Read docs")),!e&&y.createElement(da,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},y.createElement(xp,null)," Learn how to set that up"))}))},bre=_(d$)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),wre=_(p$)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?se(.25,e.color.defaultText):se(.3,e.color.defaultText),border:"none",display:"inline-block"})),Ere=_.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),xre=_.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),Cre=_.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),Dre=_.td(()=>({position:"relative"})),Sre=_.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${tn(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),L3=_.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Od=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=l.useState(n),s=e==="subsection"?Cre:xre,u=(r==null?void 0:r.length)||0,d=e==="subsection"?`${u} item${u!==1?"s":""}`:"",f=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return y.createElement(y.Fragment,null,y.createElement(Sre,{title:f},y.createElement(s,{colSpan:1},y.createElement(L3,{onClick:h=>i(!o),tabIndex:0},f),y.createElement(Ere,null,o?y.createElement(bre,null):y.createElement(wre,null),t)),y.createElement(Dre,{colSpan:a-1},y.createElement(L3,{onClick:h=>i(!o),tabIndex:-1,style:{outline:"none"}},f),o?null:d)),o?r:null)},yl=_.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ie=_.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),ye=_.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Te=[2,4,2,2],Are=()=>y.createElement(y.Fragment,null,y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"}))),y.createElement(yl,null,y.createElement(Ie,{numColumn:Te[0]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[1]},y.createElement(ye,{width:"80%"}),y.createElement(ye,{width:"30%"})),y.createElement(Ie,{numColumn:Te[2]},y.createElement(ye,{width:"60%"})),y.createElement(Ie,{numColumn:Te[3]},y.createElement(ye,{width:"60%"})))),kre=_.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?se(.25,e.color.defaultText):se(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),_re=_(hn)(({theme:e})=>({margin:"-4px -12px -4px 0"})),Fre=_.span({display:"flex",justifyContent:"space-between"}),Ire={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},Tre=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:s,subcategory:u}=(i==null?void 0:i.table)||{};if(s){let d=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)d.ungrouped.push({key:o,...i});else{let f=d.subsections[u]||[];f.push({key:o,...i}),d.subsections[u]=f}r.sections[s]=d}else if(u){let d=r.ungroupedSubsections[u]||[];d.push({key:o,...i}),r.ungroupedSubsections[u]=d}else r.ungrouped.push({key:o,...i})});let n=Ire[t],a=o=>n?Object.keys(o).reduce((i,s)=>({...i,[s]:o[s].sort(n)}),{}):o;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((o,i)=>({...o,[i]:{ungrouped:r.sections[i].ungrouped.sort(n),subsections:a(r.sections[i].subsections)}}),{})}},Rre=(e,t,r)=>{try{return fS(e,t,r)}catch(n){return ree.warn(n.message),!1}},zp=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:i="none",isLoading:s}=e;if("error"in e){let{error:E}=e;return y.createElement(PD,null,E," ",y.createElement(da,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},y.createElement(xp,null)," Read the docs"))}if(s)return y.createElement(Are,null);let{rows:u,args:d,globals:f}="rows"in e&&e,h=Tre(pG(u,E=>{var C;return!((C=E==null?void 0:E.table)!=null&&C.disable)&&Rre(E,d||{},f||{})}),i),p=h.ungrouped.length===0,m=Object.entries(h.sections).length===0,g=Object.entries(h.ungroupedSubsections).length===0;if(p&&m&&g)return y.createElement(yre,{inAddonPanel:a});let v=1;t&&(v+=1),n||(v+=2);let b=Object.keys(h.sections).length>0,x={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return y.createElement(Fh,null,y.createElement(kre,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},y.createElement("thead",{className:"docblock-argstable-head"},y.createElement("tr",null,y.createElement("th",null,y.createElement("span",null,"Name")),n?null:y.createElement("th",null,y.createElement("span",null,"Description")),n?null:y.createElement("th",null,y.createElement("span",null,"Default")),t?y.createElement("th",null,y.createElement(Fre,null,"Control"," ",!s&&r&&y.createElement(_re,{onClick:()=>r(),title:"Reset controls"},y.createElement(h$,{"aria-hidden":!0})))):null)),y.createElement("tbody",{className:"docblock-argstable-body"},h.ungrouped.map(E=>y.createElement(vl,{key:E.key,row:E,arg:d&&d[E.key],...x})),Object.entries(h.ungroupedSubsections).map(([E,C])=>y.createElement(Od,{key:E,label:E,level:"subsection",colSpan:v},C.map(w=>y.createElement(vl,{key:w.key,row:w,arg:d&&d[w.key],expandable:b,...x})))),Object.entries(h.sections).map(([E,C])=>y.createElement(Od,{key:E,label:E,level:"section",colSpan:v},C.ungrouped.map(w=>y.createElement(vl,{key:w.key,row:w,arg:d&&d[w.key],...x})),Object.entries(C.subsections).map(([w,D])=>y.createElement(Od,{key:w,label:w,level:"subsection",colSpan:v},D.map(S=>y.createElement(vl,{key:S.key,row:S,arg:d&&d[S.key],expandable:b,...x})))))))))},Bre=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?y.createElement(zp,{...r[0][1],...t}):y.createElement(lM,null,r.map((n,a)=>{let[o,i]=n,s=`prop_table_div_${o}`,u="div",d=a===0?t:{sort:t.sort};return y.createElement(u,{key:s,id:s,title:o},({active:f})=>f?y.createElement(zp,{key:`prop_table_${o}`,...i,...d}):null)}))};_.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});_.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});_.div(de,({theme:e})=>({...Ju(e),margin:"25px 0 40px",padding:"30px 20px"}));_.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));_.div(({theme:e})=>({color:e.base==="light"?se(.2,e.color.defaultText):se(.6,e.color.defaultText)}));_.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});_.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));_.div({display:"flex",flexDirection:"row"});_.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));_.div(({theme:e})=>({...Ju(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));_.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});_.div({flex:1,display:"flex",flexDirection:"row"});_.div({display:"flex",alignItems:"flex-start"});_.div({flex:"0 0 30%"});_.div({flex:1});_.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?se(.4,e.color.defaultText):se(.6,e.color.defaultText)}));_.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));var zre=_.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2})),Ore=_.div(({theme:e})=>({...Ju(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}})),Lre=_.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"}),Mre=_.div({display:"flex",flexFlow:"row wrap"}),cae=({name:e,children:t})=>y.createElement(Lre,null,y.createElement(Ore,null,t),y.createElement(zre,null,e)),dae=({children:e,...t})=>y.createElement(Fh,null,y.createElement(Mre,{...t,className:"docblock-icongallery sb-unstyled"},e)),$re=e=>`anchor--${e}`,nS=({storyId:e,children:t})=>y.createElement("div",{id:$re(e),className:"sb-anchor"},t);et&&et.__DOCS_CONTEXT__===void 0&&(et.__DOCS_CONTEXT__=l.createContext(null),et.__DOCS_CONTEXT__.displayName="DocsContext");var St=et?et.__DOCS_CONTEXT__:l.createContext(null),zn=(e,t)=>l.useContext(St).resolveOf(e,t),Pre=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),Nre=e=>{if(e)return typeof e=="string"?e.includes("-")?Pre(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function jre(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function aS(e){return eee(e,{allowFunction:!1})}var oS=l.createContext({sources:{}}),iS="--unknown--",Hre=({children:e,channel:t})=>{let[r,n]=l.useState({});return l.useEffect(()=>{let a=(o,i=null,s=!1)=>{let{id:u,args:d=void 0,source:f,format:h}=typeof o=="string"?{id:o,source:i,format:s}:o,p=d?aS(d):iS;n(m=>({...m,[u]:{...m[u],[p]:{code:f,format:h}}}))};return t.on(Em,a),()=>t.off(Em,a)},[]),y.createElement(oS.Provider,{value:{sources:r}},e)},Vre=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[aS(t)])||(a==null?void 0:a[iS])||{code:""}},Ure=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var u,d;let{__isArgsStory:a}=t.parameters,o=((u=t.parameters.docs)==null?void 0:u.source)||{},i=r||o.type||tc.AUTO;if(o.code!==void 0)return o.code;let s=i===tc.DYNAMIC||i===tc.AUTO&&e&&a?e:o.originalSource||"";return((d=n??o.transform)==null?void 0:d(s,t))||s},qre=(e,t,r)=>{var m,g,v,b;let n,{of:a}=e;if("of"in e&&a===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");if(a)n=t.resolveOf(a,["story"]).story;else try{n=t.storyById()}catch{}let o=((g=(m=n==null?void 0:n.parameters)==null?void 0:m.docs)==null?void 0:g.source)||{},{code:i}=e,s=e.format??o.format,u=e.language??o.language??"jsx",d=e.dark??o.dark??!1;if(!i&&!n)return{error:"Oh no! The source is not available."};if(i)return{code:i,format:s,language:u,dark:d};let f=t.getStoryContext(n),h=e.__forceInitialArgs?f.initialArgs:f.unmappedArgs,p=Vre(n.id,h,r);return s=p.format??((b=(v=n.parameters.docs)==null?void 0:v.source)==null?void 0:b.format)??!1,{code:Ure({snippet:p.code,storyContext:{...f,args:h},typeFromProps:e.type,transformFromProps:e.transform}),format:s,language:u,dark:d}};function Wre(e,t){let r=Gre([e],t);return r&&r[0]}function Gre(e,t){let[r,n]=l.useState({});return l.useEffect(()=>{Promise.all(e.map(async a=>{let o=await t.loadStory(a);n(i=>i[a]===o?i:{...i,[a]:o})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}var Kre=(e,t)=>{let{of:r,meta:n}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");return n&&t.referenceMeta(n,!1),t.resolveOf(r||"story",["story"]).story.id},Yre=(e,t,r)=>{let{parameters:n={}}=t||{},{docs:a={}}=n,o=a.story||{};if(a.disable)return null;if(e.inline??o.inline??!1){let s=e.height??o.height,u=e.autoplay??o.autoplay??!1;return{story:t,inline:!0,height:s,autoplay:u,forceInitialArgs:!!e.__forceInitialArgs,primary:!!e.__primary,renderStoryToElement:r.renderStoryToElement}}let i=e.height??o.height??o.iframeHeight??"100px";return{story:t,inline:!1,height:i,primary:!!e.__primary}},Zre=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=l.useContext(St),r=Kre(e,t),n=Wre(r,t);if(!n)return y.createElement(HD,null);let a=Yre(e,n,t);return a?y.createElement(_ee,{...a}):null},Jre=e=>{var p,m,g,v,b,x,E,C,w,D;let t=l.useContext(St),r=l.useContext(oS),{of:n,source:a}=e;if("of"in e&&n===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let{story:o}=zn(n||"story",["story"]),i=qre({...a,...n&&{of:n}},t,r),s=e.layout??o.parameters.layout??((m=(p=o.parameters.docs)==null?void 0:p.canvas)==null?void 0:m.layout)??"padded",u=e.withToolbar??((v=(g=o.parameters.docs)==null?void 0:g.canvas)==null?void 0:v.withToolbar)??!1,d=e.additionalActions??((x=(b=o.parameters.docs)==null?void 0:b.canvas)==null?void 0:x.additionalActions),f=e.sourceState??((C=(E=o.parameters.docs)==null?void 0:E.canvas)==null?void 0:C.sourceState)??"hidden",h=e.className??((D=(w=o.parameters.docs)==null?void 0:w.canvas)==null?void 0:D.className);return y.createElement(VD,{withSource:f==="none"?void 0:i,isExpanded:f==="shown",withToolbar:u,additionalActions:d,className:h,layout:s},y.createElement(Zre,{of:n||o.moduleExport,meta:e.meta,...e.story}))},Xre=(e,t)=>{let r=Qre(e,t);if(!r)throw new Error("No result when story was defined");return r},Qre=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,o]=l.useState(r.args);l.useEffect(()=>{let u=d=>{d.storyId===n&&o(d.args)};return t.channel.on(C3,u),()=>t.channel.off(C3,u)},[n,t.channel]);let i=l.useCallback(u=>t.channel.emit(nee,{storyId:n,updatedArgs:u}),[n,t.channel]),s=l.useCallback(u=>t.channel.emit(aee,{storyId:n,argNames:u}),[n,t.channel]);return e&&[a,i,s]},ene=(e,t)=>{let r=t.getStoryContext(e),[n,a]=l.useState(r.globals);return l.useEffect(()=>{let o=i=>{a(i.globals)};return t.channel.on(D3,o),()=>t.channel.off(D3,o)},[t.channel]),[n]};function tne(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var rne=e=>{var w;let{of:t}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let r=l.useContext(St),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:s}=n,u=((w=a.docs)==null?void 0:w.controls)||{},d=e.include??u.include,f=e.exclude??u.exclude,h=e.sort??u.sort,[p,m,g]=Xre(n,r),[v]=ene(n,r),b=x3(o,d,f);if(!(s&&Object.keys(s).length>0))return Object.keys(b).length>0||Object.keys(p).length>0?y.createElement(zp,{rows:b,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g}):null;let x=Nre(i),E=Object.fromEntries(Object.entries(s).map(([D,S])=>[D,{rows:x3(tne(S,a),d,f),sort:h}])),C={[x]:{rows:b,sort:h},...E};return y.createElement(Bre,{tabs:C,sort:h,args:p,globals:v,updateArgs:m,resetArgs:g})},{document:lS}=et,nne=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return y.createElement(Bx,null,t);let n=e&&e.split("-");return y.createElement(ND,{language:n&&n[1]||"text",format:!1,code:t,...r})};function mm(e,t){e.channel.emit(oee,t)}var Op=DM.a,ane=({hash:e,children:t})=>{let r=l.useContext(St);return y.createElement(Op,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);lS.getElementById(a)&&mm(r,e)}},t)},one=e=>{let{href:t,target:r,children:n,...a}=e,o=l.useContext(St);return!t||r==="_blank"||/^https?:\/\//.test(t)?y.createElement(Op,{...e}):t.startsWith("#")?y.createElement(ane,{hash:t},n):y.createElement(Op,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),mm(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},sS=["h1","h2","h3","h4","h5","h6"],ine=sS.reduce((e,t)=>({...e,[t]:_(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),lne=_.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),sne=({as:e,id:t,children:r,...n})=>{let a=l.useContext(St),o=ine[e],i=`#${t}`;return y.createElement(o,{id:t,...n},y.createElement(lne,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:s=>{lS.getElementById(t)&&mm(a,i)}},y.createElement(c$,null)),r)},gm=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return y.createElement(sne,{as:t,id:r,...a},n);let o=t,{as:i,...s}=e;return y.createElement(o,{...ce(s,t)})},une=sS.reduce((e,t)=>({...e,[t]:r=>y.createElement(gm,{as:t,...r})}),{}),cne=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(hS`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' This is often caused by not wrapping the child in a template string. This is invalid: diff --git a/assets/index-BwmOyQc7.js b/assets/index-VyeKKq5j.js similarity index 96% rename from assets/index-BwmOyQc7.js rename to assets/index-VyeKKq5j.js index 78ee5838..67f5df61 100644 --- a/assets/index-BwmOyQc7.js +++ b/assets/index-VyeKKq5j.js @@ -1 +1 @@ -import{m as l,a as c,V as T,K as b,P as d,g as S,L as B,b as L,v as C,w as H,c as u,y as g,$ as y,d as I,e as h,H as k,f as P,D as W,x as A,C as F,E as x,S as D,R,I as f,h as v,i as E,A as M,F as N,j as q,k as w,s as O,N as U,l as Z,T as j,Z as z,n as G,o as J,p as K,W as Q,U as V,q as X,Q as Y,J as _,r as $,t as aa,B as sa,u as oa,z as ta,M as ea,G as ra,O as pa,X as ia,Y as na,_ as ma,a0 as la,a1 as ca,a2 as Ta,a3 as ba,a4 as da,a5 as Sa,a6 as Ba,a7 as La,a8 as Ca,a9 as Ha,aa as ua,ab as ga,ac as ya,ad as Ia}from"./index-D4CCEPie.js";import"./iframe-B1Sidt8M.js";import"../sb-preview/runtime.js";import"./index-0d5eMwbi.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";export{l as A,c as ActionBar,T as AddonPanel,b as Badge,d as Bar,S as Blockquote,B as Button,L as ClipboardCode,C as Code,H as DL,u as Div,g as DocumentWrapper,y as EmptyTabContent,I as ErrorFormatter,h as FlexBar,k as Form,P as H1,W as H2,A as H3,F as H4,x as H5,D as H6,R as HR,f as IconButton,v as IconButtonSkeleton,E as Icons,M as Img,N as LI,q as Link,w as ListItem,O as Loader,U as Modal,Z as OL,j as P,z as Placeholder,G as Pre,J as ResetWrapper,K as ScrollArea,Q as Separator,V as Spaced,X as Span,Y as StorybookIcon,_ as StorybookLogo,$ as Symbols,aa as SyntaxHighlighter,sa as TT,oa as TabBar,ta as TabButton,ea as TabWrapper,ra as Table,pa as Tabs,ia as TabsState,na as TooltipLinkList,ma as TooltipMessage,la as TooltipNote,ca as UL,Ta as WithTooltip,ba as WithTooltipPure,da as Zoom,Sa as codeCommon,Ba as components,La as createCopyToClipboardFunction,Ca as getStoryHref,Ha as icons,ua as interleaveSeparators,ga as nameSpaceClassNames,ya as resetComponents,Ia as withReset}; +import{m as l,a as c,V as T,K as b,P as d,g as S,L as B,b as L,v as C,w as H,c as u,y as g,$ as y,d as I,e as h,H as k,f as P,D as W,x as A,C as F,E as x,S as D,R,I as f,h as v,i as E,A as M,F as N,j as q,k as w,s as O,N as U,l as Z,T as j,Z as z,n as G,o as J,p as K,W as Q,U as V,q as X,Q as Y,J as _,r as $,t as aa,B as sa,u as oa,z as ta,M as ea,G as ra,O as pa,X as ia,Y as na,_ as ma,a0 as la,a1 as ca,a2 as Ta,a3 as ba,a4 as da,a5 as Sa,a6 as Ba,a7 as La,a8 as Ca,a9 as Ha,aa as ua,ab as ga,ac as ya,ad as Ia}from"./index-D_yKE35a.js";import"./iframe-9T-PF226.js";import"../sb-preview/runtime.js";import"./index-0d5eMwbi.js";import"./jsx-runtime-C798UXYj.js";import"./index-BoyHNU0R.js";import"./index-D-8MO0q_.js";import"./index-CxJhtZoZ.js";import"./index-DrFu-skq.js";export{l as A,c as ActionBar,T as AddonPanel,b as Badge,d as Bar,S as Blockquote,B as Button,L as ClipboardCode,C as Code,H as DL,u as Div,g as DocumentWrapper,y as EmptyTabContent,I as ErrorFormatter,h as FlexBar,k as Form,P as H1,W as H2,A as H3,F as H4,x as H5,D as H6,R as HR,f as IconButton,v as IconButtonSkeleton,E as Icons,M as Img,N as LI,q as Link,w as ListItem,O as Loader,U as Modal,Z as OL,j as P,z as Placeholder,G as Pre,J as ResetWrapper,K as ScrollArea,Q as Separator,V as Spaced,X as Span,Y as StorybookIcon,_ as StorybookLogo,$ as Symbols,aa as SyntaxHighlighter,sa as TT,oa as TabBar,ta as TabButton,ea as TabWrapper,ra as Table,pa as Tabs,ia as TabsState,na as TooltipLinkList,ma as TooltipMessage,la as TooltipNote,ca as UL,Ta as WithTooltip,ba as WithTooltipPure,da as Zoom,Sa as codeCommon,Ba as components,La as createCopyToClipboardFunction,Ca as getStoryHref,Ha as icons,ua as interleaveSeparators,ga as nameSpaceClassNames,ya as resetComponents,Ia as withReset}; diff --git a/assets/index-h1jAayoZ.js b/assets/index-h1jAayoZ.js deleted file mode 100644 index 3b7e7279..00000000 --- a/assets/index-h1jAayoZ.js +++ /dev/null @@ -1,4 +0,0 @@ -import{r as E}from"./index-0d5eMwbi.js";import{r as y}from"./index-BoyHNU0R.js";function x(o,h,e){let s=e.initialDeps??[],t;return()=>{var n,i,r,l;let u;e.key&&((n=e.debug)!=null&&n.call(e))&&(u=Date.now());const c=o();if(!(c.length!==s.length||c.some((g,d)=>s[d]!==g)))return t;s=c;let m;if(e.key&&((i=e.debug)!=null&&i.call(e))&&(m=Date.now()),t=h(...c),e.key&&((r=e.debug)!=null&&r.call(e))){const g=Math.round((Date.now()-u)*100)/100,d=Math.round((Date.now()-m)*100)/100,M=d/16,v=(f,S)=>{for(f=String(f);f.lengthMath.abs(o-h)<1,_=(o,h,e)=>{let s;return function(...t){o.clearTimeout(s),s=o.setTimeout(()=>h.apply(this,t),e)}},R=o=>o,k=o=>{const h=Math.max(o.startIndex-o.overscan,0),e=Math.min(o.endIndex+o.overscan,o.count-1),s=[];for(let t=h;t<=e;t++)s.push(t);return s},D=(o,h)=>{const e=o.scrollElement;if(!e)return;const s=o.targetWindow;if(!s)return;const t=i=>{const{width:r,height:l}=i;h({width:Math.round(r),height:Math.round(l)})};if(t(e.getBoundingClientRect()),!s.ResizeObserver)return()=>{};const n=new s.ResizeObserver(i=>{const r=i[0];if(r!=null&&r.borderBoxSize){const l=r.borderBoxSize[0];if(l){t({width:l.inlineSize,height:l.blockSize});return}}t(e.getBoundingClientRect())});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},w={passive:!0},F=typeof window>"u"?!0:"onscrollend"in window,A=(o,h)=>{const e=o.scrollElement;if(!e)return;const s=o.targetWindow;if(!s)return;let t=0;const n=F?()=>{}:_(s,()=>{h(t,!1)},o.options.isScrollingResetDelay),i=u=>()=>{t=e[o.options.horizontal?"scrollLeft":"scrollTop"],n(),h(t,u)},r=i(!0),l=i(!1);return l(),e.addEventListener("scroll",r,w),e.addEventListener("scrollend",l,w),()=>{e.removeEventListener("scroll",r),e.removeEventListener("scrollend",l)}},W=(o,h,e)=>{if(h!=null&&h.borderBoxSize){const s=h.borderBoxSize[0];if(s)return Math.round(s[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(o.getBoundingClientRect()[e.options.horizontal?"width":"height"])},j=(o,{adjustments:h=0,behavior:e},s)=>{var t,n;const i=o+h;(n=(t=s.scrollElement)==null?void 0:t.scrollTo)==null||n.call(t,{[s.options.horizontal?"left":"top"]:i,behavior:e})};class B{constructor(h){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const s=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(t=>{t.forEach(n=>{this._measureElement(n.target,n)})}));return{disconnect:()=>{var t;return(t=s())==null?void 0:t.disconnect()},observe:t=>{var n;return(n=s())==null?void 0:n.observe(t,{box:"border-box"})},unobserve:t=>{var n;return(n=s())==null?void 0:n.unobserve(t)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([s,t])=>{typeof t>"u"&&delete e[s]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:R,rangeExtractor:k,onChange:()=>{},measureElement:W,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,...e}},this.notify=(e,s)=>{var t,n;const{startIndex:i,endIndex:r}=this.range??{startIndex:void 0,endIndex:void 0},l=this.calculateRange();(e||i!==(l==null?void 0:l.startIndex)||r!==(l==null?void 0:l.endIndex))&&((n=(t=this.options).onChange)==null||n.call(t,this,s))},this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.observer.disconnect(),this.elementsCache.clear()},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const s=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==s){if(this.cleanup(),!s){this.notify(!1,!1);return}this.scrollElement=s,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,t=>{this.scrollRect=t,this.notify(!1,!1)})),this.unsubs.push(this.options.observeElementOffset(this,(t,n)=>{this.scrollAdjustments=0,this.scrollDirection=n?this.getScrollOffset()this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,s)=>{const t=new Map,n=new Map;for(let i=s-1;i>=0;i--){const r=e[i];if(t.has(r.lane))continue;const l=n.get(r.lane);if(l==null||r.end>l.end?n.set(r.lane,r):r.endi.end===r.end?i.index-r.index:i.end-r.end)[0]:void 0},this.getMeasurementOptions=x(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,s,t,n,i)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i}),{key:!1}),this.getMeasurements=x(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:s,scrollMargin:t,getItemKey:n,enabled:i},r)=>{var l;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(a=>{this.itemSizeCache.set(a.key,a.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const c=this.measurementsCache.slice(0,u);for(let a=u;a{const I=n(a),b=this.elementsCache.get(I);if(!p){b&&(this.observer.unobserve(b),this.elementsCache.delete(I));return}b!==p&&(b&&this.observer.unobserve(b),this.observer.observe(p),this.elementsCache.set(I,p)),p.isConnected&&this.resizeItem(a,this.options.measureElement(p,void 0,this))});const g=n(a),d=this.options.lanes===1?c[a-1]:this.getFurthestMeasurement(c,a),M=d?d.end+this.options.gap:s+t,v=r.get(g),f=typeof v=="number"?v:this.options.estimateSize(a),S=M+f,C=d?d.lane:a%this.options.lanes;c[a]={index:a,start:M,size:f,end:S,key:g,lane:C,measureElement:m}}return this.measurementsCache=c,c},{key:!1,debug:()=>this.options.debug}),this.calculateRange=x(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset()],(e,s,t)=>this.range=e.length>0&&s>0?P({measurements:e,outerSize:s,scrollOffset:t}):null,{key:!1,debug:()=>this.options.debug}),this.getIndexes=x(()=>[this.options.rangeExtractor,this.calculateRange(),this.options.overscan,this.options.count],(e,s,t,n)=>s===null?[]:e({startIndex:s.startIndex,endIndex:s.endIndex,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{const s=this.options.indexAttribute,t=e.getAttribute(s);return t?parseInt(t,10):(console.warn(`Missing attribute name '${s}={index}' on measured element.`),-1)},this._measureElement=(e,s)=>{const t=this.indexFromElement(e),n=this.getMeasurements()[t];if(!n||!e.isConnected){this.elementsCache.forEach((r,l)=>{r===e&&(this.observer.unobserve(e),this.elementsCache.delete(l))});return}const i=this.elementsCache.get(n.key);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(n.key,e)),this.resizeItem(t,this.options.measureElement(e,s,this))},this.resizeItem=(e,s)=>{const t=this.getMeasurements()[e];if(!t)return;const n=this.itemSizeCache.get(t.key)??t.size,i=s-n;i!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(t,i,this):t.start{e&&this._measureElement(e,void 0)},this.getVirtualItems=x(()=>[this.getIndexes(),this.getMeasurements()],(e,s)=>{const t=[];for(let n=0,i=e.length;nthis.options.debug}),this.getVirtualItemForOffset=e=>{const s=this.getMeasurements();if(s.length!==0)return z(s[O(0,s.length-1,t=>z(s[t]).start,e)])},this.getOffsetForAlignment=(e,s)=>{const t=this.getSize(),n=this.getScrollOffset();s==="auto"&&(e<=n?s="start":e>=n+t?s="end":s="start"),s==="start"?e=e:s==="end"?e=e-t:s==="center"&&(e=e-t/2);const i=this.options.horizontal?"scrollWidth":"scrollHeight",l=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-t;return Math.max(Math.min(l,e),0)},this.getOffsetForIndex=(e,s="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const t=this.getMeasurements()[e];if(!t)return;const n=this.getSize(),i=this.getScrollOffset();if(s==="auto")if(t.end>=i+n-this.options.scrollPaddingEnd)s="end";else if(t.start<=i+this.options.scrollPaddingStart)s="start";else return[i,s];const r=s==="end"?t.end+this.options.scrollPaddingEnd:t.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(r,s),s]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:s="start",behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,s),{adjustments:void 0,behavior:t})},this.scrollToIndex=(e,{align:s="auto",behavior:t}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const n=this.getOffsetForIndex(e,s);if(!n)return;const[i,r]=n;this._scrollToOffset(i,{adjustments:void 0,behavior:t}),t!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[u]=z(this.getOffsetForIndex(e,r));T(u,this.getScrollOffset())||this.scrollToIndex(e,{align:r,behavior:t})}else this.scrollToIndex(e,{align:r,behavior:t})}))},this.scrollBy=(e,{behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:s})},this.getTotalSize=()=>{var e;const s=this.getMeasurements();let t;return s.length===0?t=this.options.paddingStart:t=this.options.lanes===1?((e=s[s.length-1])==null?void 0:e.end)??0:Math.max(...s.slice(-this.options.lanes).map(n=>n.end)),t-this.options.scrollMargin+this.options.paddingEnd},this._scrollToOffset=(e,{adjustments:s,behavior:t})=>{this.options.scrollToFn(e,{behavior:t,adjustments:s},this)},this.measure=()=>{var e,s;this.itemSizeCache=new Map,(s=(e=this.options).onChange)==null||s.call(e,this,!1)},this.setOptions(h)}}const O=(o,h,e,s)=>{for(;o<=h;){const t=(o+h)/2|0,n=e(t);if(ns)h=t-1;else return t}return o>0?o-1:0};function P({measurements:o,outerSize:h,scrollOffset:e}){const s=o.length-1,n=O(0,s,r=>o[r].start,e);let i=n;for(;i({}),{})[1],e={...o,onChange:(t,n)=>{var i;n?y.flushSync(h):h(),(i=o.onChange)==null||i.call(o,t,n)}},[s]=E.useState(()=>new B(e));return s.setOptions(e),E.useEffect(()=>s._didMount(),[]),L(()=>s._willUpdate()),s}function U(o){return V({observeElementRect:D,observeElementOffset:A,scrollToFn:j,...o})}export{U as u}; diff --git a/assets/link.stories-2GyWZWrZ.js b/assets/link.stories-2GyWZWrZ.js deleted file mode 100644 index 2b76ac15..00000000 --- a/assets/link.stories-2GyWZWrZ.js +++ /dev/null @@ -1,19 +0,0 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{R as u}from"./index-0d5eMwbi.js";import{S as _}from"./slot-CyLCZbOE.js";import{c as S}from"./class-names-DnY5YZNL.js";import{S as E,a as V,b as T}from"./zoom-to-fit-icon-DdsCB6de.js";import{h as j}from"./storybook-utils-C5xEhci0.js";const q={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"text-neutral-700 bg-neutral-0 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-800 active:bg-neutral-100 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:border-neutral-300 disabled:bg-neutral-0 fill-neutral-0",minimal:"text-neutral-700 hover:bg-neutral-100 hover:text-neutral-800 active:bg-neutral-200 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:bg-neutral-0 fill-neutral-0",danger:"text-neutral-0 bg-danger-500 hover:bg-danger-500 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-400 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600 disabled:fill-danger-100"},l={primary:"text-neutral-0",secondary:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",minimal:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",danger:"","danger-secondary":""},a=({variant:r="primary",className:k,children:n,LeftIcon:s,RightIcon:t,asChild:L=!1,...N})=>{const I=L?_:"a",c=S("group flex h-8 items-center gap-2 whitespace-nowrap rounded px-4 text-xs font-semibold focus:outline-none disabled:cursor-not-allowed ",q[r],k);return u.isValidElement(n)?u.cloneElement(n,{...n.props,children:e.jsxs(e.Fragment,{children:[s?e.jsx(s,{className:`${l[r]} h-3 w-3`}):null,n.props.children,t?e.jsx(t,{className:`${l[r]} h-3 w-3`}):null]}),className:c}):e.jsx(I,{...N,className:c,children:e.jsxs(e.Fragment,{children:[s?e.jsx(s,{className:`${l[r]} h-3 w-3`}):null,n,t?e.jsx(t,{className:`${l[r]} h-3 w-3`}):null]})})};try{a.displayName="Link",a.__docgenInfo={description:"",displayName:"Link",props:{asChild:{defaultValue:{value:"false"},description:"",name:"asChild",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"danger"'},{value:'"primary"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},RightIcon:{defaultValue:null,description:"",name:"RightIcon",required:!1,type:{name:"ElementType"}}}}}catch{}const g={undefined:void 0,ChatIcon:E,DiagramTreeIcon:V,LockIcon:T},p={description:"Icon component",options:Object.keys(g),mapping:g},W={title:"Link",component:a,args:{children:"Link Label",LeftIcon:void 0,RightIcon:void 0},argTypes:{LeftIcon:p,RightIcon:p,asChild:j}},o={render:r=>e.jsx(a,{href:"https://www.google.de/",...r,asChild:!1,children:r.children})},i={render:r=>e.jsx(a,{...r,asChild:!0,children:e.jsx("a",{href:"https://www.google.de/",children:r.children})})},d={argTypes:{children:j},render:r=>e.jsx(a,{href:"https://www.google.de/",...r,asChild:!1,children:e.jsxs("div",{children:[e.jsx("span",{children:"Nested"}),e.jsx("span",{children:"Elements"})]})})};var m,h,f;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`{ - render: args => - {args.children} - -}`,...(f=(h=o.parameters)==null?void 0:h.docs)==null?void 0:f.source}}};var b,x,y;i.parameters={...i.parameters,docs:{...(b=i.parameters)==null?void 0:b.docs,source:{originalSource:`{ - render: args => - {args.children} - -}`,...(y=(x=i.parameters)==null?void 0:x.docs)==null?void 0:y.source}}};var v,w,C;d.parameters={...d.parameters,docs:{...(v=d.parameters)==null?void 0:v.docs,source:{originalSource:`{ - argTypes: { - children: hiddenArgControl - }, - render: args => -
- Nested - Elements -
- -}`,...(C=(w=d.parameters)==null?void 0:w.docs)==null?void 0:C.source}}};const z=["Default","AsChild","WithChilds"];export{i as AsChild,o as Default,d as WithChilds,z as __namedExportsOrder,W as default}; diff --git a/assets/link.stories-BsuBz4ei.js b/assets/link.stories-BsuBz4ei.js new file mode 100644 index 00000000..be7ecd1a --- /dev/null +++ b/assets/link.stories-BsuBz4ei.js @@ -0,0 +1,19 @@ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{R as u}from"./index-0d5eMwbi.js";import{S as E}from"./slot-CyLCZbOE.js";import{c as _}from"./class-names-DnY5YZNL.js";import{S,a as V,b as T}from"./zoom-to-fit-icon-DdsCB6de.js";import{h as j}from"./storybook-utils-C5xEhci0.js";const q={primary:"bg-primary-500 text-neutral-0 hover:bg-primary-600 active:bg-primary-600 focus:ring-2 focus:ring-primary-200 focus:bg-primary-600 disabled:bg-primary-200 fill-neutral-0",secondary:"text-neutral-700 bg-neutral-0 border border-neutral-400 hover:border-neutral-600 hover:text-neutral-800 active:bg-neutral-100 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:border-neutral-300 disabled:bg-neutral-0 fill-neutral-0",minimal:"text-neutral-700 hover:bg-neutral-100 hover:text-neutral-800 active:bg-neutral-200 focus:ring-2 focus:ring-primary-200 focus:text-neutral-800 disabled:text-neutral-500 disabled:bg-neutral-0 fill-neutral-0",danger:"text-neutral-0 bg-danger-500 hover:bg-danger-500 active:bg-danger-700 focus:ring-2 focus:ring-danger-100 focus:bg-danger-600 disabled:bg-danger-100 fill-neutral-0","danger-secondary":"bg-neutral-0 text-danger-500 border border-danger-400 hover:bg-danger-50 hover:text-danger-600 active:border-danger-700 active:text-danger-700 active:bg-danger-100 focus:ring-2 focus:ring-danger-100 focus:text-danger-600 disabled:border-danger-100 disabled:text-danger-100 disabled:bg-neutral-0 fill-danger-600 disabled:fill-danger-100"},l={primary:"text-neutral-0",secondary:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",minimal:"fill-neutral-600 group-hover:text-neutral-700 group-focus:text-neutral-700 group-disabled:text-neutral-400",danger:"","danger-secondary":""},a=({variant:r="primary",className:k,children:n,LeftIcon:s,RightIcon:t,asChild:L=!1,...N})=>{const I=L?E:"a",c=_("group flex h-8 items-center gap-2 whitespace-nowrap rounded px-4 text-xs font-semibold focus:outline-none disabled:cursor-not-allowed ",q[r],k);return u.isValidElement(n)?u.cloneElement(n,{...n.props,children:e.jsxs(e.Fragment,{children:[s?e.jsx(s,{className:`${l[r]} h-3 w-3`}):null,n.props.children,t?e.jsx(t,{className:`${l[r]} h-3 w-3`}):null]}),className:c}):e.jsx(I,{...N,className:c,children:e.jsxs(e.Fragment,{children:[s?e.jsx(s,{className:`${l[r]} h-3 w-3`}):null,n,t?e.jsx(t,{className:`${l[r]} h-3 w-3`}):null]})})};try{a.displayName="Link",a.__docgenInfo={description:"",displayName:"Link",props:{asChild:{defaultValue:{value:"false"},description:"",name:"asChild",required:!1,type:{name:"boolean"}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},variant:{defaultValue:{value:"primary"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"danger"'},{value:'"primary"'},{value:'"secondary"'},{value:'"minimal"'},{value:'"danger-secondary"'}]}},LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},RightIcon:{defaultValue:null,description:"",name:"RightIcon",required:!1,type:{name:"ElementType"}}}}}catch{}const g={undefined:void 0,ChatIcon:S,DiagramTreeIcon:V,LockIcon:T},p={description:"Icon component",options:Object.keys(g),mapping:g},W={title:"Link",component:a,args:{children:"Link Label",LeftIcon:void 0,RightIcon:void 0},argTypes:{LeftIcon:p,RightIcon:p,asChild:j}},o={render:r=>e.jsx(a,{href:"https://www.google.de/",...r,asChild:!1,children:r.children})},i={render:r=>e.jsx(a,{...r,asChild:!0,children:e.jsx("a",{href:"https://www.google.de/",children:r.children})})},d={argTypes:{children:j},render:r=>e.jsx(a,{href:"https://www.google.de/",...r,asChild:!1,children:e.jsxs("div",{children:[e.jsx("span",{children:"Nested"}),e.jsx("span",{children:"Elements"})]})})};var m,f,h;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`{ + render: args => + {args.children} + +}`,...(h=(f=o.parameters)==null?void 0:f.docs)==null?void 0:h.source}}};var b,x,y;i.parameters={...i.parameters,docs:{...(b=i.parameters)==null?void 0:b.docs,source:{originalSource:`{ + render: args => + {args.children} + +}`,...(y=(x=i.parameters)==null?void 0:x.docs)==null?void 0:y.source}}};var v,w,C;d.parameters={...d.parameters,docs:{...(v=d.parameters)==null?void 0:v.docs,source:{originalSource:`{ + argTypes: { + children: hiddenArgControl + }, + render: args => +
+ Nested + Elements +
+ +}`,...(C=(w=d.parameters)==null?void 0:w.docs)==null?void 0:C.source}}};const z=["Default","AsChild","WithChilds"];export{i as AsChild,o as Default,d as WithChilds,z as __namedExportsOrder,W as default}; diff --git a/assets/listbox.stories-DYhiM9ac.js b/assets/listbox.stories-Buiq_fV8.js similarity index 96% rename from assets/listbox.stories-DYhiM9ac.js rename to assets/listbox.stories-Buiq_fV8.js index a0897e2a..50e8e96b 100644 --- a/assets/listbox.stories-DYhiM9ac.js +++ b/assets/listbox.stories-Buiq_fV8.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{R as L}from"./index-0d5eMwbi.js";import{F as s}from"./form-field-BtJxu7hP.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-Da1HxQE-.js";import"./index-h1jAayoZ.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const Q={title:"Input/Listbox",component:s.Listbox},v=[{id:1,name:"John Lennon",isDead:!0},{id:2,name:"Kenton Towne"},{id:3,name:"Therese Wunsch"},{id:4,name:"Benedict Kessler"},{id:5,name:"Katelyn Rohan"}],B=()=>{const[t,i]=L.useState(null);return e.jsxs(s,{children:[e.jsxs(s.LabelGroup,{children:[e.jsx(s.Label,{htmlFor:"value",children:"Label"}),e.jsx(s.Description,{id:"value-description",children:"Description"})]}),e.jsxs(s.Listbox,{value:t,onChange:i,children:[e.jsx(s.Listbox.Button,{children:e.jsx(s.Listbox.Button.TextValue,{value:(t==null?void 0:t.name)??null,placeholder:"Select..."})}),e.jsx(s.Listbox.Options,{children:v.map(o=>e.jsx(s.Listbox.Option,{value:o,disabled:o.isDead,children:e.jsx(s.Listbox.Option.TextOption,{children:o.name})},o.id))})]})]})},g=({disabled:t})=>{const[i,o]=L.useState(null);return e.jsxs(s,{children:[e.jsxs(s.LabelGroup,{children:[e.jsx(s.Label,{htmlFor:"value",children:"Label"}),e.jsx(s.Description,{id:"value-description",children:"Description"})]}),e.jsxs(s.Listbox,{value:i,onChange:o,children:[e.jsx(s.Listbox.Button,{disabled:t,children:e.jsx(s.Listbox.Button.BadgeValue,{value:(i==null?void 0:i.name)??null,placeholder:"Select …"})}),e.jsx(s.Listbox.Options,{children:v.map(d=>e.jsx(s.Listbox.Option,{value:d,children:e.jsx(s.Listbox.Option.BadgeOption,{children:d.name})},d.id))})]})]})},r={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(B,{})})},a={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(g,{})})},n={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(g,{disabled:!0})})};var l,c,m;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{R as L}from"./index-0d5eMwbi.js";import{F as s}from"./form-field-2xLK_lYH.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-BIezdMmM.js";import"./index-BgfbgFhO.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const Q={title:"Input/Listbox",component:s.Listbox},v=[{id:1,name:"John Lennon",isDead:!0},{id:2,name:"Kenton Towne"},{id:3,name:"Therese Wunsch"},{id:4,name:"Benedict Kessler"},{id:5,name:"Katelyn Rohan"}],B=()=>{const[t,i]=L.useState(null);return e.jsxs(s,{children:[e.jsxs(s.LabelGroup,{children:[e.jsx(s.Label,{htmlFor:"value",children:"Label"}),e.jsx(s.Description,{id:"value-description",children:"Description"})]}),e.jsxs(s.Listbox,{value:t,onChange:i,children:[e.jsx(s.Listbox.Button,{children:e.jsx(s.Listbox.Button.TextValue,{value:(t==null?void 0:t.name)??null,placeholder:"Select..."})}),e.jsx(s.Listbox.Options,{children:v.map(o=>e.jsx(s.Listbox.Option,{value:o,disabled:o.isDead,children:e.jsx(s.Listbox.Option.TextOption,{children:o.name})},o.id))})]})]})},g=({disabled:t})=>{const[i,o]=L.useState(null);return e.jsxs(s,{children:[e.jsxs(s.LabelGroup,{children:[e.jsx(s.Label,{htmlFor:"value",children:"Label"}),e.jsx(s.Description,{id:"value-description",children:"Description"})]}),e.jsxs(s.Listbox,{value:i,onChange:o,children:[e.jsx(s.Listbox.Button,{disabled:t,children:e.jsx(s.Listbox.Button.BadgeValue,{value:(i==null?void 0:i.name)??null,placeholder:"Select …"})}),e.jsx(s.Listbox.Options,{children:v.map(d=>e.jsx(s.Listbox.Option,{value:d,children:e.jsx(s.Listbox.Option.BadgeOption,{children:d.name})},d.id))})]})]})},r={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(B,{})})},a={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(g,{})})},n={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(g,{disabled:!0})})};var l,c,m;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`{ render: () =>
diff --git a/assets/menu-BbZFQK8W.js b/assets/menu-6dEOZWfD.js similarity index 70% rename from assets/menu-BbZFQK8W.js rename to assets/menu-6dEOZWfD.js index e3c4c7d9..8d09e69b 100644 --- a/assets/menu-BbZFQK8W.js +++ b/assets/menu-6dEOZWfD.js @@ -1 +1 @@ -import{j as w}from"./jsx-runtime-C798UXYj.js";import{$ as fe,a as ve,w as Ie,e as ye}from"./use-resolve-button-type-D_6M6Au0.js";import{r as v,R as D}from"./index-0d5eMwbi.js";import{r as O}from"./index-BoyHNU0R.js";import{s as be,F as ge,a as xe,u as he,c as y,f as q}from"./use-text-value-ehRDfXkw.js";import{M as Z,L as N,y as K,o as g,D as k,u as te,W as re,p as Se,n as j,a as Ee}from"./use-sync-refs-DqQDZvJ6.js";import{M as Me,F as _e,y as Pe,x as $e,R as Re,b as we,d as De}from"./floating-ERp4LevH.js";import{y as Ne}from"./use-inert-others-CzqV763I.js";import{R as ke,n as Te,m as Fe,f as Ce,r as Ae}from"./portal-CLj4HHuk.js";import{c as Oe,i as L,u as je,x as Le,R as Ke}from"./open-closed-DC3t9YEZ.js";import{r as Qe}from"./bugs-DpEN4NTH.js";import{A as Be,h as Ve,j as qe,F as ee,G as ne,_ as Ue}from"./focus-management-DaVlPEX1.js";import{w as Ge}from"./description-D9Ee5mtv.js";import{o as I}from"./keyboard-C2Ifhsxt.js";import{K as ae,P as He}from"./label-BBnH-iCi.js";import{M as ze}from"./menu-info-item-CC1TeP-c.js";import{M as Je}from"./menu-separator-yO-BIXMb.js";import{M as We}from"./menu-title-DpAy2147.js";var Xe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Xe||{}),Ye=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ye||{}),Ze=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e))(Ze||{});function U(e,r=a=>a){let a=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,n=Ue(r(e.items.slice()),s=>s.dataRef.current.domRef.current),o=a?n.indexOf(a):null;return o===-1&&(o=null),{items:n,activeItemIndex:o}}let et={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,r)=>{var a,n,o,s,i;if(e.menuState===1)return e;let d={...e,searchQuery:"",activationTrigger:(a=r.trigger)!=null?a:1,__demoMode:!1};if(r.focus===y.Nothing)return{...d,activeItemIndex:null};if(r.focus===y.Specific)return{...d,activeItemIndex:e.items.findIndex(c=>c.id===r.id)};if(r.focus===y.Previous){let c=e.activeItemIndex;if(c!==null){let b=e.items[c].dataRef.current.domRef,t=q(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});if(t!==null){let u=e.items[t].dataRef.current.domRef;if(((n=b.current)==null?void 0:n.previousElementSibling)===u.current||((o=u.current)==null?void 0:o.previousElementSibling)===null)return{...d,activeItemIndex:t}}}}else if(r.focus===y.Next){let c=e.activeItemIndex;if(c!==null){let b=e.items[c].dataRef.current.domRef,t=q(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});if(t!==null){let u=e.items[t].dataRef.current.domRef;if(((s=b.current)==null?void 0:s.nextElementSibling)===u.current||((i=u.current)==null?void 0:i.nextElementSibling)===null)return{...d,activeItemIndex:t}}}}let m=U(e),p=q(r,{resolveItems:()=>m.items,resolveActiveIndex:()=>m.activeItemIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...d,...m,activeItemIndex:p}},3:(e,r)=>{let a=e.searchQuery!==""?0:1,n=e.searchQuery+r.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+a).concat(e.items.slice(0,e.activeItemIndex+a)):e.items).find(i=>{var d;return((d=i.dataRef.current.textValue)==null?void 0:d.startsWith(n))&&!i.dataRef.current.disabled}),s=o?e.items.indexOf(o):-1;return s===-1||s===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:s,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,r)=>{let a=U(e,n=>[...n,{id:r.id,dataRef:r.dataRef}]);return{...e,...a}},6:(e,r)=>{let a=U(e,n=>{let o=n.findIndex(s=>s.id===r.id);return o!==-1&&n.splice(o,1),n});return{...e,...a,activationTrigger:1}},7:(e,r)=>e.buttonElement===r.element?e:{...e,buttonElement:r.element},8:(e,r)=>e.itemsElement===r.element?e:{...e,itemsElement:r.element}},J=v.createContext(null);J.displayName="MenuContext";function Q(e){let r=v.useContext(J);if(r===null){let a=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,Q),a}return r}function tt(e,r){return te(r.type,et,e,r)}let rt=v.Fragment;function nt(e,r){let{__demoMode:a=!1,...n}=e,o=v.useReducer(tt,{__demoMode:a,menuState:a?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:s,itemsElement:i,buttonElement:d},m]=o,p=K(r);ke(s===0,[d,i],(M,h)=>{m({type:1}),Be(h,Ve.Loose)||(M.preventDefault(),d==null||d.focus())});let c=g(()=>{m({type:1})}),b=v.useMemo(()=>({open:s===0,close:c}),[s,c]),t={ref:p},u=k();return D.createElement(Me,null,D.createElement(J.Provider,{value:o},D.createElement(Oe,{value:te(s,{0:L.Open,1:L.Closed})},u({ourProps:t,theirProps:n,slot:b,defaultTag:rt,name:"Menu"}))))}let at="button";function ot(e,r){var a;let n=v.useId(),{id:o=`headlessui-menu-button-${n}`,disabled:s=!1,autoFocus:i=!1,...d}=e,[m,p]=Q("Menu.Button"),c=_e(),b=K(r,Pe(),g(f=>p({type:7,element:f}))),t=g(f=>{switch(f.key){case I.Space:case I.Enter:case I.ArrowDown:f.preventDefault(),f.stopPropagation(),O.flushSync(()=>p({type:0})),p({type:2,focus:y.First});break;case I.ArrowUp:f.preventDefault(),f.stopPropagation(),O.flushSync(()=>p({type:0})),p({type:2,focus:y.Last});break}}),u=g(f=>{switch(f.key){case I.Space:f.preventDefault();break}}),M=g(f=>{var C;if(Qe(f.currentTarget))return f.preventDefault();s||(m.menuState===0?(O.flushSync(()=>p({type:1})),(C=m.buttonElement)==null||C.focus({preventScroll:!0})):(f.preventDefault(),p({type:0})))}),{isFocusVisible:h,focusProps:_}=fe({autoFocus:i}),{isHovered:P,hoverProps:T}=ve({isDisabled:s}),{pressed:$,pressProps:S}=Ie({disabled:s}),F=v.useMemo(()=>({open:m.menuState===0,active:$||m.menuState===0,disabled:s,hover:P,focus:h,autofocus:i}),[m,P,h,$,s,i]),R=re(c(),{ref:b,id:o,type:ye(e,m.buttonElement),"aria-haspopup":"menu","aria-controls":(a=m.itemsElement)==null?void 0:a.id,"aria-expanded":m.menuState===0,disabled:s||void 0,autoFocus:i,onKeyDown:t,onKeyUp:u,onClick:M},_,T,S);return k()({ourProps:R,theirProps:d,slot:F,defaultTag:at,name:"Menu.Button"})}let lt="div",ut=Z.RenderStrategy|Z.Static;function st(e,r){var a,n;let o=v.useId(),{id:s=`headlessui-menu-items-${o}`,anchor:i,portal:d=!1,modal:m=!0,transition:p=!1,...c}=e,b=$e(i),[t,u]=Q("Menu.Items"),[M,h]=Re(b),_=we(),[P,T]=v.useState(null),$=K(r,b?M:null,g(l=>u({type:8,element:l})),T),S=Te(t.itemsElement);b&&(d=!0);let F=je(),[R,f]=Le(p,P,F!==null?(F&L.Open)===L.Open:t.menuState===0);Fe(R,t.buttonElement,()=>{u({type:1})});let C=t.__demoMode?!1:m&&t.menuState===0;Ce(C,S);let B=t.__demoMode?!1:m&&t.menuState===0;Ne(B,{allowed:v.useCallback(()=>[t.buttonElement,t.itemsElement],[t.buttonElement,t.itemsElement])});let V=t.menuState!==0,x=be(V,t.buttonElement)?!1:R;v.useEffect(()=>{let l=t.itemsElement;l&&t.menuState===0&&l!==(S==null?void 0:S.activeElement)&&l.focus({preventScroll:!0})},[t.menuState,t.itemsElement,S]),ge(t.menuState===0,{container:t.itemsElement,accept(l){return l.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:l.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(l){l.setAttribute("role","none")}});let A=Se(),se=g(l=>{var W,X,Y;switch(A.dispose(),l.key){case I.Space:if(t.searchQuery!=="")return l.preventDefault(),l.stopPropagation(),u({type:3,value:l.key});case I.Enter:if(l.preventDefault(),l.stopPropagation(),u({type:1}),t.activeItemIndex!==null){let{dataRef:pe}=t.items[t.activeItemIndex];(X=(W=pe.current)==null?void 0:W.domRef.current)==null||X.click()}ne(t.buttonElement);break;case I.ArrowDown:return l.preventDefault(),l.stopPropagation(),u({type:2,focus:y.Next});case I.ArrowUp:return l.preventDefault(),l.stopPropagation(),u({type:2,focus:y.Previous});case I.Home:case I.PageUp:return l.preventDefault(),l.stopPropagation(),u({type:2,focus:y.First});case I.End:case I.PageDown:return l.preventDefault(),l.stopPropagation(),u({type:2,focus:y.Last});case I.Escape:l.preventDefault(),l.stopPropagation(),O.flushSync(()=>u({type:1})),(Y=t.buttonElement)==null||Y.focus({preventScroll:!0});break;case I.Tab:l.preventDefault(),l.stopPropagation(),O.flushSync(()=>u({type:1})),qe(t.buttonElement,l.shiftKey?ee.Previous:ee.Next);break;default:l.key.length===1&&(u({type:3,value:l.key}),A.setTimeout(()=>u({type:4}),350));break}}),ie=g(l=>{switch(l.key){case I.Space:l.preventDefault();break}}),de=v.useMemo(()=>({open:t.menuState===0}),[t.menuState]),me=re(b?_():{},{"aria-activedescendant":t.activeItemIndex===null||(a=t.items[t.activeItemIndex])==null?void 0:a.id,"aria-labelledby":(n=t.buttonElement)==null?void 0:n.id,id:s,onKeyDown:se,onKeyUp:ie,role:"menu",tabIndex:t.menuState===0?0:void 0,ref:$,style:{...c.style,...h,"--button-width":De(t.buttonElement,!0).width},...Ke(f)}),ce=k();return D.createElement(Ae,{enabled:d?e.static||R:!1},ce({ourProps:me,theirProps:c,slot:de,defaultTag:lt,features:ut,visible:x,name:"Menu.Items"}))}let it=v.Fragment;function dt(e,r){let a=v.useId(),{id:n=`headlessui-menu-item-${a}`,disabled:o=!1,...s}=e,[i,d]=Q("Menu.Item"),m=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===n:!1,p=v.useRef(null),c=K(r,p);j(()=>{if(!i.__demoMode&&i.menuState===0&&m&&i.activationTrigger!==0)return Ee().requestAnimationFrame(()=>{var x,A;(A=(x=p.current)==null?void 0:x.scrollIntoView)==null||A.call(x,{block:"nearest"})})},[i.__demoMode,p,m,i.menuState,i.activationTrigger,i.activeItemIndex]);let b=xe(p),t=v.useRef({disabled:o,domRef:p,get textValue(){return b()}});j(()=>{t.current.disabled=o},[t,o]),j(()=>(d({type:5,id:n,dataRef:t}),()=>d({type:6,id:n})),[t,n]);let u=g(()=>{d({type:1})}),M=g(x=>{if(o)return x.preventDefault();d({type:1}),ne(i.buttonElement)}),h=g(()=>{if(o)return d({type:2,focus:y.Nothing});d({type:2,focus:y.Specific,id:n})}),_=he(),P=g(x=>{_.update(x),!o&&(m||d({type:2,focus:y.Specific,id:n,trigger:0}))}),T=g(x=>{_.wasMoved(x)&&(o||m||d({type:2,focus:y.Specific,id:n,trigger:0}))}),$=g(x=>{_.wasMoved(x)&&(o||m&&d({type:2,focus:y.Nothing}))}),[S,F]=ae(),[R,f]=Ge(),C=v.useMemo(()=>({active:m,focus:m,disabled:o,close:u}),[m,o,u]),B={id:n,ref:c,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-labelledby":S,"aria-describedby":R,disabled:void 0,onClick:M,onFocus:h,onPointerEnter:P,onMouseEnter:P,onPointerMove:T,onMouseMove:T,onPointerLeave:$,onMouseLeave:$},V=k();return D.createElement(F,null,D.createElement(f,null,V({ourProps:B,theirProps:s,slot:C,defaultTag:it,name:"Menu.Item"})))}let mt="div";function ct(e,r){let[a,n]=ae(),o=e,s={ref:r,"aria-labelledby":a,role:"group"},i=k();return D.createElement(n,null,i({ourProps:s,theirProps:o,slot:{},defaultTag:mt,name:"Menu.Section"}))}let pt="header";function ft(e,r){let a=v.useId(),{id:n=`headlessui-menu-heading-${a}`,...o}=e,s=He();j(()=>s.register(n),[n,s.register]);let i={id:n,ref:r,role:"presentation",...s.props};return k()({ourProps:i,theirProps:o,slot:{},defaultTag:pt,name:"Menu.Heading"})}let vt="div";function It(e,r){let a=e,n={ref:r,role:"separator"};return k()({ourProps:n,theirProps:a,slot:{},defaultTag:vt,name:"Menu.Separator"})}let yt=N(nt),oe=N(ot),le=N(st),ue=N(dt),bt=N(ct),gt=N(ft),xt=N(It),ht=Object.assign(yt,{Button:oe,Items:le,Item:ue,Section:bt,Heading:gt,Separator:xt});const G=({children:e,className:r})=>w.jsx(oe,{as:"div",className:r,children:e});try{G.displayName="MenuButton",G.__docgenInfo={description:"",displayName:"MenuButton",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const H=({children:e,LeftIcon:r,disabled:a=!1,onClick:n})=>w.jsx(ue,{disabled:a,children:w.jsxs("button",{type:"button",className:"group relative flex w-full cursor-pointer items-center gap-4 bg-neutral-0 px-4 py-2.5 hover:bg-neutral-100 disabled:bg-neutral-0 data-[focus]:bg-neutral-200",disabled:a,onKeyDown:n,onClick:n,children:[r?w.jsx(r,{className:"h-4 w-4 fill-neutral-600 group-disabled:fill-neutral-400"}):null,w.jsx("div",{className:"paragraph-200 text-neutral-800 group-disabled:text-neutral-400",children:e})]})});try{H.displayName="MenuItem",H.__docgenInfo={description:"",displayName:"MenuItem",props:{LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}const z=({children:e})=>w.jsx(le,{className:"absolute right-0 z-10 mt-2 flex w-52 flex-col rounded-md bg-neutral-0 py-2 shadow-md outline-none",children:e});try{z.displayName="MenuItems",z.__docgenInfo={description:"",displayName:"MenuItems",props:{}}}catch{}const E=({children:e})=>w.jsx(ht,{as:"div",className:"relative",children:e});E.Button=G;E.Items=z;E.Title=We;E.Item=H;E.InfoItem=ze;E.Separator=Je;try{E.displayName="Menu",E.__docgenInfo={description:"",displayName:"Menu",props:{}}}catch{}export{H as M,E as a}; +import{j as w}from"./jsx-runtime-C798UXYj.js";import{$ as fe,a as ve,w as Ie,e as ye}from"./use-resolve-button-type-D_6M6Au0.js";import{r as v,R as D}from"./index-0d5eMwbi.js";import{r as O}from"./index-BoyHNU0R.js";import{s as be,F as ge,a as xe,u as he,c as y,f as q}from"./use-text-value-ehRDfXkw.js";import{M as Z,L as k,y as K,o as g,D as N,u as te,W as re,p as Se,n as j,a as Ee}from"./use-sync-refs-DqQDZvJ6.js";import{M as Me,F as _e,y as Pe,x as $e,R as Re,b as we,d as De}from"./floating-ERp4LevH.js";import{y as ke}from"./use-inert-others-CzqV763I.js";import{R as Ne,n as Te,m as Fe,f as Ce,r as Ae}from"./portal-CLj4HHuk.js";import{c as Oe,i as L,u as je,x as Le,R as Ke}from"./open-closed-DC3t9YEZ.js";import{r as Qe}from"./bugs-DpEN4NTH.js";import{A as Be,h as Ve,j as qe,F as ee,G as ne,_ as Ue}from"./focus-management-DaVlPEX1.js";import{w as Ge}from"./description-D9Ee5mtv.js";import{o as I}from"./keyboard-C2Ifhsxt.js";import{K as ae,P as He}from"./label-BBnH-iCi.js";import{M as ze}from"./menu-info-item-CC1TeP-c.js";import{M as Je}from"./menu-separator-yO-BIXMb.js";import{M as We}from"./menu-title-DpAy2147.js";var Xe=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Xe||{}),Ye=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(Ye||{}),Ze=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e[e.SetButtonElement=7]="SetButtonElement",e[e.SetItemsElement=8]="SetItemsElement",e))(Ze||{});function U(e,r=a=>a){let a=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,n=Ue(r(e.items.slice()),s=>s.dataRef.current.domRef.current),o=a?n.indexOf(a):null;return o===-1&&(o=null),{items:n,activeItemIndex:o}}let et={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,r)=>{var a,n,o,s,i;if(e.menuState===1)return e;let m={...e,searchQuery:"",activationTrigger:(a=r.trigger)!=null?a:1,__demoMode:!1};if(r.focus===y.Nothing)return{...m,activeItemIndex:null};if(r.focus===y.Specific)return{...m,activeItemIndex:e.items.findIndex(c=>c.id===r.id)};if(r.focus===y.Previous){let c=e.activeItemIndex;if(c!==null){let b=e.items[c].dataRef.current.domRef,t=q(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});if(t!==null){let u=e.items[t].dataRef.current.domRef;if(((n=b.current)==null?void 0:n.previousElementSibling)===u.current||((o=u.current)==null?void 0:o.previousElementSibling)===null)return{...m,activeItemIndex:t}}}}else if(r.focus===y.Next){let c=e.activeItemIndex;if(c!==null){let b=e.items[c].dataRef.current.domRef,t=q(r,{resolveItems:()=>e.items,resolveActiveIndex:()=>e.activeItemIndex,resolveId:u=>u.id,resolveDisabled:u=>u.dataRef.current.disabled});if(t!==null){let u=e.items[t].dataRef.current.domRef;if(((s=b.current)==null?void 0:s.nextElementSibling)===u.current||((i=u.current)==null?void 0:i.nextElementSibling)===null)return{...m,activeItemIndex:t}}}}let d=U(e),p=q(r,{resolveItems:()=>d.items,resolveActiveIndex:()=>d.activeItemIndex,resolveId:c=>c.id,resolveDisabled:c=>c.dataRef.current.disabled});return{...m,...d,activeItemIndex:p}},3:(e,r)=>{let a=e.searchQuery!==""?0:1,n=e.searchQuery+r.value.toLowerCase(),o=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+a).concat(e.items.slice(0,e.activeItemIndex+a)):e.items).find(i=>{var m;return((m=i.dataRef.current.textValue)==null?void 0:m.startsWith(n))&&!i.dataRef.current.disabled}),s=o?e.items.indexOf(o):-1;return s===-1||s===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:s,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,r)=>{let a=U(e,n=>[...n,{id:r.id,dataRef:r.dataRef}]);return{...e,...a}},6:(e,r)=>{let a=U(e,n=>{let o=n.findIndex(s=>s.id===r.id);return o!==-1&&n.splice(o,1),n});return{...e,...a,activationTrigger:1}},7:(e,r)=>e.buttonElement===r.element?e:{...e,buttonElement:r.element},8:(e,r)=>e.itemsElement===r.element?e:{...e,itemsElement:r.element}},J=v.createContext(null);J.displayName="MenuContext";function Q(e){let r=v.useContext(J);if(r===null){let a=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,Q),a}return r}function tt(e,r){return te(r.type,et,e,r)}let rt=v.Fragment;function nt(e,r){let{__demoMode:a=!1,...n}=e,o=v.useReducer(tt,{__demoMode:a,menuState:a?0:1,buttonElement:null,itemsElement:null,items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:s,itemsElement:i,buttonElement:m},d]=o,p=K(r);Ne(s===0,[m,i],(M,h)=>{d({type:1}),Be(h,Ve.Loose)||(M.preventDefault(),m==null||m.focus())});let c=g(()=>{d({type:1})}),b=v.useMemo(()=>({open:s===0,close:c}),[s,c]),t={ref:p},u=N();return D.createElement(Me,null,D.createElement(J.Provider,{value:o},D.createElement(Oe,{value:te(s,{0:L.Open,1:L.Closed})},u({ourProps:t,theirProps:n,slot:b,defaultTag:rt,name:"Menu"}))))}let at="button";function ot(e,r){var a;let n=v.useId(),{id:o=`headlessui-menu-button-${n}`,disabled:s=!1,autoFocus:i=!1,...m}=e,[d,p]=Q("Menu.Button"),c=_e(),b=K(r,Pe(),g(f=>p({type:7,element:f}))),t=g(f=>{switch(f.key){case I.Space:case I.Enter:case I.ArrowDown:f.preventDefault(),f.stopPropagation(),O.flushSync(()=>p({type:0})),p({type:2,focus:y.First});break;case I.ArrowUp:f.preventDefault(),f.stopPropagation(),O.flushSync(()=>p({type:0})),p({type:2,focus:y.Last});break}}),u=g(f=>{switch(f.key){case I.Space:f.preventDefault();break}}),M=g(f=>{var C;if(Qe(f.currentTarget))return f.preventDefault();s||(d.menuState===0?(O.flushSync(()=>p({type:1})),(C=d.buttonElement)==null||C.focus({preventScroll:!0})):(f.preventDefault(),p({type:0})))}),{isFocusVisible:h,focusProps:_}=fe({autoFocus:i}),{isHovered:P,hoverProps:T}=ve({isDisabled:s}),{pressed:$,pressProps:S}=Ie({disabled:s}),F=v.useMemo(()=>({open:d.menuState===0,active:$||d.menuState===0,disabled:s,hover:P,focus:h,autofocus:i}),[d,P,h,$,s,i]),R=re(c(),{ref:b,id:o,type:ye(e,d.buttonElement),"aria-haspopup":"menu","aria-controls":(a=d.itemsElement)==null?void 0:a.id,"aria-expanded":d.menuState===0,disabled:s||void 0,autoFocus:i,onKeyDown:t,onKeyUp:u,onClick:M},_,T,S);return N()({ourProps:R,theirProps:m,slot:F,defaultTag:at,name:"Menu.Button"})}let lt="div",ut=Z.RenderStrategy|Z.Static;function st(e,r){var a,n;let o=v.useId(),{id:s=`headlessui-menu-items-${o}`,anchor:i,portal:m=!1,modal:d=!0,transition:p=!1,...c}=e,b=$e(i),[t,u]=Q("Menu.Items"),[M,h]=Re(b),_=we(),[P,T]=v.useState(null),$=K(r,b?M:null,g(l=>u({type:8,element:l})),T),S=Te(t.itemsElement);b&&(m=!0);let F=je(),[R,f]=Le(p,P,F!==null?(F&L.Open)===L.Open:t.menuState===0);Fe(R,t.buttonElement,()=>{u({type:1})});let C=t.__demoMode?!1:d&&t.menuState===0;Ce(C,S);let B=t.__demoMode?!1:d&&t.menuState===0;ke(B,{allowed:v.useCallback(()=>[t.buttonElement,t.itemsElement],[t.buttonElement,t.itemsElement])});let V=t.menuState!==0,x=be(V,t.buttonElement)?!1:R;v.useEffect(()=>{let l=t.itemsElement;l&&t.menuState===0&&l!==(S==null?void 0:S.activeElement)&&l.focus({preventScroll:!0})},[t.menuState,t.itemsElement,S]),ge(t.menuState===0,{container:t.itemsElement,accept(l){return l.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:l.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(l){l.setAttribute("role","none")}});let A=Se(),se=g(l=>{var W,X,Y;switch(A.dispose(),l.key){case I.Space:if(t.searchQuery!=="")return l.preventDefault(),l.stopPropagation(),u({type:3,value:l.key});case I.Enter:if(l.preventDefault(),l.stopPropagation(),u({type:1}),t.activeItemIndex!==null){let{dataRef:pe}=t.items[t.activeItemIndex];(X=(W=pe.current)==null?void 0:W.domRef.current)==null||X.click()}ne(t.buttonElement);break;case I.ArrowDown:return l.preventDefault(),l.stopPropagation(),u({type:2,focus:y.Next});case I.ArrowUp:return l.preventDefault(),l.stopPropagation(),u({type:2,focus:y.Previous});case I.Home:case I.PageUp:return l.preventDefault(),l.stopPropagation(),u({type:2,focus:y.First});case I.End:case I.PageDown:return l.preventDefault(),l.stopPropagation(),u({type:2,focus:y.Last});case I.Escape:l.preventDefault(),l.stopPropagation(),O.flushSync(()=>u({type:1})),(Y=t.buttonElement)==null||Y.focus({preventScroll:!0});break;case I.Tab:l.preventDefault(),l.stopPropagation(),O.flushSync(()=>u({type:1})),qe(t.buttonElement,l.shiftKey?ee.Previous:ee.Next);break;default:l.key.length===1&&(u({type:3,value:l.key}),A.setTimeout(()=>u({type:4}),350));break}}),ie=g(l=>{switch(l.key){case I.Space:l.preventDefault();break}}),me=v.useMemo(()=>({open:t.menuState===0}),[t.menuState]),de=re(b?_():{},{"aria-activedescendant":t.activeItemIndex===null||(a=t.items[t.activeItemIndex])==null?void 0:a.id,"aria-labelledby":(n=t.buttonElement)==null?void 0:n.id,id:s,onKeyDown:se,onKeyUp:ie,role:"menu",tabIndex:t.menuState===0?0:void 0,ref:$,style:{...c.style,...h,"--button-width":De(t.buttonElement,!0).width},...Ke(f)}),ce=N();return D.createElement(Ae,{enabled:m?e.static||R:!1},ce({ourProps:de,theirProps:c,slot:me,defaultTag:lt,features:ut,visible:x,name:"Menu.Items"}))}let it=v.Fragment;function mt(e,r){let a=v.useId(),{id:n=`headlessui-menu-item-${a}`,disabled:o=!1,...s}=e,[i,m]=Q("Menu.Item"),d=i.activeItemIndex!==null?i.items[i.activeItemIndex].id===n:!1,p=v.useRef(null),c=K(r,p);j(()=>{if(!i.__demoMode&&i.menuState===0&&d&&i.activationTrigger!==0)return Ee().requestAnimationFrame(()=>{var x,A;(A=(x=p.current)==null?void 0:x.scrollIntoView)==null||A.call(x,{block:"nearest"})})},[i.__demoMode,p,d,i.menuState,i.activationTrigger,i.activeItemIndex]);let b=xe(p),t=v.useRef({disabled:o,domRef:p,get textValue(){return b()}});j(()=>{t.current.disabled=o},[t,o]),j(()=>(m({type:5,id:n,dataRef:t}),()=>m({type:6,id:n})),[t,n]);let u=g(()=>{m({type:1})}),M=g(x=>{if(o)return x.preventDefault();m({type:1}),ne(i.buttonElement)}),h=g(()=>{if(o)return m({type:2,focus:y.Nothing});m({type:2,focus:y.Specific,id:n})}),_=he(),P=g(x=>{_.update(x),!o&&(d||m({type:2,focus:y.Specific,id:n,trigger:0}))}),T=g(x=>{_.wasMoved(x)&&(o||d||m({type:2,focus:y.Specific,id:n,trigger:0}))}),$=g(x=>{_.wasMoved(x)&&(o||d&&m({type:2,focus:y.Nothing}))}),[S,F]=ae(),[R,f]=Ge(),C=v.useMemo(()=>({active:d,focus:d,disabled:o,close:u}),[d,o,u]),B={id:n,ref:c,role:"menuitem",tabIndex:o===!0?void 0:-1,"aria-disabled":o===!0?!0:void 0,"aria-labelledby":S,"aria-describedby":R,disabled:void 0,onClick:M,onFocus:h,onPointerEnter:P,onMouseEnter:P,onPointerMove:T,onMouseMove:T,onPointerLeave:$,onMouseLeave:$},V=N();return D.createElement(F,null,D.createElement(f,null,V({ourProps:B,theirProps:s,slot:C,defaultTag:it,name:"Menu.Item"})))}let dt="div";function ct(e,r){let[a,n]=ae(),o=e,s={ref:r,"aria-labelledby":a,role:"group"},i=N();return D.createElement(n,null,i({ourProps:s,theirProps:o,slot:{},defaultTag:dt,name:"Menu.Section"}))}let pt="header";function ft(e,r){let a=v.useId(),{id:n=`headlessui-menu-heading-${a}`,...o}=e,s=He();j(()=>s.register(n),[n,s.register]);let i={id:n,ref:r,role:"presentation",...s.props};return N()({ourProps:i,theirProps:o,slot:{},defaultTag:pt,name:"Menu.Heading"})}let vt="div";function It(e,r){let a=e,n={ref:r,role:"separator"};return N()({ourProps:n,theirProps:a,slot:{},defaultTag:vt,name:"Menu.Separator"})}let yt=k(nt),oe=k(ot),le=k(st),ue=k(mt),bt=k(ct),gt=k(ft),xt=k(It),ht=Object.assign(yt,{Button:oe,Items:le,Item:ue,Section:bt,Heading:gt,Separator:xt});const G=({children:e,className:r})=>w.jsx(oe,{as:"div",className:r,children:e});try{G.displayName="MenuButton",G.__docgenInfo={description:"",displayName:"MenuButton",props:{className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}}}}}catch{}const H=({children:e,LeftIcon:r,disabled:a=!1,onClick:n})=>w.jsx(ue,{disabled:a,children:w.jsxs("button",{type:"button",className:"group relative flex w-full cursor-pointer items-center gap-4 bg-neutral-0 px-4 py-2.5 hover:bg-neutral-100 disabled:bg-neutral-0 data-[focus]:bg-neutral-200",disabled:a,onKeyDown:n,onClick:n,children:[r?w.jsx(r,{className:"h-4 w-4 fill-neutral-600 group-disabled:fill-neutral-400"}):null,w.jsx("div",{className:"paragraph-200 text-neutral-800 group-disabled:text-neutral-400",children:e})]})});try{H.displayName="MenuItem",H.__docgenInfo={description:"",displayName:"MenuItem",props:{LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},disabled:{defaultValue:{value:"false"},description:"",name:"disabled",required:!1,type:{name:"boolean"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}const z=({children:e})=>w.jsx(le,{className:"absolute right-0 z-10 mt-2 flex w-52 flex-col rounded-md bg-neutral-0 py-2 shadow-md outline-none",children:e});try{z.displayName="MenuItems",z.__docgenInfo={description:"",displayName:"MenuItems",props:{}}}catch{}const E=({children:e})=>w.jsx(ht,{as:"div",className:"relative",children:e});E.Button=G;E.Items=z;E.Title=We;E.Item=H;E.InfoItem=ze;E.Separator=Je;try{E.displayName="Menu",E.__docgenInfo={description:"",displayName:"Menu",props:{}}}catch{}export{H as M,E as a}; diff --git a/assets/menu-item.stories-C6z3CClY.js b/assets/menu-item.stories-BTxqC4cZ.js similarity index 95% rename from assets/menu-item.stories-C6z3CClY.js rename to assets/menu-item.stories-BTxqC4cZ.js index bee30eee..15aed9de 100644 --- a/assets/menu-item.stories-C6z3CClY.js +++ b/assets/menu-item.stories-BTxqC4cZ.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-C798UXYj.js";import{S as s}from"./zoom-to-fit-icon-DdsCB6de.js";import{M as n,a as i}from"./menu-BbZFQK8W.js";import"./index-0d5eMwbi.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./index-BoyHNU0R.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./bugs-DpEN4NTH.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./menu-info-item-CC1TeP-c.js";import"./menu-separator-yO-BIXMb.js";import"./menu-title-DpAy2147.js";const N={title:"Menu/MenuItem",component:n},e={argTypes:{disabled:{type:"boolean",defaultValue:!1}},render:m=>r.jsx("div",{className:"w-52",children:r.jsx(i,{children:r.jsx(n,{LeftIcon:s,...m,children:"Label"})})})};var t,o,a;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`{ +import{j as r}from"./jsx-runtime-C798UXYj.js";import{S as s}from"./zoom-to-fit-icon-DdsCB6de.js";import{M as n,a as i}from"./menu-6dEOZWfD.js";import"./index-0d5eMwbi.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./index-BoyHNU0R.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./bugs-DpEN4NTH.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./menu-info-item-CC1TeP-c.js";import"./menu-separator-yO-BIXMb.js";import"./menu-title-DpAy2147.js";const N={title:"Menu/MenuItem",component:n},e={argTypes:{disabled:{type:"boolean",defaultValue:!1}},render:m=>r.jsx("div",{className:"w-52",children:r.jsx(i,{children:r.jsx(n,{LeftIcon:s,...m,children:"Label"})})})};var t,o,a;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`{ argTypes: { disabled: { type: "boolean", diff --git a/assets/menu.stories-CgnJSCFe.js b/assets/menu.stories-xNzefD_l.js similarity index 96% rename from assets/menu.stories-CgnJSCFe.js rename to assets/menu.stories-xNzefD_l.js index da7e3269..d1b15f99 100644 --- a/assets/menu.stories-CgnJSCFe.js +++ b/assets/menu.stories-xNzefD_l.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{a as t}from"./menu-BbZFQK8W.js";import"./index-0d5eMwbi.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./index-BoyHNU0R.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./bugs-DpEN4NTH.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./menu-info-item-CC1TeP-c.js";import"./menu-separator-yO-BIXMb.js";import"./menu-title-DpAy2147.js";const O={title:"Menu",component:t},n={render:()=>e.jsx("div",{className:"w-52",children:e.jsxs(t,{children:[e.jsx(t.Button,{children:"Open Menu"}),e.jsxs(t.Items,{children:[e.jsx(t.Title,{children:"TITLE"}),e.jsx(t.Item,{disabled:!1,children:"Label"}),e.jsx(t.Item,{children:"Label"}),e.jsx(t.Item,{children:"Label"})]})]})})};var r,m,i;n.parameters={...n.parameters,docs:{...(r=n.parameters)==null?void 0:r.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{a as t}from"./menu-6dEOZWfD.js";import"./index-0d5eMwbi.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./index-BoyHNU0R.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./bugs-DpEN4NTH.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./menu-info-item-CC1TeP-c.js";import"./menu-separator-yO-BIXMb.js";import"./menu-title-DpAy2147.js";const O={title:"Menu",component:t},n={render:()=>e.jsx("div",{className:"w-52",children:e.jsxs(t,{children:[e.jsx(t.Button,{children:"Open Menu"}),e.jsxs(t.Items,{children:[e.jsx(t.Title,{children:"TITLE"}),e.jsx(t.Item,{disabled:!1,children:"Label"}),e.jsx(t.Item,{children:"Label"}),e.jsx(t.Item,{children:"Label"})]})]})})};var r,m,i;n.parameters={...n.parameters,docs:{...(r=n.parameters)==null?void 0:r.docs,source:{originalSource:`{ render: () =>
Open Menu diff --git a/assets/multi-combobox.stories-B81csaxo.js b/assets/multi-combobox.stories-BDk-Xj5k.js similarity index 97% rename from assets/multi-combobox.stories-B81csaxo.js rename to assets/multi-combobox.stories-BDk-Xj5k.js index 5621cdb5..0ad0aa64 100644 --- a/assets/multi-combobox.stories-B81csaxo.js +++ b/assets/multi-combobox.stories-BDk-Xj5k.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{R as a}from"./index-0d5eMwbi.js";import{F as o}from"./form-field-BtJxu7hP.js";import{B as C}from"./badge-Da1HxQE-.js";import{T as d}from"./tag-C9CGXtt3.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./index-h1jAayoZ.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";const ue={title:"Input/MultiCombobox",component:o.MultiCombobox},c=["Durward Reynolds","Kenton Towne","Therese Wunsch","Benedict Kessler","Katelyn Rohan"],k=()=>{const[l,n]=a.useState([]),[t,u]=a.useState(""),r=t===""?c:c.filter(s=>s.toLowerCase().includes(t.toLowerCase()));return e.jsxs(o,{children:[e.jsxs(o.LabelGroup,{children:[e.jsx(o.Label,{htmlFor:"value",children:"Label"}),e.jsx(o.Description,{id:"value-description",children:"Description"})]}),e.jsxs(o.MultiCombobox,{value:l,onChange:s=>n(s),children:[e.jsx(o.MultiCombobox.Input,{id:"value",displayValue:t,placeholder:"Select person...",onChange:s=>u(s.target.value)}),e.jsxs(o.MultiCombobox.Options,{children:[r.length===0?e.jsx(o.MultiCombobox.EmptyOption,{children:e.jsxs("p",{className:"truncate",children:["No persons found for ",e.jsx("em",{children:t})]})}):null,r.map(s=>e.jsx(o.MultiCombobox.Option,{value:s,children:s},s))]}),l.length>0?e.jsxs(o.MultiCombobox.Results,{children:[e.jsx(o.MultiCombobox.Results.Label,{children:"Selected values:"}),e.jsx(o.MultiCombobox.Results.Text,{children:l.map(s=>s).join(", ")})]}):null]})]})},V=()=>{const[l,n]=a.useState([]),[t,u]=a.useState(""),r=t===""?c:c.filter(s=>s.toLowerCase().includes(t.toLowerCase()));return e.jsxs(o,{children:[e.jsxs(o.LabelGroup,{children:[e.jsx(o.Label,{htmlFor:"value",children:"Label"}),e.jsx(o.Description,{id:"value-description",children:"Description"})]}),e.jsxs(o.MultiCombobox,{value:l,onChange:s=>n(s),children:[e.jsx(o.MultiCombobox.Input,{id:"value",displayValue:t,placeholder:"Select person...",onChange:s=>u(s.target.value)}),e.jsxs(o.MultiCombobox.Options,{children:[r.length===0?e.jsx(o.MultiCombobox.EmptyOption,{children:e.jsxs("p",{className:"truncate",children:["No persons found for ",e.jsx("em",{children:t})]})}):null,r.map(s=>e.jsx(o.MultiCombobox.Option,{value:s,children:e.jsx(C,{children:s})},s))]}),l.length>0?e.jsxs(o.MultiCombobox.Results,{children:[e.jsx(o.MultiCombobox.Results.Label,{children:"Selected values:"}),e.jsx(o.MultiCombobox.Results.Badges,{children:l.map(s=>e.jsx(C,{children:s},s))})]}):null]})]})},m={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(V,{})})},W=()=>{const[l,n]=a.useState([]),[t,u]=a.useState(""),r=t===""?c:c.filter(s=>s.toLowerCase().includes(t.toLowerCase()));return e.jsxs(o,{children:[e.jsxs(o.LabelGroup,{children:[e.jsx(o.Label,{htmlFor:"value",children:"Label"}),e.jsx(o.Description,{id:"value-description",children:"Description"})]}),e.jsxs(o.MultiCombobox,{value:l,onChange:s=>n(s),children:[e.jsx(o.MultiCombobox.Input,{id:"value",displayValue:t,placeholder:"Select person...",onChange:s=>u(s.target.value)}),e.jsxs(o.MultiCombobox.Options,{children:[r.length===0?e.jsx(o.MultiCombobox.EmptyOption,{children:e.jsxs("p",{className:"truncate",children:["No persons found for ",e.jsx("em",{children:t})]})}):null,r.map(s=>e.jsx(o.MultiCombobox.Option,{value:s,children:e.jsx(d,{children:s})},s))]}),l.length>0?e.jsxs(o.MultiCombobox.Results,{children:[e.jsx(o.MultiCombobox.Results.Label,{children:"Selected values:"}),e.jsx(o.MultiCombobox.Results.Tags,{children:l.map(s=>e.jsx(d,{onClick:()=>{n(l.filter(h=>h!==s))},children:s},s))})]}):null]})]})},B=()=>{const[l,n]=a.useState([]),[t,u]=a.useState(""),[r,s]=a.useState(c),h=i=>{const j=i.filter(T=>r.indexOf(T)===-1);u(""),s([...j,...r]),n(i)},D=t===""?r:r.filter(i=>i.toLowerCase().includes(t.toLowerCase()));return e.jsxs(o,{children:[e.jsxs(o.LabelGroup,{children:[e.jsx(o.Label,{htmlFor:"value",children:"Label"}),e.jsx(o.Description,{id:"value-description",children:"Description"})]}),e.jsxs(o.MultiCombobox,{value:l,onChange:h,children:[e.jsx(o.MultiCombobox.Input,{id:"value",displayValue:t,placeholder:"Select person...",onChange:i=>u(i.target.value)}),e.jsxs(o.MultiCombobox.Options,{children:[t.length>0&&r.indexOf(t)===-1&&e.jsxs(o.MultiCombobox.CustomOption,{value:t,children:["Create tag: ",e.jsx(d,{children:t})]}),D.map(i=>e.jsx(o.MultiCombobox.Option,{value:i,children:e.jsx(d,{children:i})},i))]}),l.length>0?e.jsxs(o.MultiCombobox.Results,{children:[e.jsx(o.MultiCombobox.Results.Label,{children:"Selected values:"}),e.jsx(o.MultiCombobox.Results.Tags,{children:l.map(i=>e.jsx(d,{onClick:()=>{n(l.filter(j=>j!==i))},children:i},i))})]}):null]})]})},x={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(k,{})})},p={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(W,{})})},b={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(B,{})})};var M,v,g;m.parameters={...m.parameters,docs:{...(M=m.parameters)==null?void 0:M.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{R as a}from"./index-0d5eMwbi.js";import{F as o}from"./form-field-2xLK_lYH.js";import{B as C}from"./badge-BIezdMmM.js";import{T as d}from"./tag-C9CGXtt3.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./index-BgfbgFhO.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";const ue={title:"Input/MultiCombobox",component:o.MultiCombobox},c=["Durward Reynolds","Kenton Towne","Therese Wunsch","Benedict Kessler","Katelyn Rohan"],k=()=>{const[l,n]=a.useState([]),[t,u]=a.useState(""),r=t===""?c:c.filter(s=>s.toLowerCase().includes(t.toLowerCase()));return e.jsxs(o,{children:[e.jsxs(o.LabelGroup,{children:[e.jsx(o.Label,{htmlFor:"value",children:"Label"}),e.jsx(o.Description,{id:"value-description",children:"Description"})]}),e.jsxs(o.MultiCombobox,{value:l,onChange:s=>n(s),children:[e.jsx(o.MultiCombobox.Input,{id:"value",displayValue:t,placeholder:"Select person...",onChange:s=>u(s.target.value)}),e.jsxs(o.MultiCombobox.Options,{children:[r.length===0?e.jsx(o.MultiCombobox.EmptyOption,{children:e.jsxs("p",{className:"truncate",children:["No persons found for ",e.jsx("em",{children:t})]})}):null,r.map(s=>e.jsx(o.MultiCombobox.Option,{value:s,children:s},s))]}),l.length>0?e.jsxs(o.MultiCombobox.Results,{children:[e.jsx(o.MultiCombobox.Results.Label,{children:"Selected values:"}),e.jsx(o.MultiCombobox.Results.Text,{children:l.map(s=>s).join(", ")})]}):null]})]})},V=()=>{const[l,n]=a.useState([]),[t,u]=a.useState(""),r=t===""?c:c.filter(s=>s.toLowerCase().includes(t.toLowerCase()));return e.jsxs(o,{children:[e.jsxs(o.LabelGroup,{children:[e.jsx(o.Label,{htmlFor:"value",children:"Label"}),e.jsx(o.Description,{id:"value-description",children:"Description"})]}),e.jsxs(o.MultiCombobox,{value:l,onChange:s=>n(s),children:[e.jsx(o.MultiCombobox.Input,{id:"value",displayValue:t,placeholder:"Select person...",onChange:s=>u(s.target.value)}),e.jsxs(o.MultiCombobox.Options,{children:[r.length===0?e.jsx(o.MultiCombobox.EmptyOption,{children:e.jsxs("p",{className:"truncate",children:["No persons found for ",e.jsx("em",{children:t})]})}):null,r.map(s=>e.jsx(o.MultiCombobox.Option,{value:s,children:e.jsx(C,{children:s})},s))]}),l.length>0?e.jsxs(o.MultiCombobox.Results,{children:[e.jsx(o.MultiCombobox.Results.Label,{children:"Selected values:"}),e.jsx(o.MultiCombobox.Results.Badges,{children:l.map(s=>e.jsx(C,{children:s},s))})]}):null]})]})},m={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(V,{})})},W=()=>{const[l,n]=a.useState([]),[t,u]=a.useState(""),r=t===""?c:c.filter(s=>s.toLowerCase().includes(t.toLowerCase()));return e.jsxs(o,{children:[e.jsxs(o.LabelGroup,{children:[e.jsx(o.Label,{htmlFor:"value",children:"Label"}),e.jsx(o.Description,{id:"value-description",children:"Description"})]}),e.jsxs(o.MultiCombobox,{value:l,onChange:s=>n(s),children:[e.jsx(o.MultiCombobox.Input,{id:"value",displayValue:t,placeholder:"Select person...",onChange:s=>u(s.target.value)}),e.jsxs(o.MultiCombobox.Options,{children:[r.length===0?e.jsx(o.MultiCombobox.EmptyOption,{children:e.jsxs("p",{className:"truncate",children:["No persons found for ",e.jsx("em",{children:t})]})}):null,r.map(s=>e.jsx(o.MultiCombobox.Option,{value:s,children:e.jsx(d,{children:s})},s))]}),l.length>0?e.jsxs(o.MultiCombobox.Results,{children:[e.jsx(o.MultiCombobox.Results.Label,{children:"Selected values:"}),e.jsx(o.MultiCombobox.Results.Tags,{children:l.map(s=>e.jsx(d,{onClick:()=>{n(l.filter(h=>h!==s))},children:s},s))})]}):null]})]})},B=()=>{const[l,n]=a.useState([]),[t,u]=a.useState(""),[r,s]=a.useState(c),h=i=>{const j=i.filter(T=>r.indexOf(T)===-1);u(""),s([...j,...r]),n(i)},D=t===""?r:r.filter(i=>i.toLowerCase().includes(t.toLowerCase()));return e.jsxs(o,{children:[e.jsxs(o.LabelGroup,{children:[e.jsx(o.Label,{htmlFor:"value",children:"Label"}),e.jsx(o.Description,{id:"value-description",children:"Description"})]}),e.jsxs(o.MultiCombobox,{value:l,onChange:h,children:[e.jsx(o.MultiCombobox.Input,{id:"value",displayValue:t,placeholder:"Select person...",onChange:i=>u(i.target.value)}),e.jsxs(o.MultiCombobox.Options,{children:[t.length>0&&r.indexOf(t)===-1&&e.jsxs(o.MultiCombobox.CustomOption,{value:t,children:["Create tag: ",e.jsx(d,{children:t})]}),D.map(i=>e.jsx(o.MultiCombobox.Option,{value:i,children:e.jsx(d,{children:i})},i))]}),l.length>0?e.jsxs(o.MultiCombobox.Results,{children:[e.jsx(o.MultiCombobox.Results.Label,{children:"Selected values:"}),e.jsx(o.MultiCombobox.Results.Tags,{children:l.map(i=>e.jsx(d,{onClick:()=>{n(l.filter(j=>j!==i))},children:i},i))})]}):null]})]})},x={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(k,{})})},p={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(W,{})})},b={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(B,{})})};var M,v,g;m.parameters={...m.parameters,docs:{...(M=m.parameters)==null?void 0:M.docs,source:{originalSource:`{ render: () =>
diff --git a/assets/navigation.stories-DFpQPa8H.js b/assets/navigation.stories-DFpQPa8H.js new file mode 100644 index 00000000..8ff95166 --- /dev/null +++ b/assets/navigation.stories-DFpQPa8H.js @@ -0,0 +1,105 @@ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{d8 as b,c as G,aT as B}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as x}from"./class-names-DnY5YZNL.js";import{R as S,j as w,C}from"./disclosure-CNBAsrob.js";import{r as p}from"./index-0d5eMwbi.js";import{u as E}from"./usePopper-Cu2KpVtb.js";import{S as L,C as k,R,l as O}from"./popover-DJ9HIBXX.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./open-closed-DC3t9YEZ.js";import"./close-provider-CZp7Lqob.js";import"./bugs-DpEN4NTH.js";import"./index-BoyHNU0R.js";import"./floating-ERp4LevH.js";import"./use-event-listener-CochUv0b.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./use-tab-direction-BMI6OSML.js";import"./hidden-BrNieFV6.js";const T=({children:n,isActive:t,isIndented:a,...i})=>e.jsxs("div",{className:x("relative w-full cursor-pointer py-3 pl-8 pr-1 text-left text-sm text-neutral-0 hover:bg-primary-900+10",a&&"pl-14",t&&"bg-primary-900+20 font-semibold hover:bg-primary-900+20"),...i,children:[n,t&&e.jsx("div",{className:"absolute bottom-0 left-0 top-0 h-full w-0.5 rounded-r-sm bg-neutral-0"})]}),u=({children:n})=>e.jsx(S,{children:n});u.Item=T;try{u.displayName="NavigationDisclosurePanel",u.__docgenInfo={description:"",displayName:"NavigationDisclosurePanel",props:{}}}catch{}const m=({children:n})=>e.jsx("div",{className:"ml-auto rounded border border-neutral-0 px-1.5 text-xs font-semibold uppercase text-neutral-0",children:n});try{m.displayName="NavigationGroupItemTag",m.__docgenInfo={description:"",displayName:"NavigationGroupItemTag",props:{}}}catch{}const A=({children:n,LeftIcon:t,onClick:a,tag:i,className:r})=>e.jsxs(C,{className:x("flex w-full cursor-pointer items-center gap-x-2 px-4 py-3 text-left text-sm text-neutral-0 hover:bg-primary-900+10 ui-open:bg-primary-900+8 ui-open:font-semibold",r),onClick:a,children:[t?e.jsx(t,{className:"h-4 w-4"}):null,n,i?e.jsx(m,{children:i}):null]}),H=({children:n,close:t})=>typeof n=="function"?n({close:t}):n,l=({children:n,defaultOpen:t})=>e.jsx(w,{as:"div",defaultOpen:t,children:({close:a})=>e.jsx(e.Fragment,{children:H({children:n,close:a})})});l.Panel=u;l.Button=A;try{l.displayName="NavigationDisclosure",l.__docgenInfo={description:"",displayName:"NavigationDisclosure",props:{defaultOpen:{defaultValue:null,description:"",name:"defaultOpen",required:!1,type:{name:"boolean"}}}}}catch{}const q=({children:n,isActive:t,LeftIcon:a,tag:i,...r})=>e.jsxs("div",{className:x("relative flex cursor-pointer items-center gap-x-2 px-4 py-3 text-sm text-neutral-0 hover:bg-primary-900+10",t&&"bg-primary-900+20 font-semibold hover:bg-primary-900+20"),...r,children:[a?e.jsx(a,{className:"h-4 w-4"}):null,n,i?e.jsx(m,{children:i}):null,t&&e.jsx("div",{className:"absolute bottom-0 left-0 top-0 h-full w-0.5 rounded-r-sm bg-neutral-0"})]}),v=({children:n})=>e.jsx("div",{className:"pt-4",children:n});v.Item=q;try{v.displayName="NavigationGroup",v.__docgenInfo={description:"",displayName:"NavigationGroup",props:{}}}catch{}const f=p.createContext({popoverButton:{setReferenceElement:()=>{}},popoverPanel:{setPopperElement:()=>{},styles:{},attributes:{}}}),D=()=>p.useContext(f),g=f.Provider;try{g.displayName="NavigationPopoverContextProvider",g.__docgenInfo={description:"",displayName:"NavigationPopoverContextProvider",props:{}}}catch{}const N=({children:n,LeftIcon:t,onClick:a})=>{const{popoverButton:{setReferenceElement:i}}=D();return e.jsx(L,{ref:r=>r&&i(r),className:"flex w-full cursor-pointer items-center gap-x-3 px-4 py-3 text-left text-sm text-neutral-0 hover:bg-primary-900+10 ui-open:bg-primary-900+8 ui-open:font-semibold",onClick:a,children:e.jsxs(e.Fragment,{children:[t&&e.jsx(t,{className:"h-4 w-4"}),n]})})};try{N.displayName="NavigationPopoverButton",N.__docgenInfo={description:"",displayName:"NavigationPopoverButton",props:{LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}const M=()=>e.jsx(k,{className:"fixed inset-0 z-30 translate-x-[180px] bg-modal-background"}),V=({children:n})=>e.jsx("div",{className:"flex w-full cursor-pointer items-center overflow-hidden px-4 py-2 hover:bg-neutral-100 focus:ring-2 focus:ring-primary-200",children:e.jsx("p",{className:"text-sm font-normal",children:n})}),d=({children:n})=>{const{popoverPanel:{setPopperElement:t,styles:a,attributes:i}}=D();return e.jsx(R,{ref:r=>r&&t(r),style:a,...i,className:"z-40 ml-2 w-52 rounded bg-neutral-0 py-2 shadow",children:n})};d.Item=V;try{d.displayName="NavigationPopoverPanel",d.__docgenInfo={description:"",displayName:"NavigationPopoverPanel",props:{}}}catch{}const s=({children:n})=>{const[t,a]=p.useState(),[i,r]=p.useState(),{styles:j,attributes:y}=E(t,i,{placement:"top-start"}),_={popoverButton:{setReferenceElement:a},popoverPanel:{setPopperElement:r,styles:j.popper,attributes:y.popper}};return e.jsx(g,{value:_,children:e.jsx(O,{children:n})})};s.Button=N;s.Panel=d;s.Overlay=M;try{s.displayName="NavigationPopover",s.__docgenInfo={description:"",displayName:"NavigationPopover",props:{}}}catch{}const z=({children:n})=>e.jsx("div",{className:"px-4 py-3",children:n}),o=({children:n})=>e.jsx("div",{className:"flex w-[180px] grow flex-col overflow-y-auto bg-primary-900 pb-5 pt-3",children:n});o.Logo=z;o.Group=v;o.Disclosure=l;o.Popover=s;try{o.displayName="Navigation",o.__docgenInfo={description:"",displayName:"Navigation",props:{}}}catch{}const ue={title:"Navigation",component:o,parameters:{options:{showPanel:!1}}},c={render:()=>e.jsx("div",{className:"relative flex min-h-screen w-96 flex-col",children:e.jsxs(o,{children:[e.jsx(o.Logo,{children:e.jsx("div",{className:"text-neutral-0",children:"Abusix"})}),e.jsxs("nav",{className:"flex flex-1 flex-col",children:[e.jsxs(o.Group,{children:[e.jsx(o.Group.Item,{children:"Home"}),e.jsx(o.Group.Item,{children:"Dashboard"}),e.jsx(o.Group.Item,{isActive:!0,tag:"Beta",children:"long text for this navigation menu option"})]}),e.jsxs(o.Group,{children:[e.jsx(o.Group.Item,{children:"Lookup & Delist"}),e.jsx(o.Group.Item,{children:"Mail Intelligence"}),e.jsxs(o.Disclosure,{children:[e.jsx(o.Disclosure.Button,{tag:"Beta",children:"AbuseHQ"}),e.jsxs(o.Disclosure.Panel,{children:[e.jsx(o.Disclosure.Panel.Item,{children:"Cases"}),e.jsx(o.Disclosure.Panel.Item,{isActive:!0,children:"Event Inbox"}),e.jsx(o.Disclosure.Panel.Item,{children:"Mailbox"}),e.jsx(o.Disclosure.Panel.Item,{children:"Dashboard"}),e.jsx(o.Disclosure.Panel.Item,{children:"Statistics"}),e.jsx(o.Disclosure.Panel.Item,{children:"Settings"})]})]})]}),e.jsxs(o.Group,{children:[e.jsx(o.Group.Item,{children:"Networks"}),e.jsx(o.Group.Item,{children:"Data Channels"})]}),e.jsxs("div",{className:"mt-auto",children:[e.jsxs(o.Popover,{children:[e.jsx(o.Popover.Button,{LeftIcon:b,children:"Support"}),e.jsx(o.Popover.Overlay,{}),e.jsxs(o.Popover.Panel,{children:[e.jsx(o.Popover.Panel.Item,{children:"Documentation"}),e.jsx(o.Popover.Panel.Item,{children:"Support request"}),e.jsx(o.Popover.Panel.Item,{children:"System status"}),e.jsx(o.Popover.Panel.Item,{children:"Blog posts"})]})]}),e.jsxs(o.Disclosure,{children:[e.jsx(o.Disclosure.Button,{LeftIcon:G,children:"Plans & Billing"}),e.jsxs(o.Disclosure.Panel,{children:[e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Subscriptions"}),e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Billing"}),e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Invoices"})]})]}),e.jsxs(o.Disclosure,{children:[e.jsx(o.Disclosure.Button,{LeftIcon:B,children:"Settings"}),e.jsxs(o.Disclosure.Panel,{children:[e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Profile"}),e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Team"}),e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Sign out"})]})]})]})]})]})})};var P,I,h;c.parameters={...c.parameters,docs:{...(P=c.parameters)==null?void 0:P.docs,source:{originalSource:`{ + render: () =>
+ + +
Abusix
+
+ +
+
+}`,...(h=(I=c.parameters)==null?void 0:I.docs)==null?void 0:h.source}}};const me=["Default"];export{c as Default,me as __namedExportsOrder,ue as default}; diff --git a/assets/navigation.stories-_4qlPrgP.js b/assets/navigation.stories-_4qlPrgP.js deleted file mode 100644 index 01788cf1..00000000 --- a/assets/navigation.stories-_4qlPrgP.js +++ /dev/null @@ -1,105 +0,0 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{d8 as b,c as G,aT as B}from"./zoom-to-fit-icon-DdsCB6de.js";import{c as x}from"./class-names-DnY5YZNL.js";import{R as S,j as w,C}from"./disclosure-CNBAsrob.js";import{r as p}from"./index-0d5eMwbi.js";import{u as E}from"./usePopper-Cu2KpVtb.js";import{S as L,C as R,R as k,l as O}from"./popover-DJ9HIBXX.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./open-closed-DC3t9YEZ.js";import"./close-provider-CZp7Lqob.js";import"./bugs-DpEN4NTH.js";import"./index-BoyHNU0R.js";import"./floating-ERp4LevH.js";import"./use-event-listener-CochUv0b.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./use-tab-direction-BMI6OSML.js";import"./hidden-BrNieFV6.js";const T=({children:n,isActive:t,isIndented:a,...i})=>e.jsxs("div",{className:x("relative w-full cursor-pointer py-3 pl-8 pr-1 text-left text-sm text-neutral-0 hover:bg-primary-900+10",a&&"pl-14",t&&"bg-primary-900+20 font-semibold hover:bg-primary-900+20"),...i,children:[n,t&&e.jsx("div",{className:"absolute bottom-0 left-0 top-0 h-full w-0.5 rounded-r-sm bg-neutral-0"})]}),u=({children:n})=>e.jsx(S,{children:n});u.Item=T;try{u.displayName="NavigationDisclosurePanel",u.__docgenInfo={description:"",displayName:"NavigationDisclosurePanel",props:{}}}catch{}const m=({children:n})=>e.jsx("div",{className:"ml-auto rounded border border-neutral-0 px-1.5 text-xs font-semibold uppercase text-neutral-0",children:n});try{m.displayName="NavigationGroupItemTag",m.__docgenInfo={description:"",displayName:"NavigationGroupItemTag",props:{}}}catch{}const A=({children:n,LeftIcon:t,onClick:a,tag:i,className:r})=>e.jsxs(C,{className:x("flex w-full cursor-pointer items-center gap-x-2 px-4 py-3 text-left text-sm text-neutral-0 hover:bg-primary-900+10 ui-open:bg-primary-900+8 ui-open:font-semibold",r),onClick:a,children:[t?e.jsx(t,{className:"h-4 w-4"}):null,n,i?e.jsx(m,{children:i}):null]}),H=({children:n,close:t})=>typeof n=="function"?n({close:t}):n,l=({children:n,defaultOpen:t})=>e.jsx(w,{as:"div",defaultOpen:t,children:({close:a})=>e.jsx(e.Fragment,{children:H({children:n,close:a})})});l.Panel=u;l.Button=A;try{l.displayName="NavigationDisclosure",l.__docgenInfo={description:"",displayName:"NavigationDisclosure",props:{defaultOpen:{defaultValue:null,description:"",name:"defaultOpen",required:!1,type:{name:"boolean"}}}}}catch{}const q=({children:n,isActive:t,LeftIcon:a,tag:i,...r})=>e.jsxs("div",{className:x("relative flex cursor-pointer items-center gap-x-2 px-4 py-3 text-sm text-neutral-0 hover:bg-primary-900+10",t&&"bg-primary-900+20 font-semibold hover:bg-primary-900+20"),...r,children:[a?e.jsx(a,{className:"h-4 w-4"}):null,n,i?e.jsx(m,{children:i}):null,t&&e.jsx("div",{className:"absolute bottom-0 left-0 top-0 h-full w-0.5 rounded-r-sm bg-neutral-0"})]}),v=({children:n})=>e.jsx("div",{className:"pt-4",children:n});v.Item=q;try{v.displayName="NavigationGroup",v.__docgenInfo={description:"",displayName:"NavigationGroup",props:{}}}catch{}const f=p.createContext({popoverButton:{setReferenceElement:()=>{}},popoverPanel:{setPopperElement:()=>{},styles:{},attributes:{}}}),D=()=>p.useContext(f),g=f.Provider;try{g.displayName="NavigationPopoverContextProvider",g.__docgenInfo={description:"",displayName:"NavigationPopoverContextProvider",props:{}}}catch{}const N=({children:n,LeftIcon:t,onClick:a})=>{const{popoverButton:{setReferenceElement:i}}=D();return e.jsx(L,{ref:r=>r&&i(r),className:"flex w-full cursor-pointer items-center gap-x-3 px-4 py-3 text-left text-sm text-neutral-0 hover:bg-primary-900+10 ui-open:bg-primary-900+8 ui-open:font-semibold",onClick:a,children:e.jsxs(e.Fragment,{children:[t&&e.jsx(t,{className:"h-4 w-4"}),n]})})};try{N.displayName="NavigationPopoverButton",N.__docgenInfo={description:"",displayName:"NavigationPopoverButton",props:{LeftIcon:{defaultValue:null,description:"",name:"LeftIcon",required:!1,type:{name:"ElementType"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}const M=()=>e.jsx(R,{className:"fixed inset-0 z-30 translate-x-[180px] bg-modal-background"}),V=({children:n})=>e.jsx("div",{className:"flex w-full cursor-pointer items-center overflow-hidden px-4 py-2 hover:bg-neutral-100 focus:ring-2 focus:ring-primary-200",children:e.jsx("p",{className:"text-sm font-normal",children:n})}),d=({children:n})=>{const{popoverPanel:{setPopperElement:t,styles:a,attributes:i}}=D();return e.jsx(k,{ref:r=>r&&t(r),style:a,...i,className:"z-40 ml-2 w-52 rounded bg-neutral-0 py-2 shadow",children:n})};d.Item=V;try{d.displayName="NavigationPopoverPanel",d.__docgenInfo={description:"",displayName:"NavigationPopoverPanel",props:{}}}catch{}const s=({children:n})=>{const[t,a]=p.useState(),[i,r]=p.useState(),{styles:j,attributes:_}=E(t,i,{placement:"top-start"}),y={popoverButton:{setReferenceElement:a},popoverPanel:{setPopperElement:r,styles:j.popper,attributes:_.popper}};return e.jsx(g,{value:y,children:e.jsx(O,{children:n})})};s.Button=N;s.Panel=d;s.Overlay=M;try{s.displayName="NavigationPopover",s.__docgenInfo={description:"",displayName:"NavigationPopover",props:{}}}catch{}const z=({children:n})=>e.jsx("div",{className:"px-4 py-3",children:n}),o=({children:n})=>e.jsx("div",{className:"flex w-[180px] grow flex-col overflow-y-auto bg-primary-900 pb-5 pt-3",children:n});o.Logo=z;o.Group=v;o.Disclosure=l;o.Popover=s;try{o.displayName="Navigation",o.__docgenInfo={description:"",displayName:"Navigation",props:{}}}catch{}const ue={title:"Navigation",component:o,parameters:{options:{showPanel:!1}}},c={render:()=>e.jsx("div",{className:"relative flex min-h-screen w-96 flex-col",children:e.jsxs(o,{children:[e.jsx(o.Logo,{children:e.jsx("div",{className:"text-neutral-0",children:"Abusix"})}),e.jsxs("nav",{className:"flex flex-1 flex-col",children:[e.jsxs(o.Group,{children:[e.jsx(o.Group.Item,{children:"Home"}),e.jsx(o.Group.Item,{children:"Dashboard"}),e.jsx(o.Group.Item,{isActive:!0,tag:"Beta",children:"long text for this navigation menu option"})]}),e.jsxs(o.Group,{children:[e.jsx(o.Group.Item,{children:"Lookup & Delist"}),e.jsx(o.Group.Item,{children:"Mail Intelligence"}),e.jsxs(o.Disclosure,{children:[e.jsx(o.Disclosure.Button,{tag:"Beta",children:"AbuseHQ"}),e.jsxs(o.Disclosure.Panel,{children:[e.jsx(o.Disclosure.Panel.Item,{children:"Cases"}),e.jsx(o.Disclosure.Panel.Item,{isActive:!0,children:"Event Inbox"}),e.jsx(o.Disclosure.Panel.Item,{children:"Mailbox"}),e.jsx(o.Disclosure.Panel.Item,{children:"Dashboard"}),e.jsx(o.Disclosure.Panel.Item,{children:"Statistics"}),e.jsx(o.Disclosure.Panel.Item,{children:"Settings"})]})]})]}),e.jsxs(o.Group,{children:[e.jsx(o.Group.Item,{children:"Networks"}),e.jsx(o.Group.Item,{children:"Data Channels"})]}),e.jsxs("div",{className:"mt-auto",children:[e.jsxs(o.Popover,{children:[e.jsx(o.Popover.Button,{LeftIcon:b,children:"Support"}),e.jsx(o.Popover.Overlay,{}),e.jsxs(o.Popover.Panel,{children:[e.jsx(o.Popover.Panel.Item,{children:"Documentation"}),e.jsx(o.Popover.Panel.Item,{children:"Support request"}),e.jsx(o.Popover.Panel.Item,{children:"System status"}),e.jsx(o.Popover.Panel.Item,{children:"Blog posts"})]})]}),e.jsxs(o.Disclosure,{children:[e.jsx(o.Disclosure.Button,{LeftIcon:G,children:"Plans & Billing"}),e.jsxs(o.Disclosure.Panel,{children:[e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Subscriptions"}),e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Billing"}),e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Invoices"})]})]}),e.jsxs(o.Disclosure,{children:[e.jsx(o.Disclosure.Button,{LeftIcon:B,children:"Settings"}),e.jsxs(o.Disclosure.Panel,{children:[e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Profile"}),e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Team"}),e.jsx(o.Disclosure.Panel.Item,{isIndented:!0,children:"Sign out"})]})]})]})]})]})})};var P,I,h;c.parameters={...c.parameters,docs:{...(P=c.parameters)==null?void 0:P.docs,source:{originalSource:`{ - render: () =>
- - -
Abusix
-
- -
-
-}`,...(h=(I=c.parameters)==null?void 0:I.docs)==null?void 0:h.source}}};const me=["Default"];export{c as Default,me as __namedExportsOrder,ue as default}; diff --git a/assets/panel.stories-5EuFEmkX.js b/assets/panel.stories-B05jnSyq.js similarity index 96% rename from assets/panel.stories-5EuFEmkX.js rename to assets/panel.stories-B05jnSyq.js index 648ba1ca..14764506 100644 --- a/assets/panel.stories-5EuFEmkX.js +++ b/assets/panel.stories-B05jnSyq.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-C798UXYj.js";import{P as l}from"./panel-BTNit_je.js";import{B as e}from"./button-Cwplw9FX.js";import{g as d}from"./storybook-utils-C5xEhci0.js";import{T as u}from"./toggle-Bp5D17gs.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";import"./spinner-CrXB3JgE.js";import"./description-D9Ee5mtv.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./label-BBnH-iCi.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./bugs-DpEN4NTH.js";const E={title:"Panel",parameters:{...d("Simple container used to group and organize elements in the UI."),backgrounds:{default:"light"}},component:l,args:{className:"",children:"Panel with text content"}},o={},n=()=>{},r={args:{children:t.jsxs(t.Fragment,{children:[t.jsx(e,{variant:"primary",onClick:n,children:"Button A"}),t.jsx(u.Switch,{checked:!0,ariaLabel:"test",onChange:n}),t.jsx(e,{variant:"secondary",onClick:n,children:"Button B"}),t.jsx("p",{children:" Paragraph content"})]})}};var a,i,s;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(s=(i=o.parameters)==null?void 0:i.docs)==null?void 0:s.source}}};var p,c,m;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{j as t}from"./jsx-runtime-C798UXYj.js";import{P as l}from"./panel-BTNit_je.js";import{B as e}from"./button-CNKqPViR.js";import{g as d}from"./storybook-utils-C5xEhci0.js";import{T as u}from"./toggle-Bp5D17gs.js";import"./index-0d5eMwbi.js";import"./class-names-DnY5YZNL.js";import"./spinner-CrXB3JgE.js";import"./description-D9Ee5mtv.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./label-BBnH-iCi.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./bugs-DpEN4NTH.js";const E={title:"Panel",parameters:{...d("Simple container used to group and organize elements in the UI."),backgrounds:{default:"light"}},component:l,args:{className:"",children:"Panel with text content"}},o={},n=()=>{},r={args:{children:t.jsxs(t.Fragment,{children:[t.jsx(e,{variant:"primary",onClick:n,children:"Button A"}),t.jsx(u.Switch,{checked:!0,ariaLabel:"test",onChange:n}),t.jsx(e,{variant:"secondary",onClick:n,children:"Button B"}),t.jsx("p",{children:" Paragraph content"})]})}};var a,i,s;o.parameters={...o.parameters,docs:{...(a=o.parameters)==null?void 0:a.docs,source:{originalSource:"{}",...(s=(i=o.parameters)==null?void 0:i.docs)==null?void 0:s.source}}};var p,c,m;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`{ args: { children: <> + ; +}`,...(Dt=(Ct=oe.parameters)==null?void 0:Ct.docs)==null?void 0:Dt.source}}};var wt,Rt,yt;ie.parameters={...ie.parameters,docs:{...(wt=ie.parameters)==null?void 0:wt.docs,source:{originalSource:`() => { + const columnHelper = createColumnHelper(); + const exampleData = useMemo(() => createExampleData(), []); + const [data, setData] = useState(exampleData); + const columnDefs = [columnHelper.accessor("name", { + header: "Team Members", + enableSorting: true, + meta: { + width: "200px" + } + }), columnHelper.accessor("description", { + header: "Description", + enableSorting: true + })]; + return <> + isDraggableRowsEnabled isExpandableRowsEnabled + // eslint-disable-next-line react/no-unstable-nested-components + getExpandableContent={row =>

{row.original.description}

} data={data} columnDefs={columnDefs} /> + + + +

Entries: {data.length.toLocaleString()}

+ + + ; +}`,...(yt=(Rt=ie.parameters)==null?void 0:Rt.docs)==null?void 0:yt.source}}};var It,Et,xt;se.parameters={...se.parameters,docs:{...(It=se.parameters)==null?void 0:It.docs,source:{originalSource:`() => { + const columnHelper = createColumnHelper(); + const exampleData: ExampleData[] = []; + const columnDefs = [columnHelper.accessor("name", { + header: "Team Members", + enableSorting: true, + meta: { + width: "200px" + } + }), columnHelper.accessor("description", { + header: "Description", + enableSorting: true + })]; + return isDraggableRowsEnabled data={exampleData} columnDefs={columnDefs} isExpandableRowsEnabled + // eslint-disable-next-line react/no-unstable-nested-components + getExpandableContent={row =>

{row.original.description}

} placeholder={ + + } />; +}`,...(xt=(Et=se.parameters)==null?void 0:Et.docs)==null?void 0:xt.source}}};var _t,Tt,Ot;ae.parameters={...ae.parameters,docs:{...(_t=ae.parameters)==null?void 0:_t.docs,source:{originalSource:`() => { + const columnHelper = createColumnHelper(); + const [data, setData] = useState([]); + useEffect(() => { + const timeout = setTimeout(() => { + setData(createExampleData()); + }, 4000); + return () => { + clearTimeout(timeout); + }; + }, []); + const columnDefs = [columnHelper.accessor("name", { + header: "Team Members", + enableSorting: true, + meta: { + width: "200px" + } + }), columnHelper.accessor("description", { + header: "Description", + enableSorting: true + })]; + return
+ isDraggableRowsEnabled data={data} columnDefs={columnDefs} placeholder={} /> +
; +}`,...(Ot=(Tt=ae.parameters)==null?void 0:Tt.docs)==null?void 0:Ot.source}}};const Pi=["Default","Draggable","DraggableAndExpandable","EmptyTable","LoadingTable"];export{re as Default,oe as Draggable,ie as DraggableAndExpandable,se as EmptyTable,ae as LoadingTable,Pi as __namedExportsOrder,Oi as default}; diff --git a/assets/table-virtualized.stories-KaRUCWoS.js b/assets/table-virtualized.stories-KaRUCWoS.js deleted file mode 100644 index 72797ba0..00000000 --- a/assets/table-virtualized.stories-KaRUCWoS.js +++ /dev/null @@ -1,133 +0,0 @@ -import{j as h}from"./jsx-runtime-C798UXYj.js";import{r as w,g as nn,R as G}from"./index-0d5eMwbi.js";import{u as rn}from"./index-h1jAayoZ.js";import{c as _t}from"./class-names-DnY5YZNL.js";import{T as b}from"./table-unvirtualized-B6-rFf74.js";import{aE as on,l as sn,bD as an,av as ln,as as un,hu as dn}from"./zoom-to-fit-icon-DdsCB6de.js";import{B as ae}from"./button-Cwplw9FX.js";import{I as cn}from"./icon-button-DlSTEzH7.js";import{D as Ge}from"./divider-line-CzbklozI.js";import"./index-BoyHNU0R.js";import"./spinner-CrXB3JgE.js";/** - * table-core - * - * Copyright (c) TanStack - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function A(e,t){return typeof e=="function"?e(t):e}function x(e,t){return n=>{t.setState(r=>({...r,[e]:A(n,r[e])}))}}function oe(e){return e instanceof Function}function gn(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function fn(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const s=t(i);s!=null&&s.length&&r(s)})};return r(e),n}function C(e,t,n){let r=[],o;return()=>{let i;n.key&&n.debug&&(i=Date.now());const s=e();if(!(s.length!==r.length||s.some((d,u)=>r[u]!==d)))return o;r=s;let l;if(n.key&&n.debug&&(l=Date.now()),o=t(...s),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-i)*100)/100,u=Math.round((Date.now()-l)*100)/100,g=u/16,f=(c,m)=>{for(c=String(c);c.length{let c=f;for(const p of l.split(".")){var m;c=(m=c)==null?void 0:m[p]}return c}:u=f=>f[a.accessorKey]),!d)throw new Error;let g={id:`${String(d)}`,accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:C(()=>[!0],()=>{var f;return[g,...(f=g.columns)==null?void 0:f.flatMap(c=>c.getFlatColumns())]},{key:"column.getFlatColumns",debug:()=>{var f;return(f=e.options.debugAll)!=null?f:e.options.debugColumns}}),getLeafColumns:C(()=>[e._getOrderColumnsFn()],f=>{var c;if((c=g.columns)!=null&&c.length){let m=g.columns.flatMap(p=>p.getLeafColumns());return f(m)}return[g]},{key:"column.getLeafColumns",debug:()=>{var f;return(f=e.options.debugAll)!=null?f:e.options.debugColumns}})};for(const f of e._features)f.createColumn==null||f.createColumn(g,e);return g}function Je(e,t,n){var r;let i={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const hn={createTable:e=>{e.getHeaderGroups=C(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,s;const a=(i=r==null?void 0:r.map(g=>n.find(f=>f.id===g)).filter(Boolean))!=null?i:[],l=(s=o==null?void 0:o.map(g=>n.find(f=>f.id===g)).filter(Boolean))!=null?s:[],d=n.filter(g=>!(r!=null&&r.includes(g.id))&&!(o!=null&&o.includes(g.id)));return W(t,[...a,...d,...l],e)},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getCenterHeaderGroups=C(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),W(t,n,e,"center")),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getLeftHeaderGroups=C(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return W(t,i,e,"left")},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getRightHeaderGroups=C(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return W(t,i,e,"right")},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getFooterGroups=C(()=>[e.getHeaderGroups()],t=>[...t].reverse(),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getLeftFooterGroups=C(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getCenterFooterGroups=C(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getRightFooterGroups=C(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getFlatHeaders=C(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getLeftFlatHeaders=C(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getCenterFlatHeaders=C(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getRightFlatHeaders=C(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getCenterLeafHeaders=C(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getLeftLeafHeaders=C(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getRightLeafHeaders=C(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}}),e.getLeafHeaders=C(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,s,a,l,d;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(d=r[0])==null?void 0:d.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugHeaders}})}};function W(e,t,n,r){var o,i;let s=0;const a=function(f,c){c===void 0&&(c=1),s=Math.max(s,c),f.filter(m=>m.getIsVisible()).forEach(m=>{var p;(p=m.columns)!=null&&p.length&&a(m.columns,c+1)},0)};a(e);let l=[];const d=(f,c)=>{const m={depth:c,id:[r,`${c}`].filter(Boolean).join("_"),headers:[]},p=[];f.forEach(v=>{const S=[...p].reverse()[0],y=v.column.depth===m.depth;let R,E=!1;if(y&&v.column.parent?R=v.column.parent:(R=v.column,E=!0),S&&(S==null?void 0:S.column)===R)S.subHeaders.push(v);else{const I=Je(n,R,{id:[r,c,R.id,v==null?void 0:v.id].filter(Boolean).join("_"),isPlaceholder:E,placeholderId:E?`${p.filter(F=>F.column===R).length}`:void 0,depth:c,index:p.length});I.subHeaders.push(v),p.push(I)}m.headers.push(v),v.headerGroup=m}),l.push(m),c>0&&d(p,c-1)},u=t.map((f,c)=>Je(n,f,{depth:s,index:c}));d(u,s-1),l.reverse();const g=f=>f.filter(m=>m.column.getIsVisible()).map(m=>{let p=0,v=0,S=[0];m.subHeaders&&m.subHeaders.length?(S=[],g(m.subHeaders).forEach(R=>{let{colSpan:E,rowSpan:I}=R;p+=E,S.push(I)})):p=1;const y=Math.min(...S);return v=v+y,m.colSpan=p,m.rowSpan=v,{colSpan:p,rowSpan:v}});return g((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const Y={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},he=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),mn={getDefaultColumnDef:()=>Y,getInitialState:e=>({columnSizing:{},columnSizingInfo:he(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",onColumnSizingChange:x("columnSizing",e),onColumnSizingInfoChange:x("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Y.minSize,(r=i??e.columnDef.size)!=null?r:Y.size),(o=e.columnDef.maxSize)!=null?o:Y.maxSize)},e.getStart=n=>{const r=n?n==="left"?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=r.findIndex(i=>i.id===e.id);if(o>0){const i=r[o-1];return i.getStart(n)+i.getSize()}return 0},e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=()=>{const n=t.getColumn(e.column.id),r=n==null?void 0:n.getCanResize();return o=>{if(!n||!r||(o.persist==null||o.persist(),me(o)&&o.touches&&o.touches.length>1))return;const i=e.getSize(),s=e?e.getLeafHeaders().map(p=>[p.column.id,p.column.getSize()]):[[n.id,n.getSize()]],a=me(o)?Math.round(o.touches[0].clientX):o.clientX,l={},d=(p,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(S=>{var y,R;const E=v-((y=S==null?void 0:S.startOffset)!=null?y:0),I=Math.max(E/((R=S==null?void 0:S.startSize)!=null?R:0),-.999999);return S.columnSizingStart.forEach(F=>{let[fe,$]=F;l[fe]=Math.round(Math.max($+$*I,0)*100)/100}),{...S,deltaOffset:E,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||p==="end")&&t.setColumnSizing(S=>({...S,...l})))},u=p=>d("move",p),g=p=>{d("end",p),t.setColumnSizingInfo(v=>({...v,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f={moveHandler:p=>u(p.clientX),upHandler:p=>{document.removeEventListener("mousemove",f.moveHandler),document.removeEventListener("mouseup",f.upHandler),g(p.clientX)}},c={moveHandler:p=>(p.cancelable&&(p.preventDefault(),p.stopPropagation()),u(p.touches[0].clientX),!1),upHandler:p=>{var v;document.removeEventListener("touchmove",c.moveHandler),document.removeEventListener("touchend",c.upHandler),p.cancelable&&(p.preventDefault(),p.stopPropagation()),g((v=p.touches[0])==null?void 0:v.clientX)}},m=vn()?{passive:!1}:!1;me(o)?(document.addEventListener("touchmove",c.moveHandler,m),document.addEventListener("touchend",c.upHandler,m)):(document.addEventListener("mousemove",f.moveHandler,m),document.addEventListener("mouseup",f.upHandler,m)),t.setColumnSizingInfo(p=>({...p,startOffset:a,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:n.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?he():(n=e.initialState.columnSizingInfo)!=null?n:he())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let K=null;function vn(){if(typeof K=="boolean")return K;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return K=e,K}function me(e){return e.type==="touchstart"}const Sn={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:x("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const s=i.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(o=n)!=null?o:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=s;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Tt=(e,t,n)=>{var r;const o=n.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(o))};Tt.autoRemove=e=>P(e);const Ot=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Ot.autoRemove=e=>P(e);const Pt=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Pt.autoRemove=e=>P(e);const $t=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};$t.autoRemove=e=>P(e)||!(e!=null&&e.length);const Mt=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});Mt.autoRemove=e=>P(e)||!(e!=null&&e.length);const Ft=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});Ft.autoRemove=e=>P(e)||!(e!=null&&e.length);const At=(e,t,n)=>e.getValue(t)===n;At.autoRemove=e=>P(e);const Vt=(e,t,n)=>e.getValue(t)==n;Vt.autoRemove=e=>P(e);const ze=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};ze.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(o)?1/0:o;if(i>s){const a=i;i=s,s=a}return[i,s]};ze.autoRemove=e=>P(e)||P(e[0])&&P(e[1]);const M={includesString:Tt,includesStringSensitive:Ot,equalsString:Pt,arrIncludes:$t,arrIncludesAll:Mt,arrIncludesSome:Ft,equals:At,weakEquals:Vt,inNumberRange:ze};function P(e){return e==null||e===""}const Cn={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],globalFilter:void 0,...e}),getDefaultOptions:e=>({onColumnFiltersChange:x("columnFilters",e),onGlobalFilterChange:x("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?M.includesString:typeof r=="number"?M.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?M.equals:Array.isArray(r)?M.arrIncludes:M.weakEquals},e.getFilterFn=()=>{var n,r;return oe(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:M[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&!!e.accessorFn},e.getCanGlobalFilter=()=>{var n,r,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(u=>u.id===e.id),s=A(n,i?i.value:void 0);if(Ze(o,s,e)){var a;return(a=r==null?void 0:r.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(i){var d;return(d=r==null?void 0:r.map(u=>u.id===e.id?l:u))!=null?d:[]}return r!=null&&r.length?[...r,l]:[l]})},e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.getGlobalAutoFilterFn=()=>M.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return oe(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:M[r]},e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=o=>{var i;return(i=A(t,o))==null?void 0:i.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(Ze(l,s.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()),e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}};function Ze(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Dn=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),wn=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},yn=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r=i)&&(r=i)}),r},Rn=(e,t,n)=>{let r,o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r===void 0?s>=s&&(r=o=s):(r>s&&(r=s),o{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},En=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!gn(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,s)=>i-s);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},In=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),xn=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,_n=(e,t)=>t.length,ve={sum:Dn,min:wn,max:yn,extent:Rn,mean:bn,median:En,unique:In,uniqueCount:xn,count:_n},Tn={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:x("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r,o,i;return(n=(r=(o=(i=e.columnDef.enableGrouping)!=null?i:!0)!=null?o:t.options.enableGrouping)!=null?r:!0)!=null?n:!!e.accessorFn},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return ve.sum;if(Object.prototype.toString.call(r)==="[object Date]")return ve.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return oe(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:ve[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function On(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(s=>s.id===i)).filter(Boolean),...r]}const Pn={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:x("columnOrder",e)}),createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=C(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const s=[...t],a=[...o];for(;a.length&&s.length;){const l=s.shift(),d=a.findIndex(u=>u.id===l);d>-1&&i.push(a.splice(d,1)[0])}i=[...i,...a]}return On(i,n,r)},{key:!1})}},_e=0,Te=10,Se=()=>({pageIndex:_e,pageSize:Te}),$n={getInitialState:e=>({...e,pagination:{...Se(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:x("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>A(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Se():(o=e.initialState.pagination)!=null?o:Se())},e.setPageIndex=r=>{e.setPagination(o=>{let i=A(r,o.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,s)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?_e:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:_e)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?Te:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:Te)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,A(r,o.pageSize)),s=o.pageSize*o.pageIndex,a=Math.floor(s/i);return{...o,pageIndex:a,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let s=A(r,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...o,pageCount:s}}),e.getPageOptions=C(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,s)=>s)),o},{key:!1,debug:()=>{var r;return(r=e.options.debugAll)!=null?r:e.options.debugTable}}),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getPrePaginationRowModel().rows.length/e.getState().pagination.pageSize)}}},Ce=()=>({left:[],right:[]}),De=()=>({top:[],bottom:[]}),Mn={getInitialState:e=>({columnPinning:Ce(),rowPinning:De(),...e}),getDefaultOptions:e=>({onColumnPinningChange:x("columnPinning",e),onRowPinningChange:x("rowPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,s;if(n==="right"){var a,l;return{left:((a=o==null?void 0:o.left)!=null?a:[]).filter(g=>!(r!=null&&r.includes(g))),right:[...((l=o==null?void 0:o.right)!=null?l:[]).filter(g=>!(r!=null&&r.includes(g))),...r]}}if(n==="left"){var d,u;return{left:[...((d=o==null?void 0:o.left)!=null?d:[]).filter(g=>!(r!=null&&r.includes(g))),...r],right:((u=o==null?void 0:o.right)!=null?u:[]).filter(g=>!(r!=null&&r.includes(g)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(g=>!(r!=null&&r.includes(g))),right:((s=o==null?void 0:o.right)!=null?s:[]).filter(g=>!(r!=null&&r.includes(g)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,s;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>o==null?void 0:o.includes(a));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(l=>{let{id:d}=l;return d}):[],s=o?e.getParentRows().map(l=>{let{id:d}=l;return d}):[],a=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var d,u;if(n==="bottom"){var g,f;return{top:((g=l==null?void 0:l.top)!=null?g:[]).filter(p=>!(a!=null&&a.has(p))),bottom:[...((f=l==null?void 0:l.bottom)!=null?f:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)]}}if(n==="top"){var c,m;return{top:[...((c=l==null?void 0:l.top)!=null?c:[]).filter(p=>!(a!=null&&a.has(p))),...Array.from(a)],bottom:((m=l==null?void 0:l.bottom)!=null?m:[]).filter(p=>!(a!=null&&a.has(p)))}}return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(p=>!(a!=null&&a.has(p))),bottom:((u=l==null?void 0:l.bottom)!=null?u:[]).filter(p=>!(a!=null&&a.has(p)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>o==null?void 0:o.includes(a));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=t._getPinnedRows(o))==null?void 0:n.map(s=>{let{id:a}=s;return a});return(r=i==null?void 0:i.indexOf(e.id))!=null?r:-1},e.getCenterVisibleCells=C(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(s=>!i.includes(s.column.id))},{key:!1,debug:()=>{var n;return(n=t.options.debugAll)!=null?n:t.options.debugRows}}),e.getLeftVisibleCells=C(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,,],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),{key:!1,debug:()=>{var n;return(n=t.options.debugAll)!=null?n:t.options.debugRows}}),e.getRightVisibleCells=C(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),{key:!1,debug:()=>{var n;return(n=t.options.debugAll)!=null?n:t.options.debugRows}})},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Ce():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Ce())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=C(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugColumns}}),e.getRightLeafColumns=C(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugColumns}}),e.getCenterLeafColumns=C(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugColumns}}),e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?De():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:De())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=t=>C(()=>[e.getRowModel().rows,e.getState().rowPinning[t]],(n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(r??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(r??[]).map(s=>n.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:t}))},{key:!1,debug:()=>{var n;return(n=e.options.debugAll)!=null?n:e.options.debugRows}})(),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=C(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugRows}})}},Fn={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:x("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{Oe(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=C(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?we(e,n):{rows:[],flatRows:[],rowsById:{}},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugTable}}),e.getFilteredSelectedRowModel=C(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?we(e,n):{rows:[],flatRows:[],rowsById:{}},{key:"getFilteredSelectedRowModel",debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugTable}}),e.getGroupedSelectedRowModel=C(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?we(e,n):{rows:[],flatRows:[],rowsById:{}},{key:"getGroupedSelectedRowModel",debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugTable}}),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const o=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const a={...i};return Oe(a,e.id,n,(s=r==null?void 0:r.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Be(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Pe(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Pe(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},Oe=(e,t,n,r,o)=>{var i;const s=o.getRow(t);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>Oe(e,a.id,n,r,o))};function we(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(s,a){return s.map(l=>{var d;const u=Be(l,n);if(u&&(r.push(l),o[l.id]=l),(d=l.subRows)!=null&&d.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function Be(e,t){var n;return(n=t[e.id])!=null?n:!1}function Pe(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!o)&&(s.getCanSelect()&&(Be(s,t)?i=!0:o=!1),s.subRows&&s.subRows.length)){const a=Pe(s,t);a==="all"?i=!0:(a==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const $e=/([0-9]+)/gm,An=(e,t,n)=>Ht(V(e.getValue(n)).toLowerCase(),V(t.getValue(n)).toLowerCase()),Vn=(e,t,n)=>Ht(V(e.getValue(n)),V(t.getValue(n))),Hn=(e,t,n)=>qe(V(e.getValue(n)).toLowerCase(),V(t.getValue(n)).toLowerCase()),Nn=(e,t,n)=>qe(V(e.getValue(n)),V(t.getValue(n))),Ln=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:rqe(e.getValue(n),t.getValue(n));function qe(e,t){return e===t?0:e>t?1:-1}function V(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Ht(e,t){const n=e.split($e).filter(Boolean),r=t.split($e).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),s=parseInt(o,10),a=parseInt(i,10),l=[s,a].sort();if(isNaN(l[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const z={alphanumeric:An,alphanumericCaseSensitive:Vn,text:Hn,textCaseSensitive:Nn,datetime:Ln,basic:jn},kn={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:x("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return z.datetime;if(typeof i=="string"&&(r=!0,i.split($e).length>1))return z.alphanumeric}return r?z.text:z.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return oe(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:z[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s==null?void 0:s.find(c=>c.id===e.id),l=s==null?void 0:s.findIndex(c=>c.id===e.id);let d=[],u,g=i?n:o==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(i||o||(u="remove")),u==="add"){var f;d=[...s,{id:e.id,desc:g}],d.splice(0,d.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?d=s.map(c=>c.id===e.id?{...c,desc:g}:c):u==="remove"?d=s.filter(c=>c.id!==e.id):d=[{id:e.id,desc:g}];return d})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,o;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:s==="desc"?"asc":"desc":i},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(o=>o.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(o=>o.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Gn={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:x("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;return(n=(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=C(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),{key:"row._getAllVisibleCells",debug:()=>{var n;return(n=t.options.debugAll)!=null?n:t.options.debugRows}}),e.getVisibleCells=C(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],{key:!1,debug:()=>{var n;return(n=t.options.debugAll)!=null?n:t.options.debugRows}})},createTable:e=>{const t=(n,r)=>C(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),{key:n,debug:()=>{var o;return(o=e.options.debugAll)!=null?o:e.options.debugColumns}});e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}},et=[hn,Gn,Pn,Mn,Cn,kn,Tn,Sn,$n,Fn,mn];function zn(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");let n={_features:et};const r=n._features.reduce((u,g)=>Object.assign(u,g.getDefaultOptions==null?void 0:g.getDefaultOptions(n)),{}),o=u=>n.options.mergeOptions?n.options.mergeOptions(r,u):{...r,...u};let s={...{},...(t=e.initialState)!=null?t:{}};n._features.forEach(u=>{var g;s=(g=u.getInitialState==null?void 0:u.getInitialState(s))!=null?g:s});const a=[];let l=!1;const d={_features:et,options:{...r,...e},initialState:s,_queue:u=>{a.push(u),l||(l=!0,Promise.resolve().then(()=>{for(;a.length;)a.shift()();l=!1}).catch(g=>setTimeout(()=>{throw g})))},reset:()=>{n.setState(n.initialState)},setOptions:u=>{const g=A(u,n.options);n.options=o(g)},getState:()=>n.options.state,setState:u=>{n.options.onStateChange==null||n.options.onStateChange(u)},_getRowId:(u,g,f)=>{var c;return(c=n.options.getRowId==null?void 0:n.options.getRowId(u,g,f))!=null?c:`${f?[f.id,g].join("."):g}`},getCoreRowModel:()=>(n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()),getRowModel:()=>n.getPaginationRowModel(),getRow:(u,g)=>{const f=(g?n.getCoreRowModel():n.getRowModel()).rowsById[u];if(!f)throw new Error;return f},_getDefaultColumnDef:C(()=>[n.options.defaultColumn],u=>{var g;return u=(g=u)!=null?g:{},{header:f=>{const c=f.header.column.columnDef;return c.accessorKey?c.accessorKey:c.accessorFn?c.id:null},cell:f=>{var c,m;return(c=(m=f.renderValue())==null||m.toString==null?void 0:m.toString())!=null?c:null},...n._features.reduce((f,c)=>Object.assign(f,c.getDefaultColumnDef==null?void 0:c.getDefaultColumnDef()),{}),...u}},{debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns},key:!1}),_getColumnDefs:()=>n.options.columns,getAllColumns:C(()=>[n._getColumnDefs()],u=>{const g=function(f,c,m){return m===void 0&&(m=0),f.map(p=>{const v=pn(n,p,m,c),S=p;return v.columns=S.columns?g(S.columns,v,m+1):[],v})};return g(u)},{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllFlatColumns:C(()=>[n.getAllColumns()],u=>u.flatMap(g=>g.getFlatColumns()),{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),_getAllFlatColumnsById:C(()=>[n.getAllFlatColumns()],u=>u.reduce((g,f)=>(g[f.id]=f,g),{}),{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getAllLeafColumns:C(()=>[n.getAllColumns(),n._getOrderColumnsFn()],(u,g)=>{let f=u.flatMap(c=>c.getLeafColumns());return g(f)},{key:!1,debug:()=>{var u;return(u=n.options.debugAll)!=null?u:n.options.debugColumns}}),getColumn:u=>n._getAllFlatColumnsById()[u]};Object.assign(n,d);for(let u=0;u{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:C(()=>[e,n,t,i],(s,a,l,d)=>({table:s,column:a,row:l,cell:d,getValue:d.getValue,renderValue:d.renderValue}),{key:!1,debug:()=>e.options.debugAll})};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}const qn=(e,t,n,r,o,i,s)=>{let a={id:t,index:r,original:n,depth:o,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const d=e.getColumn(l);if(d!=null&&d.accessorFn)return a._valuesCache[l]=d.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const d=e.getColumn(l);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=d.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var d;return(d=a.getValue(l))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>fn(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],d=a;for(;;){const u=d.getParentRow();if(!u)break;l.push(u),d=u}return l.reverse()},getAllCells:C(()=>[e.getAllLeafColumns()],l=>l.map(d=>Bn(e,a,d,d.id)),{key:!1,debug:()=>{var l;return(l=e.options.debugAll)!=null?l:e.options.debugRows}}),_getAllCellsByColumnId:C(()=>[a.getAllCells()],l=>l.reduce((d,u)=>(d[u.column.id]=u,d),{}),{key:"row.getAllCellsByColumnId",debug:()=>{var l;return(l=e.options.debugAll)!=null?l:e.options.debugRows}})};for(let l=0;ltypeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Un(){return e=>C(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,s){i===void 0&&(i=0);const a=[];for(let d=0;d{var t;return(t=e.options.debugAll)!=null?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}function Xn(){return e=>C(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,o=[],i=r.filter(l=>{var d;return(d=e.getColumn(l.id))==null?void 0:d.getCanSort()}),s={};i.forEach(l=>{const d=e.getColumn(l.id);d&&(s[l.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const a=l=>{const d=l.map(u=>({...u}));return d.sort((u,g)=>{for(let c=0;c{var g;o.push(u),(g=u.subRows)!=null&&g.length&&(u.subRows=a(u.subRows))}),d};return{rows:a(n.rows),flatRows:o,rowsById:n.rowsById}},{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}})}function Wn(){return e=>C(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(t,n,r)=>!n.rows.length||t!==!0&&!Object.keys(t??{}).length||!r?n:Yn(n),{key:!1,debug:()=>{var t;return(t=e.options.debugAll)!=null?t:e.options.debugTable}})}function Yn(e){const t=[],n=r=>{var o;t.push(r),(o=r.subRows)!=null&&o.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}/** - * react-table - * - * Copyright (c) TanStack - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function ie(e,t){return e?Kn(e)?w.createElement(e,t):e:null}function Kn(e){return Qn(e)||typeof e=="function"||Jn(e)}function Qn(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Jn(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Zn(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=w.useState(()=>({current:zn(t)})),[r,o]=w.useState(()=>n.current.initialState);return n.current.setOptions(i=>({...i,...e,state:{...r,...e.state},onStateChange:s=>{o(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}const Nt=w.createContext({dragDropManager:void 0});function T(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var tt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),ye=function(){return Math.random().toString(36).substring(7).split("").join(".")},nt={INIT:"@@redux/INIT"+ye(),REPLACE:"@@redux/REPLACE"+ye(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+ye()}};function er(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Lt(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(T(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(T(1));return n(Lt)(e,t)}if(typeof e!="function")throw new Error(T(2));var o=e,i=t,s=[],a=s,l=!1;function d(){a===s&&(a=s.slice())}function u(){if(l)throw new Error(T(3));return i}function g(p){if(typeof p!="function")throw new Error(T(4));if(l)throw new Error(T(5));var v=!0;return d(),a.push(p),function(){if(v){if(l)throw new Error(T(6));v=!1,d();var y=a.indexOf(p);a.splice(y,1),s=null}}}function f(p){if(!er(p))throw new Error(T(7));if(typeof p.type>"u")throw new Error(T(8));if(l)throw new Error(T(9));try{l=!0,i=o(i,p)}finally{l=!1}for(var v=s=a,S=0;Sr&&r[o]?r[o]:n||null,e)}function rr(e,t){return e.filter(n=>n!==t)}function jt(e){return typeof e=="object"}function or(e,t){const n=new Map,r=i=>{n.set(i,n.has(i)?n.get(i)+1:1)};e.forEach(r),t.forEach(r);const o=[];return n.forEach((i,s)=>{i===1&&o.push(s)}),o}function ir(e,t){return e.filter(n=>t.indexOf(n)>-1)}const Ue="dnd-core/INIT_COORDS",le="dnd-core/BEGIN_DRAG",Xe="dnd-core/PUBLISH_DRAG_SOURCE",ue="dnd-core/HOVER",de="dnd-core/DROP",ce="dnd-core/END_DRAG";function rt(e,t){return{type:Ue,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}const sr={type:Ue,payload:{clientOffset:null,sourceClientOffset:null}};function ar(e){return function(n=[],r={publishSource:!0}){const{publishSource:o=!0,clientOffset:i,getSourceClientOffset:s}=r,a=e.getMonitor(),l=e.getRegistry();e.dispatch(rt(i)),lr(n,a,l);const d=cr(n,a);if(d==null){e.dispatch(sr);return}let u=null;if(i){if(!s)throw new Error("getSourceClientOffset must be defined");ur(s),u=s(d)}e.dispatch(rt(i,u));const f=l.getSource(d).beginDrag(a,d);if(f==null)return;dr(f),l.pinSource(d);const c=l.getSourceType(d);return{type:le,payload:{itemType:c,item:f,sourceId:d,clientOffset:i||null,sourceClientOffset:u||null,isSourcePublic:!!o}}}}function lr(e,t,n){D(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(r){D(n.getSource(r),"Expected sourceIds to be registered.")})}function ur(e){D(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function dr(e){D(jt(e),"Item must be an object.")}function cr(e,t){let n=null;for(let r=e.length-1;r>=0;r--)if(t.canDragSource(e[r])){n=e[r];break}return n}function gr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fr(e){for(var t=1;t{const l=mr(s,a,o,r),d={type:de,payload:{dropResult:fr({},n,l)}};e.dispatch(d)})}}function hr(e){D(e.isDragging(),"Cannot call drop while not dragging."),D(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function mr(e,t,n,r){const o=n.getTarget(e);let i=o?o.drop(r,e):void 0;return vr(i),typeof i>"u"&&(i=t===0?{}:r.getDropResult()),i}function vr(e){D(typeof e>"u"||jt(e),"Drop result must either be an object or undefined.")}function Sr(e){const t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Cr(e){return function(){const n=e.getMonitor(),r=e.getRegistry();Dr(n);const o=n.getSourceId();return o!=null&&(r.getSource(o,!0).endDrag(n,o),r.unpinSource()),{type:ce}}}function Dr(e){D(e.isDragging(),"Cannot call endDrag while not dragging.")}function Me(e,t){return t===null?e===null:Array.isArray(e)?e.some(n=>n===t):e===t}function wr(e){return function(n,{clientOffset:r}={}){yr(n);const o=n.slice(0),i=e.getMonitor(),s=e.getRegistry(),a=i.getItemType();return br(o,s,a),Rr(o,i,s),Er(o,i,s),{type:ue,payload:{targetIds:o,clientOffset:r||null}}}}function yr(e){D(Array.isArray(e),"Expected targetIds to be an array.")}function Rr(e,t,n){D(t.isDragging(),"Cannot call hover while not dragging."),D(!t.didDrop(),"Cannot call hover after drop.");for(let r=0;r=0;r--){const o=e[r],i=t.getTargetType(o);Me(i,n)||e.splice(r,1)}}function Er(e,t,n){e.forEach(function(r){n.getTarget(r).hover(t,r)})}function Ir(e){return function(){if(e.getMonitor().isDragging())return{type:Xe}}}function xr(e){return{beginDrag:ar(e),publishDragSource:Ir(e),hover:wr(e),drop:pr(e),endDrag:Cr(e)}}class _r{receiveBackend(t){this.backend=t}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const t=this,{dispatch:n}=this.store;function r(i){return(...s)=>{const a=i.apply(t,s);typeof a<"u"&&n(a)}}const o=xr(this);return Object.keys(o).reduce((i,s)=>{const a=o[s];return i[s]=r(a),i},{})}dispatch(t){this.store.dispatch(t)}constructor(t,n){this.isSetUp=!1,this.handleRefCountChange=()=>{const r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=t,this.monitor=n,t.subscribe(this.handleRefCountChange)}}function Tr(e,t){return{x:e.x+t.x,y:e.y+t.y}}function kt(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Or(e){const{clientOffset:t,initialClientOffset:n,initialSourceClientOffset:r}=e;return!t||!n||!r?null:kt(Tr(t,r),n)}function Pr(e){const{clientOffset:t,initialClientOffset:n}=e;return!t||!n?null:kt(t,n)}const B=[],We=[];B.__IS_NONE__=!0;We.__IS_ALL__=!0;function $r(e,t){return e===B?!1:e===We||typeof t>"u"?!0:ir(t,e).length>0}class Mr{subscribeToStateChange(t,n={}){const{handlerIds:r}=n;D(typeof t=="function","listener must be a function."),D(typeof r>"u"||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let o=this.store.getState().stateId;const i=()=>{const s=this.store.getState(),a=s.stateId;try{a===o||a===o+1&&!$r(s.dirtyHandlerIds,r)||t()}finally{o=a}};return this.store.subscribe(i)}subscribeToOffsetChange(t){D(typeof t=="function","listener must be a function.");let n=this.store.getState().dragOffset;const r=()=>{const o=this.store.getState().dragOffset;o!==n&&(n=o,t())};return this.store.subscribe(r)}canDragSource(t){if(!t)return!1;const n=this.registry.getSource(t);return D(n,`Expected to find a valid source. sourceId=${t}`),this.isDragging()?!1:n.canDrag(this,t)}canDropOnTarget(t){if(!t)return!1;const n=this.registry.getTarget(t);if(D(n,`Expected to find a valid target. targetId=${t}`),!this.isDragging()||this.didDrop())return!1;const r=this.registry.getTargetType(t),o=this.getItemType();return Me(r,o)&&n.canDrop(this,t)}isDragging(){return!!this.getItemType()}isDraggingSource(t){if(!t)return!1;const n=this.registry.getSource(t,!0);if(D(n,`Expected to find a valid source. sourceId=${t}`),!this.isDragging()||!this.isSourcePublic())return!1;const r=this.registry.getSourceType(t),o=this.getItemType();return r!==o?!1:n.isDragging(this,t)}isOverTarget(t,n={shallow:!1}){if(!t)return!1;const{shallow:r}=n;if(!this.isDragging())return!1;const o=this.registry.getTargetType(t),i=this.getItemType();if(i&&!Me(o,i))return!1;const s=this.getTargetIds();if(!s.length)return!1;const a=s.indexOf(t);return r?a===s.length-1:a>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return Or(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return Pr(this.store.getState().dragOffset)}constructor(t,n){this.store=t,this.registry=n}}const ot=typeof global<"u"?global:self,Gt=ot.MutationObserver||ot.WebKitMutationObserver;function zt(e){return function(){const n=setTimeout(o,0),r=setInterval(o,50);function o(){clearTimeout(n),clearInterval(r),e()}}}function Fr(e){let t=1;const n=new Gt(e),r=document.createTextNode("");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}const Ar=typeof Gt=="function"?Fr:zt;class Vr{enqueueTask(t){const{queue:n,requestFlush:r}=this;n.length||(r(),this.flushing=!0),n[n.length]=t}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{const{queue:t}=this;for(;this.indexthis.capacity){for(let r=0,o=t.length-this.index;r{this.pendingErrors.push(t),this.requestErrorThrow()},this.requestFlush=Ar(this.flush),this.requestErrorThrow=zt(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}}class Hr{call(){try{this.task&&this.task()}catch(t){this.onError(t)}finally{this.task=null,this.release(this)}}constructor(t,n){this.onError=t,this.release=n,this.task=null}}class Nr{create(t){const n=this.freeTasks,r=n.length?n.pop():new Hr(this.onError,o=>n[n.length]=o);return r.task=t,r}constructor(t){this.onError=t,this.freeTasks=[]}}const Bt=new Vr,Lr=new Nr(Bt.registerPendingError);function jr(e){Bt.enqueueTask(Lr.create(e))}const Ye="dnd-core/ADD_SOURCE",Ke="dnd-core/ADD_TARGET",Qe="dnd-core/REMOVE_SOURCE",ge="dnd-core/REMOVE_TARGET";function kr(e){return{type:Ye,payload:{sourceId:e}}}function Gr(e){return{type:Ke,payload:{targetId:e}}}function zr(e){return{type:Qe,payload:{sourceId:e}}}function Br(e){return{type:ge,payload:{targetId:e}}}function qr(e){D(typeof e.canDrag=="function","Expected canDrag to be a function."),D(typeof e.beginDrag=="function","Expected beginDrag to be a function."),D(typeof e.endDrag=="function","Expected endDrag to be a function.")}function Ur(e){D(typeof e.canDrop=="function","Expected canDrop to be a function."),D(typeof e.hover=="function","Expected hover to be a function."),D(typeof e.drop=="function","Expected beginDrag to be a function.")}function Fe(e,t){if(t&&Array.isArray(e)){e.forEach(n=>Fe(n,!1));return}D(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var O;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(O||(O={}));let Xr=0;function Wr(){return Xr++}function Yr(e){const t=Wr().toString();switch(e){case O.SOURCE:return`S${t}`;case O.TARGET:return`T${t}`;default:throw new Error(`Unknown Handler Role: ${e}`)}}function it(e){switch(e[0]){case"S":return O.SOURCE;case"T":return O.TARGET;default:throw new Error(`Cannot parse handler ID: ${e}`)}}function st(e,t){const n=e.entries();let r=!1;do{const{done:o,value:[,i]}=n.next();if(i===t)return!0;r=!!o}while(!r);return!1}class Kr{addSource(t,n){Fe(t),qr(n);const r=this.addHandler(O.SOURCE,t,n);return this.store.dispatch(kr(r)),r}addTarget(t,n){Fe(t,!0),Ur(n);const r=this.addHandler(O.TARGET,t,n);return this.store.dispatch(Gr(r)),r}containsHandler(t){return st(this.dragSources,t)||st(this.dropTargets,t)}getSource(t,n=!1){return D(this.isSourceId(t),"Expected a valid source ID."),n&&t===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(t)}getTarget(t){return D(this.isTargetId(t),"Expected a valid target ID."),this.dropTargets.get(t)}getSourceType(t){return D(this.isSourceId(t),"Expected a valid source ID."),this.types.get(t)}getTargetType(t){return D(this.isTargetId(t),"Expected a valid target ID."),this.types.get(t)}isSourceId(t){return it(t)===O.SOURCE}isTargetId(t){return it(t)===O.TARGET}removeSource(t){D(this.getSource(t),"Expected an existing source."),this.store.dispatch(zr(t)),jr(()=>{this.dragSources.delete(t),this.types.delete(t)})}removeTarget(t){D(this.getTarget(t),"Expected an existing target."),this.store.dispatch(Br(t)),this.dropTargets.delete(t),this.types.delete(t)}pinSource(t){const n=this.getSource(t);D(n,"Expected an existing source."),this.pinnedSourceId=t,this.pinnedSource=n}unpinSource(){D(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(t,n,r){const o=Yr(t);return this.types.set(o,n),t===O.SOURCE?this.dragSources.set(o,r):t===O.TARGET&&this.dropTargets.set(o,r),o}constructor(t){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=t}}const Qr=(e,t)=>e===t;function Jr(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Zr(e,t,n=Qr){if(e.length!==t.length)return!1;for(let r=0;r0||!Zr(n,r)))return B;const s=r[r.length-1],a=n[n.length-1];return s!==a&&(s&&o.push(s),a&&o.push(a)),o}function to(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function no(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mo(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i=0)&&(n[o]=e[o]);return n}let lt=0;const re=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");var vo=w.memo(function(t){var{children:n}=t,r=ho(t,["children"]);const[o,i]=So(r);return w.useEffect(()=>{if(i){const s=qt();return++lt,()=>{--lt===0&&(s[re]=null)}}},[]),h.jsx(Nt.Provider,{value:o,children:n})});function So(e){if("manager"in e)return[{dragDropManager:e.manager},!1];const t=Co(e.backend,e.context,e.options,e.debugMode),n=!e.context;return[t,n]}function Co(e,t=qt(),n,r){const o=t;return o[re]||(o[re]={dragDropManager:fo(e,t,n,r)}),o[re]}function qt(){return typeof global<"u"?global:window}var Do=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(o=r;o--!==0;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(o=r;o--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;o--!==0;){var s=i[o];if(!e(t[s],n[s]))return!1}return!0}return t!==t&&n!==n};const wo=nn(Do),H=typeof window<"u"?w.useLayoutEffect:w.useEffect;function yo(e,t,n){const[r,o]=w.useState(()=>t(e)),i=w.useCallback(()=>{const s=t(e);wo(r,s)||(o(s),n&&n())},[r,e,n]);return H(i),[r,i]}function Ro(e,t,n){const[r,o]=yo(e,t,n);return H(function(){const s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(o,{handlerIds:[s]})},[e,o]),r}function Ut(e,t,n){return Ro(t,e||(()=>({})),()=>n.reconnect())}function Xt(e,t){const n=[];return typeof e!="function"&&n.push(e),w.useMemo(()=>typeof e=="function"?e():e,n)}function bo(e){return w.useMemo(()=>e.hooks.dragSource(),[e])}function Eo(e){return w.useMemo(()=>e.hooks.dragPreview(),[e])}let Re=!1,be=!1;class Io{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){D(!Re,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Re=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Re=!1}}isDragging(){if(!this.sourceId)return!1;D(!be,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return be=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{be=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let Ee=!1;class xo{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;D(!Ee,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Ee=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Ee=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function _o(e,t,n){const r=n.getRegistry(),o=r.addTarget(e,t);return[o,()=>r.removeTarget(o)]}function To(e,t,n){const r=n.getRegistry(),o=r.addSource(e,t);return[o,()=>r.removeSource(o)]}function Ae(e,t,n,r){let o;if(o!==void 0)return!!o;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;const a=Object.prototype.hasOwnProperty.bind(t);for(let l=0;l, or turn it into a drag source or a drop target itself.`)}function Po(e){return(t=null,n=null)=>{if(!w.isValidElement(t)){const i=t;return e(i,n),i}const r=t;return Oo(r),$o(r,n?i=>e(i,n):e)}}function Wt(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const o=Po(r);t[n]=()=>o}}),t}function ut(e,t){typeof e=="function"?e(t):e.current=t}function $o(e,t){const n=e.ref;return D(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a or
. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?w.cloneElement(e,{ref:r=>{ut(n,r),ut(t,r)}}):w.cloneElement(e,{ref:t})}class Mo{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ae(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ae(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=Wt({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,Ve(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,Ve(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class Fo{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ae(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=Wt({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,Ve(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function k(){const{dragDropManager:e}=w.useContext(Nt);return D(e!=null,"Expected drag drop context"),e}function Ao(e,t){const n=k(),r=w.useMemo(()=>new Mo(n.getBackend()),[n]);return H(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),H(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function Vo(){const e=k();return w.useMemo(()=>new Io(e),[e])}class Ho{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r??null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,o=this.monitor,{isDragging:i}=r;return i?i(o):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:o}=t;o&&o(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function No(e,t,n){const r=w.useMemo(()=>new Ho(e,t,n),[t,n]);return w.useEffect(()=>{r.spec=e},[e]),r}function Lo(e){return w.useMemo(()=>{const t=e.type;return D(t!=null,"spec.type must be defined"),t},[e])}function jo(e,t,n){const r=k(),o=No(e,t,n),i=Lo(e);H(function(){if(i!=null){const[a,l]=To(i,o,r);return t.receiveHandlerId(a),n.receiveHandlerId(a),l}},[r,t,n,o,i])}function ko(e,t){const n=Xt(e);D(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=Vo(),o=Ao(n.options,n.previewOptions);return jo(n,r,o),[Ut(n.collect,r,o),bo(o),Eo(o)]}function Go(e){return w.useMemo(()=>e.hooks.dropTarget(),[e])}function zo(e){const t=k(),n=w.useMemo(()=>new Fo(t.getBackend()),[t]);return H(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function Bo(){const e=k();return w.useMemo(()=>new xo(e),[e])}function qo(e){const{accept:t}=e;return w.useMemo(()=>(D(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class Uo{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function Xo(e,t){const n=w.useMemo(()=>new Uo(e,t),[t]);return w.useEffect(()=>{n.spec=e},[e]),n}function Wo(e,t,n){const r=k(),o=Xo(e,t),i=qo(e);H(function(){const[a,l]=_o(i,o,r);return t.receiveHandlerId(a),n.receiveHandlerId(a),l},[r,t,o,n,i.map(s=>s.toString()).join("|")])}function Yo(e,t){const n=Xt(e),r=Bo(),o=zo(n.options);return Wo(n,r,o),[Ut(n.collect,r,o),Go(o)]}function Yt(e){let t=null;return()=>(t==null&&(t=e()),t)}function Ko(e,t){return e.filter(n=>n!==t)}function Qo(e,t){const n=new Set,r=i=>n.add(i);e.forEach(r),t.forEach(r);const o=[];return n.forEach(i=>o.push(i)),o}class Jo{enter(t){const n=this.entered.length,r=o=>this.isNodeInDocument(o)&&(!o.contains||o.contains(t));return this.entered=Qo(this.entered.filter(r),[t]),n===0&&this.entered.length>0}leave(t){const n=this.entered.length;return this.entered=Ko(this.entered.filter(this.isNodeInDocument),t),n>0&&this.entered.length===0}reset(){this.entered=[]}constructor(t){this.entered=[],this.isNodeInDocument=t}}class Zo{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(t=>{Object.defineProperty(this.item,t,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${t}" until the drop event.`),null}})})}loadDataTransfer(t){if(t){const n={};Object.keys(this.config.exposeProperties).forEach(r=>{const o=this.config.exposeProperties[r];o!=null&&(n[r]={value:o(t,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,n)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(t,n){return n===t.getSourceId()}endDrag(){}constructor(t){this.config=t,this.item={},this.initializeExposedProperties()}}const Kt="__NATIVE_FILE__",Qt="__NATIVE_URL__",Jt="__NATIVE_TEXT__",Zt="__NATIVE_HTML__",dt=Object.freeze(Object.defineProperty({__proto__:null,FILE:Kt,HTML:Zt,TEXT:Jt,URL:Qt},Symbol.toStringTag,{value:"Module"}));function Ie(e,t,n){const r=t.reduce((o,i)=>o||e.getData(i),"");return r??n}const He={[Kt]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[Zt]:{exposeProperties:{html:(e,t)=>Ie(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Qt]:{exposeProperties:{urls:(e,t)=>Ie(e,t,"").split(` -`),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[Jt]:{exposeProperties:{text:(e,t)=>Ie(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function ei(e,t){const n=He[e];if(!n)throw new Error(`native type ${e} has no configuration`);const r=new Zo(n);return r.loadDataTransfer(t),r}function xe(e){if(!e)return null;const t=Array.prototype.slice.call(e.types||[]);return Object.keys(He).filter(n=>{const r=He[n];return r!=null&&r.matchesTypes?r.matchesTypes.some(o=>t.indexOf(o)>-1):!1})[0]||null}const ti=Yt(()=>/firefox/i.test(navigator.userAgent)),en=Yt(()=>!!window.safari);class ct{interpolate(t){const{xs:n,ys:r,c1s:o,c2s:i,c3s:s}=this;let a=n.length-1;if(t===n[a])return r[a];let l=0,d=s.length-1,u;for(;l<=d;){u=Math.floor(.5*(l+d));const c=n[u];if(ct)d=u-1;else return r[u]}a=Math.max(0,d);const g=t-n[a],f=g*g;return r[a]+o[a]*g+i[a]*f+s[a]*g*f}constructor(t,n){const{length:r}=t,o=[];for(let c=0;ct[c]{let F=new ct([0,.5,1],[l.y,l.y/u*m,l.y+m-u]).interpolate(f);return en()&&i&&(F+=(window.devicePixelRatio-1)*m),F},v=()=>new ct([0,.5,1],[l.x,l.x/d*c,l.x+c-d]).interpolate(g),{offsetX:S,offsetY:y}=o,R=S===0||S,E=y===0||y;return{x:R?S:v(),y:E?y:p()}}class si{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var t;return!((t=this.globalContext)===null||t===void 0)&&t.document?this.globalContext.document:this.window?this.window.document:void 0}get rootElement(){var t;return((t=this.optionsArgs)===null||t===void 0?void 0:t.rootElement)||this.window}constructor(t,n){this.ownerDocument=null,this.globalContext=t,this.optionsArgs=n}}function ai(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gt(e){for(var t=1;t{this.sourcePreviewNodes.delete(t),this.sourcePreviewNodeOptions.delete(t)}}connectDragSource(t,n,r){this.sourceNodes.set(t,n),this.sourceNodeOptions.set(t,r);const o=s=>this.handleDragStart(s,t),i=s=>this.handleSelectStart(s);return n.setAttribute("draggable","true"),n.addEventListener("dragstart",o),n.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(t),this.sourceNodeOptions.delete(t),n.removeEventListener("dragstart",o),n.removeEventListener("selectstart",i),n.setAttribute("draggable","false")}}connectDropTarget(t,n){const r=s=>this.handleDragEnter(s,t),o=s=>this.handleDragOver(s,t),i=s=>this.handleDrop(s,t);return n.addEventListener("dragenter",r),n.addEventListener("dragover",o),n.addEventListener("drop",i),()=>{n.removeEventListener("dragenter",r),n.removeEventListener("dragover",o),n.removeEventListener("drop",i)}}addEventListeners(t){t.addEventListener&&(t.addEventListener("dragstart",this.handleTopDragStart),t.addEventListener("dragstart",this.handleTopDragStartCapture,!0),t.addEventListener("dragend",this.handleTopDragEndCapture,!0),t.addEventListener("dragenter",this.handleTopDragEnter),t.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.addEventListener("dragover",this.handleTopDragOver),t.addEventListener("dragover",this.handleTopDragOverCapture,!0),t.addEventListener("drop",this.handleTopDrop),t.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(t){t.removeEventListener&&(t.removeEventListener("dragstart",this.handleTopDragStart),t.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),t.removeEventListener("dragend",this.handleTopDragEndCapture,!0),t.removeEventListener("dragenter",this.handleTopDragEnter),t.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),t.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),t.removeEventListener("dragover",this.handleTopDragOver),t.removeEventListener("dragover",this.handleTopDragOverCapture,!0),t.removeEventListener("drop",this.handleTopDrop),t.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourceNodeOptions.get(t);return gt({dropEffect:this.altKeyPressed?"copy":"move"},n||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){const t=this.monitor.getSourceId(),n=this.sourcePreviewNodeOptions.get(t);return gt({anchorX:.5,anchorY:.5,captureDraggingState:!1},n||{})}isDraggingNativeItem(){const t=this.monitor.getItemType();return Object.keys(dt).some(n=>dt[n]===t)}beginDragNativeItem(t,n){this.clearCurrentDragSourceNode(),this.currentNativeSource=ei(t,n),this.currentNativeHandle=this.registry.addSource(t,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(t){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=t;const n=1e3;this.mouseMoveTimeoutTimer=setTimeout(()=>{var r;return(r=this.rootElement)===null||r===void 0?void 0:r.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},n)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var t;(t=this.window)===null||t===void 0||t.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(t,n){t.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(n))}handleDragEnter(t,n){this.dragEnterTargetIds.unshift(n)}handleDragOver(t,n){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(n)}handleDrop(t,n){this.dropTargetIds.unshift(n)}constructor(t,n,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=o=>{const i=this.sourceNodes.get(o);return i&&tn(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=o=>!!(o&&this.document&&this.document.body&&this.document.body.contains(o)),this.endDragIfSourceWasRemovedFromDOM=()=>{const o=this.currentDragSourceNode;o==null||this.isNodeInDocument(o)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=o=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(o||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=o=>{if(o.defaultPrevented)return;const{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;const s=Q(o);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});const{dataTransfer:a}=o,l=xe(a);if(this.monitor.isDragging()){if(a&&typeof a.setDragImage=="function"){const u=this.monitor.getSourceId(),g=this.sourceNodes.get(u),f=this.sourcePreviewNodes.get(u)||g;if(f){const{anchorX:c,anchorY:m,offsetX:p,offsetY:v}=this.getCurrentSourcePreviewNodeOptions(),R=ii(g,f,s,{anchorX:c,anchorY:m},{offsetX:p,offsetY:v});a.setDragImage(f,R.x,R.y)}}try{a==null||a.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(o.target);const{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(l)this.beginDragNativeItem(l);else{if(a&&!a.types&&(o.target&&!o.target.hasAttribute||!o.target.hasAttribute("draggable")))return;o.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=o=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(o.dataTransfer)}if(!this.enterLeaveCounter.enter(o.target)||this.monitor.isDragging())return;const{dataTransfer:a}=o,l=xe(a);l&&this.beginDragNativeItem(l,a)},this.handleTopDragEnter=o=>{const{dragEnterTargetIds:i}=this;if(this.dragEnterTargetIds=[],!this.monitor.isDragging())return;this.altKeyPressed=o.altKey,i.length>0&&this.actions.hover(i,{clientOffset:Q(o)}),i.some(a=>this.monitor.canDropOnTarget(a))&&(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect()))},this.handleTopDragOverCapture=o=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(o.dataTransfer)}},this.handleTopDragOver=o=>{const{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none");return}this.altKeyPressed=o.altKey,this.lastClientOffset=Q(o),this.scheduleHover(i),(i||[]).some(a=>this.monitor.canDropOnTarget(a))?(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?o.preventDefault():(o.preventDefault(),o.dataTransfer&&(o.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=o=>{this.isDraggingNativeItem()&&o.preventDefault(),this.enterLeaveCounter.leave(o.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=o=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;o.preventDefault(),(i=this.currentNativeSource)===null||i===void 0||i.loadDataTransfer(o.dataTransfer)}else xe(o.dataTransfer)&&o.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=o=>{const{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:Q(o)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=o=>{const i=o.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(o.preventDefault(),i.dragDrop()))},this.options=new si(n,r),this.actions=t.getActions(),this.monitor=t.getMonitor(),this.registry=t.getRegistry(),this.enterLeaveCounter=new Jo(this.isNodeInDocument)}}const ui=function(t,n,r){return new li(t,n,r)},se=({expanded:e,onClick:t})=>h.jsx(b.Body.Cell,{isTextContent:!1,className:"pr-0",children:h.jsx("button",{type:"button",className:"flex h-full w-full items-center justify-center",onClick:t,tabIndex:0,children:e?h.jsx(on,{className:"fill-neutral-600"}):h.jsx(sn,{className:"fill-neutral-600"})})});try{se.displayName="ExpandableButtonCell",se.__docgenInfo={description:"",displayName:"ExpandableButtonCell",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"() => void"}},expanded:{defaultValue:null,description:"",name:"expanded",required:!0,type:{name:"boolean"}}}}}catch{}const Ne=({row:e,reorderRow:t,virtualMeasureRef:n,getExpandableContent:r})=>{const[,o]=Yo({accept:"row",drop:f=>t(f.index,e.index)}),i=e.getIsExpanded(),s=e.getCanExpand(),[{isDragging:a},l,d]=ko({collect:f=>({isDragging:f.isDragging()}),item:()=>e,type:"row",isDragging:()=>(e.getIsExpanded()&&e.toggleExpanded(),!0)}),[u,...g]=e.getVisibleCells();return h.jsxs(w.Fragment,{children:[h.jsxs(b.Body.Row,{ref:d,isExpanded:i,className:a?"bg-abusix-neutral-100":void 0,children:[h.jsx(b.Body.Cell,{ref:o,children:h.jsx("button",{"aria-label":"Drag row",type:"button",ref:l,children:h.jsx(an,{})})}),h.jsx(b.Body.Cell,{ref:n,children:ie(u.column.columnDef.cell,u.getContext())},u.id),g.map(f=>h.jsx(b.Body.Cell,{style:f.column.columnDef.meta,children:ie(f.column.columnDef.cell,f.getContext())},f.id)),s&&h.jsx(se,{onClick:()=>e.toggleExpanded(),expanded:i},`${e.id}-expandable-icon`)]}),s&&i&&r?h.jsxs(b.Body.Row,{children:[h.jsx(b.Body.Cell,{}),h.jsx(b.Body.Cell,{isTextContent:!1,colSpan:e.getVisibleCells().length+1,children:r(e,e.index)})]},`${e.id}-expandable-content`):null]},e.id)};try{Ne.displayName="DraggableRow",Ne.__docgenInfo={description:"",displayName:"DraggableRow",props:{row:{defaultValue:null,description:"",name:"row",required:!0,type:{name:"Row"}},reorderRow:{defaultValue:null,description:"",name:"reorderRow",required:!0,type:{name:"(draggedRowIndex: number, targetRowIndex: number) => void"}},virtualMeasureRef:{defaultValue:null,description:"",name:"virtualMeasureRef",required:!1,type:{name:"Ref"}},getExpandableContent:{defaultValue:null,description:"",name:"getExpandableContent",required:!1,type:{name:"((row: Row, index: number) => ReactNode)"}}}}}catch{}const Le=({direction:e})=>{const t="ml-1 w-3.5 fill-neutral-600",n=e==="asc"?h.jsx(ln,{className:t}):h.jsx(un,{className:t});return h.jsx(h.Fragment,{children:n})};try{Le.displayName="SortIndicator",Le.__docgenInfo={description:"",displayName:"SortIndicator",props:{direction:{defaultValue:null,description:"",name:"direction",required:!0,type:{name:"enum",value:[{value:'"desc"'},{value:'"asc"'}]}}}}}catch{}const je=({header:e})=>{const t=e.column.getCanSort(),n=t?e.column.getToggleSortingHandler():void 0,r=e.column.getIsSorted();return h.jsx(b.Header.Cell,{colSpan:e.colSpan,style:e.column.columnDef.meta,children:e.isPlaceholder?null:h.jsxs("div",{role:"button",tabIndex:-1,className:_t("inline-flex",e.column.getCanSort()?"cursor-pointer select-none":""),style:{textAlign:"inherit"},onKeyDown:n,onClick:n,children:[ie(e.column.columnDef.header,e.getContext()),t&&r?h.jsx(Le,{direction:r}):null]})},e.id)};try{je.displayName="HeaderCell",je.__docgenInfo={description:"",displayName:"HeaderCell",props:{header:{defaultValue:null,description:"",name:"header",required:!0,type:{name:"Header"}}}}}catch{}const ke=({group:e,isDraggableColumnEnabled:t,isExpandableColumnEnabled:n})=>h.jsxs(b.Header.Row,{children:[t?h.jsx("th",{className:"w-16 bg-neutral-50"}):null,e.headers.map(r=>h.jsx(je,{header:r},r.id)),n?h.jsx("th",{className:"w-16 bg-neutral-50"}):null]},e.id);try{ke.displayName="VirtualizedHeaderGroup",ke.__docgenInfo={description:"",displayName:"VirtualizedHeaderGroup",props:{group:{defaultValue:null,description:"",name:"group",required:!0,type:{name:"HeaderGroup"}},isDraggableColumnEnabled:{defaultValue:null,description:"",name:"isDraggableColumnEnabled",required:!1,type:{name:"boolean"}},isExpandableColumnEnabled:{defaultValue:null,description:"",name:"isExpandableColumnEnabled",required:!1,type:{name:"boolean"}}}}}catch{}const q=({isDraggableRowsEnabled:e=!1,isExpandableRowsEnabled:t=!1,getExpandableContent:n,data:r,showPlaceholder:o=!1,placeholder:i,columnDefs:s,virtualizerOptions:a={}})=>{const l=G.useRef(null),[d,u]=G.useState([...r]),[g,f]=G.useState([]),c=Zn({data:d,columns:s,state:{sorting:g},getRowCanExpand:()=>t,onSortingChange:f,getExpandedRowModel:t?Wn():void 0,getCoreRowModel:Un(),getSortedRowModel:Xn()});G.useEffect(()=>{u(r)},[r]);const{rows:m}=c.getRowModel(),p=rn({count:m.length,getScrollElement:()=>l.current,estimateSize:()=>64,overscan:10,...a}),v=p.getVirtualItems(),S=v.length,y=m.length,R=S>0&&v[0].start||0,E=S>0?y-(v[S-1].end||0):0,I=($,_)=>{d.splice(_,0,d.splice($,1)[0]),u([...d])},F=c.getHeaderGroups().map($=>h.jsx(ke,{group:$,isDraggableColumnEnabled:e,isExpandableColumnEnabled:t},$.id)),fe=v.map($=>{const _=m[$.index],pe=_.getIsExpanded();return e?h.jsx(Ne,{row:_,virtualMeasureRef:p.measureElement,reorderRow:I,getExpandableContent:n},_.id):h.jsxs(G.Fragment,{children:[h.jsxs(b.Body.Row,{isExpanded:pe,children:[_.getVisibleCells().map(X=>h.jsx(b.Body.Cell,{style:X.column.columnDef.meta,children:ie(X.column.columnDef.cell,X.getContext())},X.id)),t?h.jsx(se,{onClick:()=>_.toggleExpanded(),expanded:pe},`${_.id}-expandable-icon`):null]},_.id),pe&&n?h.jsx(b.Body.Row,{children:h.jsx(b.Body.Cell,{colSpan:s.length,children:n(_,$.index)})},`${_.id}-expandable-content`):null]},_.id)});return h.jsx("div",{ref:l,className:_t("h-full overflow-y-auto rounded-lg border border-neutral-300 bg-neutral-0"),children:h.jsxs(b,{isContainerBordersShown:!1,height:r.length?p.getTotalSize():void 0,hasFixedTableLayout:!0,children:[h.jsx(b.Header,{children:F}),h.jsx(b.Body,{children:r.length&&!o?h.jsxs(h.Fragment,{children:[R>0?h.jsx("tr",{children:h.jsx(b.Body.Cell,{style:{height:`${R}px`}})}):null,fe,E>0?h.jsx("tr",{children:h.jsx("td",{"aria-hidden":"true",style:{height:`${E}px`}})}):null]}):i})]})})},j=({...e})=>h.jsx(vo,{backend:ui,children:h.jsx(q,{isDraggableRowsEnabled:!0,...e})});try{q.displayName="TableVirtualized",q.__docgenInfo={description:"",displayName:"TableVirtualized",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"TableData[]"}},columnDefs:{defaultValue:null,description:"",name:"columnDefs",required:!0,type:{name:"ColumnDef[]"}},showPlaceholder:{defaultValue:{value:"false"},description:"",name:"showPlaceholder",required:!1,type:{name:"boolean"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"ReactNode"}},isDraggableRowsEnabled:{defaultValue:{value:"false"},description:"",name:"isDraggableRowsEnabled",required:!1,type:{name:"boolean"}},isExpandableRowsEnabled:{defaultValue:{value:"false"},description:"",name:"isExpandableRowsEnabled",required:!1,type:{name:"boolean"}},getExpandableContent:{defaultValue:null,description:"",name:"getExpandableContent",required:!1,type:{name:"((row: Row, index: number) => ReactNode)"}},virtualizerOptions:{defaultValue:{value:"{}"},description:"",name:"virtualizerOptions",required:!1,type:{name:'PartialKeys, "observeElementRect" | "observeElementOffset" | "scrollToFn" | "count" | "getScrollElement" | "estimateSize">'}}}}}catch{}try{j.displayName="WithDragAndDrop",j.__docgenInfo={description:"",displayName:"WithDragAndDrop",props:{data:{defaultValue:null,description:"",name:"data",required:!0,type:{name:"TableData[]"}},columnDefs:{defaultValue:null,description:"",name:"columnDefs",required:!0,type:{name:"ColumnDef[]"}},showPlaceholder:{defaultValue:{value:"false"},description:"",name:"showPlaceholder",required:!1,type:{name:"boolean"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"ReactNode"}},isDraggableRowsEnabled:{defaultValue:{value:"false"},description:"",name:"isDraggableRowsEnabled",required:!1,type:{name:"boolean"}},isExpandableRowsEnabled:{defaultValue:{value:"false"},description:"",name:"isExpandableRowsEnabled",required:!1,type:{name:"boolean"}},getExpandableContent:{defaultValue:null,description:"",name:"getExpandableContent",required:!1,type:{name:"((row: Row, index: number) => ReactNode)"}},virtualizerOptions:{defaultValue:{value:"{}"},description:"",name:"virtualizerOptions",required:!1,type:{name:'PartialKeys, "observeElementRect" | "observeElementOffset" | "scrollToFn" | "count" | "getScrollElement" | "estimateSize">'}}}}}catch{}const yi={title:"Table / Virtualized",component:q};function N(){const e=[];for(let t=0;t<20;t++){const n={name:`${t.toString()} name`,description:`${t.toString()} description`,price:t,action:`${t.toString()} action`};e.push(n)}return e}const di=()=>{const e=U(),t=w.useMemo(()=>N(),[]),[n,r]=w.useState(t),o=[e.accessor("name",{header:"Team Members",enableSorting:!0}),e.accessor("description",{header:"Description",enableSorting:!0})];return h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"h-[500px]",children:h.jsx(q,{data:n,columnDefs:o,isExpandableRowsEnabled:!0,getExpandableContent:i=>h.jsx("p",{className:"paragraph-100",children:i.original.description})})}),h.jsx(Ge,{}),h.jsxs("p",{className:"paragraph-300 mb-8",children:["Entries: ",n.length.toLocaleString()]}),h.jsx(ae,{variant:"primary",onClick:()=>r(N()),children:"Recreate Data"})]})},J={render:()=>h.jsx(di,{})},Z=()=>{const e=U(),t=w.useMemo(()=>N(),[]),[n,r]=w.useState(t),o=[e.accessor("name",{header:"Team Members",enableSorting:!0,meta:{width:"200px"}}),e.accessor("description",{header:"Description",enableSorting:!0}),e.accessor("action",{header:"Action",enableSorting:!1,meta:{textAlign:"right",width:80},cell:i=>h.jsx(cn,{onClick:()=>i.getValue(),Icon:dn,variant:"danger"})})];return h.jsxs(h.Fragment,{children:[h.jsx(j,{isDraggableRowsEnabled:!0,data:n,columnDefs:o}),h.jsx(Ge,{}),h.jsxs("p",{className:"paragraph-300 mb-8",children:["Entries: ",n.length.toLocaleString()]}),h.jsx(ae,{variant:"primary",onClick:()=>r(N()),children:"Recreate Data"})]})},ee=()=>{const e=U(),t=w.useMemo(()=>N(),[]),[n,r]=w.useState(t),o=[e.accessor("name",{header:"Team Members",enableSorting:!0,meta:{width:"200px"}}),e.accessor("description",{header:"Description",enableSorting:!0})];return h.jsxs(h.Fragment,{children:[h.jsx(j,{isDraggableRowsEnabled:!0,isExpandableRowsEnabled:!0,getExpandableContent:i=>h.jsx("p",{className:"paragraph-100",children:i.original.description}),data:n,columnDefs:o}),h.jsx(Ge,{}),h.jsxs("p",{className:"paragraph-300 mb-8",children:["Entries: ",n.length.toLocaleString()]}),h.jsx(ae,{variant:"primary",onClick:()=>r(N()),children:"Recreate Data"})]})},te=()=>{const e=U(),t=[],n=[e.accessor("name",{header:"Team Members",enableSorting:!0,meta:{width:"200px"}}),e.accessor("description",{header:"Description",enableSorting:!0})];return h.jsx(j,{isDraggableRowsEnabled:!0,data:t,columnDefs:n,isExpandableRowsEnabled:!0,getExpandableContent:r=>h.jsx("p",{className:"paragraph-100",children:r.original.description}),placeholder:h.jsx(b.Body.EmptyPlaceholder,{title:"Empty table",description:"You have not added any items yet.",colSpan:n.length+1,children:h.jsx(ae,{variant:"secondary",onClick:()=>alert("clicked"),children:"Add New Item"})})})},ne=()=>{const e=U(),[t,n]=w.useState([]);w.useEffect(()=>{const o=setTimeout(()=>{n(N())},4e3);return()=>{clearTimeout(o)}},[]);const r=[e.accessor("name",{header:"Team Members",enableSorting:!0,meta:{width:"200px"}}),e.accessor("description",{header:"Description",enableSorting:!0})];return h.jsx("div",{className:"h-96 overflow-y-scroll",children:h.jsx(j,{isDraggableRowsEnabled:!0,data:t,columnDefs:r,placeholder:h.jsx(b.Body.LoadingIndicator,{colSpan:r.length+1})})})};var ft,pt,ht;J.parameters={...J.parameters,docs:{...(ft=J.parameters)==null?void 0:ft.docs,source:{originalSource:`{ - render: () => -}`,...(ht=(pt=J.parameters)==null?void 0:pt.docs)==null?void 0:ht.source}}};var mt,vt,St;Z.parameters={...Z.parameters,docs:{...(mt=Z.parameters)==null?void 0:mt.docs,source:{originalSource:`() => { - const columnHelper = createColumnHelper(); - const exampleData = useMemo(() => createExampleData(), []); - const [data, setData] = useState(exampleData); - const columnDefs = [columnHelper.accessor("name", { - header: "Team Members", - enableSorting: true, - meta: { - width: "200px" - } - }), columnHelper.accessor("description", { - header: "Description", - enableSorting: true - }), columnHelper.accessor("action", { - header: "Action", - enableSorting: false, - meta: { - textAlign: "right", - width: 80 - }, - cell: row => row.getValue()} Icon={TrashIcon} variant="danger" /> - })]; - return <> - isDraggableRowsEnabled data={data} columnDefs={columnDefs} /> - - - -

Entries: {data.length.toLocaleString()}

- - - ; -}`,...(St=(vt=Z.parameters)==null?void 0:vt.docs)==null?void 0:St.source}}};var Ct,Dt,wt;ee.parameters={...ee.parameters,docs:{...(Ct=ee.parameters)==null?void 0:Ct.docs,source:{originalSource:`() => { - const columnHelper = createColumnHelper(); - const exampleData = useMemo(() => createExampleData(), []); - const [data, setData] = useState(exampleData); - const columnDefs = [columnHelper.accessor("name", { - header: "Team Members", - enableSorting: true, - meta: { - width: "200px" - } - }), columnHelper.accessor("description", { - header: "Description", - enableSorting: true - })]; - return <> - isDraggableRowsEnabled isExpandableRowsEnabled - // eslint-disable-next-line react/no-unstable-nested-components - getExpandableContent={row =>

{row.original.description}

} data={data} columnDefs={columnDefs} /> - - - -

Entries: {data.length.toLocaleString()}

- - - ; -}`,...(wt=(Dt=ee.parameters)==null?void 0:Dt.docs)==null?void 0:wt.source}}};var yt,Rt,bt;te.parameters={...te.parameters,docs:{...(yt=te.parameters)==null?void 0:yt.docs,source:{originalSource:`() => { - const columnHelper = createColumnHelper(); - const exampleData: ExampleData[] = []; - const columnDefs = [columnHelper.accessor("name", { - header: "Team Members", - enableSorting: true, - meta: { - width: "200px" - } - }), columnHelper.accessor("description", { - header: "Description", - enableSorting: true - })]; - return isDraggableRowsEnabled data={exampleData} columnDefs={columnDefs} isExpandableRowsEnabled - // eslint-disable-next-line react/no-unstable-nested-components - getExpandableContent={row =>

{row.original.description}

} placeholder={ - - } />; -}`,...(bt=(Rt=te.parameters)==null?void 0:Rt.docs)==null?void 0:bt.source}}};var Et,It,xt;ne.parameters={...ne.parameters,docs:{...(Et=ne.parameters)==null?void 0:Et.docs,source:{originalSource:`() => { - const columnHelper = createColumnHelper(); - const [data, setData] = useState([]); - useEffect(() => { - const timeout = setTimeout(() => { - setData(createExampleData()); - }, 4000); - return () => { - clearTimeout(timeout); - }; - }, []); - const columnDefs = [columnHelper.accessor("name", { - header: "Team Members", - enableSorting: true, - meta: { - width: "200px" - } - }), columnHelper.accessor("description", { - header: "Description", - enableSorting: true - })]; - return
- isDraggableRowsEnabled data={data} columnDefs={columnDefs} placeholder={} /> -
; -}`,...(xt=(It=ne.parameters)==null?void 0:It.docs)==null?void 0:xt.source}}};const Ri=["Default","Draggable","DraggableAndExpandable","EmptyTable","LoadingTable"];export{J as Default,Z as Draggable,ee as DraggableAndExpandable,te as EmptyTable,ne as LoadingTable,Ri as __namedExportsOrder,yi as default}; diff --git a/assets/text-input.stories-BT2GI3td.js b/assets/text-input.stories-B1dwyupg.js similarity index 96% rename from assets/text-input.stories-BT2GI3td.js rename to assets/text-input.stories-B1dwyupg.js index 432d4397..1d232187 100644 --- a/assets/text-input.stories-BT2GI3td.js +++ b/assets/text-input.stories-B1dwyupg.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as V}from"./index-0d5eMwbi.js";import{F as r}from"./form-field-BtJxu7hP.js";import{g as _}from"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-Da1HxQE-.js";import"./index-h1jAayoZ.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const pe={title:"Input/TextInput",component:r.TextInput},s=({error:d=!1,disabled:k=!1,hasLeftIcon:y=!1,readOnly:D=!1,value:E,optional:H})=>{const[O,R]=V.useState(E);return e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",optional:H,children:"Label"}),e.jsx(r.Description,{id:"value-description",children:"Description"})]}),e.jsx(r.TextInput,{id:"value",value:O,onChange:F=>R(F.target.value),ariaDescribedBy:"value-description",error:d,disabled:k,LeftIcon:y?_:void 0,readOnly:D}),d?e.jsx(r.ErrorMessage,{children:"Error message."}):null]})},t={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{})})},a={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{error:!0})})},o={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{hasLeftIcon:!0})})},n={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{readOnly:!0,value:"Readonly text"})})},i={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{disabled:!0})})},c={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{optional:!0})})};var p,m,l;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{r as V}from"./index-0d5eMwbi.js";import{F as r}from"./form-field-2xLK_lYH.js";import{g as _}from"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-BIezdMmM.js";import"./index-BgfbgFhO.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const pe={title:"Input/TextInput",component:r.TextInput},s=({error:d=!1,disabled:k=!1,hasLeftIcon:y=!1,readOnly:D=!1,value:E,optional:H})=>{const[O,R]=V.useState(E);return e.jsxs(r,{children:[e.jsxs(r.LabelGroup,{children:[e.jsx(r.Label,{htmlFor:"value",optional:H,children:"Label"}),e.jsx(r.Description,{id:"value-description",children:"Description"})]}),e.jsx(r.TextInput,{id:"value",value:O,onChange:F=>R(F.target.value),ariaDescribedBy:"value-description",error:d,disabled:k,LeftIcon:y?_:void 0,readOnly:D}),d?e.jsx(r.ErrorMessage,{children:"Error message."}):null]})},t={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{})})},a={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{error:!0})})},o={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{hasLeftIcon:!0})})},n={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{readOnly:!0,value:"Readonly text"})})},i={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{disabled:!0})})},c={render:()=>e.jsx("div",{className:"w-72",children:e.jsx(s,{optional:!0})})};var p,m,l;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`{ render: () =>
diff --git a/assets/textarea.stories-82EphPuj.js b/assets/textarea.stories-BxDua9o8.js similarity index 95% rename from assets/textarea.stories-82EphPuj.js rename to assets/textarea.stories-BxDua9o8.js index f5e2c26b..e721c4e1 100644 --- a/assets/textarea.stories-82EphPuj.js +++ b/assets/textarea.stories-BxDua9o8.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-C798UXYj.js";import{r as g}from"./index-0d5eMwbi.js";import{F as e}from"./form-field-BtJxu7hP.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-Da1HxQE-.js";import"./index-h1jAayoZ.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const K={title:"Input/Textarea",component:e.Textarea},t=({error:i=!1,disabled:v=!1})=>{const[j,b]=g.useState("");return r.jsxs(e,{children:[r.jsxs(e.LabelGroup,{children:[r.jsx(e.Label,{htmlFor:"value",children:"Label"}),r.jsx(e.Description,{id:"value-description",children:"Description"})]}),r.jsx(e.Textarea,{id:"value",value:j,placeholder:"Placeholder",onChange:f=>b(f.target.value),ariaDescribedBy:"value-description",error:i,disabled:v}),i?r.jsx(e.ErrorMessage,{children:"Error message."}):null]})},s={render:()=>r.jsx("div",{className:"w-72",children:r.jsx(t,{})})},a={render:()=>r.jsx("div",{className:"w-72",children:r.jsx(t,{error:!0})})},o={render:()=>r.jsx("div",{className:"w-72",children:r.jsx(t,{disabled:!0})})};var m,p,d;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`{ +import{j as r}from"./jsx-runtime-C798UXYj.js";import{r as g}from"./index-0d5eMwbi.js";import{F as e}from"./form-field-2xLK_lYH.js";import"./zoom-to-fit-icon-DdsCB6de.js";import"./class-names-DnY5YZNL.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./form-fields-B2NmhAAW.js";import"./index-BoyHNU0R.js";import"./hidden-BrNieFV6.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./bugs-DpEN4NTH.js";import"./focus-management-DaVlPEX1.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./badge-BIezdMmM.js";import"./index-BgfbgFhO.js";import"./use-event-listener-CochUv0b.js";import"./active-element-history-DI7yoVCB.js";import"./tag-C9CGXtt3.js";const K={title:"Input/Textarea",component:e.Textarea},t=({error:i=!1,disabled:v=!1})=>{const[j,b]=g.useState("");return r.jsxs(e,{children:[r.jsxs(e.LabelGroup,{children:[r.jsx(e.Label,{htmlFor:"value",children:"Label"}),r.jsx(e.Description,{id:"value-description",children:"Description"})]}),r.jsx(e.Textarea,{id:"value",value:j,placeholder:"Placeholder",onChange:f=>b(f.target.value),ariaDescribedBy:"value-description",error:i,disabled:v}),i?r.jsx(e.ErrorMessage,{children:"Error message."}):null]})},s={render:()=>r.jsx("div",{className:"w-72",children:r.jsx(t,{})})},a={render:()=>r.jsx("div",{className:"w-72",children:r.jsx(t,{error:!0})})},o={render:()=>r.jsx("div",{className:"w-72",children:r.jsx(t,{disabled:!0})})};var m,p,d;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`{ render: () =>
diff --git a/assets/tooltip.stories-D4pljqyk.js b/assets/tooltip.stories-DmTKg58f.js similarity index 97% rename from assets/tooltip.stories-D4pljqyk.js rename to assets/tooltip.stories-DmTKg58f.js index 889544e1..9e0b100b 100644 --- a/assets/tooltip.stories-D4pljqyk.js +++ b/assets/tooltip.stories-DmTKg58f.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-C798UXYj.js";import{r as o,R as _}from"./index-0d5eMwbi.js";import{g as w}from"./storybook-utils-C5xEhci0.js";import{u as B}from"./usePopper-Cu2KpVtb.js";import{c as F}from"./class-names-DnY5YZNL.js";import{E as I}from"./index-BoyHNU0R.js";import{z as L}from"./transition-CZnz1fcq.js";import{B as M}from"./button-Cwplw9FX.js";import"./use-sync-refs-DqQDZvJ6.js";import"./use-is-mounted-DT-lZL-u.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./spinner-CrXB3JgE.js";const c=({children:e})=>{const r=o.useRef(null),[i,p]=o.useState(!1);return o.useEffect(()=>{document&&(r.current=document.body,p(!0))},[]),i&&r.current?I.createPortal(e,r.current):null};try{c.displayName="TooltipPortal",c.__docgenInfo={description:"",displayName:"TooltipPortal",props:{}}}catch{}const a=({children:e,title:r,position:i="right",className:p,open:u,strategy:m="absolute"})=>{const[E,N]=o.useState(),[j,C]=o.useState(),[S,d]=o.useState(!1),[f,R]=o.useState(!1),{styles:q,attributes:P}=B(E,j,{placement:i,strategy:m==="fixed"?"fixed":"absolute",modifiers:[{name:"offset",options:{offset:[0,8]}}]}),V=_.cloneElement(e,{ref:l=>N(l),onMouseEnter:()=>!f&&d(!0),onMouseLeave:()=>!f&&d(!1)});o.useEffect(()=>{u!==void 0&&(R(!0),d(u))},[u]);const v=()=>t.jsx(L,{show:S,enter:"transition-opacity duration-75",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:t.jsx("div",{ref:l=>l&&C(l),className:F("rounded-lg bg-neutral-900 p-4 px-4 py-2 text-xs text-neutral-0 shadow",p),style:q.popper,...P.popper,children:r})});return t.jsxs(t.Fragment,{children:[V,m==="portal"?t.jsx(c,{children:v()}):v()]})};try{a.displayName="Tooltip",a.__docgenInfo={description:"",displayName:"Tooltip",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"ReactNode"}},position:{defaultValue:{value:"right"},description:"",name:"position",required:!1,type:{name:"enum",value:[{value:'"left"'},{value:'"right"'},{value:'"auto"'},{value:'"auto-start"'},{value:'"auto-end"'},{value:'"top"'},{value:'"bottom"'},{value:'"top-start"'},{value:'"top-end"'},{value:'"bottom-start"'},{value:'"bottom-end"'},{value:'"right-start"'},{value:'"right-end"'},{value:'"left-start"'},{value:'"left-end"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"(() => void)"}},strategy:{defaultValue:{value:"absolute"},description:"",name:"strategy",required:!1,type:{name:"enum",value:[{value:'"fixed"'},{value:'"absolute"'},{value:'"portal"'}]}}}}}catch{}const Z={title:"Tooltip",component:a,parameters:{...w("Tooltip component. By default displays a tooltip on hover, but it can be controlled with the `open` prop as well.")},args:{position:"right",title:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",className:""}},s={render:e=>t.jsx(a,{...e,children:t.jsx("div",{className:"rounded border border-neutral-50 p-2 text-sm hover:bg-neutral-100",children:"Hover to toggle"})})},k=()=>{const[e,r]=_.useState(!1);return t.jsx(a,{position:"right",title:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",open:e,children:t.jsx(M,{variant:"minimal",className:"rounded border p-2 text-sm hover:bg-neutral-100",onClick:()=>r(!e),children:"Click to toggle"})})},n={render:()=>t.jsx(k,{})};var g,y,h;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`{ +import{j as t}from"./jsx-runtime-C798UXYj.js";import{r as o,R as _}from"./index-0d5eMwbi.js";import{g as w}from"./storybook-utils-C5xEhci0.js";import{u as B}from"./usePopper-Cu2KpVtb.js";import{c as F}from"./class-names-DnY5YZNL.js";import{r as I}from"./index-BoyHNU0R.js";import{z as L}from"./transition-CZnz1fcq.js";import{B as M}from"./button-CNKqPViR.js";import"./use-sync-refs-DqQDZvJ6.js";import"./use-is-mounted-DT-lZL-u.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./spinner-CrXB3JgE.js";const c=({children:e})=>{const r=o.useRef(null),[i,p]=o.useState(!1);return o.useEffect(()=>{document&&(r.current=document.body,p(!0))},[]),i&&r.current?I.createPortal(e,r.current):null};try{c.displayName="TooltipPortal",c.__docgenInfo={description:"",displayName:"TooltipPortal",props:{}}}catch{}const a=({children:e,title:r,position:i="right",className:p,open:u,strategy:m="absolute"})=>{const[E,N]=o.useState(),[j,C]=o.useState(),[S,d]=o.useState(!1),[f,R]=o.useState(!1),{styles:q,attributes:P}=B(E,j,{placement:i,strategy:m==="fixed"?"fixed":"absolute",modifiers:[{name:"offset",options:{offset:[0,8]}}]}),V=_.cloneElement(e,{ref:l=>N(l),onMouseEnter:()=>!f&&d(!0),onMouseLeave:()=>!f&&d(!1)});o.useEffect(()=>{u!==void 0&&(R(!0),d(u))},[u]);const v=()=>t.jsx(L,{show:S,enter:"transition-opacity duration-75",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:t.jsx("div",{ref:l=>l&&C(l),className:F("rounded-lg bg-neutral-900 p-4 px-4 py-2 text-xs text-neutral-0 shadow",p),style:q.popper,...P.popper,children:r})});return t.jsxs(t.Fragment,{children:[V,m==="portal"?t.jsx(c,{children:v()}):v()]})};try{a.displayName="Tooltip",a.__docgenInfo={description:"",displayName:"Tooltip",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"ReactNode"}},position:{defaultValue:{value:"right"},description:"",name:"position",required:!1,type:{name:"enum",value:[{value:'"left"'},{value:'"right"'},{value:'"auto"'},{value:'"auto-start"'},{value:'"auto-end"'},{value:'"top"'},{value:'"bottom"'},{value:'"top-start"'},{value:'"top-end"'},{value:'"bottom-start"'},{value:'"bottom-end"'},{value:'"right-start"'},{value:'"right-end"'},{value:'"left-start"'},{value:'"left-end"'}]}},className:{defaultValue:null,description:"",name:"className",required:!1,type:{name:"string"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!1,type:{name:"(() => void)"}},strategy:{defaultValue:{value:"absolute"},description:"",name:"strategy",required:!1,type:{name:"enum",value:[{value:'"fixed"'},{value:'"absolute"'},{value:'"portal"'}]}}}}}catch{}const Z={title:"Tooltip",component:a,parameters:{...w("Tooltip component. By default displays a tooltip on hover, but it can be controlled with the `open` prop as well.")},args:{position:"right",title:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",className:""}},s={render:e=>t.jsx(a,{...e,children:t.jsx("div",{className:"rounded border border-neutral-50 p-2 text-sm hover:bg-neutral-100",children:"Hover to toggle"})})},k=()=>{const[e,r]=_.useState(!1);return t.jsx(a,{position:"right",title:"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",open:e,children:t.jsx(M,{variant:"minimal",className:"rounded border p-2 text-sm hover:bg-neutral-100",onClick:()=>r(!e),children:"Click to toggle"})})},n={render:()=>t.jsx(k,{})};var g,y,h;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`{ render: args =>
Hover to toggle diff --git a/assets/top-bar.stories-Dfj0D-rE.js b/assets/top-bar.stories-BeIujtwl.js similarity index 98% rename from assets/top-bar.stories-Dfj0D-rE.js rename to assets/top-bar.stories-BeIujtwl.js index eb25ee17..f8511392 100644 --- a/assets/top-bar.stories-Dfj0D-rE.js +++ b/assets/top-bar.stories-BeIujtwl.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-C798UXYj.js";import{c as _}from"./class-names-DnY5YZNL.js";import{l as g,d8 as f,a1 as y}from"./zoom-to-fit-icon-DdsCB6de.js";import{A as B}from"./avatar-Cxzsye4J.js";import{a}from"./menu-BbZFQK8W.js";import"./index-0d5eMwbi.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./index-BoyHNU0R.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./bugs-DpEN4NTH.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./menu-info-item-CC1TeP-c.js";import"./menu-separator-yO-BIXMb.js";import"./menu-title-DpAy2147.js";const s=({src:r})=>e.jsx("img",{src:r,alt:"logo"});try{s.displayName="TopBarLogo",s.__docgenInfo={description:"",displayName:"TopBarLogo",props:{src:{defaultValue:null,description:"",name:"src",required:!0,type:{name:"string"}}}}}catch{}const i=({children:r})=>e.jsx("div",{className:"flex grow gap-12 pl-20 pr-6",children:r});try{i.displayName="TopBarNavLinks",i.__docgenInfo={description:"",displayName:"TopBarNavLinks",props:{}}}catch{}const p=({isActive:r=!1,children:o})=>e.jsx("div",{children:e.jsx("div",{className:"group rounded px-4 py-1 hover:bg-neutral-800 group-focus:ring-2 group-focus:ring-primary-200",children:e.jsx("div",{className:_("relative font-sans text-sm text-neutral-0",r&&"after:absolute after:left-0 after:right-0 after:top-7 after:block after:h-0.5 after:bg-neutral-0"),children:o})})});try{p.displayName="TopBarNavLink",p.__docgenInfo={description:"",displayName:"TopBarNavLink",props:{isActive:{defaultValue:{value:"false"},description:"",name:"isActive",required:!1,type:{name:"boolean"}}}}}catch{}const c=({children:r})=>e.jsxs(a.Button,{className:"flex items-center gap-1 rounded px-1 py-1 hover:bg-primary-900 focus:outline-none focus:ring-2 focus:ring-primary-200",children:[e.jsx(B,{color:"primary",children:r}),e.jsx(g,{className:"h-4 w-4 fill-neutral-400"})]});try{c.displayName="TopBarAvatarButton",c.__docgenInfo={description:"",displayName:"TopBarAvatarButton",props:{}}}catch{}const l=({children:r})=>e.jsx("div",{className:"flex items-center gap-2 px-2",children:r});try{l.displayName="TrayButtons",l.__docgenInfo={description:"",displayName:"TrayButtons",props:{}}}catch{}const m=({onClick:r,id:o,children:v})=>e.jsx("div",{role:"button",id:o,tabIndex:-1,onClick:r,onKeyDown:r,className:"cursor-pointer rounded p-3 hover:bg-primary-900 focus:outline-none focus:ring-2 focus:ring-primary-200",children:v});try{m.displayName="TrayButton",m.__docgenInfo={description:"",displayName:"TrayButton",props:{id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}const N=()=>e.jsxs("div",{className:"flex gap-1",children:[e.jsx(f,{className:"h-4 w-4 fill-primary-200"}),e.jsx(g,{className:"h-4 w-4 fill-neutral-400"})]}),t=({children:r})=>e.jsx("div",{className:"flex h-12 min-w-[1024px] items-center justify-between bg-abusix-dusk px-4",children:r});t.TrayButtons=l;t.TrayButton=m;t.Logo=s;t.NavLinks=i;t.NavLink=p;t.AvatarButton=c;t.HelpButton=N;try{t.displayName="TopBar",t.__docgenInfo={description:"",displayName:"TopBar",props:{}}}catch{}const F={title:"TopBar",component:t,parameters:{layout:"fullscreen"}},n={render:()=>e.jsxs(t,{children:[e.jsx(t.Logo,{src:"https://placekitten.com/80/80"}),e.jsxs(t.NavLinks,{children:[e.jsx(t.NavLink,{isActive:!0,children:"Dashboard"}),e.jsx(t.NavLink,{children:"Cases"}),e.jsx(t.NavLink,{children:"Events"}),e.jsx(t.NavLink,{children:"Statistics"}),e.jsx(t.NavLink,{children:"Mailbox"})]}),e.jsxs(a,{children:[e.jsx(t.AvatarButton,{children:"DS"}),e.jsxs(a.Items,{children:[e.jsx(a.InfoItem,{title:"Abusix",subtitle:"john.doe@abusix.com"}),e.jsx(a.Separator,{}),e.jsx(a.Item,{LeftIcon:y,children:"Portal"}),e.jsx(a.Separator,{}),e.jsx(a.Item,{children:"Account Settings"}),e.jsx(a.Item,{children:"Plans & billing"}),e.jsx(a.Item,{children:"Team members"}),e.jsx(a.Item,{children:"My profile"}),e.jsx(a.Separator,{}),e.jsx(a.Item,{children:"User Settings"}),e.jsx(a.Separator,{}),e.jsx(a.Item,{children:"Sign out"})]})]})]})};var u,d,x;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`{ +import{j as e}from"./jsx-runtime-C798UXYj.js";import{c as _}from"./class-names-DnY5YZNL.js";import{l as g,d8 as f,a1 as y}from"./zoom-to-fit-icon-DdsCB6de.js";import{A as B}from"./avatar-Cxzsye4J.js";import{a}from"./menu-6dEOZWfD.js";import"./index-0d5eMwbi.js";import"./use-resolve-button-type-D_6M6Au0.js";import"./keyboard-C2Ifhsxt.js";import"./use-sync-refs-DqQDZvJ6.js";import"./index-BoyHNU0R.js";import"./use-text-value-ehRDfXkw.js";import"./floating-ERp4LevH.js";import"./use-inert-others-CzqV763I.js";import"./portal-CLj4HHuk.js";import"./focus-management-DaVlPEX1.js";import"./use-server-handoff-complete-JgOu4JLg.js";import"./open-closed-DC3t9YEZ.js";import"./bugs-DpEN4NTH.js";import"./description-D9Ee5mtv.js";import"./label-BBnH-iCi.js";import"./menu-info-item-CC1TeP-c.js";import"./menu-separator-yO-BIXMb.js";import"./menu-title-DpAy2147.js";const s=({src:r})=>e.jsx("img",{src:r,alt:"logo"});try{s.displayName="TopBarLogo",s.__docgenInfo={description:"",displayName:"TopBarLogo",props:{src:{defaultValue:null,description:"",name:"src",required:!0,type:{name:"string"}}}}}catch{}const i=({children:r})=>e.jsx("div",{className:"flex grow gap-12 pl-20 pr-6",children:r});try{i.displayName="TopBarNavLinks",i.__docgenInfo={description:"",displayName:"TopBarNavLinks",props:{}}}catch{}const p=({isActive:r=!1,children:o})=>e.jsx("div",{children:e.jsx("div",{className:"group rounded px-4 py-1 hover:bg-neutral-800 group-focus:ring-2 group-focus:ring-primary-200",children:e.jsx("div",{className:_("relative font-sans text-sm text-neutral-0",r&&"after:absolute after:left-0 after:right-0 after:top-7 after:block after:h-0.5 after:bg-neutral-0"),children:o})})});try{p.displayName="TopBarNavLink",p.__docgenInfo={description:"",displayName:"TopBarNavLink",props:{isActive:{defaultValue:{value:"false"},description:"",name:"isActive",required:!1,type:{name:"boolean"}}}}}catch{}const c=({children:r})=>e.jsxs(a.Button,{className:"flex items-center gap-1 rounded px-1 py-1 hover:bg-primary-900 focus:outline-none focus:ring-2 focus:ring-primary-200",children:[e.jsx(B,{color:"primary",children:r}),e.jsx(g,{className:"h-4 w-4 fill-neutral-400"})]});try{c.displayName="TopBarAvatarButton",c.__docgenInfo={description:"",displayName:"TopBarAvatarButton",props:{}}}catch{}const l=({children:r})=>e.jsx("div",{className:"flex items-center gap-2 px-2",children:r});try{l.displayName="TrayButtons",l.__docgenInfo={description:"",displayName:"TrayButtons",props:{}}}catch{}const m=({onClick:r,id:o,children:v})=>e.jsx("div",{role:"button",id:o,tabIndex:-1,onClick:r,onKeyDown:r,className:"cursor-pointer rounded p-3 hover:bg-primary-900 focus:outline-none focus:ring-2 focus:ring-primary-200",children:v});try{m.displayName="TrayButton",m.__docgenInfo={description:"",displayName:"TrayButton",props:{id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}const N=()=>e.jsxs("div",{className:"flex gap-1",children:[e.jsx(f,{className:"h-4 w-4 fill-primary-200"}),e.jsx(g,{className:"h-4 w-4 fill-neutral-400"})]}),t=({children:r})=>e.jsx("div",{className:"flex h-12 min-w-[1024px] items-center justify-between bg-abusix-dusk px-4",children:r});t.TrayButtons=l;t.TrayButton=m;t.Logo=s;t.NavLinks=i;t.NavLink=p;t.AvatarButton=c;t.HelpButton=N;try{t.displayName="TopBar",t.__docgenInfo={description:"",displayName:"TopBar",props:{}}}catch{}const F={title:"TopBar",component:t,parameters:{layout:"fullscreen"}},n={render:()=>e.jsxs(t,{children:[e.jsx(t.Logo,{src:"https://placekitten.com/80/80"}),e.jsxs(t.NavLinks,{children:[e.jsx(t.NavLink,{isActive:!0,children:"Dashboard"}),e.jsx(t.NavLink,{children:"Cases"}),e.jsx(t.NavLink,{children:"Events"}),e.jsx(t.NavLink,{children:"Statistics"}),e.jsx(t.NavLink,{children:"Mailbox"})]}),e.jsxs(a,{children:[e.jsx(t.AvatarButton,{children:"DS"}),e.jsxs(a.Items,{children:[e.jsx(a.InfoItem,{title:"Abusix",subtitle:"john.doe@abusix.com"}),e.jsx(a.Separator,{}),e.jsx(a.Item,{LeftIcon:y,children:"Portal"}),e.jsx(a.Separator,{}),e.jsx(a.Item,{children:"Account Settings"}),e.jsx(a.Item,{children:"Plans & billing"}),e.jsx(a.Item,{children:"Team members"}),e.jsx(a.Item,{children:"My profile"}),e.jsx(a.Separator,{}),e.jsx(a.Item,{children:"User Settings"}),e.jsx(a.Separator,{}),e.jsx(a.Item,{children:"Sign out"})]})]})]})};var u,d,x;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`{ render: () => diff --git a/iframe.html b/iframe.html index a935241a..6a41c5b8 100644 --- a/iframe.html +++ b/iframe.html @@ -631,7 +631,7 @@ window.global = window; - + diff --git a/project.json b/project.json index 9884e8f8..be20bea5 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1729674000699,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@testing-library/jest-dom":"6.2.0","@testing-library/react":"14.1.2","@vitest/coverage-v8":"1.0.1","vitest":"1.0.1"},"packageManager":{"type":"npm","version":"10.5.0"},"typescriptOptions":{"reactDocgen":"react-docgen-typescript"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{"strictMode":true}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":0,"storybookVersion":"8.3.6","storybookVersionSpecifier":"^8.3.6","language":"typescript","storybookPackages":{"@storybook/blocks":{"version":"8.3.6"},"@storybook/preview-api":{"version":"8.3.6"},"@storybook/react":{"version":"8.3.6"},"@storybook/react-vite":{"version":"8.3.6"},"eslint-plugin-storybook":{"version":"0.10.1"},"storybook":{"version":"8.3.6"}},"addons":{"@storybook/addon-links":{"version":"8.3.6"},"@storybook/addon-essentials":{"version":"8.3.6"},"@storybook/addon-interactions":{"version":"8.3.6"}}} +{"generatedAt":1729688758358,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":true,"hasStorybookEslint":true,"refCount":0,"testPackages":{"@testing-library/dom":"10.4.0","@testing-library/jest-dom":"6.6.2","@testing-library/react":"16.0.1","@vitest/coverage-v8":"2.1.3","vitest":"2.1.3"},"packageManager":{"type":"npm","version":"10.9.0"},"typescriptOptions":{"reactDocgen":"react-docgen-typescript"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/react-vite","options":{"strictMode":true}},"builder":"@storybook/builder-vite","renderer":"@storybook/react","portableStoriesFileCount":0,"storybookVersion":"8.3.6","storybookVersionSpecifier":"^8.3.6","language":"typescript","storybookPackages":{"@storybook/blocks":{"version":"8.3.6"},"@storybook/preview-api":{"version":"8.3.6"},"@storybook/react":{"version":"8.3.6"},"@storybook/react-vite":{"version":"8.3.6"},"eslint-plugin-storybook":{"version":"0.10.1"},"storybook":{"version":"8.3.6"}},"addons":{"@storybook/addon-links":{"version":"8.3.6"},"@storybook/addon-essentials":{"version":"8.3.6"},"@storybook/addon-interactions":{"version":"8.3.6"}}}