@functionalui/functionalui 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.cjs DELETED
@@ -1,3 +0,0 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),y=require("react"),Rn=require("react-dom"),r=require("./types-w9sPn-jR.cjs");function xi(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const He=xi(y);var wn=ot(),z=e=>it(e,wn),Nn=ot();z.write=e=>it(e,Nn);var vt=ot();z.onStart=e=>it(e,vt);var Dn=ot();z.onFrame=e=>it(e,Dn);var jn=ot();z.onFinish=e=>it(e,jn);var je=[];z.setTimeout=(e,t)=>{const n=z.now()+t,s=()=>{const o=je.findIndex(a=>a.cancel==s);~o&&je.splice(o,1),Oe-=~o?1:0},i={time:n,handler:e,cancel:s};return je.splice(rs(n),0,i),Oe+=1,ss(),i};var rs=e=>~(~je.findIndex(t=>t.time>e)||~je.length);z.cancel=e=>{vt.delete(e),Dn.delete(e),jn.delete(e),wn.delete(e),Nn.delete(e)};z.sync=e=>{hn=!0,z.batchedUpdates(e),hn=!1};z.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function s(...i){t=i,z.onStart(n)}return s.handler=e,s.cancel=()=>{vt.delete(n),t=null},s};var Mn=typeof window<"u"?window.requestAnimationFrame:()=>{};z.use=e=>Mn=e;z.now=typeof performance<"u"?()=>performance.now():Date.now;z.batchedUpdates=e=>e();z.catch=console.error;z.frameLoop="always";z.advance=()=>{z.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):os()};var Ce=-1,Oe=0,hn=!1;function it(e,t){hn?(t.delete(e),e(0)):(t.add(e),ss())}function ss(){Ce<0&&(Ce=0,z.frameLoop!=="demand"&&Mn(is))}function Ri(){Ce=-1}function is(){~Ce&&(Mn(is),z.batchedUpdates(os))}function os(){const e=Ce;Ce=z.now();const t=rs(Ce);if(t&&(as(je.splice(0,t),n=>n.handler()),Oe-=t),!Oe){Ri();return}vt.flush(),wn.flush(e?Math.min(64,Ce-e):16.667),Dn.flush(),Nn.flush(),jn.flush()}function ot(){let e=new Set,t=e;return{add(n){Oe+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Oe-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Oe-=t.size,as(t,s=>s(n)&&e.add(s)),Oe+=e.size,t=e)}}}function as(e,t){e.forEach(n=>{try{t(n)}catch(s){z.catch(s)}})}var wi=Object.defineProperty,Ni=(e,t)=>{for(var n in t)wi(e,n,{get:t[n],enumerable:!0})},de={};Ni(de,{assign:()=>ji,colors:()=>Le,createStringInterpolator:()=>kn,skipAnimation:()=>us,to:()=>cs,willAdvance:()=>Fn});function Sn(){}var Di=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),L={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function me(e,t){if(L.arr(e)){if(!L.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var k=(e,t)=>e.forEach(t);function _e(e,t,n){if(L.arr(e)){for(let s=0;s<e.length;s++)t.call(n,e[s],`${s}`);return}for(const s in e)e.hasOwnProperty(s)&&t.call(n,e[s],s)}var ee=e=>L.und(e)?[]:L.arr(e)?e:[e];function $e(e,t){if(e.size){const n=Array.from(e);e.clear(),k(n,t)}}var Ue=(e,...t)=>$e(e,n=>n(...t)),Pn=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),kn,cs,Le=null,us=!1,Fn=Sn,ji=e=>{e.to&&(cs=e.to),e.now&&(z.now=e.now),e.colors!==void 0&&(Le=e.colors),e.skipAnimation!=null&&(us=e.skipAnimation),e.createStringInterpolator&&(kn=e.createStringInterpolator),e.requestAnimationFrame&&z.use(e.requestAnimationFrame),e.batchedUpdates&&(z.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Fn=e.willAdvance),e.frameLoop&&(z.frameLoop=e.frameLoop)},Ze=new Set,ce=[],Gt=[],Tt=0,It={get idle(){return!Ze.size&&!ce.length},start(e){Tt>e.priority?(Ze.add(e),z.onStart(Mi)):(ls(e),z(_n))},advance:_n,sort(e){if(Tt)z.onFrame(()=>It.sort(e));else{const t=ce.indexOf(e);~t&&(ce.splice(t,1),fs(e))}},clear(){ce=[],Ze.clear()}};function Mi(){Ze.forEach(ls),Ze.clear(),z(_n)}function ls(e){ce.includes(e)||fs(e)}function fs(e){ce.splice(Pi(ce,t=>t.priority>e.priority),0,e)}function _n(e){const t=Gt;for(let n=0;n<ce.length;n++){const s=ce[n];Tt=s.priority,s.idle||(Fn(s),s.advance(e),s.idle||t.push(s))}return Tt=0,Gt=ce,Gt.length=0,ce=t,ce.length>0}function Pi(e,t){const n=e.findIndex(t);return n<0?e.length:n}var ki=(e,t,n)=>Math.min(Math.max(n,e),t),Fi={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},fe="[-+]?\\d*\\.?\\d+",yt=fe+"%";function bt(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Bi=new RegExp("rgb"+bt(fe,fe,fe)),zi=new RegExp("rgba"+bt(fe,fe,fe,fe)),Gi=new RegExp("hsl"+bt(fe,yt,yt)),Ui=new RegExp("hsla"+bt(fe,yt,yt,fe)),Hi=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,$i=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Zi=/^#([0-9a-fA-F]{6})$/,Yi=/^#([0-9a-fA-F]{8})$/;function Vi(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Zi.exec(e))?parseInt(t[1]+"ff",16)>>>0:Le&&Le[e]!==void 0?Le[e]:(t=Bi.exec(e))?(we(t[1])<<24|we(t[2])<<16|we(t[3])<<8|255)>>>0:(t=zi.exec(e))?(we(t[1])<<24|we(t[2])<<16|we(t[3])<<8|sr(t[4]))>>>0:(t=Hi.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Yi.exec(e))?parseInt(t[1],16)>>>0:(t=$i.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Gi.exec(e))?(nr(rr(t[1]),ft(t[2]),ft(t[3]))|255)>>>0:(t=Ui.exec(e))?(nr(rr(t[1]),ft(t[2]),ft(t[3]))|sr(t[4]))>>>0:null}function Ut(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function nr(e,t,n){const s=n<.5?n*(1+t):n+t-n*t,i=2*n-s,o=Ut(i,s,e+1/3),a=Ut(i,s,e),l=Ut(i,s,e-1/3);return Math.round(o*255)<<24|Math.round(a*255)<<16|Math.round(l*255)<<8}function we(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function rr(e){return(parseFloat(e)%360+360)%360/360}function sr(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function ft(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function ir(e){let t=Vi(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,s=(t&16711680)>>>16,i=(t&65280)>>>8,o=(t&255)/255;return`rgba(${n}, ${s}, ${i}, ${o})`}var qe=(e,t,n)=>{if(L.fun(e))return e;if(L.arr(e))return qe({range:e,output:t,extrapolate:n});if(L.str(e.output[0]))return kn(e);const s=e,i=s.output,o=s.range||[0,1],a=s.extrapolateLeft||s.extrapolate||"extend",l=s.extrapolateRight||s.extrapolate||"extend",c=s.easing||(u=>u);return u=>{const f=Wi(u,o);return Xi(u,o[f],o[f+1],i[f],i[f+1],c,a,l,s.map)}};function Xi(e,t,n,s,i,o,a,l,c){let u=c?c(e):e;if(u<t){if(a==="identity")return u;a==="clamp"&&(u=t)}if(u>n){if(l==="identity")return u;l==="clamp"&&(u=n)}return s===i?s:t===n?e<=t?s:i:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=o(u),s===-1/0?u=-u:i===1/0?u=u+s:u=u*(i-s)+s,u)}function Wi(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var qi=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const s=n*e,i=t==="end"?Math.floor(s):Math.ceil(s);return ki(0,1,i/e)},At=1.70158,dt=At*1.525,or=At+1,ar=2*Math.PI/3,cr=2*Math.PI/4.5,ht=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Ki={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>or*e*e*e-At*e*e,easeOutBack:e=>1+or*Math.pow(e-1,3)+At*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((dt+1)*2*e-dt)/2:(Math.pow(2*e-2,2)*((dt+1)*(e*2-2)+dt)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*ar),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*ar)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*cr))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*cr)/2+1,easeInBounce:e=>1-ht(1-e),easeOutBounce:ht,easeInOutBounce:e=>e<.5?(1-ht(1-2*e))/2:(1+ht(2*e-1))/2,steps:qi},Ke=Symbol.for("FluidValue.get"),Pe=Symbol.for("FluidValue.observers"),oe=e=>!!(e&&e[Ke]),re=e=>e&&e[Ke]?e[Ke]():e,ur=e=>e[Pe]||null;function Qi(e,t){e.eventObserved?e.eventObserved(t):e(t)}function Qe(e,t){const n=e[Pe];n&&n.forEach(s=>{Qi(s,t)})}var ds=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Ji(this,e)}},Ji=(e,t)=>hs(e,Ke,t);function ke(e,t){if(e[Ke]){let n=e[Pe];n||hs(e,Pe,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Je(e,t){const n=e[Pe];if(n&&n.has(t)){const s=n.size-1;s?n.delete(t):e[Pe]=null,e.observerRemoved&&e.observerRemoved(s,t)}}var hs=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),gt=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,eo=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,lr=new RegExp(`(${gt.source})(%|[a-z]+)`,"i"),to=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,xt=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ss=e=>{const[t,n]=no(e);if(!t||Pn())return e;const s=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(s)return s.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&xt.test(n))return Ss(n);if(n)return n}return e},no=e=>{const t=xt.exec(e);if(!t)return[,];const[,n,s]=t;return[n,s]},Ht,ro=(e,t,n,s,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(s)}, ${i})`,_s=e=>{Ht||(Ht=Le?new RegExp(`(${Object.keys(Le).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(o=>re(o).replace(xt,Ss).replace(eo,ir).replace(Ht,ir)),n=t.map(o=>o.match(gt).map(Number)),i=n[0].map((o,a)=>n.map(l=>{if(!(a in l))throw Error('The arity of each "output" value must be equal');return l[a]})).map(o=>qe({...e,output:o}));return o=>{var c;const a=!lr.test(t[0])&&((c=t.find(u=>lr.test(u)))==null?void 0:c.replace(gt,""));let l=0;return t[0].replace(gt,()=>`${i[l++](o)}${a||""}`).replace(to,ro)}},Bn="react-spring: ",ps=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Bn}once requires a function parameter`);return(...s)=>{n||(t(...s),n=!0)}},so=ps(console.warn);function io(){so(`${Bn}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var oo=ps(console.warn);function ao(){oo(`${Bn}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Rt(e){return L.str(e)&&(e[0]=="#"||/\d/.test(e)||!Pn()&&xt.test(e)||e in(Le||{}))}var Ie=Pn()?y.useEffect:y.useLayoutEffect,co=()=>{const e=y.useRef(!1);return Ie(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function zn(){const e=y.useState()[1],t=co();return()=>{t.current&&e(Math.random())}}var Gn=e=>y.useEffect(e,uo),uo=[];function pn(e){const t=y.useRef(void 0);return y.useEffect(()=>{t.current=e}),t.current}var et=Symbol.for("Animated:node"),lo=e=>!!e&&e[et]===e,Se=e=>e&&e[et],Un=(e,t)=>Di(e,et,t),wt=e=>e&&e[et]&&e[et].getPayload(),gs=class{constructor(){Un(this,this)}getPayload(){return this.payload||[]}},Nt=class ms extends gs{constructor(t){super(),this._value=t,this.done=!0,this.durationProgress=0,L.num(this._value)&&(this.lastPosition=this._value)}static create(t){return new ms(t)}getPayload(){return[this]}getValue(){return this._value}setValue(t,n){return L.num(t)&&(this.lastPosition=t,n&&(t=Math.round(t/n)*n,this.done&&(this.lastPosition=t))),this._value===t?!1:(this._value=t,!0)}reset(){const{done:t}=this;this.done=!1,L.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,t&&(this.lastVelocity=null),this.v0=null)}},Ct=class Es extends Nt{constructor(t){super(0),this._string=null,this._toString=qe({output:[t,t]})}static create(t){return new Es(t)}getValue(){const t=this._string;return t??(this._string=this._toString(this._value))}setValue(t){if(L.str(t)){if(t==this._string)return!1;this._string=t,this._value=1}else if(super.setValue(t))this._string=null;else return!1;return!0}reset(t){t&&(this._toString=qe({output:[this.getValue(),t]})),this._value=0,super.reset()}},Ot={dependencies:null},Dt=class extends gs{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return _e(this.source,(n,s)=>{lo(n)?t[s]=n.getValue(e):oe(n)?t[s]=re(n):e||(t[s]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&k(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return _e(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ot.dependencies&&oe(e)&&Ot.dependencies.add(e);const t=wt(e);t&&k(t,n=>this.add(n))}},fo=class Ts extends Dt{constructor(t){super(t)}static create(t){return new Ts(t)}getValue(){return this.source.map(t=>t.getValue())}setValue(t){const n=this.getPayload();return t.length==n.length?n.map((s,i)=>s.setValue(t[i])).some(Boolean):(super.setValue(t.map(ho)),!0)}};function ho(e){return(Rt(e)?Ct:Nt).create(e)}function gn(e){const t=Se(e);return t?t.constructor:L.arr(e)?fo:Rt(e)?Ct:Nt}var fr=(e,t)=>{const n=!L.fun(e)||e.prototype&&e.prototype.isReactComponent;return y.forwardRef((s,i)=>{const o=y.useRef(null),a=n&&y.useCallback(g=>{o.current=po(i,g)},[i]),[l,c]=_o(s,t),u=zn(),f=()=>{const g=o.current;if(n&&!g)return;(g?t.applyAnimatedValues(g,l.getValue(!0)):!1)===!1&&u()},S=new So(f,c),d=y.useRef(void 0);Ie(()=>(d.current=S,k(c,g=>ke(g,S)),()=>{d.current&&(k(d.current.deps,g=>Je(g,d.current)),z.cancel(d.current.update))})),y.useEffect(f,[]),Gn(()=>()=>{const g=d.current;k(g.deps,m=>Je(m,g))});const _=t.getComponentProps(l.getValue());return He.createElement(e,{..._,ref:a})})},So=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&z.write(this.update)}};function _o(e,t){const n=new Set;return Ot.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Dt(e),Ot.dependencies=null,[e,n]}function po(e,t){return e&&(L.fun(e)?e(t):e.current=t),t}var dr=Symbol.for("AnimatedComponent"),go=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Dt(i),getComponentProps:s=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:s},o=a=>{const l=hr(a)||"Anonymous";return L.str(a)?a=o[a]||(o[a]=fr(a,i)):a=a[dr]||(a[dr]=fr(a,i)),a.displayName=`Animated(${l})`,a};return _e(e,(a,l)=>{L.arr(e)&&(l=hr(a)),o[l]=o(a)}),{animated:o}},hr=e=>L.str(e)?e:e&&L.str(e.displayName)?e.displayName:L.fun(e)&&e.name||null;function se(e,...t){return L.fun(e)?e(...t):e}var Ye=(e,t)=>e===!0||!!(t&&e&&(L.fun(e)?e(t):ee(e).includes(t))),ys=(e,t)=>L.obj(e)?t&&e[t]:e,As=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,mo=e=>e,jt=(e,t=mo)=>{let n=Eo;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const s={};for(const i of n){const o=t(e[i],i);L.und(o)||(s[i]=o)}return s},Eo=["config","onProps","onStart","onChange","onPause","onResume","onRest"],To={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function yo(e){const t={};let n=0;if(_e(e,(s,i)=>{To[i]||(t[i]=s,n++)}),n)return t}function Hn(e){const t=yo(e);if(t){const n={to:t};return _e(e,(s,i)=>i in t||(n[i]=s)),n}return{...e}}function tt(e){return e=re(e),L.arr(e)?e.map(tt):Rt(e)?de.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Cs(e){for(const t in e)return!0;return!1}function mn(e){return L.fun(e)||L.arr(e)&&L.obj(e[0])}function En(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Os(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var $n={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Tn={...$n.default,mass:1,damping:1,easing:Ki.linear,clamp:!1},Ao=class{constructor(){this.velocity=0,Object.assign(this,Tn)}};function Co(e,t,n){n&&(n={...n},Sr(n,t),t={...n,...t}),Sr(e,t),Object.assign(e,t);for(const a in Tn)e[a]==null&&(e[a]=Tn[a]);let{frequency:s,damping:i}=e;const{mass:o}=e;return L.und(s)||(s<.01&&(s=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/s,2)*o,e.friction=4*Math.PI*i*o/s),e}function Sr(e,t){if(!L.und(t.decay))e.duration=void 0;else{const n=!L.und(t.tension)||!L.und(t.friction);(n||!L.und(t.frequency)||!L.und(t.damping)||!L.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var _r=[],Oo=class{constructor(){this.changed=!1,this.values=_r,this.toValues=null,this.fromValues=_r,this.config=new Ao,this.immediate=!1}};function Ls(e,{key:t,props:n,defaultProps:s,state:i,actions:o}){return new Promise((a,l)=>{let c,u,f=Ye(n.cancel??(s==null?void 0:s.cancel),t);if(f)_();else{L.und(n.pause)||(i.paused=Ye(n.pause,t));let g=s==null?void 0:s.pause;g!==!0&&(g=i.paused||Ye(g,t)),c=se(n.delay||0,t),g?(i.resumeQueue.add(d),o.pause()):(o.resume(),d())}function S(){i.resumeQueue.add(d),i.timeouts.delete(u),u.cancel(),c=u.time-z.now()}function d(){c>0&&!de.skipAnimation?(i.delayed=!0,u=z.setTimeout(_,c),i.pauseQueue.add(S),i.timeouts.add(u)):_()}function _(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(S),i.timeouts.delete(u),e<=(i.cancelId||0)&&(f=!0);try{o.start({...n,callId:e,cancel:f},a)}catch(g){l(g)}}})}var Zn=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Me(e.get()):t.every(n=>n.noop)?vs(e.get()):le(e.get(),t.every(n=>n.finished)),vs=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),le=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Me=e=>({value:e,cancelled:!0,finished:!1});function Is(e,t,n,s){const{callId:i,parentId:o,onRest:a}=t,{asyncTo:l,promise:c}=n;return!o&&e===l&&!t.reset?c:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const u=jt(t,(E,T)=>T==="onRest"?void 0:E);let f,S;const d=new Promise((E,T)=>(f=E,S=T)),_=E=>{const T=i<=(n.cancelId||0)&&Me(s)||i!==n.asyncId&&le(s,!1);if(T)throw E.result=T,S(E),E},g=(E,T)=>{const A=new pr,C=new gr;return(async()=>{if(de.skipAnimation)throw nt(n),C.result=le(s,!1),S(C),C;_(A);const v=L.obj(E)?{...E}:{...T,to:E};v.parentId=i,_e(u,(x,N)=>{L.und(v[N])&&(v[N]=x)});const O=await s.start(v);return _(A),n.paused&&await new Promise(x=>{n.resumeQueue.add(x)}),O})()};let m;if(de.skipAnimation)return nt(n),le(s,!1);try{let E;L.arr(e)?E=(async T=>{for(const A of T)await g(A)})(e):E=Promise.resolve(e(g,s.stop.bind(s))),await Promise.all([E.then(f),d]),m=le(s.get(),!0,!1)}catch(E){if(E instanceof pr)m=E.result;else if(E instanceof gr)m=E.result;else throw E}finally{i==n.asyncId&&(n.asyncId=o,n.asyncTo=o?l:void 0,n.promise=o?c:void 0)}return L.fun(a)&&z.batchedUpdates(()=>{a(m,s,s.item)}),m})()}function nt(e,t){$e(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var pr=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},gr=class extends Error{constructor(){super("SkipAnimationSignal")}},yn=e=>e instanceof Yn,Lo=1,Yn=class extends ds{constructor(){super(...arguments),this.id=Lo++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Se(this);return e&&e.getValue()}to(...e){return de.to(this,e)}interpolate(...e){return io(),de.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Qe(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||It.sort(this),Qe(this,{type:"priority",parent:this,priority:e})}},be=Symbol.for("SpringPhase"),bs=1,xs=2,Rs=4,$t=e=>(e[be]&bs)>0,ye=e=>(e[be]&xs)>0,Be=e=>(e[be]&Rs)>0,mr=(e,t)=>t?e[be]|=xs|bs:e[be]&=-3,Er=(e,t)=>t?e[be]|=Rs:e[be]&=-5,vo=class extends Yn{constructor(e,t){if(super(),this.animation=new Oo,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!L.und(e)||!L.und(t)){const n=L.obj(e)?{...e}:{...t,from:e};L.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(ye(this)||this._state.asyncTo)||Be(this)}get goal(){return re(this.animation.to)}get velocity(){const e=Se(this);return e instanceof Nt?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return $t(this)}get isAnimating(){return ye(this)}get isPaused(){return Be(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const s=this.animation;let{toValues:i}=s;const{config:o}=s,a=wt(s.to);!a&&oe(s.to)&&(i=ee(re(s.to))),s.values.forEach((u,f)=>{if(u.done)return;const S=u.constructor==Ct?1:a?a[f].lastPosition:i[f];let d=s.immediate,_=S;if(!d){if(_=u.lastPosition,o.tension<=0){u.done=!0;return}let g=u.elapsedTime+=e;const m=s.fromValues[f],E=u.v0!=null?u.v0:u.v0=L.arr(o.velocity)?o.velocity[f]:o.velocity;let T;const A=o.precision||(m==S?.005:Math.min(1,Math.abs(S-m)*.001));if(L.und(o.duration))if(o.decay){const C=o.decay===!0?.998:o.decay,v=Math.exp(-(1-C)*g);_=m+E/(1-C)*(1-v),d=Math.abs(u.lastPosition-_)<=A,T=E*v}else{T=u.lastVelocity==null?E:u.lastVelocity;const C=o.restVelocity||A/10,v=o.clamp?0:o.bounce,O=!L.und(v),x=m==S?u.v0>0:m<S;let N,M=!1;const R=1,j=Math.ceil(e/R);for(let D=0;D<j&&(N=Math.abs(T)>C,!(!N&&(d=Math.abs(S-_)<=A,d)));++D){O&&(M=_==S||_>S==x,M&&(T=-T*v,_=S));const B=-o.tension*1e-6*(_-S),G=-o.friction*.001*T,b=(B+G)/o.mass;T=T+b*R,_=_+T*R}}else{let C=1;o.duration>0&&(this._memoizedDuration!==o.duration&&(this._memoizedDuration=o.duration,u.durationProgress>0&&(u.elapsedTime=o.duration*u.durationProgress,g=u.elapsedTime+=e)),C=(o.progress||0)+g/this._memoizedDuration,C=C>1?1:C<0?0:C,u.durationProgress=C),_=m+o.easing(C)*(S-m),T=(_-u.lastPosition)/e,d=C==1}u.lastVelocity=T,Number.isNaN(_)&&(console.warn("Got NaN while animating:",this),d=!0)}a&&!a[f].done&&(d=!1),d?u.done=!0:t=!1,u.setValue(_,o.round)&&(n=!0)});const l=Se(this),c=l.getValue();if(t){const u=re(s.to);(c!==u||n)&&!o.decay?(l.setValue(u),this._onChange(u)):n&&o.decay&&this._onChange(c),this._stop()}else n&&this._onChange(c)}set(e){return z.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(ye(this)){const{to:e,config:t}=this.animation;z.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return L.und(e)?(n=this.queue||[],this.queue=[]):n=[L.obj(e)?e:{...t,to:e}],Promise.all(n.map(s=>this._update(s))).then(s=>Zn(this,s))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),nt(this._state,e&&this._lastCallId),z.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:s}=e;n=L.obj(n)?n[t]:n,(n==null||mn(n))&&(n=void 0),s=L.obj(s)?s[t]:s,s==null&&(s=void 0);const i={to:n,from:s};return $t(this)||(e.reverse&&([n,s]=[s,n]),s=re(s),L.und(s)?Se(this)||this._set(n):this._set(s)),i}_update({...e},t){const{key:n,defaultProps:s}=this;e.default&&Object.assign(s,jt(e,(a,l)=>/^on/.test(l)?ys(a,n):a)),yr(this,e,"onProps"),Ge(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const o=this._state;return Ls(++this._lastCallId,{key:n,props:e,defaultProps:s,state:o,actions:{pause:()=>{Be(this)||(Er(this,!0),Ue(o.pauseQueue),Ge(this,"onPause",le(this,ze(this,this.animation.to)),this))},resume:()=>{Be(this)&&(Er(this,!1),ye(this)&&this._resume(),Ue(o.resumeQueue),Ge(this,"onResume",le(this,ze(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(a=>{if(e.loop&&a.finished&&!(t&&a.noop)){const l=ws(e);if(l)return this._update(l,!0)}return a})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Me(this));const s=!L.und(e.to),i=!L.und(e.from);if(s||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Me(this));const{key:o,defaultProps:a,animation:l}=this,{to:c,from:u}=l;let{to:f=c,from:S=u}=e;i&&!s&&(!t.default||L.und(f))&&(f=S),t.reverse&&([f,S]=[S,f]);const d=!me(S,u);d&&(l.from=S),S=re(S);const _=!me(f,c);_&&this._focus(f);const g=mn(t.to),{config:m}=l,{decay:E,velocity:T}=m;(s||i)&&(m.velocity=0),t.config&&!g&&Co(m,se(t.config,o),t.config!==a.config?se(a.config,o):void 0);let A=Se(this);if(!A||L.und(f))return n(le(this,!0));const C=L.und(t.reset)?i&&!t.default:!L.und(S)&&Ye(t.reset,o),v=C?S:this.get(),O=tt(f),x=L.num(O)||L.arr(O)||Rt(O),N=!g&&(!x||Ye(a.immediate||t.immediate,o));if(_){const D=gn(f);if(D!==A.constructor)if(N)A=this._set(O);else throw Error(`Cannot animate between ${A.constructor.name} and ${D.name}, as the "to" prop suggests`)}const M=A.constructor;let R=oe(f),j=!1;if(!R){const D=C||!$t(this)&&d;(_||D)&&(j=me(tt(v),O),R=!j),(!me(l.immediate,N)&&!N||!me(m.decay,E)||!me(m.velocity,T))&&(R=!0)}if(j&&ye(this)&&(l.changed&&!C?R=!0:R||this._stop(c)),!g&&((R||oe(c))&&(l.values=A.getPayload(),l.toValues=oe(f)?null:M==Ct?[1]:ee(O)),l.immediate!=N&&(l.immediate=N,!N&&!C&&this._set(c)),R)){const{onRest:D}=l;k(bo,G=>yr(this,t,G));const B=le(this,ze(this,c));Ue(this._pendingCalls,B),this._pendingCalls.add(n),l.changed&&z.batchedUpdates(()=>{var G;l.changed=!C,D==null||D(B,this),C?se(a.onRest,B):(G=l.onStart)==null||G.call(l,B,this)})}C&&this._set(v),g?n(Is(t.to,t,this._state,this)):R?this._start():ye(this)&&!_?this._pendingCalls.add(n):n(vs(v))}_focus(e){const t=this.animation;e!==t.to&&(ur(this)&&this._detach(),t.to=e,ur(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;oe(t)&&(ke(t,this),yn(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;oe(e)&&Je(e,this)}_set(e,t=!0){const n=re(e);if(!L.und(n)){const s=Se(this);if(!s||!me(n,s.getValue())){const i=gn(n);!s||s.constructor!=i?Un(this,i.create(n)):s.setValue(n),s&&z.batchedUpdates(()=>{this._onChange(n,t)})}}return Se(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ge(this,"onStart",le(this,ze(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),se(this.animation.onChange,e,this)),se(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Se(this).reset(re(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),ye(this)||(mr(this,!0),Be(this)||this._resume())}_resume(){de.skipAnimation?this.finish():It.start(this)}_stop(e,t){if(ye(this)){mr(this,!1);const n=this.animation;k(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Qe(this,{type:"idle",parent:this});const s=t?Me(this.get()):le(this.get(),ze(this,e??n.to));Ue(this._pendingCalls,s),n.changed&&(n.changed=!1,Ge(this,"onRest",s,this))}}};function ze(e,t){const n=tt(t),s=tt(e.get());return me(s,n)}function ws(e,t=e.loop,n=e.to){const s=se(t);if(s){const i=s!==!0&&Hn(s),o=(i||e).reverse,a=!i||i.reset;return rt({...e,loop:t,default:!1,pause:void 0,to:!o||mn(n)?n:void 0,from:a?e.from:void 0,reset:a,...i})}}function rt(e){const{to:t,from:n}=e=Hn(e),s=new Set;return L.obj(t)&&Tr(t,s),L.obj(n)&&Tr(n,s),e.keys=s.size?Array.from(s):null,e}function Io(e){const t=rt(e);return L.und(t.default)&&(t.default=jt(t)),t}function Tr(e,t){_e(e,(n,s)=>n!=null&&t.add(s))}var bo=["onStart","onRest","onChange","onPause","onResume"];function yr(e,t,n){e.animation[n]=t[n]!==As(t,n)?ys(t[n],e.key):void 0}function Ge(e,t,...n){var s,i,o,a;(i=(s=e.animation)[t])==null||i.call(s,...n),(a=(o=e.defaultProps)[t])==null||a.call(o,...n)}var xo=["onStart","onChange","onRest"],Ro=1,Ns=class{constructor(t,n){this.id=Ro++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),n&&(this._flush=n),t&&this.start({default:!0,...t})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(t=>t.idle&&!t.isDelayed&&!t.isPaused)}get item(){return this._item}set item(t){this._item=t}get(){const t={};return this.each((n,s)=>t[s]=n.get()),t}set(t){for(const n in t){const s=t[n];L.und(s)||this.springs[n].set(s)}}update(t){return t&&this.queue.push(rt(t)),this}start(t){let{queue:n}=this;return t?n=ee(t).map(rt):this.queue=[],this._flush?this._flush(this,n):(ks(this,n),An(this,n))}stop(t,n){if(t!==!!t&&(n=t),n){const s=this.springs;k(ee(n),i=>s[i].stop(!!t))}else nt(this._state,this._lastAsyncId),this.each(s=>s.stop(!!t));return this}pause(t){if(L.und(t))this.start({pause:!0});else{const n=this.springs;k(ee(t),s=>n[s].pause())}return this}resume(t){if(L.und(t))this.start({pause:!1});else{const n=this.springs;k(ee(t),s=>n[s].resume())}return this}each(t){_e(this.springs,t)}_onFrame(){const{onStart:t,onChange:n,onRest:s}=this._events,i=this._active.size>0,o=this._changed.size>0;(i&&!this._started||o&&!this._started)&&(this._started=!0,$e(t,([c,u])=>{u.value=this.get(),c(u,this,this._item)}));const a=!i&&this._started,l=o||a&&s.size?this.get():null;o&&n.size&&$e(n,([c,u])=>{u.value=l,c(u,this,this._item)}),a&&(this._started=!1,$e(s,([c,u])=>{u.value=l,c(u,this,this._item)}))}eventObserved(t){if(t.type=="change")this._changed.add(t.parent),t.idle||this._active.add(t.parent);else if(t.type=="idle")this._active.delete(t.parent);else return;z.onFrame(this._onFrame)}};function An(e,t){return Promise.all(t.map(n=>Ds(e,n))).then(n=>Zn(e,n))}async function Ds(e,t,n){const{keys:s,to:i,from:o,loop:a,onRest:l,onResolve:c}=t,u=L.obj(t.default)&&t.default;a&&(t.loop=!1),i===!1&&(t.to=null),o===!1&&(t.from=null);const f=L.arr(i)||L.fun(i)?i:void 0;f?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):k(xo,m=>{const E=t[m];if(L.fun(E)){const T=e._events[m];t[m]=({finished:A,cancelled:C})=>{const v=T.get(E);v?(A||(v.finished=!1),C&&(v.cancelled=!0)):T.set(E,{value:null,finished:A||!1,cancelled:C||!1})},u&&(u[m]=t[m])}});const S=e._state;t.pause===!S.paused?(S.paused=t.pause,Ue(t.pause?S.pauseQueue:S.resumeQueue)):S.paused&&(t.pause=!0);const d=(s||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),_=t.cancel===!0||As(t,"cancel")===!0;(f||_&&S.asyncId)&&d.push(Ls(++e._lastAsyncId,{props:t,state:S,actions:{pause:Sn,resume:Sn,start(m,E){_?(nt(S,e._lastAsyncId),E(Me(e))):(m.onRest=l,E(Is(f,m,S,e)))}}})),S.paused&&await new Promise(m=>{S.resumeQueue.add(m)});const g=Zn(e,await Promise.all(d));if(a&&g.finished&&!(n&&g.noop)){const m=ws(t,a,i);if(m)return ks(e,[m]),Ds(e,m,!0)}return c&&z.batchedUpdates(()=>c(g,e,e.item)),g}function Cn(e,t){const n={...e.springs};return t&&k(ee(t),s=>{L.und(s.keys)&&(s=rt(s)),L.obj(s.to)||(s={...s,to:void 0}),Ps(n,s,i=>Ms(i))}),js(e,n),n}function js(e,t){_e(t,(n,s)=>{e.springs[s]||(e.springs[s]=n,ke(n,e))})}function Ms(e,t){const n=new vo;return n.key=e,t&&ke(n,t),n}function Ps(e,t,n){t.keys&&k(t.keys,s=>{(e[s]||(e[s]=n(s)))._prepareNode(t)})}function ks(e,t){k(t,n=>{Ps(e.springs,n,s=>Ms(s,e))})}var Fs=He.createContext({pause:!1,immediate:!1}),Bs=()=>{const e=[],t=function(s){ao();const i=[];return k(e,(o,a)=>{if(L.und(s))i.push(o.start());else{const l=n(s,o,a);l&&i.push(o.start(l))}}),i};t.current=e,t.add=function(s){e.includes(s)||e.push(s)},t.delete=function(s){const i=e.indexOf(s);~i&&e.splice(i,1)},t.pause=function(){return k(e,s=>s.pause(...arguments)),this},t.resume=function(){return k(e,s=>s.resume(...arguments)),this},t.set=function(s){k(e,(i,o)=>{const a=L.fun(s)?s(o,i):s;a&&i.set(a)})},t.start=function(s){const i=[];return k(e,(o,a)=>{if(L.und(s))i.push(o.start());else{const l=this._getProps(s,o,a);l&&i.push(o.start(l))}}),i},t.stop=function(){return k(e,s=>s.stop(...arguments)),this},t.update=function(s){return k(e,(i,o)=>i.update(this._getProps(s,i,o))),this};const n=function(s,i,o){return L.fun(s)?s(o,i):s};return t._getProps=n,t};function Vn(e,t,n){const s=L.fun(t)&&t;s&&!n&&(n=[]);const i=y.useMemo(()=>s||arguments.length==3?Bs():void 0,[]),o=y.useRef(0),a=zn(),l=y.useMemo(()=>({ctrls:[],queue:[],flush(T,A){const C=Cn(T,A);return o.current>0&&!l.queue.length&&!Object.keys(C).some(O=>!T.springs[O])?An(T,A):new Promise(O=>{js(T,C),l.queue.push(()=>{O(An(T,A))}),a()})}}),[]),c=y.useRef([...l.ctrls]),u=y.useRef([]),f=pn(e)||0;y.useMemo(()=>{k(c.current.slice(e,f),T=>{En(T,i),T.stop(!0)}),c.current.length=e,S(f,e)},[e]),y.useMemo(()=>{S(0,Math.min(f,e))},n);function S(T,A){for(let C=T;C<A;C++){const v=c.current[C]||(c.current[C]=new Ns(null,l.flush)),O=s?s(C,v):t[C];O&&(u.current[C]=Io(O))}}const d=c.current.map((T,A)=>Cn(T,u.current[A])),_=y.useContext(Fs),g=pn(_),m=_!==g&&Cs(_);Ie(()=>{o.current++,l.ctrls=c.current;const{queue:T}=l;T.length&&(l.queue=[],k(T,A=>A())),k(c.current,(A,C)=>{i==null||i.add(A),m&&A.start({default:_});const v=u.current[C];v&&(Os(A,v.ref),A.ref?A.queue.push(v):A.start(v))})}),Gn(()=>()=>{k(l.ctrls,T=>T.stop(!0))});const E=d.map(T=>({...T}));return i?[E,i]:E}function W(e,t){const n=L.fun(e),[[s],i]=Vn(1,n?e:[e],n?[]:t);return n||arguments.length==2?[s,i]:s}function ue(e,t,n){const s=L.fun(t)&&t,{reset:i,sort:o,trail:a=0,expires:l=!0,exitBeforeEnter:c=!1,onDestroyed:u,ref:f,config:S}=s?s():t,d=y.useMemo(()=>s||arguments.length==3?Bs():void 0,[]),_=ee(e),g=[],m=y.useRef(null),E=i?null:m.current;Ie(()=>{m.current=g}),Gn(()=>(k(g,b=>{d==null||d.add(b.ctrl),b.ctrl.ref=d}),()=>{k(m.current,b=>{b.expired&&clearTimeout(b.expirationId),En(b.ctrl,d),b.ctrl.stop(!0)})}));const T=No(_,s?s():t,E),A=i&&m.current||[];Ie(()=>k(A,({ctrl:b,item:w,key:U})=>{En(b,d),se(u,w,U)}));const C=[];if(E&&k(E,(b,w)=>{b.expired?(clearTimeout(b.expirationId),A.push(b)):(w=C[w]=T.indexOf(b.key),~w&&(g[w]=b))}),k(_,(b,w)=>{g[w]||(g[w]={key:T[w],item:b,phase:"mount",ctrl:new Ns},g[w].ctrl.item=b)}),C.length){let b=-1;const{leave:w}=s?s():t;k(C,(U,$)=>{const Z=E[$];~U?(b=g.indexOf(Z),g[b]={...Z,item:_[U]}):w&&g.splice(++b,0,Z)})}L.fun(o)&&g.sort((b,w)=>o(b.item,w.item));let v=-a;const O=zn(),x=jt(t),N=new Map,M=y.useRef(new Map),R=y.useRef(!1);k(g,(b,w)=>{const U=b.key,$=b.phase,Z=s?s():t;let H,p;const Re=se(Z.delay||0,U);if($=="mount")H=Z.enter,p="enter";else{const te=T.indexOf(U)<0;if($!="leave")if(te)H=Z.leave,p="leave";else if(H=Z.update)p="update";else return;else if(!te)H=Z.enter,p="enter";else return}if(H=se(H,b.item,w),H=L.obj(H)?Hn(H):{to:H},!H.config){const te=S||x.config;H.config=se(te,b.item,w,p)}v+=a;const F={...x,delay:Re+v,ref:f,immediate:Z.immediate,reset:!1,...H};if(p=="enter"&&L.und(F.from)){const te=s?s():t,Ee=L.und(te.initial)||E?te.from:te.initial;F.from=se(Ee,b.item,w)}const{onResolve:ut}=F;F.onResolve=te=>{se(ut,te);const Ee=m.current,Te=Ee.find(lt=>lt.key===U);if(Te&&!(te.cancelled&&Te.phase!="update")&&Te.ctrl.idle){const lt=Ee.every(ve=>ve.ctrl.idle);if(Te.phase=="leave"){const ve=se(l,Te.item);if(ve!==!1){const zt=ve===!0?0:ve;if(Te.expired=!0,!lt&&zt>0){zt<=2147483647&&(Te.expirationId=setTimeout(O,zt));return}}}lt&&Ee.some(ve=>ve.expired)&&(M.current.delete(Te),c&&(R.current=!0),O())}};const Fe=Cn(b.ctrl,F);p==="leave"&&c?M.current.set(b,{phase:p,springs:Fe,payload:F}):N.set(b,{phase:p,springs:Fe,payload:F})});const j=y.useContext(Fs),D=pn(j),B=j!==D&&Cs(j);Ie(()=>{B&&k(g,b=>{b.ctrl.start({default:j})})},[j]),k(N,(b,w)=>{if(M.current.size){const U=g.findIndex($=>$.key===w.key);g.splice(U,1)}}),Ie(()=>{k(M.current.size?M.current:N,({phase:b,payload:w},U)=>{const{ctrl:$}=U;U.phase=b,d==null||d.add($),B&&b=="enter"&&$.start({default:j}),w&&(Os($,w.ref),($.ref||d)&&!R.current?$.update(w):($.start(w),R.current&&(R.current=!1)))})},i?void 0:n);const G=b=>He.createElement(He.Fragment,null,g.map((w,U)=>{const{springs:$}=N.get(w)||w.ctrl,Z=b({...$},w.item,w,U);return Z&&Z.type?He.createElement(Z.type,{...Z.props,key:L.str(w.key)||L.num(w.key)?w.key:w.ctrl.id,ref:Z.ref}):Z}));return d?[G,d]:G}var wo=1;function No(e,{key:t,keys:n=t},s){if(n===null){const i=new Set;return e.map(o=>{const a=s&&s.find(l=>l.item===o&&l.phase!=="leave"&&!i.has(l));return a?(i.add(a),a.key):wo++})}return L.und(n)?e:L.fun(n)?e.map(n):ee(n)}var Do=class extends Yn{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=qe(...t);const n=this._get(),s=gn(n);Un(this,s.create(n))}advance(e){const t=this._get(),n=this.get();me(t,n)||(Se(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Ar(this._active)&&Zt(this)}_get(){const e=L.arr(this.source)?this.source.map(re):ee(re(this.source));return this.calc(...e)}_start(){this.idle&&!Ar(this._active)&&(this.idle=!1,k(wt(this),e=>{e.done=!1}),de.skipAnimation?(z.batchedUpdates(()=>this.advance()),Zt(this)):It.start(this))}_attach(){let e=1;k(ee(this.source),t=>{oe(t)&&ke(t,this),yn(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){k(ee(this.source),e=>{oe(e)&&Je(e,this)}),this._active.clear(),Zt(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=ee(this.source).reduce((t,n)=>Math.max(t,(yn(n)?n.priority:0)+1),0))}};function jo(e){return e.idle!==!1}function Ar(e){return!e.size||Array.from(e).every(jo)}function Zt(e){e.idle||(e.idle=!0,k(wt(e),t=>{t.done=!0}),Qe(e,{type:"idle",parent:e}))}de.assign({createStringInterpolator:_s,to:(e,t)=>new Do(e,t)});var zs=/^--/;function Mo(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!zs.test(e)&&!(Ve.hasOwnProperty(e)&&Ve[e])?t+"px":(""+t).trim()}var Cr={};function Po(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:s,style:i,children:o,scrollTop:a,scrollLeft:l,viewBox:c,...u}=t,f=Object.values(u),S=Object.keys(u).map(d=>n||e.hasAttribute(d)?d:Cr[d]||(Cr[d]=d.replace(/([A-Z])/g,_=>"-"+_.toLowerCase())));o!==void 0&&(e.textContent=o);for(const d in i)if(i.hasOwnProperty(d)){const _=Mo(d,i[d]);zs.test(d)?e.style.setProperty(d,_):e.style[d]=_}S.forEach((d,_)=>{e.setAttribute(d,f[_])}),s!==void 0&&(e.className=s),a!==void 0&&(e.scrollTop=a),l!==void 0&&(e.scrollLeft=l),c!==void 0&&e.setAttribute("viewBox",c)}var Ve={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ko=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Fo=["Webkit","Ms","Moz","O"];Ve=Object.keys(Ve).reduce((e,t)=>(Fo.forEach(n=>e[ko(n,t)]=e[t]),e),Ve);var Bo=/^(matrix|translate|scale|rotate|skew)/,zo=/^(translate)/,Go=/^(rotate|skew)/,Yt=(e,t)=>L.num(e)&&e!==0?e+t:e,mt=(e,t)=>L.arr(e)?e.every(n=>mt(n,t)):L.num(e)?e===t:parseFloat(e)===t,Uo=class extends Dt{constructor({x:e,y:t,z:n,...s}){const i=[],o=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),o.push(a=>[`translate3d(${a.map(l=>Yt(l,"px")).join(",")})`,mt(a,0)])),_e(s,(a,l)=>{if(l==="transform")i.push([a||""]),o.push(c=>[c,c===""]);else if(Bo.test(l)){if(delete s[l],L.und(a))return;const c=zo.test(l)?"px":Go.test(l)?"deg":"";i.push(ee(a)),o.push(l==="rotate3d"?([u,f,S,d])=>[`rotate3d(${u},${f},${S},${Yt(d,c)})`,mt(d,0)]:u=>[`${l}(${u.map(f=>Yt(f,c)).join(",")})`,mt(u,l.startsWith("scale")?1:0)])}}),i.length&&(s.transform=new Ho(i,o)),super(s)}},Ho=class extends ds{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return k(this.inputs,(n,s)=>{const i=re(n[0]),[o,a]=this.transforms[s](L.arr(i)?i:n.map(re));e+=" "+o,t=t&&a}),t?"none":e}observerAdded(e){e==1&&k(this.inputs,t=>k(t,n=>oe(n)&&ke(n,this)))}observerRemoved(e){e==0&&k(this.inputs,t=>k(t,n=>oe(n)&&Je(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),Qe(this,e)}},$o=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];de.assign({batchedUpdates:Rn.unstable_batchedUpdates,createStringInterpolator:_s,colors:Fi});var Zo=go($o,{applyAnimatedValues:Po,createAnimatedStyle:e=>new Uo(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),P=Zo.animated;const I=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:g,borderTopRightRadius:m,borderStyle:E,borderLeftStyle:T,borderRightStyle:A,borderTopStyle:C,borderBottomStyle:v,borderWidth:O,bgColor:x,paletteColor:N,borderColor:M,outlineColor:R,boxSizing:j,top:D,bottom:B,left:G,right:b,cursor:w,children:U,className:$,ref:Z,...H})=>{const p={};return e&&(p[r.MARGIN_CLASSES[e]]=!0),t&&(p[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(p[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(p[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(p[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(p[r.PADDING_CLASSES[o]]=!0),a&&(p[r.PADDING_TOP_CLASSES[a]]=!0),l&&(p[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(p[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(p[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(p[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(p[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(p[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[d]]=!0),_&&(p[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[_]]=!0),g&&(p[r.BORDER_TOP_LEFT_RADIUS_CLASSES[g]]=!0),m&&(p[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[m]]=!0),E&&(p[r.BORDER_STYLE_CLASSES[E]]=!0),T&&(p[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),A&&(p[r.BORDER_RIGHT_STYLE_CLASSES[A]]=!0),C&&(p[r.BORDER_TOP_STYLE_CLASSES[C]]=!0),v&&(p[r.BORDER_BOTTOM_STYLE_CLASSES[v]]=!0),O&&(p[r.BORDER_WIDTH_CLASSES[O]]=!0),x&&(p[r.BACKGROUND_COLOR_CLASSES[x]]=!0),N&&(p[r.COLOR_CLASSES[N]]=!0),M&&(p[r.BORDER_COLOR_CLASSES[M]]=!0),R&&(p[r.OUTLINE_COLOR_CLASSES[R]]=!0),j&&(p[r.BOX_SIZING_CLASSES[j]]=!0),D&&(p[r.POSITION_TOP_CLASSES[D]]=!0),B&&(p[r.POSITION_BOTTOM_CLASSES[B]]=!0),G&&(p[r.POSITION_LEFT_CLASSES[G]]=!0),b&&(p[r.POSITION_RIGHT_CLASSES[b]]=!0),w&&(p[r.CURSOR_CLASSES[w]]=!0),h.jsx(P.div,{ref:Z,className:`${Object.keys(p).join(" ")} ${$||""}`,...H,children:U})},xe=y.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:g,borderTopRightRadius:m,borderStyle:E,borderLeftStyle:T,borderRightStyle:A,borderTopStyle:C,borderBottomStyle:v,borderWidth:O,bgColor:x,paletteColor:N,borderColor:M,outlineColor:R,boxSizing:j,top:D,bottom:B,left:G,right:b,cursor:w,children:U,className:$,...Z},H)=>{const p={};return e&&(p[r.MARGIN_CLASSES[e]]=!0),t&&(p[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(p[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(p[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(p[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(p[r.PADDING_CLASSES[o]]=!0),a&&(p[r.PADDING_TOP_CLASSES[a]]=!0),l&&(p[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(p[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(p[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(p[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(p[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(p[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(p[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),g&&(p[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[g]]=!0),m&&(p[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[m]]=!0),E&&(p[r.BORDER_STYLE_CLASSES[E]]=!0),T&&(p[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),A&&(p[r.BORDER_RIGHT_STYLE_CLASSES[A]]=!0),C&&(p[r.BORDER_TOP_STYLE_CLASSES[C]]=!0),v&&(p[r.BORDER_BOTTOM_STYLE_CLASSES[v]]=!0),O&&(p[r.BORDER_WIDTH_CLASSES[O]]=!0),x&&(p[r.BACKGROUND_COLOR_CLASSES[x]]=!0),N&&(p[r.COLOR_CLASSES[N]]=!0),M&&(p[r.BORDER_COLOR_CLASSES[M]]=!0),R&&(p[r.OUTLINE_COLOR_CLASSES[R]]=!0),j&&(p[r.BOX_SIZING_CLASSES[j]]=!0),D&&(p[r.POSITION_TOP_CLASSES[D]]=!0),B&&(p[r.POSITION_BOTTOM_CLASSES[B]]=!0),G&&(p[r.POSITION_LEFT_CLASSES[G]]=!0),b&&(p[r.POSITION_RIGHT_CLASSES[b]]=!0),w&&(p[r.CURSOR_CLASSES[w]]=!0),h.jsx(P.div,{ref:H,className:`${Object.keys(p).join(" ")} ${$||""}`,...Z,children:U})}),Y=({display:e,flexDirection:t,flexWrap:n,flexJustifyContent:s,flexAlignItem:i,flexAlignContent:o,gridGap:a,gridRowGap:l,gridColumnGap:c,gridJustifyContent:u,gridAlignContent:f,justifySelf:S,alignSelf:d,className:_,children:g,ref:m,...E})=>{const T={};return e&&(T[r.DISPLAY_CLASSES[e]]=!0),t&&(T[r.FLEX_DIRECTION_CLASSES[t]]=!0),n&&(T[r.FLEX_WRAP_CLASSES[n]]=!0),s&&(T[r.FLEX_JUSTIFY_CONTENT_CLASSES[s]]=!0),i&&(T[r.FLEX_ALIGN_ITEMS_CLASSES[i]]=!0),o&&(T[r.FLEX_ALIGN_CONTENT_CLASSES[o]]=!0),a&&(T[r.GRID_GAP_CLASSES[a]]=!0),l&&(T[r.GRID_ROW_GAP_CLASSES[l]]=!0),c&&(T[r.GRID_COLUMN_GAP_CLASSES[c]]=!0),u&&(T[r.GRID_JUSTIFY_CONTENT_CLASSES[u]]=!0),f&&(T[r.GRID_ALIGN_CONTENT_CLASSES[f]]=!0),S&&(T[r.JUSTIFY_SELF_CLASSES[S]]=!0),d&&(T[r.ALIGN_SELF_CLASSES[d]]=!0),h.jsx(P.div,{ref:m,className:`${Object.keys(T).join(" ")} ${_||""}`,...E,children:g})},Gs=y.forwardRef(({display:e,flexDirection:t,flexWrap:n,flexJustifyContent:s,flexAlignItem:i,flexAlignContent:o,gridGap:a,gridRowGap:l,gridColumnGap:c,gridJustifyContent:u,gridAlignContent:f,justifySelf:S,alignSelf:d,className:_,children:g,...m},E)=>{const T={};return e&&(T[r.DISPLAY_CLASSES[e]]=!0),t&&(T[r.FLEX_DIRECTION_CLASSES[t]]=!0),n&&(T[r.FLEX_WRAP_CLASSES[n]]=!0),s&&(T[r.FLEX_JUSTIFY_CONTENT_CLASSES[s]]=!0),i&&(T[r.FLEX_ALIGN_ITEMS_CLASSES[i]]=!0),o&&(T[r.FLEX_ALIGN_CONTENT_CLASSES[o]]=!0),a&&(T[r.GRID_GAP_CLASSES[a]]=!0),l&&(T[r.GRID_ROW_GAP_CLASSES[l]]=!0),c&&(T[r.GRID_COLUMN_GAP_CLASSES[c]]=!0),u&&(T[r.GRID_JUSTIFY_CONTENT_CLASSES[u]]=!0),f&&(T[r.GRID_ALIGN_CONTENT_CLASSES[f]]=!0),S&&(T[r.JUSTIFY_SELF_CLASSES[S]]=!0),d&&(T[r.ALIGN_SELF_CLASSES[d]]=!0),h.jsx(P.div,{ref:E,className:`${Object.keys(T).join(" ")} ${_||""}`,...m,children:g})}),Us=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:g,borderTopRightRadius:m,borderStyle:E,borderLeftStyle:T,borderRightStyle:A,borderTopStyle:C,borderBottomStyle:v,borderWidth:O,bgColor:x,paletteColor:N,borderColor:M,outlineColor:R,boxSizing:j,top:D,bottom:B,left:G,right:b,type:w,cursor:U,disabled:$,children:Z,className:H,ref:p,...Re})=>{const F={};return e&&(F[r.MARGIN_CLASSES[e]]=!0),t&&(F[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(F[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(F[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(F[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(F[r.PADDING_CLASSES[o]]=!0),a&&(F[r.PADDING_TOP_CLASSES[a]]=!0),l&&(F[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(F[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(F[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(F[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(F[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(F[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(F[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),g&&(F[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[g]]=!0),m&&(F[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[m]]=!0),E&&(F[r.BORDER_STYLE_CLASSES[E]]=!0),T&&(F[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),A&&(F[r.BORDER_RIGHT_STYLE_CLASSES[A]]=!0),C&&(F[r.BORDER_TOP_STYLE_CLASSES[C]]=!0),v&&(F[r.BORDER_BOTTOM_STYLE_CLASSES[v]]=!0),O&&(F[r.BORDER_WIDTH_CLASSES[O]]=!0),x&&(F[r.BACKGROUND_COLOR_CLASSES[x]]=!0),N&&(F[r.COLOR_CLASSES[N]]=!0),M&&(F[r.BORDER_COLOR_CLASSES[M]]=!0),R&&(F[r.OUTLINE_COLOR_CLASSES[R]]=!0),j&&(F[r.BOX_SIZING_CLASSES[j]]=!0),D&&(F[r.POSITION_TOP_CLASSES[D]]=!0),B&&(F[r.POSITION_BOTTOM_CLASSES[B]]=!0),G&&(F[r.POSITION_LEFT_CLASSES[G]]=!0),b&&(F[r.POSITION_RIGHT_CLASSES[b]]=!0),U&&(F[r.CURSOR_CLASSES[U]]=!0),h.jsx(P.button,{ref:p,type:w,disabled:$,className:`${Object.keys(F).join(" ")} ${H||""}`,...Re,children:Z})},Yo=y.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:g,borderTopRightRadius:m,borderStyle:E,borderLeftStyle:T,borderRightStyle:A,borderTopStyle:C,borderBottomStyle:v,borderWidth:O,bgColor:x,paletteColor:N,borderColor:M,outlineColor:R,boxSizing:j,top:D,bottom:B,left:G,right:b,cursor:w,children:U,className:$,...Z},H)=>{const p={};return e&&(p[r.MARGIN_CLASSES[e]]=!0),t&&(p[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(p[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(p[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(p[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(p[r.PADDING_CLASSES[o]]=!0),a&&(p[r.PADDING_TOP_CLASSES[a]]=!0),l&&(p[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(p[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(p[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(p[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(p[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(p[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(p[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),g&&(p[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[g]]=!0),m&&(p[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[m]]=!0),E&&(p[r.BORDER_STYLE_CLASSES[E]]=!0),T&&(p[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),A&&(p[r.BORDER_RIGHT_STYLE_CLASSES[A]]=!0),C&&(p[r.BORDER_TOP_STYLE_CLASSES[C]]=!0),v&&(p[r.BORDER_BOTTOM_STYLE_CLASSES[v]]=!0),O&&(p[r.BORDER_WIDTH_CLASSES[O]]=!0),x&&(p[r.BACKGROUND_COLOR_CLASSES[x]]=!0),N&&(p[r.COLOR_CLASSES[N]]=!0),M&&(p[r.BORDER_COLOR_CLASSES[M]]=!0),R&&(p[r.OUTLINE_COLOR_CLASSES[R]]=!0),j&&(p[r.BOX_SIZING_CLASSES[j]]=!0),D&&(p[r.POSITION_TOP_CLASSES[D]]=!0),B&&(p[r.POSITION_BOTTOM_CLASSES[B]]=!0),G&&(p[r.POSITION_LEFT_CLASSES[G]]=!0),b&&(p[r.POSITION_RIGHT_CLASSES[b]]=!0),w&&(p[r.CURSOR_CLASSES[w]]=!0),h.jsx(P.button,{ref:H,className:`${Object.keys(p).join(" ")} ${$||""}`,...Z,children:U})}),Hs=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,ref:c,...u})=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.input,{ref:c,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...u,children:l})},Vo=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.input,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),$s=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,resize:a,className:l,children:c,ref:u,...f})=>{const S={},{theme:d}=V();return e&&(S[r.COLOR_CLASSES[e]]=!0),t&&(S[r.FONT_SIZE_CLASSES[t]]=!0),n&&(S[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(S[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(S[r.FONT_STYLE_CLASSES[i]]=!0),o&&(S[r.TEXT_ALIGN_CLASSES[o]]=!0),a&&(S[r.ELEMENT_RESIZE_CLASSES[a]]=!0),h.jsx(P.textarea,{ref:u,className:`${r.THEME_CLASSES[d]} ${Object.keys(S).join(" ")} ${l||""}`,...f,children:c})},Xo=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,resize:a,outlineStyle:l,className:c,children:u,...f},S)=>{const d={},{theme:_}=V();return e&&(d[r.COLOR_CLASSES[e]]=!0),t&&(d[r.FONT_SIZE_CLASSES[t]]=!0),n&&(d[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(d[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(d[r.FONT_STYLE_CLASSES[i]]=!0),o&&(d[r.TEXT_ALIGN_CLASSES[o]]=!0),a&&(d[r.ELEMENT_RESIZE_CLASSES[a]]=!0),l&&(d[r.OUTLINE_STYLE_CLASSES[l]]=!0),h.jsx(P.textarea,{ref:S,className:`${r.THEME_CLASSES[_]} ${Object.keys(d).join(" ")} ${c||""}`,...f,children:u})}),Zs=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:g,borderTopRightRadius:m,borderStyle:E,borderLeftStyle:T,borderRightStyle:A,borderTopStyle:C,borderBottomStyle:v,borderWidth:O,bgColor:x,paletteColor:N,borderColor:M,outlineColor:R,boxSizing:j,top:D,bottom:B,left:G,right:b,cursor:w,className:U,children:$,ref:Z,...H})=>{const p={};return e&&(p[r.MARGIN_CLASSES[e]]=!0),t&&(p[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(p[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(p[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(p[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(p[r.PADDING_CLASSES[o]]=!0),a&&(p[r.PADDING_TOP_CLASSES[a]]=!0),l&&(p[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(p[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(p[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(p[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(p[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(p[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(p[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),g&&(p[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[g]]=!0),m&&(p[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[m]]=!0),E&&(p[r.BORDER_STYLE_CLASSES[E]]=!0),T&&(p[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),A&&(p[r.BORDER_RIGHT_STYLE_CLASSES[A]]=!0),C&&(p[r.BORDER_TOP_STYLE_CLASSES[C]]=!0),v&&(p[r.BORDER_BOTTOM_STYLE_CLASSES[v]]=!0),O&&(p[r.BORDER_WIDTH_CLASSES[O]]=!0),x&&(p[r.BACKGROUND_COLOR_CLASSES[x]]=!0),N&&(p[r.COLOR_CLASSES[N]]=!0),M&&(p[r.BORDER_COLOR_CLASSES[M]]=!0),R&&(p[r.OUTLINE_COLOR_CLASSES[R]]=!0),j&&(p[r.BOX_SIZING_CLASSES[j]]=!0),D&&(p[r.POSITION_TOP_CLASSES[D]]=!0),B&&(p[r.POSITION_BOTTOM_CLASSES[B]]=!0),G&&(p[r.POSITION_LEFT_CLASSES[G]]=!0),b&&(p[r.POSITION_RIGHT_CLASSES[b]]=!0),w&&(p[r.CURSOR_CLASSES[w]]=!0),h.jsx(P.li,{ref:Z,className:`${Object.keys(p).join(" ")} ${U||""}`,...H,children:$})},Wo=y.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:g,borderTopRightRadius:m,borderStyle:E,borderLeftStyle:T,borderRightStyle:A,borderTopStyle:C,borderBottomStyle:v,borderWidth:O,bgColor:x,paletteColor:N,borderColor:M,outlineColor:R,boxSizing:j,top:D,bottom:B,left:G,right:b,cursor:w,className:U,children:$,...Z},H)=>{const p={};return e&&(p[r.MARGIN_CLASSES[e]]=!0),t&&(p[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(p[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(p[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(p[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(p[r.PADDING_CLASSES[o]]=!0),a&&(p[r.PADDING_TOP_CLASSES[a]]=!0),l&&(p[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(p[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(p[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(p[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(p[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(p[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(p[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),g&&(p[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[g]]=!0),m&&(p[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[m]]=!0),E&&(p[r.BORDER_STYLE_CLASSES[E]]=!0),T&&(p[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),A&&(p[r.BORDER_RIGHT_STYLE_CLASSES[A]]=!0),C&&(p[r.BORDER_TOP_STYLE_CLASSES[C]]=!0),v&&(p[r.BORDER_BOTTOM_STYLE_CLASSES[v]]=!0),O&&(p[r.BORDER_WIDTH_CLASSES[O]]=!0),x&&(p[r.BACKGROUND_COLOR_CLASSES[x]]=!0),N&&(p[r.COLOR_CLASSES[N]]=!0),M&&(p[r.BORDER_COLOR_CLASSES[M]]=!0),R&&(p[r.OUTLINE_COLOR_CLASSES[R]]=!0),j&&(p[r.BOX_SIZING_CLASSES[j]]=!0),D&&(p[r.POSITION_TOP_CLASSES[D]]=!0),B&&(p[r.POSITION_BOTTOM_CLASSES[B]]=!0),G&&(p[r.POSITION_LEFT_CLASSES[G]]=!0),b&&(p[r.POSITION_RIGHT_CLASSES[b]]=!0),w&&(p[r.CURSOR_CLASSES[w]]=!0),h.jsx(P.li,{ref:H,className:`${Object.keys(p).join(" ")} ${U||""}`,...Z,children:$})}),Xn=({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:g,borderTopRightRadius:m,borderStyle:E,borderLeftStyle:T,borderRightStyle:A,borderTopStyle:C,borderBottomStyle:v,borderWidth:O,bgColor:x,paletteColor:N,borderColor:M,outlineColor:R,boxSizing:j,top:D,bottom:B,left:G,right:b,className:w,cursor:U,children:$,ref:Z,...H})=>{const p={};return e&&(p[r.MARGIN_CLASSES[e]]=!0),t&&(p[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(p[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(p[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(p[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(p[r.PADDING_CLASSES[o]]=!0),a&&(p[r.PADDING_TOP_CLASSES[a]]=!0),l&&(p[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(p[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(p[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(p[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(p[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(p[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(p[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),g&&(p[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[g]]=!0),m&&(p[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[m]]=!0),E&&(p[r.BORDER_STYLE_CLASSES[E]]=!0),T&&(p[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),A&&(p[r.BORDER_RIGHT_STYLE_CLASSES[A]]=!0),C&&(p[r.BORDER_TOP_STYLE_CLASSES[C]]=!0),v&&(p[r.BORDER_BOTTOM_STYLE_CLASSES[v]]=!0),O&&(p[r.BORDER_WIDTH_CLASSES[O]]=!0),x&&(p[r.BACKGROUND_COLOR_CLASSES[x]]=!0),N&&(p[r.COLOR_CLASSES[N]]=!0),M&&(p[r.BORDER_COLOR_CLASSES[M]]=!0),R&&(p[r.OUTLINE_COLOR_CLASSES[R]]=!0),j&&(p[r.BOX_SIZING_CLASSES[j]]=!0),D&&(p[r.POSITION_TOP_CLASSES[D]]=!0),B&&(p[r.POSITION_BOTTOM_CLASSES[B]]=!0),G&&(p[r.POSITION_LEFT_CLASSES[G]]=!0),b&&(p[r.POSITION_RIGHT_CLASSES[b]]=!0),U&&(p[r.CURSOR_CLASSES[U]]=!0),h.jsx(P.ul,{ref:Z,className:`${Object.keys(p).join(" ")} ${w||""}`,...H,children:$})},qo=y.forwardRef(({margin:e,marginTop:t,marginBottom:n,marginLeft:s,marginRight:i,padding:o,paddingTop:a,paddingBottom:l,paddingLeft:c,paddingRight:u,boxShadow:f,borderRadius:S,borderBottomLeftRadius:d,borderBottomRightRadius:_,borderTopLeftRadius:g,borderTopRightRadius:m,borderStyle:E,borderLeftStyle:T,borderRightStyle:A,borderTopStyle:C,borderBottomStyle:v,borderWidth:O,bgColor:x,paletteColor:N,borderColor:M,outlineColor:R,boxSizing:j,top:D,bottom:B,left:G,right:b,cursor:w,className:U,children:$,...Z},H)=>{const p={};return e&&(p[r.MARGIN_CLASSES[e]]=!0),t&&(p[r.MARGIN_TOP_CLASSES[t]]=!0),n&&(p[r.MARGIN_BOTTOM_CLASSES[n]]=!0),s&&(p[r.MARGIN_LEFT_CLASSES[s]]=!0),i&&(p[r.MARGIN_RIGHT_CLASSES[i]]=!0),o&&(p[r.PADDING_CLASSES[o]]=!0),a&&(p[r.PADDING_TOP_CLASSES[a]]=!0),l&&(p[r.PADDING_BOTTOM_CLASSES[l]]=!0),c&&(p[r.PADDING_LEFT_CLASSES[c]]=!0),u&&(p[r.PADDING_RIGHT_CLASSES[u]]=!0),f&&(p[r.BOX_SHADOW_CLASSES[f]]=!0),S&&(p[r.BORDER_RADIUS_CLASSES[S]]=!0),d&&(p[r.BORDER_TOP_LEFT_RADIUS_CLASSES[d]]=!0),_&&(p[r.BORDER_TOP_RIGHT_RADIUS_CLASSES[_]]=!0),g&&(p[r.BORDER_BOTTOM_LEFT_RADIUS_CLASSES[g]]=!0),m&&(p[r.BORDER_BOTTOM_RIGHT_RADIUS_CLASSES[m]]=!0),E&&(p[r.BORDER_STYLE_CLASSES[E]]=!0),T&&(p[r.BORDER_LEFT_STYLE_CLASSES[T]]=!0),A&&(p[r.BORDER_RIGHT_STYLE_CLASSES[A]]=!0),C&&(p[r.BORDER_TOP_STYLE_CLASSES[C]]=!0),v&&(p[r.BORDER_BOTTOM_STYLE_CLASSES[v]]=!0),O&&(p[r.BORDER_WIDTH_CLASSES[O]]=!0),x&&(p[r.BACKGROUND_COLOR_CLASSES[x]]=!0),N&&(p[r.COLOR_CLASSES[N]]=!0),M&&(p[r.BORDER_COLOR_CLASSES[M]]=!0),R&&(p[r.OUTLINE_COLOR_CLASSES[R]]=!0),j&&(p[r.BOX_SIZING_CLASSES[j]]=!0),D&&(p[r.POSITION_TOP_CLASSES[D]]=!0),B&&(p[r.POSITION_BOTTOM_CLASSES[B]]=!0),G&&(p[r.POSITION_LEFT_CLASSES[G]]=!0),b&&(p[r.POSITION_RIGHT_CLASSES[b]]=!0),w&&(p[r.CURSOR_CLASSES[w]]=!0),h.jsx(P.ul,{ref:H,className:`${Object.keys(p).join(" ")} ${U||""}`,...Z,children:$})}),Ko=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h1,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},Qo=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h1,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),Jo=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h2,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},ea=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h2,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),ta=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h3,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},na=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h3,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),ra=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h4,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},sa=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={};return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h4,{ref:u,className:`${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),ia=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h5,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},oa=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h5,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),aa=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c})=>{const u={},{theme:f}=V();return e&&(u[r.COLOR_CLASSES[e]]=!0),t&&(u[r.FONT_SIZE_CLASSES[t]]=!0),n&&(u[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(u[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(u[r.FONT_STYLE_CLASSES[i]]=!0),o&&(u[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h6,{className:`${r.THEME_CLASSES[f]} ${Object.keys(u).join(" ")} ${a||""}`,...c,children:l})},ca=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.h6,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})});function Mt(e,t){return e+t>8?r.FontSizes.Size8:e+t<1?r.FontSizes.Size1:e+t}const Pt=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,ref:c,...u})=>{const f={},{theme:S,baseFontSize:d}=V();return t?d!==r.BASE_FONT_SIZE?f[r.FONT_SIZE_CLASSES[Mt(t,d-r.BASE_FONT_SIZE)]]=!0:f[r.FONT_SIZE_CLASSES[t]]=!0:f[r.FONT_SIZE_CLASSES[d]]=!0,e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.p,{ref:c,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...u,children:l})},ua=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S,baseFontSize:d}=V();return t?d!==r.BASE_FONT_SIZE?f[r.FONT_SIZE_CLASSES[Mt(t,d-r.BASE_FONT_SIZE)]]=!0:f[r.FONT_SIZE_CLASSES[t]]=!0:f[r.FONT_SIZE_CLASSES[d]]=!0,e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(P.p,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})}),q=({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,cursor:l,children:c,ref:u,...f})=>{const S={},{theme:d,baseFontSize:_}=V();return t?_!==r.BASE_FONT_SIZE?S[r.FONT_SIZE_CLASSES[Mt(t,_-r.BASE_FONT_SIZE)]]=!0:S[r.FONT_SIZE_CLASSES[t]]=!0:S[r.FONT_SIZE_CLASSES[_]]=!0,e&&(S[r.COLOR_CLASSES[e]]=!0),t&&(S[r.FONT_SIZE_CLASSES[t]]=!0),n&&(S[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(S[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(S[r.FONT_STYLE_CLASSES[i]]=!0),o&&(S[r.TEXT_ALIGN_CLASSES[o]]=!0),l&&(S[r.CURSOR_CLASSES[l]]=!0),h.jsx(P.span,{ref:u,className:`${r.THEME_CLASSES[d]} ${Object.keys(S).join(" ")} ${a||""}`,...f,children:c})},la=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,cursor:l,children:c,...u},f)=>{const S={},{theme:d,baseFontSize:_}=V();return t?_!==r.BASE_FONT_SIZE?S[r.FONT_SIZE_CLASSES[Mt(t,_-r.BASE_FONT_SIZE)]]=!0:S[r.FONT_SIZE_CLASSES[t]]=!0:S[r.FONT_SIZE_CLASSES[_]]=!0,e&&(S[r.COLOR_CLASSES[e]]=!0),t&&(S[r.FONT_SIZE_CLASSES[t]]=!0),n&&(S[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(S[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(S[r.FONT_STYLE_CLASSES[i]]=!0),o&&(S[r.TEXT_ALIGN_CLASSES[o]]=!0),l&&(S[r.CURSOR_CLASSES[l]]=!0),h.jsx(P.span,{ref:f,className:`${r.THEME_CLASSES[d]} ${Object.keys(S).join(" ")} ${a||""}`,...u,children:c})}),fa=({header:e,children:t,ref:n,...s})=>{switch(e){case"h1":return h.jsx(P.h1,{ref:n,...s,children:t});case"h2":return h.jsx(P.h2,{ref:n,...s,children:t});case"h3":return h.jsx(P.h3,{ref:n,...s,children:t});case"h4":return h.jsx(P.h4,{ref:n,...s,children:t});case"h5":return h.jsx(P.h5,{ref:n,...s,children:t});case"h6":return h.jsx(P.h6,{ref:n,...s,children:t});default:return h.jsx(P.h6,{ref:n,...s,children:t})}},da=y.forwardRef(({header:e,children:t,...n},s)=>{switch(e){case"h1":return h.jsx(P.h1,{ref:s,...n,children:t});case"h2":return h.jsx(P.h2,{ref:s,...n,children:t});case"h3":return h.jsx(P.h3,{ref:s,...n,children:t});case"h4":return h.jsx(P.h4,{ref:s,...n,children:t});case"h5":return h.jsx(P.h5,{ref:s,...n,children:t});case"h6":return h.jsx(P.h6,{ref:s,...n,children:t});default:return h.jsx(P.h6,{ref:s,...n,children:t})}}),ha=({header:e,paletteColor:t,fontSize:n,fontFamily:s,fontWeight:i,fontStyle:o,textAlign:a,className:l,children:c,...u})=>{const f={},{theme:S}=V();return t&&(f[r.COLOR_CLASSES[t]]=!0),n&&(f[r.FONT_SIZE_CLASSES[n]]=!0),s&&(f[r.FONT_FAMILY_CLASSES[s]]=!0),i&&(f[r.FONT_WEIGHT_CLASSES[i]]=!0),o&&(f[r.FONT_STYLE_CLASSES[o]]=!0),a&&(f[r.TEXT_ALIGN_CLASSES[a]]=!0),h.jsx(fa,{header:e,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${l||""}`,...u,children:c})},Sa=y.forwardRef(({paletteColor:e,fontSize:t,fontFamily:n,fontWeight:s,fontStyle:i,textAlign:o,className:a,children:l,...c},u)=>{const f={},{theme:S}=V();return e&&(f[r.COLOR_CLASSES[e]]=!0),t&&(f[r.FONT_SIZE_CLASSES[t]]=!0),n&&(f[r.FONT_FAMILY_CLASSES[n]]=!0),s&&(f[r.FONT_WEIGHT_CLASSES[s]]=!0),i&&(f[r.FONT_STYLE_CLASSES[i]]=!0),o&&(f[r.TEXT_ALIGN_CLASSES[o]]=!0),h.jsx(da,{ref:u,className:`${r.THEME_CLASSES[S]} ${Object.keys(f).join(" ")} ${a||""}`,...c,children:l})});function Ys(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Vt,Or;function _a(){if(Or)return Vt;Or=1;function e(t,n,s){var i,o,a,l,c;n==null&&(n=100);function u(){var S=Date.now()-l;S<n&&S>=0?i=setTimeout(u,n-S):(i=null,s||(c=t.apply(a,o),a=o=null))}var f=function(){a=this,o=arguments,l=Date.now();var S=s&&!i;return i||(i=setTimeout(u,n)),S&&(c=t.apply(a,o),a=o=null),c};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(c=t.apply(a,o),a=o=null,clearTimeout(i),i=null)},f}return e.debounce=e,Vt=e,Vt}var pa=_a();const Lr=Ys(pa);function pe(e){let{debounce:t,scroll:n,polyfill:s,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const o=s||(typeof window>"u"?class{}:window.ResizeObserver);if(!o)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,l]=y.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=y.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,S=y.useRef(!1);y.useEffect(()=>(S.current=!0,()=>void(S.current=!1)));const[d,_,g]=y.useMemo(()=>{const A=()=>{if(!c.current.element)return;const{left:C,top:v,width:O,height:x,bottom:N,right:M,x:R,y:j}=c.current.element.getBoundingClientRect(),D={left:C,top:v,width:O,height:x,bottom:N,right:M,x:R,y:j};c.current.element instanceof HTMLElement&&i&&(D.height=c.current.element.offsetHeight,D.width=c.current.element.offsetWidth),Object.freeze(D),S.current&&!Ta(c.current.lastBounds,D)&&l(c.current.lastBounds=D)};return[A,f?Lr(A,f):A,u?Lr(A,u):A]},[l,i,u,f]);function m(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(A=>A.removeEventListener("scroll",g,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function E(){c.current.element&&(c.current.resizeObserver=new o(g),c.current.resizeObserver.observe(c.current.element),n&&c.current.scrollContainers&&c.current.scrollContainers.forEach(A=>A.addEventListener("scroll",g,{capture:!0,passive:!0})))}const T=A=>{!A||A===c.current.element||(m(),c.current.element=A,c.current.scrollContainers=Vs(A),E())};return ma(g,!!n),ga(_),y.useEffect(()=>{m(),E()},[n,g,_]),y.useEffect(()=>m,[]),[T,a,d]}function ga(e){y.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function ma(e,t){y.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function Vs(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:s,overflowY:i}=window.getComputedStyle(e);return[n,s,i].some(o=>o==="auto"||o==="scroll")&&t.push(e),[...t,...Vs(e.parentElement)]}const Ea=["x","y","top","bottom","left","right","width","height"],Ta=(e,t)=>Ea.every(n=>e[n]===t[n]),ya=({children:e,inherit:t=!1,width:n="auto",height:s="auto"})=>{const[i,o]=pe(),a=y.useMemo(()=>o.height,[o.height]),l=y.useMemo(()=>o.width,[o.width]),c=y.Children.map(e,u=>y.isValidElement(u)?y.cloneElement(u,{width:l,height:a}):u);return h.jsx("div",{ref:i,style:{width:t?"inherit":n,height:t?"inherit":s},children:c})},St={[r.Sizings.Size1]:{containerSize:8,size:4},[r.Sizings.Size2]:{containerSize:12,size:8},[r.Sizings.Size3]:{containerSize:16,size:12},[r.Sizings.Size4]:{containerSize:20,size:16},[r.Sizings.Size5]:{containerSize:24,size:20},[r.Sizings.Size6]:{containerSize:28,size:24},[r.Sizings.Size7]:{containerSize:32,size:28},[r.Sizings.Size8]:{containerSize:36,size:32},[r.Sizings.Size9]:{containerSize:44,size:40},[r.Sizings.Size10]:{containerSize:52,size:48},[r.Sizings.Size11]:{containerSize:60,size:54},[r.Sizings.Size12]:{containerSize:68,size:64},[r.Sizings.Size13]:{containerSize:76,size:72},[r.Sizings.Size14]:{containerSize:84,size:80},[r.Sizings.Size15]:{containerSize:92,size:88}};function Xs({size:e=r.Sizings.Size3}){return h.jsx("div",{className:"image-container",style:{width:`${St[e].containerSize}px`,height:`${St[e].containerSize}px`},children:h.jsx("svg",{className:"text-zinc-300",viewBox:"0 0 2400 2400",width:St[e].size,height:St[e].size,children:h.jsxs("g",{strokeWidth:200,strokeLinecap:"round",stroke:"currentColor",fill:"none",children:[h.jsx("path",{d:"M1200 600L1200 100"}),h.jsx("path",{opacity:.5,d:"M1200 2300L1200 1800"}),h.jsx("path",{opacity:.917,d:"M900 680.4L650 247.4"}),h.jsx("path",{opacity:.417,d:"M1750 2152.6L1500 1719.6"}),h.jsx("path",{opacity:.833,d:"M680.4 900L247.4 650"}),h.jsx("path",{opacity:.333,d:"M2152.6 1750L1719.6 1500"}),h.jsx("path",{opacity:.75,d:"M600 1200L100 1200"}),h.jsx("path",{opacity:.25,d:"M2300 1200L1800 1200"}),h.jsx("path",{opacity:.667,d:"M680.4 1500L247.4 1750"}),h.jsx("path",{opacity:.167,d:"M2152.6 650L1719.6 900"}),h.jsx("path",{opacity:.583,d:"M900 1719.6L650 2152.6"}),h.jsx("path",{opacity:.083,d:"M1750 247.4L1500 680.4"}),h.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",keyTimes:"0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667",values:"0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199",dur:"0.83333s",begin:"0s",repeatCount:"indefinite",calcMode:"discrete"})]})})})}const Aa=({isLoading:e,size:t=r.Sizings.Size3})=>ue(e,{from:{opacity:0,scale:.6,height:0},enter:{opacity:1,scale:1,height:30},leave:{opacity:0,scale:.6,height:0}})((s,i)=>i&&h.jsx(P.div,{style:{display:"flex",justifyContent:"center",alignItems:"center",...s},children:h.jsx(Xs,{size:t})})),Ca=({isOpen:e,children:t})=>{const[n,s]=pe(),i={height:e?s.height:0,width:"auto",overflow:"hidden",opacity:e?1:0};return h.jsx(I,{style:i,children:h.jsx("div",{ref:n,children:h.jsx(I,{style:{height:"max-content"},children:t})})})},Xt={horizontal:{from:{x:10},enter:{x:0},leave:{x:-10}},vertical:{from:{y:10},enter:{y:0},leave:{y:-10}},verticalInverted:{from:{y:-10},enter:{y:0},leave:{y:10}}},Oa=({direction:e,isShown:t=!0,children:n})=>{const s=ue(t,{from:{...Xt[e].from,opacity:0,display:"none"},enter:{...Xt[e].enter,opacity:1,display:"block"},leave:{...Xt[e].leave,opacity:0,display:"none"}});return h.jsx(h.Fragment,{children:s((i,o)=>o&&h.jsx(I,{style:{...i,height:"inherit",width:"inherit",overflow:"hidden"},children:n}))})},Wt={horizontal:{from:e=>({x:10*e}),enter:e=>({x:0*e}),leave:e=>({x:-10*e})},vertical:{from:e=>({y:10*e}),enter:e=>({y:0*e}),leave:e=>({y:-10*e})}},Ws=({direction:e="horizontal",isShown:t=!0,enterOffsetBy:n=1,children:s})=>{const i=ue(t,{from:{...Wt[e].from(n),opacity:0,display:"none"},enter:{...Wt[e].enter(n),opacity:1,display:"block"},leave:{...Wt[e].leave(n),opacity:0,display:"none"}});return h.jsx(h.Fragment,{children:i((o,a)=>a&&h.jsx(I,{style:{height:"inherit",width:"inherit",overflow:"hidden",...o},children:s}))})},La=({isOpen:e,children:t})=>{const[n,s]=pe(),[i,o]=W(()=>({opacity:0,height:0,width:0}));return o.start({opacity:e?1:0,height:e?s.height:0,width:e?s.width:0}),h.jsx(I,{style:{position:"absolute",overflow:"hidden",...i},boxSizing:r.BoxSizings.BorderBox,children:h.jsx("div",{ref:n,style:{width:"max-content",height:"max-content",boxSizing:"border-box"},children:t})})},Ae={[r.Sizings.Size1]:{padding:r.Spacings.Size1,size:r.Sizings.Size1},[r.Sizings.Size2]:{padding:r.Spacings.Size1,size:r.Sizings.Size2},[r.Sizings.Size3]:{padding:r.Spacings.Size1,size:r.Sizings.Size3},[r.Sizings.Size4]:{padding:r.Spacings.Size1,size:r.Sizings.Size4},[r.Sizings.Size5]:{padding:r.Spacings.Size1,size:r.Sizings.Size5},[r.Sizings.Size6]:{padding:r.Spacings.Size2,size:r.Sizings.Size6},[r.Sizings.Size7]:{padding:r.Spacings.Size2,size:r.Sizings.Size7},[r.Sizings.Size8]:{padding:r.Spacings.Size3,size:r.Sizings.Size8},[r.Sizings.Size9]:{padding:r.Spacings.Size3,size:r.Sizings.Size9},[r.Sizings.Size10]:{padding:r.Spacings.Size4,size:r.Sizings.Size10},[r.Sizings.Size11]:{padding:r.Spacings.Size4,size:r.Sizings.Size11},[r.Sizings.Size12]:{padding:r.Spacings.Size5,size:r.Sizings.Size12},[r.Sizings.Size13]:{padding:r.Spacings.Size5,size:r.Sizings.Size13},[r.Sizings.Size14]:{padding:r.Spacings.Size6,size:r.Sizings.Size14},[r.Sizings.Size15]:{padding:r.Spacings.Size6,size:r.Sizings.Size15}};function va({size:e=r.Sizings.Size3,...t}){return h.jsx("div",{className:"icon-container",style:{width:`${e+4}px`,height:`${e+4}px`},children:h.jsx("svg",{className:"text-zinc-300",viewBox:"0 0 2400 2400",width:e,height:e,...t,children:h.jsxs("g",{strokeWidth:200,strokeLinecap:"round",stroke:"currentColor",fill:"none",children:[h.jsx("path",{d:"M1200 600L1200 100"}),h.jsx("path",{opacity:.5,d:"M1200 2300L1200 1800"}),h.jsx("path",{opacity:.917,d:"M900 680.4L650 247.4"}),h.jsx("path",{opacity:.417,d:"M1750 2152.6L1500 1719.6"}),h.jsx("path",{opacity:.833,d:"M680.4 900L247.4 650"}),h.jsx("path",{opacity:.333,d:"M2152.6 1750L1719.6 1500"}),h.jsx("path",{opacity:.75,d:"M600 1200L100 1200"}),h.jsx("path",{opacity:.25,d:"M2300 1200L1800 1200"}),h.jsx("path",{opacity:.667,d:"M680.4 1500L247.4 1750"}),h.jsx("path",{opacity:.167,d:"M2152.6 650L1719.6 900"}),h.jsx("path",{opacity:.583,d:"M900 1719.6L650 2152.6"}),h.jsx("path",{opacity:.083,d:"M1750 247.4L1500 680.4"}),h.jsx("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",keyTimes:"0;0.08333;0.16667;0.25;0.33333;0.41667;0.5;0.58333;0.66667;0.75;0.83333;0.91667",values:"0 1199 1199;30 1199 1199;60 1199 1199;90 1199 1199;120 1199 1199;150 1199 1199;180 1199 1199;210 1199 1199;240 1199 1199;270 1199 1199;300 1199 1199;330 1199 1199",dur:"0.83333s",begin:"0s",repeatCount:"indefinite",calcMode:"discrete"})]})})})}const ie=({name:e,size:t=r.Sizings.Size5,withMargin:n=!0,width:s,height:i,colorLight:o=r.ColorPalettes.Grey5,colorDark:a=r.ColorPalettes.Grey5,iconAction:l,cursor:c=r.Cursors.Default,animated:u=!0,overflow:f="hidden",borderRadius:S,bgColor:d,..._})=>{const{theme:g}=V(),[m,E]=W(()=>({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Transparent],scale:1})),T=g!==r.Themes.Light?r.COLOR_VALUES[a]:r.COLOR_VALUES[o],A=u&&typeof l<"u";return h.jsx(Y,{onClick:l,display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,style:{width:"max-content",color:T,cursor:A?"pointer":"default",borderRadius:qt(S)?r.RADIUS_VALUES[S]:S,overflow:f},tabIndex:0,onMouseEnter:()=>A&&E.start({backgroundColor:r.COLOR_VALUES[d||r.ColorPalettes.Primary3]}),onMouseLeave:()=>A&&E.start({backgroundColor:r.COLOR_VALUES[d||r.ColorPalettes.Transparent]}),onMouseDown:()=>A&&E.start({backgroundColor:r.COLOR_VALUES[d||r.ColorPalettes.Primary2],scale:.85}),onMouseUp:()=>A&&E.start({backgroundColor:r.COLOR_VALUES[d||r.ColorPalettes.Primary3],scale:1}),..._,children:h.jsx(I,{padding:n?Ae[t].padding:void 0,cursor:c,style:A?{...m,borderRadius:qt(S)?r.RADIUS_VALUES[S]:S,display:"flex",alignItems:"center",justifyContent:"center",minWidth:Ae[t].size+3,minHeight:Ae[t].size+3,cursor:"inherit"}:{borderRadius:qt(S)?r.RADIUS_VALUES[S]:S,display:"flex",alignItems:"center",justifyContent:"center",minWidth:Ae[t].size+3,minHeight:Ae[t].size+3},children:e==="spinner"?h.jsx(va,{size:Ae[t].size,color:T}):h.jsx("svg",{width:s||Ae[t].size,height:i||Ae[t].size,fill:"none",stroke:T,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",cursor:"inherit",children:h.jsx("use",{href:`/feather-sprite.svg#${e}`})})})})};function qt(e){return typeof e=="number"&&Object.values(r.Radiuses).includes(e)}const qs=y.createContext({theme:r.Themes.Default,baseFontSize:r.FontSizes.Size2||2,handleSetTheme:()=>{},onSetBaseFontSize:()=>{}});function Ia({children:e}){const t=ba();return h.jsx(qs.Provider,{value:t,children:e})}const V=()=>y.useContext(qs);function ba(){const[e,t]=y.useState(r.Themes.Default),n=a=>{t(a)},[s,i]=y.useState(r.FontSizes.Size2);return{theme:e,baseFontSize:s,handleSetTheme:n,onSetBaseFontSize:a=>{i(l=>l+a>8?r.FontSizes.Size8:l+a<1?r.FontSizes.Size1:l+a)}}}const Ks=y.createContext({globalEventRef:null,handleGlobalEventRef:()=>{},catchUserAxiosNextApiError:void 0,catchUserAxiosFetcherError:void 0});function xa({children:e}){const t=Ra();return h.jsx(Ks.Provider,{value:t,children:e})}const Qs=()=>y.useContext(Ks);function Ra(){const e=y.useRef(null),t=y.useCallback((i,o)=>{var a;(a=e.current)==null||a.call(e,i,r.TOAST_TYPE[o])},[]),n=y.useCallback(i=>{var o;if(i.response){const a=((o=i.response.data)==null?void 0:o.message)||"An error occurred";t(a,r.ToastTypes.Error)}else i.request?t("Could not reach server",r.ToastTypes.Error):t("Could not process your request",r.ToastTypes.Error)},[]),s=y.useCallback(i=>{var o;if(i.response){const a=((o=i.response.data)==null?void 0:o.message)||"An error occurred";t(a,r.ToastTypes.Error)}else i.request?t("Could not reach server",r.ToastTypes.Error):t("Could not process your request",r.ToastTypes.Error)},[]);return{globalEventRef:e,handleGlobalEventRef:t,catchUserAxiosNextApiError:n,catchUserAxiosFetcherError:s}}const wa=({level:e,size:t=r.AdmonitionSizes.Medium,descriptionText:n,children:s})=>h.jsx(I,{borderRadius:r.Radiuses.Size4,borderColor:r.AdmonitionColors[e].borderColor,borderWidth:r.BorderWidths.Size2,bgColor:r.AdmonitionColors[e].bgColor,style:{width:"max-content"},children:h.jsxs(Y,{children:[h.jsx(I,{padding:r.ADMONITION_SIZE[t].title.padding,paddingBottom:r.ADMONITION_SIZE[t].title.paddingBottom,paddingLeft:r.ADMONITION_SIZE[t].title.paddingLeft,paddingRight:r.ADMONITION_SIZE[t].title.paddingRight,children:h.jsxs(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.FlexStart,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(ie,{name:r.AdmonitionIcons[e].titleIcon,colorLight:r.AdmonitionColors[e].iconColor,colorDark:r.AdmonitionColors[e].iconColor,size:r.ADMONITION_SIZE[t].title.iconSize,withMargin:!1,borderRadius:void 0,overflow:""}),h.jsx(I,{marginLeft:r.ADMONITION_SIZE[t].title.iconMargin,children:h.jsx(q,{fontSize:r.ADMONITION_SIZE[t].title.fontSize,fontWeight:r.ADMONITION_SIZE[t].title.fontWeight,children:r.AdmonitionTitles[e]})})]})}),h.jsx(I,{padding:r.ADMONITION_SIZE[t].content.padding,paddingTop:r.ADMONITION_SIZE[t].content.paddingTop,paddingLeft:r.ADMONITION_SIZE[t].content.paddingLeft,paddingRight:r.ADMONITION_SIZE[t].title.paddingRight,children:h.jsx(Pt,{fontSize:r.ADMONITION_SIZE[t].content.fontSize,children:n})}),s&&h.jsx(I,{padding:r.ADMONITION_SIZE[t].content.padding,paddingTop:r.ADMONITION_SIZE[t].content.paddingTop,paddingLeft:r.ADMONITION_SIZE[t].content.paddingLeft,paddingRight:r.ADMONITION_SIZE[t].title.paddingRight,children:s})]})}),Na=({hoverAnimation:e,size:t=r.AvatarSizes.Size3,avatarName:n,withHover:s})=>s?n?h.jsx(I,{bgColor:r.ColorPalettes.Primary4,padding:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderRadius:r.Radiuses.Size4,boxShadow:r.BoxShadows.Size3,style:{position:"absolute",left:"50%",transform:"translateX(-50%)",width:"max-content",zIndex:1,...e},children:h.jsx(q,{fontSize:r.AVATAR_SIZE[t].fontSize,children:n})}):h.jsx(h.Fragment,{}):n?h.jsx(Da,{children:h.jsx(q,{fontSize:r.AVATAR_SIZE[t].fontSize,children:n})}):h.jsx(h.Fragment,{}),Da=({children:e})=>h.jsx(I,{style:{opacity:1},children:e});function vr(){for(var e="",t="0123456789abcdef",n=0;n<6;n++)e+=t.charAt(Math.floor(Math.random()*t.length));return e}function ja(){var e=Math.floor(Math.random()*360),t="linear-gradient("+e+"deg, #"+vr()+", #"+vr()+")";return t}const Js=({avatarName:e,size:t=r.AvatarSizes.Size2,withHover:n=!0,onClick:s,border:i=!0,borderColor:o,children:a})=>{const[l,c]=W(()=>({opacity:0,y:-5,scale:.7,transformOrigin:"top center",pointerEvents:"auto"}));return h.jsx(I,{style:{width:"max-content"},onMouseEnter:()=>c.start({opacity:1,y:3,scale:1}),onMouseLeave:()=>c.start({opacity:0,y:-5,scale:.7,pointerEvents:"none"}),onClick:s,children:h.jsxs(Y,{style:{width:"max-content",position:"relative"},children:[h.jsx(Y,{display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,style:{width:"100%"},children:h.jsx(I,{borderColor:i?o||r.ColorPalettes.Grey3:void 0,borderStyle:i?r.BorderStyles.Solid:void 0,borderWidth:i?r.BorderWidths.Size2:void 0,style:{overflow:"hidden",maxWidth:"100%",borderRadius:"50%",width:r.AVATAR_SIZE[t].image,height:r.AVATAR_SIZE[t].image},children:a?h.jsx(h.Fragment,{children:a}):h.jsx(I,{style:{width:"100%",height:"100%",background:ja()}})})}),h.jsx(Na,{hoverAnimation:l,avatarName:e,size:t,withHover:n})]})})},Ma=({avatars:e,border:t,borderColor:n,withHover:s,size:i})=>{const[o,a]=Vn(e.length,l=>({y:0,x:l===0?0:l*-10}),[]);return h.jsx(Y,{display:r.Displays.Flex,children:o.map((l,c)=>h.jsx(P.div,{style:l,onMouseEnter:()=>a.start(u=>{if(u===c)return{y:-5}}),onMouseLeave:()=>a.start(u=>{if(u===c)return{y:0}}),children:h.jsx(Js,{avatarName:e[c].name,border:t,borderColor:n,onClick:e[c].onClick,isLoading:e[c].isLoading,withHover:s,size:i,children:e[c].children})},c))})},kt=({labelName:e="",offsetX:t=0,y:n=50,x:s=0,hover:i=!1})=>{const[o,a]=pe(),l=W({opacity:i?1:0,x:s,y:n}),c=W({opacity:i?1:0,x:-(a.width/2)+t,y:n});return h.jsx(xe,{ref:o,style:t!==0?c:l,children:h.jsx(I,{children:h.jsx(Pt,{children:e})})})},Ir=({icon:e,iconSize:t,iconState:n,iconColor:s,iconPosition:i,iconMargin:o})=>{const[a,l]=y.useState(n);y.useEffect(()=>{l(n)},[n]);const c=ue(a,{from:{opacity:0,transform:"scale(0.6)"},enter:{opacity:1,transform:"scale(1)"},leave:{opacity:0,transform:"scale(0.6)"},onRest:()=>{(n===r.ButtonStates.Success||n!==r.ButtonStates.Error)&&setTimeout(()=>{(a===r.ButtonStates.Success||a!==r.ButtonStates.Error)&&l(r.ButtonStates.Icon)},3e3)}});return h.jsx(I,{marginRight:i===r.ButtonIconPositions.Left?o:void 0,marginLeft:i===r.ButtonIconPositions.Right?o:void 0,style:{position:"relative",[o===r.Spacings.Size0?i===r.ButtonIconPositions.Left?"marginRight":i===r.ButtonIconPositions.Right?"marginLeft":"":""]:2,width:t+3,height:t+3},children:c(u=>{var f,S,d,_,g,m,E,T,A;return h.jsx(q,{style:{...u,position:"absolute",top:"0",left:"0"},children:h.jsx(ie,{name:n!==r.ButtonStates.Icon?r.ButtonStateIcon[n]:e,colorLight:(S=(f=r.BUTTON_STATE[a])==null?void 0:f.icon)!=null&&S.iconColor?(_=(d=r.BUTTON_STATE[a])==null?void 0:d.icon)==null?void 0:_.iconColor:s,colorDark:(m=(g=r.BUTTON_STATE[a])==null?void 0:g.icon)!=null&&m.iconColor?(T=(E=r.BUTTON_STATE[a])==null?void 0:E.icon)==null?void 0:T.iconColor:s,size:t,withMargin:!1,cursor:(A=r.BUTTON_STATE[a])!=null&&A.cursor?r.BUTTON_STATE[a].cursor:r.Cursors.Pointer})})})})},ei=({name:e,buttonSize:t=r.ButtonSizes.Medium,buttonColor:n=r.ButtonColors.Primary5,buttonState:s=r.ButtonStates.Icon,buttonType:i=r.ButtonTypes.Button,buttonStyle:o=r.ButtonStyles.Filled,buttonShadow:a=r.BoxShadows.Size2,icon:l,iconColor:c=r.ColorPalettes.Primary8,iconPosition:u=r.ButtonIconPositions.Left,animate:f=!0,hover:S,clickAction:d=()=>{}})=>{var O,x,N,M,R,j,D,B,G,b,w,U,$,Z,H,p,Re,F,ut,Fe,te,Ee;var _=s===r.ButtonStates.Disabled;const[g,m]=y.useState(S),[E,T]=pe({debounce:500}),[A,C]=W(()=>({y:0,transform:"scale(1.0)"})),v=f&&!_&&typeof((O=r.BUTTON_STATE[s])==null?void 0:O.animation)>"u";return h.jsxs(xe,{style:{width:"max-content"},ref:E,onMouseEnter:()=>{m(!0)},onMouseLeave:()=>{m(!1)},onMouseDown:()=>v&&C.start({transform:"scale(0.9)"}),onMouseUp:()=>v&&C.start({transform:"scale(1.0)"}),onTouchStart:()=>v&&C.start({transform:"scale(0.9)"}),onTouchCancel:()=>v&&C.start({transform:"scale(1.0)"}),onTouchEnd:()=>v&&C.start({transform:"scale(1.0)"}),children:[S&&h.jsx(kt,{labelName:e,hover:g,offsetX:T.width/2,y:T.height}),h.jsx(I,{style:v?A:void 0,children:h.jsx(Us,{type:i,onClick:d,disabled:_,paddingTop:r.BUTTON_SIZE[t].paddingTop,paddingBottom:r.BUTTON_SIZE[t].paddingBottom,paddingLeft:r.BUTTON_SIZE[t].paddingLeft,paddingRight:r.BUTTON_SIZE[t].paddingRight,borderRadius:r.BUTTON_SIZE[t].borderRadius,borderWidth:r.BUTTON_STYLE[o].border.borderWidth,borderStyle:r.BUTTON_STYLE[o].border.borderStyle,boxShadow:o&&((x=r.BUTTON_STYLE[o])!=null&&x.shadow)?r.BUTTON_STYLE[o].shadow:a,bgColor:o===r.ButtonStyles.Gray&&s===r.ButtonStates.Error?r.BUTTON_STYLE[o].bgColor:(M=(N=r.BUTTON_STATE[s])==null?void 0:N.color)!=null&&M.bgColor&&o!==r.ButtonStyles.Outlined&&o!==r.ButtonStyles.Plain?(j=(R=r.BUTTON_STATE[s])==null?void 0:R.color)==null?void 0:j.bgColor:o&&((D=r.BUTTON_STYLE[o])!=null&&D.bgColor)?r.BUTTON_STYLE[o].bgColor:r.BUTTON_COLORS[n].background,borderColor:(G=(B=r.BUTTON_STATE[s])==null?void 0:B.color)!=null&&G.borderColor?(w=(b=r.BUTTON_STATE[s])==null?void 0:b.color)==null?void 0:w.borderColor:r.BUTTON_COLORS[n].borderColor,cursor:(U=r.BUTTON_STATE[s])!=null&&U.cursor?r.BUTTON_STATE[s].cursor:r.BUTTON_STYLE[o].cursor,children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:u===r.ButtonIconPositions.Left?h.jsxs(h.Fragment,{children:[l&&h.jsx(Ir,{icon:l,iconSize:r.BUTTON_SIZE[t].icon,iconState:s,iconColor:c,iconPosition:u,iconMargin:r.BUTTON_SIZE[t].iconMargin}),e!==""&&!S&&h.jsx(q,{fontSize:r.BUTTON_SIZE[t].text,fontWeight:r.FontWeights.Size3,paletteColor:(Z=($=r.BUTTON_STATE[s])==null?void 0:$.text)!=null&&Z.color?(p=(H=r.BUTTON_STATE[s])==null?void 0:H.text)==null?void 0:p.color:o&&((Re=r.BUTTON_STYLE[o])!=null&&Re.fontColor)?r.BUTTON_STYLE[o].fontColor:r.BUTTON_COLORS[n].text,className:`name ${l?"icon-left":""}`,children:e})]}):h.jsxs(h.Fragment,{children:[e!==""&&!S&&h.jsx(q,{fontSize:r.BUTTON_SIZE[t].text,fontWeight:r.FontWeights.Size3,paletteColor:(ut=(F=r.BUTTON_STATE[s])==null?void 0:F.text)!=null&&ut.color?(te=(Fe=r.BUTTON_STATE[s])==null?void 0:Fe.text)==null?void 0:te.color:o&&((Ee=r.BUTTON_STYLE[o])!=null&&Ee.fontColor)?r.BUTTON_STYLE[o].fontColor:r.BUTTON_COLORS[n].text,className:`name ${l?"icon-right":""}`,children:e}),l&&h.jsx(Ir,{icon:l,iconSize:r.BUTTON_SIZE[t].icon,iconState:s,iconColor:c,iconPosition:u,iconMargin:r.BUTTON_SIZE[t].iconMargin})]})})})})]})},ti=({isChecked:e,size:t,checkboxColor:n=r.CheckboxColors.Grey5,onClick:s})=>h.jsx(ka,{isChecked:e,checkboxColor:n,onClick:s,children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:h.jsx(Fa,{isChecked:e,checkboxColor:n,size:t})})}),Pa={borderStyle:"solid"},ka=({isChecked:e,checkboxColor:t=r.CheckboxColors.Grey5,size:n=r.CheckboxSizes.Size3,children:s,onClick:i})=>{const[o,a]=W(()=>({borderColor:e?r.CHECKBOX_COLORS[t].borderColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].borderColor}));return a.start({borderColor:e?r.CHECKBOX_COLORS[t].borderColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].borderColor}),h.jsx(I,{onClick:i,borderRadius:r.CHECKBOX_SIZES[n].boxBorderRadius,style:{padding:r.CHECKBOX_SIZES[n].padding,borderWidth:r.CHECKBOX_SIZES[n].borderWidth,...Pa,...o,width:"max-content",cursor:i?"pointer":"default"},children:s})},Fa=({isChecked:e,checkboxColor:t=r.CheckboxColors.Grey5,size:n=r.CheckboxSizes.Size3})=>{const[s,i]=W(()=>({backgroundColor:e?r.CHECKBOX_COLORS[t].checkedColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].checkedColor,scale:e?1:.8,opacity:e?1:0}));return i.start({backgroundColor:e?r.CHECKBOX_COLORS[t].checkedColor:r.CHECKBOX_COLORS[r.CheckboxColors.Grey5].checkedColor,scale:e?1:.8,opacity:e?1:0}),h.jsx(I,{style:{width:r.CHECKBOX_SIZES[n].checkedColor.w,height:r.CHECKBOX_SIZES[n].checkedColor.h},children:h.jsx(I,{borderRadius:r.CHECKBOX_SIZES[n].checkedBorderRadius,style:{width:r.CHECKBOX_SIZES[n].checkedColor.w,height:r.CHECKBOX_SIZES[n].checkedColor.h,...s},children:h.jsx(h.Fragment,{})})})},Ba=({options:e,multiselect:t=!1,checkboxColor:n=r.CheckboxColors.Primary5,size:s,handleClick:i})=>{const o=y.useCallback(a=>{if(t)i(a);else{let l=e.findIndex(u=>u.isChecked===!0),c=e.findIndex(u=>u.id===a);l!==-1&&(c===l||i(e[l].id)),i(a)}},[i,t,e]);return h.jsx(Y,{children:e.map((a,l)=>h.jsx(za,{checkboxColor:n,id:a.id,name:a.name,isChecked:a.isChecked,size:s,value:a==null?void 0:a.value,handleClickBox:o},l))})},za=({id:e,name:t,value:n,isChecked:s,checkboxColor:i,size:o,handleClickBox:a})=>h.jsx(I,{onClick:()=>a(e,n),style:{cursor:"pointer"},children:h.jsxs(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(ti,{isChecked:s,checkboxColor:i,size:o}),h.jsx(I,{marginLeft:r.Spacings.Size2,children:h.jsx(q,{children:t})})]})});var ni=(e=>(e[e.Tiny=1]="Tiny",e[e.Small=2]="Small",e[e.Medium=3]="Medium",e[e.Big=4]="Big",e))(ni||{});const he={1:{fontSize:r.FontSizes.Size1,paddingTop:r.Spacings.Size0,paddingBottom:r.Spacings.Size0,paddingLeft:r.Spacings.Size1,paddingRight:r.Spacings.Size1,borderRadius:r.Radiuses.Size7},2:{fontSize:r.FontSizes.Size2,paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderRadius:r.Radiuses.Size7},3:{fontSize:r.FontSizes.Size3,paddingTop:r.Spacings.Size2,paddingBottom:r.Spacings.Size2,paddingLeft:r.Spacings.Size3,paddingRight:r.Spacings.Size3,borderRadius:r.Radiuses.Size7},4:{fontSize:r.FontSizes.Size4,paddingTop:r.Spacings.Size3,paddingBottom:r.Spacings.Size3,paddingLeft:r.Spacings.Size4,paddingRight:r.Spacings.Size4,borderRadius:r.Radiuses.Size7}};var ri=(e=>(e[e.Filled=1]="Filled",e[e.Outlined=2]="Outlined",e))(ri||{});const ge={1:{bgColor:r.ColorPalettes.Primary5,font:{fontColor:r.ColorPalettes.Grey9}},2:{border:{borderColor:r.ColorPalettes.Primary5,borderStyle:r.BorderStyles.Solid,borderWidth:r.BorderWidths.Size2},font:{}}},Ga=({children:e,chipColor:t=r.ColorSets.Primarys,paddings:n="all",margin:s,marginTop:i,marginBottom:o,marginLeft:a,marginRight:l,fontSize:c,chipStyle:u=ri.Filled,size:f=ni.Medium})=>{var _,g,m,E,T,A,C,v,O,x,N,M,R;const{theme:S}=V(),d=W({backgroundColor:S!==r.Themes.Light?(_=ge[u])!=null&&_.bgColor?r.COLOR_VALUES[r.ColorRanges[t][0]+2]:void 0:(g=ge[u])!=null&&g.bgColor?r.COLOR_VALUES[r.ColorRanges[t][1]-2]:void 0,color:S!==r.Themes.Light?(E=(m=ge[u])==null?void 0:m.font)!=null&&E.fontColor?(A=(T=ge[u])==null?void 0:T.font)==null?void 0:A.fontColor:r.COLOR_VALUES[r.ColorRanges[t][0]+4]:(v=(C=ge[u])==null?void 0:C.font)!=null&&v.fontColor?(x=(O=ge[u])==null?void 0:O.font)==null?void 0:x.fontColor:r.COLOR_VALUES[r.ColorRanges[t][0]+4]});return h.jsx(Y,{display:r.Displays.Flex,children:h.jsx(I,{...Ua(n,f),margin:s,marginTop:i,marginBottom:o,marginLeft:a,marginRight:l,borderRadius:he[f].borderRadius,borderColor:(N=ge[u].border)==null?void 0:N.borderColor,borderStyle:(M=ge[u].border)==null?void 0:M.borderStyle,borderWidth:(R=ge[u].border)==null?void 0:R.borderWidth,style:{...d},children:h.jsx(q,{style:{display:"inline-block",transform:"translateY(-1px)",color:"inherit"},fontSize:c||he[f].fontSize,fontWeight:r.FontWeights.Size3,children:e})})})},Ua=(e,t)=>{switch(e){case"all":return{paddingTop:he[t].paddingTop,paddingBottom:he[t].paddingBottom,paddingLeft:he[t].paddingLeft,paddingRight:he[t].paddingRight};case"left right":return{paddingLeft:he[t].paddingLeft,paddingRight:he[t].paddingRight};default:return{paddingTop:he[t].paddingTop,paddingBottom:he[t].paddingBottom}}};var Kt={exports:{}},Qt,br;function si(){return br||(br=1,Qt={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]}),Qt}var Jt={exports:{}},en,xr;function Ha(){return xr||(xr=1,en=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")}),en}var Rr;function $a(){if(Rr)return Jt.exports;Rr=1;var e=Ha(),t=Array.prototype.concat,n=Array.prototype.slice,s=Jt.exports=function(o){for(var a=[],l=0,c=o.length;l<c;l++){var u=o[l];e(u)?a=t.call(a,n.call(u)):a.push(u)}return a};return s.wrap=function(i){return function(){return i(s(arguments))}},Jt.exports}var wr;function Za(){if(wr)return Kt.exports;wr=1;var e=si(),t=$a(),n=Object.hasOwnProperty,s=Object.create(null);for(var i in e)n.call(e,i)&&(s[e[i]]=i);var o=Kt.exports={to:{},get:{}};o.get=function(c){var u=c.substring(0,3).toLowerCase(),f,S;switch(u){case"hsl":f=o.get.hsl(c),S="hsl";break;case"hwb":f=o.get.hwb(c),S="hwb";break;default:f=o.get.rgb(c),S="rgb";break}return f?{model:S,value:f}:null},o.get.rgb=function(c){if(!c)return null;var u=/^#([a-f0-9]{3,4})$/i,f=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,S=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,_=/^(\w+)$/,g=[0,0,0,1],m,E,T;if(m=c.match(f)){for(T=m[2],m=m[1],E=0;E<3;E++){var A=E*2;g[E]=parseInt(m.slice(A,A+2),16)}T&&(g[3]=parseInt(T,16)/255)}else if(m=c.match(u)){for(m=m[1],T=m[3],E=0;E<3;E++)g[E]=parseInt(m[E]+m[E],16);T&&(g[3]=parseInt(T+T,16)/255)}else if(m=c.match(S)){for(E=0;E<3;E++)g[E]=parseInt(m[E+1],0);m[4]&&(m[5]?g[3]=parseFloat(m[4])*.01:g[3]=parseFloat(m[4]))}else if(m=c.match(d)){for(E=0;E<3;E++)g[E]=Math.round(parseFloat(m[E+1])*2.55);m[4]&&(m[5]?g[3]=parseFloat(m[4])*.01:g[3]=parseFloat(m[4]))}else return(m=c.match(_))?m[1]==="transparent"?[0,0,0,0]:n.call(e,m[1])?(g=e[m[1]],g[3]=1,g):null:null;for(E=0;E<3;E++)g[E]=a(g[E],0,255);return g[3]=a(g[3],0,1),g},o.get.hsl=function(c){if(!c)return null;var u=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,f=c.match(u);if(f){var S=parseFloat(f[4]),d=(parseFloat(f[1])%360+360)%360,_=a(parseFloat(f[2]),0,100),g=a(parseFloat(f[3]),0,100),m=a(isNaN(S)?1:S,0,1);return[d,_,g,m]}return null},o.get.hwb=function(c){if(!c)return null;var u=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,f=c.match(u);if(f){var S=parseFloat(f[4]),d=(parseFloat(f[1])%360+360)%360,_=a(parseFloat(f[2]),0,100),g=a(parseFloat(f[3]),0,100),m=a(isNaN(S)?1:S,0,1);return[d,_,g,m]}return null},o.to.hex=function(){var c=t(arguments);return"#"+l(c[0])+l(c[1])+l(c[2])+(c[3]<1?l(Math.round(c[3]*255)):"")},o.to.rgb=function(){var c=t(arguments);return c.length<4||c[3]===1?"rgb("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+")":"rgba("+Math.round(c[0])+", "+Math.round(c[1])+", "+Math.round(c[2])+", "+c[3]+")"},o.to.rgb.percent=function(){var c=t(arguments),u=Math.round(c[0]/255*100),f=Math.round(c[1]/255*100),S=Math.round(c[2]/255*100);return c.length<4||c[3]===1?"rgb("+u+"%, "+f+"%, "+S+"%)":"rgba("+u+"%, "+f+"%, "+S+"%, "+c[3]+")"},o.to.hsl=function(){var c=t(arguments);return c.length<4||c[3]===1?"hsl("+c[0]+", "+c[1]+"%, "+c[2]+"%)":"hsla("+c[0]+", "+c[1]+"%, "+c[2]+"%, "+c[3]+")"},o.to.hwb=function(){var c=t(arguments),u="";return c.length>=4&&c[3]!==1&&(u=", "+c[3]),"hwb("+c[0]+", "+c[1]+"%, "+c[2]+"%"+u+")"},o.to.keyword=function(c){return s[c.slice(0,3)]};function a(c,u,f){return Math.min(Math.max(u,c),f)}function l(c){var u=Math.round(c).toString(16).toUpperCase();return u.length<2?"0"+u:u}return Kt.exports}var tn,Nr;function ii(){if(Nr)return tn;Nr=1;const e=si(),t={};for(const i of Object.keys(e))t[e[i]]=i;const n={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"]}};tn=n;for(const i of Object.keys(n)){if(!("channels"in n[i]))throw new Error("missing channels property: "+i);if(!("labels"in n[i]))throw new Error("missing channel labels property: "+i);if(n[i].labels.length!==n[i].channels)throw new Error("channel and label counts mismatch: "+i);const{channels:o,labels:a}=n[i];delete n[i].channels,delete n[i].labels,Object.defineProperty(n[i],"channels",{value:o}),Object.defineProperty(n[i],"labels",{value:a})}n.rgb.hsl=function(i){const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.min(o,a,l),u=Math.max(o,a,l),f=u-c;let S,d;u===c?S=0:o===u?S=(a-l)/f:a===u?S=2+(l-o)/f:l===u&&(S=4+(o-a)/f),S=Math.min(S*60,360),S<0&&(S+=360);const _=(c+u)/2;return u===c?d=0:_<=.5?d=f/(u+c):d=f/(2-u-c),[S,d*100,_*100]},n.rgb.hsv=function(i){let o,a,l,c,u;const f=i[0]/255,S=i[1]/255,d=i[2]/255,_=Math.max(f,S,d),g=_-Math.min(f,S,d),m=function(E){return(_-E)/6/g+1/2};return g===0?(c=0,u=0):(u=g/_,o=m(f),a=m(S),l=m(d),f===_?c=l-a:S===_?c=1/3+o-l:d===_&&(c=2/3+a-o),c<0?c+=1:c>1&&(c-=1)),[c*360,u*100,_*100]},n.rgb.hwb=function(i){const o=i[0],a=i[1];let l=i[2];const c=n.rgb.hsl(i)[0],u=1/255*Math.min(o,Math.min(a,l));return l=1-1/255*Math.max(o,Math.max(a,l)),[c,u*100,l*100]},n.rgb.cmyk=function(i){const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.min(1-o,1-a,1-l),u=(1-o-c)/(1-c)||0,f=(1-a-c)/(1-c)||0,S=(1-l-c)/(1-c)||0;return[u*100,f*100,S*100,c*100]};function s(i,o){return(i[0]-o[0])**2+(i[1]-o[1])**2+(i[2]-o[2])**2}return n.rgb.keyword=function(i){const o=t[i];if(o)return o;let a=1/0,l;for(const c of Object.keys(e)){const u=e[c],f=s(i,u);f<a&&(a=f,l=c)}return l},n.keyword.rgb=function(i){return e[i]},n.rgb.xyz=function(i){let o=i[0]/255,a=i[1]/255,l=i[2]/255;o=o>.04045?((o+.055)/1.055)**2.4:o/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92,l=l>.04045?((l+.055)/1.055)**2.4:l/12.92;const c=o*.4124+a*.3576+l*.1805,u=o*.2126+a*.7152+l*.0722,f=o*.0193+a*.1192+l*.9505;return[c*100,u*100,f*100]},n.rgb.lab=function(i){const o=n.rgb.xyz(i);let a=o[0],l=o[1],c=o[2];a/=95.047,l/=100,c/=108.883,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116,c=c>.008856?c**(1/3):7.787*c+16/116;const u=116*l-16,f=500*(a-l),S=200*(l-c);return[u,f,S]},n.hsl.rgb=function(i){const o=i[0]/360,a=i[1]/100,l=i[2]/100;let c,u,f;if(a===0)return f=l*255,[f,f,f];l<.5?c=l*(1+a):c=l+a-l*a;const S=2*l-c,d=[0,0,0];for(let _=0;_<3;_++)u=o+1/3*-(_-1),u<0&&u++,u>1&&u--,6*u<1?f=S+(c-S)*6*u:2*u<1?f=c:3*u<2?f=S+(c-S)*(2/3-u)*6:f=S,d[_]=f*255;return d},n.hsl.hsv=function(i){const o=i[0];let a=i[1]/100,l=i[2]/100,c=a;const u=Math.max(l,.01);l*=2,a*=l<=1?l:2-l,c*=u<=1?u:2-u;const f=(l+a)/2,S=l===0?2*c/(u+c):2*a/(l+a);return[o,S*100,f*100]},n.hsv.rgb=function(i){const o=i[0]/60,a=i[1]/100;let l=i[2]/100;const c=Math.floor(o)%6,u=o-Math.floor(o),f=255*l*(1-a),S=255*l*(1-a*u),d=255*l*(1-a*(1-u));switch(l*=255,c){case 0:return[l,d,f];case 1:return[S,l,f];case 2:return[f,l,d];case 3:return[f,S,l];case 4:return[d,f,l];case 5:return[l,f,S]}},n.hsv.hsl=function(i){const o=i[0],a=i[1]/100,l=i[2]/100,c=Math.max(l,.01);let u,f;f=(2-a)*l;const S=(2-a)*c;return u=a*c,u/=S<=1?S:2-S,u=u||0,f/=2,[o,u*100,f*100]},n.hwb.rgb=function(i){const o=i[0]/360;let a=i[1]/100,l=i[2]/100;const c=a+l;let u;c>1&&(a/=c,l/=c);const f=Math.floor(6*o),S=1-l;u=6*o-f,f&1&&(u=1-u);const d=a+u*(S-a);let _,g,m;switch(f){default:case 6:case 0:_=S,g=d,m=a;break;case 1:_=d,g=S,m=a;break;case 2:_=a,g=S,m=d;break;case 3:_=a,g=d,m=S;break;case 4:_=d,g=a,m=S;break;case 5:_=S,g=a,m=d;break}return[_*255,g*255,m*255]},n.cmyk.rgb=function(i){const o=i[0]/100,a=i[1]/100,l=i[2]/100,c=i[3]/100,u=1-Math.min(1,o*(1-c)+c),f=1-Math.min(1,a*(1-c)+c),S=1-Math.min(1,l*(1-c)+c);return[u*255,f*255,S*255]},n.xyz.rgb=function(i){const o=i[0]/100,a=i[1]/100,l=i[2]/100;let c,u,f;return c=o*3.2406+a*-1.5372+l*-.4986,u=o*-.9689+a*1.8758+l*.0415,f=o*.0557+a*-.204+l*1.057,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,f=f>.0031308?1.055*f**(1/2.4)-.055:f*12.92,c=Math.min(Math.max(0,c),1),u=Math.min(Math.max(0,u),1),f=Math.min(Math.max(0,f),1),[c*255,u*255,f*255]},n.xyz.lab=function(i){let o=i[0],a=i[1],l=i[2];o/=95.047,a/=100,l/=108.883,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;const c=116*a-16,u=500*(o-a),f=200*(a-l);return[c,u,f]},n.lab.xyz=function(i){const o=i[0],a=i[1],l=i[2];let c,u,f;u=(o+16)/116,c=a/500+u,f=u-l/200;const S=u**3,d=c**3,_=f**3;return u=S>.008856?S:(u-16/116)/7.787,c=d>.008856?d:(c-16/116)/7.787,f=_>.008856?_:(f-16/116)/7.787,c*=95.047,u*=100,f*=108.883,[c,u,f]},n.lab.lch=function(i){const o=i[0],a=i[1],l=i[2];let c;c=Math.atan2(l,a)*360/2/Math.PI,c<0&&(c+=360);const f=Math.sqrt(a*a+l*l);return[o,f,c]},n.lch.lab=function(i){const o=i[0],a=i[1],c=i[2]/360*2*Math.PI,u=a*Math.cos(c),f=a*Math.sin(c);return[o,u,f]},n.rgb.ansi16=function(i,o=null){const[a,l,c]=i;let u=o===null?n.rgb.hsv(i)[2]:o;if(u=Math.round(u/50),u===0)return 30;let f=30+(Math.round(c/255)<<2|Math.round(l/255)<<1|Math.round(a/255));return u===2&&(f+=60),f},n.hsv.ansi16=function(i){return n.rgb.ansi16(n.hsv.rgb(i),i[2])},n.rgb.ansi256=function(i){const o=i[0],a=i[1],l=i[2];return o===a&&a===l?o<8?16:o>248?231:Math.round((o-8)/247*24)+232:16+36*Math.round(o/255*5)+6*Math.round(a/255*5)+Math.round(l/255*5)},n.ansi16.rgb=function(i){let o=i%10;if(o===0||o===7)return i>50&&(o+=3.5),o=o/10.5*255,[o,o,o];const a=(~~(i>50)+1)*.5,l=(o&1)*a*255,c=(o>>1&1)*a*255,u=(o>>2&1)*a*255;return[l,c,u]},n.ansi256.rgb=function(i){if(i>=232){const u=(i-232)*10+8;return[u,u,u]}i-=16;let o;const a=Math.floor(i/36)/5*255,l=Math.floor((o=i%36)/6)/5*255,c=o%6/5*255;return[a,l,c]},n.rgb.hex=function(i){const a=(((Math.round(i[0])&255)<<16)+((Math.round(i[1])&255)<<8)+(Math.round(i[2])&255)).toString(16).toUpperCase();return"000000".substring(a.length)+a},n.hex.rgb=function(i){const o=i.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!o)return[0,0,0];let a=o[0];o[0].length===3&&(a=a.split("").map(S=>S+S).join(""));const l=parseInt(a,16),c=l>>16&255,u=l>>8&255,f=l&255;return[c,u,f]},n.rgb.hcg=function(i){const o=i[0]/255,a=i[1]/255,l=i[2]/255,c=Math.max(Math.max(o,a),l),u=Math.min(Math.min(o,a),l),f=c-u;let S,d;return f<1?S=u/(1-f):S=0,f<=0?d=0:c===o?d=(a-l)/f%6:c===a?d=2+(l-o)/f:d=4+(o-a)/f,d/=6,d%=1,[d*360,f*100,S*100]},n.hsl.hcg=function(i){const o=i[1]/100,a=i[2]/100,l=a<.5?2*o*a:2*o*(1-a);let c=0;return l<1&&(c=(a-.5*l)/(1-l)),[i[0],l*100,c*100]},n.hsv.hcg=function(i){const o=i[1]/100,a=i[2]/100,l=o*a;let c=0;return l<1&&(c=(a-l)/(1-l)),[i[0],l*100,c*100]},n.hcg.rgb=function(i){const o=i[0]/360,a=i[1]/100,l=i[2]/100;if(a===0)return[l*255,l*255,l*255];const c=[0,0,0],u=o%1*6,f=u%1,S=1-f;let d=0;switch(Math.floor(u)){case 0:c[0]=1,c[1]=f,c[2]=0;break;case 1:c[0]=S,c[1]=1,c[2]=0;break;case 2:c[0]=0,c[1]=1,c[2]=f;break;case 3:c[0]=0,c[1]=S,c[2]=1;break;case 4:c[0]=f,c[1]=0,c[2]=1;break;default:c[0]=1,c[1]=0,c[2]=S}return d=(1-a)*l,[(a*c[0]+d)*255,(a*c[1]+d)*255,(a*c[2]+d)*255]},n.hcg.hsv=function(i){const o=i[1]/100,a=i[2]/100,l=o+a*(1-o);let c=0;return l>0&&(c=o/l),[i[0],c*100,l*100]},n.hcg.hsl=function(i){const o=i[1]/100,l=i[2]/100*(1-o)+.5*o;let c=0;return l>0&&l<.5?c=o/(2*l):l>=.5&&l<1&&(c=o/(2*(1-l))),[i[0],c*100,l*100]},n.hcg.hwb=function(i){const o=i[1]/100,a=i[2]/100,l=o+a*(1-o);return[i[0],(l-o)*100,(1-l)*100]},n.hwb.hcg=function(i){const o=i[1]/100,l=1-i[2]/100,c=l-o;let u=0;return c<1&&(u=(l-c)/(1-c)),[i[0],c*100,u*100]},n.apple.rgb=function(i){return[i[0]/65535*255,i[1]/65535*255,i[2]/65535*255]},n.rgb.apple=function(i){return[i[0]/255*65535,i[1]/255*65535,i[2]/255*65535]},n.gray.rgb=function(i){return[i[0]/100*255,i[0]/100*255,i[0]/100*255]},n.gray.hsl=function(i){return[0,0,i[0]]},n.gray.hsv=n.gray.hsl,n.gray.hwb=function(i){return[0,100,i[0]]},n.gray.cmyk=function(i){return[0,0,0,i[0]]},n.gray.lab=function(i){return[i[0],0,0]},n.gray.hex=function(i){const o=Math.round(i[0]/100*255)&255,l=((o<<16)+(o<<8)+o).toString(16).toUpperCase();return"000000".substring(l.length)+l},n.rgb.gray=function(i){return[(i[0]+i[1]+i[2])/3/255*100]},tn}var nn,Dr;function Ya(){if(Dr)return nn;Dr=1;const e=ii();function t(){const o={},a=Object.keys(e);for(let l=a.length,c=0;c<l;c++)o[a[c]]={distance:-1,parent:null};return o}function n(o){const a=t(),l=[o];for(a[o].distance=0;l.length;){const c=l.pop(),u=Object.keys(e[c]);for(let f=u.length,S=0;S<f;S++){const d=u[S],_=a[d];_.distance===-1&&(_.distance=a[c].distance+1,_.parent=c,l.unshift(d))}}return a}function s(o,a){return function(l){return a(o(l))}}function i(o,a){const l=[a[o].parent,o];let c=e[a[o].parent][o],u=a[o].parent;for(;a[u].parent;)l.unshift(a[u].parent),c=s(e[a[u].parent][u],c),u=a[u].parent;return c.conversion=l,c}return nn=function(o){const a=n(o),l={},c=Object.keys(a);for(let u=c.length,f=0;f<u;f++){const S=c[f];a[S].parent!==null&&(l[S]=i(S,a))}return l},nn}var rn,jr;function Va(){if(jr)return rn;jr=1;const e=ii(),t=Ya(),n={},s=Object.keys(e);function i(a){const l=function(...c){const u=c[0];return u==null?u:(u.length>1&&(c=u),a(c))};return"conversion"in a&&(l.conversion=a.conversion),l}function o(a){const l=function(...c){const u=c[0];if(u==null)return u;u.length>1&&(c=u);const f=a(c);if(typeof f=="object")for(let S=f.length,d=0;d<S;d++)f[d]=Math.round(f[d]);return f};return"conversion"in a&&(l.conversion=a.conversion),l}return s.forEach(a=>{n[a]={},Object.defineProperty(n[a],"channels",{value:e[a].channels}),Object.defineProperty(n[a],"labels",{value:e[a].labels});const l=t(a);Object.keys(l).forEach(u=>{const f=l[u];n[a][u]=o(f),n[a][u].raw=i(f)})}),rn=n,rn}var sn,Mr;function Xa(){if(Mr)return sn;Mr=1;const e=Za(),t=Va(),n=["keyword","gray","hex"],s={};for(const d of Object.keys(t))s[[...t[d].labels].sort().join("")]=d;const i={};function o(d,_){if(!(this instanceof o))return new o(d,_);if(_&&_ in n&&(_=null),_&&!(_ in t))throw new Error("Unknown model: "+_);let g,m;if(d==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(d instanceof o)this.model=d.model,this.color=[...d.color],this.valpha=d.valpha;else if(typeof d=="string"){const E=e.get(d);if(E===null)throw new Error("Unable to parse color from string: "+d);this.model=E.model,m=t[this.model].channels,this.color=E.value.slice(0,m),this.valpha=typeof E.value[m]=="number"?E.value[m]:1}else if(d.length>0){this.model=_||"rgb",m=t[this.model].channels;const E=Array.prototype.slice.call(d,0,m);this.color=S(E,m),this.valpha=typeof d[m]=="number"?d[m]:1}else if(typeof d=="number")this.model="rgb",this.color=[d>>16&255,d>>8&255,d&255],this.valpha=1;else{this.valpha=1;const E=Object.keys(d);"alpha"in d&&(E.splice(E.indexOf("alpha"),1),this.valpha=typeof d.alpha=="number"?d.alpha:0);const T=E.sort().join("");if(!(T in s))throw new Error("Unable to parse color from object: "+JSON.stringify(d));this.model=s[T];const{labels:A}=t[this.model],C=[];for(g=0;g<A.length;g++)C.push(d[A[g]]);this.color=S(C)}if(i[this.model])for(m=t[this.model].channels,g=0;g<m;g++){const E=i[this.model][g];E&&(this.color[g]=E(this.color[g]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}o.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(d){let _=this.model in e.to?this:this.rgb();_=_.round(typeof d=="number"?d:1);const g=_.valpha===1?_.color:[..._.color,this.valpha];return e.to[_.model](g)},percentString(d){const _=this.rgb().round(typeof d=="number"?d:1),g=_.valpha===1?_.color:[..._.color,this.valpha];return e.to.rgb.percent(g)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const d={},{channels:_}=t[this.model],{labels:g}=t[this.model];for(let m=0;m<_;m++)d[g[m]]=this.color[m];return this.valpha!==1&&(d.alpha=this.valpha),d},unitArray(){const d=this.rgb().color;return d[0]/=255,d[1]/=255,d[2]/=255,this.valpha!==1&&d.push(this.valpha),d},unitObject(){const d=this.rgb().object();return d.r/=255,d.g/=255,d.b/=255,this.valpha!==1&&(d.alpha=this.valpha),d},round(d){return d=Math.max(d||0,0),new o([...this.color.map(l(d)),this.valpha],this.model)},alpha(d){return d!==void 0?new o([...this.color,Math.max(0,Math.min(1,d))],this.model):this.valpha},red:c("rgb",0,u(255)),green:c("rgb",1,u(255)),blue:c("rgb",2,u(255)),hue:c(["hsl","hsv","hsl","hwb","hcg"],0,d=>(d%360+360)%360),saturationl:c("hsl",1,u(100)),lightness:c("hsl",2,u(100)),saturationv:c("hsv",1,u(100)),value:c("hsv",2,u(100)),chroma:c("hcg",1,u(100)),gray:c("hcg",2,u(100)),white:c("hwb",1,u(100)),wblack:c("hwb",2,u(100)),cyan:c("cmyk",0,u(100)),magenta:c("cmyk",1,u(100)),yellow:c("cmyk",2,u(100)),black:c("cmyk",3,u(100)),x:c("xyz",0,u(95.047)),y:c("xyz",1,u(100)),z:c("xyz",2,u(108.833)),l:c("lab",0,u(100)),a:c("lab",1),b:c("lab",2),keyword(d){return d!==void 0?new o(d):t[this.model].keyword(this.color)},hex(d){return d!==void 0?new o(d):e.to.hex(this.rgb().round().color)},hexa(d){if(d!==void 0)return new o(d);const _=this.rgb().round().color;let g=Math.round(this.valpha*255).toString(16).toUpperCase();return g.length===1&&(g="0"+g),e.to.hex(_)+g},rgbNumber(){const d=this.rgb().color;return(d[0]&255)<<16|(d[1]&255)<<8|d[2]&255},luminosity(){const d=this.rgb().color,_=[];for(const[g,m]of d.entries()){const E=m/255;_[g]=E<=.04045?E/12.92:((E+.055)/1.055)**2.4}return .2126*_[0]+.7152*_[1]+.0722*_[2]},contrast(d){const _=this.luminosity(),g=d.luminosity();return _>g?(_+.05)/(g+.05):(g+.05)/(_+.05)},level(d){const _=this.contrast(d);return _>=7?"AAA":_>=4.5?"AA":""},isDark(){const d=this.rgb().color;return(d[0]*2126+d[1]*7152+d[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const d=this.rgb();for(let _=0;_<3;_++)d.color[_]=255-d.color[_];return d},lighten(d){const _=this.hsl();return _.color[2]+=_.color[2]*d,_},darken(d){const _=this.hsl();return _.color[2]-=_.color[2]*d,_},saturate(d){const _=this.hsl();return _.color[1]+=_.color[1]*d,_},desaturate(d){const _=this.hsl();return _.color[1]-=_.color[1]*d,_},whiten(d){const _=this.hwb();return _.color[1]+=_.color[1]*d,_},blacken(d){const _=this.hwb();return _.color[2]+=_.color[2]*d,_},grayscale(){const d=this.rgb().color,_=d[0]*.3+d[1]*.59+d[2]*.11;return o.rgb(_,_,_)},fade(d){return this.alpha(this.valpha-this.valpha*d)},opaquer(d){return this.alpha(this.valpha+this.valpha*d)},rotate(d){const _=this.hsl();let g=_.color[0];return g=(g+d)%360,g=g<0?360+g:g,_.color[0]=g,_},mix(d,_){if(!d||!d.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof d);const g=d.rgb(),m=this.rgb(),E=_===void 0?.5:_,T=2*E-1,A=g.alpha()-m.alpha(),C=((T*A===-1?T:(T+A)/(1+T*A))+1)/2,v=1-C;return o.rgb(C*g.red()+v*m.red(),C*g.green()+v*m.green(),C*g.blue()+v*m.blue(),g.alpha()*E+m.alpha()*(1-E))}};for(const d of Object.keys(t)){if(n.includes(d))continue;const{channels:_}=t[d];o.prototype[d]=function(...g){return this.model===d?new o(this):g.length>0?new o(g,d):new o([...f(t[this.model][d].raw(this.color)),this.valpha],d)},o[d]=function(...g){let m=g[0];return typeof m=="number"&&(m=S(g,_)),new o(m,d)}}function a(d,_){return Number(d.toFixed(_))}function l(d){return function(_){return a(_,d)}}function c(d,_,g){d=Array.isArray(d)?d:[d];for(const m of d)(i[m]||(i[m]=[]))[_]=g;return d=d[0],function(m){let E;return m!==void 0?(g&&(m=g(m)),E=this[d](),E.color[_]=m,E):(E=this[d]().color[_],g&&(E=g(E)),E)}}function u(d){return function(_){return Math.max(0,Math.min(d,_))}}function f(d){return Array.isArray(d)?d:[d]}function S(d,_){for(let g=0;g<_;g++)typeof d[g]!="number"&&(d[g]=0);return d}return sn=o,sn}var Wa=Xa();const qa=Ys(Wa),oi=({size:e,color:t=r.ColorPalettes.Primary5,text:n})=>{let s=r.COLOR_VALUES[r.ColorPalettes.Grey10];if(n&&n!==""&&typeof t=="string"){const i=qa(t);i.luminosity()>.5?s=i.darken(.8).hex():s=i.lighten(.35).hex()}return h.jsx(Y,{children:n&&h.jsx(I,{marginTop:r.TAG_SIZE[e].margins.marginTop,marginBottom:r.TAG_SIZE[e].margins.marginBottom,marginLeft:r.TAG_SIZE[e].margins.marginLeft,marginRight:r.TAG_SIZE[e].margins.marginRight,style:{width:r.TAG_SIZE[e].width,height:r.TAG_SIZE[e].height,borderRadius:"50%",backgroundColor:typeof t=="number"?r.COLOR_VALUES[t]:t,color:s},children:h.jsx(q,{children:n})})})},Ka=(e,t)=>{const[n,s]=y.useState(e);return y.useEffect(()=>{const i=setTimeout(()=>{s(e)},t);return()=>{clearTimeout(i)}},[e,t]),n};function Ft(){return(Ft=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e}).apply(this,arguments)}function ai(e,t){if(e==null)return{};var n,s,i={},o=Object.keys(e);for(s=0;s<o.length;s++)t.indexOf(n=o[s])>=0||(i[n]=e[n]);return i}function On(e){var t=y.useRef(e),n=y.useRef(function(s){t.current&&t.current(s)});return t.current=e,n.current}var st=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e<t?t:e},Xe=function(e){return"touches"in e},Ln=function(e){return e&&e.ownerDocument.defaultView||self},Pr=function(e,t,n){var s=e.getBoundingClientRect(),i=Xe(t)?function(o,a){for(var l=0;l<o.length;l++)if(o[l].identifier===a)return o[l];return o[0]}(t.touches,n):t;return{left:st((i.pageX-(s.left+Ln(e).pageXOffset))/s.width),top:st((i.pageY-(s.top+Ln(e).pageYOffset))/s.height)}},kr=function(e){!Xe(e)&&e.preventDefault()},ci=y.memo(function(e){var t=e.onMove,n=e.onKey,s=ai(e,["onMove","onKey"]),i=y.useRef(null),o=On(t),a=On(n),l=y.useRef(null),c=y.useRef(!1),u=y.useMemo(function(){var _=function(E){kr(E),(Xe(E)?E.touches.length>0:E.buttons>0)&&i.current?o(Pr(i.current,E,l.current)):m(!1)},g=function(){return m(!1)};function m(E){var T=c.current,A=Ln(i.current),C=E?A.addEventListener:A.removeEventListener;C(T?"touchmove":"mousemove",_),C(T?"touchend":"mouseup",g)}return[function(E){var T=E.nativeEvent,A=i.current;if(A&&(kr(T),!function(v,O){return O&&!Xe(v)}(T,c.current)&&A)){if(Xe(T)){c.current=!0;var C=T.changedTouches||[];C.length&&(l.current=C[0].identifier)}A.focus(),o(Pr(A,T,l.current)),m(!0)}},function(E){var T=E.which||E.keyCode;T<37||T>40||(E.preventDefault(),a({left:T===39?.05:T===37?-.05:0,top:T===40?.05:T===38?-.05:0}))},m]},[a,o]),f=u[0],S=u[1],d=u[2];return y.useEffect(function(){return d},[d]),y.createElement("div",Ft({},s,{onTouchStart:f,onMouseDown:f,className:"react-colorful__interactive",ref:i,onKeyDown:S,tabIndex:0,role:"slider"}))}),Wn=function(e){return e.filter(Boolean).join(" ")},ui=function(e){var t=e.color,n=e.left,s=e.top,i=s===void 0?.5:s,o=Wn(["react-colorful__pointer",e.className]);return y.createElement("div",{className:o,style:{top:100*i+"%",left:100*n+"%"}},y.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Q=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Qa=function(e){return rc(vn(e))},vn=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?Q(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?Q(parseInt(e.substring(6,8),16)/255,2):1}},Ja=function(e){return nc(tc(e))},ec=function(e){var t=e.s,n=e.v,s=e.a,i=(200-t)*n/100;return{h:Q(e.h),s:Q(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Q(i/2),a:Q(s,2)}},In=function(e){var t=ec(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},tc=function(e){var t=e.h,n=e.s,s=e.v,i=e.a;t=t/360*6,n/=100,s/=100;var o=Math.floor(t),a=s*(1-n),l=s*(1-(t-o)*n),c=s*(1-(1-t+o)*n),u=o%6;return{r:Q(255*[s,l,a,a,c,s][u]),g:Q(255*[c,s,s,l,a,a][u]),b:Q(255*[a,a,c,s,s,l][u]),a:Q(i,2)}},_t=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},nc=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,o=i<1?_t(Q(255*i)):"";return"#"+_t(t)+_t(n)+_t(s)+o},rc=function(e){var t=e.r,n=e.g,s=e.b,i=e.a,o=Math.max(t,n,s),a=o-Math.min(t,n,s),l=a?o===t?(n-s)/a:o===n?2+(s-t)/a:4+(t-n)/a:0;return{h:Q(60*(l<0?l+6:l)),s:Q(o?a/o*100:0),v:Q(o/255*100),a:i}},sc=y.memo(function(e){var t=e.hue,n=e.onChange,s=Wn(["react-colorful__hue",e.className]);return y.createElement("div",{className:s},y.createElement(ci,{onMove:function(i){n({h:360*i.left})},onKey:function(i){n({h:st(t+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":Q(t),"aria-valuemax":"360","aria-valuemin":"0"},y.createElement(ui,{className:"react-colorful__hue-pointer",left:t/360,color:In({h:t,s:100,v:100,a:1})})))}),ic=y.memo(function(e){var t=e.hsva,n=e.onChange,s={backgroundColor:In({h:t.h,s:100,v:100,a:1})};return y.createElement("div",{className:"react-colorful__saturation",style:s},y.createElement(ci,{onMove:function(i){n({s:100*i.left,v:100-100*i.top})},onKey:function(i){n({s:st(t.s+100*i.left,0,100),v:st(t.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Q(t.s)+"%, Brightness "+Q(t.v)+"%"},y.createElement(ui,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:In(t)})))}),li=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},oc=function(e,t){return e.toLowerCase()===t.toLowerCase()||li(vn(e),vn(t))};function ac(e,t,n){var s=On(n),i=y.useState(function(){return e.toHsva(t)}),o=i[0],a=i[1],l=y.useRef({color:t,hsva:o});y.useEffect(function(){if(!e.equal(t,l.current.color)){var u=e.toHsva(t);l.current={hsva:u,color:t},a(u)}},[t,e]),y.useEffect(function(){var u;li(o,l.current.hsva)||e.equal(u=e.fromHsva(o),l.current.color)||(l.current={hsva:o,color:u},s(u))},[o,e,s]);var c=y.useCallback(function(u){a(function(f){return Object.assign({},f,u)})},[]);return[o,c]}var cc=typeof window<"u"?y.useLayoutEffect:y.useEffect,uc=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},Fr=new Map,lc=function(e){cc(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!Fr.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,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,Fr.set(t,n);var s=uc();s&&n.setAttribute("nonce",s),t.head.appendChild(n)}},[])},fc=function(e){var t=e.className,n=e.colorModel,s=e.color,i=s===void 0?n.defaultColor:s,o=e.onChange,a=ai(e,["className","colorModel","color","onChange"]),l=y.useRef(null);lc(l);var c=ac(n,i,o),u=c[0],f=c[1],S=Wn(["react-colorful",t]);return y.createElement("div",Ft({},a,{ref:l,className:S}),y.createElement(ic,{hsva:u,onChange:f}),y.createElement(sc,{hue:u.h,onChange:f,className:"react-colorful__last-control"}))},dc={defaultColor:"000",toHsva:Qa,fromHsva:function(e){return Ja({h:e.h,s:e.s,v:e.v,a:1})},equal:oc},hc=function(e){return y.createElement(fc,Ft({},e,{colorModel:dc}))};const qn=e=>{const t=y.useRef(null);return y.useEffect(()=>{const n=s=>{t.current&&(t.current.contains(s.target)||e())};return document&&document.addEventListener("mousedown",n),()=>{document&&document.removeEventListener("mousedown",n)}}),t},Sc="_colorfulcontainer_1kkrb_1",_c="_absolute_1kkrb_2",pc={colorfulcontainer:Sc,absolute:_c,"react-colorful":"_react-colorful_1kkrb_8","react-colorful__saturation":"_react-colorful__saturation_1kkrb_13","react-colorful__hue":"_react-colorful__hue_1kkrb_18","react-colorful__hue-pointer":"_react-colorful__hue-pointer_1kkrb_25"},gc=({position:e,selectColor:t,closePicker:n,handleColorChange:s})=>{const i=qn(()=>{n&&n(!1)});return h.jsx("div",{ref:i,style:{position:e},children:h.jsx(Y,{display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,children:h.jsx(I,{children:h.jsx(I,{className:pc.colorfulcontainer,children:h.jsx(hc,{color:t,onChange:s})})})})})},mc=({defaultColor:e="#eeeeee",setInput:t,setColor:n,inputName:s=void 0,closePicker:i=void 0,position:o="absolute"})=>{const[a,l]=y.useState(e||"#eee");y.useEffect(()=>{l(e||"#eee")},[e]);const c=f=>{l(f)},u=Ka(a,250);return y.useEffect(()=>{n&&n(u),t&&t(f=>({...f,[`${s||"edit_color"}`]:u}))},[u,s,t,n]),h.jsxs("div",{children:[h.jsxs("div",{className:"title",children:[h.jsx("span",{children:"Choose color: "}),h.jsx(oi,{color:a,size:r.TagColorSizes.Large})]}),h.jsx(gc,{selectColor:a,handleColorChange:c,position:o,closePicker:i})]})};function Ec(e,t=()=>{},n="keydown"){const s=i=>{i.key===e&&t()};y.useEffect(()=>(document&&document.addEventListener(n,s,!1),()=>{document&&document.removeEventListener(n,s,!1)}),[n])}const Kn={[r.Portals.GlobalEventNotification]:{id:"#papnot",html:h.jsx("div",{id:"papnot"})},[r.Portals.Modals]:{id:"#pmodmodify",html:h.jsx("div",{id:"pmodmodify"})}},Tc=({children:e})=>{const[t,n]=y.useState(!1);return y.useEffect(()=>(n(!0),()=>{n(!1)}),[]),t?Rn.createPortal(e,document.querySelector(Kn[r.Portals.Modals].id)||document.body):null},yc="_modalBgAnimated_o2uzj_11",Ac="_modalCardCopyOriAnimated_o2uzj_18",Cc="_wrapperContainer_o2uzj_49",We={modalBgAnimated:yc,modalCardCopyOriAnimated:Ac,"no-card":"_no-card_o2uzj_38",wrapperContainer:Cc},Oc=({isShown:e,modalBackground:t})=>ue(e,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}})((s,i)=>i&&h.jsx(I,{className:We.modalBgAnimated,style:{...s,backgroundColor:t?`${r.COLOR_VALUES[t]}${r.COLOR_RGBA_ALPHA[r.ColorRGBAAlphas.Dark3]}`:"#0000007f"}}));function Lc(e,t,n){return Math.max(t,Math.min(e,n))}const K={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function Br(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function zr(e,t,n,s=.15){return s===0?Lc(e,t,n):e<t?-Br(t-e,n-t,s)+t:e>n?+Br(e-n,n-t,s)+n:e}function vc(e,[t,n],[s,i]){const[[o,a],[l,c]]=e;return[zr(t,o,a,s),zr(n,l,c,i)]}function Ic(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bc(e){var t=Ic(e,"string");return typeof t=="symbol"?t:String(t)}function J(e,t,n){return t=bc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,s)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gr(Object(n),!0).forEach(function(s){J(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gr(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}const fi={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function Ur(e){return e?e[0].toUpperCase()+e.slice(1):""}const xc=["enter","leave"];function Rc(e=!1,t){return e&&!xc.includes(t)}function wc(e,t="",n=!1){const s=fi[e],i=s&&s[t]||t;return"on"+Ur(e)+Ur(i)+(Rc(n,i)?"Capture":"")}const Nc=["gotpointercapture","lostpointercapture"];function Dc(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const s=Nc.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(s);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:n}}function jc(e,t=""){const n=fi[e],s=n&&n[t]||t;return e+s}function Bt(e){return"touches"in e}function di(e){return Bt(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function Mc(e){return Array.from(e.touches).filter(t=>{var n,s;return t.target===e.currentTarget||((n=e.currentTarget)===null||n===void 0||(s=n.contains)===null||s===void 0?void 0:s.call(n,t.target))})}function Pc(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function hi(e){return Bt(e)?Pc(e)[0]:e}function bn(e,t){try{const n=t.clientX-e.clientX,s=t.clientY-e.clientY,i=(t.clientX+e.clientX)/2,o=(t.clientY+e.clientY)/2,a=Math.hypot(n,s);return{angle:-(Math.atan2(n,s)*180)/Math.PI,distance:a,origin:[i,o]}}catch{}return null}function kc(e){return Mc(e).map(t=>t.identifier)}function Hr(e,t){const[n,s]=Array.from(e.touches).filter(i=>t.includes(i.identifier));return bn(n,s)}function on(e){const t=hi(e);return Bt(e)?t.identifier:t.pointerId}function $r(e){const t=hi(e);return[t.clientX,t.clientY]}const Zr=40,Yr=800;function Fc(e){let{deltaX:t,deltaY:n,deltaMode:s}=e;return s===1?(t*=Zr,n*=Zr):s===2&&(t*=Yr,n*=Yr),[t,n]}function Bc(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:s,metaKey:i,ctrlKey:o}=e;Object.assign(t,{shiftKey:n,altKey:s,metaKey:i,ctrlKey:o})}return t}function Lt(e,...t){return typeof e=="function"?e(...t):e}function zc(){}function Gc(...e){return e.length===0?zc:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function Vr(e,t){return Object.assign({},t,e||{})}const Uc=32;class Si{constructor(t,n,s){this.ctrl=t,this.args=n,this.key=s,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:n,ingKey:s,args:i}=this;n[s]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=i,t.axis=void 0,t.memo=void 0,t.elapsedTime=t.timeDelta=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const n=this.state,s=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=t.target,n.currentTarget=t.currentTarget,n.lastOffset=s.from?Lt(s.from,n):n.offset,n.offset=n.lastOffset,n.startTime=n.timeStamp=t.timeStamp)}computeValues(t){const n=this.state;n._values=t,n.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:n,config:s,shared:i}=this;n.args=this.args;let o=0;if(t&&(n.event=t,s.preventDefault&&t.cancelable&&n.event.preventDefault(),n.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,Bc(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,o=t.timeStamp-n.timeStamp,n.timeStamp=t.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const x=n._delta.map(Math.abs);K.addTo(n._distance,x)}this.axisIntent&&this.axisIntent(t);const[a,l]=n._movement,[c,u]=s.threshold,{_step:f,values:S}=n;if(s.hasCustomTransform?(f[0]===!1&&(f[0]=Math.abs(a)>=c&&S[0]),f[1]===!1&&(f[1]=Math.abs(l)>=u&&S[1])):(f[0]===!1&&(f[0]=Math.abs(a)>=c&&Math.sign(a)*c),f[1]===!1&&(f[1]=Math.abs(l)>=u&&Math.sign(l)*u)),n.intentional=f[0]!==!1||f[1]!==!1,!n.intentional)return;const d=[0,0];if(s.hasCustomTransform){const[x,N]=S;d[0]=f[0]!==!1?x-f[0]:0,d[1]=f[1]!==!1?N-f[1]:0}else d[0]=f[0]!==!1?a-f[0]:0,d[1]=f[1]!==!1?l-f[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(d);const _=n.offset,g=n._active&&!n._blocked||n.active;g&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=i[this.ingKey]=n._active,t&&(n.first&&("bounds"in s&&(n._bounds=Lt(s.bounds,n)),this.setup&&this.setup()),n.movement=d,this.computeOffset()));const[m,E]=n.offset,[[T,A],[C,v]]=n._bounds;n.overflow=[m<T?-1:m>A?1:0,E<C?-1:E>v?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const O=n._active?s.rubberband||[0,0]:[0,0];if(n.offset=vc(n._bounds,n.offset,O),n.delta=K.sub(n.offset,_),this.computeMovement(),g&&(!n.last||o>Uc)){n.delta=K.sub(n.offset,_);const x=n.delta.map(Math.abs);K.addTo(n.distance,x),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&o>0&&(n.velocity=[x[0]/o,x[1]/o],n.timeDelta=o)}}emit(){const t=this.state,n=this.shared,s=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!s.triggerAllEvents)return;const i=this.handler(X(X(X({},n),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function Hc([e,t],n){const s=Math.abs(e),i=Math.abs(t);if(s>i&&s>n)return"x";if(i>s&&i>n)return"y"}class $c extends Si{constructor(...t){super(...t),J(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=K.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=K.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const n=this.state,s=this.config;if(!n.axis&&t){const i=typeof s.axisThreshold=="object"?s.axisThreshold[di(t)]:s.axisThreshold;n.axis=Hc(n._movement,i)}n._blocked=(s.lockDirection||!!s.axis)&&!n.axis||!!s.axis&&s.axis!==n.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const Xr=e=>e,Wr=.15,Qn={enabled(e=!0){return e},eventOptions(e,t,n){return X(X({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[Wr,Wr];case!1:return[0,0];default:return K.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return K.toVector(e)},transform(e,t,n){const s=e||n.shared.transform;if(this.hasCustomTransform=!!s,process.env.NODE_ENV==="development"){const i=s||Xr;return o=>{const a=i(o);return(!isFinite(a[0])||!isFinite(a[1]))&&console.warn(`[@use-gesture]: config.transform() must produce a valid result, but it was: [${a[0]},${[1]}]`),a}}return s||Xr},threshold(e){return K.toVector(e,0)}};process.env.NODE_ENV==="development"&&Object.assign(Qn,{domTarget(e){if(e!==void 0)throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");return NaN},lockDirection(e){if(e!==void 0)throw Error("[@use-gesture]: `lockDirection` option has been merged with `axis`. Use it as in `{ axis: 'lock' }`");return NaN},initial(e){if(e!==void 0)throw Error("[@use-gesture]: `initial` option has been renamed to `from`.");return NaN}});const Zc=0,at=X(X({},Qn),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=Zc){return e},bounds(e={}){if(typeof e=="function")return o=>at.bounds(e(o));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:s=-1/0,bottom:i=1/0}=e;return[[t,n],[s,i]]}}),qr={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]};class Yc extends $c{constructor(...t){super(...t),J(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const n=t._bounds.getBoundingClientRect(),s=t.currentTarget.getBoundingClientRect(),i={left:n.left-s.left+t.offset[0],right:n.right-s.right+t.offset[0],top:n.top-s.top+t.offset[1],bottom:n.bottom-s.bottom+t.offset[1]};t._bounds=at.bounds(i)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const n=this.config,s=this.state;if(t.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(t.buttons):n.pointerButtons!==-1&&n.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);n.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&s._pointerActive)&&(this.start(t),this.setupPointer(t),s._pointerId=on(t),s._pointerActive=!0,this.computeValues($r(t)),this.computeInitial(),n.preventScrollAxis&&di(t)!=="mouse"?(s._active=!1,this.setupScrollPrevention(t)):n.delay>0?(this.setupDelayTrigger(t),n.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const n=this.state,s=this.config;if(!n._pointerActive)return;const i=on(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;const o=$r(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=K.sub(o,n._values),this.computeValues(o)),K.addTo(n._movement,n._delta),this.compute(t),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(t);return}if(s.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===s.preventScrollAxis||s.preventScrollAxis==="xy"){n._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{process.env.NODE_ENV==="development"&&console.warn("[@use-gesture]: If you see this message, it's likely that you're using an outdated version of `@react-three/fiber`. \n\nPlease upgrade to the latest version.")}const n=this.state,s=this.config;if(!n._active||!n._pointerActive)return;const i=on(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[o,a]=n._distance;if(n.tap=o<=s.tapsThreshold&&a<=s.tapsThreshold,n.tap&&s.filterTaps)n._force=!0;else{const[l,c]=n._delta,[u,f]=n._movement,[S,d]=s.swipe.velocity,[_,g]=s.swipe.distance,m=s.swipe.duration;if(n.elapsedTime<m){const E=Math.abs(l/n.timeDelta),T=Math.abs(c/n.timeDelta);E>S&&Math.abs(u)>_&&(n.swipe[0]=Math.sign(l)),T>d&&Math.abs(f)>g&&(n.swipe[1]=Math.sign(c))}}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const n=this.config,s=n.device;if(process.env.NODE_ENV==="development")try{if(s==="pointer"&&n.preventScrollDelay===void 0){const i="uv"in t?t.sourceEvent.currentTarget:t.currentTarget;window.getComputedStyle(i).touchAction==="auto"&&console.warn("[@use-gesture]: The drag target has its `touch-action` style property set to `auto`. It is recommended to add `touch-action: 'none'` so that the drag gesture behaves correctly on touch-enabled devices. For more information read this: https://use-gesture.netlify.app/docs/extras/#touch-action.\n\nThis message will only show in development mode. It won't appear in production. If this is intended, you can ignore it.",i)}}catch{}n.pointerLock&&t.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,s,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,s,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,s,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,Vc(t);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const n=qr[t.key];if(n){const s=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),s._delta=n(this.config.keyboardDisplacement,i),s._keyboardActive=!0,K.addTo(s._movement,s._delta),this.compute(t),this.emit()}}keyUp(t){t.key in qr&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const n=this.config.device;t(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(n,"change",this.pointerMove.bind(this)),t(n,"end",this.pointerUp.bind(this)),t(n,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function Vc(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const ct=typeof window<"u"&&window.document&&window.document.createElement;function _i(){return ct&&"ontouchstart"in window}function Xc(){return _i()||ct&&window.navigator.maxTouchPoints>1}function Wc(){return ct&&"onpointerdown"in window}function qc(){return ct&&"exitPointerLock"in window.document}function Kc(){try{return"constructor"in GestureEvent}catch{return!1}}const ae={isBrowser:ct,gesture:Kc(),touch:_i(),touchscreen:Xc(),pointer:Wc(),pointerLock:qc()},Qc=250,Jc=180,eu=.5,tu=50,nu=250,ru=10,Kr={mouse:0,touch:0,pen:8},pi=X(X({},at),{},{device(e,t,{pointer:{touch:n=!1,lock:s=!1,mouse:i=!1}={}}){return this.pointerLock=s&&ae.pointerLock,ae.touch&&n?"touch":this.pointerLock?"mouse":ae.pointer&&!i?"pointer":ae.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?Qc:void 0,!(!ae.touchscreen||n===!1))return e||(n!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:s=1,keys:i=!0}={}}){return this.pointerButtons=s,this.keys=i,!this.pointerLock&&this.device==="pointer"&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:s=3,axis:i=void 0}){const o=K.toVector(e,n?s:i?1:0);return this.filterTaps=n,this.tapsThreshold=s,o},swipe({velocity:e=eu,distance:t=tu,duration:n=nu}={}){return{velocity:this.transform(K.toVector(e)),distance:this.transform(K.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return Jc;case!1:return 0;default:return e}},axisThreshold(e){return e?X(X({},Kr),e):Kr},keyboardDisplacement(e=ru){return e}});process.env.NODE_ENV==="development"&&Object.assign(pi,{useTouch(e){if(e!==void 0)throw Error("[@use-gesture]: `useTouch` option has been renamed to `pointer.touch`. Use it as in `{ pointer: { touch: true } }`.");return NaN},experimental_preventWindowScrollY(e){if(e!==void 0)throw Error("[@use-gesture]: `experimental_preventWindowScrollY` option has been renamed to `preventScroll`.");return NaN},swipeVelocity(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeVelocity` option has been renamed to `swipe.velocity`. Use it as in `{ swipe: { velocity: 0.5 } }`.");return NaN},swipeDistance(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDistance` option has been renamed to `swipe.distance`. Use it as in `{ swipe: { distance: 50 } }`.");return NaN},swipeDuration(e){if(e!==void 0)throw Error("[@use-gesture]: `swipeDuration` option has been renamed to `swipe.duration`. Use it as in `{ swipe: { duration: 250 } }`.");return NaN}});function su(e){const[t,n]=e.overflow,[s,i]=e._delta,[o,a]=e._direction;(t<0&&s>0&&o<0||t>0&&s<0&&o>0)&&(e._movement[0]=e._movementBound[0]),(n<0&&i>0&&a<0||n>0&&i<0&&a>0)&&(e._movement[1]=e._movementBound[1])}const iu=30,ou=100;class au extends Si{constructor(...t){super(...t),J(this,"ingKey","pinching"),J(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const t=this.state;t._touchIds=[],t.canceled=!1,t.cancel=this.cancel.bind(this),t.turns=0}computeOffset(){const{type:t,movement:n,lastOffset:s}=this.state;t==="wheel"?this.state.offset=K.add(n,s):this.state.offset=[(1+n[0])*s[0],n[1]+s[1]]}computeMovement(){const{offset:t,lastOffset:n}=this.state;this.state.movement=[t[0]/n[0],t[1]-n[1]]}axisIntent(){const t=this.state,[n,s]=t._movement;if(!t.axis){const i=Math.abs(n)*iu-Math.abs(s);i<0?t.axis="angle":i>0&&(t.axis="scale")}}restrictToAxis(t){this.config.lockDirection&&(this.state.axis==="scale"?t[1]=0:this.state.axis==="angle"&&(t[0]=0))}cancel(){const t=this.state;t.canceled||setTimeout(()=>{t.canceled=!0,t._active=!1,this.compute(),this.emit()},0)}touchStart(t){this.ctrl.setEventIds(t);const n=this.state,s=this.ctrl.touchIds;if(n._active&&n._touchIds.every(o=>s.has(o))||s.size<2)return;this.start(t),n._touchIds=Array.from(s).slice(0,2);const i=Hr(t,n._touchIds);i&&this.pinchStart(t,i)}pointerStart(t){if(t.buttons!=null&&t.buttons%2!==1)return;this.ctrl.setEventIds(t),t.target.setPointerCapture(t.pointerId);const n=this.state,s=n._pointerEvents,i=this.ctrl.pointerIds;if(n._active&&Array.from(s.keys()).every(a=>i.has(a))||(s.size<2&&s.set(t.pointerId,t),n._pointerEvents.size<2))return;this.start(t);const o=bn(...Array.from(s.values()));o&&this.pinchStart(t,o)}pinchStart(t,n){const s=this.state;s.origin=n.origin,this.computeValues([n.distance,n.angle]),this.computeInitial(),this.compute(t),this.emit()}touchMove(t){if(!this.state._active)return;const n=Hr(t,this.state._touchIds);n&&this.pinchMove(t,n)}pointerMove(t){const n=this.state._pointerEvents;if(n.has(t.pointerId)&&n.set(t.pointerId,t),!this.state._active)return;const s=bn(...Array.from(n.values()));s&&this.pinchMove(t,s)}pinchMove(t,n){const s=this.state,i=s._values[1],o=n.angle-i;let a=0;Math.abs(o)>270&&(a+=Math.sign(o)),this.computeValues([n.distance,n.angle-360*a]),s.origin=n.origin,s.turns=a,s._movement=[s._values[0]/s._initial[0]-1,s._values[1]-s._initial[1]],this.compute(t),this.emit()}touchEnd(t){this.ctrl.setEventIds(t),this.state._active&&this.state._touchIds.some(n=>!this.ctrl.touchIds.has(n))&&(this.state._active=!1,this.compute(t),this.emit())}pointerEnd(t){const n=this.state;this.ctrl.setEventIds(t);try{t.target.releasePointerCapture(t.pointerId)}catch{}n._pointerEvents.has(t.pointerId)&&n._pointerEvents.delete(t.pointerId),n._active&&n._pointerEvents.size<2&&(n._active=!1,this.compute(t),this.emit())}gestureStart(t){t.cancelable&&t.preventDefault();const n=this.state;n._active||(this.start(t),this.computeValues([t.scale,t.rotation]),n.origin=[t.clientX,t.clientY],this.compute(t),this.emit())}gestureMove(t){if(t.cancelable&&t.preventDefault(),!this.state._active)return;const n=this.state;this.computeValues([t.scale,t.rotation]),n.origin=[t.clientX,t.clientY];const s=n._movement;n._movement=[t.scale-1,t.rotation],n._delta=K.sub(n._movement,s),this.compute(t),this.emit()}gestureEnd(t){this.state._active&&(this.state._active=!1,this.compute(t),this.emit())}wheel(t){const n=this.config.modifierKey;n&&(Array.isArray(n)?!n.find(s=>t[s]):!t[n])||(this.state._active?this.wheelChange(t):this.wheelStart(t),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(t){this.start(t),this.wheelChange(t)}wheelChange(t){"uv"in t||(t.cancelable&&t.preventDefault(),process.env.NODE_ENV==="development"&&!t.defaultPrevented&&console.warn("[@use-gesture]: To properly support zoom on trackpads, try using the `target` option.\n\nThis message will only appear in development mode."));const s=this.state;s._delta=[-Fc(t)[1]/ou*s.offset[0],0],K.addTo(s._movement,s._delta),su(s),this.state.origin=[t.clientX,t.clientY],this.compute(t),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(t){const n=this.config.device;n&&(t(n,"start",this[n+"Start"].bind(this)),t(n,"change",this[n+"Move"].bind(this)),t(n,"end",this[n+"End"].bind(this)),t(n,"cancel",this[n+"End"].bind(this)),t("lostPointerCapture","",this[n+"End"].bind(this))),this.config.pinchOnWheel&&t("wheel","",this.wheel.bind(this),{passive:!1})}}const cu=X(X({},Qn),{},{device(e,t,{shared:n,pointer:{touch:s=!1}={}}){if(n.target&&!ae.touch&&ae.gesture)return"gesture";if(ae.touch&&s)return"touch";if(ae.touchscreen){if(ae.pointer)return"pointer";if(ae.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:s={}}){const i=a=>{const l=Vr(Lt(n,a),{min:-1/0,max:1/0});return[l.min,l.max]},o=a=>{const l=Vr(Lt(s,a),{min:-1/0,max:1/0});return[l.min,l.max]};return typeof n!="function"&&typeof s!="function"?[i(),o()]:a=>[i(a),o(a)]},threshold(e,t,n){return this.lockDirection=n.axis==="lock",K.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});X(X({},at),{},{mouseOnly:(e=!0)=>e});X(X({},at),{},{mouseOnly:(e=!0)=>e});const Jn=new Map,xn=new Map;function gi(e){Jn.set(e.key,e.engine),xn.set(e.key,e.resolver)}const mi={key:"drag",engine:Yc,resolver:pi},uu={key:"pinch",engine:au,resolver:cu};function lu(e,t){if(e==null)return{};var n={},s=Object.keys(e),i,o;for(o=0;o<s.length;o++)i=s[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function fu(e,t){if(e==null)return{};var n=lu(e,t),s,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)s=o[i],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}const du={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=ae.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},hu=["target","eventOptions","window","enabled","transform"];function Et(e={},t){const n={};for(const[s,i]of Object.entries(t))switch(typeof i){case"function":if(process.env.NODE_ENV==="development"){const o=i.call(n,e[s],s,e);Number.isNaN(o)||(n[s]=o)}else n[s]=i.call(n,e[s],s,e);break;case"object":n[s]=Et(e[s],i);break;case"boolean":i&&(n[s]=e[s]);break}return n}function Su(e,t,n={}){const s=e,{target:i,eventOptions:o,window:a,enabled:l,transform:c}=s,u=fu(s,hu);if(n.shared=Et({target:i,eventOptions:o,window:a,enabled:l,transform:c},du),t){const f=xn.get(t);n[t]=Et(X({shared:n.shared},u),f)}else for(const f in u){const S=xn.get(f);if(S)n[f]=Et(X({shared:n.shared},u[f]),S);else if(process.env.NODE_ENV==="development"&&!["drag","pinch","scroll","wheel","move","hover"].includes(f)){if(f==="domTarget")throw Error("[@use-gesture]: `domTarget` option has been renamed to `target`.");console.warn(`[@use-gesture]: Unknown config key \`${f}\` was used. Please read the documentation for further information.`)}}return n}class Ei{constructor(t,n){J(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,s,i,o){const a=this._listeners,l=jc(n,s),c=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},u=X(X({},c),o);t.addEventListener(l,i,u);const f=()=>{t.removeEventListener(l,i,u),a.delete(f)};return a.add(f),f}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class _u{constructor(){J(this,"_timeouts",new Map)}add(t,n,s=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(n,s,...i))}remove(t){const n=this._timeouts.get(t);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class pu{constructor(t){J(this,"gestures",new Set),J(this,"_targetEventStore",new Ei(this)),J(this,"gestureEventStores",{}),J(this,"gestureTimeoutStores",{}),J(this,"handlers",{}),J(this,"config",{}),J(this,"pointerIds",new Set),J(this,"touchIds",new Set),J(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),gu(this,t)}setEventIds(t){if(Bt(t))return this.touchIds=new Set(kc(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,n){this.handlers=t,this.nativeHandlers=n}applyConfig(t,n){this.config=Su(t,n,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const n=this.config.shared,s={};let i;if(!(n.target&&(i=n.target(),!i))){if(n.enabled){for(const a of this.gestures){const l=this.config[a],c=Qr(s,l.eventOptions,!!i);if(l.enabled){const u=Jn.get(a);new u(this,t,a).bind(c)}}const o=Qr(s,n.eventOptions,!!i);for(const a in this.nativeHandlers)o(a,"",l=>this.nativeHandlers[a](X(X({},this.state.shared),{},{event:l,args:t})),void 0,!0)}for(const o in s)s[o]=Gc(...s[o]);if(!i)return s;for(const o in s){const{device:a,capture:l,passive:c}=Dc(o);this._targetEventStore.add(i,a,"",s[o],{capture:l,passive:c})}}}}function Ne(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Ei(e,t),e.gestureTimeoutStores[t]=new _u}function gu(e,t){t.drag&&Ne(e,"drag"),t.wheel&&Ne(e,"wheel"),t.scroll&&Ne(e,"scroll"),t.move&&Ne(e,"move"),t.pinch&&Ne(e,"pinch"),t.hover&&Ne(e,"hover")}const Qr=(e,t,n)=>(s,i,o,a={},l=!1)=>{var c,u;const f=(c=a.capture)!==null&&c!==void 0?c:t.capture,S=(u=a.passive)!==null&&u!==void 0?u:t.passive;let d=l?s:wc(s,i,f);n&&S&&(d+="Passive"),e[d]=e[d]||[],e[d].push(o)},mu=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function Eu(e){const t={},n={},s=new Set;for(let i in e)mu.test(i)?(s.add(RegExp.lastMatch),n[i]=e[i]):t[i]=e[i];return[n,t,s]}function De(e,t,n,s,i,o){if(!e.has(n))return;if(!Jn.has(s)){process.env.NODE_ENV==="development"&&console.warn(`[@use-gesture]: You've created a custom handler that that uses the \`${s}\` gesture but isn't properly configured.
2
-
3
- Please add \`${s}Action\` when creating your handler.`);return}const a=n+"Start",l=n+"End",c=u=>{let f;return u.first&&a in t&&t[a](u),n in t&&(f=t[n](u)),u.last&&l in t&&t[l](u),f};i[s]=c,o[s]=o[s]||{}}function Tu(e,t){const[n,s,i]=Eu(e),o={};return De(i,n,"onDrag","drag",o,t),De(i,n,"onWheel","wheel",o,t),De(i,n,"onScroll","scroll",o,t),De(i,n,"onPinch","pinch",o,t),De(i,n,"onMove","move",o,t),De(i,n,"onHover","hover",o,t),{handlers:o,config:t,nativeHandlers:s}}function Ti(e,t={},n,s){const i=y.useMemo(()=>new pu(e),[]);if(i.applyHandlers(e,s),i.applyConfig(t,n),y.useEffect(i.effect.bind(i)),y.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function yi(e,t){return gi(mi),Ti({drag:e},t||{},"drag")}function yu(e){return e.forEach(gi),function(n,s){const{handlers:i,nativeHandlers:o,config:a}=Tu(n,s||{});return Ti(i,a,void 0,o)}}const Au=({closeModal:e,modalStyles:t,children:n})=>{const s=qn(()=>e()),[i,o]=W(()=>({y:0})),a=yi(({velocity:[,l],last:c,down:u,movement:[,f],cancel:S,type:d})=>{typeof d=="string"&&(d.includes("pointer")||d.includes("mouse"))||(c&&l<.3?S():c&&l>.3&&e(),f<-.001?S():f>450&&e(),o.start({y:u?f:0,immediate:u}))},{axis:"y",filterTaps:!0,pointer:{touch:!0}});return h.jsx(xe,{className:t===r.ModalStyles.Nocard?`${We.modalCardCopyOriAnimated} ${We["no-card"]}`:`${We.modalCardCopyOriAnimated}`,...a(),style:{...i,touchAction:"none"},ref:s,children:n})},Cu=({isShown:e,children:t})=>ue(e,{from:{opacity:0},enter:{opacity:1},leave:{opacity:0}})((s,i)=>i&&h.jsx(I,{className:We.wrapperContainer,style:s,children:t})),Ai=({showModal:e,closeModal:t,modalStyles:n=r.ModalStyles.Default,modalBackground:s,children:i})=>(Ec("Escape",()=>{t()}),h.jsx(Ou,{closeModal:t,showModal:e,modalStyles:n,modalBackground:s,children:i})),Ou=({showModal:e,closeModal:t,children:n,modalStyles:s=r.ModalStyles.Default,modalBackground:i})=>h.jsx(Tc,{children:h.jsxs(Cu,{isShown:e,children:[h.jsx(Oc,{isShown:e,modalBackground:i}),h.jsx(Ws,{direction:"vertical",isShown:e,enterOffsetBy:3,children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.FlexStart,style:{position:"absolute",minHeight:"100vh",minWidth:"100%",top:0},children:h.jsx(Au,{closeModal:t,modalStyles:s,children:n})})})]})}),Lu=({handleCloseGallery:e})=>{const t=ue(!0,{from:{opacity:0,y:-100,x:-50},enter:{opacity:1,y:25,x:-50},leave:{opacity:0,y:-100,x:-50}});return h.jsx(Y,{style:{width:"100%"},display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.FlexEnd,flexAlignItem:r.FlexAlignItems.Center,children:t((n,s)=>s&&h.jsx(I,{style:n,children:h.jsx(ie,{name:"x",iconAction:()=>e(),size:r.Sizings.Size5})}))})};var Jr=NaN,vu="[object Symbol]",Iu=/^\s+|\s+$/g,bu=/^[-+]0x[0-9a-f]+$/i,xu=/^0b[01]+$/i,Ru=/^0o[0-7]+$/i,wu=parseInt,Nu=Object.prototype,Du=Nu.toString;function ju(e,t,n){return e===e&&(n!==void 0&&(e=e<=n?e:n),t!==void 0&&(e=e>=t?e:t)),e}function es(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Mu(e){return!!e&&typeof e=="object"}function Pu(e){return typeof e=="symbol"||Mu(e)&&Du.call(e)==vu}function an(e){if(typeof e=="number")return e;if(Pu(e))return Jr;if(es(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=es(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(Iu,"");var n=xu.test(e);return n||Ru.test(e)?wu(e.slice(2),n?2:8):bu.test(e)?Jr:+e}function ku(e,t,n){return n===void 0&&(n=t,t=void 0),n!==void 0&&(n=an(n),n=n===n?n:0),t!==void 0&&(t=an(t),t=t===t?t:0),ju(an(e),t,n)}var ne;const Ci=y.createContext({galleryImages:ne,imgIndex:0,props:ne,ref:ne,bind:ne,isZooming:ne,manualZoomScale:ne,handleSetImages:ne,handleCloseGallery:ne,handleIncrease:ne,handleDecrease:ne,handleSetIsZooming:ne,handleZoomIn:ne,handleZoomOut:ne,handleZoomReset:ne}),Fu=({children:e})=>{const t=Bu();return h.jsx(Ci.Provider,{value:t,children:e})},er=()=>y.useContext(Ci);function Bu(){const[e,t]=y.useState([]),[n,s]=y.useState(0),[i,{width:o}]=pe(),[a,l]=y.useState(!1),[c,u]=Vn(e.length,O=>({x:O*o,scale:o===0?0:1,display:"block"}),[o]),f=yi(({active:O,movement:[x],velocity:[N],direction:[M],distance:[R],cancel:j})=>{a||(O&&(R>o/3||N>1)&&(s(D=>ku(D+(M>0?-1:1),0,e.length-1)),j()),u.start(D=>{if(D<n-1||D>n+1)return{display:"none"};const B=(D-n)*o+(O?x:0),G=O?1-R/o/2:1;return{x:B,scale:G,display:"block"}}))}),S=O=>{t(O)},d=O=>{s(0),O&&O()};function _(){s(O=>O+1>e.length-1?O:(u.start(x=>x<O+1-1||x>O+1+1?{display:"none"}:{x:(x-(O+1))*o,scale:1,display:"block"}),O+1))}function g(){s(O=>O-1<0?O:(u.start(x=>x<O-1-1||x>O-1+1?{display:"none"}:{x:(x-(O-1))*o,scale:1,display:"block"}),O-1))}const m=O=>{l(O)},[E,T]=y.useState(1);function A(){T(O=>O+.25>2?2:O+.25)}function C(){T(O=>O-.25<.5?1:O-.25)}function v(){T(1)}return{imgIndex:n,galleryImages:e,props:c,ref:i,bind:f,isZooming:a,manualZoomScale:E,handleSetImages:S,handleCloseGallery:d,handleIncrease:_,handleDecrease:g,handleSetIsZooming:m,handleZoomIn:A,handleZoomOut:C,handleZoomReset:v}}const zu=({openMenu:e=!0})=>{const{handleIncrease:t,handleDecrease:n,galleryImages:s,imgIndex:i,handleZoomIn:o,handleZoomOut:a}=er();return ue(e,{from:{opacity:0,y:100},enter:{opacity:1,y:-50},leave:{opacity:0,y:100}})((c,u)=>u&&h.jsx(I,{style:{width:"100%",...c},children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,style:{minWidth:350,maxWidth:500,width:400},children:[h.jsx(pt,{icon:"chevron-left",marginLeft:r.Spacings.Size4,marginRight:r.Spacings.Size1,clickAction:()=>n(),disabled:i<=0&&!0}),h.jsx(Y,{children:h.jsx(I,{children:h.jsx(q,{fontSize:r.FontSizes.Size4,children:`${i+1} / ${s.length}`})})}),h.jsx(pt,{icon:"chevron-right",marginLeft:r.Spacings.Size1,clickAction:()=>t(),disabled:i>=s.length-1&&!0}),h.jsx(pt,{icon:"zoom-in",marginLeft:r.Spacings.Auto,marginRight:r.Spacings.Size1,clickAction:()=>{o()}}),h.jsx(pt,{icon:"zoom-out",marginLeft:r.Spacings.Size1,marginRight:r.Spacings.Size4,clickAction:()=>{a()}})]})})}))},pt=({icon:e,clickAction:t,marginLeft:n,marginRight:s})=>h.jsx(I,{marginLeft:n,marginRight:s,children:h.jsx(ei,{name:"",icon:e,buttonSize:r.ButtonSizes.Big,clickAction:t})}),Gu="_ZAnimated_10d05_1",Uu={ZAnimated:Gu},Hu=yu([mi,uu]),$u=({children:e})=>{const{imgIndex:t,isZooming:n,handleSetIsZooming:s,manualZoomScale:i}=er();y.useEffect(()=>{const c=u=>u.preventDefault();return document&&(document.addEventListener("gesturestart",c),document.addEventListener("gesturechange",c),document.addEventListener("gestureend",c)),()=>{document&&(document.removeEventListener("gesturestart",c),document.removeEventListener("gesturechange",c),document.removeEventListener("gestureend",c))}},[]);const[o,a]=W(()=>({x:0,y:0,scale:1,rotateZ:0})),l=y.useRef(null);return y.useEffect(()=>{t!==0&&a.start(c=>({...c,x:0,y:0,scale:1}))},[a,t]),y.useEffect(()=>{a.start(c=>({...c,scale:i}))},[a,i]),Hu({onDrag:({pinching:c,cancel:u,offset:[f,S]})=>{if(n){if(c)return u();a.start({x:f,y:S})}},onPinch:({origin:[c,u],first:f,last:S,movement:[d],offset:[_],memo:g})=>{if(f){const{width:T,height:A,x:C,y:v}=l.current&&l.current.getBoundingClientRect(),O=c-(C+T/2),x=u-(v+A/2);g=[o.x.get(),o.y.get(),O,x]}if(S&&_===1&&c!==0)return s&&s(!1),a.start({scale:1,x:0,y:0}),g;const m=g[0]-(d-1)*g[2],E=g[1]-(d-1)*g[3];return s&&s(!0),a.start({scale:_,x:m,y:E}),g}},{target:l,drag:{from:()=>[o.x.get(),o.y.get()],bounds:{left:-100,right:100,top:-100,bottom:100}},pinch:{scaleBounds:{min:1,max:2},rubberband:!0},wheel:{axis:"y"}}),h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,style:{height:"100%"},children:h.jsx(xe,{ref:l,className:Uu.ZAnimated,style:{...o,backgroundColor:"transparent"},children:e})})},Zu="_imageContainer_zngaq_11",Yu="_desktop_zngaq_20",Vu="_galleryMenuContainer_zngaq_34",cn={imageContainer:Zu,desktop:Yu,"big-tablet":"_big-tablet_zngaq_26",galleryMenuContainer:Vu},Xu=({showModal:e,closeModal:t,images:n=[]})=>h.jsx(qu,{children:h.jsx(Wu,{showModal:e,closeModal:t,images:n})}),Wu=({showModal:e,closeModal:t,images:n=[]})=>{const{bind:s,props:i,ref:o,handleCloseGallery:a,handleSetImages:l}=er();y.useEffect(()=>{l(n)},[l,n]);const c=()=>{a(t)};return h.jsx(Ai,{showModal:e,closeModal:c,modalStyles:r.ModalStyles.Nocard,modalBackground:r.ColorPalettes.Grey1,children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,flexJustifyContent:r.FlexJustifyContents.Center,style:{height:"100%",maxWidth:"100%"},children:[h.jsx("div",{ref:o,style:{overflow:"hidden",width:"100%",height:"100vh",position:"relative"},children:i.map(({x:u,display:f,scale:S},d)=>y.createElement(I,{...s(),key:d,style:{display:f,x:u,position:"absolute",width:"100%",height:"100%",willChange:"transform"}},h.jsx(I,{style:{scale:S,touchAction:"none",backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",width:"100%",height:"100%",willChange:"transform"},children:h.jsxs($u,{children:[h.jsx(I,{className:`${cn.imageContainer} desktop`,children:n[d]}),h.jsx(I,{className:`${cn.imageContainer} big-tablet`,children:n[d]})]})})))}),h.jsx(I,{className:cn.galleryMenuContainer,style:{position:"absolute",bottom:0,left:0,right:0},children:h.jsx(zu,{openMenu:!0})}),h.jsx("div",{style:{position:"absolute",top:0,left:0,right:0},children:h.jsx(Lu,{handleCloseGallery:c})})]})})},qu=({children:e})=>h.jsx(Fu,{children:e}),Oi=({children:e})=>h.jsx(Ku,{children:e}),Ku=({children:e})=>{const[t,n]=y.useState(!1);return y.useEffect(()=>(n(!0),()=>{n(!1)}),[]),t?Rn.createPortal(e,document.querySelector(Kn[r.Portals.GlobalEventNotification].id)||document.body):null},Qu="_iconContainer_1wxn3_12",Ju="_desktop_1wxn3_13",el="_mobile_1wxn3_18",tl="_iconContainerDesktop_1wxn3_25",nl="_iconContainerMobile_1wxn3_34",ts={iconContainer:Qu,desktop:Ju,mobile:el,iconContainerDesktop:tl,iconContainerMobile:nl},rl=({id:e,name:t,handleImageChange:n,labelname:s,defaultValue:i,width:o="100%",height:a,ref:l,...c})=>{const[u,f]=y.useState(),[S,d]=y.useState(i);y.useEffect(()=>{if(i&&i!==""){d(i);return}else if(!u)return;const m=URL.createObjectURL(u);return d(m),()=>{var E;if(m!=="")E=m;else if(u&&S)E=S;else return;try{URL.revokeObjectURL(E)}catch{}}},[i,u]);const _=async m=>{if(!m.target.files||m.target.files.length===0)return;f(m.target.files[0]);const E=URL.createObjectURL(m.target.files[0]);d(E),n&&n(m.target.files[0])},g=()=>{f(void 0),d(void 0),n&&n(void 0)};return h.jsxs(I,{children:[h.jsx("input",{id:e,ref:l,type:"file",name:t,onChange:_,accept:"image/png, image/jpeg, image/webp, image/jpg",style:{opacity:0,pointerEvents:"none",width:0,height:0,position:"absolute"},...c}),h.jsx("label",{htmlFor:e,onMouseEnter:()=>{},onMouseLeave:()=>{},style:{width:o,height:a,cursor:"pointer"},children:S?h.jsx(sl,{src:S,width:o,handleCancel:g}):h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(I,{marginRight:r.Spacings.Size1,children:h.jsx(q,{children:s||"Upload image"})}),h.jsx(I,{className:`${ts.iconContainerDesktop}`,children:h.jsx(ie,{name:"image"})}),h.jsx(I,{className:`${ts.iconContainerMobile}`,children:h.jsx(ie,{name:"camera"})})]})})]})},sl=({src:e,width:t,handleCancel:n})=>h.jsxs(Y,{children:[h.jsx(I,{children:h.jsx("img",{alt:"preview",src:e,width:t})}),h.jsx(I,{children:h.jsx(ie,{name:"x",iconAction:()=>n()})})]}),il=({id:e,checked:t,size:n=r.Sizings.Size3,handleChange:s=()=>{},vertigo:i,ref:o,children:a,...l})=>{const[c,u]=y.useState(t),[f,S]=y.useState(!1),d=_=>{u(_),s(e,_)};return y.useEffect(()=>{const _=g=>{!f||c||g.key===" "&&d(!0)};return document&&document.addEventListener("keydown",_,!1),()=>{document&&document.removeEventListener("keydown",_,!1)}},[f,c]),y.useEffect(()=>{u(t)},[t]),h.jsx(I,{onClick:()=>{i&&c||(u(!c),s(e,c))},style:{cursor:"pointer"},tabIndex:0,role:"button",onFocus:()=>S(!0),onBlur:()=>S(!1),children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:[h.jsx(ol,{checked:c,size:n}),h.jsx(I,{marginLeft:r.Spacings.Size1,style:{transform:"translateY(-1px)",userSelect:"none"},children:a}),h.jsx("input",{ref:o,id:e,checked:c,onChange:()=>{},type:"radio",style:{appearance:"none",backgroundColor:"transparent",margin:0,display:"none"},...l})]})})},ol=({checked:e,size:t})=>{const n=ue(e,{from:{opacity:0,scale:.6},enter:{opacity:1,scale:1},leave:{opacity:0,scale:.6},config:{...$n.stiff}}),s=W({borderColor:e?r.COLOR_VALUES[r.ColorPalettes.Primary5]:r.COLOR_VALUES[r.ColorPalettes.Grey5]});return h.jsx(I,{style:{...s,width:t,height:t,borderRadius:"50%",borderWidth:2,borderStyle:"solid",display:"flex",justifyContent:"center",alignItems:"center"},children:n((i,o)=>o&&h.jsx(I,{style:{...i,width:t-10,height:t-10,borderRadius:"50%",backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Primary5]}}))})};function un(e,t){e&&(typeof e=="function"?e(t):e.current=t)}function Li(e,t){return y.useEffect(()=>(un(t,e.current),()=>{un(t,null)}),[t]),s=>{e.current=s,un(t,s)}}const al=({inputHelper:e})=>{const[t,n]=y.useState(!1);return h.jsxs(I,{style:{position:"absolute",top:"50%",right:-10,transform:"translateY(-25%)"},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),children:[h.jsx(ie,{name:"info",size:r.Sizings.Size2,colorLight:r.ColorPalettes.Primary5,colorDark:r.ColorPalettes.Primary5}),h.jsx(I,{style:{position:"relative",pointerEvents:"none"},children:h.jsx(kt,{labelName:e,hover:t,x:0,y:0})})]})},cl="_inputtext_rg89u_1",ul="_inputLabel_rg89u_9",ll="_showHidePassword_rg89u_41",vi={inputtext:cl,inputLabel:ul,showHidePassword:ll},fl=({isShow:e,handleShowHideText:t})=>h.jsx(I,{className:vi.showHidePassword,style:{position:"absolute",bottom:".75rem",left:"88%",zIndex:4,cursor:"pointer"},onClick:()=>t(),children:h.jsx(ie,{name:e?r.Icons.EyeOff:r.Icons.Eye,size:r.Sizings.Size3,colorLight:r.ColorPalettes.Primary5,colorDark:r.ColorPalettes.Primary5,cursor:r.Cursors.Pointer})}),dl=({id:e,label:t,size:n,labelTextColor:s,inputColor:i})=>h.jsx(I,{paddingLeft:r.INPUT_TEXT_SIZE[n].paddings.left,paddingBottom:r.INPUT_TEXT_SIZE[n].paddings.bottom,children:h.jsx("label",{htmlFor:e,children:h.jsx(q,{fontWeight:r.FontWeights.Size3,paletteColor:s&&typeof s=="boolean"?r.INPUT_TEXT_COLOR[i].labelColor:r.ColorPalettes.Grey10,fontSize:r.INPUT_TEXT_SIZE[n].font.size,children:t})})}),hl=({id:e,name:t,type:n=r.InputTextTypes.Text,value:s,modes:i=r.InputTextModes.Default,label:o,focus:a,required:l,width:c,fullWidth:u,helperText:f,placeholder:S="Insert text",step:d,min:_,handleChange:g,handleFocus:m,handleBlur:E,handleCheck:T,size:A=r.InputTextSizes.Default,inputStyle:C=r.InputTextStyles.Default,inputColor:v=r.ColorSets.Primarys,labelTextColor:O=!0,transparent:x,ref:N,...M})=>{const R=y.useRef(null),j=Li(R,N);y.useEffect(()=>{if(i!==r.InputTextModes.Disabled){if(a){R.current&&R.current.focus();return}s!==""&&R.current&&R.current.value}},[a,i,s]);const[D,B]=y.useState(n),[G,b]=y.useState(!1),w=()=>{b(H=>!H)};y.useEffect(()=>{n===r.InputTextTypes.Password&&B(G?r.InputTextTypes.Text:r.InputTextTypes.Password)},[G]);const U=H=>{g&&g(H)},$=y.useCallback(async H=>{H.preventDefault();const p=H.target.value.trim();if(!(!p||p!=="")){E&&E(),T&&await T();return}},[E,T]),Z=y.useCallback(()=>{if(i!==r.InputTextModes.Disabled)return R.current&&R.current.focus(),m&&m(),!0},[m,i]);return h.jsxs(I,{style:{width:u?"100%":c||350,position:"relative"},children:[!x&&h.jsx(dl,{id:e,label:o,inputColor:v,size:A,labelTextColor:O}),h.jsxs(I,{boxSizing:r.BoxSizings.BorderBox,...Sl(C,x),borderColor:r.INPUT_TEXT_COLOR[v].borderColor,paddingLeft:r.INPUT_TEXT_SIZE[A].paddings.left,paddingRight:r.INPUT_TEXT_SIZE[A].paddings.right,paddingTop:r.INPUT_TEXT_SIZE[A].paddings.top,paddingBottom:r.INPUT_TEXT_SIZE[A].paddings.bottom,style:{paddingTop:C!==r.InputTextStyles.Outlined?1:"",paddingBottom:C!==r.InputTextStyles.Outlined?r.SPACING_VALUES[r.INPUT_TEXT_SIZE[A].paddings.bottom]:"",display:C!==r.InputTextStyles.Outlined?"flex":"block",cursor:"text"},onClick:()=>Z(),children:[h.jsx(Hs,{ref:j,type:D,required:l,disabled:i!==r.InputTextModes.Disabled?void 0:!0,fontSize:r.INPUT_TEXT_SIZE[A].font.size,fontWeight:r.INPUT_TEXT_SIZE[A].font.weight,color:r.INPUT_TEXT_COLOR[v].fontColor,placeholder:S,id:e,name:t,value:s,min:_,step:d,onChange:g?U:void 0,onFocus:Z,onBlur:$,className:vi.inputtext,...M}),n===r.InputTextTypes.Password&&h.jsx(fl,{isShow:G,handleShowHideText:w}),f&&h.jsx(al,{inputHelper:f})]})]})},Sl=(e,t=!1)=>{var n,s,i,o,a,l,c,u,f,S;return t?{}:{borderBottomStyle:(i=(s=(n=r.INPUT_TEXT_STYLE[e])==null?void 0:n.borders)==null?void 0:s.bottom)==null?void 0:i.style,borderWidth:(a=(o=r.INPUT_TEXT_STYLE[e])==null?void 0:o.borders)==null?void 0:a.width,borderRadius:(c=(l=r.INPUT_TEXT_STYLE[e])==null?void 0:l.borders)==null?void 0:c.radius,borderStyle:(S=(f=(u=r.INPUT_TEXT_STYLE[e])==null?void 0:u.borders)==null?void 0:f.borders)==null?void 0:S.style}};function _l(e,t){y.useEffect(()=>{if(e.current){e.current.style.height="0px";const n=e.current.scrollHeight;e.current.style.height=n+"px"}},[t])}const pl=({id:e,label:t,size:n,textAreaColor:s,labelTextColor:i})=>h.jsx(I,{paddingLeft:r.TEXT_AREA_SIZE[n].paddings.left,paddingBottom:r.TEXT_AREA_SIZE[n].paddings.bottom,children:h.jsx("label",{htmlFor:e,children:h.jsx(q,{fontWeight:r.FontWeights.Size3,paletteColor:i&&typeof i=="boolean"?r.TEXT_AREA_COLOR[s].labelColor:r.ColorPalettes.Grey10,fontSize:r.TEXT_AREA_SIZE[n].font.size,children:t})})}),gl="_textareaBare_1yf3j_1",ml={textareaBare:gl},El=({id:e,name:t,value:n,modes:s=r.TextAreaModes.Default,label:i,required:o=!1,rows:a=1,width:l,fullWidth:c,placeholder:u="Insert text",onChange:f,handleBlur:S,handleFocus:d,handleCheck:_,size:g=r.TextAreaSizes.Default,textAreaStyle:m=r.TextAreaStyles.Default,textAreaColor:E=r.ColorSets.Primarys,labelTextColor:T,noLabel:A,ref:C,...v})=>{const O=y.useRef(null),x=Li(O,C);_l(O,n);const N=y.useCallback(async R=>{R.preventDefault();const j=R.target.value.trim();if(!(!j||j!=="")){S&&S(),_&&await _();return}},[S,_]),M=y.useCallback(()=>{if(s!==r.TextAreaModes.Disabled)return O.current&&O.current.focus(),d&&d(),!0},[d,s]);return h.jsxs(I,{style:{width:c?"100%":l||350},children:[!A&&h.jsx(pl,{id:e,label:i,textAreaColor:E,size:g,labelTextColor:T}),h.jsx(I,{boxSizing:r.BoxSizings.BorderBox,paddingLeft:r.TEXT_AREA_SIZE[g].paddings.left,paddingRight:r.TEXT_AREA_SIZE[g].paddings.right,paddingTop:r.TEXT_AREA_SIZE[g].paddings.top,paddingBottom:r.TEXT_AREA_SIZE[g].paddings.bottom,borderColor:r.ColorPalettes.Primary5,...Tl(m),style:{paddingTop:m!==r.TextAreaStyles.Outlined&&m!==r.TextAreaStyles.Default?1:"",paddingBottom:m!==r.TextAreaStyles.Outlined&&m!==r.TextAreaStyles.Default?1:"",cursor:"text"},onClick:()=>M(),children:h.jsx($s,{ref:x,id:e,name:t,value:n,required:o,outlineStyle:r.OutlineStyles.None,resize:r.ElementResizes.None,onChange:f,onFocus:M,onBlur:N,placeholder:u,rows:a,fontSize:r.TEXT_AREA_SIZE[g].font.size,fontWeight:r.TEXT_AREA_SIZE[g].font.weight,className:ml.textareaBare,...v})})]})},Tl=e=>{var t,n,s,i,o,a,l,c,u;return{borderBottomStyle:(s=(n=(t=r.TEXT_AREA_STYLE[e])==null?void 0:t.borders)==null?void 0:n.bottom)==null?void 0:s.style,borderWidth:(o=(i=r.TEXT_AREA_STYLE[e])==null?void 0:i.borders)==null?void 0:o.width,borderRadius:(l=(a=r.TEXT_AREA_STYLE[e])==null?void 0:a.borders)==null?void 0:l.radius,borderStyle:(u=(c=r.TEXT_AREA_STYLE[e])==null?void 0:c.borders)==null?void 0:u.style}},yl=({text:e,idx:t,handleSelectInset:n,isSelected:s,insetColor:i=r.ColorSets.Primarys,borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:l,borderBottomRightRadius:c})=>{const u=W({backgroundColor:s?r.COLOR_VALUES[r.ColorRanges[i][0]+3]:r.COLOR_VALUES[r.ColorRanges[r.ColorSets.Greys][0]+2],color:s?r.COLOR_VALUES[r.ColorRanges[r.ColorSets.Greys][1]-1]:r.COLOR_VALUES[r.ColorRanges[r.ColorSets.Greys][1]-4],boxShadow:s?"inset 0 0px 0 hsla(0, 0%, 0%, 0), inset 0 0px 0px hsla(0, 0%, 0%, 0)":"inset 0 -2px 0 hsla(0, 0%, 100%, .055), inset 0 2px 2px hsla(0, 0%, 0%, 0.1)"}),f=W({fontWeight:s?500:300});return h.jsx(I,{style:{...u,cursor:"pointer"},paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:l,borderBottomRightRadius:c,onClick:()=>n(t),children:h.jsx(I,{style:f,children:h.jsx(q,{style:{color:"inherit",transform:"translateY(-1px)",display:"inline-block"},children:e})})})},Al=({options:e=[],valueIndex:t=0,id:n,setInput:s,setSelect:i,insetColor:o})=>{const[a,l]=y.useState(t);y.useEffect(()=>{typeof t=="number"&&l(t)},[t]);const c=u=>{l(u),s&&s(f=>({...f,[n]:e[u]})),i&&i(e[u])};return h.jsx(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:e.map((u,f)=>h.jsx(yl,{text:u.text,value:u.value,idx:f,id:u.id,handleSelectInset:c,isSelected:f===a,insetColor:o,borderTopLeftRadius:f===0?r.Radiuses.Size4:void 0,borderTopRightRadius:f===e.length-1?r.Radiuses.Size4:void 0,borderBottomLeftRadius:f===0?r.Radiuses.Size4:void 0,borderBottomRightRadius:f===e.length-1?r.Radiuses.Size4:void 0},f))})},Cl="_message_1i7cn_1",Ol="_disabled_1i7cn_7",Ll="_life_1i7cn_12",vl="_red_1i7cn_19",Il="_blue_1i7cn_22",bl="_green_1i7cn_25",xl="_orange_1i7cn_28",ln={message:Cl,disabled:Ol,life:Ll,red:vl,blue:Il,green:bl,orange:xl},Rl=()=>{const{globalEventRef:e}=Qs();return h.jsx(Oi,{children:h.jsx(Nl,{children:t=>{e.current=t}})})};let wl=0;function Nl({config:e={tension:125,friction:20,precision:.1},timeout:t=3e3,children:n}){const s=y.useMemo(()=>new WeakMap,[]),i=y.useMemo(()=>new WeakMap,[]),[o,a]=y.useState([]),l=ue(o,{from:{opacity:0,height:0,life:"100%",y:0},keys:c=>c.key,enter:c=>async(u,f)=>{i.set(c,f),await u({opacity:1,height:s.get(c).offsetHeight+10,y:30}),await u({life:"0%"})},leave:[{opacity:0,y:50},{height:0}],onRest:(c,u,f)=>{a(S=>S.filter(d=>d.key!==f.key))},config:(c,u,f)=>S=>f==="enter"&&S==="life"?{duration:c.type.isTimeout?t:1e3*60*60*24}:e});return y.useEffect(()=>{n((c,u)=>{a(f=>[...f,{key:wl++,msg:c,type:u}])})},[n]),h.jsx(Y,{display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,flexAlignItem:r.FlexAlignItems.FlexEnd,style:{position:"fixed",zIndex:1e3,bottom:"30px",right:"30px"},children:l(({life:c,...u},f)=>h.jsx(Dl,{style:u,refMap:s,cancelMap:i,type:f.type,msg:f.msg,life:c,item:f}))})}const Dl=({style:e,refMap:t,cancelMap:n,type:s,msg:i,life:o,item:a})=>{const[l,c]=y.useState(!1);return h.jsx(I,{style:e,className:l?`${ln.message} disabled`:ln.message,children:h.jsx("div",{ref:u=>u&&t.set(a,u),children:h.jsx(I,{bgColor:r.ColorPalettes.Secondary2,borderRadius:r.Radiuses.Size4,padding:r.Spacings.Size3,boxShadow:r.BoxShadows.Size5,style:{borderBottom:"none"},children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,style:{position:"relative",minWidth:"200px"},children:[h.jsx(I,{marginRight:r.Spacings.Size2,children:h.jsx(ie,{name:s.icon,size:r.Sizings.Size6,colorLight:s.color,colorDark:s.color,withMargin:!1})}),h.jsx(Pt,{fontSize:r.FontSizes.Size4,children:i||s.default}),h.jsx(I,{marginLeft:r.Spacings.Auto,paddingLeft:r.Spacings.Size3,children:h.jsx(ie,{name:"x-circle",size:r.Sizings.Size4,iconAction:()=>{l||(n.has(a)&&o.get()!=="0%"&&n.get(a)(),c(!0))},withMargin:!1})}),(s==null?void 0:s.isTimeout)&&h.jsx(I,{className:`${ln.life} ${s.classname}`,style:{right:o,transform:"translateY(8px)"}})]})})})})},jl=()=>h.jsx(h.Fragment,{children:h.jsx(Rl,{})}),Ml="_ul_5jv7w_1",Pl="_li_5jv7w_5",tr={ul:Ml,li:Pl},fn={[r.DropdownPositions.Top]:{from:{y:-10},enter:{y:-1},leave:{y:-10}},[r.DropdownPositions.Bottom]:{from:{y:10},enter:{y:-1},leave:{y:10}}},kl=({dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o})=>{switch(e){case r.DropdownHeightStyles.Default:return h.jsx(ns,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o});case r.DropdownHeightStyles.AutoHeight:return h.jsx(Fl,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o});default:return h.jsx(ns,{dropdownHeightStyle:e,isOpen:t,dropdownPosition:n,position:s,selectState:i,children:o})}},ns=({isOpen:e,dropdownPosition:t,position:n,children:s})=>ue(e,{from:{opacity:0,...fn[t].from},enter:{opacity:1,...fn[t].enter},leave:{opacity:0,...fn[t].leave}})((o,a)=>a&&h.jsx(Xn,{style:{...o,transformOrigin:t===r.DropdownPositions.Top?"bottom center":t===r.DropdownPositions.Bottom?"top center":n<0?"bottom center":"top center"},className:tr.ul,children:s})),Fl=({isOpen:e,dropdownPosition:t,position:n,children:s})=>ue(e,{from:{opacity:0,scaleY:0},enter:{opacity:1,scaleY:1},leave:{opacity:0,scaleY:.5},config(o,a,l){return l==="leave"?{duration:100}:$n.default}})((o,a)=>a&&h.jsx(Xn,{style:{...o,transformOrigin:t===r.DropdownPositions.Top?"bottom center":t===r.DropdownPositions.Bottom?"top center":n<0?"bottom center":"top center"},className:tr.ul,children:s})),Bl=({handleSelectItem:e,id:t,idx:n,children:s,colorSet:i})=>{const[o,a]=W(()=>({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Grey2]}));return h.jsx(Zs,{className:tr.li,paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,marginTop:r.Spacings.Size0,style:{listStyle:"none",cursor:"pointer",userSelect:"none",...o},onMouseEnter:()=>{a.start({backgroundColor:r.COLOR_VALUES[r.ColorRanges[i][0]+2]})},onMouseLeave:()=>{a.start({backgroundColor:r.COLOR_VALUES[r.ColorPalettes.Grey2]})},onMouseDown:()=>{a.start({backgroundColor:r.COLOR_VALUES[r.ColorRanges[i][0]+3]})},onClick:()=>e(t,n),children:s})},zl=(e,t)=>{const[n,s]=y.useState(null);y.useEffect(()=>{const o=()=>{s({width:window?window.innerWidth:0,height:window?window.innerHeight:0})};return window&&window.addEventListener("resize",o),()=>{window&&window.removeEventListener("resize",o)}},[]);const i=e.height+10;return n&&i+e.top>n.height?-1:1},Gl=({isSelectOpen:e,selectOptions:t,handleSelectItem:n,selectState:s,dropdownHeightStyle:i,dropdownPosition:o=r.DropdownPositions.Bottom,colorSet:a,headerHeight:l,w:c})=>{const[u,f]=pe(),S=zl(f),d=S>0?l-1:-f.height;return h.jsx(xe,{ref:u,borderRadius:r.SELECT_STATES[s].dropdown.borderRadius,borderBottomLeftRadius:r.Radiuses.Size0,borderBottomRightRadius:r.Radiuses.Size0,borderWidth:r.SELECT_STATES[s].header.borderWidth,borderColor:r.SELECT_STATES[s].header.borderColor,style:{maxHeight:250,width:c,overflowY:"scroll",position:"absolute",transform:`translateY(${d}px)`,overscrollBehaviorY:"none"},children:h.jsx(kl,{dropdownHeightStyle:i,isOpen:e,dropdownPosition:o,selectState:s,position:S,children:t.map((_,g)=>h.jsx(Bl,{handleSelectItem:n,id:_.id,idx:g,colorSet:a,children:h.jsx(I,{paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,children:h.jsx(q,{children:_.text})})},_.id))})})},Ul=({selectedValues:e,doubleZero:t,title:n,selectedValueStyles:s=r.SelectedValuesStyles.Text,sizes:i=r.SelectSizes.Medium})=>(e.length===1&&e[0].text,e.length<1?h.jsx(Hl,{sizes:i,title:n}):s===r.SelectedValuesStyles.Text?h.jsx(h.Fragment,{children:e.map((o,a)=>h.jsx(q,{fontSize:r.SELECT_SIZES[i].font.size,children:o.text},a))}):h.jsx(h.Fragment,{children:e.map((o,a)=>h.jsx(q,{fontSize:r.SELECT_SIZES[i].font.size,children:o.text},a))})),Hl=({title:e,sizes:t})=>h.jsx(q,{fontSize:r.SELECT_SIZES[t].font.size,children:e}),$l=({setOpenDropdown:e,openDropdown:t,title:n,doubleZero:s,selectState:i,selectedValues:o,selectedValueStyles:a,sizes:l=r.SelectSizes.Medium})=>h.jsx(I,{style:{cursor:"pointer"},paddingTop:r.Spacings.Size1,paddingBottom:r.Spacings.Size1,paddingLeft:r.Spacings.Size2,paddingRight:r.Spacings.Size2,borderRadius:r.SELECT_STATES[i].header.borderRadius,borderWidth:r.SELECT_STATES[i].header.borderWidth,borderColor:r.SELECT_STATES[i].header.borderColor,borderTopLeftRadius:t?r.Radiuses.Size0:void 0,borderTopRightRadius:t?r.Radiuses.Size0:void 0,bgColor:r.SELECT_STATES[i].header.bgColor,onClick:()=>e(c=>!c),children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,flexJustifyContent:r.FlexJustifyContents.SpaceBetween,children:[h.jsx(Ul,{sizes:l,selectedValues:o,doubleZero:s,title:n,selectedValueStyles:a}),h.jsx("div",{className:"icon",children:h.jsx(Zl,{isSelectOpen:t,sizes:l})})]})}),Zl=({isSelectOpen:e,sizes:t,cursor:n=r.Cursors.Pointer})=>{const s=W({rotateX:e?180:0});return h.jsx(I,{style:s,children:h.jsx(ie,{name:"chevron-down",colorLight:r.ColorPalettes.Grey5,colorDark:r.ColorPalettes.Grey5,size:r.SELECT_SIZES[t].icon.size,cursor:n})})};function Yl(e,t){switch(t.type){case"field":return{...e,[t.field]:t.value};case"select":return{...e,selectedItemIdx:t.value,selectOptions:e.selectOptions.map((n,s)=>t.value===s?{...n,selected:!0}:{...n,selected:!1}),openDropdown:!1,selectState:r.SelectStates.Selected};case"open":return{...e,openDropdown:!0};case"close":return{...e,openDropdown:!1};case"open-close":return{...e,openDropdown:!e.openDropdown};case"parent-update-selected":return{...e,selectedItemIdx:t.value,selectOptions:e.selectOptions.map((n,s)=>({...n,selected:s===t.value}))};default:return e}}const Vl=({id:e,title:t,options:n,selectedIdx:s=null,w:i=225,doubleZero:o=!1,required:a=!1,dropdownHeightStyle:l=r.DropdownHeightStyles.AutoHeight,state:c=r.SelectStates.Default,selectedValuesStyle:u=r.SelectedValuesStyles.Text,colorSet:f=r.ColorSets.Primarys,dropdownPosition:S=r.DropdownPositions.Bottom,setSelectedIdx:d,setInput:_})=>{const[g,m]=y.useState(!1),[E,T]=y.useReducer(Yl,{selectState:c,openDropdown:!1,selectedItemIdx:s,selectOptions:n}),{openDropdown:A,selectedItemIdx:C,selectOptions:v,selectState:O}=E;y.useEffect(()=>{m(!0),typeof s=="number"&&(d&&d(s),_&&_(j=>({...j,[e]:n[s]})))},[]),y.useEffect(()=>{typeof s=="number"&&T({type:"parent-update-selected",value:s})},[s]),y.useEffect(()=>{a&&g&&!A&&T(typeof C=="number"&&C!==-1?{type:"field",field:"selectState",value:r.SelectStates.Default}:{type:"field",field:"selectState",value:r.SelectStates.Error})},[g,A,a,C]);const x=(j,D)=>{T({type:"select",value:D}),d&&d(D),_&&_(B=>({...B,[j]:v[D]}))},N=qn(()=>{T({type:"close"})}),[M,R]=pe();return h.jsxs(Gs,{ref:N,display:r.Displays.Flex,flexDirection:r.FlexDirections.Column,style:{width:i,maxWidth:i},children:[h.jsx("div",{ref:M,children:h.jsx($l,{w:i,setOpenDropdown:()=>T({type:"open-close"}),selectState:O,setSelectState:j=>T({type:"field",field:"selectState",value:j}),openDropdown:A,title:t,doubleZero:o,selectedValues:v.filter(j=>j.selected===!0),selectedValueStyles:u,options:n})}),h.jsx(Gl,{isSelectOpen:A,closeSelect:()=>T({type:"close"}),selectOptions:v,handleSelectItem:x,selectState:O,dropdownHeightStyle:l,dropdownPosition:S,colorSet:f,headerHeight:R.height,w:R.width})]})},Xl=({headerId:e,element:t,styles:n,sortable:s=!1,onClickHeaderCell:i,columnIndex:o,setTableRows:a})=>{const l=y.useCallback(S=>{i&&i(e,S)},[e,i]),c=y.useCallback(()=>{s&&a&&a(S=>{const d=[...S];try{d[0].cells[o].cellId<d[d.length-1].cells[o].cellId?d.sort((_,g)=>{const m=_.cells[o].cellId,E=g.cells[o].cellId;return m<E?1:m>E?-1:0}):d.sort((_,g)=>{const m=_.cells[o].cellId,E=g.cells[o].cellId;return m<E?-1:m>E?1:0})}catch(_){return console.error(_),S}return d})},[o,a,s]),[u,f]=W(()=>({opacity:0}));return h.jsx(Y,{justifySelf:n.position.justifySelf,alignSelf:n.position.alignSelf,style:{width:"100%"},children:h.jsx(I,{onClick:l,onMouseEnter:()=>{f.start({opacity:1})},onMouseLeave:()=>{f.start({opacity:0})},children:h.jsxs(Y,{display:r.Displays.Flex,flexAlignItem:r.FlexAlignItems.Center,children:[t,s&&h.jsx(I,{marginLeft:r.Spacings.Size3,style:u,children:h.jsx(ie,{name:"arrow-up",size:r.Sizings.Size3,iconAction:()=>c()})})]})})})},Wl="_gridTableHeader_nombk_1",ql={gridTableHeader:Wl},Ii=({headers:e=[],templateColumns:t,setTableRows:n})=>h.jsx(I,{paddingLeft:r.Spacings.Size1,paddingRight:r.Spacings.Size1,children:h.jsx(Y,{display:r.Displays.Grid,className:ql.gridTableHeader,style:{gridTemplateColumns:t.join(" ")},children:e.map((s,i)=>h.jsx(Xl,{headerId:s.headerId,element:s.element,styles:s.styles,onClickHeaderCell:s.onClickHeaderCell,setTableRows:n,columnIndex:i,sortable:s.sortable},s.headerId))})}),Kl=({hover:e,onHover:t,isClicked:n,children:s})=>{const i=W({backgroundColor:t?"rgba(255,255,255, .1)":"rgba(255,255,255,0)",borderRadius:"10px"}),o=W({backgroundColor:n?"rgba(255,255,255, .15)":"rgba(255,255,255,0)",borderRadius:"10px"});return h.jsx(I,{style:e?o:void 0,children:h.jsx(I,{style:e?i:void 0,paddingLeft:r.Spacings.Size1,paddingRight:r.Spacings.Size1,children:s})})},Ql=({cellId:e,element:t,styles:n,onClickCell:s})=>h.jsx(Y,{justifySelf:n.position.justifySelf,alignSelf:n.position.alignSelf,children:h.jsx(I,{onClick:i=>{s&&s(e,i)},children:t})}),Jl="_gridTableRow_1mdn2_1",ef="_cellData_1mdn2_18",tf="_date_1mdn2_23",nf="_time_1mdn2_27",rf="_serial_1mdn2_32",sf="_image_1mdn2_36",of="_absolute_1mdn2_45",af="_start_1mdn2_54",cf="_center_1mdn2_57",uf="_end_1mdn2_60",lf={gridTableRow:Jl,cellData:ef,date:tf,time:nf,serial:rf,image:sf,"button-option":"_button-option_1mdn2_41",absolute:of,start:af,center:cf,end:uf},bi=({rowId:e,templateColumns:t=[],cells:n=[],hover:s,onClickRow:i})=>{const[o,a]=y.useState(!1),[l,c]=y.useState(!1);return h.jsx(Kl,{hover:s,onHover:o,isClicked:l,children:h.jsx(Y,{className:lf.gridTableRow,onMouseEnter:()=>a(!0),onMouseLeave:()=>a(!1),onMouseDown:()=>c(!0),onMouseUp:()=>c(!1),onClick:u=>{i&&i(e,u)},display:r.Displays.Grid,style:{gridTemplateColumns:t.join(" ")},children:n.map((u,f)=>h.jsx(Ql,{cellId:u.cellId,element:u.element,styles:u.styles,onClickCell:u.onClickCell},u.cellId||f))})})},ff=({headers:e=[],rows:t=[],templateColumns:n,emptyPlaceholder:s,hover:i=!0})=>{const[o,a]=y.useState(t);return h.jsxs(I,{style:{flex:1,width:"100%",maxWidth:"100%"},children:[h.jsx(Ii,{headers:e,templateColumns:n,setTableRows:a}),o.length!==0?h.jsx(h.Fragment,{children:o.map((l,c)=>h.jsx(bi,{rowId:l.rowId,templateColumns:n,cells:l.cells,hover:i,onClickRow:l.onClickRow},l.rowId||c))}):s?h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,style:{width:"100%"},children:s}):h.jsx(h.Fragment,{})]})},df=({menu:e,setActiveItem:t,idx:n,menuWrapper:s,route:i})=>{const o=()=>{t(n)};return h.jsx(hf,{Wrapper:s,route:i,children:h.jsx(I,{onClick:()=>o(),paddingLeft:r.Spacings.Size3,paddingRight:r.Spacings.Size3,paddingTop:r.Spacings.Size2,paddingBottom:r.Spacings.Size2,style:{zIndex:11,cursor:"pointer",userSelect:"none"},children:h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:h.jsx(q,{style:{zIndex:12},children:e.name})})})})};function hf({Wrapper:e,route:t,children:n}){if(typeof e<"u")return h.jsx(e,{href:t,children:n})}const Sf=({height:e,tabRoomWidth:t,activeItem:n})=>{const[s,i]=W(()=>({from:{x:0}}));return i.start({x:t*n}),h.jsx(I,{borderRadius:r.Radiuses.Size5,boxShadow:r.BoxShadows.Size1,padding:r.Spacings.Size1,boxSizing:r.BoxSizings.BorderBox,style:{position:"absolute",height:e,width:t,zIndex:10,...s},children:h.jsx(I,{borderRadius:r.Radiuses.Size4,bgColor:r.ColorPalettes.Grey2,style:{width:"100%",height:"100%"},children:h.jsx(h.Fragment,{})})})},_f=({tabMenu:e,tab:t,setTab:n})=>{const[s,i]=y.useState(t||0);y.useEffect(()=>{i(t)},[t]);const o=u=>{n&&n(u),i(u)},[a,l]=pe(),c=l.width/e.length;return h.jsx(Y,{display:r.Displays.Flex,flexJustifyContent:r.FlexJustifyContents.Center,flexAlignItem:r.FlexAlignItems.Center,children:h.jsx("div",{ref:a,style:{boxSizing:"border-box"},children:h.jsx(I,{borderRadius:r.Radiuses.Size5,bgColor:r.ColorPalettes.Grey1,style:{width:"max-content",height:"max-content",position:"relative",zIndex:9},children:h.jsxs(Y,{display:r.Displays.Grid,style:{gridTemplateColumns:`repeat(${e.length}, 1fr)`,position:"relative"},children:[h.jsx(Sf,{height:l.height,width:l.width,activeItem:s,tabRoomWidth:c}),e.map((u,f)=>h.jsx(df,{idx:f,menu:u,active:s===f,setActiveItem:o,menuWrapper:u.menuWrapper,route:u.route},f))]})})})})},pf="_toggleContainer_15eps_1",gf="_toggleBg_15eps_15",mf="_toggleThumb_15eps_33",dn={toggleContainer:pf,toggleBg:gf,toggleThumb:mf},Ef=({isTrue:e,setIsTrue:t,size:n=r.ToggleSizes.Medium,icon:s="",toggleState:i=r.ToggleStates.Icon,description:o=""})=>{var _,g;const a=W({backgroundColor:e?"#4BD763":"#cccccc"}),[l,c]=W(()=>({x:0}));c.start({x:e?26:0});const[u,f]=y.useState(!1),[S,d]=pe();return h.jsxs(I,{className:dn.toggleContainer,tabIndex:1,onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onClick:()=>t(m=>!m),style:{width:r.TOGGLE_SIZE[n].container.w,height:r.TOGGLE_SIZE[n].container.h},children:[h.jsx(I,{style:{...a,position:"relative"},children:h.jsx(I,{className:dn.toggleBg,style:{width:r.TOGGLE_SIZE[n].bg.w,height:r.TOGGLE_SIZE[n].bg.h}})}),h.jsx(I,{style:{position:"relative",...l},children:h.jsxs(xe,{className:dn.toggleThumb,ref:S,style:{width:r.TOGGLE_SIZE[n].thumb.w,height:r.TOGGLE_SIZE[n].thumb.h},children:[o!==""&&h.jsx(kt,{labelName:o,hover:u,offsetX:d.width/2,y:d.height+5}),s!==""&&h.jsx(ie,{name:i===r.ToggleStates.Icon?s:r.TOGGLE_STATE_ICON[i],width:(_=r.TOGGLE_SIZE[n].icon)==null?void 0:_.w,height:(g=r.TOGGLE_SIZE[n].icon)==null?void 0:g.h})]})})]})};exports.Admonition=wa;exports.Avatar=Js;exports.AvatarGroup=Ma;exports.Button=ei;exports.Checkbox=ti;exports.Checkboxes=Ba;exports.Chip=Ga;exports.ColorPicker=mc;exports.Container=I;exports.ContainerRef=xe;exports.DivMeasure=ya;exports.F__Button=Us;exports.F__ButtonRef=Yo;exports.F__Li=Zs;exports.F__LiRef=Wo;exports.F__TextArea=$s;exports.F__TextAreaRef=Xo;exports.F__TextInput=Hs;exports.F__TextInputRef=Vo;exports.F__Ul=Xn;exports.F__UlRef=qo;exports.FunctionalUiPortals=Kn;exports.GalleryModal=Xu;exports.GlobalEventPortal=Oi;exports.InputImage=rl;exports.InputText=hl;exports.InsetGroup=Al;exports.LabelText=kt;exports.Layout=Y;exports.LayoutRef=Gs;exports.LoadingSpinner=Aa;exports.Modal=Ai;exports.NotificationSystem=jl;exports.ProvideGlobalEventContext=xa;exports.ProvideUiContext=Ia;exports.Radio=il;exports.SelectSpring=Vl;exports.Spinner=Xs;exports.SpringEnter=Oa;exports.SpringEnterOffsetBy=Ws;exports.SpringMenuTransition=La;exports.SpringOpenCloseHeight=Ca;exports.TableGrid=ff;exports.TableHeader=Ii;exports.TableRow=bi;exports.Tabs=_f;exports.TagColor=oi;exports.TextArea=El;exports.Text_H1=Ko;exports.Text_H1Ref=Qo;exports.Text_H2=Jo;exports.Text_H2Ref=ea;exports.Text_H3=ta;exports.Text_H3Ref=na;exports.Text_H4=ra;exports.Text_H4Ref=sa;exports.Text_H5=ia;exports.Text_H5Ref=oa;exports.Text_H6=aa;exports.Text_H6Ref=ca;exports.Text_Header=ha;exports.Text_HeaderRef=Sa;exports.Text_P=Pt;exports.Text_PRef=ua;exports.Text_Span=q;exports.Text_SpanRef=la;exports.ToggleSwitch=Ef;exports.UIcon=ie;exports.useGlobalEventContext=Qs;exports.useUiContext=V;