diff --git a/assets/Color-ERTF36HU-BECF7hgJ.js b/assets/Color-ERTF36HU-CTWFobSr.js similarity index 99% rename from assets/Color-ERTF36HU-BECF7hgJ.js rename to assets/Color-ERTF36HU-CTWFobSr.js index d69f70e..76e0600 100644 --- a/assets/Color-ERTF36HU-BECF7hgJ.js +++ b/assets/Color-ERTF36HU-CTWFobSr.js @@ -1 +1 @@ -import{af as Me,ag as ie,ah as Ce,ae as h,ai as b,aj as $,a2 as ue,a0 as $e,x as Ie,ak as Oe,al as Ne}from"./DocsRenderer-CFRXHY34-D3v-BBxt.js";import{g as fe}from"./index-i39XpuQg.js";import"./iframe-Dl3wkQvm.js";import"../sb-preview/runtime.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,a=Math.min(t,n,r),o=Math.max(t,n,r),s=o-a;let l,c;o===a?l=0:t===o?l=(n-r)/s:n===o?l=2+(r-t)/s:r===o&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const i=(a+o)/2;return o===a?c=0:i<=.5?c=s/(o+a):c=s/(2-o-a),[l,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,a,o;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?(a=0,o=0):(o=d/i,t=f(s),n=f(l),r=f(c),s===i?a=r-n:l===i?a=1/3+t-r:c===i&&(a=2/3+n-t),a<0?a+=1:a>1&&(a-=1)),[a*360,o*100,i*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const a=u.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[a,o*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(1-t,1-n,1-r),o=(1-t-a)/(1-a)||0,s=(1-n-a)/(1-a)||0,l=(1-r-a)/(1-a)||0;return[o*100,s*100,l*100,a*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 a of Object.keys(F)){const o=F[a],s=Re(e,o);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 a=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[a*100,o*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],a=t[2];n/=95.047,r/=100,a/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const o=116*r-16,s=500*(n-r),l=200*(r-a);return[o,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let a,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?a=r*(1+n):a=r+n-r*n;const l=2*r-a,c=[0,0,0];for(let i=0;i<3;i++)o=t+1/3*-(i-1),o<0&&o++,o>1&&o--,6*o<1?s=l+(a-l)*6*o:2*o<1?s=a:3*o<2?s=l+(a-l)*(2/3-o)*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,a=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,a*=o<=1?o:2-o;const s=(r+n)/2,l=r===0?2*a/(o+a):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 a=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*o),c=255*r*(1-n*(1-o));switch(r*=255,a){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,a=Math.max(r,.01);let o,s;s=(2-n)*r;const l=(2-n)*a;return o=n*a,o/=l<=1?l:2-l,o=o||0,s/=2,[t,o*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const a=n+r;let o;a>1&&(n/=a,r/=a);const s=Math.floor(6*t),l=1-r;o=6*t-s,s&1&&(o=1-o);const c=n+o*(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,a=e[3]/100,o=1-Math.min(1,t*(1-a)+a),s=1-Math.min(1,n*(1-a)+a),l=1-Math.min(1,r*(1-a)+a);return[o*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let a,o,s;return a=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[a*255,o*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 a=116*n-16,o=500*(t-n),s=200*(n-r);return[a,o,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let a,o,s;o=(t+16)/116,a=n/500+o,s=o-r/200;const l=o**3,c=a**3,i=s**3;return o=l>.008856?l:(o-16/116)/7.787,a=c>.008856?c:(a-16/116)/7.787,s=i>.008856?i:(s-16/116)/7.787,a*=95.047,o*=100,s*=108.883,[a,o,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let a;a=Math.atan2(r,n)*360/2/Math.PI,a<0&&(a+=360);const s=Math.sqrt(n*n+r*r);return[t,s,a]};u.lch.lab=function(e){const t=e[0],n=e[1],a=e[2]/360*2*Math.PI,o=n*Math.cos(a),s=n*Math.sin(a);return[t,o,s]};u.rgb.ansi16=function(e,t=null){const[n,r,a]=e;let o=t===null?u.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===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,a=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,a,o]};u.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,a=t%6/5*255;return[n,r,a]};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),a=r>>16&255,o=r>>8&255,s=r&255;return[a,o,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=a-o;let l,c;return s<1?l=o/(1-s):l=0,s<=0?c=0:a===t?c=(n-r)/s%6:a===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 a=0;return r<1&&(a=(n-.5*r)/(1-r)),[e[0],r*100,a*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],r*100,a*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 a=[0,0,0],o=t%1*6,s=o%1,l=1-s;let c=0;switch(Math.floor(o)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=l,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=l,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=l}return c=(1-n)*r,[(n*a[0]+c)*255,(n*a[1]+c)*255,(n*a[2]+c)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let a=0;return r>0&&(a=t/r),[e[0],a*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let a=0;return r>0&&r<.5?a=t/(2*r):r>=.5&&r<1&&(a=t/(2*(1-r))),[e[0],a*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,a=r-t;let o=0;return a<1&&(o=(r-a)/(1-a)),[e[0],a*100,o*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 a=e(n);if(typeof a=="object")for(let o=a.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 a=t[r];N[e][r]=Be(a),N[e][r].raw=qe(a)})});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,at=parseInt;function ot(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)?at(e.slice(2),n?2:8):tt.test(e)?ne:+e}var st=ot,lt=ie,W=Ke,re=st,ct="Expected a function",it=Math.max,ut=Math.min;function ft(e,t,n){var r,a,o,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,o=f?it(re(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,z=a;return r=a=void 0,i=v,s=e.apply(z,C),s}function j(v){return i=v,l=setTimeout(m,t),d?x(v):s}function M(v){var C=v-c,z=v-i,ee=t-C;return f?ut(ee,o-z):ee}function p(v){var C=v-c,z=v-i;return c===void 0||C>=t||C<0||f&&z>=o}function m(){var v=W();if(p(v))return w(v);l=setTimeout(m,M(v))}function w(v){return l=void 0,g&&r?x(v):(r=a=void 0,s)}function E(){l!==void 0&&clearTimeout(l),i=0,r=c=a=l=void 0}function k(){return l===void 0?s:w(W())}function I(){var v=W(),C=p(v);if(r=arguments,a=this,c=v,C){if(l===void 0)return j(c);if(f)return clearTimeout(l),l=setTimeout(m,t),x(c)}return l===void 0&&(l=setTimeout(m,t)),s}return I.cancel=E,I.flush=k,I}var ht=ft;const dt=fe(ht);function O(){return(O=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}function V(e){var t=b.useRef(e),n=b.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)&&a.current?o(ae(a.current,p,l.current)):M(!1)},j=function(){return M(!1)};function M(p){var m=c.current,w=A(a.current),E=p?w.addEventListener:w.removeEventListener;E(m?"touchmove":"mousemove",x),E(m?"touchend":"mouseup",j)}return[function(p){var m=p.nativeEvent,w=a.current;if(w&&(oe(m),!function(k,I){return I&&!H(k)}(m,c.current)&&w)){if(H(m)){c.current=!0;var E=m.changedTouches||[];E.length&&(l.current=E[0].identifier)}w.focus(),o(ae(w,m,l.current)),M(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},M]},[s,o]),d=i[0],f=i[1],g=i[2];return b.useEffect(function(){return g},[g]),h.createElement("div",O({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:a,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,a=r===void 0?.5:r,o=T(["react-colorful__pointer",e.className]);return h.createElement("div",{className:o,style:{top:100*a+"%",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)},bt=function(e){return me(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}},mt=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:mt(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(be(e))},ge=function(e){var t=e.s,n=e.v,r=e.a,a=(200-t)*n/100;return{h:y(e.h),s:y(a>0&&a<200?t*n/100/(a<=100?a:200-a)*100:0),l:y(a/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+")"},be=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),l=r*(1-(t-o)*n),c=r*(1-(1-t+o)*n),i=o%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(a,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?me({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,a=e.a,o=a<1?P(y(255*a)):"";return"#"+P(t)+P(n)+P(r)+o},me=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),l=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(o?s/o*100:0),v:y(o/255*100),a}},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(a){n({h:360*a.left})},onKey:function(a){n({h:R(t+360*a.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(a){n({s:100*a.left,v:100-100*a.top})},onKey:function(a){n({s:R(t.s+100*a.left,0,100),v:R(t.v-100*a.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),a=b.useState(function(){return e.toHsva(t)}),o=a[0],s=a[1],l=b.useRef({color:t,hsva:o});b.useEffect(function(){if(!e.equal(t,l.current.color)){var i=e.toHsva(t);l.current={hsva:i,color:t},s(i)}},[t,e]),b.useEffect(function(){var i;ye(o,l.current.hsva)||e.equal(i=e.fromHsva(o),l.current.color)||(l.current={hsva:o,color:i},r(i))},[o,e,r]);var c=b.useCallback(function(i){s(function(d){return Object.assign({},d,i)})},[]);return[o,c]}var _t=typeof window<"u"?b.useLayoutEffect:b.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,a=r===void 0?n.defaultColor:r,o=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=b.useRef(null);ke(l);var c=we(n,a,o),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",O({},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:bt,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,O({},e,{colorModel:Ct}))},It=function(e){var t=e.className,n=e.hsva,r=e.onChange,a={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},o=T(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:o},h.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),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,a=r===void 0?n.defaultColor:r,o=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=b.useRef(null);ke(l);var c=we(n,a,o),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",O({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d}),h.createElement(It,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},Ot={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:vt,fromHsva:B,equal:xe},Nt=function(e){return h.createElement(_e,O({},e,{colorModel:Ot}))},St={defaultColor:"rgba(0, 0, 0, 1)",toHsva:xt,fromHsva:function(e){var t=be(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:xe},Rt=function(e){return h.createElement(_e,O({},e,{colorModel:St}))},jt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),zt=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),Ht=$.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=$(Ie.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=$(Oe)(({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,a,o=1]=t;return[n,r,a,o].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),a=_.rgb.hsl(r),o=e;if(/[^#a-f0-9]/i.test(e)?o=n:Y.test(e)&&(o=`#${n}`),o.startsWith("#"))t=Y.test(o);else try{_.keyword.hex(o)}catch{t=!1}return{valid:t,value:o,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${a[0]}, ${a[1]}%, ${a[2]}%, 1)`,hex:o}},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[a,o,s]=r[1].split("");return`#${a}${a}${o}${o}${s}${s}`},Gt=(e,t)=>{let[n,r]=b.useState(e||""),[a,o]=b.useState(()=>S(n)),[s,l]=b.useState((a==null?void 0:a.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=S(f);r(f),o(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let c=b.useMemo(()=>At(n,a,s).toLowerCase(),[n,a,s]),i=b.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(o(void 0),t(void 0)),g&&(o(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=L.indexOf(s)+1;f>=L.length&&(f=0),l(L[f]);let g=(a==null?void 0:a[L[f]])||"";r(g),t(g)},[a,s,t]);return{value:n,realValue:c,updateValue:i,color:a,colorSpace:s,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,a]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&a([])},[t]);let o=b.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=b.useCallback(l=>{l!=null&&l.valid&&(o.some(c=>D(c[n])===D(l[n]))||a(c=>c.concat(l)))},[n,o]);return{presets:o,addPreset:s}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:a,presetColors:o,startOpen:s=!1,argType:l})=>{var E;let c=b.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(o,g,x),m=Vt[x],w=!!((E=l==null?void 0:l.table)!=null&&E.readonly);return h.createElement(jt,{"aria-readonly":w},h.createElement(zt,{startOpen:s,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(Ht,null,h.createElement(m,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:a}),M.length>0&&h.createElement(Tt,null,M.map((k,I)=>h.createElement(ue,{key:`${k.value}-${I}`,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)},nn=Yt;export{Yt as ColorControl,nn as default}; +import{af as Me,ag as ie,ah as Ce,ae as h,ai as b,aj as $,a2 as ue,a0 as $e,x as Ie,ak as Oe,al as Ne}from"./DocsRenderer-CFRXHY34-DKLslIoh.js";import{g as fe}from"./index-i39XpuQg.js";import"./iframe-CNfe-eQt.js";import"../sb-preview/runtime.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,a=Math.min(t,n,r),o=Math.max(t,n,r),s=o-a;let l,c;o===a?l=0:t===o?l=(n-r)/s:n===o?l=2+(r-t)/s:r===o&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const i=(a+o)/2;return o===a?c=0:i<=.5?c=s/(o+a):c=s/(2-o-a),[l,c*100,i*100]};u.rgb.hsv=function(e){let t,n,r,a,o;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?(a=0,o=0):(o=d/i,t=f(s),n=f(l),r=f(c),s===i?a=r-n:l===i?a=1/3+t-r:c===i&&(a=2/3+n-t),a<0?a+=1:a>1&&(a-=1)),[a*360,o*100,i*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const a=u.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[a,o*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(1-t,1-n,1-r),o=(1-t-a)/(1-a)||0,s=(1-n-a)/(1-a)||0,l=(1-r-a)/(1-a)||0;return[o*100,s*100,l*100,a*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 a of Object.keys(F)){const o=F[a],s=Re(e,o);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 a=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[a*100,o*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],a=t[2];n/=95.047,r/=100,a/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;const o=116*r-16,s=500*(n-r),l=200*(r-a);return[o,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let a,o,s;if(n===0)return s=r*255,[s,s,s];r<.5?a=r*(1+n):a=r+n-r*n;const l=2*r-a,c=[0,0,0];for(let i=0;i<3;i++)o=t+1/3*-(i-1),o<0&&o++,o>1&&o--,6*o<1?s=l+(a-l)*6*o:2*o<1?s=a:3*o<2?s=l+(a-l)*(2/3-o)*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,a=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,a*=o<=1?o:2-o;const s=(r+n)/2,l=r===0?2*a/(o+a):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 a=Math.floor(t)%6,o=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*o),c=255*r*(1-n*(1-o));switch(r*=255,a){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,a=Math.max(r,.01);let o,s;s=(2-n)*r;const l=(2-n)*a;return o=n*a,o/=l<=1?l:2-l,o=o||0,s/=2,[t,o*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const a=n+r;let o;a>1&&(n/=a,r/=a);const s=Math.floor(6*t),l=1-r;o=6*t-s,s&1&&(o=1-o);const c=n+o*(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,a=e[3]/100,o=1-Math.min(1,t*(1-a)+a),s=1-Math.min(1,n*(1-a)+a),l=1-Math.min(1,r*(1-a)+a);return[o*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let a,o,s;return a=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),s=Math.min(Math.max(0,s),1),[a*255,o*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 a=116*n-16,o=500*(t-n),s=200*(n-r);return[a,o,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let a,o,s;o=(t+16)/116,a=n/500+o,s=o-r/200;const l=o**3,c=a**3,i=s**3;return o=l>.008856?l:(o-16/116)/7.787,a=c>.008856?c:(a-16/116)/7.787,s=i>.008856?i:(s-16/116)/7.787,a*=95.047,o*=100,s*=108.883,[a,o,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let a;a=Math.atan2(r,n)*360/2/Math.PI,a<0&&(a+=360);const s=Math.sqrt(n*n+r*r);return[t,s,a]};u.lch.lab=function(e){const t=e[0],n=e[1],a=e[2]/360*2*Math.PI,o=n*Math.cos(a),s=n*Math.sin(a);return[t,o,s]};u.rgb.ansi16=function(e,t=null){const[n,r,a]=e;let o=t===null?u.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let s=30+(Math.round(a/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===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,a=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,a,o]};u.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,a=t%6/5*255;return[n,r,a]};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),a=r>>16&255,o=r>>8&255,s=r&255;return[a,o,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),s=a-o;let l,c;return s<1?l=o/(1-s):l=0,s<=0?c=0:a===t?c=(n-r)/s%6:a===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 a=0;return r<1&&(a=(n-.5*r)/(1-r)),[e[0],r*100,a*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],r*100,a*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 a=[0,0,0],o=t%1*6,s=o%1,l=1-s;let c=0;switch(Math.floor(o)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=l,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=l,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=l}return c=(1-n)*r,[(n*a[0]+c)*255,(n*a[1]+c)*255,(n*a[2]+c)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let a=0;return r>0&&(a=t/r),[e[0],a*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let a=0;return r>0&&r<.5?a=t/(2*r):r>=.5&&r<1&&(a=t/(2*(1-r))),[e[0],a*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,a=r-t;let o=0;return a<1&&(o=(r-a)/(1-a)),[e[0],a*100,o*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 a=e(n);if(typeof a=="object")for(let o=a.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 a=t[r];N[e][r]=Be(a),N[e][r].raw=qe(a)})});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,at=parseInt;function ot(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)?at(e.slice(2),n?2:8):tt.test(e)?ne:+e}var st=ot,lt=ie,W=Ke,re=st,ct="Expected a function",it=Math.max,ut=Math.min;function ft(e,t,n){var r,a,o,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,o=f?it(re(n.maxWait)||0,t):o,g="trailing"in n?!!n.trailing:g);function x(v){var C=r,z=a;return r=a=void 0,i=v,s=e.apply(z,C),s}function j(v){return i=v,l=setTimeout(m,t),d?x(v):s}function M(v){var C=v-c,z=v-i,ee=t-C;return f?ut(ee,o-z):ee}function p(v){var C=v-c,z=v-i;return c===void 0||C>=t||C<0||f&&z>=o}function m(){var v=W();if(p(v))return w(v);l=setTimeout(m,M(v))}function w(v){return l=void 0,g&&r?x(v):(r=a=void 0,s)}function E(){l!==void 0&&clearTimeout(l),i=0,r=c=a=l=void 0}function k(){return l===void 0?s:w(W())}function I(){var v=W(),C=p(v);if(r=arguments,a=this,c=v,C){if(l===void 0)return j(c);if(f)return clearTimeout(l),l=setTimeout(m,t),x(c)}return l===void 0&&(l=setTimeout(m,t)),s}return I.cancel=E,I.flush=k,I}var ht=ft;const dt=fe(ht);function O(){return(O=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}function V(e){var t=b.useRef(e),n=b.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)&&a.current?o(ae(a.current,p,l.current)):M(!1)},j=function(){return M(!1)};function M(p){var m=c.current,w=A(a.current),E=p?w.addEventListener:w.removeEventListener;E(m?"touchmove":"mousemove",x),E(m?"touchend":"mouseup",j)}return[function(p){var m=p.nativeEvent,w=a.current;if(w&&(oe(m),!function(k,I){return I&&!H(k)}(m,c.current)&&w)){if(H(m)){c.current=!0;var E=m.changedTouches||[];E.length&&(l.current=E[0].identifier)}w.focus(),o(ae(w,m,l.current)),M(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},M]},[s,o]),d=i[0],f=i[1],g=i[2];return b.useEffect(function(){return g},[g]),h.createElement("div",O({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:a,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,a=r===void 0?.5:r,o=T(["react-colorful__pointer",e.className]);return h.createElement("div",{className:o,style:{top:100*a+"%",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)},bt=function(e){return me(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}},mt=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:mt(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(be(e))},ge=function(e){var t=e.s,n=e.v,r=e.a,a=(200-t)*n/100;return{h:y(e.h),s:y(a>0&&a<200?t*n/100/(a<=100?a:200-a)*100:0),l:y(a/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+")"},be=function(e){var t=e.h,n=e.s,r=e.v,a=e.a;t=t/360*6,n/=100,r/=100;var o=Math.floor(t),s=r*(1-n),l=r*(1-(t-o)*n),c=r*(1-(1-t+o)*n),i=o%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(a,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?me({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,a=e.a,o=a<1?P(y(255*a)):"";return"#"+P(t)+P(n)+P(r)+o},me=function(e){var t=e.r,n=e.g,r=e.b,a=e.a,o=Math.max(t,n,r),s=o-Math.min(t,n,r),l=s?o===t?(n-r)/s:o===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(o?s/o*100:0),v:y(o/255*100),a}},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(a){n({h:360*a.left})},onKey:function(a){n({h:R(t+360*a.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(a){n({s:100*a.left,v:100-100*a.top})},onKey:function(a){n({s:R(t.s+100*a.left,0,100),v:R(t.v-100*a.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),a=b.useState(function(){return e.toHsva(t)}),o=a[0],s=a[1],l=b.useRef({color:t,hsva:o});b.useEffect(function(){if(!e.equal(t,l.current.color)){var i=e.toHsva(t);l.current={hsva:i,color:t},s(i)}},[t,e]),b.useEffect(function(){var i;ye(o,l.current.hsva)||e.equal(i=e.fromHsva(o),l.current.color)||(l.current={hsva:o,color:i},r(i))},[o,e,r]);var c=b.useCallback(function(i){s(function(d){return Object.assign({},d,i)})},[]);return[o,c]}var _t=typeof window<"u"?b.useLayoutEffect:b.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,a=r===void 0?n.defaultColor:r,o=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=b.useRef(null);ke(l);var c=we(n,a,o),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",O({},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:bt,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,O({},e,{colorModel:Ct}))},It=function(e){var t=e.className,n=e.hsva,r=e.onChange,a={backgroundImage:"linear-gradient(90deg, "+B(Object.assign({},n,{a:0}))+", "+B(Object.assign({},n,{a:1}))+")"},o=T(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:o},h.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),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,a=r===void 0?n.defaultColor:r,o=e.onChange,s=J(e,["className","colorModel","color","onChange"]),l=b.useRef(null);ke(l);var c=we(n,a,o),i=c[0],d=c[1],f=T(["react-colorful",t]);return h.createElement("div",O({},s,{ref:l,className:f}),h.createElement(pe,{hsva:i,onChange:d}),h.createElement(ve,{hue:i.h,onChange:d}),h.createElement(It,{hsva:i,onChange:d,className:"react-colorful__last-control"}))},Ot={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:vt,fromHsva:B,equal:xe},Nt=function(e){return h.createElement(_e,O({},e,{colorModel:Ot}))},St={defaultColor:"rgba(0, 0, 0, 1)",toHsva:xt,fromHsva:function(e){var t=be(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:xe},Rt=function(e){return h.createElement(_e,O({},e,{colorModel:St}))},jt=$.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),zt=$(ue)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),Ht=$.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=$(Ie.Input)(({theme:e,readOnly:t})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Bt=$(Oe)(({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,a,o=1]=t;return[n,r,a,o].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),a=_.rgb.hsl(r),o=e;if(/[^#a-f0-9]/i.test(e)?o=n:Y.test(e)&&(o=`#${n}`),o.startsWith("#"))t=Y.test(o);else try{_.keyword.hex(o)}catch{t=!1}return{valid:t,value:o,keyword:_.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${a[0]}, ${a[1]}%, ${a[2]}%, 1)`,hex:o}},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[a,o,s]=r[1].split("");return`#${a}${a}${o}${o}${s}${s}`},Gt=(e,t)=>{let[n,r]=b.useState(e||""),[a,o]=b.useState(()=>S(n)),[s,l]=b.useState((a==null?void 0:a.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=S(f);r(f),o(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let c=b.useMemo(()=>At(n,a,s).toLowerCase(),[n,a,s]),i=b.useCallback(f=>{let g=S(f),x=(g==null?void 0:g.value)||f||"";r(x),x===""&&(o(void 0),t(void 0)),g&&(o(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=L.indexOf(s)+1;f>=L.length&&(f=0),l(L[f]);let g=(a==null?void 0:a[L[f]])||"";r(g),t(g)},[a,s,t]);return{value:n,realValue:c,updateValue:i,color:a,colorSpace:s,cycleColorSpace:d}},D=e=>e.replace(/\s*/,"").toLowerCase(),Ut=(e,t,n)=>{let[r,a]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&a([])},[t]);let o=b.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=b.useCallback(l=>{l!=null&&l.valid&&(o.some(c=>D(c[n])===D(l[n]))||a(c=>c.concat(l)))},[n,o]);return{presets:o,addPreset:s}},Yt=({name:e,value:t,onChange:n,onFocus:r,onBlur:a,presetColors:o,startOpen:s=!1,argType:l})=>{var E;let c=b.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(o,g,x),m=Vt[x],w=!!((E=l==null?void 0:l.table)!=null&&E.readonly);return h.createElement(jt,{"aria-readonly":w},h.createElement(zt,{startOpen:s,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>p(g),tooltip:h.createElement(Ht,null,h.createElement(m,{color:d==="transparent"?"#000000":d,onChange:f,onFocus:r,onBlur:a}),M.length>0&&h.createElement(Tt,null,M.map((k,I)=>h.createElement(ue,{key:`${k.value}-${I}`,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)},nn=Yt;export{Yt as ColorControl,nn as default}; diff --git a/assets/ContentLoader-B5eaifJB.css b/assets/ContentLoader-B5eaifJB.css deleted file mode 100644 index 14e6f44..0000000 --- a/assets/ContentLoader-B5eaifJB.css +++ /dev/null @@ -1 +0,0 @@ -.content-loader[data-v-5d28d13a]{display:flex;flex-direction:column}.loader-group[data-v-5d28d13a]{display:flex}.line[data-v-5d28d13a]{background-color:#ccc;animation:pulse-5d28d13a 1.5s ease-in-out infinite;border-radius:.25rem;flex-grow:1}.circle[data-v-5d28d13a]{background-color:#ccc;border-radius:50%;animation:pulse-5d28d13a 1.5s ease-in-out infinite}@keyframes pulse-5d28d13a{0%{opacity:1}50%{opacity:.5}to{opacity:1}} diff --git a/assets/ContentLoader-xguCP2HR.css b/assets/ContentLoader-xguCP2HR.css new file mode 100644 index 0000000..d95420b --- /dev/null +++ b/assets/ContentLoader-xguCP2HR.css @@ -0,0 +1 @@ +.content-loader[data-v-3620d5a4]{display:flex;flex-direction:column}.loader-group[data-v-3620d5a4]{display:flex}.line[data-v-3620d5a4]{background-color:#eaeaea;animation:pulse-3620d5a4 1.5s ease-in-out infinite;border-radius:.25rem;flex-grow:1}.circle[data-v-3620d5a4]{background-color:#eaeaea;border-radius:50%;animation:pulse-3620d5a4 1.5s ease-in-out infinite}@keyframes pulse-3620d5a4{0%{opacity:1}50%{opacity:.5}to{opacity:1}} diff --git a/assets/ContentLoader.stories-dAKeFHBu.js b/assets/ContentLoader.stories-BWd5lqcY.js similarity index 97% rename from assets/ContentLoader.stories-dAKeFHBu.js rename to assets/ContentLoader.stories-BWd5lqcY.js index ea1f558..0d74e7c 100644 --- a/assets/ContentLoader.stories-dAKeFHBu.js +++ b/assets/ContentLoader.stories-BWd5lqcY.js @@ -1,4 +1,4 @@ -import{d as g,e as y,o as n,f as t,F as h,u as A,v as a,x as s}from"./vue.esm-bundler-DZRSKMuI.js";import{_ as C}from"./_plugin-vue_export-helper-DlAUqK2U.js";const c=g({name:"ContentLoader",__name:"ContentLoader",props:{type:{default:"PARAGRAPH"},lineCount:{default:5},lineHeight:{default:1},randomLineWidth:{type:Boolean,default:!0},gap:{default:.8}},setup(l){const o=l,L=y(()=>Array.from({length:o.lineCount},(e,u)=>({id:u,maxWidth:o.randomLineWidth?50+Math.random()*50:100})));return(e,u)=>(n(),t("div",{class:"content-loader",style:a({gap:`${e.gap}em`})},[(n(!0),t(h,null,A(L.value,d=>(n(),t("div",{class:"loader-group",key:d.id,style:a({gap:`${e.lineHeight/2.5}em`})},[["CIRCLE","BULLET_LIST"].includes(e.type)?(n(),t("div",{key:0,class:"circle",style:a({width:`${e.lineHeight}em`,height:`${e.lineHeight}em`})},null,4)):s("",!0),["PARAGRAPH","BULLET_LIST"].includes(e.type)?(n(),t("div",{key:1,class:"line",style:a({maxWidth:`${d.maxWidth}%`,height:`${e.lineHeight}em`})},null,4)):s("",!0)],4))),128))],4))}}),i=C(c,[["__scopeId","data-v-5d28d13a"]]);c.__docgenInfo={name:"ContentLoader",exportName:"default",displayName:"ContentLoader",description:"",tags:{},props:[{name:"type",required:!1,type:{name:"union",elements:[{name:'"PARAGRAPH"'},{name:'"BULLET_LIST"'},{name:'"CIRCLE"'}]},defaultValue:{func:!1,value:"'PARAGRAPH'"}},{name:"lineCount",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"5"}},{name:"lineHeight",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"1"}},{name:"randomLineWidth",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"gap",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"0.8"}}],sourceFiles:["/home/runner/work/lapras-frontend/lapras-frontend/src/components/ContentLoader/ContentLoader.vue"]};const P={title:"ContentLoader",component:i,argTypes:{type:{control:{type:"select"},options:["PARAGRAPH","BULLET_LIST","CIRCLE"],defaultValue:"PARAGRAPH"},lineCount:{control:{type:"number"},defaultValue:5},lineHeight:{control:{type:"number"},defaultValue:1},randomLineWidth:{control:{type:"boolean"},defaultValue:!0},gap:{control:{type:"number"},defaultValue:.8}},render:l=>({components:{ContentLoader:i},setup(){return{args:l}},template:` +import{d as g,e as y,o as n,f as t,F as h,u as A,v as a,x as s}from"./vue.esm-bundler-DZRSKMuI.js";import{_ as C}from"./_plugin-vue_export-helper-DlAUqK2U.js";const c=g({name:"ContentLoader",__name:"ContentLoader",props:{type:{default:"PARAGRAPH"},lineCount:{default:5},lineHeight:{default:1},randomLineWidth:{type:Boolean,default:!0},gap:{default:.8}},setup(l){const o=l,L=y(()=>Array.from({length:o.lineCount},(e,u)=>({id:u,maxWidth:o.randomLineWidth?50+Math.random()*50:100})));return(e,u)=>(n(),t("div",{class:"content-loader",style:a({gap:`${e.gap}em`})},[(n(!0),t(h,null,A(L.value,d=>(n(),t("div",{class:"loader-group",key:d.id,style:a({gap:`${e.lineHeight/2.5}em`})},[["CIRCLE","BULLET_LIST"].includes(e.type)?(n(),t("div",{key:0,class:"circle",style:a({width:`${e.lineHeight}em`,height:`${e.lineHeight}em`})},null,4)):s("",!0),["PARAGRAPH","BULLET_LIST"].includes(e.type)?(n(),t("div",{key:1,class:"line",style:a({maxWidth:`${d.maxWidth}%`,height:`${e.lineHeight}em`})},null,4)):s("",!0)],4))),128))],4))}}),i=C(c,[["__scopeId","data-v-3620d5a4"]]);c.__docgenInfo={name:"ContentLoader",exportName:"default",displayName:"ContentLoader",description:"",tags:{},props:[{name:"type",required:!1,type:{name:"union",elements:[{name:'"PARAGRAPH"'},{name:'"BULLET_LIST"'},{name:'"CIRCLE"'}]},defaultValue:{func:!1,value:"'PARAGRAPH'"}},{name:"lineCount",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"5"}},{name:"lineHeight",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"1"}},{name:"randomLineWidth",required:!1,type:{name:"boolean"},defaultValue:{func:!1,value:"true"}},{name:"gap",required:!1,type:{name:"number"},defaultValue:{func:!1,value:"0.8"}}],sourceFiles:["/home/runner/work/lapras-frontend/lapras-frontend/src/components/ContentLoader/ContentLoader.vue"]};const P={title:"ContentLoader",component:i,argTypes:{type:{control:{type:"select"},options:["PARAGRAPH","BULLET_LIST","CIRCLE"],defaultValue:"PARAGRAPH"},lineCount:{control:{type:"number"},defaultValue:5},lineHeight:{control:{type:"number"},defaultValue:1},randomLineWidth:{control:{type:"boolean"},defaultValue:!0},gap:{control:{type:"number"},defaultValue:.8}},render:l=>({components:{ContentLoader:i},setup(){return{args:l}},template:` `})},r={name:"default",args:{type:"PARAGRAPH",lineCount:5,lineHeight:1,randomLineWidth:!0,gap:.8}};var m,p,f;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`{ name: 'default', args: { diff --git a/assets/DocsRenderer-CFRXHY34-D3v-BBxt.js b/assets/DocsRenderer-CFRXHY34-DKLslIoh.js similarity index 99% rename from assets/DocsRenderer-CFRXHY34-D3v-BBxt.js rename to assets/DocsRenderer-CFRXHY34-DKLslIoh.js index 16ea9a8..59001f2 100644 --- a/assets/DocsRenderer-CFRXHY34-D3v-BBxt.js +++ b/assets/DocsRenderer-CFRXHY34-DKLslIoh.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-CePcXxJC.js","./iframe-Dl3wkQvm.js","./index-i39XpuQg.js","./index-DrFu-skq.js","./Color-ERTF36HU-BECF7hgJ.js","./index-C0b3s7xI.js"])))=>i.map(i=>d[i]); -var wB=Object.defineProperty;var bB=(e,t,r)=>t in e?wB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ro=(e,t,r)=>bB(e,typeof t!="symbol"?t+"":t,r);import{_ as F5}from"./iframe-Dl3wkQvm.js";import{g as tl,b as Qu,y as u3,D as Ap}from"./index-i39XpuQg.js";import{d as EB}from"./index-DrFu-skq.js";var OC={exports:{}},te={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-GCK484eF.js","./iframe-CNfe-eQt.js","./index-i39XpuQg.js","./index-DrFu-skq.js","./Color-ERTF36HU-CTWFobSr.js","./index-BWZZ6CIZ.js"])))=>i.map(i=>d[i]); +var wB=Object.defineProperty;var bB=(e,t,r)=>t in e?wB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ro=(e,t,r)=>bB(e,typeof t!="symbol"?t+"":t,r);import{_ as F5}from"./iframe-CNfe-eQt.js";import{g as tl,b as Qu,y as u3,D as Ap}from"./index-i39XpuQg.js";import{d as EB}from"./index-DrFu-skq.js";var OC={exports:{}},te={};/** * @license React * react.production.min.js * @@ -597,7 +597,7 @@ ${t}`);let r=t.match(OK);if(!r)return b.createElement(u.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:Vt}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:Vde,once:Ude,logger:Q4}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:bC,composeConfigs:Ghe,Preview:Khe,DocsContext:Yhe}=__STORYBOOK_MODULE_PREVIEW_API__,{STORY_ARGS_UPDATED:EC,UPDATE_STORY_ARGS:Wde,RESET_STORY_ARGS:qde,GLOBALS_UPDATED:xC,NAVIGATE_URL:Gde}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var Kde=nl({"../../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}}}),Yde=nl({"../../node_modules/tocbot/src/js/build-html.js"(e,t){t.exports=function(r){var n=[].forEach,a=[].some,o=document.body,i,l=!0,s=" ";function d(x,D){var S=D.appendChild(m(x));if(x.children.length){var k=h(x.isCollapsed);x.children.forEach(function(_){d(_,k)}),S.appendChild(k)}}function p(x,D){var S=!1,k=h(S);if(D.forEach(function(_){d(_,k)}),i=x||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),D.length===0?i:i.appendChild(k)}function m(x){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",x.textContent),r.includeHtml&&x.childNodes.length?n.call(x.childNodes,function(k){S.appendChild(k.cloneNode(!0))}):S.textContent=x.textContent,S.setAttribute("href",r.basePath+"#"+x.id),S.setAttribute("class",r.linkClass+s+"node-name--"+x.nodeName+s+r.extraLinkClasses),D.appendChild(S),D}function h(x){var D=r.orderedList?"ol":"ul",S=document.createElement(D),k=r.listClass+s+r.extraListClasses;return x&&(k=k+s+r.collapsibleClass,k=k+s+r.isCollapsedClass),S.setAttribute("class",k),S}function f(){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var x;x=document.querySelector(r.scrollContainer).scrollTop}else x=document.documentElement.scrollTop||o.scrollTop;var D=document.querySelector(r.positionFixedSelector);r.fixedSidebarOffset==="auto"&&(r.fixedSidebarOffset=i.offsetTop),x>r.fixedSidebarOffset?D.className.indexOf(r.positionFixedClass)===-1&&(D.className+=s+r.positionFixedClass):D.className=D.className.replace(s+r.positionFixedClass,"")}function v(x){var D=0;return x!==null&&(D=x.offsetTop,r.hasInnerContainers&&(D+=v(x.offsetParent))),D}function g(x,D){return x&&x.className!==D&&(x.className=D),x}function C(x){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var D;D=document.querySelector(r.scrollContainer).scrollTop}else D=document.documentElement.scrollTop||o.scrollTop;r.positionFixedSelector&&f();var S=x,k;if(l&&i!==null&&S.length>0){a.call(S,function(j,M){if(v(j)>D+r.headingsOffset+10){var H=M===0?M:M-1;return k=S[H],!0}else if(M===S.length-1)return k=S[S.length-1],!0});var _=i.querySelector("."+r.activeLinkClass),A=i.querySelector("."+r.linkClass+".node-name--"+k.nodeName+'[href="'+r.basePath+"#"+k.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(_===A)return;var $=i.querySelectorAll("."+r.linkClass);n.call($,function(j){g(j,j.className.replace(s+r.activeLinkClass,""))});var I=i.querySelectorAll("."+r.listItemClass);n.call(I,function(j){g(j,j.className.replace(s+r.activeListItemClass,""))}),A&&A.className.indexOf(r.activeLinkClass)===-1&&(A.className+=s+r.activeLinkClass);var O=A&&A.parentNode;O&&O.className.indexOf(r.activeListItemClass)===-1&&(O.className+=s+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(j){j.className.indexOf(r.isCollapsedClass)===-1&&(j.className+=s+r.isCollapsedClass)}),A&&A.nextSibling&&A.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&g(A.nextSibling,A.nextSibling.className.replace(s+r.isCollapsedClass,"")),w(A&&A.parentNode.parentNode)}}function w(x){return x&&x.className.indexOf(r.collapsibleClass)!==-1&&x.className.indexOf(r.isCollapsedClass)!==-1?(g(x,x.className.replace(s+r.isCollapsedClass,"")),w(x.parentNode.parentNode)):x}function y(x){var D=x.target||x.srcElement;typeof D.className!="string"||D.className.indexOf(r.linkClass)===-1||(l=!1)}function E(){l=!0}return{enableTocAnimation:E,disableTocAnimation:y,render:p,updateToc:C}}}}),Zde=nl({"../../node_modules/tocbot/src/js/parse-content.js"(e,t){t.exports=function(r){var n=[].reduce;function a(m){return m[m.length-1]}function o(m){return+m.nodeName.toUpperCase().replace("H","")}function i(m){try{return m instanceof window.HTMLElement||m instanceof window.parent.HTMLElement}catch{return m instanceof window.HTMLElement}}function l(m){if(!i(m))return m;if(r.ignoreHiddenElements&&(!m.offsetHeight||!m.offsetParent))return null;let h=m.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(m.innerText)):(m.innerText||m.textContent).trim());var f={id:m.id,children:[],nodeName:m.nodeName,headingLevel:o(m),textContent:h};return r.includeHtml&&(f.childNodes=m.childNodes),r.headingObjectCallback?r.headingObjectCallback(f,m):f}function s(m,h){for(var f=l(m),v=f.headingLevel,g=h,C=a(g),w=C?C.headingLevel:0,y=v-w;y>0&&(C=a(g),!(C&&v===C.headingLevel));)C&&C.children!==void 0&&(g=C.children),y--;return v>=r.collapseDepth&&(f.isCollapsed=!0),g.push(f),g}function d(m,h){var f=h;r.ignoreSelector&&(f=h.split(",").map(function(v){return v.trim()+":not("+r.ignoreSelector+")"}));try{return m.querySelectorAll(f)}catch{return console.warn("Headers not found with selector: "+f),null}}function p(m){return n.call(m,function(h,f){var v=l(f);return v&&s(v,h.nest),h},{nest:[]})}return{nestHeadingsArray:p,selectHeadings:d}}}}),Xde=nl({"../../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)}}}}),Jde=nl({"../../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;l();function l(){document.body.addEventListener("click",m,!1);function m(h){!s(h.target)||h.target.className.indexOf("no-smooth-scroll")>-1||h.target.href.charAt(h.target.href.length-2)==="#"&&h.target.href.charAt(h.target.href.length-1)==="!"||h.target.className.indexOf(n.linkClass)===-1||r(h.target.hash,{duration:a,offset:o,callback:function(){p(h.target.hash)}})}}function s(m){return m.tagName.toLowerCase()==="a"&&(m.hash.length>0||m.href.charAt(m.href.length-1)==="#")&&(d(m.href)===i||d(m.href)+"#"===i)}function d(m){return m.slice(0,m.lastIndexOf("#"))}function p(m){var h=document.getElementById(m.substring(1));h&&(/^(?:a|select|input|button|textarea)$/i.test(h.tagName)||(h.tabIndex=-1),h.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||v},l=document.querySelector('[id="'+decodeURI(n).split("#").join("")+'"]')||document.querySelector('[id="'+n.split("#").join("")+'"]'),s=typeof n=="string"?i.offset+(n?l&&l.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):n,d=typeof i.duration=="function"?i.duration(s):i.duration,p,m;requestAnimationFrame(function(g){p=g,h(g)});function h(g){m=g-p,window.scrollTo(0,i.easing(m,o,s,d)),m"u"&&!m)return;var h,f=Object.prototype.hasOwnProperty;function v(){for(var y={},E=0;E({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:ge(.3,e.color.defaultText),fontSize:e.typography.size.s2})),Vz=e=>b.createElement(e1e,{...e,className:"docblock-emptyblock sb-unstyled"}),t1e=F(v4)(({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"}})),r1e=F.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"})),Gc=F.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${jm}`]:{margin:0}})),n1e=()=>b.createElement(r1e,null,b.createElement(Gc,null),b.createElement(Gc,{style:{width:"80%"}}),b.createElement(Gc,{style:{width:"30%"}}),b.createElement(Gc,{style:{width:"80%"}})),Uz=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:l}=w9();if(e)return b.createElement(n1e,null);if(t)return b.createElement(Vz,null,t);let s=b.createElement(t1e,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return s;let d=a?Pm.dark:Pm.light;return b.createElement(b9,{theme:Nm({...d,fontCode:l.fonts.mono,fontBase:l.fonts.base})},s)},Te=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,e3=600,a1e=F.h1(Ce,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${e3}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),o1e=F.h2(Ce,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${e3}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:ge(.25,e.color.defaultText)})),i1e=F.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"?ge(.1,e.color.defaultText):ge(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[Te("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}},[Te("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}},[Te("div")]:t,[Te("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}},[Te("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[Te("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[Te("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[Te("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[Te("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[Te("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[Te("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[Te("img")]:{maxWidth:"100%"},[Te("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[Te("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[Te("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[Te("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"}},[Te("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"}}},[Te("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}},[Te("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),l1e=F.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${e3}px)`]:{}})),s1e=({children:e,toc:t})=>b.createElement(l1e,{className:"sbdocs sbdocs-wrapper"},b.createElement(i1e,{className:"sbdocs sbdocs-content"},e),t),Dp=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:u1e}=Vt,c1e=class extends u.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=u1e.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 b.createElement("iframe",{id:e,title:t,src:r,...n?{allow:"fullscreen"}:{},loading:"lazy",...o})}},Wz=u.createContext({scale:1}),{PREVIEW_URL:d1e}=Vt,p1e=d1e||"iframe.html",x5=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,f1e=e=>{let t=u.useRef(),[r,n]=u.useState(!0),[a,o]=u.useState(),{story:i,height:l,autoplay:s,forceInitialArgs:d,renderStoryToElement:p}=e;return u.useEffect(()=>{if(!(i&&t.current))return()=>{};let m=t.current,h=p(i,m,{showMain:()=>{},showError:({title:f,description:v})=>o(new Error(`${f} - ${v}`)),showException:f=>o(f)},{autoplay:s,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>h())}},[s,p,i]),a?b.createElement("pre",null,b.createElement(jK,{error:a})):b.createElement(b.Fragment,null,l?b.createElement("style",null,`#${x5(e)} { min-height: ${l}; transform: translateZ(0); overflow: auto }`):null,r&&b.createElement(qz,null),b.createElement("div",{ref:t,id:`${x5(e)}-inner`,"data-name":i.name}))},h1e=({story:e,height:t="500px"})=>b.createElement("div",{style:{width:"100%",height:t}},b.createElement(Wz.Consumer,null,({scale:r})=>b.createElement(c1e,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:cZ(p1e,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),m1e=F.strong(({theme:e})=>({color:e.color.orange})),g1e=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?b.createElement(m1e,null,"This story mounts inside of play. Set"," ",b.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay"},"autoplay")," ","to true to view this story."):b.createElement("div",{id:x5(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?b.createElement(f1e,{...e}):b.createElement(h1e,{...e}))},qz=()=>b.createElement(uZ,null),v1e=F(_4)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),y1e=F.div({display:"flex",alignItems:"center",gap:4}),w1e=F.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`})),b1e=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>b.createElement(v1e,{...o},b.createElement(y1e,{key:"left"},e?[1,2,3].map(i=>b.createElement(w1e,{key:i})):b.createElement(b.Fragment,null,b.createElement(to,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},b.createElement(UZ,null)),b.createElement(to,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},b.createElement(WZ,null)),b.createElement(to,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},b.createElement(qZ,null))))),E1e=F.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)`}}:{}),CC=F(Uz)(({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)":zr(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":zr(.05,e.background.content)}})),x1e=F.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Dp(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),C1e=(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:b.createElement(CC,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:b.createElement(CC,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function D1e(e){if(u.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var S1e=F(b1e)({position:"absolute",top:0,left:0,right:0,height:40}),k1e=F.div({overflow:"hidden",position:"relative"}),Gz=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:l,className:s,layout:d="padded",...p})=>{let[m,h]=u.useState(i),{source:f,actionItem:v}=C1e(a,m,h),[g,C]=u.useState(1),w=[s].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),y=a?[v]:[],[E,x]=u.useState(l?[...l]:[]),D=[...y,...E],{window:S}=Vt,k=u.useCallback(async A=>{let{createCopyToClipboardFunction:$}=await F5(()=>import("./index-CePcXxJC.js"),__vite__mapDeps([0,1,2,3]),import.meta.url);$()},[]),_=A=>{let $=S.getSelection();$&&$.type==="Range"||(A.preventDefault(),E.filter(I=>I.title==="Copied").length===0&&k(f.props.code).then(()=>{x([...E,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>x(E.filter(I=>I.title!=="Copied")),1500)}))};return b.createElement(x1e,{withSource:a,withToolbar:o,...p,className:w.join(" ")},o&&b.createElement(S1e,{isLoading:e,border:!0,zoom:A=>C(g*A),resetZoom:()=>C(1),storyId:D1e(n),baseUrl:"./iframe.html"}),b.createElement(Wz.Provider,{value:{scale:g}},b.createElement(k1e,{className:"docs-story",onCopyCapture:a&&_},b.createElement(E1e,{isColumn:t||!Array.isArray(n),columns:r,layout:d},b.createElement(RK.Element,{scale:g},Array.isArray(n)?n.map((A,$)=>b.createElement("div",{key:$},A)):b.createElement("div",null,n))),b.createElement(Jv,{actionItems:D}))),a&&m&&f)};F(Gz)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var _1e=F.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:ge(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${Uc(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${Uc(.05,e.appBorderColor)} 0 0 0 2px inset`,color:Uc(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"?`${Uc(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),A1e=e=>e==="true",F1e=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{var p;let i=u.useCallback(()=>r(!1),[r]),l=!!((p=o==null?void 0:o.table)!=null&&p.readonly);if(t===void 0)return b.createElement(So,{variant:"outline",size:"medium",id:Xd(e),onClick:i,disabled:l},"Set boolean");let s=br(e),d=typeof t=="string"?A1e(t):t;return b.createElement(_1e,{"aria-disabled":l,htmlFor:s,"aria-label":e},b.createElement("input",{id:s,type:"checkbox",onChange:m=>r(m.target.checked),checked:d,role:"switch",disabled:l,name:e,onBlur:n,onFocus:a}),b.createElement("span",{"aria-hidden":"true"},"False"),b.createElement("span",{"aria-hidden":"true"},"True"))},$1e=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},T1e=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},I1e=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}`},R1e=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},DC=F(qu.Input)(({readOnly:e})=>({opacity:e?.5:1})),z1e=F.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}})),B1e=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{var v;let[i,l]=u.useState(!0),s=u.useRef(),d=u.useRef(),p=!!((v=o==null?void 0:o.table)!=null&&v.readonly);u.useEffect(()=>{i!==!1&&(s&&s.current&&(s.current.value=t?I1e(t):""),d&&d.current&&(d.current.value=t?R1e(t):""))},[t]);let m=g=>{if(!g.target.value)return r();let C=$1e(g.target.value),w=new Date(t);w.setFullYear(C.getFullYear(),C.getMonth(),C.getDate());let y=w.getTime();y&&r(y),l(!!y)},h=g=>{if(!g.target.value)return r();let C=T1e(g.target.value),w=new Date(t);w.setHours(C.getHours()),w.setMinutes(C.getMinutes());let y=w.getTime();y&&r(y),l(!!y)},f=br(e);return b.createElement(z1e,null,b.createElement(DC,{type:"date",max:"9999-12-31",ref:s,id:`${f}-date`,name:`${f}-date`,readOnly:p,onChange:m,onFocus:n,onBlur:a}),b.createElement(DC,{type:"time",id:`${f}-time`,name:`${f}-time`,ref:d,onChange:h,readOnly:p,onFocus:n,onBlur:a}),i?null:b.createElement("div",null,"invalid"))},L1e=F.label({display:"flex"}),O1e=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},M1e=F(qu.Input)(({readOnly:e})=>({opacity:e?.5:1})),P1e=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:l,argType:s})=>{var E;let[d,p]=u.useState(typeof t=="number"?t:""),[m,h]=u.useState(!1),[f,v]=u.useState(null),g=!!((E=s==null?void 0:s.table)!=null&&E.readonly),C=u.useCallback(x=>{p(x.target.value);let D=parseFloat(x.target.value);Number.isNaN(D)?v(new Error(`'${x.target.value}' is not a number`)):(r(D),v(null))},[r,v]),w=u.useCallback(()=>{p("0"),r(0),h(!0)},[h]),y=u.useRef(null);return u.useEffect(()=>{m&&y.current&&y.current.select()},[m]),u.useEffect(()=>{d!==(typeof t=="number"?t:"")&&p(t)},[t]),t===void 0?b.createElement(So,{variant:"outline",size:"medium",id:Xd(e),onClick:w,disabled:g},"Set number"):b.createElement(L1e,null,b.createElement(M1e,{ref:y,id:br(e),type:"number",onChange:C,size:"flex",placeholder:"Edit number...",value:d,valid:f?"error":null,autoFocus:m,readOnly:g,name:e,min:n,max:a,step:o,onFocus:l,onBlur:i}))},Kz=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},C5=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],Yz=(e,t)=>e&&t&&e.map(r=>t[r]),N1e=F.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"}}}),j1e=F.span({"[aria-readonly=true] &":{opacity:.5}}),H1e=F.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),SC=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var h;if(!t)return Q4.warn(`Checkbox with no options: ${e}`),b.createElement(b.Fragment,null,"-");let i=C5(r,t),[l,s]=u.useState(i),d=!!((h=o==null?void 0:o.table)!=null&&h.readonly),p=f=>{let v=f.target.value,g=[...l];g.includes(v)?g.splice(g.indexOf(v),1):g.push(v),n(Yz(g,t)),s(g)};u.useEffect(()=>{s(C5(r,t))},[r]);let m=br(e);return b.createElement(N1e,{"aria-readonly":d,isInline:a},Object.keys(t).map((f,v)=>{let g=`${m}-${v}`;return b.createElement(H1e,{key:g,htmlFor:g},b.createElement("input",{type:"checkbox",disabled:d,id:g,name:g,value:f,onChange:p,checked:l==null?void 0:l.includes(f)}),b.createElement(j1e,null,f))}))},V1e=F.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"}}}),U1e=F.span({"[aria-readonly=true] &":{opacity:.5}}),W1e=F.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),kC=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var d;if(!t)return Q4.warn(`Radio with no options: ${e}`),b.createElement(b.Fragment,null,"-");let i=Kz(r,t),l=br(e),s=!!((d=o==null?void 0:o.table)!=null&&d.readonly);return b.createElement(V1e,{"aria-readonly":s,isInline:a},Object.keys(t).map((p,m)=>{let h=`${l}-${m}`;return b.createElement(W1e,{key:h,htmlFor:h},b.createElement("input",{type:"radio",id:h,name:l,disabled:s,value:p,onChange:f=>n(t[f.currentTarget.value]),checked:p===i}),b.createElement(U1e,null,p))}))},q1e={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},Zz=F.select(q1e,({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}}})),Xz=F.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}}})),_C="Choose option...",G1e=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=p=>{n(r[p.currentTarget.value])},i=Kz(t,r)||_C,l=br(e),s=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return b.createElement(Xz,null,b.createElement($R,null),b.createElement(Zz,{disabled:s,id:l,value:i,onChange:o},b.createElement("option",{key:"no-selection",disabled:!0},_C),Object.keys(r).map(p=>b.createElement("option",{key:p,value:p},p))))},K1e=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=p=>{let m=Array.from(p.currentTarget.options).filter(h=>h.selected).map(h=>h.value);n(Yz(m,r))},i=C5(t,r),l=br(e),s=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return b.createElement(Xz,null,b.createElement(Zz,{disabled:s,id:l,multiple:!0,value:i,onChange:o},Object.keys(r).map(p=>b.createElement("option",{key:p,value:p},p))))},AC=e=>{let{name:t,options:r}=e;return r?e.isMulti?b.createElement(K1e,{...e}):b.createElement(G1e,{...e}):(Q4.warn(`Select with no options: ${t}`),b.createElement(b.Fragment,null,"-"))},Y1e=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[(t==null?void 0:t[n])||String(n)]=n,r),{}):e,Z1e={check:SC,"inline-check":SC,radio:kC,"inline-radio":kC,select:AC,"multi-select":AC},Ho=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?Y1e(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=Z1e[t];if(o)return b.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},X1e="Error",J1e="Object",Q1e="Array",epe="String",tpe="Number",rpe="Boolean",npe="Date",ape="Null",ope="Undefined",ipe="Function",lpe="Symbol",Jz="ADD_DELTA_TYPE",Qz="REMOVE_DELTA_TYPE",eB="UPDATE_DELTA_TYPE",t3="value",spe="key";function Ya(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 tB(e,t){let r=Ya(e),n=Ya(t);return(r==="Function"||n==="Function")&&n!==r}var r3=class extends u.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,l={};if(!t){if(!o.value)return;l.key=o.value}l.newValue=r(!1,n,a,l.key,i.value),e(l)}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,l=u.cloneElement(r,{onClick:this.onSubmit}),s=u.cloneElement(n,{onClick:e}),d=a(t3,o,i),p=u.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),m=null;if(!t){let h=a(spe,o,i);m=u.cloneElement(h,{placeholder:"Key",ref:this.refInputKey})}return b.createElement("span",{className:"rejt-add-value-node"},m,p,s,l)}};r3.defaultProps={onlyValue:!1,addButtonElement:b.createElement("button",null,"+"),cancelButtonElement:b.createElement("button",null,"c")};var rB=class extends u.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 l={keyPath:a,deep:o,key:e,oldValue:i,type:Qz};n.splice(e,1),this.setState({data:n});let{onUpdate:s,onDeltaUpdate:d}=this.props;s(a[a.length-1],n),d(l)}).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:l,onDeltaUpdate:s}=this.props;l(r[r.length-1],i),s({type:Jz,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:l}=this.state,s=o[e];a(e,i,l,s,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:p}=this.props;d(i[i.length-1],o),p({type:eB,keyPath:i,deep:l,key:e,newValue:t,oldValue:s}),r(void 0)}).catch(n)})}renderCollapsed(){let{name:e,data:t,keyPath:r,deep:n}=this.state,{handleRemove:a,readOnly:o,getStyle:i,dataType:l,minusMenuElement:s}=this.props,{minus:d,collapsed:p}=i(e,t,r,n,l),m=o(e,t,r,n,l),h=u.cloneElement(s,{onClick:a,className:"rejt-minus-menu",style:d});return b.createElement("span",{className:"rejt-collapsed"},b.createElement("span",{className:"rejt-collapsed-text",style:p,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!m&&h)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,addFormVisible:a,nextDeep:o}=this.state,{isCollapsed:i,handleRemove:l,onDeltaUpdate:s,readOnly:d,getStyle:p,dataType:m,addButtonElement:h,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:C,minusMenuElement:w,plusMenuElement:y,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:D,logger:S,onSubmitValueParser:k}=this.props,{minus:_,plus:A,delimiter:$,ul:I,addForm:O}=p(e,t,r,n,m),z=d(e,t,r,n,m),j=u.cloneElement(y,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:A}),M=u.cloneElement(w,{onClick:l,className:"rejt-minus-menu",style:_});return b.createElement("span",{className:"rejt-not-collapsed"},b.createElement("span",{className:"rejt-not-collapsed-delimiter",style:$},"["),!a&&j,b.createElement("ul",{className:"rejt-not-collapsed-list",style:I},t.map((H,W)=>b.createElement(Sp,{key:W,name:W.toString(),data:H,keyPath:r,deep:o,isCollapsed:i,handleRemove:this.handleRemoveItem(W),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:s,readOnly:d,getStyle:p,addButtonElement:h,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:C,minusMenuElement:w,plusMenuElement:y,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:D,logger:S,onSubmitValueParser:k}))),!z&&a&&b.createElement("div",{className:"rejt-add-form",style:O},b.createElement(r3,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:h,cancelButtonElement:f,inputElementGenerator:g,keyPath:r,deep:n,onSubmitValueParser:k})),b.createElement("span",{className:"rejt-not-collapsed-delimiter",style:$},"]"),!z&&M)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{dataType:o,getStyle:i}=this.props,l=t?this.renderCollapsed():this.renderNotCollapsed(),s=i(e,r,n,a,o);return b.createElement("div",{className:"rejt-array-node"},b.createElement("span",{onClick:this.handleCollapseMode},b.createElement("span",{className:"rejt-name",style:s.name},e," :"," ")),l)}};rB.defaultProps={keyPath:[],deep:0,minusMenuElement:b.createElement("span",null," - "),plusMenuElement:b.createElement("span",null," + ")};var nB=class extends u.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:l}=this.props,s=i(r,n,a,o,l);e&&!s&&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:l}=this.state;if(!o)return;let s=n(!0,a,l,i,o.value);e({value:s,key:i}).then(()=>{tB(t,s)||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:l,dataType:s,getStyle:d,editButtonElement:p,cancelButtonElement:m,textareaElementGenerator:h,minusMenuElement:f,keyPath:v}=this.props,g=d(e,i,n,a,s),C=null,w=null,y=l(e,i,n,a,s);if(r&&!y){let E=h(t3,v,a,e,i,s),x=u.cloneElement(p,{onClick:this.handleEdit}),D=u.cloneElement(m,{onClick:this.handleCancelEdit}),S=u.cloneElement(E,{ref:this.refInput,defaultValue:i});C=b.createElement("span",{className:"rejt-edit-form",style:g.editForm},S," ",D,x),w=null}else{C=b.createElement("span",{className:"rejt-value",style:g.value,onClick:y?null:this.handleEditMode},t);let E=u.cloneElement(f,{onClick:o,className:"rejt-minus-menu",style:g.minus});w=y?null:E}return b.createElement("li",{className:"rejt-function-value-node",style:g.li},b.createElement("span",{className:"rejt-name",style:g.name},e," :"," "),C,w)}};nB.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:b.createElement("button",null,"e"),cancelButtonElement:b.createElement("button",null,"c"),minusMenuElement:b.createElement("span",null," - ")};var Sp=class extends u.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:l,onDeltaUpdate:s,readOnly:d,getStyle:p,addButtonElement:m,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:C,plusMenuElement:w,beforeRemoveAction:y,beforeAddAction:E,beforeUpdateAction:x,logger:D,onSubmitValueParser:S}=this.props,k=()=>!0,_=Ya(e);switch(_){case X1e:return b.createElement(D5,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:l,onDeltaUpdate:s,readOnly:k,dataType:_,getStyle:p,addButtonElement:m,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:C,plusMenuElement:w,beforeRemoveAction:y,beforeAddAction:E,beforeUpdateAction:x,logger:D,onSubmitValueParser:S});case J1e:return b.createElement(D5,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:l,onDeltaUpdate:s,readOnly:d,dataType:_,getStyle:p,addButtonElement:m,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:C,plusMenuElement:w,beforeRemoveAction:y,beforeAddAction:E,beforeUpdateAction:x,logger:D,onSubmitValueParser:S});case Q1e:return b.createElement(rB,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:l,onDeltaUpdate:s,readOnly:d,dataType:_,getStyle:p,addButtonElement:m,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:C,plusMenuElement:w,beforeRemoveAction:y,beforeAddAction:E,beforeUpdateAction:x,logger:D,onSubmitValueParser:S});case epe:return b.createElement(On,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case tpe:return b.createElement(On,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case rpe:return b.createElement(On,{name:t,value:e?"true":"false",originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case npe:return b.createElement(On,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:k,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case ape:return b.createElement(On,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case ope:return b.createElement(On,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case ipe:return b.createElement(nB,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,textareaElementGenerator:g,minusMenuElement:C,logger:D,onSubmitValueParser:S});case lpe:return b.createElement(On,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:k,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});default:return null}}};Sp.defaultProps={keyPath:[],deep:0};var D5=class extends u.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:l,onDeltaUpdate:s}=this.props;l(n[n.length-1],r),s({type:Jz,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 l={keyPath:a,deep:o,key:e,oldValue:i,type:Qz};delete n[e],this.setState({data:n});let{onUpdate:s,onDeltaUpdate:d}=this.props;s(a[a.length-1],n),d(l)}).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:l}=this.state,s=o[e];a(e,i,l,s,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:p}=this.props;d(i[i.length-1],o),p({type:eB,keyPath:i,deep:l,key:e,newValue:t,oldValue:s}),r()}).catch(n)})}renderCollapsed(){let{name:e,keyPath:t,deep:r,data:n}=this.state,{handleRemove:a,readOnly:o,dataType:i,getStyle:l,minusMenuElement:s}=this.props,{minus:d,collapsed:p}=l(e,n,t,r,i),m=Object.getOwnPropertyNames(n),h=o(e,n,t,r,i),f=u.cloneElement(s,{onClick:a,className:"rejt-minus-menu",style:d});return b.createElement("span",{className:"rejt-collapsed"},b.createElement("span",{className:"rejt-collapsed-text",style:p,onClick:this.handleCollapseMode},"{...}"," ",m.length," ",m.length===1?"key":"keys"),!h&&f)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,nextDeep:a,addFormVisible:o}=this.state,{isCollapsed:i,handleRemove:l,onDeltaUpdate:s,readOnly:d,getStyle:p,dataType:m,addButtonElement:h,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:C,minusMenuElement:w,plusMenuElement:y,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:D,logger:S,onSubmitValueParser:k}=this.props,{minus:_,plus:A,addForm:$,ul:I,delimiter:O}=p(e,t,r,n,m),z=Object.getOwnPropertyNames(t),j=d(e,t,r,n,m),M=u.cloneElement(y,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:A}),H=u.cloneElement(w,{onClick:l,className:"rejt-minus-menu",style:_}),W=z.map(B=>b.createElement(Sp,{key:B,name:B,data:t[B],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(B),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:s,readOnly:d,getStyle:p,addButtonElement:h,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:C,minusMenuElement:w,plusMenuElement:y,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:D,logger:S,onSubmitValueParser:k}));return b.createElement("span",{className:"rejt-not-collapsed"},b.createElement("span",{className:"rejt-not-collapsed-delimiter",style:O},"{"),!j&&M,b.createElement("ul",{className:"rejt-not-collapsed-list",style:I},W),!j&&o&&b.createElement("div",{className:"rejt-add-form",style:$},b.createElement(r3,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:h,cancelButtonElement:f,inputElementGenerator:g,keyPath:r,deep:n,onSubmitValueParser:k})),b.createElement("span",{className:"rejt-not-collapsed-delimiter",style:O},"}"),!j&&H)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{getStyle:o,dataType:i}=this.props,l=t?this.renderCollapsed():this.renderNotCollapsed(),s=o(e,r,n,a,i);return b.createElement("div",{className:"rejt-object-node"},b.createElement("span",{onClick:this.handleCollapseMode},b.createElement("span",{className:"rejt-name",style:s.name},e," :"," ")),l)}};D5.defaultProps={keyPath:[],deep:0,minusMenuElement:b.createElement("span",null," - "),plusMenuElement:b.createElement("span",null," + ")};var On=class extends u.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:l}=this.props,s=i(r,n,a,o,l);e&&!s&&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:l}=this.state;if(!o)return;let s=n(!0,a,l,i,o.value);e({value:s,key:i}).then(()=>{tB(t,s)||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:l,dataType:s,getStyle:d,editButtonElement:p,cancelButtonElement:m,inputElementGenerator:h,minusMenuElement:f,keyPath:v}=this.props,g=d(e,i,n,a,s),C=l(e,i,n,a,s),w=r&&!C,y=h(t3,v,a,e,i,s),E=u.cloneElement(p,{onClick:this.handleEdit}),x=u.cloneElement(m,{onClick:this.handleCancelEdit}),D=u.cloneElement(y,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=u.cloneElement(f,{onClick:o,className:"rejt-minus-menu",style:g.minus});return b.createElement("li",{className:"rejt-value-node",style:g.li},b.createElement("span",{className:"rejt-name",style:g.name},e," : "),w?b.createElement("span",{className:"rejt-edit-form",style:g.editForm},D," ",x,E):b.createElement("span",{className:"rejt-value",style:g.value,onClick:C?null:this.handleEditMode},String(t)),!C&&!w&&S)}};On.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),editButtonElement:b.createElement("button",null,"e"),cancelButtonElement:b.createElement("button",null,"c"),minusMenuElement:b.createElement("span",null," - ")};function upe(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var cpe={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},dpe={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},ppe={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}},aB=class extends u.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:l,editButtonElement:s,inputElement:d,textareaElement:p,minusMenuElement:m,plusMenuElement:h,beforeRemoveAction:f,beforeAddAction:v,beforeUpdateAction:g,logger:C,onSubmitValueParser:w,fallback:y=null}=this.props,E=Ya(e),x=a;Ya(a)==="Boolean"&&(x=()=>a);let D=d;d&&Ya(d)!=="Function"&&(D=()=>d);let S=p;return p&&Ya(p)!=="Function"&&(S=()=>p),E==="Object"||E==="Array"?b.createElement("div",{className:"rejt-tree"},b.createElement(Sp,{data:e,name:t,deep:-1,isCollapsed:r,onUpdate:this.onUpdate,onDeltaUpdate:n,readOnly:x,getStyle:o,addButtonElement:i,cancelButtonElement:l,editButtonElement:s,inputElementGenerator:D,textareaElementGenerator:S,minusMenuElement:m,plusMenuElement:h,handleRemove:this.removeRoot,beforeRemoveAction:f,beforeAddAction:v,beforeUpdateAction:g,logger:C,onSubmitValueParser:w})):y}};aB.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return cpe;case"Array":return dpe;default:return ppe}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>upe(a),inputElement:()=>b.createElement("input",null),textareaElement:()=>b.createElement("textarea",null),fallback:null};var{window:fpe}=Vt,hpe=F.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}})),Rm=F.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})),mpe=F(ZZ)(({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}})),gpe=F(XZ)(({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}})),FC=F.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}`}})),vpe=F(to)(({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}})),ype=F(qu.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"}})),wpe={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},bpe=e=>{e.currentTarget.dispatchEvent(new fpe.KeyboardEvent("keydown",wpe))},Epe=e=>{e.currentTarget.select()},xpe=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),$C=({name:e,value:t,onChange:r,argType:n})=>{var E;let a=w9(),o=u.useMemo(()=>t&&jue(t),[t]),i=o!=null,[l,s]=u.useState(!i),[d,p]=u.useState(null),m=!!((E=n==null?void 0:n.table)!=null&&E.readonly),h=u.useCallback(x=>{try{x&&r(JSON.parse(x)),p(void 0)}catch(D){p(D)}},[r]),[f,v]=u.useState(!1),g=u.useCallback(()=>{r({}),v(!0)},[v]),C=u.useRef(null);if(u.useEffect(()=>{f&&C.current&&C.current.select()},[f]),!i)return b.createElement(So,{disabled:m,id:Xd(e),onClick:g},"Set object");let w=b.createElement(ype,{ref:C,id:br(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:x=>h(x.target.value),placeholder:"Edit JSON string...",autoFocus:f,valid:d?"error":null,readOnly:m}),y=Array.isArray(t)||typeof t=="object"&&(t==null?void 0:t.constructor)===Object;return b.createElement(hpe,{"aria-readonly":m},y&&b.createElement(vpe,{onClick:x=>{x.preventDefault(),s(D=>!D)}},l?b.createElement(KZ,null):b.createElement(GZ,null),b.createElement("span",null,"RAW")),l?w:b.createElement(aB,{readOnly:m||!y,isCollapsed:y?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:xpe(a),cancelButtonElement:b.createElement(Rm,{type:"button"},"Cancel"),editButtonElement:b.createElement(Rm,{type:"submit"},"Save"),addButtonElement:b.createElement(Rm,{type:"submit",primary:!0},"Save"),plusMenuElement:b.createElement(mpe,null),minusMenuElement:b.createElement(gpe,null),inputElement:(x,D,S,k)=>k?b.createElement(FC,{onFocus:Epe,onBlur:bpe}):b.createElement(FC,null),fallback:w}))},Cpe=F.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:Vt}=__STORYBOOK_MODULE_GLOBAL__,{deprecate:Vde,once:Ude,logger:Q4}=__STORYBOOK_MODULE_CLIENT_LOGGER__,{filterArgTypes:bC,composeConfigs:Ghe,Preview:Khe,DocsContext:Yhe}=__STORYBOOK_MODULE_PREVIEW_API__,{STORY_ARGS_UPDATED:EC,UPDATE_STORY_ARGS:Wde,RESET_STORY_ARGS:qde,GLOBALS_UPDATED:xC,NAVIGATE_URL:Gde}=__STORYBOOK_MODULE_CORE_EVENTS__;__STORYBOOK_MODULE_CHANNELS__;var Kde=nl({"../../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}}}),Yde=nl({"../../node_modules/tocbot/src/js/build-html.js"(e,t){t.exports=function(r){var n=[].forEach,a=[].some,o=document.body,i,l=!0,s=" ";function d(x,D){var S=D.appendChild(m(x));if(x.children.length){var k=h(x.isCollapsed);x.children.forEach(function(_){d(_,k)}),S.appendChild(k)}}function p(x,D){var S=!1,k=h(S);if(D.forEach(function(_){d(_,k)}),i=x||i,i!==null)return i.firstChild&&i.removeChild(i.firstChild),D.length===0?i:i.appendChild(k)}function m(x){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",x.textContent),r.includeHtml&&x.childNodes.length?n.call(x.childNodes,function(k){S.appendChild(k.cloneNode(!0))}):S.textContent=x.textContent,S.setAttribute("href",r.basePath+"#"+x.id),S.setAttribute("class",r.linkClass+s+"node-name--"+x.nodeName+s+r.extraLinkClasses),D.appendChild(S),D}function h(x){var D=r.orderedList?"ol":"ul",S=document.createElement(D),k=r.listClass+s+r.extraListClasses;return x&&(k=k+s+r.collapsibleClass,k=k+s+r.isCollapsedClass),S.setAttribute("class",k),S}function f(){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var x;x=document.querySelector(r.scrollContainer).scrollTop}else x=document.documentElement.scrollTop||o.scrollTop;var D=document.querySelector(r.positionFixedSelector);r.fixedSidebarOffset==="auto"&&(r.fixedSidebarOffset=i.offsetTop),x>r.fixedSidebarOffset?D.className.indexOf(r.positionFixedClass)===-1&&(D.className+=s+r.positionFixedClass):D.className=D.className.replace(s+r.positionFixedClass,"")}function v(x){var D=0;return x!==null&&(D=x.offsetTop,r.hasInnerContainers&&(D+=v(x.offsetParent))),D}function g(x,D){return x&&x.className!==D&&(x.className=D),x}function C(x){if(r.scrollContainer&&document.querySelector(r.scrollContainer)){var D;D=document.querySelector(r.scrollContainer).scrollTop}else D=document.documentElement.scrollTop||o.scrollTop;r.positionFixedSelector&&f();var S=x,k;if(l&&i!==null&&S.length>0){a.call(S,function(j,M){if(v(j)>D+r.headingsOffset+10){var H=M===0?M:M-1;return k=S[H],!0}else if(M===S.length-1)return k=S[S.length-1],!0});var _=i.querySelector("."+r.activeLinkClass),A=i.querySelector("."+r.linkClass+".node-name--"+k.nodeName+'[href="'+r.basePath+"#"+k.id.replace(/([ #;&,.+*~':"!^$[\]()=>|/\\@])/g,"\\$1")+'"]');if(_===A)return;var $=i.querySelectorAll("."+r.linkClass);n.call($,function(j){g(j,j.className.replace(s+r.activeLinkClass,""))});var I=i.querySelectorAll("."+r.listItemClass);n.call(I,function(j){g(j,j.className.replace(s+r.activeListItemClass,""))}),A&&A.className.indexOf(r.activeLinkClass)===-1&&(A.className+=s+r.activeLinkClass);var O=A&&A.parentNode;O&&O.className.indexOf(r.activeListItemClass)===-1&&(O.className+=s+r.activeListItemClass);var z=i.querySelectorAll("."+r.listClass+"."+r.collapsibleClass);n.call(z,function(j){j.className.indexOf(r.isCollapsedClass)===-1&&(j.className+=s+r.isCollapsedClass)}),A&&A.nextSibling&&A.nextSibling.className.indexOf(r.isCollapsedClass)!==-1&&g(A.nextSibling,A.nextSibling.className.replace(s+r.isCollapsedClass,"")),w(A&&A.parentNode.parentNode)}}function w(x){return x&&x.className.indexOf(r.collapsibleClass)!==-1&&x.className.indexOf(r.isCollapsedClass)!==-1?(g(x,x.className.replace(s+r.isCollapsedClass,"")),w(x.parentNode.parentNode)):x}function y(x){var D=x.target||x.srcElement;typeof D.className!="string"||D.className.indexOf(r.linkClass)===-1||(l=!1)}function E(){l=!0}return{enableTocAnimation:E,disableTocAnimation:y,render:p,updateToc:C}}}}),Zde=nl({"../../node_modules/tocbot/src/js/parse-content.js"(e,t){t.exports=function(r){var n=[].reduce;function a(m){return m[m.length-1]}function o(m){return+m.nodeName.toUpperCase().replace("H","")}function i(m){try{return m instanceof window.HTMLElement||m instanceof window.parent.HTMLElement}catch{return m instanceof window.HTMLElement}}function l(m){if(!i(m))return m;if(r.ignoreHiddenElements&&(!m.offsetHeight||!m.offsetParent))return null;let h=m.getAttribute("data-heading-label")||(r.headingLabelCallback?String(r.headingLabelCallback(m.innerText)):(m.innerText||m.textContent).trim());var f={id:m.id,children:[],nodeName:m.nodeName,headingLevel:o(m),textContent:h};return r.includeHtml&&(f.childNodes=m.childNodes),r.headingObjectCallback?r.headingObjectCallback(f,m):f}function s(m,h){for(var f=l(m),v=f.headingLevel,g=h,C=a(g),w=C?C.headingLevel:0,y=v-w;y>0&&(C=a(g),!(C&&v===C.headingLevel));)C&&C.children!==void 0&&(g=C.children),y--;return v>=r.collapseDepth&&(f.isCollapsed=!0),g.push(f),g}function d(m,h){var f=h;r.ignoreSelector&&(f=h.split(",").map(function(v){return v.trim()+":not("+r.ignoreSelector+")"}));try{return m.querySelectorAll(f)}catch{return console.warn("Headers not found with selector: "+f),null}}function p(m){return n.call(m,function(h,f){var v=l(f);return v&&s(v,h.nest),h},{nest:[]})}return{nestHeadingsArray:p,selectHeadings:d}}}}),Xde=nl({"../../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)}}}}),Jde=nl({"../../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;l();function l(){document.body.addEventListener("click",m,!1);function m(h){!s(h.target)||h.target.className.indexOf("no-smooth-scroll")>-1||h.target.href.charAt(h.target.href.length-2)==="#"&&h.target.href.charAt(h.target.href.length-1)==="!"||h.target.className.indexOf(n.linkClass)===-1||r(h.target.hash,{duration:a,offset:o,callback:function(){p(h.target.hash)}})}}function s(m){return m.tagName.toLowerCase()==="a"&&(m.hash.length>0||m.href.charAt(m.href.length-1)==="#")&&(d(m.href)===i||d(m.href)+"#"===i)}function d(m){return m.slice(0,m.lastIndexOf("#"))}function p(m){var h=document.getElementById(m.substring(1));h&&(/^(?:a|select|input|button|textarea)$/i.test(h.tagName)||(h.tabIndex=-1),h.focus())}}function r(n,a){var o=window.pageYOffset,i={duration:a.duration,offset:a.offset||0,callback:a.callback,easing:a.easing||v},l=document.querySelector('[id="'+decodeURI(n).split("#").join("")+'"]')||document.querySelector('[id="'+n.split("#").join("")+'"]'),s=typeof n=="string"?i.offset+(n?l&&l.getBoundingClientRect().top||0:-(document.documentElement.scrollTop||document.body.scrollTop)):n,d=typeof i.duration=="function"?i.duration(s):i.duration,p,m;requestAnimationFrame(function(g){p=g,h(g)});function h(g){m=g-p,window.scrollTo(0,i.easing(m,o,s,d)),m"u"&&!m)return;var h,f=Object.prototype.hasOwnProperty;function v(){for(var y={},E=0;E({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:ge(.3,e.color.defaultText),fontSize:e.typography.size.s2})),Vz=e=>b.createElement(e1e,{...e,className:"docblock-emptyblock sb-unstyled"}),t1e=F(v4)(({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"}})),r1e=F.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"})),Gc=F.div(({theme:e})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,height:17,marginTop:1,width:"60%",[`&:first-child${jm}`]:{margin:0}})),n1e=()=>b.createElement(r1e,null,b.createElement(Gc,null),b.createElement(Gc,{style:{width:"80%"}}),b.createElement(Gc,{style:{width:"30%"}}),b.createElement(Gc,{style:{width:"80%"}})),Uz=({isLoading:e,error:t,language:r,code:n,dark:a,format:o=!1,...i})=>{let{typography:l}=w9();if(e)return b.createElement(n1e,null);if(t)return b.createElement(Vz,null,t);let s=b.createElement(t1e,{bordered:!0,copyable:!0,format:o,language:r,className:"docblock-source sb-unstyled",...i},n);if(typeof a>"u")return s;let d=a?Pm.dark:Pm.light;return b.createElement(b9,{theme:Nm({...d,fontCode:l.fonts.mono,fontBase:l.fonts.base})},s)},Te=e=>`& :where(${e}:not(.sb-anchor, .sb-unstyled, .sb-unstyled ${e}))`,e3=600,a1e=F.h1(Ce,({theme:e})=>({color:e.color.defaultText,fontSize:e.typography.size.m3,fontWeight:e.typography.weight.bold,lineHeight:"32px",[`@media (min-width: ${e3}px)`]:{fontSize:e.typography.size.l1,lineHeight:"36px",marginBottom:"16px"}})),o1e=F.h2(Ce,({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s3,lineHeight:"20px",borderBottom:"none",marginBottom:15,[`@media (min-width: ${e3}px)`]:{fontSize:e.typography.size.m1,lineHeight:"28px",marginBottom:24},color:ge(.25,e.color.defaultText)})),i1e=F.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"?ge(.1,e.color.defaultText):ge(.3,e.color.defaultText),backgroundColor:e.base==="light"?e.color.lighter:e.color.border};return{maxWidth:1e3,width:"100%",[Te("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}},[Te("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}},[Te("div")]:t,[Te("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}},[Te("h1")]:{...t,...r,fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},[Te("h2")]:{...t,...r,fontSize:`${e.typography.size.m2}px`,paddingBottom:4,borderBottom:`1px solid ${e.appBorderColor}`},[Te("h3")]:{...t,...r,fontSize:`${e.typography.size.m1}px`,fontWeight:e.typography.weight.bold},[Te("h4")]:{...t,...r,fontSize:`${e.typography.size.s3}px`},[Te("h5")]:{...t,...r,fontSize:`${e.typography.size.s2}px`},[Te("h6")]:{...t,...r,fontSize:`${e.typography.size.s2}px`,color:e.color.dark},[Te("hr")]:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},[Te("img")]:{maxWidth:"100%"},[Te("li")]:{...t,fontSize:e.typography.size.s2,color:e.color.defaultText,lineHeight:"24px","& + li":{marginTop:".25em"},"& ul, & ol":{marginTop:".25em",marginBottom:0},"& code":n},[Te("ol")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},[Te("p")]:{...t,margin:"16px 0",fontSize:e.typography.size.s2,lineHeight:"24px",color:e.color.defaultText,"& code":n},[Te("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"}},[Te("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"}}},[Te("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}},[Te("ul")]:{...t,margin:"16px 0",paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0},listStyle:"disc"}}}),l1e=F.div(({theme:e})=>({background:e.background.content,display:"flex",justifyContent:"center",padding:"4rem 20px",minHeight:"100vh",boxSizing:"border-box",gap:"3rem",[`@media (min-width: ${e3}px)`]:{}})),s1e=({children:e,toc:t})=>b.createElement(l1e,{className:"sbdocs sbdocs-wrapper"},b.createElement(i1e,{className:"sbdocs sbdocs-content"},e),t),Dp=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:u1e}=Vt,c1e=class extends u.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{id:e}=this.props;this.iframe=u1e.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 b.createElement("iframe",{id:e,title:t,src:r,...n?{allow:"fullscreen"}:{},loading:"lazy",...o})}},Wz=u.createContext({scale:1}),{PREVIEW_URL:d1e}=Vt,p1e=d1e||"iframe.html",x5=({story:e,primary:t})=>`story--${e.id}${t?"--primary":""}`,f1e=e=>{let t=u.useRef(),[r,n]=u.useState(!0),[a,o]=u.useState(),{story:i,height:l,autoplay:s,forceInitialArgs:d,renderStoryToElement:p}=e;return u.useEffect(()=>{if(!(i&&t.current))return()=>{};let m=t.current,h=p(i,m,{showMain:()=>{},showError:({title:f,description:v})=>o(new Error(`${f} - ${v}`)),showException:f=>o(f)},{autoplay:s,forceInitialArgs:d});return n(!1),()=>{Promise.resolve().then(()=>h())}},[s,p,i]),a?b.createElement("pre",null,b.createElement(jK,{error:a})):b.createElement(b.Fragment,null,l?b.createElement("style",null,`#${x5(e)} { min-height: ${l}; transform: translateZ(0); overflow: auto }`):null,r&&b.createElement(qz,null),b.createElement("div",{ref:t,id:`${x5(e)}-inner`,"data-name":i.name}))},h1e=({story:e,height:t="500px"})=>b.createElement("div",{style:{width:"100%",height:t}},b.createElement(Wz.Consumer,null,({scale:r})=>b.createElement(c1e,{key:"iframe",id:`iframe--${e.id}`,title:e.name,src:cZ(p1e,e.id,{viewMode:"story"}),allowFullScreen:!0,scale:r,style:{width:"100%",height:"100%",border:"0 none"}}))),m1e=F.strong(({theme:e})=>({color:e.color.orange})),g1e=e=>{let{inline:t,story:r}=e;return t&&!e.autoplay&&r.usesMount?b.createElement(m1e,null,"This story mounts inside of play. Set"," ",b.createElement("a",{href:"https://storybook.js.org/docs/api/doc-blocks/doc-block-story#autoplay"},"autoplay")," ","to true to view this story."):b.createElement("div",{id:x5(e),className:"sb-story sb-unstyled","data-story-block":"true"},t?b.createElement(f1e,{...e}):b.createElement(h1e,{...e}))},qz=()=>b.createElement(uZ,null),v1e=F(_4)({position:"absolute",left:0,right:0,top:0,transition:"transform .2s linear"}),y1e=F.div({display:"flex",alignItems:"center",gap:4}),w1e=F.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`})),b1e=({isLoading:e,storyId:t,baseUrl:r,zoom:n,resetZoom:a,...o})=>b.createElement(v1e,{...o},b.createElement(y1e,{key:"left"},e?[1,2,3].map(i=>b.createElement(w1e,{key:i})):b.createElement(b.Fragment,null,b.createElement(to,{key:"zoomin",onClick:i=>{i.preventDefault(),n(.8)},title:"Zoom in"},b.createElement(UZ,null)),b.createElement(to,{key:"zoomout",onClick:i=>{i.preventDefault(),n(1.25)},title:"Zoom out"},b.createElement(WZ,null)),b.createElement(to,{key:"zoomreset",onClick:i=>{i.preventDefault(),a()},title:"Reset zoom"},b.createElement(qZ,null))))),E1e=F.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)`}}:{}),CC=F(Uz)(({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)":zr(.05,e.background.content),color:e.color.lightest,button:{background:e.base==="light"?"rgba(0, 0, 0, 0.85)":zr(.05,e.background.content)}})),x1e=F.div(({theme:e,withSource:t,isExpanded:r})=>({position:"relative",overflow:"hidden",margin:"25px 0 40px",...Dp(e),borderBottomLeftRadius:t&&r&&0,borderBottomRightRadius:t&&r&&0,borderBottomWidth:r&&0,"h3 + &":{marginTop:"16px"}}),({withToolbar:e})=>e&&{paddingTop:40}),C1e=(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:b.createElement(CC,{...e,dark:!0}),actionItem:{title:"Hide code",className:"docblock-code-toggle docblock-code-toggle--expanded",onClick:()=>r(!1)}};default:return{source:b.createElement(CC,{...e,dark:!0}),actionItem:{title:"Show code",className:"docblock-code-toggle",onClick:()=>r(!0)}}}};function D1e(e){if(u.Children.count(e)===1){let t=e;if(t.props)return t.props.id}return null}var S1e=F(b1e)({position:"absolute",top:0,left:0,right:0,height:40}),k1e=F.div({overflow:"hidden",position:"relative"}),Gz=({isLoading:e,isColumn:t,columns:r,children:n,withSource:a,withToolbar:o=!1,isExpanded:i=!1,additionalActions:l,className:s,layout:d="padded",...p})=>{let[m,h]=u.useState(i),{source:f,actionItem:v}=C1e(a,m,h),[g,C]=u.useState(1),w=[s].concat(["sbdocs","sbdocs-preview","sb-unstyled"]),y=a?[v]:[],[E,x]=u.useState(l?[...l]:[]),D=[...y,...E],{window:S}=Vt,k=u.useCallback(async A=>{let{createCopyToClipboardFunction:$}=await F5(()=>import("./index-GCK484eF.js"),__vite__mapDeps([0,1,2,3]),import.meta.url);$()},[]),_=A=>{let $=S.getSelection();$&&$.type==="Range"||(A.preventDefault(),E.filter(I=>I.title==="Copied").length===0&&k(f.props.code).then(()=>{x([...E,{title:"Copied",onClick:()=>{}}]),S.setTimeout(()=>x(E.filter(I=>I.title!=="Copied")),1500)}))};return b.createElement(x1e,{withSource:a,withToolbar:o,...p,className:w.join(" ")},o&&b.createElement(S1e,{isLoading:e,border:!0,zoom:A=>C(g*A),resetZoom:()=>C(1),storyId:D1e(n),baseUrl:"./iframe.html"}),b.createElement(Wz.Provider,{value:{scale:g}},b.createElement(k1e,{className:"docs-story",onCopyCapture:a&&_},b.createElement(E1e,{isColumn:t||!Array.isArray(n),columns:r,layout:d},b.createElement(RK.Element,{scale:g},Array.isArray(n)?n.map((A,$)=>b.createElement("div",{key:$},A)):b.createElement("div",null,n))),b.createElement(Jv,{actionItems:D}))),a&&m&&f)};F(Gz)(()=>({".docs-story":{paddingTop:32,paddingBottom:40}}));var _1e=F.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:ge(.5,e.color.defaultText),background:"transparent","&:hover":{boxShadow:`${Uc(.3,e.appBorderColor)} 0 0 0 1px inset`},"&:active":{boxShadow:`${Uc(.05,e.appBorderColor)} 0 0 0 2px inset`,color:Uc(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"?`${Uc(.1,e.appBorderColor)} 0 0 2px`:`${e.appBorderColor} 0 0 0 1px`,color:e.color.defaultText,padding:"7px 15px"}})),A1e=e=>e==="true",F1e=({name:e,value:t,onChange:r,onBlur:n,onFocus:a,argType:o})=>{var p;let i=u.useCallback(()=>r(!1),[r]),l=!!((p=o==null?void 0:o.table)!=null&&p.readonly);if(t===void 0)return b.createElement(So,{variant:"outline",size:"medium",id:Xd(e),onClick:i,disabled:l},"Set boolean");let s=br(e),d=typeof t=="string"?A1e(t):t;return b.createElement(_1e,{"aria-disabled":l,htmlFor:s,"aria-label":e},b.createElement("input",{id:s,type:"checkbox",onChange:m=>r(m.target.checked),checked:d,role:"switch",disabled:l,name:e,onBlur:n,onFocus:a}),b.createElement("span",{"aria-hidden":"true"},"False"),b.createElement("span",{"aria-hidden":"true"},"True"))},$1e=e=>{let[t,r,n]=e.split("-"),a=new Date;return a.setFullYear(parseInt(t,10),parseInt(r,10)-1,parseInt(n,10)),a},T1e=e=>{let[t,r]=e.split(":"),n=new Date;return n.setHours(parseInt(t,10)),n.setMinutes(parseInt(r,10)),n},I1e=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}`},R1e=e=>{let t=new Date(e),r=`0${t.getHours()}`.slice(-2),n=`0${t.getMinutes()}`.slice(-2);return`${r}:${n}`},DC=F(qu.Input)(({readOnly:e})=>({opacity:e?.5:1})),z1e=F.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}})),B1e=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,argType:o})=>{var v;let[i,l]=u.useState(!0),s=u.useRef(),d=u.useRef(),p=!!((v=o==null?void 0:o.table)!=null&&v.readonly);u.useEffect(()=>{i!==!1&&(s&&s.current&&(s.current.value=t?I1e(t):""),d&&d.current&&(d.current.value=t?R1e(t):""))},[t]);let m=g=>{if(!g.target.value)return r();let C=$1e(g.target.value),w=new Date(t);w.setFullYear(C.getFullYear(),C.getMonth(),C.getDate());let y=w.getTime();y&&r(y),l(!!y)},h=g=>{if(!g.target.value)return r();let C=T1e(g.target.value),w=new Date(t);w.setHours(C.getHours()),w.setMinutes(C.getMinutes());let y=w.getTime();y&&r(y),l(!!y)},f=br(e);return b.createElement(z1e,null,b.createElement(DC,{type:"date",max:"9999-12-31",ref:s,id:`${f}-date`,name:`${f}-date`,readOnly:p,onChange:m,onFocus:n,onBlur:a}),b.createElement(DC,{type:"time",id:`${f}-time`,name:`${f}-time`,ref:d,onChange:h,readOnly:p,onFocus:n,onBlur:a}),i?null:b.createElement("div",null,"invalid"))},L1e=F.label({display:"flex"}),O1e=e=>{let t=parseFloat(e);return Number.isNaN(t)?void 0:t},M1e=F(qu.Input)(({readOnly:e})=>({opacity:e?.5:1})),P1e=({name:e,value:t,onChange:r,min:n,max:a,step:o,onBlur:i,onFocus:l,argType:s})=>{var E;let[d,p]=u.useState(typeof t=="number"?t:""),[m,h]=u.useState(!1),[f,v]=u.useState(null),g=!!((E=s==null?void 0:s.table)!=null&&E.readonly),C=u.useCallback(x=>{p(x.target.value);let D=parseFloat(x.target.value);Number.isNaN(D)?v(new Error(`'${x.target.value}' is not a number`)):(r(D),v(null))},[r,v]),w=u.useCallback(()=>{p("0"),r(0),h(!0)},[h]),y=u.useRef(null);return u.useEffect(()=>{m&&y.current&&y.current.select()},[m]),u.useEffect(()=>{d!==(typeof t=="number"?t:"")&&p(t)},[t]),t===void 0?b.createElement(So,{variant:"outline",size:"medium",id:Xd(e),onClick:w,disabled:g},"Set number"):b.createElement(L1e,null,b.createElement(M1e,{ref:y,id:br(e),type:"number",onChange:C,size:"flex",placeholder:"Edit number...",value:d,valid:f?"error":null,autoFocus:m,readOnly:g,name:e,min:n,max:a,step:o,onFocus:l,onBlur:i}))},Kz=(e,t)=>{let r=t&&Object.entries(t).find(([n,a])=>a===e);return r?r[0]:void 0},C5=(e,t)=>e&&t?Object.entries(t).filter(r=>e.includes(r[1])).map(r=>r[0]):[],Yz=(e,t)=>e&&t&&e.map(r=>t[r]),N1e=F.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"}}}),j1e=F.span({"[aria-readonly=true] &":{opacity:.5}}),H1e=F.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),SC=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var h;if(!t)return Q4.warn(`Checkbox with no options: ${e}`),b.createElement(b.Fragment,null,"-");let i=C5(r,t),[l,s]=u.useState(i),d=!!((h=o==null?void 0:o.table)!=null&&h.readonly),p=f=>{let v=f.target.value,g=[...l];g.includes(v)?g.splice(g.indexOf(v),1):g.push(v),n(Yz(g,t)),s(g)};u.useEffect(()=>{s(C5(r,t))},[r]);let m=br(e);return b.createElement(N1e,{"aria-readonly":d,isInline:a},Object.keys(t).map((f,v)=>{let g=`${m}-${v}`;return b.createElement(H1e,{key:g,htmlFor:g},b.createElement("input",{type:"checkbox",disabled:d,id:g,name:g,value:f,onChange:p,checked:l==null?void 0:l.includes(f)}),b.createElement(j1e,null,f))}))},V1e=F.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"}}}),U1e=F.span({"[aria-readonly=true] &":{opacity:.5}}),W1e=F.label({lineHeight:"20px",alignItems:"center",marginBottom:8,"&:last-child":{marginBottom:0},input:{margin:0,marginRight:6}}),kC=({name:e,options:t,value:r,onChange:n,isInline:a,argType:o})=>{var d;if(!t)return Q4.warn(`Radio with no options: ${e}`),b.createElement(b.Fragment,null,"-");let i=Kz(r,t),l=br(e),s=!!((d=o==null?void 0:o.table)!=null&&d.readonly);return b.createElement(V1e,{"aria-readonly":s,isInline:a},Object.keys(t).map((p,m)=>{let h=`${l}-${m}`;return b.createElement(W1e,{key:h,htmlFor:h},b.createElement("input",{type:"radio",id:h,name:l,disabled:s,value:p,onChange:f=>n(t[f.currentTarget.value]),checked:p===i}),b.createElement(U1e,null,p))}))},q1e={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},Zz=F.select(q1e,({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}}})),Xz=F.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}}})),_C="Choose option...",G1e=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=p=>{n(r[p.currentTarget.value])},i=Kz(t,r)||_C,l=br(e),s=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return b.createElement(Xz,null,b.createElement($R,null),b.createElement(Zz,{disabled:s,id:l,value:i,onChange:o},b.createElement("option",{key:"no-selection",disabled:!0},_C),Object.keys(r).map(p=>b.createElement("option",{key:p,value:p},p))))},K1e=({name:e,value:t,options:r,onChange:n,argType:a})=>{var d;let o=p=>{let m=Array.from(p.currentTarget.options).filter(h=>h.selected).map(h=>h.value);n(Yz(m,r))},i=C5(t,r),l=br(e),s=!!((d=a==null?void 0:a.table)!=null&&d.readonly);return b.createElement(Xz,null,b.createElement(Zz,{disabled:s,id:l,multiple:!0,value:i,onChange:o},Object.keys(r).map(p=>b.createElement("option",{key:p,value:p},p))))},AC=e=>{let{name:t,options:r}=e;return r?e.isMulti?b.createElement(K1e,{...e}):b.createElement(G1e,{...e}):(Q4.warn(`Select with no options: ${t}`),b.createElement(b.Fragment,null,"-"))},Y1e=(e,t)=>Array.isArray(e)?e.reduce((r,n)=>(r[(t==null?void 0:t[n])||String(n)]=n,r),{}):e,Z1e={check:SC,"inline-check":SC,radio:kC,"inline-radio":kC,select:AC,"multi-select":AC},Ho=e=>{let{type:t="select",labels:r,argType:n}=e,a={...e,argType:n,options:n?Y1e(n.options,r):{},isInline:t.includes("inline"),isMulti:t.includes("multi")},o=Z1e[t];if(o)return b.createElement(o,{...a});throw new Error(`Unknown options type: ${t}`)},X1e="Error",J1e="Object",Q1e="Array",epe="String",tpe="Number",rpe="Boolean",npe="Date",ape="Null",ope="Undefined",ipe="Function",lpe="Symbol",Jz="ADD_DELTA_TYPE",Qz="REMOVE_DELTA_TYPE",eB="UPDATE_DELTA_TYPE",t3="value",spe="key";function Ya(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 tB(e,t){let r=Ya(e),n=Ya(t);return(r==="Function"||n==="Function")&&n!==r}var r3=class extends u.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,l={};if(!t){if(!o.value)return;l.key=o.value}l.newValue=r(!1,n,a,l.key,i.value),e(l)}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,l=u.cloneElement(r,{onClick:this.onSubmit}),s=u.cloneElement(n,{onClick:e}),d=a(t3,o,i),p=u.cloneElement(d,{placeholder:"Value",ref:this.refInputValue}),m=null;if(!t){let h=a(spe,o,i);m=u.cloneElement(h,{placeholder:"Key",ref:this.refInputKey})}return b.createElement("span",{className:"rejt-add-value-node"},m,p,s,l)}};r3.defaultProps={onlyValue:!1,addButtonElement:b.createElement("button",null,"+"),cancelButtonElement:b.createElement("button",null,"c")};var rB=class extends u.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 l={keyPath:a,deep:o,key:e,oldValue:i,type:Qz};n.splice(e,1),this.setState({data:n});let{onUpdate:s,onDeltaUpdate:d}=this.props;s(a[a.length-1],n),d(l)}).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:l,onDeltaUpdate:s}=this.props;l(r[r.length-1],i),s({type:Jz,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:l}=this.state,s=o[e];a(e,i,l,s,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:p}=this.props;d(i[i.length-1],o),p({type:eB,keyPath:i,deep:l,key:e,newValue:t,oldValue:s}),r(void 0)}).catch(n)})}renderCollapsed(){let{name:e,data:t,keyPath:r,deep:n}=this.state,{handleRemove:a,readOnly:o,getStyle:i,dataType:l,minusMenuElement:s}=this.props,{minus:d,collapsed:p}=i(e,t,r,n,l),m=o(e,t,r,n,l),h=u.cloneElement(s,{onClick:a,className:"rejt-minus-menu",style:d});return b.createElement("span",{className:"rejt-collapsed"},b.createElement("span",{className:"rejt-collapsed-text",style:p,onClick:this.handleCollapseMode},"[...] ",t.length," ",t.length===1?"item":"items"),!m&&h)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,addFormVisible:a,nextDeep:o}=this.state,{isCollapsed:i,handleRemove:l,onDeltaUpdate:s,readOnly:d,getStyle:p,dataType:m,addButtonElement:h,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:C,minusMenuElement:w,plusMenuElement:y,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:D,logger:S,onSubmitValueParser:k}=this.props,{minus:_,plus:A,delimiter:$,ul:I,addForm:O}=p(e,t,r,n,m),z=d(e,t,r,n,m),j=u.cloneElement(y,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:A}),M=u.cloneElement(w,{onClick:l,className:"rejt-minus-menu",style:_});return b.createElement("span",{className:"rejt-not-collapsed"},b.createElement("span",{className:"rejt-not-collapsed-delimiter",style:$},"["),!a&&j,b.createElement("ul",{className:"rejt-not-collapsed-list",style:I},t.map((H,W)=>b.createElement(Sp,{key:W,name:W.toString(),data:H,keyPath:r,deep:o,isCollapsed:i,handleRemove:this.handleRemoveItem(W),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:s,readOnly:d,getStyle:p,addButtonElement:h,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:C,minusMenuElement:w,plusMenuElement:y,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:D,logger:S,onSubmitValueParser:k}))),!z&&a&&b.createElement("div",{className:"rejt-add-form",style:O},b.createElement(r3,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,onlyValue:!0,addButtonElement:h,cancelButtonElement:f,inputElementGenerator:g,keyPath:r,deep:n,onSubmitValueParser:k})),b.createElement("span",{className:"rejt-not-collapsed-delimiter",style:$},"]"),!z&&M)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{dataType:o,getStyle:i}=this.props,l=t?this.renderCollapsed():this.renderNotCollapsed(),s=i(e,r,n,a,o);return b.createElement("div",{className:"rejt-array-node"},b.createElement("span",{onClick:this.handleCollapseMode},b.createElement("span",{className:"rejt-name",style:s.name},e," :"," ")),l)}};rB.defaultProps={keyPath:[],deep:0,minusMenuElement:b.createElement("span",null," - "),plusMenuElement:b.createElement("span",null," + ")};var nB=class extends u.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:l}=this.props,s=i(r,n,a,o,l);e&&!s&&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:l}=this.state;if(!o)return;let s=n(!0,a,l,i,o.value);e({value:s,key:i}).then(()=>{tB(t,s)||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:l,dataType:s,getStyle:d,editButtonElement:p,cancelButtonElement:m,textareaElementGenerator:h,minusMenuElement:f,keyPath:v}=this.props,g=d(e,i,n,a,s),C=null,w=null,y=l(e,i,n,a,s);if(r&&!y){let E=h(t3,v,a,e,i,s),x=u.cloneElement(p,{onClick:this.handleEdit}),D=u.cloneElement(m,{onClick:this.handleCancelEdit}),S=u.cloneElement(E,{ref:this.refInput,defaultValue:i});C=b.createElement("span",{className:"rejt-edit-form",style:g.editForm},S," ",D,x),w=null}else{C=b.createElement("span",{className:"rejt-value",style:g.value,onClick:y?null:this.handleEditMode},t);let E=u.cloneElement(f,{onClick:o,className:"rejt-minus-menu",style:g.minus});w=y?null:E}return b.createElement("li",{className:"rejt-function-value-node",style:g.li},b.createElement("span",{className:"rejt-name",style:g.name},e," :"," "),C,w)}};nB.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>{},editButtonElement:b.createElement("button",null,"e"),cancelButtonElement:b.createElement("button",null,"c"),minusMenuElement:b.createElement("span",null," - ")};var Sp=class extends u.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:l,onDeltaUpdate:s,readOnly:d,getStyle:p,addButtonElement:m,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:C,plusMenuElement:w,beforeRemoveAction:y,beforeAddAction:E,beforeUpdateAction:x,logger:D,onSubmitValueParser:S}=this.props,k=()=>!0,_=Ya(e);switch(_){case X1e:return b.createElement(D5,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:l,onDeltaUpdate:s,readOnly:k,dataType:_,getStyle:p,addButtonElement:m,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:C,plusMenuElement:w,beforeRemoveAction:y,beforeAddAction:E,beforeUpdateAction:x,logger:D,onSubmitValueParser:S});case J1e:return b.createElement(D5,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:l,onDeltaUpdate:s,readOnly:d,dataType:_,getStyle:p,addButtonElement:m,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:C,plusMenuElement:w,beforeRemoveAction:y,beforeAddAction:E,beforeUpdateAction:x,logger:D,onSubmitValueParser:S});case Q1e:return b.createElement(rB,{data:e,name:t,isCollapsed:a,keyPath:r,deep:n,handleRemove:o,onUpdate:l,onDeltaUpdate:s,readOnly:d,dataType:_,getStyle:p,addButtonElement:m,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,textareaElementGenerator:g,minusMenuElement:C,plusMenuElement:w,beforeRemoveAction:y,beforeAddAction:E,beforeUpdateAction:x,logger:D,onSubmitValueParser:S});case epe:return b.createElement(On,{name:t,value:`"${e}"`,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case tpe:return b.createElement(On,{name:t,value:e,originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case rpe:return b.createElement(On,{name:t,value:e?"true":"false",originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case npe:return b.createElement(On,{name:t,value:e.toISOString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:k,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case ape:return b.createElement(On,{name:t,value:"null",originalValue:"null",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case ope:return b.createElement(On,{name:t,value:"undefined",originalValue:"undefined",keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});case ipe:return b.createElement(nB,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:d,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,textareaElementGenerator:g,minusMenuElement:C,logger:D,onSubmitValueParser:S});case lpe:return b.createElement(On,{name:t,value:e.toString(),originalValue:e,keyPath:r,deep:n,handleRemove:o,handleUpdateValue:i,readOnly:k,dataType:_,getStyle:p,cancelButtonElement:h,editButtonElement:f,inputElementGenerator:v,minusMenuElement:C,logger:D,onSubmitValueParser:S});default:return null}}};Sp.defaultProps={keyPath:[],deep:0};var D5=class extends u.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:l,onDeltaUpdate:s}=this.props;l(n[n.length-1],r),s({type:Jz,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 l={keyPath:a,deep:o,key:e,oldValue:i,type:Qz};delete n[e],this.setState({data:n});let{onUpdate:s,onDeltaUpdate:d}=this.props;s(a[a.length-1],n),d(l)}).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:l}=this.state,s=o[e];a(e,i,l,s,t).then(()=>{o[e]=t,this.setState({data:o});let{onUpdate:d,onDeltaUpdate:p}=this.props;d(i[i.length-1],o),p({type:eB,keyPath:i,deep:l,key:e,newValue:t,oldValue:s}),r()}).catch(n)})}renderCollapsed(){let{name:e,keyPath:t,deep:r,data:n}=this.state,{handleRemove:a,readOnly:o,dataType:i,getStyle:l,minusMenuElement:s}=this.props,{minus:d,collapsed:p}=l(e,n,t,r,i),m=Object.getOwnPropertyNames(n),h=o(e,n,t,r,i),f=u.cloneElement(s,{onClick:a,className:"rejt-minus-menu",style:d});return b.createElement("span",{className:"rejt-collapsed"},b.createElement("span",{className:"rejt-collapsed-text",style:p,onClick:this.handleCollapseMode},"{...}"," ",m.length," ",m.length===1?"key":"keys"),!h&&f)}renderNotCollapsed(){let{name:e,data:t,keyPath:r,deep:n,nextDeep:a,addFormVisible:o}=this.state,{isCollapsed:i,handleRemove:l,onDeltaUpdate:s,readOnly:d,getStyle:p,dataType:m,addButtonElement:h,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:C,minusMenuElement:w,plusMenuElement:y,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:D,logger:S,onSubmitValueParser:k}=this.props,{minus:_,plus:A,addForm:$,ul:I,delimiter:O}=p(e,t,r,n,m),z=Object.getOwnPropertyNames(t),j=d(e,t,r,n,m),M=u.cloneElement(y,{onClick:this.handleAddMode,className:"rejt-plus-menu",style:A}),H=u.cloneElement(w,{onClick:l,className:"rejt-minus-menu",style:_}),W=z.map(B=>b.createElement(Sp,{key:B,name:B,data:t[B],keyPath:r,deep:a,isCollapsed:i,handleRemove:this.handleRemoveValue(B),handleUpdateValue:this.handleEditValue,onUpdate:this.onChildUpdate,onDeltaUpdate:s,readOnly:d,getStyle:p,addButtonElement:h,cancelButtonElement:f,editButtonElement:v,inputElementGenerator:g,textareaElementGenerator:C,minusMenuElement:w,plusMenuElement:y,beforeRemoveAction:E,beforeAddAction:x,beforeUpdateAction:D,logger:S,onSubmitValueParser:k}));return b.createElement("span",{className:"rejt-not-collapsed"},b.createElement("span",{className:"rejt-not-collapsed-delimiter",style:O},"{"),!j&&M,b.createElement("ul",{className:"rejt-not-collapsed-list",style:I},W),!j&&o&&b.createElement("div",{className:"rejt-add-form",style:$},b.createElement(r3,{handleAdd:this.handleAddValueAdd,handleCancel:this.handleAddValueCancel,addButtonElement:h,cancelButtonElement:f,inputElementGenerator:g,keyPath:r,deep:n,onSubmitValueParser:k})),b.createElement("span",{className:"rejt-not-collapsed-delimiter",style:O},"}"),!j&&H)}render(){let{name:e,collapsed:t,data:r,keyPath:n,deep:a}=this.state,{getStyle:o,dataType:i}=this.props,l=t?this.renderCollapsed():this.renderNotCollapsed(),s=o(e,r,n,a,i);return b.createElement("div",{className:"rejt-object-node"},b.createElement("span",{onClick:this.handleCollapseMode},b.createElement("span",{className:"rejt-name",style:s.name},e," :"," ")),l)}};D5.defaultProps={keyPath:[],deep:0,minusMenuElement:b.createElement("span",null," - "),plusMenuElement:b.createElement("span",null," + ")};var On=class extends u.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:l}=this.props,s=i(r,n,a,o,l);e&&!s&&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:l}=this.state;if(!o)return;let s=n(!0,a,l,i,o.value);e({value:s,key:i}).then(()=>{tB(t,s)||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:l,dataType:s,getStyle:d,editButtonElement:p,cancelButtonElement:m,inputElementGenerator:h,minusMenuElement:f,keyPath:v}=this.props,g=d(e,i,n,a,s),C=l(e,i,n,a,s),w=r&&!C,y=h(t3,v,a,e,i,s),E=u.cloneElement(p,{onClick:this.handleEdit}),x=u.cloneElement(m,{onClick:this.handleCancelEdit}),D=u.cloneElement(y,{ref:this.refInput,defaultValue:JSON.stringify(i)}),S=u.cloneElement(f,{onClick:o,className:"rejt-minus-menu",style:g.minus});return b.createElement("li",{className:"rejt-value-node",style:g.li},b.createElement("span",{className:"rejt-name",style:g.name},e," : "),w?b.createElement("span",{className:"rejt-edit-form",style:g.editForm},D," ",x,E):b.createElement("span",{className:"rejt-value",style:g.value,onClick:C?null:this.handleEditMode},String(t)),!C&&!w&&S)}};On.defaultProps={keyPath:[],deep:0,handleUpdateValue:()=>Promise.resolve(),editButtonElement:b.createElement("button",null,"e"),cancelButtonElement:b.createElement("button",null,"c"),minusMenuElement:b.createElement("span",null," - ")};function upe(e){let t=e;if(t.indexOf("function")===0)return(0,eval)(`(${t})`);try{t=JSON.parse(e)}catch{}return t}var cpe={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},dpe={minus:{color:"red"},plus:{color:"green"},collapsed:{color:"grey"},delimiter:{},ul:{padding:"0px",margin:"0 0 0 25px",listStyle:"none"},name:{color:"#2287CD"},addForm:{}},ppe={minus:{color:"red"},editForm:{},value:{color:"#7bba3d"},li:{minHeight:"22px",lineHeight:"22px",outline:"0px"},name:{color:"#2287CD"}},aB=class extends u.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:l,editButtonElement:s,inputElement:d,textareaElement:p,minusMenuElement:m,plusMenuElement:h,beforeRemoveAction:f,beforeAddAction:v,beforeUpdateAction:g,logger:C,onSubmitValueParser:w,fallback:y=null}=this.props,E=Ya(e),x=a;Ya(a)==="Boolean"&&(x=()=>a);let D=d;d&&Ya(d)!=="Function"&&(D=()=>d);let S=p;return p&&Ya(p)!=="Function"&&(S=()=>p),E==="Object"||E==="Array"?b.createElement("div",{className:"rejt-tree"},b.createElement(Sp,{data:e,name:t,deep:-1,isCollapsed:r,onUpdate:this.onUpdate,onDeltaUpdate:n,readOnly:x,getStyle:o,addButtonElement:i,cancelButtonElement:l,editButtonElement:s,inputElementGenerator:D,textareaElementGenerator:S,minusMenuElement:m,plusMenuElement:h,handleRemove:this.removeRoot,beforeRemoveAction:f,beforeAddAction:v,beforeUpdateAction:g,logger:C,onSubmitValueParser:w})):y}};aB.defaultProps={rootName:"root",isCollapsed:(e,t)=>t!==-1,getStyle:(e,t,r,n,a)=>{switch(a){case"Object":case"Error":return cpe;case"Array":return dpe;default:return ppe}},readOnly:()=>!1,onFullyUpdate:()=>{},onDeltaUpdate:()=>{},beforeRemoveAction:()=>Promise.resolve(),beforeAddAction:()=>Promise.resolve(),beforeUpdateAction:()=>Promise.resolve(),logger:{error:()=>{}},onSubmitValueParser:(e,t,r,n,a)=>upe(a),inputElement:()=>b.createElement("input",null),textareaElement:()=>b.createElement("textarea",null),fallback:null};var{window:fpe}=Vt,hpe=F.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}})),Rm=F.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})),mpe=F(ZZ)(({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}})),gpe=F(XZ)(({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}})),FC=F.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}`}})),vpe=F(to)(({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}})),ype=F(qu.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"}})),wpe={bubbles:!0,cancelable:!0,key:"Enter",code:"Enter",keyCode:13},bpe=e=>{e.currentTarget.dispatchEvent(new fpe.KeyboardEvent("keydown",wpe))},Epe=e=>{e.currentTarget.select()},xpe=e=>()=>({name:{color:e.color.secondary},collapsed:{color:e.color.dark},ul:{listStyle:"none",margin:"0 0 0 1rem",padding:0},li:{outline:0}}),$C=({name:e,value:t,onChange:r,argType:n})=>{var E;let a=w9(),o=u.useMemo(()=>t&&jue(t),[t]),i=o!=null,[l,s]=u.useState(!i),[d,p]=u.useState(null),m=!!((E=n==null?void 0:n.table)!=null&&E.readonly),h=u.useCallback(x=>{try{x&&r(JSON.parse(x)),p(void 0)}catch(D){p(D)}},[r]),[f,v]=u.useState(!1),g=u.useCallback(()=>{r({}),v(!0)},[v]),C=u.useRef(null);if(u.useEffect(()=>{f&&C.current&&C.current.select()},[f]),!i)return b.createElement(So,{disabled:m,id:Xd(e),onClick:g},"Set object");let w=b.createElement(ype,{ref:C,id:br(e),name:e,defaultValue:t===null?"":JSON.stringify(t,null,2),onBlur:x=>h(x.target.value),placeholder:"Edit JSON string...",autoFocus:f,valid:d?"error":null,readOnly:m}),y=Array.isArray(t)||typeof t=="object"&&(t==null?void 0:t.constructor)===Object;return b.createElement(hpe,{"aria-readonly":m},y&&b.createElement(vpe,{onClick:x=>{x.preventDefault(),s(D=>!D)}},l?b.createElement(KZ,null):b.createElement(GZ,null),b.createElement("span",null,"RAW")),l?w:b.createElement(aB,{readOnly:m||!y,isCollapsed:y?void 0:()=>!0,data:o,rootName:e,onFullyUpdate:r,getStyle:xpe(a),cancelButtonElement:b.createElement(Rm,{type:"button"},"Cancel"),editButtonElement:b.createElement(Rm,{type:"submit"},"Save"),addButtonElement:b.createElement(Rm,{type:"submit",primary:!0},"Save"),plusMenuElement:b.createElement(mpe,null),minusMenuElement:b.createElement(gpe,null),inputElement:(x,D,S,k)=>k?b.createElement(FC,{onFocus:Epe,onBlur:bpe}):b.createElement(FC,null),fallback:w}))},Cpe=F.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}%, ${zr(.02,e.input.background)} ${(n-t)/(r-t)*100}%, ${zr(.02,e.input.background)} 100%)`:`linear-gradient(to right, @@ -615,7 +615,7 @@ ${t}`);let r=t.match(OK);if(!r)return b.createElement(u.Fragment,null,t);let[,n, ${zr(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${Ma(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${Ma(.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 ${mn(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),oB=F.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Dpe=F(oB)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),Spe=F.div({display:"flex",alignItems:"center",width:"100%"});function kpe(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 _pe=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:l,argType:s})=>{var f;let d=v=>{r(O1e(v.target.value))},p=t!==void 0,m=u.useMemo(()=>kpe(o),[o]),h=!!((f=s==null?void 0:s.table)!=null&&f.readonly);return b.createElement(Spe,{"aria-readonly":h},b.createElement(oB,null,n),b.createElement(Cpe,{id:br(e),type:"range",disabled:h,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:l,onBlur:i}),b.createElement(Dpe,{numberOFDecimalsPlaces:m,max:a},p?t.toFixed(m):"--"," / ",a))},Ape=F.label({display:"flex"}),Fpe=F.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),$pe=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var f;let l=v=>{r(v.target.value)},s=!!((f=i==null?void 0:i.table)!=null&&f.readonly),[d,p]=u.useState(!1),m=u.useCallback(()=>{r(""),p(!0)},[p]);if(t===void 0)return b.createElement(So,{variant:"outline",size:"medium",disabled:s,id:Xd(e),onClick:m},"Set string");let h=typeof t=="string";return b.createElement(Ape,null,b.createElement(qu.Textarea,{id:br(e),maxLength:o,onChange:l,disabled:s,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:h?null:"error",name:e,value:h?t:"",onFocus:n,onBlur:a}),o&&b.createElement(Fpe,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},Tpe=F(qu.Input)({padding:10});function Ipe(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var Rpe=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var s;let o=u.useRef(null),i=(s=a==null?void 0:a.control)==null?void 0:s.readOnly;function l(d){if(!d.target.files)return;let p=Array.from(d.target.files).map(m=>URL.createObjectURL(m));e(p),Ipe(n)}return u.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),b.createElement(Tpe,{ref:o,id:br(t),type:"file",name:t,multiple:!0,disabled:i,onChange:l,accept:r,size:"flex"})},zpe=u.lazy(()=>F5(()=>import("./Color-ERTF36HU-BECF7hgJ.js"),__vite__mapDeps([4,2,1,3]),import.meta.url)),Bpe=e=>b.createElement(u.Suspense,{fallback:b.createElement("div",null)},b.createElement(zpe,{...e})),Lpe={array:$C,object:$C,boolean:F1e,color:Bpe,date:B1e,number:P1e,check:Ho,"inline-check":Ho,radio:Ho,"inline-radio":Ho,select:Ho,"multi-select":Ho,range:_pe,text:$pe,file:Rpe},TC=()=>b.createElement(b.Fragment,null,"-"),Ope=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var g;let{key:a,control:o}=e,[i,l]=u.useState(!1),[s,d]=u.useState({value:t});u.useEffect(()=>{i||d({value:t})},[i,t]);let p=u.useCallback(C=>(d({value:C}),r({[a]:C}),C),[r,a]),m=u.useCallback(()=>l(!1),[]),h=u.useCallback(()=>l(!0),[]);if(!o||o.disable){let C=(o==null?void 0:o.disable)!==!0&&((g=e==null?void 0:e.type)==null?void 0:g.name)!=="function";return n&&C?b.createElement(_i,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):b.createElement(TC,null)}let f={name:a,argType:e,value:s.value,onChange:p,onBlur:m,onFocus:h},v=Lpe[o.type]||TC;return b.createElement(v,{...f,...o,controlType:o.type})},Mpe=F.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:xa({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),Ppe=({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:b.createElement(b.Fragment,null,b.createElement(Mpe,null,b.createElement("tbody",null,n&&b.createElement("tr",{key:"deprecated"},b.createElement("td",{colSpan:2},b.createElement("strong",null,"Deprecated"),": ",e.deprecated.toString())),r&&t.map(o=>b.createElement("tr",{key:o.name},b.createElement("td",null,b.createElement("code",null,o.name)),b.createElement("td",null,o.description))),a&&b.createElement("tr",{key:"returns"},b.createElement("td",null,b.createElement("code",null,"Returns")),b.createElement("td",null,e.returns.description)))))},S5=8,IC=F.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),Npe=F.span(xa,({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}})),jpe=F.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),Hpe=F.div(xa,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),Vpe=F.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"}})),Upe=F(tX)({marginLeft:4}),Wpe=F($R)({marginLeft:4}),qpe=()=>b.createElement("span",null,"-"),iB=({text:e,simple:t})=>b.createElement(Npe,{simple:t},e),Gpe=Iz(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),Kpe=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return Cce(t)},RC=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,S5)),r.map(n=>b.createElement(iB,{key:n,text:n===""?'""':n}))},Ype=({value:e,initialExpandedArgs:t})=>{let{summary:r,detail:n}=e,[a,o]=u.useState(!1),[i,l]=u.useState(t||!1);if(r==null)return null;let s=typeof r.toString=="function"?r.toString():r;if(n==null){if(/[(){}[\]<>]/.test(s))return b.createElement(iB,{text:s});let d=Kpe(s),p=d.length;return p>S5?b.createElement(IC,{isExpanded:i},RC(d,i),b.createElement(jpe,{onClick:()=>l(!i)},i?"Show less...":`Show ${p-S5} more...`)):b.createElement(IC,null,RC(d))}return b.createElement(fY,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:b.createElement(Vpe,{width:Gpe(n)},b.createElement(v4,{language:"jsx",format:!1},n))},b.createElement(Hpe,{className:"sbdocs-expandable"},b.createElement("span",null,s),a?b.createElement(Upe,null):b.createElement(Wpe,null)))},zm=({value:e,initialExpandedArgs:t})=>e==null?b.createElement(qpe,null):b.createElement(Ype,{value:e,initialExpandedArgs:t}),Zpe=F.span({fontWeight:"bold"}),Xpe=F.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),Jpe=F.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...xa({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),Qpe=F.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ge(.1,e.color.defaultText):ge(.2,e.color.defaultText),marginTop:t?4:0})),efe=F.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ge(.1,e.color.defaultText):ge(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),tfe=F.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),rfe=e=>e&&{summary:typeof e=="string"?e:e.name},Kc=e=>{var g;let[t,r]=u.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:l}=e,{name:s,description:d}=n,p=n.table||{},m=p.type||rfe(n.type),h=p.defaultValue||n.defaultValue,f=(g=n.type)==null?void 0:g.required,v=d!=null&&d!=="";return b.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},b.createElement(tfe,{expandable:i},b.createElement(Zpe,null,s),f?b.createElement(Xpe,{title:"Required"},"*"):null),o?null:b.createElement("td",null,v&&b.createElement(Jpe,null,b.createElement(_z,null,d)),p.jsDocTags!=null?b.createElement(b.Fragment,null,b.createElement(efe,{hasDescription:v},b.createElement(zm,{value:m,initialExpandedArgs:l})),b.createElement(Ppe,{tags:p.jsDocTags})):b.createElement(Qpe,{hasDescription:v},b.createElement(zm,{value:m,initialExpandedArgs:l}))),o?null:b.createElement("td",null,b.createElement(zm,{value:h,initialExpandedArgs:l})),a?b.createElement("td",null,b.createElement(Ope,{...e,isHovered:t})):null)},nfe=F.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"})),afe=F.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),ofe=F.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),ife=({inAddonPanel:e})=>{let[t,r]=u.useState(!0);return u.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:b.createElement(nfe,{inAddonPanel:e},b.createElement(bR,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:b.createElement(b.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:b.createElement(afe,null,e&&b.createElement(b.Fragment,null,b.createElement(_i,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},b.createElement(YZ,null)," Watch 5m video"),b.createElement(ofe,null),b.createElement(_i,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},b.createElement(h5,null)," Read docs")),!e&&b.createElement(_i,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},b.createElement(h5,null)," Learn how to set that up"))}))},lfe=F(QZ)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ge(.25,e.color.defaultText):ge(.3,e.color.defaultText),border:"none",display:"inline-block"})),sfe=F(eX)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ge(.25,e.color.defaultText):ge(.3,e.color.defaultText),border:"none",display:"inline-block"})),ufe=F.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),cfe=F.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"?ge(.4,e.color.defaultText):ge(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),dfe=F.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),pfe=F.td(()=>({position:"relative"})),ffe=F.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Ma(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),zC=F.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"})),Bm=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=u.useState(n),l=e==="subsection"?dfe:cfe,s=(r==null?void 0:r.length)||0,d=e==="subsection"?`${s} item${s!==1?"s":""}`:"",p=`${o?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return b.createElement(b.Fragment,null,b.createElement(ffe,{title:p},b.createElement(l,{colSpan:1},b.createElement(zC,{onClick:m=>i(!o),tabIndex:0},p),b.createElement(ufe,null,o?b.createElement(lfe,null):b.createElement(sfe,null),t)),b.createElement(pfe,{colSpan:a-1},b.createElement(zC,{onClick:m=>i(!o),tabIndex:-1,style:{outline:"none"}},p),o?null:d)),o?r:null)},Yc=F.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Qe=F.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),Ie=F.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})),et=[2,4,2,2],hfe=()=>b.createElement(b.Fragment,null,b.createElement(Yc,null,b.createElement(Qe,{numColumn:et[0]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[1]},b.createElement(Ie,{width:"30%"})),b.createElement(Qe,{numColumn:et[2]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[3]},b.createElement(Ie,{width:"60%"}))),b.createElement(Yc,null,b.createElement(Qe,{numColumn:et[0]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[1]},b.createElement(Ie,{width:"80%"}),b.createElement(Ie,{width:"30%"})),b.createElement(Qe,{numColumn:et[2]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[3]},b.createElement(Ie,{width:"60%"}))),b.createElement(Yc,null,b.createElement(Qe,{numColumn:et[0]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[1]},b.createElement(Ie,{width:"80%"}),b.createElement(Ie,{width:"30%"})),b.createElement(Qe,{numColumn:et[2]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[3]},b.createElement(Ie,{width:"60%"}))),b.createElement(Yc,null,b.createElement(Qe,{numColumn:et[0]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[1]},b.createElement(Ie,{width:"80%"}),b.createElement(Ie,{width:"30%"})),b.createElement(Qe,{numColumn:et[2]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[3]},b.createElement(Ie,{width:"60%"})))),mfe=F.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"?ge(.25,e.color.defaultText):ge(.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}}}}})),gfe=F(to)(({theme:e})=>({margin:"-4px -12px -4px 0"})),vfe=F.span({display:"flex",justifyContent:"space-between"}),yfe={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},wfe=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:l,subcategory:s}=(i==null?void 0:i.table)||{};if(l){let d=r.sections[l]||{ungrouped:[],subsections:{}};if(!s)d.ungrouped.push({key:o,...i});else{let p=d.subsections[s]||[];p.push({key:o,...i}),d.subsections[s]=p}r.sections[l]=d}else if(s){let d=r.ungroupedSubsections[s]||[];d.push({key:o,...i}),r.ungroupedSubsections[s]=d}else r.ungrouped.push({key:o,...i})});let n=yfe[t],a=o=>n?Object.keys(o).reduce((i,l)=>({...i,[l]:o[l].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)}}),{})}},bfe=(e,t,r)=>{try{return nN(e,t,r)}catch(n){return Ude.warn(n.message),!1}},k5=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:i="none",isLoading:l}=e;if("error"in e){let{error:y}=e;return b.createElement(Vz,null,y," ",b.createElement(_i,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},b.createElement(h5,null)," Read the docs"))}if(l)return b.createElement(hfe,null);let{rows:s,args:d,globals:p}="rows"in e&&e,m=wfe(eie(s,y=>{var E;return!((E=y==null?void 0:y.table)!=null&&E.disable)&&bfe(y,d||{},p||{})}),i),h=m.ungrouped.length===0,f=Object.entries(m.sections).length===0,v=Object.entries(m.ungroupedSubsections).length===0;if(h&&f&&v)return b.createElement(ife,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let C=Object.keys(m.sections).length>0,w={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return b.createElement(NT,null,b.createElement(mfe,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},b.createElement("thead",{className:"docblock-argstable-head"},b.createElement("tr",null,b.createElement("th",null,b.createElement("span",null,"Name")),n?null:b.createElement("th",null,b.createElement("span",null,"Description")),n?null:b.createElement("th",null,b.createElement("span",null,"Default")),t?b.createElement("th",null,b.createElement(vfe,null,"Control"," ",!l&&r&&b.createElement(gfe,{onClick:()=>r(),title:"Reset controls"},b.createElement(rX,{"aria-hidden":!0})))):null)),b.createElement("tbody",{className:"docblock-argstable-body"},m.ungrouped.map(y=>b.createElement(Kc,{key:y.key,row:y,arg:d&&d[y.key],...w})),Object.entries(m.ungroupedSubsections).map(([y,E])=>b.createElement(Bm,{key:y,label:y,level:"subsection",colSpan:g},E.map(x=>b.createElement(Kc,{key:x.key,row:x,arg:d&&d[x.key],expandable:C,...w})))),Object.entries(m.sections).map(([y,E])=>b.createElement(Bm,{key:y,label:y,level:"section",colSpan:g},E.ungrouped.map(x=>b.createElement(Kc,{key:x.key,row:x,arg:d&&d[x.key],...w})),Object.entries(E.subsections).map(([x,D])=>b.createElement(Bm,{key:x,label:x,level:"subsection",colSpan:g},D.map(S=>b.createElement(Kc,{key:S.key,row:S,arg:d&&d[S.key],expandable:C,...w})))))))))},Efe=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?b.createElement(k5,{...r[0][1],...t}):b.createElement(YY,null,r.map((n,a)=>{let[o,i]=n,l=`prop_table_div_${o}`,s="div",d=a===0?t:{sort:t.sort};return b.createElement(s,{key:l,id:l,title:o},({active:p})=>p?b.createElement(k5,{key:`prop_table_${o}`,...i,...d}):null)}))};F.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ge(.4,e.color.defaultText):ge(.6,e.color.defaultText)}));F.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});F.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});F.div(Ce,({theme:e})=>({...Dp(e),margin:"25px 0 40px",padding:"30px 20px"}));F.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));F.div(({theme:e})=>({color:e.base==="light"?ge(.2,e.color.defaultText):ge(.6,e.color.defaultText)}));F.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});F.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"?ge(.4,e.color.defaultText):ge(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));F.div({display:"flex",flexDirection:"row"});F.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));F.div(({theme:e})=>({...Dp(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"}));F.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});F.div({flex:1,display:"flex",flexDirection:"row"});F.div({display:"flex",alignItems:"flex-start"});F.div({flex:"0 0 30%"});F.div({flex:1});F.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ge(.4,e.color.defaultText):ge(.6,e.color.defaultText)}));F.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));F.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));F.div(({theme:e})=>({...Dp(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));F.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});F.div({display:"flex",flexFlow:"row wrap"});var xfe=e=>`anchor--${e}`,Cfe=({storyId:e,children:t})=>b.createElement("div",{id:xfe(e),className:"sb-anchor"},t);Vt&&Vt.__DOCS_CONTEXT__===void 0&&(Vt.__DOCS_CONTEXT__=u.createContext(null),Vt.__DOCS_CONTEXT__.displayName="DocsContext");var nn=Vt?Vt.__DOCS_CONTEXT__:u.createContext(null),Fo=(e,t)=>u.useContext(nn).resolveOf(e,t),Dfe=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),Sfe=e=>{if(e)return typeof e=="string"?e.includes("-")?Dfe(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function kfe(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function lB(e){return Hde(e,{allowFunction:!1})}var sB=u.createContext({sources:{}}),uB="--unknown--",_fe=({children:e,channel:t})=>{let[r,n]=u.useState({});return u.useEffect(()=>{let a=(o,i=null,l=!1)=>{let{id:s,args:d=void 0,source:p,format:m}=typeof o=="string"?{id:o,source:i,format:l}:o,h=d?lB(d):uB;n(f=>({...f,[s]:{...f[s],[h]:{code:p,format:m}}}))};return t.on(u3,a),()=>t.off(u3,a)},[]),b.createElement(sB.Provider,{value:{sources:r}},e)},Afe=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[lB(t)])||(a==null?void 0:a[uB])||{code:""}},Ffe=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,d;let{__isArgsStory:a}=t.parameters,o=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||o.type||Ap.AUTO;if(o.code!==void 0)return o.code;let l=i===Ap.DYNAMIC||i===Ap.AUTO&&e&&a?e:o.originalSource||"";return((d=n??o.transform)==null?void 0:d(l,t))||l},$fe=(e,t,r)=>{var f,v,g,C;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=((v=(f=n==null?void 0:n.parameters)==null?void 0:f.docs)==null?void 0:v.source)||{},{code:i}=e,l=e.format??o.format,s=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:l,language:s,dark:d};let p=t.getStoryContext(n),m=e.__forceInitialArgs?p.initialArgs:p.unmappedArgs,h=Afe(n.id,m,r);return l=h.format??((C=(g=n.parameters.docs)==null?void 0:g.source)==null?void 0:C.format)??!1,{code:Ffe({snippet:h.code,storyContext:{...p,args:m},typeFromProps:e.type,transformFromProps:e.transform}),format:l,language:s,dark:d}};function Tfe(e,t){let r=Ife([e],t);return r&&r[0]}function Ife(e,t){let[r,n]=u.useState({});return u.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 Rfe=(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},zfe=(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 l=e.height??o.height,s=e.autoplay??o.autoplay??!1;return{story:t,inline:!0,height:l,autoplay:s,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}},Bfe=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=u.useContext(nn),r=Rfe(e,t),n=Tfe(r,t);if(!n)return b.createElement(qz,null);let a=zfe(e,n,t);return a?b.createElement(g1e,{...a}):null},Lfe=e=>{var h,f,v,g,C,w,y,E,x,D;let t=u.useContext(nn),r=u.useContext(sB),{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}=Fo(n||"story",["story"]),i=$fe({...a,...n&&{of:n}},t,r),l=e.layout??o.parameters.layout??((f=(h=o.parameters.docs)==null?void 0:h.canvas)==null?void 0:f.layout)??"padded",s=e.withToolbar??((g=(v=o.parameters.docs)==null?void 0:v.canvas)==null?void 0:g.withToolbar)??!1,d=e.additionalActions??((w=(C=o.parameters.docs)==null?void 0:C.canvas)==null?void 0:w.additionalActions),p=e.sourceState??((E=(y=o.parameters.docs)==null?void 0:y.canvas)==null?void 0:E.sourceState)??"hidden",m=e.className??((D=(x=o.parameters.docs)==null?void 0:x.canvas)==null?void 0:D.className);return b.createElement(Gz,{withSource:p==="none"?void 0:i,isExpanded:p==="shown",withToolbar:s,additionalActions:d,className:m,layout:l},b.createElement(Bfe,{of:n||o.moduleExport,meta:e.meta,...e.story}))},Ofe=(e,t)=>{let r=Mfe(e,t);if(!r)throw new Error("No result when story was defined");return r},Mfe=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,o]=u.useState(r.args);u.useEffect(()=>{let s=d=>{d.storyId===n&&o(d.args)};return t.channel.on(EC,s),()=>t.channel.off(EC,s)},[n,t.channel]);let i=u.useCallback(s=>t.channel.emit(Wde,{storyId:n,updatedArgs:s}),[n,t.channel]),l=u.useCallback(s=>t.channel.emit(qde,{storyId:n,argNames:s}),[n,t.channel]);return e&&[a,i,l]},Pfe=(e,t)=>{let r=t.getStoryContext(e),[n,a]=u.useState(r.globals);return u.useEffect(()=>{let o=i=>{a(i.globals)};return t.channel.on(xC,o),()=>t.channel.off(xC,o)},[t.channel]),[n]};function Nfe(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var jfe=e=>{var x;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=u.useContext(nn),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:l}=n,s=((x=a.docs)==null?void 0:x.controls)||{},d=e.include??s.include,p=e.exclude??s.exclude,m=e.sort??s.sort,[h,f,v]=Ofe(n,r),[g]=Pfe(n,r),C=bC(o,d,p);if(!(l&&Object.keys(l).length>0))return Object.keys(C).length>0||Object.keys(h).length>0?b.createElement(k5,{rows:C,sort:m,args:h,globals:g,updateArgs:f,resetArgs:v}):null;let w=Sfe(i),y=Object.fromEntries(Object.entries(l).map(([D,S])=>[D,{rows:bC(Nfe(S,a),d,p),sort:m}])),E={[w]:{rows:C,sort:m},...y};return b.createElement(Efe,{tabs:E,sort:m,args:h,globals:g,updateArgs:f,resetArgs:v})},{document:cB}=Vt,dB=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return b.createElement(jT,null,t);let n=e&&e.split("-");return b.createElement(Uz,{language:n&&n[1]||"text",format:!1,code:t,...r})};function n3(e,t){e.channel.emit(Gde,t)}var _5=pZ.a,Hfe=({hash:e,children:t})=>{let r=u.useContext(nn);return b.createElement(_5,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);cB.getElementById(a)&&n3(r,e)}},t)},pB=e=>{let{href:t,target:r,children:n,...a}=e,o=u.useContext(nn);return!t||r==="_blank"||/^https?:\/\//.test(t)?b.createElement(_5,{...e}):t.startsWith("#")?b.createElement(Hfe,{hash:t},n):b.createElement(_5,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),n3(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},fB=["h1","h2","h3","h4","h5","h6"],Vfe=fB.reduce((e,t)=>({...e,[t]:F(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),Ufe=F.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),Wfe=({as:e,id:t,children:r,...n})=>{let a=u.useContext(nn),o=Vfe[e],i=`#${t}`;return b.createElement(o,{id:t,...n},b.createElement(Ufe,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:l=>{cB.getElementById(t)&&n3(a,i)}},b.createElement(JZ,null)),r)},a3=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return b.createElement(Wfe,{as:t,id:r,...a},n);let o=t,{as:i,...l}=e;return b.createElement(o,{...ye(l,t)})},hB=fB.reduce((e,t)=>({...e,[t]:r=>b.createElement(a3,{as:t,...r})}),{}),qfe=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(EB`The Markdown block only accepts children as a single string, but children were of type: '${typeof e.children}' + ${Ma(.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 ${mn(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),oB=F.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums","[aria-readonly=true] &":{opacity:.5}}),Dpe=F(oB)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),Spe=F.div({display:"flex",alignItems:"center",width:"100%"});function kpe(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 _pe=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:i,onFocus:l,argType:s})=>{var f;let d=v=>{r(O1e(v.target.value))},p=t!==void 0,m=u.useMemo(()=>kpe(o),[o]),h=!!((f=s==null?void 0:s.table)!=null&&f.readonly);return b.createElement(Spe,{"aria-readonly":h},b.createElement(oB,null,n),b.createElement(Cpe,{id:br(e),type:"range",disabled:h,onChange:d,name:e,value:t,min:n,max:a,step:o,onFocus:l,onBlur:i}),b.createElement(Dpe,{numberOFDecimalsPlaces:m,max:a},p?t.toFixed(m):"--"," / ",a))},Ape=F.label({display:"flex"}),Fpe=F.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),$pe=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o,argType:i})=>{var f;let l=v=>{r(v.target.value)},s=!!((f=i==null?void 0:i.table)!=null&&f.readonly),[d,p]=u.useState(!1),m=u.useCallback(()=>{r(""),p(!0)},[p]);if(t===void 0)return b.createElement(So,{variant:"outline",size:"medium",disabled:s,id:Xd(e),onClick:m},"Set string");let h=typeof t=="string";return b.createElement(Ape,null,b.createElement(qu.Textarea,{id:br(e),maxLength:o,onChange:l,disabled:s,size:"flex",placeholder:"Edit string...",autoFocus:d,valid:h?null:"error",name:e,value:h?t:"",onFocus:n,onBlur:a}),o&&b.createElement(Fpe,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},Tpe=F(qu.Input)({padding:10});function Ipe(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var Rpe=({onChange:e,name:t,accept:r="image/*",value:n,argType:a})=>{var s;let o=u.useRef(null),i=(s=a==null?void 0:a.control)==null?void 0:s.readOnly;function l(d){if(!d.target.files)return;let p=Array.from(d.target.files).map(m=>URL.createObjectURL(m));e(p),Ipe(n)}return u.useEffect(()=>{n==null&&o.current&&(o.current.value=null)},[n,t]),b.createElement(Tpe,{ref:o,id:br(t),type:"file",name:t,multiple:!0,disabled:i,onChange:l,accept:r,size:"flex"})},zpe=u.lazy(()=>F5(()=>import("./Color-ERTF36HU-CTWFobSr.js"),__vite__mapDeps([4,2,1,3]),import.meta.url)),Bpe=e=>b.createElement(u.Suspense,{fallback:b.createElement("div",null)},b.createElement(zpe,{...e})),Lpe={array:$C,object:$C,boolean:F1e,color:Bpe,date:B1e,number:P1e,check:Ho,"inline-check":Ho,radio:Ho,"inline-radio":Ho,select:Ho,"multi-select":Ho,range:_pe,text:$pe,file:Rpe},TC=()=>b.createElement(b.Fragment,null,"-"),Ope=({row:e,arg:t,updateArgs:r,isHovered:n})=>{var g;let{key:a,control:o}=e,[i,l]=u.useState(!1),[s,d]=u.useState({value:t});u.useEffect(()=>{i||d({value:t})},[i,t]);let p=u.useCallback(C=>(d({value:C}),r({[a]:C}),C),[r,a]),m=u.useCallback(()=>l(!1),[]),h=u.useCallback(()=>l(!0),[]);if(!o||o.disable){let C=(o==null?void 0:o.disable)!==!0&&((g=e==null?void 0:e.type)==null?void 0:g.name)!=="function";return n&&C?b.createElement(_i,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):b.createElement(TC,null)}let f={name:a,argType:e,value:s.value,onChange:p,onBlur:m,onFocus:h},v=Lpe[o.type]||TC;return b.createElement(v,{...f,...o,controlType:o.type})},Mpe=F.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:xa({theme:e}),div:{span:{fontWeight:"bold"}},"& code":{margin:0,display:"inline-block",fontSize:e.typography.size.s1}}})),Ppe=({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:b.createElement(b.Fragment,null,b.createElement(Mpe,null,b.createElement("tbody",null,n&&b.createElement("tr",{key:"deprecated"},b.createElement("td",{colSpan:2},b.createElement("strong",null,"Deprecated"),": ",e.deprecated.toString())),r&&t.map(o=>b.createElement("tr",{key:o.name},b.createElement("td",null,b.createElement("code",null,o.name)),b.createElement("td",null,o.description))),a&&b.createElement("tr",{key:"returns"},b.createElement("td",null,b.createElement("code",null,"Returns")),b.createElement("td",null,e.returns.description)))))},S5=8,IC=F.div(({isExpanded:e})=>({display:"flex",flexDirection:e?"column":"row",flexWrap:"wrap",alignItems:"flex-start",marginBottom:"-4px",minWidth:100})),Npe=F.span(xa,({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}})),jpe=F.button(({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,marginBottom:"4px",background:"none",border:"none"})),Hpe=F.div(xa,({theme:e})=>({fontFamily:e.typography.fonts.mono,color:e.color.secondary,fontSize:e.typography.size.s1,margin:0,whiteSpace:"nowrap",display:"flex",alignItems:"center"})),Vpe=F.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"}})),Upe=F(tX)({marginLeft:4}),Wpe=F($R)({marginLeft:4}),qpe=()=>b.createElement("span",null,"-"),iB=({text:e,simple:t})=>b.createElement(Npe,{simple:t},e),Gpe=Iz(1e3)(e=>{let t=e.split(/\r?\n/);return`${Math.max(...t.map(r=>r.length))}ch`}),Kpe=e=>{if(!e)return[e];let t=e.split("|").map(r=>r.trim());return Cce(t)},RC=(e,t=!0)=>{let r=e;return t||(r=e.slice(0,S5)),r.map(n=>b.createElement(iB,{key:n,text:n===""?'""':n}))},Ype=({value:e,initialExpandedArgs:t})=>{let{summary:r,detail:n}=e,[a,o]=u.useState(!1),[i,l]=u.useState(t||!1);if(r==null)return null;let s=typeof r.toString=="function"?r.toString():r;if(n==null){if(/[(){}[\]<>]/.test(s))return b.createElement(iB,{text:s});let d=Kpe(s),p=d.length;return p>S5?b.createElement(IC,{isExpanded:i},RC(d,i),b.createElement(jpe,{onClick:()=>l(!i)},i?"Show less...":`Show ${p-S5} more...`)):b.createElement(IC,null,RC(d))}return b.createElement(fY,{closeOnOutsideClick:!0,placement:"bottom",visible:a,onVisibleChange:d=>{o(d)},tooltip:b.createElement(Vpe,{width:Gpe(n)},b.createElement(v4,{language:"jsx",format:!1},n))},b.createElement(Hpe,{className:"sbdocs-expandable"},b.createElement("span",null,s),a?b.createElement(Upe,null):b.createElement(Wpe,null)))},zm=({value:e,initialExpandedArgs:t})=>e==null?b.createElement(qpe,null):b.createElement(Ype,{value:e,initialExpandedArgs:t}),Zpe=F.span({fontWeight:"bold"}),Xpe=F.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),Jpe=F.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...xa({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),Qpe=F.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ge(.1,e.color.defaultText):ge(.2,e.color.defaultText),marginTop:t?4:0})),efe=F.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?ge(.1,e.color.defaultText):ge(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),tfe=F.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),rfe=e=>e&&{summary:typeof e=="string"?e:e.name},Kc=e=>{var g;let[t,r]=u.useState(!1),{row:n,updateArgs:a,compact:o,expandable:i,initialExpandedArgs:l}=e,{name:s,description:d}=n,p=n.table||{},m=p.type||rfe(n.type),h=p.defaultValue||n.defaultValue,f=(g=n.type)==null?void 0:g.required,v=d!=null&&d!=="";return b.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},b.createElement(tfe,{expandable:i},b.createElement(Zpe,null,s),f?b.createElement(Xpe,{title:"Required"},"*"):null),o?null:b.createElement("td",null,v&&b.createElement(Jpe,null,b.createElement(_z,null,d)),p.jsDocTags!=null?b.createElement(b.Fragment,null,b.createElement(efe,{hasDescription:v},b.createElement(zm,{value:m,initialExpandedArgs:l})),b.createElement(Ppe,{tags:p.jsDocTags})):b.createElement(Qpe,{hasDescription:v},b.createElement(zm,{value:m,initialExpandedArgs:l}))),o?null:b.createElement("td",null,b.createElement(zm,{value:h,initialExpandedArgs:l})),a?b.createElement("td",null,b.createElement(Ope,{...e,isHovered:t})):null)},nfe=F.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"})),afe=F.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),ofe=F.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),ife=({inAddonPanel:e})=>{let[t,r]=u.useState(!0);return u.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:b.createElement(nfe,{inAddonPanel:e},b.createElement(bR,{title:e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated",description:b.createElement(b.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:b.createElement(afe,null,e&&b.createElement(b.Fragment,null,b.createElement(_i,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},b.createElement(YZ,null)," Watch 5m video"),b.createElement(ofe,null),b.createElement(_i,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},b.createElement(h5,null)," Read docs")),!e&&b.createElement(_i,{href:"https://storybook.js.org/docs/essentials/controls",target:"_blank",withArrow:!0},b.createElement(h5,null)," Learn how to set that up"))}))},lfe=F(QZ)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ge(.25,e.color.defaultText):ge(.3,e.color.defaultText),border:"none",display:"inline-block"})),sfe=F(eX)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?ge(.25,e.color.defaultText):ge(.3,e.color.defaultText),border:"none",display:"inline-block"})),ufe=F.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),cfe=F.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"?ge(.4,e.color.defaultText):ge(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),dfe=F.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),pfe=F.td(()=>({position:"relative"})),ffe=F.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${Ma(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),zC=F.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"})),Bm=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,i]=u.useState(n),l=e==="subsection"?dfe:cfe,s=(r==null?void 0:r.length)||0,d=e==="subsection"?`${s} item${s!==1?"s":""}`:"",p=`${o?"Hide":"Show"} ${e==="subsection"?s:t} item${s!==1?"s":""}`;return b.createElement(b.Fragment,null,b.createElement(ffe,{title:p},b.createElement(l,{colSpan:1},b.createElement(zC,{onClick:m=>i(!o),tabIndex:0},p),b.createElement(ufe,null,o?b.createElement(lfe,null):b.createElement(sfe,null),t)),b.createElement(pfe,{colSpan:a-1},b.createElement(zC,{onClick:m=>i(!o),tabIndex:-1,style:{outline:"none"}},p),o?null:d)),o?r:null)},Yc=F.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Qe=F.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),Ie=F.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})),et=[2,4,2,2],hfe=()=>b.createElement(b.Fragment,null,b.createElement(Yc,null,b.createElement(Qe,{numColumn:et[0]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[1]},b.createElement(Ie,{width:"30%"})),b.createElement(Qe,{numColumn:et[2]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[3]},b.createElement(Ie,{width:"60%"}))),b.createElement(Yc,null,b.createElement(Qe,{numColumn:et[0]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[1]},b.createElement(Ie,{width:"80%"}),b.createElement(Ie,{width:"30%"})),b.createElement(Qe,{numColumn:et[2]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[3]},b.createElement(Ie,{width:"60%"}))),b.createElement(Yc,null,b.createElement(Qe,{numColumn:et[0]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[1]},b.createElement(Ie,{width:"80%"}),b.createElement(Ie,{width:"30%"})),b.createElement(Qe,{numColumn:et[2]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[3]},b.createElement(Ie,{width:"60%"}))),b.createElement(Yc,null,b.createElement(Qe,{numColumn:et[0]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[1]},b.createElement(Ie,{width:"80%"}),b.createElement(Ie,{width:"30%"})),b.createElement(Qe,{numColumn:et[2]},b.createElement(Ie,{width:"60%"})),b.createElement(Qe,{numColumn:et[3]},b.createElement(Ie,{width:"60%"})))),mfe=F.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"?ge(.25,e.color.defaultText):ge(.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}}}}})),gfe=F(to)(({theme:e})=>({margin:"-4px -12px -4px 0"})),vfe=F.span({display:"flex",justifyContent:"space-between"}),yfe={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},wfe=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,i])=>{let{category:l,subcategory:s}=(i==null?void 0:i.table)||{};if(l){let d=r.sections[l]||{ungrouped:[],subsections:{}};if(!s)d.ungrouped.push({key:o,...i});else{let p=d.subsections[s]||[];p.push({key:o,...i}),d.subsections[s]=p}r.sections[l]=d}else if(s){let d=r.ungroupedSubsections[s]||[];d.push({key:o,...i}),r.ungroupedSubsections[s]=d}else r.ungrouped.push({key:o,...i})});let n=yfe[t],a=o=>n?Object.keys(o).reduce((i,l)=>({...i,[l]:o[l].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)}}),{})}},bfe=(e,t,r)=>{try{return nN(e,t,r)}catch(n){return Ude.warn(n.message),!1}},k5=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:i="none",isLoading:l}=e;if("error"in e){let{error:y}=e;return b.createElement(Vz,null,y," ",b.createElement(_i,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},b.createElement(h5,null)," Read the docs"))}if(l)return b.createElement(hfe,null);let{rows:s,args:d,globals:p}="rows"in e&&e,m=wfe(eie(s,y=>{var E;return!((E=y==null?void 0:y.table)!=null&&E.disable)&&bfe(y,d||{},p||{})}),i),h=m.ungrouped.length===0,f=Object.entries(m.sections).length===0,v=Object.entries(m.ungroupedSubsections).length===0;if(h&&f&&v)return b.createElement(ife,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let C=Object.keys(m.sections).length>0,w={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return b.createElement(NT,null,b.createElement(mfe,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},b.createElement("thead",{className:"docblock-argstable-head"},b.createElement("tr",null,b.createElement("th",null,b.createElement("span",null,"Name")),n?null:b.createElement("th",null,b.createElement("span",null,"Description")),n?null:b.createElement("th",null,b.createElement("span",null,"Default")),t?b.createElement("th",null,b.createElement(vfe,null,"Control"," ",!l&&r&&b.createElement(gfe,{onClick:()=>r(),title:"Reset controls"},b.createElement(rX,{"aria-hidden":!0})))):null)),b.createElement("tbody",{className:"docblock-argstable-body"},m.ungrouped.map(y=>b.createElement(Kc,{key:y.key,row:y,arg:d&&d[y.key],...w})),Object.entries(m.ungroupedSubsections).map(([y,E])=>b.createElement(Bm,{key:y,label:y,level:"subsection",colSpan:g},E.map(x=>b.createElement(Kc,{key:x.key,row:x,arg:d&&d[x.key],expandable:C,...w})))),Object.entries(m.sections).map(([y,E])=>b.createElement(Bm,{key:y,label:y,level:"section",colSpan:g},E.ungrouped.map(x=>b.createElement(Kc,{key:x.key,row:x,arg:d&&d[x.key],...w})),Object.entries(E.subsections).map(([x,D])=>b.createElement(Bm,{key:x,label:x,level:"subsection",colSpan:g},D.map(S=>b.createElement(Kc,{key:S.key,row:S,arg:d&&d[S.key],expandable:C,...w})))))))))},Efe=({tabs:e,...t})=>{let r=Object.entries(e);return r.length===1?b.createElement(k5,{...r[0][1],...t}):b.createElement(YY,null,r.map((n,a)=>{let[o,i]=n,l=`prop_table_div_${o}`,s="div",d=a===0?t:{sort:t.sort};return b.createElement(s,{key:l,id:l,title:o},({active:p})=>p?b.createElement(k5,{key:`prop_table_${o}`,...i,...d}):null)}))};F.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?ge(.4,e.color.defaultText):ge(.6,e.color.defaultText)}));F.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});F.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});F.div(Ce,({theme:e})=>({...Dp(e),margin:"25px 0 40px",padding:"30px 20px"}));F.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));F.div(({theme:e})=>({color:e.base==="light"?ge(.2,e.color.defaultText):ge(.6,e.color.defaultText)}));F.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});F.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"?ge(.4,e.color.defaultText):ge(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));F.div({display:"flex",flexDirection:"row"});F.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));F.div(({theme:e})=>({...Dp(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"}));F.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});F.div({flex:1,display:"flex",flexDirection:"row"});F.div({display:"flex",alignItems:"flex-start"});F.div({flex:"0 0 30%"});F.div({flex:1});F.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?ge(.4,e.color.defaultText):ge(.6,e.color.defaultText)}));F.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));F.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));F.div(({theme:e})=>({...Dp(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));F.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});F.div({display:"flex",flexFlow:"row wrap"});var xfe=e=>`anchor--${e}`,Cfe=({storyId:e,children:t})=>b.createElement("div",{id:xfe(e),className:"sb-anchor"},t);Vt&&Vt.__DOCS_CONTEXT__===void 0&&(Vt.__DOCS_CONTEXT__=u.createContext(null),Vt.__DOCS_CONTEXT__.displayName="DocsContext");var nn=Vt?Vt.__DOCS_CONTEXT__:u.createContext(null),Fo=(e,t)=>u.useContext(nn).resolveOf(e,t),Dfe=e=>e.split("-").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(""),Sfe=e=>{if(e)return typeof e=="string"?e.includes("-")?Dfe(e):e:e.__docgenInfo&&e.__docgenInfo.displayName?e.__docgenInfo.displayName:e.name};function kfe(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function lB(e){return Hde(e,{allowFunction:!1})}var sB=u.createContext({sources:{}}),uB="--unknown--",_fe=({children:e,channel:t})=>{let[r,n]=u.useState({});return u.useEffect(()=>{let a=(o,i=null,l=!1)=>{let{id:s,args:d=void 0,source:p,format:m}=typeof o=="string"?{id:o,source:i,format:l}:o,h=d?lB(d):uB;n(f=>({...f,[s]:{...f[s],[h]:{code:p,format:m}}}))};return t.on(u3,a),()=>t.off(u3,a)},[]),b.createElement(sB.Provider,{value:{sources:r}},e)},Afe=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[lB(t)])||(a==null?void 0:a[uB])||{code:""}},Ffe=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var s,d;let{__isArgsStory:a}=t.parameters,o=((s=t.parameters.docs)==null?void 0:s.source)||{},i=r||o.type||Ap.AUTO;if(o.code!==void 0)return o.code;let l=i===Ap.DYNAMIC||i===Ap.AUTO&&e&&a?e:o.originalSource||"";return((d=n??o.transform)==null?void 0:d(l,t))||l},$fe=(e,t,r)=>{var f,v,g,C;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=((v=(f=n==null?void 0:n.parameters)==null?void 0:f.docs)==null?void 0:v.source)||{},{code:i}=e,l=e.format??o.format,s=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:l,language:s,dark:d};let p=t.getStoryContext(n),m=e.__forceInitialArgs?p.initialArgs:p.unmappedArgs,h=Afe(n.id,m,r);return l=h.format??((C=(g=n.parameters.docs)==null?void 0:g.source)==null?void 0:C.format)??!1,{code:Ffe({snippet:h.code,storyContext:{...p,args:m},typeFromProps:e.type,transformFromProps:e.transform}),format:l,language:s,dark:d}};function Tfe(e,t){let r=Ife([e],t);return r&&r[0]}function Ife(e,t){let[r,n]=u.useState({});return u.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 Rfe=(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},zfe=(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 l=e.height??o.height,s=e.autoplay??o.autoplay??!1;return{story:t,inline:!0,height:l,autoplay:s,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}},Bfe=(e={__forceInitialArgs:!1,__primary:!1})=>{let t=u.useContext(nn),r=Rfe(e,t),n=Tfe(r,t);if(!n)return b.createElement(qz,null);let a=zfe(e,n,t);return a?b.createElement(g1e,{...a}):null},Lfe=e=>{var h,f,v,g,C,w,y,E,x,D;let t=u.useContext(nn),r=u.useContext(sB),{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}=Fo(n||"story",["story"]),i=$fe({...a,...n&&{of:n}},t,r),l=e.layout??o.parameters.layout??((f=(h=o.parameters.docs)==null?void 0:h.canvas)==null?void 0:f.layout)??"padded",s=e.withToolbar??((g=(v=o.parameters.docs)==null?void 0:v.canvas)==null?void 0:g.withToolbar)??!1,d=e.additionalActions??((w=(C=o.parameters.docs)==null?void 0:C.canvas)==null?void 0:w.additionalActions),p=e.sourceState??((E=(y=o.parameters.docs)==null?void 0:y.canvas)==null?void 0:E.sourceState)??"hidden",m=e.className??((D=(x=o.parameters.docs)==null?void 0:x.canvas)==null?void 0:D.className);return b.createElement(Gz,{withSource:p==="none"?void 0:i,isExpanded:p==="shown",withToolbar:s,additionalActions:d,className:m,layout:l},b.createElement(Bfe,{of:n||o.moduleExport,meta:e.meta,...e.story}))},Ofe=(e,t)=>{let r=Mfe(e,t);if(!r)throw new Error("No result when story was defined");return r},Mfe=(e,t)=>{let r=e?t.getStoryContext(e):{args:{}},{id:n}=e||{id:"none"},[a,o]=u.useState(r.args);u.useEffect(()=>{let s=d=>{d.storyId===n&&o(d.args)};return t.channel.on(EC,s),()=>t.channel.off(EC,s)},[n,t.channel]);let i=u.useCallback(s=>t.channel.emit(Wde,{storyId:n,updatedArgs:s}),[n,t.channel]),l=u.useCallback(s=>t.channel.emit(qde,{storyId:n,argNames:s}),[n,t.channel]);return e&&[a,i,l]},Pfe=(e,t)=>{let r=t.getStoryContext(e),[n,a]=u.useState(r.globals);return u.useEffect(()=>{let o=i=>{a(i.globals)};return t.channel.on(xC,o),()=>t.channel.off(xC,o)},[t.channel]),[n]};function Nfe(e,t){let{extractArgTypes:r}=t.docs||{};if(!r)throw new Error("Args unsupported. See Args documentation for your framework.");return r(e)}var jfe=e=>{var x;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=u.useContext(nn),{story:n}=r.resolveOf(t||"story",["story"]),{parameters:a,argTypes:o,component:i,subcomponents:l}=n,s=((x=a.docs)==null?void 0:x.controls)||{},d=e.include??s.include,p=e.exclude??s.exclude,m=e.sort??s.sort,[h,f,v]=Ofe(n,r),[g]=Pfe(n,r),C=bC(o,d,p);if(!(l&&Object.keys(l).length>0))return Object.keys(C).length>0||Object.keys(h).length>0?b.createElement(k5,{rows:C,sort:m,args:h,globals:g,updateArgs:f,resetArgs:v}):null;let w=Sfe(i),y=Object.fromEntries(Object.entries(l).map(([D,S])=>[D,{rows:bC(Nfe(S,a),d,p),sort:m}])),E={[w]:{rows:C,sort:m},...y};return b.createElement(Efe,{tabs:E,sort:m,args:h,globals:g,updateArgs:f,resetArgs:v})},{document:cB}=Vt,dB=({className:e,children:t,...r})=>{if(typeof e!="string"&&(typeof t!="string"||!t.match(/[\n\r]/g)))return b.createElement(jT,null,t);let n=e&&e.split("-");return b.createElement(Uz,{language:n&&n[1]||"text",format:!1,code:t,...r})};function n3(e,t){e.channel.emit(Gde,t)}var _5=pZ.a,Hfe=({hash:e,children:t})=>{let r=u.useContext(nn);return b.createElement(_5,{href:e,target:"_self",onClick:n=>{let a=e.substring(1);cB.getElementById(a)&&n3(r,e)}},t)},pB=e=>{let{href:t,target:r,children:n,...a}=e,o=u.useContext(nn);return!t||r==="_blank"||/^https?:\/\//.test(t)?b.createElement(_5,{...e}):t.startsWith("#")?b.createElement(Hfe,{hash:t},n):b.createElement(_5,{href:t,onClick:i=>{i.button===0&&!i.altKey&&!i.ctrlKey&&!i.metaKey&&!i.shiftKey&&(i.preventDefault(),n3(o,i.currentTarget.getAttribute("href")))},target:r,...a},n)},fB=["h1","h2","h3","h4","h5","h6"],Vfe=fB.reduce((e,t)=>({...e,[t]:F(t)({"& svg":{position:"relative",top:"-0.1em",visibility:"hidden"},"&:hover svg":{visibility:"visible"}})}),{}),Ufe=F.a(()=>({float:"left",lineHeight:"inherit",paddingRight:"10px",marginLeft:"-24px",color:"inherit"})),Wfe=({as:e,id:t,children:r,...n})=>{let a=u.useContext(nn),o=Vfe[e],i=`#${t}`;return b.createElement(o,{id:t,...n},b.createElement(Ufe,{"aria-hidden":"true",href:i,tabIndex:-1,target:"_self",onClick:l=>{cB.getElementById(t)&&n3(a,i)}},b.createElement(JZ,null)),r)},a3=e=>{let{as:t,id:r,children:n,...a}=e;if(r)return b.createElement(Wfe,{as:t,id:r,...a},n);let o=t,{as:i,...l}=e;return b.createElement(o,{...ye(l,t)})},hB=fB.reduce((e,t)=>({...e,[t]:r=>b.createElement(a3,{as:t,...r})}),{}),qfe=e=>{var t;if(!e.children)return null;if(typeof e.children!="string")throw new Error(EB`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: @@ -631,4 +631,4 @@ ${t}`);let r=t.match(OK);if(!r)return b.createElement(u.Fragment,null,t);let[,n, A paragraph \`} - `);return b.createElement(_z,{...e,options:{forceBlock:!0,overrides:{code:dB,a:pB,...hB,...(t=e==null?void 0:e.options)==null?void 0:t.overrides},...e==null?void 0:e.options}})},Gfe=(e=>(e.INFO="info",e.NOTES="notes",e.DOCGEN="docgen",e.AUTO="auto",e))(Gfe||{}),Kfe=e=>{var t,r,n,a,o,i,l,s;switch(e.type){case"story":return((r=(t=e.story.parameters.docs)==null?void 0:t.description)==null?void 0:r.story)||null;case"meta":{let{parameters:d,component:p}=e.preparedMeta;return((a=(n=d.docs)==null?void 0:n.description)==null?void 0:a.component)||((i=(o=d.docs)==null?void 0:o.extractComponentDescription)==null?void 0:i.call(o,p,{component:p,parameters:d}))||null}case"component":{let{component:d,projectAnnotations:{parameters:p}}=e;return((s=(l=p.docs)==null?void 0:l.extractComponentDescription)==null?void 0:s.call(l,d,{component:d,parameters:p}))||null}default:throw new Error(`Unrecognized module type resolved from 'useOf', got: ${e.type}`)}},A5=e=>{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=Fo(t||"meta"),n=Kfe(r);return n?b.createElement(qfe,null,n):null},BC=HB(Qde()),Yfe=F.div(({theme:e})=>({width:"10rem","@media (max-width: 768px)":{display:"none"}})),Zfe=F.div(({theme:e})=>({position:"fixed",bottom:0,top:0,width:"10rem",paddingTop:"4rem",paddingBottom:"2rem",overflowY:"auto",fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch","& *":{boxSizing:"border-box"},"& > .toc-wrapper > .toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`}}},"& .toc-list-item":{position:"relative",listStyleType:"none",marginLeft:20,paddingTop:3,paddingBottom:3},"& .toc-list-item::before":{content:'""',position:"absolute",height:"100%",top:0,left:0,transform:"translateX(calc(-2px - 20px))",borderLeft:`solid 2px ${e.color.mediumdark}`,opacity:0,transition:"opacity 0.2s"},"& .toc-list-item.is-active-li::before":{opacity:1},"& .toc-list-item > a":{color:e.color.defaultText,textDecoration:"none"},"& .toc-list-item.is-active-li > a":{fontWeight:600,color:e.color.secondary,textDecoration:"none"}})),Xfe=F.p(({theme:e})=>({fontWeight:600,fontSize:"0.875em",color:e.textColor,textTransform:"uppercase",marginBottom:10})),Jfe=({title:e})=>e===null?null:typeof e=="string"?b.createElement(Xfe,null,e):e,Qfe=({title:e,disable:t,headingSelector:r,contentsSelector:n,ignoreSelector:a,unsafeTocbotOptions:o})=>(u.useEffect(()=>{let i={tocSelector:".toc-wrapper",contentSelector:n??".sbdocs-content",headingSelector:r??"h3",ignoreSelector:a??".docs-story *, .skip-toc",headingsOffset:40,scrollSmoothOffset:-40,orderedList:!1,onClick:()=>!1,...o},l=setTimeout(()=>BC.init(i),100);return()=>{clearTimeout(l),BC.destroy()}},[t]),b.createElement(b.Fragment,null,b.createElement(Yfe,null,t?null:b.createElement(Zfe,null,b.createElement(Jfe,{title:e||null}),b.createElement("div",{className:"toc-wrapper"}))))),{document:ehe,window:the}=Vt,rhe=({context:e,theme:t,children:r})=>{var a,o,i,l,s;let n;try{n=(o=(a=e.resolveOf("meta",["meta"]).preparedMeta.parameters)==null?void 0:a.docs)==null?void 0:o.toc}catch{n=(s=(l=(i=e==null?void 0:e.projectAnnotations)==null?void 0:i.parameters)==null?void 0:l.docs)==null?void 0:s.toc}return u.useEffect(()=>{let d;try{if(d=new URL(the.parent.location.toString()),d.hash){let p=ehe.getElementById(decodeURIComponent(d.hash.substring(1)));p&&setTimeout(()=>{kfe(p)},200)}}catch{}}),b.createElement(nn.Provider,{value:e},b.createElement(_fe,{channel:e.channel},b.createElement(b9,{theme:LO(t)},b.createElement(s1e,{toc:n?b.createElement(Qfe,{className:"sbdocs sbdocs-toc--custom",...n}):null},r))))},nhe=({children:e,disableAnchor:t})=>{if(t||typeof e!="string")return b.createElement(VT,null,e);let r=globalThis.encodeURIComponent(e.toLowerCase());return b.createElement(a3,{as:"h3",id:r},e)},mB=({of:e,expanded:t=!0,withToolbar:r=!1,__forceInitialArgs:n=!1,__primary:a=!1})=>{var l,s;let{story:o}=Fo(e||"story",["story"]),i=((s=(l=o.parameters.docs)==null?void 0:l.canvas)==null?void 0:s.withToolbar)??r;return b.createElement(Cfe,{storyId:o.id},t&&b.createElement(b.Fragment,null,b.createElement(nhe,null,o.name),b.createElement(A5,{of:e})),b.createElement(Lfe,{of:e,withToolbar:i,story:{__forceInitialArgs:n,__primary:a},source:{__forceInitialArgs:n}}))},ahe=e=>{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{csfFile:r}=Fo(t||"meta",["meta"]),n=u.useContext(nn).componentStoriesFromCSFFile(r)[0];return n?b.createElement(mB,{of:n.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null},ohe=({children:e,disableAnchor:t,...r})=>{if(t||typeof e!="string")return b.createElement(HT,null,e);let n=e.toLowerCase().replace(/[^a-z0-9]/gi,"-");return b.createElement(a3,{as:"h2",id:n,...r},e)},ihe=F(ohe)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,fontWeight:e.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:e.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}})),lhe=({title:e="Stories",includePrimary:t=!0})=>{var l;let{componentStories:r,projectAnnotations:n,getStoryContext:a}=u.useContext(nn),o=r(),{stories:{filter:i}={filter:void 0}}=((l=n.parameters)==null?void 0:l.docs)||{};return i&&(o=o.filter(s=>i(s,a(s)))),o.some(s=>{var d;return(d=s.tags)==null?void 0:d.includes("autodocs")})&&(o=o.filter(s=>{var d;return((d=s.tags)==null?void 0:d.includes("autodocs"))&&!s.usesMount})),t||(o=o.slice(1)),!o||o.length===0?null:b.createElement(b.Fragment,null,b.createElement(ihe,null,e),o.map(s=>s&&b.createElement(mB,{key:s.id,of:s.moduleExport,expanded:!0,__forceInitialArgs:!0})))},she="https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#subtitle-block-and-parameterscomponentsubtitle",uhe=e=>{let{of:t,children:r}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let n;try{n=Fo(t||"meta",["meta"]).preparedMeta}catch(l){if(r&&!l.message.includes("did you forget to use ?"))throw l}let{componentSubtitle:a,docs:o}=(n==null?void 0:n.parameters)||{};a&&Vde(`Using 'parameters.componentSubtitle' property to subtitle stories is deprecated. See ${she}`);let i=r||(o==null?void 0:o.subtitle)||a;return i?b.createElement(o1e,{className:"sbdocs-subtitle sb-unstyled"},i):null},che=/\s*\/\s*/,dhe=e=>{let t=e.trim().split(che);return(t==null?void 0:t[(t==null?void 0:t.length)-1])||e},phe=e=>{let{children:t,of:r}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let n;try{n=Fo(r||"meta",["meta"]).preparedMeta}catch(o){if(t&&!o.message.includes("did you forget to use ?"))throw o}let a=t||dhe(n==null?void 0:n.title);return a?b.createElement(a1e,{className:"sbdocs-title sb-unstyled"},a):null},fhe=()=>{let e=Fo("meta",["meta"]),{stories:t}=e.csfFile,r=Object.keys(t).length===1;return b.createElement(b.Fragment,null,b.createElement(phe,null),b.createElement(uhe,null),b.createElement(A5,{of:"meta"}),r?b.createElement(A5,{of:"story"}):null,b.createElement(ahe,null),b.createElement(jfe,null),r?null:b.createElement(lhe,null))};function hhe({context:e,docsParameter:t}){let r=t.container||rhe,n=t.page||fhe;return b.createElement(r,{context:e,theme:t.theme},b.createElement(n,null))}var gB,LC=sl;gB=LC.createRoot,LC.hydrateRoot;var Zd=new Map;function mhe(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var ghe=({callback:e,children:t})=>{let r=u.useRef();return u.useLayoutEffect(()=>{r.current!==e&&(r.current=e,e())},[e]),t};typeof Promise.withResolvers>"u"&&(Promise.withResolvers=()=>{let e=null,t=null;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}});var vhe=async(e,t,r)=>{let n=await whe(t,r);if(mhe()){n.render(e);return}let{promise:a,resolve:o}=Promise.withResolvers();return n.render(u.createElement(ghe,{callback:o},e)),a},yhe=(e,t)=>{let r=Zd.get(e);r&&(r.unmount(),Zd.delete(e))},whe=async(e,t)=>{let r=Zd.get(e);return r||(r=gB(e,t),Zd.set(e,r)),r},vB={code:dB,a:pB,...hB},bhe=class extends u.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:t}=this.props;t(e)}render(){let{hasError:e}=this.state,{children:t}=this.props;return e?null:b.createElement(b.Fragment,null,t)}},Ehe=class{constructor(){this.render=async(e,t,r)=>{let n={...vB,...t==null?void 0:t.components},a=hhe;return new Promise((o,i)=>{F5(async()=>{const{MDXProvider:l}=await import("./index-C0b3s7xI.js");return{MDXProvider:l}},__vite__mapDeps([5,1,2,3]),import.meta.url).then(({MDXProvider:l})=>vhe(b.createElement(bhe,{showException:i,key:Math.random()},b.createElement(l,{components:n},b.createElement(a,{context:e,docsParameter:t}))),r)).then(()=>o())})},this.unmount=e=>{yhe(e)}}};const Zhe=Object.freeze(Object.defineProperty({__proto__:null,DocsRenderer:Ehe,defaultComponents:vB},Symbol.toStringTag,{value:"Module"}));export{khe as $,HH as A,So as B,OH as C,BH as D,MH as E,Nhe as F,uZ as G,Vhe as H,bR as I,v4 as J,qH as K,vR as L,CR as M,up as N,_i as O,The as P,Ohe as Q,NH as R,PH as S,to as T,GH as U,DR as V,YY as W,_4 as X,IY as Y,zhe as Z,jhe as _,LH as a,Bhe as a0,YH as a1,Rhe as a2,fY as a3,RK as a4,xa as a5,pZ as a6,Pg as a7,cZ as a8,u5 as a9,Phe as aa,ye as ab,fZ as ac,Ce as ad,b as ae,rn as af,ko as ag,N4 as ah,u as ai,F as aj,qhe as ak,br as al,Zhe as am,HT as b,Lhe as c,FY as d,Whe as e,kH as f,IH as g,_H as h,Fhe as i,VH as j,UH as k,NT as l,jT as m,Jv as n,fd as o,SR as p,$he as q,WH as r,Hhe as s,jK as t,_he as u,RH as v,zH as w,qu as x,VT as y,Uhe as z}; + `);return b.createElement(_z,{...e,options:{forceBlock:!0,overrides:{code:dB,a:pB,...hB,...(t=e==null?void 0:e.options)==null?void 0:t.overrides},...e==null?void 0:e.options}})},Gfe=(e=>(e.INFO="info",e.NOTES="notes",e.DOCGEN="docgen",e.AUTO="auto",e))(Gfe||{}),Kfe=e=>{var t,r,n,a,o,i,l,s;switch(e.type){case"story":return((r=(t=e.story.parameters.docs)==null?void 0:t.description)==null?void 0:r.story)||null;case"meta":{let{parameters:d,component:p}=e.preparedMeta;return((a=(n=d.docs)==null?void 0:n.description)==null?void 0:a.component)||((i=(o=d.docs)==null?void 0:o.extractComponentDescription)==null?void 0:i.call(o,p,{component:p,parameters:d}))||null}case"component":{let{component:d,projectAnnotations:{parameters:p}}=e;return((s=(l=p.docs)==null?void 0:l.extractComponentDescription)==null?void 0:s.call(l,d,{component:d,parameters:p}))||null}default:throw new Error(`Unrecognized module type resolved from 'useOf', got: ${e.type}`)}},A5=e=>{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=Fo(t||"meta"),n=Kfe(r);return n?b.createElement(qfe,null,n):null},BC=HB(Qde()),Yfe=F.div(({theme:e})=>({width:"10rem","@media (max-width: 768px)":{display:"none"}})),Zfe=F.div(({theme:e})=>({position:"fixed",bottom:0,top:0,width:"10rem",paddingTop:"4rem",paddingBottom:"2rem",overflowY:"auto",fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch","& *":{boxSizing:"border-box"},"& > .toc-wrapper > .toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`}}},"& .toc-list-item":{position:"relative",listStyleType:"none",marginLeft:20,paddingTop:3,paddingBottom:3},"& .toc-list-item::before":{content:'""',position:"absolute",height:"100%",top:0,left:0,transform:"translateX(calc(-2px - 20px))",borderLeft:`solid 2px ${e.color.mediumdark}`,opacity:0,transition:"opacity 0.2s"},"& .toc-list-item.is-active-li::before":{opacity:1},"& .toc-list-item > a":{color:e.color.defaultText,textDecoration:"none"},"& .toc-list-item.is-active-li > a":{fontWeight:600,color:e.color.secondary,textDecoration:"none"}})),Xfe=F.p(({theme:e})=>({fontWeight:600,fontSize:"0.875em",color:e.textColor,textTransform:"uppercase",marginBottom:10})),Jfe=({title:e})=>e===null?null:typeof e=="string"?b.createElement(Xfe,null,e):e,Qfe=({title:e,disable:t,headingSelector:r,contentsSelector:n,ignoreSelector:a,unsafeTocbotOptions:o})=>(u.useEffect(()=>{let i={tocSelector:".toc-wrapper",contentSelector:n??".sbdocs-content",headingSelector:r??"h3",ignoreSelector:a??".docs-story *, .skip-toc",headingsOffset:40,scrollSmoothOffset:-40,orderedList:!1,onClick:()=>!1,...o},l=setTimeout(()=>BC.init(i),100);return()=>{clearTimeout(l),BC.destroy()}},[t]),b.createElement(b.Fragment,null,b.createElement(Yfe,null,t?null:b.createElement(Zfe,null,b.createElement(Jfe,{title:e||null}),b.createElement("div",{className:"toc-wrapper"}))))),{document:ehe,window:the}=Vt,rhe=({context:e,theme:t,children:r})=>{var a,o,i,l,s;let n;try{n=(o=(a=e.resolveOf("meta",["meta"]).preparedMeta.parameters)==null?void 0:a.docs)==null?void 0:o.toc}catch{n=(s=(l=(i=e==null?void 0:e.projectAnnotations)==null?void 0:i.parameters)==null?void 0:l.docs)==null?void 0:s.toc}return u.useEffect(()=>{let d;try{if(d=new URL(the.parent.location.toString()),d.hash){let p=ehe.getElementById(decodeURIComponent(d.hash.substring(1)));p&&setTimeout(()=>{kfe(p)},200)}}catch{}}),b.createElement(nn.Provider,{value:e},b.createElement(_fe,{channel:e.channel},b.createElement(b9,{theme:LO(t)},b.createElement(s1e,{toc:n?b.createElement(Qfe,{className:"sbdocs sbdocs-toc--custom",...n}):null},r))))},nhe=({children:e,disableAnchor:t})=>{if(t||typeof e!="string")return b.createElement(VT,null,e);let r=globalThis.encodeURIComponent(e.toLowerCase());return b.createElement(a3,{as:"h3",id:r},e)},mB=({of:e,expanded:t=!0,withToolbar:r=!1,__forceInitialArgs:n=!1,__primary:a=!1})=>{var l,s;let{story:o}=Fo(e||"story",["story"]),i=((s=(l=o.parameters.docs)==null?void 0:l.canvas)==null?void 0:s.withToolbar)??r;return b.createElement(Cfe,{storyId:o.id},t&&b.createElement(b.Fragment,null,b.createElement(nhe,null,o.name),b.createElement(A5,{of:e})),b.createElement(Lfe,{of:e,withToolbar:i,story:{__forceInitialArgs:n,__primary:a},source:{__forceInitialArgs:n}}))},ahe=e=>{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{csfFile:r}=Fo(t||"meta",["meta"]),n=u.useContext(nn).componentStoriesFromCSFFile(r)[0];return n?b.createElement(mB,{of:n.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null},ohe=({children:e,disableAnchor:t,...r})=>{if(t||typeof e!="string")return b.createElement(HT,null,e);let n=e.toLowerCase().replace(/[^a-z0-9]/gi,"-");return b.createElement(a3,{as:"h2",id:n,...r},e)},ihe=F(ohe)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,fontWeight:e.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:e.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}})),lhe=({title:e="Stories",includePrimary:t=!0})=>{var l;let{componentStories:r,projectAnnotations:n,getStoryContext:a}=u.useContext(nn),o=r(),{stories:{filter:i}={filter:void 0}}=((l=n.parameters)==null?void 0:l.docs)||{};return i&&(o=o.filter(s=>i(s,a(s)))),o.some(s=>{var d;return(d=s.tags)==null?void 0:d.includes("autodocs")})&&(o=o.filter(s=>{var d;return((d=s.tags)==null?void 0:d.includes("autodocs"))&&!s.usesMount})),t||(o=o.slice(1)),!o||o.length===0?null:b.createElement(b.Fragment,null,b.createElement(ihe,null,e),o.map(s=>s&&b.createElement(mB,{key:s.id,of:s.moduleExport,expanded:!0,__forceInitialArgs:!0})))},she="https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#subtitle-block-and-parameterscomponentsubtitle",uhe=e=>{let{of:t,children:r}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let n;try{n=Fo(t||"meta",["meta"]).preparedMeta}catch(l){if(r&&!l.message.includes("did you forget to use ?"))throw l}let{componentSubtitle:a,docs:o}=(n==null?void 0:n.parameters)||{};a&&Vde(`Using 'parameters.componentSubtitle' property to subtitle stories is deprecated. See ${she}`);let i=r||(o==null?void 0:o.subtitle)||a;return i?b.createElement(o1e,{className:"sbdocs-subtitle sb-unstyled"},i):null},che=/\s*\/\s*/,dhe=e=>{let t=e.trim().split(che);return(t==null?void 0:t[(t==null?void 0:t.length)-1])||e},phe=e=>{let{children:t,of:r}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let n;try{n=Fo(r||"meta",["meta"]).preparedMeta}catch(o){if(t&&!o.message.includes("did you forget to use ?"))throw o}let a=t||dhe(n==null?void 0:n.title);return a?b.createElement(a1e,{className:"sbdocs-title sb-unstyled"},a):null},fhe=()=>{let e=Fo("meta",["meta"]),{stories:t}=e.csfFile,r=Object.keys(t).length===1;return b.createElement(b.Fragment,null,b.createElement(phe,null),b.createElement(uhe,null),b.createElement(A5,{of:"meta"}),r?b.createElement(A5,{of:"story"}):null,b.createElement(ahe,null),b.createElement(jfe,null),r?null:b.createElement(lhe,null))};function hhe({context:e,docsParameter:t}){let r=t.container||rhe,n=t.page||fhe;return b.createElement(r,{context:e,theme:t.theme},b.createElement(n,null))}var gB,LC=sl;gB=LC.createRoot,LC.hydrateRoot;var Zd=new Map;function mhe(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var ghe=({callback:e,children:t})=>{let r=u.useRef();return u.useLayoutEffect(()=>{r.current!==e&&(r.current=e,e())},[e]),t};typeof Promise.withResolvers>"u"&&(Promise.withResolvers=()=>{let e=null,t=null;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}});var vhe=async(e,t,r)=>{let n=await whe(t,r);if(mhe()){n.render(e);return}let{promise:a,resolve:o}=Promise.withResolvers();return n.render(u.createElement(ghe,{callback:o},e)),a},yhe=(e,t)=>{let r=Zd.get(e);r&&(r.unmount(),Zd.delete(e))},whe=async(e,t)=>{let r=Zd.get(e);return r||(r=gB(e,t),Zd.set(e,r)),r},vB={code:dB,a:pB,...hB},bhe=class extends u.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:t}=this.props;t(e)}render(){let{hasError:e}=this.state,{children:t}=this.props;return e?null:b.createElement(b.Fragment,null,t)}},Ehe=class{constructor(){this.render=async(e,t,r)=>{let n={...vB,...t==null?void 0:t.components},a=hhe;return new Promise((o,i)=>{F5(async()=>{const{MDXProvider:l}=await import("./index-BWZZ6CIZ.js");return{MDXProvider:l}},__vite__mapDeps([5,1,2,3]),import.meta.url).then(({MDXProvider:l})=>vhe(b.createElement(bhe,{showException:i,key:Math.random()},b.createElement(l,{components:n},b.createElement(a,{context:e,docsParameter:t}))),r)).then(()=>o())})},this.unmount=e=>{yhe(e)}}};const Zhe=Object.freeze(Object.defineProperty({__proto__:null,DocsRenderer:Ehe,defaultComponents:vB},Symbol.toStringTag,{value:"Module"}));export{khe as $,HH as A,So as B,OH as C,BH as D,MH as E,Nhe as F,uZ as G,Vhe as H,bR as I,v4 as J,qH as K,vR as L,CR as M,up as N,_i as O,The as P,Ohe as Q,NH as R,PH as S,to as T,GH as U,DR as V,YY as W,_4 as X,IY as Y,zhe as Z,jhe as _,LH as a,Bhe as a0,YH as a1,Rhe as a2,fY as a3,RK as a4,xa as a5,pZ as a6,Pg as a7,cZ as a8,u5 as a9,Phe as aa,ye as ab,fZ as ac,Ce as ad,b as ae,rn as af,ko as ag,N4 as ah,u as ai,F as aj,qhe as ak,br as al,Zhe as am,HT as b,Lhe as c,FY as d,Whe as e,kH as f,IH as g,_H as h,Fhe as i,VH as j,UH as k,NT as l,jT as m,Jv as n,fd as o,SR as p,$he as q,WH as r,Hhe as s,jK as t,_he as u,RH as v,zH as w,qu as x,VT as y,Uhe as z}; diff --git a/assets/FieldGroup.stories-CUZJjSe-.js b/assets/FieldGroup.stories-BXAwvtFB.js similarity index 97% rename from assets/FieldGroup.stories-CUZJjSe-.js rename to assets/FieldGroup.stories-BXAwvtFB.js index 8ece179..da912ef 100644 --- a/assets/FieldGroup.stories-CUZJjSe-.js +++ b/assets/FieldGroup.stories-BXAwvtFB.js @@ -1,4 +1,4 @@ -import{d as h,o as r,f as a,k as n,B as _,C as s,x as o,p as v,g as u,m as y}from"./vue.esm-bundler-DZRSKMuI.js";import{_ as q}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{T as F}from"./TextInput-BhSySzpX.js";const b=h({inheritAttrs:!1,props:{label:{type:String,default:""},subLabel:{type:String,default:""},errorMessage:{type:String,default:""},required:{type:Boolean,default:null}}}),L={key:0,class:"label-line"},M={class:"label"},k={key:0},G={class:"field-wrap"},S={key:1,class:"error-message"},V={class:"note"};function $(e,B,C,N,I,T){return r(),a("div",y(e.$attrs,{class:"field-group"}),[e.label?(r(),a("div",L,[n("p",M,[_(s(e.label),1),e.subLabel?(r(),a("small",k,s(e.subLabel),1)):o("",!0)]),e.required!==null?(r(),a("p",{key:0,class:v(["required-badge",{"is-required":e.required}])},s(e.required?"必須":"任意"),3)):o("",!0)])):o("",!0),n("div",G,[u(e.$slots,"default",{},void 0,!0)]),e.errorMessage?(r(),a("p",S,s(e.errorMessage),1)):o("",!0),n("div",V,[u(e.$slots,"note",{},void 0,!0)])],16)}const d=q(b,[["render",$],["__scopeId","data-v-3b2fbddf"]]);b.__docgenInfo={exportName:"default",displayName:"FieldGroup",description:"",tags:{},props:[{name:"label",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"subLabel",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"errorMessage",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"required",type:{name:"boolean | null"},defaultValue:{func:!1,value:"null"}}],slots:[{name:"default"},{name:"note"}],sourceFiles:["/home/runner/work/lapras-frontend/lapras-frontend/src/components/FieldGroup/FieldGroup.vue"]};const w={title:"FieldGroup",component:d,render:e=>({components:{FieldGroup:d,TextInput:F},setup(){return{args:e}},template:` +import{d as h,o as r,f as a,k as n,B as _,C as s,x as o,p as v,g as u,m as y}from"./vue.esm-bundler-DZRSKMuI.js";import{_ as q}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{T as F}from"./TextInput-DouKHoE0.js";const b=h({inheritAttrs:!1,props:{label:{type:String,default:""},subLabel:{type:String,default:""},errorMessage:{type:String,default:""},required:{type:Boolean,default:null}}}),L={key:0,class:"label-line"},M={class:"label"},k={key:0},G={class:"field-wrap"},S={key:1,class:"error-message"},V={class:"note"};function $(e,B,C,N,I,T){return r(),a("div",y(e.$attrs,{class:"field-group"}),[e.label?(r(),a("div",L,[n("p",M,[_(s(e.label),1),e.subLabel?(r(),a("small",k,s(e.subLabel),1)):o("",!0)]),e.required!==null?(r(),a("p",{key:0,class:v(["required-badge",{"is-required":e.required}])},s(e.required?"必須":"任意"),3)):o("",!0)])):o("",!0),n("div",G,[u(e.$slots,"default",{},void 0,!0)]),e.errorMessage?(r(),a("p",S,s(e.errorMessage),1)):o("",!0),n("div",V,[u(e.$slots,"note",{},void 0,!0)])],16)}const d=q(b,[["render",$],["__scopeId","data-v-3b2fbddf"]]);b.__docgenInfo={exportName:"default",displayName:"FieldGroup",description:"",tags:{},props:[{name:"label",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"subLabel",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"errorMessage",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"required",type:{name:"boolean | null"},defaultValue:{func:!1,value:"null"}}],slots:[{name:"default"},{name:"note"}],sourceFiles:["/home/runner/work/lapras-frontend/lapras-frontend/src/components/FieldGroup/FieldGroup.vue"]};const w={title:"FieldGroup",component:d,render:e=>({components:{FieldGroup:d,TextInput:F},setup(){return{args:e}},template:` {n.value&&e.autoExpand&&(n.value.style.height="",n.value.style.height=`${Math.max(n.value.scrollHeight,e.baseTextareaHeight)}px`)},u=t=>{a.emit("update:modelValue",t.target.value)},{modelValue:o}=d(e);return v(o,async()=>{await y(),l()},{immediate:!0}),{textarea:n,onInput:u}}}),I=["value"],g=["value"];function V(e,a,n,l,u,o){return e.multiline?(s(),r("textarea",p({key:0},e.$attrs,{value:e.modelValue,class:["text-input is-multi-line",{"has-error":e.error}],onInput:a[0]||(a[0]=(...t)=>e.onInput&&e.onInput(...t)),onFocus:a[1]||(a[1]=t=>e.$emit("focus")),onBlur:a[2]||(a[2]=t=>e.$emit("blur")),ref:"textarea"}),null,16,I)):(s(),r("input",p({key:1},e.$attrs,{value:e.modelValue,class:["text-input is-single-line",{"has-error":e.error}],type:"text",onInput:a[3]||(a[3]=(...t)=>e.onInput&&e.onInput(...t)),onFocus:a[4]||(a[4]=t=>e.$emit("focus")),onBlur:a[5]||(a[5]=t=>e.$emit("blur"))}),null,16,g))}const T=$(f,[["render",V],["__scopeId","data-v-2edfa012"]]);f.__docgenInfo={exportName:"default",displayName:"TextInput",description:"",tags:{},props:[{name:"multiline",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"modelValue",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"error",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"autoExpand",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"baseTextareaHeight",type:{name:"number"},defaultValue:{func:!1,value:"56"}}],events:[{name:"focus"},{name:"blur"},{name:"update:modelValue"}],sourceFiles:["/home/runner/work/lapras-frontend/lapras-frontend/src/components/TextInput/TextInput.vue"]};export{T}; +import{d as m,r as f,t as d,w as v,n as y,o as s,f as r,m as p}from"./vue.esm-bundler-DZRSKMuI.js";import{_ as $}from"./_plugin-vue_export-helper-DlAUqK2U.js";const i=m({inheritAttrs:!1,props:{multiline:{type:Boolean,default:!1},modelValue:{type:String,default:""},error:{type:Boolean,default:!1},autoExpand:{type:Boolean,default:!1},baseTextareaHeight:{type:Number,default:56}},emits:{"update:modelValue":null,blur:null,focus:null},setup(e,a){const n=f(null),l=()=>{n.value&&e.autoExpand&&(n.value.style.height="",n.value.style.height=`${Math.max(n.value.scrollHeight,e.baseTextareaHeight)}px`)},u=t=>{a.emit("update:modelValue",t.target.value)},{modelValue:o}=d(e);return v(o,async()=>{await y(),l()},{immediate:!0}),{textarea:n,onInput:u}}}),I=["value"],g=["value"];function V(e,a,n,l,u,o){return e.multiline?(s(),r("textarea",p({key:0},e.$attrs,{value:e.modelValue,class:["text-input is-multi-line",{"has-error":e.error}],onInput:a[0]||(a[0]=(...t)=>e.onInput&&e.onInput(...t)),onFocus:a[1]||(a[1]=t=>e.$emit("focus")),onBlur:a[2]||(a[2]=t=>e.$emit("blur")),ref:"textarea"}),null,16,I)):(s(),r("input",p({key:1},e.$attrs,{value:e.modelValue,class:["text-input is-single-line",{"has-error":e.error}],type:"text",onInput:a[3]||(a[3]=(...t)=>e.onInput&&e.onInput(...t)),onFocus:a[4]||(a[4]=t=>e.$emit("focus")),onBlur:a[5]||(a[5]=t=>e.$emit("blur"))}),null,16,g))}const T=$(i,[["render",V],["__scopeId","data-v-2e736260"]]);i.__docgenInfo={exportName:"default",displayName:"TextInput",description:"",tags:{},props:[{name:"multiline",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"modelValue",type:{name:"string"},defaultValue:{func:!1,value:"''"}},{name:"error",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"autoExpand",type:{name:"boolean"},defaultValue:{func:!1,value:"false"}},{name:"baseTextareaHeight",type:{name:"number"},defaultValue:{func:!1,value:"56"}}],events:[{name:"focus"},{name:"blur"},{name:"update:modelValue"}],sourceFiles:["/home/runner/work/lapras-frontend/lapras-frontend/src/components/TextInput/TextInput.vue"]};export{T}; diff --git a/assets/TextInput.stories-D3H4e5_H.js b/assets/TextInput.stories-6vHTKJab.js similarity index 94% rename from assets/TextInput.stories-D3H4e5_H.js rename to assets/TextInput.stories-6vHTKJab.js index f926abb..df9f056 100644 --- a/assets/TextInput.stories-D3H4e5_H.js +++ b/assets/TextInput.stories-6vHTKJab.js @@ -1,4 +1,4 @@ -import{a as p}from"./chunk-D5ZWXAHU-CGElDDNX.js";import{T as r}from"./TextInput-BhSySzpX.js";import{r as d}from"./vue.esm-bundler-DZRSKMuI.js";import"./v4-CQkTLCs1.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const b={title:"TextInput",component:r,args:{multiline:!1,error:!1,disabled:!1,placeholder:"placeholder",autoExpand:!1,baseTextareaHeight:56},render:m=>({components:{TextInput:r},setup(){const i=d(""),c=p("focus");return{args:m,value:i,onFocus:c}},template:` +import{a as p}from"./chunk-D5ZWXAHU-CGElDDNX.js";import{T as r}from"./TextInput-DouKHoE0.js";import{r as d}from"./vue.esm-bundler-DZRSKMuI.js";import"./v4-CQkTLCs1.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";const b={title:"TextInput",component:r,args:{multiline:!1,error:!1,disabled:!1,placeholder:"placeholder",autoExpand:!1,baseTextareaHeight:56},render:m=>({components:{TextInput:r},setup(){const i=d(""),c=p("focus");return{args:m,value:i,onFocus:c}},template:` `})},e={name:"default"},a={name:"multiline",args:{multiline:!0}};var t,o,s;e.parameters={...e.parameters,docs:{...(t=e.parameters)==null?void 0:t.docs,source:{originalSource:`{ name: 'default' diff --git a/assets/iframe-Dl3wkQvm.js b/assets/iframe-CNfe-eQt.js similarity index 93% rename from assets/iframe-Dl3wkQvm.js rename to assets/iframe-CNfe-eQt.js index 270fd96..4bf0003 100644 --- a/assets/iframe-Dl3wkQvm.js +++ b/assets/iframe-CNfe-eQt.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AvatarImg.stories-Bp_5mMir.js","./vue.esm-bundler-DZRSKMuI.js","./_plugin-vue_export-helper-DlAUqK2U.js","./AvatarImg-BRcOwn5W.css","./Card.stories-CC2K0lUC.js","./Card-wewb6al_.css","./CheckBox.stories-DQiiil8i.js","./CheckBox-BNFRL4N3.js","./Icon-DBiXbAZg.js","./Icon-DSqXPB4n.css","./CheckBox-BA30p8-E.css","./ContentLoader.stories-dAKeFHBu.js","./ContentLoader-B5eaifJB.css","./EnhancedIconButton.stories-BfJdnpcs.js","./EnhancedIconButton-DBeKgQ0l.css","./FieldGroup.stories-CUZJjSe-.js","./TextInput-BhSySzpX.js","./TextInput-Ap-tPJ-F.css","./FieldGroup-BNPXruvC.css","./FlatButton.stories-CcjVxTI7.js","./chunk-D5ZWXAHU-CGElDDNX.js","./v4-CQkTLCs1.js","./FlatButton-BazAoTwl.css","./Icon.stories-9MwFVZX9.js","./Modal.stories-zwhuqxtu.js","./Modal-B4pb0ydb.css","./ProtectedLink.stories-CJEAb7wJ.js","./Radio.stories-B8OcPmjZ.js","./Radio-Blc3LauP.css","./RatingBar.stories-CpiKM8e0.js","./RatingBar-mU5_xSxc.css","./SelectBox.stories-Bt0JA9qx.js","./SelectBox-DZbouG8h.css","./ShortModal.stories-rZFAERIt.js","./ShortModal-mPg2BVy7.css","./TagLabel.stories-c2vpiIr4.js","./TagLabel-B7QpHYXj.css","./TextInput.stories-D3H4e5_H.js","./ToggleLabelSet.stories-BjX4nhQC.js","./ToggleSwitch-DF7P5mVW.js","./ToggleSwitch-i9rzcHk5.css","./ToggleLabelSet-CPMpqYbP.css","./ToggleSwitch.stories-ColgYckW.js","./Tooltip.stories-CpC1LUns.js","./Tooltip-DsTtlczU.css","./entry-preview-BV2bVoFB.js","./entry-preview-docs-CPU_phr-.js","./index-i39XpuQg.js","./preview-D0N1Y6iQ.js","./preview-D77C14du.js","./index-DrFu-skq.js","./preview-BWzBA1C2.js"])))=>i.map(i=>d[i]); -import"../sb-preview/runtime.js";(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))a(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function c(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(e){if(e.ep)return;e.ep=!0;const r=c(e);fetch(e.href,r)}})();const R="modulepreload",T=function(o,_){return new URL(o,_).href},d={},t=function(_,c,a){let e=Promise.resolve();if(c&&c.length>0){const r=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),E=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));e=Promise.all(c.map(i=>{if(i=T(i,a),i in d)return;d[i]=!0;const m=i.endsWith(".css"),O=m?'[rel="stylesheet"]':"";if(!!a)for(let l=r.length-1;l>=0;l--){const p=r[l];if(p.href===i&&(!m||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${O}`))return;const n=document.createElement("link");if(n.rel=m?"stylesheet":R,m||(n.as="script",n.crossOrigin=""),n.href=i,E&&n.setAttribute("nonce",E),document.head.appendChild(n),m)return new Promise((l,p)=>{n.addEventListener("load",l),n.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${i}`)))})}))}return e.then(()=>_()).catch(r=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=r,window.dispatchEvent(s),!s.defaultPrevented)throw r})},{createBrowserChannel:L}=__STORYBOOK_MODULE_CHANNELS__,{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,u=L({page:"preview"});f.setChannel(u);window.__STORYBOOK_ADDONS_CHANNEL__=u;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=u);const I={"./src/components/AvatarImg/AvatarImg.stories.ts":async()=>t(()=>import("./AvatarImg.stories-Bp_5mMir.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),"./src/components/Card/Card.stories.ts":async()=>t(()=>import("./Card.stories-CC2K0lUC.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),"./src/components/CheckBox/CheckBox.stories.ts":async()=>t(()=>import("./CheckBox.stories-DQiiil8i.js"),__vite__mapDeps([6,7,1,8,2,9,10]),import.meta.url),"./src/components/ContentLoader/ContentLoader.stories.ts":async()=>t(()=>import("./ContentLoader.stories-dAKeFHBu.js"),__vite__mapDeps([11,1,2,12]),import.meta.url),"./src/components/EnhancedIconButton/EnhancedIconButton.stories.ts":async()=>t(()=>import("./EnhancedIconButton.stories-BfJdnpcs.js"),__vite__mapDeps([13,1,2,8,9,14]),import.meta.url),"./src/components/FieldGroup/FieldGroup.stories.ts":async()=>t(()=>import("./FieldGroup.stories-CUZJjSe-.js"),__vite__mapDeps([15,1,2,16,17,18]),import.meta.url),"./src/components/FlatButton/FlatButton.stories.ts":async()=>t(()=>import("./FlatButton.stories-CcjVxTI7.js"),__vite__mapDeps([19,20,21,1,8,2,9,22]),import.meta.url),"./src/components/Icon/Icon.stories.ts":async()=>t(()=>import("./Icon.stories-9MwFVZX9.js"),__vite__mapDeps([23,8,1,2,9]),import.meta.url),"./src/components/Modal/Modal.stories.ts":async()=>t(()=>import("./Modal.stories-zwhuqxtu.js"),__vite__mapDeps([24,1,8,2,9,25]),import.meta.url),"./src/components/ProtectedLink/ProtectedLink.stories.ts":async()=>t(()=>import("./ProtectedLink.stories-CJEAb7wJ.js"),__vite__mapDeps([26,1,2]),import.meta.url),"./src/components/Radio/Radio.stories.ts":async()=>t(()=>import("./Radio.stories-B8OcPmjZ.js"),__vite__mapDeps([27,1,2,28]),import.meta.url),"./src/components/RatingBar/RatingBar.stories.ts":async()=>t(()=>import("./RatingBar.stories-CpiKM8e0.js"),__vite__mapDeps([29,1,2,30]),import.meta.url),"./src/components/SelectBox/SelectBox.stories.ts":async()=>t(()=>import("./SelectBox.stories-Bt0JA9qx.js"),__vite__mapDeps([31,1,8,2,9,32]),import.meta.url),"./src/components/ShortModal/ShortModal.stories.ts":async()=>t(()=>import("./ShortModal.stories-rZFAERIt.js"),__vite__mapDeps([33,1,8,2,9,34]),import.meta.url),"./src/components/TagLabel/TagLabel.stories.ts":async()=>t(()=>import("./TagLabel.stories-c2vpiIr4.js"),__vite__mapDeps([35,1,2,8,9,36]),import.meta.url),"./src/components/TextInput/TextInput.stories.ts":async()=>t(()=>import("./TextInput.stories-D3H4e5_H.js"),__vite__mapDeps([37,20,21,16,1,2,17]),import.meta.url),"./src/components/ToggleLabelSet/ToggleLabelSet.stories.ts":async()=>t(()=>import("./ToggleLabelSet.stories-BjX4nhQC.js"),__vite__mapDeps([38,1,2,7,8,9,10,39,40,41]),import.meta.url),"./src/components/ToggleSwitch/ToggleSwitch.stories.ts":async()=>t(()=>import("./ToggleSwitch.stories-ColgYckW.js"),__vite__mapDeps([42,39,1,2,40]),import.meta.url),"./src/components/Tooltip/Tooltip.stories.ts":async()=>t(()=>import("./Tooltip.stories-CpC1LUns.js"),__vite__mapDeps([43,1,8,2,9,44]),import.meta.url)};async function P(o){return I[o]()}const{composeConfigs:y,PreviewWeb:v,ClientApi:g}=__STORYBOOK_MODULE_PREVIEW_API__,V=async(o=[])=>{const _=await Promise.all([o.at(0)??t(()=>import("./entry-preview-BV2bVoFB.js"),__vite__mapDeps([45,1]),import.meta.url),o.at(1)??t(()=>import("./entry-preview-docs-CPU_phr-.js"),__vite__mapDeps([46,47,1]),import.meta.url),o.at(2)??t(()=>import("./preview-BQVysAuS.js"),[],import.meta.url),o.at(3)??t(()=>import("./preview-D0N1Y6iQ.js"),__vite__mapDeps([48,21]),import.meta.url),o.at(4)??t(()=>import("./preview-D77C14du.js"),__vite__mapDeps([49,50]),import.meta.url),o.at(5)??t(()=>import("./preview-DFmD0pui.js"),[],import.meta.url),o.at(6)??t(()=>import("./preview-CFgKly6U.js"),[],import.meta.url),o.at(7)??t(()=>import("./preview-BWzBA1C2.js"),__vite__mapDeps([51,50]),import.meta.url),o.at(8)??t(()=>import("./preview-DGUiP6tS.js"),[],import.meta.url),o.at(9)??t(()=>import("./preview-D_-tD24z.js"),[],import.meta.url)]);return y(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new v(P,V);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=["./AvatarImg.stories-Bp_5mMir.js","./vue.esm-bundler-DZRSKMuI.js","./_plugin-vue_export-helper-DlAUqK2U.js","./AvatarImg-BRcOwn5W.css","./Card.stories-CC2K0lUC.js","./Card-wewb6al_.css","./CheckBox.stories-DQiiil8i.js","./CheckBox-BNFRL4N3.js","./Icon-DBiXbAZg.js","./Icon-DSqXPB4n.css","./CheckBox-BA30p8-E.css","./ContentLoader.stories-BWd5lqcY.js","./ContentLoader-xguCP2HR.css","./EnhancedIconButton.stories-BfJdnpcs.js","./EnhancedIconButton-DBeKgQ0l.css","./FieldGroup.stories-BXAwvtFB.js","./TextInput-DouKHoE0.js","./TextInput-C_BNbNCa.css","./FieldGroup-BNPXruvC.css","./FlatButton.stories-CcjVxTI7.js","./chunk-D5ZWXAHU-CGElDDNX.js","./v4-CQkTLCs1.js","./FlatButton-BazAoTwl.css","./Icon.stories-9MwFVZX9.js","./Modal.stories-zwhuqxtu.js","./Modal-B4pb0ydb.css","./ProtectedLink.stories-CJEAb7wJ.js","./Radio.stories-B8OcPmjZ.js","./Radio-Blc3LauP.css","./RatingBar.stories-CpiKM8e0.js","./RatingBar-mU5_xSxc.css","./SelectBox.stories-Bt0JA9qx.js","./SelectBox-DZbouG8h.css","./ShortModal.stories-rZFAERIt.js","./ShortModal-mPg2BVy7.css","./TagLabel.stories-c2vpiIr4.js","./TagLabel-B7QpHYXj.css","./TextInput.stories-6vHTKJab.js","./ToggleLabelSet.stories-BjX4nhQC.js","./ToggleSwitch-DF7P5mVW.js","./ToggleSwitch-i9rzcHk5.css","./ToggleLabelSet-CPMpqYbP.css","./ToggleSwitch.stories-ColgYckW.js","./Tooltip.stories-CpC1LUns.js","./Tooltip-DsTtlczU.css","./entry-preview-BV2bVoFB.js","./entry-preview-docs-CPU_phr-.js","./index-i39XpuQg.js","./preview-D0N1Y6iQ.js","./preview-D77C14du.js","./index-DrFu-skq.js","./preview-BWzBA1C2.js"])))=>i.map(i=>d[i]); +import"../sb-preview/runtime.js";(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))a(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&a(s)}).observe(document,{childList:!0,subtree:!0});function c(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function a(e){if(e.ep)return;e.ep=!0;const r=c(e);fetch(e.href,r)}})();const R="modulepreload",T=function(o,_){return new URL(o,_).href},d={},t=function(_,c,a){let e=Promise.resolve();if(c&&c.length>0){const r=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),E=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));e=Promise.all(c.map(i=>{if(i=T(i,a),i in d)return;d[i]=!0;const m=i.endsWith(".css"),O=m?'[rel="stylesheet"]':"";if(!!a)for(let l=r.length-1;l>=0;l--){const p=r[l];if(p.href===i&&(!m||p.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${O}`))return;const n=document.createElement("link");if(n.rel=m?"stylesheet":R,m||(n.as="script",n.crossOrigin=""),n.href=i,E&&n.setAttribute("nonce",E),document.head.appendChild(n),m)return new Promise((l,p)=>{n.addEventListener("load",l),n.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${i}`)))})}))}return e.then(()=>_()).catch(r=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=r,window.dispatchEvent(s),!s.defaultPrevented)throw r})},{createBrowserChannel:L}=__STORYBOOK_MODULE_CHANNELS__,{addons:f}=__STORYBOOK_MODULE_PREVIEW_API__,u=L({page:"preview"});f.setChannel(u);window.__STORYBOOK_ADDONS_CHANNEL__=u;window.CONFIG_TYPE==="DEVELOPMENT"&&(window.__STORYBOOK_SERVER_CHANNEL__=u);const I={"./src/components/AvatarImg/AvatarImg.stories.ts":async()=>t(()=>import("./AvatarImg.stories-Bp_5mMir.js"),__vite__mapDeps([0,1,2,3]),import.meta.url),"./src/components/Card/Card.stories.ts":async()=>t(()=>import("./Card.stories-CC2K0lUC.js"),__vite__mapDeps([4,1,2,5]),import.meta.url),"./src/components/CheckBox/CheckBox.stories.ts":async()=>t(()=>import("./CheckBox.stories-DQiiil8i.js"),__vite__mapDeps([6,7,1,8,2,9,10]),import.meta.url),"./src/components/ContentLoader/ContentLoader.stories.ts":async()=>t(()=>import("./ContentLoader.stories-BWd5lqcY.js"),__vite__mapDeps([11,1,2,12]),import.meta.url),"./src/components/EnhancedIconButton/EnhancedIconButton.stories.ts":async()=>t(()=>import("./EnhancedIconButton.stories-BfJdnpcs.js"),__vite__mapDeps([13,1,2,8,9,14]),import.meta.url),"./src/components/FieldGroup/FieldGroup.stories.ts":async()=>t(()=>import("./FieldGroup.stories-BXAwvtFB.js"),__vite__mapDeps([15,1,2,16,17,18]),import.meta.url),"./src/components/FlatButton/FlatButton.stories.ts":async()=>t(()=>import("./FlatButton.stories-CcjVxTI7.js"),__vite__mapDeps([19,20,21,1,8,2,9,22]),import.meta.url),"./src/components/Icon/Icon.stories.ts":async()=>t(()=>import("./Icon.stories-9MwFVZX9.js"),__vite__mapDeps([23,8,1,2,9]),import.meta.url),"./src/components/Modal/Modal.stories.ts":async()=>t(()=>import("./Modal.stories-zwhuqxtu.js"),__vite__mapDeps([24,1,8,2,9,25]),import.meta.url),"./src/components/ProtectedLink/ProtectedLink.stories.ts":async()=>t(()=>import("./ProtectedLink.stories-CJEAb7wJ.js"),__vite__mapDeps([26,1,2]),import.meta.url),"./src/components/Radio/Radio.stories.ts":async()=>t(()=>import("./Radio.stories-B8OcPmjZ.js"),__vite__mapDeps([27,1,2,28]),import.meta.url),"./src/components/RatingBar/RatingBar.stories.ts":async()=>t(()=>import("./RatingBar.stories-CpiKM8e0.js"),__vite__mapDeps([29,1,2,30]),import.meta.url),"./src/components/SelectBox/SelectBox.stories.ts":async()=>t(()=>import("./SelectBox.stories-Bt0JA9qx.js"),__vite__mapDeps([31,1,8,2,9,32]),import.meta.url),"./src/components/ShortModal/ShortModal.stories.ts":async()=>t(()=>import("./ShortModal.stories-rZFAERIt.js"),__vite__mapDeps([33,1,8,2,9,34]),import.meta.url),"./src/components/TagLabel/TagLabel.stories.ts":async()=>t(()=>import("./TagLabel.stories-c2vpiIr4.js"),__vite__mapDeps([35,1,2,8,9,36]),import.meta.url),"./src/components/TextInput/TextInput.stories.ts":async()=>t(()=>import("./TextInput.stories-6vHTKJab.js"),__vite__mapDeps([37,20,21,16,1,2,17]),import.meta.url),"./src/components/ToggleLabelSet/ToggleLabelSet.stories.ts":async()=>t(()=>import("./ToggleLabelSet.stories-BjX4nhQC.js"),__vite__mapDeps([38,1,2,7,8,9,10,39,40,41]),import.meta.url),"./src/components/ToggleSwitch/ToggleSwitch.stories.ts":async()=>t(()=>import("./ToggleSwitch.stories-ColgYckW.js"),__vite__mapDeps([42,39,1,2,40]),import.meta.url),"./src/components/Tooltip/Tooltip.stories.ts":async()=>t(()=>import("./Tooltip.stories-CpC1LUns.js"),__vite__mapDeps([43,1,8,2,9,44]),import.meta.url)};async function P(o){return I[o]()}const{composeConfigs:y,PreviewWeb:v,ClientApi:g}=__STORYBOOK_MODULE_PREVIEW_API__,V=async(o=[])=>{const _=await Promise.all([o.at(0)??t(()=>import("./entry-preview-BV2bVoFB.js"),__vite__mapDeps([45,1]),import.meta.url),o.at(1)??t(()=>import("./entry-preview-docs-CPU_phr-.js"),__vite__mapDeps([46,47,1]),import.meta.url),o.at(2)??t(()=>import("./preview-xYhaz5RB.js"),[],import.meta.url),o.at(3)??t(()=>import("./preview-D0N1Y6iQ.js"),__vite__mapDeps([48,21]),import.meta.url),o.at(4)??t(()=>import("./preview-D77C14du.js"),__vite__mapDeps([49,50]),import.meta.url),o.at(5)??t(()=>import("./preview-DFmD0pui.js"),[],import.meta.url),o.at(6)??t(()=>import("./preview-CFgKly6U.js"),[],import.meta.url),o.at(7)??t(()=>import("./preview-BWzBA1C2.js"),__vite__mapDeps([51,50]),import.meta.url),o.at(8)??t(()=>import("./preview-DGUiP6tS.js"),[],import.meta.url),o.at(9)??t(()=>import("./preview-D_-tD24z.js"),[],import.meta.url)]);return y(_)};window.__STORYBOOK_PREVIEW__=window.__STORYBOOK_PREVIEW__||new v(P,V);window.__STORYBOOK_STORY_STORE__=window.__STORYBOOK_STORY_STORE__||window.__STORYBOOK_PREVIEW__.storyStore;export{t as _}; diff --git a/assets/index-C0b3s7xI.js b/assets/index-BWZZ6CIZ.js similarity index 77% rename from assets/index-C0b3s7xI.js rename to assets/index-BWZZ6CIZ.js index 77d543d..dcbad77 100644 --- a/assets/index-C0b3s7xI.js +++ b/assets/index-BWZZ6CIZ.js @@ -1 +1 @@ -import{ae as o}from"./DocsRenderer-CFRXHY34-D3v-BBxt.js";import"./iframe-Dl3wkQvm.js";import"../sb-preview/runtime.js";import"./index-i39XpuQg.js";import"./index-DrFu-skq.js";const e={},c=o.createContext(e);function m(t){const n=o.useContext(c);return o.useMemo(function(){return typeof t=="function"?t(n):{...n,...t}},[n,t])}function s(t){let n;return t.disableParentContext?n=typeof t.components=="function"?t.components(e):t.components||e:n=m(t.components),o.createElement(c.Provider,{value:n},t.children)}export{s as MDXProvider,m as useMDXComponents}; +import{ae as o}from"./DocsRenderer-CFRXHY34-DKLslIoh.js";import"./iframe-CNfe-eQt.js";import"../sb-preview/runtime.js";import"./index-i39XpuQg.js";import"./index-DrFu-skq.js";const e={},c=o.createContext(e);function m(t){const n=o.useContext(c);return o.useMemo(function(){return typeof t=="function"?t(n):{...n,...t}},[n,t])}function s(t){let n;return t.disableParentContext?n=typeof t.components=="function"?t.components(e):t.components||e:n=m(t.components),o.createElement(c.Provider,{value:n},t.children)}export{s as MDXProvider,m as useMDXComponents}; diff --git a/assets/index-CePcXxJC.js b/assets/index-GCK484eF.js similarity index 92% rename from assets/index-CePcXxJC.js rename to assets/index-GCK484eF.js index 70be0e3..ccddf7b 100644 --- a/assets/index-CePcXxJC.js +++ b/assets/index-GCK484eF.js @@ -1 +1 @@ -import{f as n,n as p,F as i,$ as l,L as m,h as c,B as T,e as b,m as d,g as S,v as B,u as L,I as C,t as H,X as u,x as g,w as y,b as I,y as h,D as k,a as P,C as W,E as A,T as F,c as x,_ as D,S as R,R as f,O as v,d as E,G as M,i as N,A as q,j as w,P as O,k as U,l as Z,o as j,p as z,q as G,r as J,z as K,H as Q,s as V,J as X,K as Y,M as _,N as $,Q as aa,U as sa,V as oa,W as ta,Y as ea,Z as ra,a0 as na,a1 as pa,a2 as ia,a3 as la,a4 as ma,a5 as ca,a6 as Ta,a7 as ba,a8 as da,a9 as Sa,aa as Ba,ab as La,ac as Ca,ad as Ha}from"./DocsRenderer-CFRXHY34-D3v-BBxt.js";import"./iframe-Dl3wkQvm.js";import"../sb-preview/runtime.js";import"./index-i39XpuQg.js";import"./index-DrFu-skq.js";export{n as A,p as ActionBar,i as AddonPanel,l as Badge,m as Bar,c as Blockquote,T as Button,b as ClipboardCode,d as Code,S as DL,B as Div,L as DocumentWrapper,C as EmptyTabContent,H as ErrorFormatter,u as FlexBar,g as Form,y as H1,I as H2,h as H3,k as H4,P as H5,W as H6,A as HR,F as IconButton,x as IconButtonSkeleton,D as Icons,R as Img,f as LI,v as Link,E as ListItem,M as Loader,N as Modal,q as OL,w as P,O as Placeholder,U as Pre,Z as ResetWrapper,j as ScrollArea,z as Separator,G as Spaced,J as Span,K as StorybookIcon,Q as StorybookLogo,V as Symbols,X as SyntaxHighlighter,Y as TT,_ as TabBar,$ as TabButton,aa as TabWrapper,sa as Table,oa as Tabs,ta as TabsState,ea as TooltipLinkList,ra as TooltipMessage,na as TooltipNote,pa as UL,ia as WithTooltip,la as WithTooltipPure,ma as Zoom,ca as codeCommon,Ta as components,ba as createCopyToClipboardFunction,da as getStoryHref,Sa as icons,Ba as interleaveSeparators,La as nameSpaceClassNames,Ca as resetComponents,Ha as withReset}; +import{f as n,n as p,F as i,$ as l,L as m,h as c,B as T,e as b,m as d,g as S,v as B,u as L,I as C,t as H,X as u,x as g,w as y,b as I,y as h,D as k,a as P,C as W,E as A,T as F,c as x,_ as D,S as R,R as f,O as v,d as E,G as M,i as N,A as q,j as w,P as O,k as U,l as Z,o as j,p as z,q as G,r as J,z as K,H as Q,s as V,J as X,K as Y,M as _,N as $,Q as aa,U as sa,V as oa,W as ta,Y as ea,Z as ra,a0 as na,a1 as pa,a2 as ia,a3 as la,a4 as ma,a5 as ca,a6 as Ta,a7 as ba,a8 as da,a9 as Sa,aa as Ba,ab as La,ac as Ca,ad as Ha}from"./DocsRenderer-CFRXHY34-DKLslIoh.js";import"./iframe-CNfe-eQt.js";import"../sb-preview/runtime.js";import"./index-i39XpuQg.js";import"./index-DrFu-skq.js";export{n as A,p as ActionBar,i as AddonPanel,l as Badge,m as Bar,c as Blockquote,T as Button,b as ClipboardCode,d as Code,S as DL,B as Div,L as DocumentWrapper,C as EmptyTabContent,H as ErrorFormatter,u as FlexBar,g as Form,y as H1,I as H2,h as H3,k as H4,P as H5,W as H6,A as HR,F as IconButton,x as IconButtonSkeleton,D as Icons,R as Img,f as LI,v as Link,E as ListItem,M as Loader,N as Modal,q as OL,w as P,O as Placeholder,U as Pre,Z as ResetWrapper,j as ScrollArea,z as Separator,G as Spaced,J as Span,K as StorybookIcon,Q as StorybookLogo,V as Symbols,X as SyntaxHighlighter,Y as TT,_ as TabBar,$ as TabButton,aa as TabWrapper,sa as Table,oa as Tabs,ta as TabsState,ea as TooltipLinkList,ra as TooltipMessage,na as TooltipNote,pa as UL,ia as WithTooltip,la as WithTooltipPure,ma as Zoom,ca as codeCommon,Ta as components,ba as createCopyToClipboardFunction,da as getStoryHref,Sa as icons,Ba as interleaveSeparators,La as nameSpaceClassNames,Ca as resetComponents,Ha as withReset}; diff --git a/assets/preview-BQVysAuS.js b/assets/preview-xYhaz5RB.js similarity index 74% rename from assets/preview-BQVysAuS.js rename to assets/preview-xYhaz5RB.js index 2f820ca..50378dc 100644 --- a/assets/preview-BQVysAuS.js +++ b/assets/preview-xYhaz5RB.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-CFRXHY34-D3v-BBxt.js","./iframe-Dl3wkQvm.js","./index-i39XpuQg.js","./index-DrFu-skq.js"])))=>i.map(i=>d[i]); -import{_ as a}from"./iframe-Dl3wkQvm.js";import"../sb-preview/runtime.js";const{global:s}=__STORYBOOK_MODULE_GLOBAL__;var _=Object.entries(s.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),n={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-CFRXHY34-D3v-BBxt.js").then(r=>r.am),__vite__mapDeps([0,1,2,3]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>_[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{n as parameters}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-CFRXHY34-DKLslIoh.js","./iframe-CNfe-eQt.js","./index-i39XpuQg.js","./index-DrFu-skq.js"])))=>i.map(i=>d[i]); +import{_ as a}from"./iframe-CNfe-eQt.js";import"../sb-preview/runtime.js";const{global:s}=__STORYBOOK_MODULE_GLOBAL__;var _=Object.entries(s.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),n={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-CFRXHY34-DKLslIoh.js").then(r=>r.am),__vite__mapDeps([0,1,2,3]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>_[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{n as parameters}; diff --git a/iframe.html b/iframe.html index 88f98f8..3cc9530 100644 --- a/iframe.html +++ b/iframe.html @@ -509,7 +509,7 @@ } - + diff --git a/project.json b/project.json index 18bd64d..c9b8aaa 100644 --- a/project.json +++ b/project.json @@ -1 +1 @@ -{"generatedAt":1729584520905,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"testPackages":{},"packageManager":{"type":"yarn","version":"1.22.22"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/vue3-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/vue3","portableStoriesFileCount":0,"language":"typescript","storybookPackages":{"@storybook/blocks":{"version":"8.3.5"},"@storybook/core":{"version":"8.3.5"},"@storybook/vue3-vite":{"version":"8.3.5"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.3.5"}},"addons":{"@storybook/addon-essentials":{"version":"8.3.5"},"@chromatic-com/storybook":{"version":"1.6.1"},"chromatic":{"version":"11.5.6","versionSpecifier":"^11.5.6"}}} +{"generatedAt":1729828720052,"hasCustomBabel":false,"hasCustomWebpack":false,"hasStaticDirs":false,"hasStorybookEslint":true,"refCount":0,"testPackages":{},"packageManager":{"type":"yarn","version":"1.22.22"},"preview":{"usesGlobals":false},"framework":{"name":"@storybook/vue3-vite","options":{}},"builder":"@storybook/builder-vite","renderer":"@storybook/vue3","portableStoriesFileCount":0,"language":"typescript","storybookPackages":{"@storybook/blocks":{"version":"8.3.5"},"@storybook/core":{"version":"8.3.5"},"@storybook/vue3-vite":{"version":"8.3.5"},"eslint-plugin-storybook":{"version":"0.8.0"},"storybook":{"version":"8.3.5"}},"addons":{"@storybook/addon-essentials":{"version":"8.3.5"},"@chromatic-com/storybook":{"version":"1.6.1"},"chromatic":{"version":"11.5.6","versionSpecifier":"^11.5.6"}}}