@npm-questionpro/wick-ui-lib 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
(function(B,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],p):(B=typeof globalThis<"u"?globalThis:B||self,p(B["wick-ui-lib"]={},B["react/jsx-runtime"],B.React,B.ReactDOM))})(this,function(B,p,H,Kt){"use strict";function qt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,o.get?o:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const d=qt(H),De=qt(Kt);var ct=(e=>(e.PRIMARY="primary",e.ACCENT="accent",e.ERROR="error",e))(ct||{}),Fe=(e=>(e.LEFT="left",e.RIGHT="right",e))(Fe||{}),lt=(e=>(e.SM="sm",e.MD="md",e.LG="lg",e))(lt||{}),dt=(e=>(e.PRIMARY="primary",e.SECONDARY="secondary",e.OUTLINE="outline",e.ROUNDED="rounded",e.LINK="link",e.ICON_ONLY="icon-only",e))(dt||{});function Tn(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Yt(...e){return t=>e.forEach(r=>Tn(r,t))}function j(...e){return d.useCallback(Yt(...e),e)}var Ae=d.forwardRef((e,t)=>{const{children:r,...o}=e,n=d.Children.toArray(r),s=n.find(Pn);if(s){const i=s.props.children,c=n.map(l=>l===s?d.Children.count(i)>1?d.Children.only(null):d.isValidElement(i)?i.props.children:null:l);return p.jsx(ut,{...o,ref:t,children:d.isValidElement(i)?d.cloneElement(i,void 0,c):null})}return p.jsx(ut,{...o,ref:t,children:r})});Ae.displayName="Slot";var ut=d.forwardRef((e,t)=>{const{children:r,...o}=e;if(d.isValidElement(r)){const n=Sn(r);return d.cloneElement(r,{...An(o,r.props),ref:t?Yt(t,n):n})}return d.Children.count(r)>1?d.Children.only(null):null});ut.displayName="SlotClone";var Xt=({children:e})=>p.jsx(p.Fragment,{children:e});function Pn(e){return d.isValidElement(e)&&e.type===Xt}function An(e,t){const r={...t};for(const o in t){const n=e[o],s=t[o];/^on[A-Z]/.test(o)?n&&s?r[o]=(...c)=>{s(...c),n(...c)}:n&&(r[o]=n):o==="style"?r[o]={...n,...s}:o==="className"&&(r[o]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}function Sn(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function Zt(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=Zt(e[t]))&&(o&&(o+=" "),o+=r);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Nn(){for(var e,t,r=0,o="";r<arguments.length;)(e=arguments[r++])&&(t=Zt(e))&&(o&&(o+=" "),o+=t);return o}const Jt=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Qt=Nn,me=(e,t)=>r=>{var o;if((t==null?void 0:t.variants)==null)return Qt(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:s}=t,i=Object.keys(n).map(a=>{const u=r==null?void 0:r[a],f=s==null?void 0:s[a];if(u===null)return null;const v=Jt(u)||Jt(f);return n[a][v]}),c=r&&Object.entries(r).reduce((a,u)=>{let[f,v]=u;return v===void 0||(a[f]=v),a},{}),l=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((a,u)=>{let{class:f,className:v,...h}=u;return Object.entries(h).every(m=>{let[b,g]=m;return Array.isArray(g)?g.includes({...s,...c}[b]):{...s,...c}[b]===g})?[...a,f,v]:a},[]);return Qt(e,i,l,r==null?void 0:r.class,r==null?void 0:r.className)};function er(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=er(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function kn(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=er(e))&&(o&&(o+=" "),o+=t);return o}const ft="-";function On(e){const t=In(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;function n(i){const c=i.split(ft);return c[0]===""&&c.length!==1&&c.shift(),tr(c,t)||Rn(i)}function s(i,c){const l=r[i]||[];return c&&o[i]?[...l,...o[i]]:l}return{getClassGroupId:n,getConflictingClassGroupIds:s}}function tr(e,t){var i;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?tr(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const s=e.join(ft);return(i=t.validators.find(({validator:c})=>c(s)))==null?void 0:i.classGroupId}const rr=/^\[(.+)\]$/;function Rn(e){if(rr.test(e)){const t=rr.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function In(e){const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return _n(Object.entries(e.classGroups),r).forEach(([s,i])=>{pt(i,o,s,t)}),o}function pt(e,t,r,o){e.forEach(n=>{if(typeof n=="string"){const s=n===""?t:or(t,n);s.classGroupId=r;return}if(typeof n=="function"){if(Mn(n)){pt(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([s,i])=>{pt(i,or(t,s),r,o)})})}function or(e,t){let r=e;return t.split(ft).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r}function Mn(e){return e.isThemeGetter}function _n(e,t){return t?e.map(([r,o])=>{const n=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,c])=>[t+i,c])):s);return[r,n]}):e}function Ln(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;function n(s,i){r.set(s,i),t++,t>e&&(t=0,o=r,r=new Map)}return{get(s){let i=r.get(s);if(i!==void 0)return i;if((i=o.get(s))!==void 0)return n(s,i),i},set(s,i){r.has(s)?r.set(s,i):n(s,i)}}}const nr="!";function Dn(e){const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],s=t.length;function i(c){const l=[];let a=0,u=0,f;for(let g=0;g<c.length;g++){let y=c[g];if(a===0){if(y===n&&(o||c.slice(g,g+s)===t)){l.push(c.slice(u,g)),u=g+s;continue}if(y==="/"){f=g;continue}}y==="["?a++:y==="]"&&a--}const v=l.length===0?c:c.substring(u),h=v.startsWith(nr),m=h?v.substring(1):v,b=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:b}}return r?function(l){return r({className:l,parseClassName:i})}:i}function Fn(e){if(e.length<=1)return e;const t=[];let r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t}function $n(e){return{cache:Ln(e.cacheSize),parseClassName:Dn(e),...On(e)}}const Wn=/\s+/;function zn(e,t){const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,s=new Set;return e.trim().split(Wn).map(i=>{const{modifiers:c,hasImportantModifier:l,baseClassName:a,maybePostfixModifierPosition:u}=r(i);let f=!!u,v=o(f?a.substring(0,u):a);if(!v){if(!f)return{isTailwindClass:!1,originalClassName:i};if(v=o(a),!v)return{isTailwindClass:!1,originalClassName:i};f=!1}const h=Fn(c).join(":");return{isTailwindClass:!0,modifierId:l?h+nr:h,classGroupId:v,originalClassName:i,hasPostfixModifier:f}}).reverse().filter(i=>{if(!i.isTailwindClass)return!0;const{modifierId:c,classGroupId:l,hasPostfixModifier:a}=i,u=c+l;return s.has(u)?!1:(s.add(u),n(l,a).forEach(f=>s.add(c+f)),!0)}).reverse().map(i=>i.originalClassName).join(" ")}function Vn(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=sr(t))&&(o&&(o+=" "),o+=r);return o}function sr(e){if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=sr(e[o]))&&(r&&(r+=" "),r+=t);return r}function Bn(e,...t){let r,o,n,s=i;function i(l){const a=t.reduce((u,f)=>f(u),e());return r=$n(a),o=r.cache.get,n=r.cache.set,s=c,c(l)}function c(l){const a=o(l);if(a)return a;const u=zn(l,r);return n(l,u),u}return function(){return s(Vn.apply(null,arguments))}}function W(e){const t=r=>r[e]||[];return t.isThemeGetter=!0,t}const ir=/^\[(?:([a-z-]+):)?(.+)\]$/i,Gn=/^\d+\/\d+$/,Hn=new Set(["px","full","screen"]),jn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Un=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Kn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function te(e){return pe(e)||Hn.has(e)||Gn.test(e)}function ie(e){return be(e,"length",os)}function pe(e){return!!e&&!Number.isNaN(Number(e))}function $e(e){return be(e,"number",pe)}function Se(e){return!!e&&Number.isInteger(Number(e))}function Xn(e){return e.endsWith("%")&&pe(e.slice(0,-1))}function k(e){return ir.test(e)}function ae(e){return jn.test(e)}const Zn=new Set(["length","size","percentage"]);function Jn(e){return be(e,Zn,ar)}function Qn(e){return be(e,"position",ar)}const es=new Set(["image","url"]);function ts(e){return be(e,es,ss)}function rs(e){return be(e,"",ns)}function Ne(){return!0}function be(e,t,r){const o=ir.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1}function os(e){return Un.test(e)&&!Kn.test(e)}function ar(){return!1}function ns(e){return qn.test(e)}function ss(e){return Yn.test(e)}function is(){const e=W("colors"),t=W("spacing"),r=W("blur"),o=W("brightness"),n=W("borderColor"),s=W("borderRadius"),i=W("borderSpacing"),c=W("borderWidth"),l=W("contrast"),a=W("grayscale"),u=W("hueRotate"),f=W("invert"),v=W("gap"),h=W("gradientColorStops"),m=W("gradientColorStopPositions"),b=W("inset"),g=W("margin"),y=W("opacity"),w=W("padding"),x=W("saturate"),C=W("scale"),E=W("sepia"),P=W("skew"),A=W("space"),N=W("translate"),L=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",k,t],S=()=>[k,t],V=()=>["",te,ie],T=()=>["auto",pe,k],I=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],R=()=>["solid","dashed","dotted","double","none"],O=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",k],fe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],q=()=>[pe,$e],ee=()=>[pe,k];return{cacheSize:500,separator:":",theme:{colors:[Ne],spacing:[te,ie],blur:["none","",ae,k],brightness:q(),borderColor:[e],borderRadius:["none","","full",ae,k],borderSpacing:S(),borderWidth:V(),contrast:q(),grayscale:$(),hueRotate:ee(),invert:$(),gap:S(),gradientColorStops:[e],gradientColorStopPositions:[Xn,ie],inset:D(),margin:D(),opacity:q(),padding:S(),saturate:q(),scale:q(),sepia:$(),skew:ee(),space:S(),translate:S()},classGroups:{aspect:[{aspect:["auto","square","video",k]}],container:["container"],columns:[{columns:[ae]}],"break-after":[{"break-after":fe()}],"break-before":[{"break-before":fe()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...I(),k]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Se,k]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",k]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",Se,k]}],"grid-cols":[{"grid-cols":[Ne]}],"col-start-end":[{col:["auto",{span:["full",Se,k]},k]}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":[Ne]}],"row-start-end":[{row:["auto",{span:[Se,k]},k]}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",k]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",k]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",k,t]}],"min-w":[{"min-w":[k,t,"min","max","fit"]}],"max-w":[{"max-w":[k,t,"none","full","min","max","fit","prose",{screen:[ae]},ae]}],h:[{h:[k,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[k,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[k,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[k,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ae,ie]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$e]}],"font-family":[{font:[Ne]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",k]}],"line-clamp":[{"line-clamp":["none",pe,$e]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",te,k]}],"list-image":[{"list-image":["none",k]}],"list-style-type":[{list:["none","disc","decimal",k]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[y]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[y]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...R(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",te,ie]}],"underline-offset":[{"underline-offset":["auto",te,k]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:S()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",k]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",k]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[y]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...I(),Qn]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Jn]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ts]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[y]}],"border-style":[{border:[...R(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[y]}],"divide-style":[{divide:R()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...R()]}],"outline-offset":[{"outline-offset":[te,k]}],"outline-w":[{outline:[te,ie]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:V()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[y]}],"ring-offset-w":[{"ring-offset":[te,ie]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ae,rs]}],"shadow-color":[{shadow:[Ne]}],opacity:[{opacity:[y]}],"mix-blend":[{"mix-blend":[...O(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":O()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",ae,k]}],grayscale:[{grayscale:[a]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[a]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[y]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",k]}],duration:[{duration:ee()}],ease:[{ease:["linear","in","out","in-out",k]}],delay:[{delay:ee()}],animate:[{animate:["none","spin","ping","pulse","bounce",k]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Se,k]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",k]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",k]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":S()}],"scroll-mx":[{"scroll-mx":S()}],"scroll-my":[{"scroll-my":S()}],"scroll-ms":[{"scroll-ms":S()}],"scroll-me":[{"scroll-me":S()}],"scroll-mt":[{"scroll-mt":S()}],"scroll-mr":[{"scroll-mr":S()}],"scroll-mb":[{"scroll-mb":S()}],"scroll-ml":[{"scroll-ml":S()}],"scroll-p":[{"scroll-p":S()}],"scroll-px":[{"scroll-px":S()}],"scroll-py":[{"scroll-py":S()}],"scroll-ps":[{"scroll-ps":S()}],"scroll-pe":[{"scroll-pe":S()}],"scroll-pt":[{"scroll-pt":S()}],"scroll-pr":[{"scroll-pr":S()}],"scroll-pb":[{"scroll-pb":S()}],"scroll-pl":[{"scroll-pl":S()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",k]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[te,ie,$e]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}const as=Bn(is);function G(...e){return as(kn(e))}const cs=me("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-normal ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-p-blue-200 focus-visible:ring-offset-2 disabled:pointer-events-none leading-4 disabled:grayscale disabled:opacity-80",{variants:{size:{md:"px-6 py-2",sm:"text-xs px-4 py-1",lg:"text-lg px-8 py-2"},color:{primary:"bg-p-blue-400 hover:bg-p-blue-400 text-p-blue-400 ring-1 ring-p-blue-400",accent:"bg-payme-orange-500 hover:bg-payme-orange-500 text-payme-orange-500 ring-1 ring-payme-orange-500",error:"bg-red-500 hover:bg-red-500 text-red-500 ring-1 ring-red-500"},variant:{primary:"text-white hover:bg-opacity-70 ring-0",secondary:"bg-transparent ring-0 hover:bg-gray-200",outline:"hover:text-white bg-transparent",rounded:"text-white hover:bg-opacity-70 ring-0 rounded-full",link:"hover:underline bg-transparent hover:bg-transparent ring-0 underline-offset-2","icon-only":"rounded p-2 hover:bg-p-gray-200 ring-0 bg-transparent"}},defaultVariants:{variant:"primary",size:"md",color:ct.PRIMARY}}),cr=d.forwardRef(({className:e,variant:t,size:r,color:o,asChild:n=!1,...s},i)=>{const c=n?Ae:"button";return p.jsx(c,{className:G(cs({size:r,color:o,variant:t,className:e})),ref:i,...s})});cr.displayName="Button";var ke=(e=>(e.SMALL="small",e.MEDIUM="medium",e.LARGE="large",e))(ke||{});const ve={spinner:"_spinner_8xsdj_1",message:"_message_8xsdj_9",dot:"_dot_8xsdj_14",reveal:"_reveal_8xsdj_1",slide:"_slide_8xsdj_1"},lr=({size:e,className:t,style:r,color:o,ariaLabel:n="Loading",message:s})=>{const i=G(ve.spinner,t);let c="7px";e===ke.SMALL?c="7px":e===ke.MEDIUM?c="12px":e===ke.LARGE?c="18px":typeof e=="string"&&(c=e);const l={fontSize:c},a=o?{backgroundColor:o}:{};return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:i,style:{...l,...r},"aria-label":n,role:"spinner",children:[p.jsx("span",{className:ve.dot,style:{...a}}),p.jsx("span",{className:ve.dot,style:{...a}}),p.jsx("span",{className:ve.dot,style:{...a}}),p.jsx("span",{className:ve.dot,style:{...a}})]}),s&&p.jsx("div",{className:ve.message,children:s})]})},ls=({disabled:e,loading:t,variant:r=dt.PRIMARY,size:o=lt.MD,icon:n,iconPosition:s=Fe.LEFT,children:i,floating:c,className:l,color:a,...u})=>p.jsxs(cr,{...u,disabled:e||t,variant:r,size:o,className:G(c&&"shadow-qp","flex items-center justify-center gap-2",s===Fe.RIGHT&&"flex-row-reverse",l,t?"bg-p-gray-400 ring-p-gray-400":""),color:a,children:[!t&&n&&p.jsx(p.Fragment,{children:n}),t&&p.jsx(lr,{}),!t&&i]});function re(e,t=[]){let r=[];function o(s,i){const c=d.createContext(i),l=r.length;r=[...r,i];function a(f){const{scope:v,children:h,...m}=f,b=(v==null?void 0:v[e][l])||c,g=d.useMemo(()=>m,Object.values(m));return p.jsx(b.Provider,{value:g,children:h})}function u(f,v){const h=(v==null?void 0:v[e][l])||c,m=d.useContext(h);if(m)return m;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return a.displayName=s+"Provider",[a,u]}const n=()=>{const s=r.map(i=>d.createContext(i));return function(c){const l=(c==null?void 0:c[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return n.scopeName=e,[o,ds(n,...t)]}function ds(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const o=e.map(n=>({useScope:n(),scopeName:n.scopeName}));return function(s){const i=o.reduce((c,{useScope:l,scopeName:a})=>{const f=l(s)[`__scope${a}`];return{...c,...f}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function _(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(e==null||e(n),r===!1||!n.defaultPrevented)return t==null?void 0:t(n)}}function Y(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var o;return(o=t.current)==null?void 0:o.call(t,...r)},[])}function ye({prop:e,defaultProp:t,onChange:r=()=>{}}){const[o,n]=us({defaultProp:t,onChange:r}),s=e!==void 0,i=s?e:o,c=Y(r),l=d.useCallback(a=>{if(s){const f=typeof a=="function"?a(e):a;f!==e&&c(f)}else n(a)},[s,e,n,c]);return[i,l]}function us({defaultProp:e,onChange:t}){const r=d.useState(e),[o]=r,n=d.useRef(o),s=Y(t);return d.useEffect(()=>{n.current!==o&&(s(o),n.current=o)},[o,n,s]),r}function ht(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var ce=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{};function We(e){const[t,r]=d.useState(void 0);return ce(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(n=>{if(!Array.isArray(n)||!n.length)return;const s=n[0];let i,c;if("borderBoxSize"in s){const l=s.borderBoxSize,a=Array.isArray(l)?l[0]:l;i=a.inlineSize,c=a.blockSize}else i=e.offsetWidth,c=e.offsetHeight;r({width:i,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else r(void 0)},[e]),t}function fs(e,t){return d.useReducer((r,o)=>t[r][o]??r,e)}var Oe=e=>{const{present:t,children:r}=e,o=ps(t),n=typeof r=="function"?r({present:o.isPresent}):d.Children.only(r),s=j(o.ref,hs(n));return typeof r=="function"||o.isPresent?d.cloneElement(n,{ref:s}):null};Oe.displayName="Presence";function ps(e){const[t,r]=d.useState(),o=d.useRef({}),n=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[c,l]=fs(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const a=ze(o.current);s.current=c==="mounted"?a:"none"},[c]),ce(()=>{const a=o.current,u=n.current;if(u!==e){const v=s.current,h=ze(a);e?l("MOUNT"):h==="none"||(a==null?void 0:a.display)==="none"?l("UNMOUNT"):l(u&&v!==h?"ANIMATION_OUT":"UNMOUNT"),n.current=e}},[e,l]),ce(()=>{if(t){const a=f=>{const h=ze(o.current).includes(f.animationName);f.target===t&&h&&De.flushSync(()=>l("ANIMATION_END"))},u=f=>{f.target===t&&(s.current=ze(o.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:d.useCallback(a=>{a&&(o.current=getComputedStyle(a)),r(a)},[])}}function ze(e){return(e==null?void 0:e.animationName)||"none"}function hs(e){var o,n;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var gs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],z=gs.reduce((e,t)=>{const r=d.forwardRef((o,n)=>{const{asChild:s,...i}=o,c=s?Ae:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(c,{...i,ref:n})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dr(e,t){e&&De.flushSync(()=>e.dispatchEvent(t))}var gt="Checkbox",[ms,Wc]=re(gt),[bs,vs]=ms(gt),ur=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:o,checked:n,defaultChecked:s,required:i,disabled:c,value:l="on",onCheckedChange:a,...u}=e,[f,v]=d.useState(null),h=j(t,x=>v(x)),m=d.useRef(!1),b=f?!!f.closest("form"):!0,[g=!1,y]=ye({prop:n,defaultProp:s,onChange:a}),w=d.useRef(g);return d.useEffect(()=>{const x=f==null?void 0:f.form;if(x){const C=()=>y(w.current);return x.addEventListener("reset",C),()=>x.removeEventListener("reset",C)}},[f,y]),p.jsxs(bs,{scope:r,state:g,disabled:c,children:[p.jsx(z.button,{type:"button",role:"checkbox","aria-checked":he(g)?"mixed":g,"aria-required":i,"data-state":hr(g),"data-disabled":c?"":void 0,disabled:c,value:l,...u,ref:h,onKeyDown:_(e.onKeyDown,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:_(e.onClick,x=>{y(C=>he(C)?!0:!C),b&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),b&&p.jsx(ys,{control:f,bubbles:!m.current,name:o,value:l,checked:g,required:i,disabled:c,style:{transform:"translateX(-100%)"}})]})});ur.displayName=gt;var fr="CheckboxIndicator",pr=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:o,...n}=e,s=vs(fr,r);return p.jsx(Oe,{present:o||he(s.state)||s.state===!0,children:p.jsx(z.span,{"data-state":hr(s.state),"data-disabled":s.disabled?"":void 0,...n,ref:t,style:{pointerEvents:"none",...e.style}})})});pr.displayName=fr;var ys=e=>{const{control:t,checked:r,bubbles:o=!0,...n}=e,s=d.useRef(null),i=ht(r),c=We(t);return d.useEffect(()=>{const l=s.current,a=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(a,"checked").set;if(i!==r&&f){const v=new Event("click",{bubbles:o});l.indeterminate=he(r),f.call(l,he(r)?!1:r),l.dispatchEvent(v)}},[i,r,o]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:he(r)?!1:r,...n,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function he(e){return e==="indeterminate"}function hr(e){return he(e)?"indeterminate":e?"checked":"unchecked"}var gr=ur,ws=pr;const mr=d.forwardRef(({className:e,partial:t,...r},o)=>p.jsx(gr,{ref:o,className:G("h-4 w-4 shrink-0 rounded-[2px] border border-p-gray-500 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-[1px] disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-p-blue-400 data-[state=checked]:text-white data-[state=checked]:border-none data-[state=checked]:hover:bg-q-blue-500 hover:bg-p-gray-100 hover:border-p-blue-400 transition-all disabled:data-[state=unchecked]:bg-p-gray-200 disabled:hover:border-p-gray-500",e),...r,children:p.jsxs(ws,{className:G("flex items-center justify-center text-current"),children:[!t&&p.jsx("svg",{width:"11",height:"8",viewBox:"0 0 11 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.329491 3.79476C0.76891 3.40759 1.48127 3.40736 1.92101 3.79423L3.51134 5.19335L9.07936 0.290196C9.51884 -0.0968089 10.2311 -0.0967207 10.6705 0.290393C11.1098 0.677475 11.1098 1.30506 10.6705 1.69214L3.51134 8L0.329491 5.19651C-0.109831 4.80942 -0.109831 4.18184 0.329491 3.79476Z",fill:"white"})}),t&&p.jsx("svg",{width:"10",height:"4",viewBox:"0 0 10 4",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:p.jsx("rect",{y:"0.5",width:"10",height:"3",rx:"1",fill:"white"})})]})}));mr.displayName=gr.displayName;var xs="Label",br=d.forwardRef((e,t)=>p.jsx(z.label,{...e,ref:t,onMouseDown:r=>{var n;r.target.closest("button, input, select, textarea")||((n=e.onMouseDown)==null||n.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));br.displayName=xs;var vr=br;const Cs=me("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),mt=d.forwardRef(({className:e,...t},r)=>p.jsx(vr,{ref:r,className:G(Cs(),e),...t}));mt.displayName=vr.displayName;const Es=e=>{const{disabled:t,checked:r,label:o,labelPosition:n="right",className:s,id:i,partial:c,onChange:l,readonly:a,...u}=e;return p.jsxs(mt,{htmlFor:i,className:Ts({labelPosition:n,className:s,disabled:t}),children:[o&&p.jsx(p.Fragment,{children:o}),p.jsx(mr,{id:i,...u,partial:c,defaultChecked:r,disabled:t||a,onCheckedChange:l})]})},Ts=me("flex items-center gap-2 w-fit text-inherit",{variants:{labelPosition:{left:"flex-row",right:"flex-row-reverse"},disabled:{true:"cursor-default",false:"cursor-pointer"}}}),Ps=1,As=1e6;let bt=0;function Ss(){return bt=(bt+1)%Number.MAX_SAFE_INTEGER,bt.toString()}const vt=new Map,yr=e=>{if(vt.has(e))return;const t=setTimeout(()=>{vt.delete(e),Re({type:"REMOVE_TOAST",toastId:e})},As);vt.set(e,t)},Ns=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Ps)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case"DISMISS_TOAST":{const{toastId:r}=t;return r?yr(r):e.toasts.forEach(o=>{yr(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===r||r===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)}}},Ve=[];let Be={toasts:[]};function Re(e){Be=Ns(Be,e),Ve.forEach(t=>{t(Be)})}function ks({...e}){const t=Ss(),r=n=>Re({type:"UPDATE_TOAST",toast:{...n,id:t}}),o=()=>Re({type:"DISMISS_TOAST",toastId:t});return Re({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:n=>{n||o()}}}),{id:t,dismiss:o,update:r}}function wr(){const[e,t]=H.useState(Be);return H.useEffect(()=>(Ve.push(t),()=>{const r=Ve.indexOf(t);r>-1&&Ve.splice(r,1)}),[e]),{...e,toast:ks,dismiss:r=>Re({type:"DISMISS_TOAST",toastId:r})}}const Os=e=>{const{toast:t}=wr(),{variant:r="default",duration:o=5e3}=e||{};return{showToast:n=>{t({description:n,duration:o,variant:r})}}};function xr(e){const t=e+"CollectionProvider",[r,o]=re(t),[n,s]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=h=>{const{scope:m,children:b}=h,g=H.useRef(null),y=H.useRef(new Map).current;return p.jsx(n,{scope:m,itemMap:y,collectionRef:g,children:b})};i.displayName=t;const c=e+"CollectionSlot",l=H.forwardRef((h,m)=>{const{scope:b,children:g}=h,y=s(c,b),w=j(m,y.collectionRef);return p.jsx(Ae,{ref:w,children:g})});l.displayName=c;const a=e+"CollectionItemSlot",u="data-radix-collection-item",f=H.forwardRef((h,m)=>{const{scope:b,children:g,...y}=h,w=H.useRef(null),x=j(m,w),C=s(a,b);return H.useEffect(()=>(C.itemMap.set(w,{ref:w,...y}),()=>void C.itemMap.delete(w))),p.jsx(Ae,{[u]:"",ref:x,children:g})});f.displayName=a;function v(h){const m=s(e+"CollectionConsumer",h);return H.useCallback(()=>{const g=m.collectionRef.current;if(!g)return[];const y=Array.from(g.querySelectorAll(`[${u}]`));return Array.from(m.itemMap.values()).sort((C,E)=>y.indexOf(C.ref.current)-y.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:i,Slot:l,ItemSlot:f},v,o]}function Rs(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e);d.useEffect(()=>{const o=n=>{n.key==="Escape"&&r(n)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[r,t])}var Is="DismissableLayer",yt="dismissableLayer.update",Ms="dismissableLayer.pointerDownOutside",_s="dismissableLayer.focusOutside",Cr,Er=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),wt=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:n,onFocusOutside:s,onInteractOutside:i,onDismiss:c,...l}=e,a=d.useContext(Er),[u,f]=d.useState(null),v=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),m=j(t,A=>f(A)),b=Array.from(a.layers),[g]=[...a.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(g),w=u?b.indexOf(u):-1,x=a.layersWithOutsidePointerEventsDisabled.size>0,C=w>=y,E=Ds(A=>{const N=A.target,L=[...a.branches].some(M=>M.contains(N));!C||L||(n==null||n(A),i==null||i(A),A.defaultPrevented||c==null||c())},v),P=Fs(A=>{const N=A.target;[...a.branches].some(M=>M.contains(N))||(s==null||s(A),i==null||i(A),A.defaultPrevented||c==null||c())},v);return Rs(A=>{w===a.layers.size-1&&(o==null||o(A),!A.defaultPrevented&&c&&(A.preventDefault(),c()))},v),d.useEffect(()=>{if(u)return r&&(a.layersWithOutsidePointerEventsDisabled.size===0&&(Cr=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),a.layersWithOutsidePointerEventsDisabled.add(u)),a.layers.add(u),Pr(),()=>{r&&a.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=Cr)}},[u,v,r,a]),d.useEffect(()=>()=>{u&&(a.layers.delete(u),a.layersWithOutsidePointerEventsDisabled.delete(u),Pr())},[u,a]),d.useEffect(()=>{const A=()=>h({});return document.addEventListener(yt,A),()=>document.removeEventListener(yt,A)},[]),p.jsx(z.div,{...l,ref:m,style:{pointerEvents:x?C?"auto":"none":void 0,...e.style},onFocusCapture:_(e.onFocusCapture,P.onFocusCapture),onBlurCapture:_(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:_(e.onPointerDownCapture,E.onPointerDownCapture)})});wt.displayName=Is;var Ls="DismissableLayerBranch",Tr=d.forwardRef((e,t)=>{const r=d.useContext(Er),o=d.useRef(null),n=j(t,o);return d.useEffect(()=>{const s=o.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),p.jsx(z.div,{...e,ref:n})});Tr.displayName=Ls;function Ds(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e),o=d.useRef(!1),n=d.useRef(()=>{});return d.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){Ar(Ms,r,a,{discrete:!0})};const a={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",n.current),n.current=l,t.addEventListener("click",n.current,{once:!0})):l()}else t.removeEventListener("click",n.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",n.current)}},[t,r]),{onPointerDownCapture:()=>o.current=!0}}function Fs(e,t=globalThis==null?void 0:globalThis.document){const r=Y(e),o=d.useRef(!1);return d.useEffect(()=>{const n=s=>{s.target&&!o.current&&Ar(_s,r,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",n),()=>t.removeEventListener("focusin",n)},[t,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Pr(){const e=new CustomEvent(yt);document.dispatchEvent(e)}function Ar(e,t,r,{discrete:o}){const n=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?dr(n,s):n.dispatchEvent(s)}var $s=wt,Ws=Tr,zs="Portal",Sr=d.forwardRef((e,t)=>{var c;const{container:r,...o}=e,[n,s]=d.useState(!1);ce(()=>s(!0),[]);const i=r||n&&((c=globalThis==null?void 0:globalThis.document)==null?void 0:c.body);return i?Kt.createPortal(p.jsx(z.div,{...o,ref:t}),i):null});Sr.displayName=zs;var Vs="VisuallyHidden",Ge=d.forwardRef((e,t)=>p.jsx(z.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));Ge.displayName=Vs;var Bs=Ge,xt="ToastProvider",[Ct,Gs,Hs]=xr("Toast"),[Nr,zc]=re("Toast",[Hs]),[js,He]=Nr(xt),kr=e=>{const{__scopeToast:t,label:r="Notification",duration:o=5e3,swipeDirection:n="right",swipeThreshold:s=50,children:i}=e,[c,l]=d.useState(null),[a,u]=d.useState(0),f=d.useRef(!1),v=d.useRef(!1);return r.trim()||console.error(`Invalid prop \`label\` supplied to \`${xt}\`. Expected non-empty \`string\`.`),p.jsx(Ct.Provider,{scope:t,children:p.jsx(js,{scope:t,label:r,duration:o,swipeDirection:n,swipeThreshold:s,toastCount:a,viewport:c,onViewportChange:l,onToastAdd:d.useCallback(()=>u(h=>h+1),[]),onToastRemove:d.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:v,children:i})})};kr.displayName=xt;var Or="ToastViewport",Us=["F8"],Et="toast.viewportPause",Tt="toast.viewportResume",Rr=d.forwardRef((e,t)=>{const{__scopeToast:r,hotkey:o=Us,label:n="Notifications ({hotkey})",...s}=e,i=He(Or,r),c=Gs(r),l=d.useRef(null),a=d.useRef(null),u=d.useRef(null),f=d.useRef(null),v=j(t,f,i.onViewportChange),h=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),m=i.toastCount>0;d.useEffect(()=>{const g=y=>{var x;o.every(C=>y[C]||y.code===C)&&((x=f.current)==null||x.focus())};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[o]),d.useEffect(()=>{const g=l.current,y=f.current;if(m&&g&&y){const w=()=>{if(!i.isClosePausedRef.current){const P=new CustomEvent(Et);y.dispatchEvent(P),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){const P=new CustomEvent(Tt);y.dispatchEvent(P),i.isClosePausedRef.current=!1}},C=P=>{!g.contains(P.relatedTarget)&&x()},E=()=>{g.contains(document.activeElement)||x()};return g.addEventListener("focusin",w),g.addEventListener("focusout",C),g.addEventListener("pointermove",w),g.addEventListener("pointerleave",E),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{g.removeEventListener("focusin",w),g.removeEventListener("focusout",C),g.removeEventListener("pointermove",w),g.removeEventListener("pointerleave",E),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[m,i.isClosePausedRef]);const b=d.useCallback(({tabbingDirection:g})=>{const w=c().map(x=>{const C=x.ref.current,E=[C,...si(C)];return g==="forwards"?E:E.reverse()});return(g==="forwards"?w.reverse():w).flat()},[c]);return d.useEffect(()=>{const g=f.current;if(g){const y=w=>{var E,P,A;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const N=document.activeElement,L=w.shiftKey;if(w.target===g&&L){(E=a.current)==null||E.focus();return}const S=b({tabbingDirection:L?"backwards":"forwards"}),V=S.findIndex(T=>T===N);St(S.slice(V+1))?w.preventDefault():L?(P=a.current)==null||P.focus():(A=u.current)==null||A.focus()}};return g.addEventListener("keydown",y),()=>g.removeEventListener("keydown",y)}},[c,b]),p.jsxs(Ws,{ref:l,role:"region","aria-label":n.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:m?void 0:"none"},children:[m&&p.jsx(Pt,{ref:a,onFocusFromOutsideViewport:()=>{const g=b({tabbingDirection:"forwards"});St(g)}}),p.jsx(Ct.Slot,{scope:r,children:p.jsx(z.ol,{tabIndex:-1,...s,ref:v})}),m&&p.jsx(Pt,{ref:u,onFocusFromOutsideViewport:()=>{const g=b({tabbingDirection:"backwards"});St(g)}})]})});Rr.displayName=Or;var Ir="ToastFocusProxy",Pt=d.forwardRef((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:o,...n}=e,s=He(Ir,r);return p.jsx(Ge,{"aria-hidden":!0,tabIndex:0,...n,ref:t,style:{position:"fixed"},onFocus:i=>{var a;const c=i.relatedTarget;!((a=s.viewport)!=null&&a.contains(c))&&o()}})});Pt.displayName=Ir;var je="Toast",Ks="toast.swipeStart",qs="toast.swipeMove",Ys="toast.swipeCancel",Xs="toast.swipeEnd",Mr=d.forwardRef((e,t)=>{const{forceMount:r,open:o,defaultOpen:n,onOpenChange:s,...i}=e,[c=!0,l]=ye({prop:o,defaultProp:n,onChange:s});return p.jsx(Oe,{present:r||c,children:p.jsx(Qs,{open:c,...i,ref:t,onClose:()=>l(!1),onPause:Y(e.onPause),onResume:Y(e.onResume),onSwipeStart:_(e.onSwipeStart,a=>{a.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:_(e.onSwipeMove,a=>{const{x:u,y:f}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","move"),a.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:_(e.onSwipeCancel,a=>{a.currentTarget.setAttribute("data-swipe","cancel"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:_(e.onSwipeEnd,a=>{const{x:u,y:f}=a.detail.delta;a.currentTarget.setAttribute("data-swipe","end"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),a.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),a.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),a.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});Mr.displayName=je;var[Zs,Js]=Nr(je,{onClose(){}}),Qs=d.forwardRef((e,t)=>{const{__scopeToast:r,type:o="foreground",duration:n,open:s,onClose:i,onEscapeKeyDown:c,onPause:l,onResume:a,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:v,onSwipeEnd:h,...m}=e,b=He(je,r),[g,y]=d.useState(null),w=j(t,T=>y(T)),x=d.useRef(null),C=d.useRef(null),E=n||b.duration,P=d.useRef(0),A=d.useRef(E),N=d.useRef(0),{onToastAdd:L,onToastRemove:M}=b,D=Y(()=>{var I;(g==null?void 0:g.contains(document.activeElement))&&((I=b.viewport)==null||I.focus()),i()}),S=d.useCallback(T=>{!T||T===1/0||(window.clearTimeout(N.current),P.current=new Date().getTime(),N.current=window.setTimeout(D,T))},[D]);d.useEffect(()=>{const T=b.viewport;if(T){const I=()=>{S(A.current),a==null||a()},R=()=>{const O=new Date().getTime()-P.current;A.current=A.current-O,window.clearTimeout(N.current),l==null||l()};return T.addEventListener(Et,R),T.addEventListener(Tt,I),()=>{T.removeEventListener(Et,R),T.removeEventListener(Tt,I)}}},[b.viewport,E,l,a,S]),d.useEffect(()=>{s&&!b.isClosePausedRef.current&&S(E)},[s,E,b.isClosePausedRef,S]),d.useEffect(()=>(L(),()=>M()),[L,M]);const V=d.useMemo(()=>g?zr(g):null,[g]);return b.viewport?p.jsxs(p.Fragment,{children:[V&&p.jsx(ei,{__scopeToast:r,role:"status","aria-live":o==="foreground"?"assertive":"polite","aria-atomic":!0,children:V}),p.jsx(Zs,{scope:r,onClose:D,children:De.createPortal(p.jsx(Ct.ItemSlot,{scope:r,children:p.jsx($s,{asChild:!0,onEscapeKeyDown:_(c,()=>{b.isFocusedToastEscapeKeyDownRef.current||D(),b.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(z.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":b.swipeDirection,...m,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:_(e.onKeyDown,T=>{T.key==="Escape"&&(c==null||c(T.nativeEvent),T.nativeEvent.defaultPrevented||(b.isFocusedToastEscapeKeyDownRef.current=!0,D()))}),onPointerDown:_(e.onPointerDown,T=>{T.button===0&&(x.current={x:T.clientX,y:T.clientY})}),onPointerMove:_(e.onPointerMove,T=>{if(!x.current)return;const I=T.clientX-x.current.x,R=T.clientY-x.current.y,O=!!C.current,F=["left","right"].includes(b.swipeDirection),$=["left","up"].includes(b.swipeDirection)?Math.min:Math.max,fe=F?$(0,I):0,q=F?0:$(0,R),ee=T.pointerType==="touch"?10:2,Pe={x:fe,y:q},it={originalEvent:T,delta:Pe};O?(C.current=Pe,Ue(qs,f,it,{discrete:!1})):Vr(Pe,b.swipeDirection,ee)?(C.current=Pe,Ue(Ks,u,it,{discrete:!1}),T.target.setPointerCapture(T.pointerId)):(Math.abs(I)>ee||Math.abs(R)>ee)&&(x.current=null)}),onPointerUp:_(e.onPointerUp,T=>{const I=C.current,R=T.target;if(R.hasPointerCapture(T.pointerId)&&R.releasePointerCapture(T.pointerId),C.current=null,x.current=null,I){const O=T.currentTarget,F={originalEvent:T,delta:I};Vr(I,b.swipeDirection,b.swipeThreshold)?Ue(Xs,h,F,{discrete:!0}):Ue(Ys,v,F,{discrete:!0}),O.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),b.viewport)})]}):null}),ei=e=>{const{__scopeToast:t,children:r,...o}=e,n=He(je,t),[s,i]=d.useState(!1),[c,l]=d.useState(!1);return oi(()=>i(!0)),d.useEffect(()=>{const a=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(a)},[]),c?null:p.jsx(Sr,{asChild:!0,children:p.jsx(Ge,{...o,children:s&&p.jsxs(p.Fragment,{children:[n.label," ",r]})})})},ti="ToastTitle",_r=d.forwardRef((e,t)=>{const{__scopeToast:r,...o}=e;return p.jsx(z.div,{...o,ref:t})});_r.displayName=ti;var ri="ToastDescription",Lr=d.forwardRef((e,t)=>{const{__scopeToast:r,...o}=e;return p.jsx(z.div,{...o,ref:t})});Lr.displayName=ri;var Dr="ToastAction",Fr=d.forwardRef((e,t)=>{const{altText:r,...o}=e;return r.trim()?p.jsx(Wr,{altText:r,asChild:!0,children:p.jsx(At,{...o,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dr}\`. Expected non-empty \`string\`.`),null)});Fr.displayName=Dr;var $r="ToastClose",At=d.forwardRef((e,t)=>{const{__scopeToast:r,...o}=e,n=Js($r,r);return p.jsx(Wr,{asChild:!0,children:p.jsx(z.button,{type:"button",...o,ref:t,onClick:_(e.onClick,n.onClose)})})});At.displayName=$r;var Wr=d.forwardRef((e,t)=>{const{__scopeToast:r,altText:o,...n}=e;return p.jsx(z.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":o||void 0,...n,ref:t})});function zr(e){const t=[];return Array.from(e.childNodes).forEach(o=>{if(o.nodeType===o.TEXT_NODE&&o.textContent&&t.push(o.textContent),ni(o)){const n=o.ariaHidden||o.hidden||o.style.display==="none",s=o.dataset.radixToastAnnounceExclude==="";if(!n)if(s){const i=o.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...zr(o))}}),t}function Ue(e,t,r,{discrete:o}){const n=r.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&n.addEventListener(e,t,{once:!0}),o?dr(n,s):n.dispatchEvent(s)}var Vr=(e,t,r=0)=>{const o=Math.abs(e.x),n=Math.abs(e.y),s=o>n;return t==="left"||t==="right"?s&&o>r:!s&&n>r};function oi(e=()=>{}){const t=Y(e);ce(()=>{let r=0,o=0;return r=window.requestAnimationFrame(()=>o=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(r),window.cancelAnimationFrame(o)}},[t])}function ni(e){return e.nodeType===e.ELEMENT_NODE}function si(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const n=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||n?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function St(e){const t=document.activeElement;return e.some(r=>r===t?!0:(r.focus(),document.activeElement!==t))}var ii=kr,Br=Rr,Gr=Mr,Hr=_r,jr=Lr,Ur=Fr,Kr=At;/**
|
|
2
|
+
* @license lucide-react v0.399.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const ai=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qr=(...e)=>e.filter((t,r,o)=>!!t&&o.indexOf(t)===r).join(" ");/**
|
|
7
|
+
* @license lucide-react v0.399.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var ci={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
|
+
* @license lucide-react v0.399.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const li=H.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:s,iconNode:i,...c},l)=>H.createElement("svg",{ref:l,...ci,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:qr("lucide",n),...c},[...i.map(([a,u])=>H.createElement(a,u)),...Array.isArray(s)?s:[s]]));/**
|
|
17
|
+
* @license lucide-react v0.399.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const Yr=(e,t)=>{const r=H.forwardRef(({className:o,...n},s)=>H.createElement(li,{ref:s,iconNode:t,className:qr(`lucide-${ai(e)}`,o),...n}));return r.displayName=`${e}`,r};/**
|
|
22
|
+
* @license lucide-react v0.399.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const di=Yr("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
|
|
27
|
+
* @license lucide-react v0.399.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const ui=Yr("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fi=ii,pi=me("fixed z-[100] flex max-h-screen w-full flex-col-reverse px-4 py-2 sm:flex-col md:max-w-[420px]",{variants:{position:{"top-right":"right-0 top-0",top:"top-0","top-left":"left-0 top-0",bottom:"bottom-0","bottom-right":"right-0 bottom-0","bottom-left":"left-0 bottom-0"}},defaultVariants:{position:"top-right"}}),Xr=d.forwardRef(({className:e,position:t,...r},o)=>p.jsx(Br,{ref:o,className:G(pi({position:t}),e),...r}));Xr.displayName=Br.displayName;const hi=me("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded border px-4 py-3 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-right-full",{variants:{variant:{default:"border bg-white text-text",success:"text-green-700 border-green-200 bg-green-50",error:"text-red-700 border-red-200 bg-red-100",warning:"text-amber-700 border-amber-200 bg-amber-100",info:"text-p-blue-400 border-p-blue-400 bg-p-blue-100"}},defaultVariants:{variant:"default"}}),Zr=d.forwardRef(({className:e,variant:t,...r},o)=>p.jsx(Gr,{ref:o,className:G(hi({variant:t}),e),...r}));Zr.displayName=Gr.displayName;const gi=d.forwardRef(({className:e,...t},r)=>p.jsx(Ur,{ref:r,className:G("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));gi.displayName=Ur.displayName;const Jr=d.forwardRef(({className:e,...t},r)=>p.jsx(Kr,{ref:r,className:G("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"","aria-label":"Close toast",...t,children:p.jsx(ui,{className:"w-4 h-4"})}));Jr.displayName=Kr.displayName;const Qr=d.forwardRef(({className:e,...t},r)=>p.jsx(Hr,{ref:r,className:G("text-sm font-semibold",e),...t}));Qr.displayName=Hr.displayName;const eo=d.forwardRef(({className:e,...t},r)=>p.jsx(jr,{ref:r,className:G("text-sm opacity-90",e),...t}));eo.displayName=jr.displayName;function mi(){const{toasts:e}=wr();return p.jsxs(fi,{children:[e.map(function({id:t,title:r,description:o,action:n,...s}){return p.jsxs(Zr,{...s,children:[p.jsxs("div",{className:"grid gap-1",children:[r&&p.jsx(Qr,{children:r}),o&&p.jsx(eo,{children:o})]}),n,p.jsx(Jr,{})]},t)}),p.jsx(Xr,{})]})}const bi=()=>p.jsx(mi,{});var Nt="Switch",[vi,Vc]=re(Nt),[yi,wi]=vi(Nt),to=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:o,checked:n,defaultChecked:s,required:i,disabled:c,value:l="on",onCheckedChange:a,...u}=e,[f,v]=d.useState(null),h=j(t,w=>v(w)),m=d.useRef(!1),b=f?!!f.closest("form"):!0,[g=!1,y]=ye({prop:n,defaultProp:s,onChange:a});return p.jsxs(yi,{scope:r,checked:g,disabled:c,children:[p.jsx(z.button,{type:"button",role:"switch","aria-checked":g,"aria-required":i,"data-state":no(g),"data-disabled":c?"":void 0,disabled:c,value:l,...u,ref:h,onClick:_(e.onClick,w=>{y(x=>!x),b&&(m.current=w.isPropagationStopped(),m.current||w.stopPropagation())})}),b&&p.jsx(xi,{control:f,bubbles:!m.current,name:o,value:l,checked:g,required:i,disabled:c,style:{transform:"translateX(-100%)"}})]})});to.displayName=Nt;var ro="SwitchThumb",oo=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...o}=e,n=wi(ro,r);return p.jsx(z.span,{"data-state":no(n.checked),"data-disabled":n.disabled?"":void 0,...o,ref:t})});oo.displayName=ro;var xi=e=>{const{control:t,checked:r,bubbles:o=!0,...n}=e,s=d.useRef(null),i=ht(r),c=We(t);return d.useEffect(()=>{const l=s.current,a=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(a,"checked").set;if(i!==r&&f){const v=new Event("click",{bubbles:o});f.call(l,r),l.dispatchEvent(v)}},[i,r,o]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function no(e){return e?"checked":"unchecked"}var so=to,Ci=oo;const io=d.forwardRef(({className:e,...t},r)=>p.jsx(so,{className:G("bg-p-gray-400 inline-flex h-2 w-8 shrink-0 cursor-pointer items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-[5px] focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:bg-gray-200",e),...t,ref:r,children:p.jsx(Ci,{className:G("pointer-events-none block h-4 w-4 rounded-full bg-gray-300 shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 data-[state=checked]:bg-p-blue-400")})}));io.displayName=so.displayName;const Ei=e=>{const{disabled:t,checked:r,label:o,labelPosition:n="left",className:s,id:i,onValueChange:c,...l}=e;return p.jsxs("label",{htmlFor:i,className:Ti({labelPosition:n,className:s}),children:[p.jsx(io,{id:i,...l,defaultChecked:r,disabled:t,onCheckedChange:c}),o&&p.jsx("span",{children:o})]})},Ti=me("flex items-center gap-2 w-fit text-inherit",{variants:{labelPosition:{left:"flex-row",right:"flex-row-reverse",top:"flex-col-reverse items-baseline"}}});var Pi=d.useId||(()=>{}),Ai=0;function ao(e){const[t,r]=d.useState(Pi());return ce(()=>{r(o=>o??String(Ai++))},[e]),t?`radix-${t}`:""}const Si=["top","right","bottom","left"],Z=Math.min,U=Math.max,Ke=Math.round,qe=Math.floor,le=e=>({x:e,y:e}),Ni={left:"right",right:"left",bottom:"top",top:"bottom"},ki={start:"end",end:"start"};function kt(e,t,r){return U(e,Z(t,r))}function oe(e,t){return typeof e=="function"?e(t):e}function ne(e){return e.split("-")[0]}function we(e){return e.split("-")[1]}function Ot(e){return e==="x"?"y":"x"}function Rt(e){return e==="y"?"height":"width"}function de(e){return["top","bottom"].includes(ne(e))?"y":"x"}function It(e){return Ot(de(e))}function Oi(e,t,r){r===void 0&&(r=!1);const o=we(e),n=It(e),s=Rt(n);let i=n==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Ye(i)),[i,Ye(i)]}function Ri(e){const t=Ye(e);return[Mt(e),t,Mt(t)]}function Mt(e){return e.replace(/start|end/g,t=>ki[t])}function Ii(e,t,r){const o=["left","right"],n=["right","left"],s=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return r?t?n:o:t?o:n;case"left":case"right":return t?s:i;default:return[]}}function Mi(e,t,r,o){const n=we(e);let s=Ii(ne(e),r==="start",o);return n&&(s=s.map(i=>i+"-"+n),t&&(s=s.concat(s.map(Mt)))),s}function Ye(e){return e.replace(/left|right|bottom|top/g,t=>Ni[t])}function _i(e){return{top:0,right:0,bottom:0,left:0,...e}}function co(e){return typeof e!="number"?_i(e):{top:e,right:e,bottom:e,left:e}}function Xe(e){const{x:t,y:r,width:o,height:n}=e;return{width:o,height:n,top:r,left:t,right:t+o,bottom:r+n,x:t,y:r}}function lo(e,t,r){let{reference:o,floating:n}=e;const s=de(t),i=It(t),c=Rt(i),l=ne(t),a=s==="y",u=o.x+o.width/2-n.width/2,f=o.y+o.height/2-n.height/2,v=o[c]/2-n[c]/2;let h;switch(l){case"top":h={x:u,y:o.y-n.height};break;case"bottom":h={x:u,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-n.width,y:f};break;default:h={x:o.x,y:o.y}}switch(we(t)){case"start":h[i]-=v*(r&&a?-1:1);break;case"end":h[i]+=v*(r&&a?-1:1);break}return h}const Li=async(e,t,r)=>{const{placement:o="bottom",strategy:n="absolute",middleware:s=[],platform:i}=r,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let a=await i.getElementRects({reference:e,floating:t,strategy:n}),{x:u,y:f}=lo(a,o,l),v=o,h={},m=0;for(let b=0;b<c.length;b++){const{name:g,fn:y}=c[b],{x:w,y:x,data:C,reset:E}=await y({x:u,y:f,initialPlacement:o,placement:v,strategy:n,middlewareData:h,rects:a,platform:i,elements:{reference:e,floating:t}});u=w??u,f=x??f,h={...h,[g]:{...h[g],...C}},E&&m<=50&&(m++,typeof E=="object"&&(E.placement&&(v=E.placement),E.rects&&(a=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:n}):E.rects),{x:u,y:f}=lo(a,v,l)),b=-1)}return{x:u,y:f,placement:v,strategy:n,middlewareData:h}};async function Ie(e,t){var r;t===void 0&&(t={});const{x:o,y:n,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:a="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:v=!1,padding:h=0}=oe(t,e),m=co(h),g=c[v?f==="floating"?"reference":"floating":f],y=Xe(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(g)))==null||r?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:u,strategy:l})),w=f==="floating"?{x:o,y:n,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},E=Xe(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:l}):w);return{top:(y.top-E.top+m.top)/C.y,bottom:(E.bottom-y.bottom+m.bottom)/C.y,left:(y.left-E.left+m.left)/C.x,right:(E.right-y.right+m.right)/C.x}}const Di=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:o,placement:n,rects:s,platform:i,elements:c,middlewareData:l}=t,{element:a,padding:u=0}=oe(e,t)||{};if(a==null)return{};const f=co(u),v={x:r,y:o},h=It(n),m=Rt(h),b=await i.getDimensions(a),g=h==="y",y=g?"top":"left",w=g?"bottom":"right",x=g?"clientHeight":"clientWidth",C=s.reference[m]+s.reference[h]-v[h]-s.floating[m],E=v[h]-s.reference[h],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a));let A=P?P[x]:0;(!A||!await(i.isElement==null?void 0:i.isElement(P)))&&(A=c.floating[x]||s.floating[m]);const N=C/2-E/2,L=A/2-b[m]/2-1,M=Z(f[y],L),D=Z(f[w],L),S=M,V=A-b[m]-D,T=A/2-b[m]/2+N,I=kt(S,T,V),R=!l.arrow&&we(n)!=null&&T!==I&&s.reference[m]/2-(T<S?M:D)-b[m]/2<0,O=R?T<S?T-S:T-V:0;return{[h]:v[h]+O,data:{[h]:I,centerOffset:T-I-O,...R&&{alignmentOffset:O}},reset:R}}}),Fi=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,o;const{placement:n,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:a}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:v,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:b=!0,...g}=oe(e,t);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const y=ne(n),w=de(c),x=ne(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(a.floating)),E=v||(x||!b?[Ye(c)]:Ri(c)),P=m!=="none";!v&&P&&E.push(...Mi(c,b,m,C));const A=[c,...E],N=await Ie(t,g),L=[];let M=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&L.push(N[y]),f){const T=Oi(n,i,C);L.push(N[T[0]],N[T[1]])}if(M=[...M,{placement:n,overflows:L}],!L.every(T=>T<=0)){var D,S;const T=(((D=s.flip)==null?void 0:D.index)||0)+1,I=A[T];if(I)return{data:{index:T,overflows:M},reset:{placement:I}};let R=(S=M.filter(O=>O.overflows[0]<=0).sort((O,F)=>O.overflows[1]-F.overflows[1])[0])==null?void 0:S.placement;if(!R)switch(h){case"bestFit":{var V;const O=(V=M.filter(F=>{if(P){const $=de(F.placement);return $===w||$==="y"}return!0}).map(F=>[F.placement,F.overflows.filter($=>$>0).reduce(($,fe)=>$+fe,0)]).sort((F,$)=>F[1]-$[1])[0])==null?void 0:V[0];O&&(R=O);break}case"initialPlacement":R=c;break}if(n!==R)return{reset:{placement:R}}}return{}}}};function uo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fo(e){return Si.some(t=>e[t]>=0)}const $i=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:o="referenceHidden",...n}=oe(e,t);switch(o){case"referenceHidden":{const s=await Ie(t,{...n,elementContext:"reference"}),i=uo(s,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:fo(i)}}}case"escaped":{const s=await Ie(t,{...n,altBoundary:!0}),i=uo(s,r.floating);return{data:{escapedOffsets:i,escaped:fo(i)}}}default:return{}}}}};async function Wi(e,t){const{placement:r,platform:o,elements:n}=e,s=await(o.isRTL==null?void 0:o.isRTL(n.floating)),i=ne(r),c=we(r),l=de(r)==="y",a=["left","top"].includes(i)?-1:1,u=s&&l?-1:1,f=oe(t,e);let{mainAxis:v,crossAxis:h,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return c&&typeof m=="number"&&(h=c==="end"?m*-1:m),l?{x:h*u,y:v*a}:{x:v*a,y:h*u}}const zi=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,o;const{x:n,y:s,placement:i,middlewareData:c}=t,l=await Wi(t,e);return i===((r=c.offset)==null?void 0:r.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:n+l.x,y:s+l.y,data:{...l,placement:i}}}}},Vi=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:o,placement:n}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:g=>{let{x:y,y:w}=g;return{x:y,y:w}}},...l}=oe(e,t),a={x:r,y:o},u=await Ie(t,l),f=de(ne(n)),v=Ot(f);let h=a[v],m=a[f];if(s){const g=v==="y"?"top":"left",y=v==="y"?"bottom":"right",w=h+u[g],x=h-u[y];h=kt(w,h,x)}if(i){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",w=m+u[g],x=m-u[y];m=kt(w,m,x)}const b=c.fn({...t,[v]:h,[f]:m});return{...b,data:{x:b.x-r,y:b.y-o}}}}},Bi=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:o,placement:n,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:a=!0}=oe(e,t),u={x:r,y:o},f=de(n),v=Ot(f);let h=u[v],m=u[f];const b=oe(c,t),g=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const x=v==="y"?"height":"width",C=s.reference[v]-s.floating[x]+g.mainAxis,E=s.reference[v]+s.reference[x]-g.mainAxis;h<C?h=C:h>E&&(h=E)}if(a){var y,w;const x=v==="y"?"width":"height",C=["top","left"].includes(ne(n)),E=s.reference[f]-s.floating[x]+(C&&((y=i.offset)==null?void 0:y[f])||0)+(C?0:g.crossAxis),P=s.reference[f]+s.reference[x]+(C?0:((w=i.offset)==null?void 0:w[f])||0)-(C?g.crossAxis:0);m<E?m=E:m>P&&(m=P)}return{[v]:h,[f]:m}}}},Gi=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:o,platform:n,elements:s}=t,{apply:i=()=>{},...c}=oe(e,t),l=await Ie(t,c),a=ne(r),u=we(r),f=de(r)==="y",{width:v,height:h}=o.floating;let m,b;a==="top"||a==="bottom"?(m=a,b=u===(await(n.isRTL==null?void 0:n.isRTL(s.floating))?"start":"end")?"left":"right"):(b=a,m=u==="end"?"top":"bottom");const g=h-l.top-l.bottom,y=v-l.left-l.right,w=Z(h-l[m],g),x=Z(v-l[b],y),C=!t.middlewareData.shift;let E=w,P=x;if(f?P=u||C?Z(x,y):y:E=u||C?Z(w,g):g,C&&!u){const N=U(l.left,0),L=U(l.right,0),M=U(l.top,0),D=U(l.bottom,0);f?P=v-2*(N!==0||L!==0?N+L:U(l.left,l.right)):E=h-2*(M!==0||D!==0?M+D:U(l.top,l.bottom))}await i({...t,availableWidth:P,availableHeight:E});const A=await n.getDimensions(s.floating);return v!==A.width||h!==A.height?{reset:{rects:!0}}:{}}}};function xe(e){return po(e)?(e.nodeName||"").toLowerCase():"#document"}function K(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function se(e){var t;return(t=(po(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function po(e){return e instanceof Node||e instanceof K(e).Node}function J(e){return e instanceof Element||e instanceof K(e).Element}function Q(e){return e instanceof HTMLElement||e instanceof K(e).HTMLElement}function ho(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof K(e).ShadowRoot}function Me(e){const{overflow:t,overflowX:r,overflowY:o,display:n}=X(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+r)&&!["inline","contents"].includes(n)}function Hi(e){return["table","td","th"].includes(xe(e))}function Ze(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function _t(e){const t=Lt(),r=X(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(r.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(r.contain||"").includes(o))}function ji(e){let t=ue(e);for(;Q(t)&&!Ce(t);){if(Ze(t))return null;if(_t(t))return t;t=ue(t)}return null}function Lt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Ce(e){return["html","body","#document"].includes(xe(e))}function X(e){return K(e).getComputedStyle(e)}function Je(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ue(e){if(xe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ho(e)&&e.host||se(e);return ho(t)?t.host:t}function go(e){const t=ue(e);return Ce(t)?e.ownerDocument?e.ownerDocument.body:e.body:Q(t)&&Me(t)?t:go(t)}function _e(e,t,r){var o;t===void 0&&(t=[]),r===void 0&&(r=!0);const n=go(e),s=n===((o=e.ownerDocument)==null?void 0:o.body),i=K(n);return s?t.concat(i,i.visualViewport||[],Me(n)?n:[],i.frameElement&&r?_e(i.frameElement):[]):t.concat(n,_e(n,[],r))}function mo(e){const t=X(e);let r=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const n=Q(e),s=n?e.offsetWidth:r,i=n?e.offsetHeight:o,c=Ke(r)!==s||Ke(o)!==i;return c&&(r=s,o=i),{width:r,height:o,$:c}}function Dt(e){return J(e)?e:e.contextElement}function Ee(e){const t=Dt(e);if(!Q(t))return le(1);const r=t.getBoundingClientRect(),{width:o,height:n,$:s}=mo(t);let i=(s?Ke(r.width):r.width)/o,c=(s?Ke(r.height):r.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const Ui=le(0);function bo(e){const t=K(e);return!Lt()||!t.visualViewport?Ui:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ki(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==K(e)?!1:t}function ge(e,t,r,o){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=e.getBoundingClientRect(),s=Dt(e);let i=le(1);t&&(o?J(o)&&(i=Ee(o)):i=Ee(e));const c=Ki(s,r,o)?bo(s):le(0);let l=(n.left+c.x)/i.x,a=(n.top+c.y)/i.y,u=n.width/i.x,f=n.height/i.y;if(s){const v=K(s),h=o&&J(o)?K(o):o;let m=v,b=m.frameElement;for(;b&&o&&h!==m;){const g=Ee(b),y=b.getBoundingClientRect(),w=X(b),x=y.left+(b.clientLeft+parseFloat(w.paddingLeft))*g.x,C=y.top+(b.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,a*=g.y,u*=g.x,f*=g.y,l+=x,a+=C,m=K(b),b=m.frameElement}}return Xe({width:u,height:f,x:l,y:a})}function qi(e){let{elements:t,rect:r,offsetParent:o,strategy:n}=e;const s=n==="fixed",i=se(o),c=t?Ze(t.floating):!1;if(o===i||c&&s)return r;let l={scrollLeft:0,scrollTop:0},a=le(1);const u=le(0),f=Q(o);if((f||!f&&!s)&&((xe(o)!=="body"||Me(i))&&(l=Je(o)),Q(o))){const v=ge(o);a=Ee(o),u.x=v.x+o.clientLeft,u.y=v.y+o.clientTop}return{width:r.width*a.x,height:r.height*a.y,x:r.x*a.x-l.scrollLeft*a.x+u.x,y:r.y*a.y-l.scrollTop*a.y+u.y}}function Yi(e){return Array.from(e.getClientRects())}function vo(e){return ge(se(e)).left+Je(e).scrollLeft}function Xi(e){const t=se(e),r=Je(e),o=e.ownerDocument.body,n=U(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=U(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-r.scrollLeft+vo(e);const c=-r.scrollTop;return X(o).direction==="rtl"&&(i+=U(t.clientWidth,o.clientWidth)-n),{width:n,height:s,x:i,y:c}}function Zi(e,t){const r=K(e),o=se(e),n=r.visualViewport;let s=o.clientWidth,i=o.clientHeight,c=0,l=0;if(n){s=n.width,i=n.height;const a=Lt();(!a||a&&t==="fixed")&&(c=n.offsetLeft,l=n.offsetTop)}return{width:s,height:i,x:c,y:l}}function Ji(e,t){const r=ge(e,!0,t==="fixed"),o=r.top+e.clientTop,n=r.left+e.clientLeft,s=Q(e)?Ee(e):le(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=n*s.x,a=o*s.y;return{width:i,height:c,x:l,y:a}}function yo(e,t,r){let o;if(t==="viewport")o=Zi(e,r);else if(t==="document")o=Xi(se(e));else if(J(t))o=Ji(t,r);else{const n=bo(e);o={...t,x:t.x-n.x,y:t.y-n.y}}return Xe(o)}function wo(e,t){const r=ue(e);return r===t||!J(r)||Ce(r)?!1:X(r).position==="fixed"||wo(r,t)}function Qi(e,t){const r=t.get(e);if(r)return r;let o=_e(e,[],!1).filter(c=>J(c)&&xe(c)!=="body"),n=null;const s=X(e).position==="fixed";let i=s?ue(e):e;for(;J(i)&&!Ce(i);){const c=X(i),l=_t(i);!l&&c.position==="fixed"&&(n=null),(s?!l&&!n:!l&&c.position==="static"&&!!n&&["absolute","fixed"].includes(n.position)||Me(i)&&!l&&wo(e,i))?o=o.filter(u=>u!==i):n=c,i=ue(i)}return t.set(e,o),o}function ea(e){let{element:t,boundary:r,rootBoundary:o,strategy:n}=e;const i=[...r==="clippingAncestors"?Ze(t)?[]:Qi(t,this._c):[].concat(r),o],c=i[0],l=i.reduce((a,u)=>{const f=yo(t,u,n);return a.top=U(f.top,a.top),a.right=Z(f.right,a.right),a.bottom=Z(f.bottom,a.bottom),a.left=U(f.left,a.left),a},yo(t,c,n));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ta(e){const{width:t,height:r}=mo(e);return{width:t,height:r}}function ra(e,t,r){const o=Q(t),n=se(t),s=r==="fixed",i=ge(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=le(0);if(o||!o&&!s)if((xe(t)!=="body"||Me(n))&&(c=Je(t)),o){const f=ge(t,!0,s,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else n&&(l.x=vo(n));const a=i.left+c.scrollLeft-l.x,u=i.top+c.scrollTop-l.y;return{x:a,y:u,width:i.width,height:i.height}}function Ft(e){return X(e).position==="static"}function xo(e,t){return!Q(e)||X(e).position==="fixed"?null:t?t(e):e.offsetParent}function Co(e,t){const r=K(e);if(Ze(e))return r;if(!Q(e)){let n=ue(e);for(;n&&!Ce(n);){if(J(n)&&!Ft(n))return n;n=ue(n)}return r}let o=xo(e,t);for(;o&&Hi(o)&&Ft(o);)o=xo(o,t);return o&&Ce(o)&&Ft(o)&&!_t(o)?r:o||ji(e)||r}const oa=async function(e){const t=this.getOffsetParent||Co,r=this.getDimensions,o=await r(e.floating);return{reference:ra(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function na(e){return X(e).direction==="rtl"}const sa={convertOffsetParentRelativeRectToViewportRelativeRect:qi,getDocumentElement:se,getClippingRect:ea,getOffsetParent:Co,getElementRects:oa,getClientRects:Yi,getDimensions:ta,getScale:Ee,isElement:J,isRTL:na};function ia(e,t){let r=null,o;const n=se(e);function s(){var c;clearTimeout(o),(c=r)==null||c.disconnect(),r=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:a,top:u,width:f,height:v}=e.getBoundingClientRect();if(c||t(),!f||!v)return;const h=qe(u),m=qe(n.clientWidth-(a+f)),b=qe(n.clientHeight-(u+v)),g=qe(a),w={rootMargin:-h+"px "+-m+"px "+-b+"px "+-g+"px",threshold:U(0,Z(1,l))||1};let x=!0;function C(E){const P=E[0].intersectionRatio;if(P!==l){if(!x)return i();P?i(!1,P):o=setTimeout(()=>{i(!1,1e-7)},1e3)}x=!1}try{r=new IntersectionObserver(C,{...w,root:n.ownerDocument})}catch{r=new IntersectionObserver(C,w)}r.observe(e)}return i(!0),s}function aa(e,t,r,o){o===void 0&&(o={});const{ancestorScroll:n=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Dt(e),u=n||s?[...a?_e(a):[],..._e(t)]:[];u.forEach(y=>{n&&y.addEventListener("scroll",r,{passive:!0}),s&&y.addEventListener("resize",r)});const f=a&&c?ia(a,r):null;let v=-1,h=null;i&&(h=new ResizeObserver(y=>{let[w]=y;w&&w.target===a&&h&&(h.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(t)})),r()}),a&&!l&&h.observe(a),h.observe(t));let m,b=l?ge(e):null;l&&g();function g(){const y=ge(e);b&&(y.x!==b.x||y.y!==b.y||y.width!==b.width||y.height!==b.height)&&r(),b=y,m=requestAnimationFrame(g)}return r(),()=>{var y;u.forEach(w=>{n&&w.removeEventListener("scroll",r),s&&w.removeEventListener("resize",r)}),f==null||f(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const ca=zi,la=Vi,da=Fi,ua=Gi,fa=$i,Eo=Di,pa=Bi,ha=(e,t,r)=>{const o=new Map,n={platform:sa,...r},s={...n.platform,_c:o};return Li(e,t,{...n,platform:s})};var Qe=typeof document<"u"?H.useLayoutEffect:H.useEffect;function et(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,o,n;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(o=r;o--!==0;)if(!et(e[o],t[o]))return!1;return!0}if(n=Object.keys(e),r=n.length,r!==Object.keys(t).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(t,n[o]))return!1;for(o=r;o--!==0;){const s=n[o];if(!(s==="_owner"&&e.$$typeof)&&!et(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function To(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Po(e,t){const r=To(e);return Math.round(t*r)/r}function Ao(e){const t=d.useRef(e);return Qe(()=>{t.current=e}),t}function ga(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:o=[],platform:n,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:a}=e,[u,f]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[v,h]=d.useState(o);et(v,o)||h(o);const[m,b]=d.useState(null),[g,y]=d.useState(null),w=d.useCallback(O=>{O!==P.current&&(P.current=O,b(O))},[]),x=d.useCallback(O=>{O!==A.current&&(A.current=O,y(O))},[]),C=s||m,E=i||g,P=d.useRef(null),A=d.useRef(null),N=d.useRef(u),L=l!=null,M=Ao(l),D=Ao(n),S=d.useCallback(()=>{if(!P.current||!A.current)return;const O={placement:t,strategy:r,middleware:v};D.current&&(O.platform=D.current),ha(P.current,A.current,O).then(F=>{const $={...F,isPositioned:!0};V.current&&!et(N.current,$)&&(N.current=$,De.flushSync(()=>{f($)}))})},[v,t,r,D]);Qe(()=>{a===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(O=>({...O,isPositioned:!1})))},[a]);const V=d.useRef(!1);Qe(()=>(V.current=!0,()=>{V.current=!1}),[]),Qe(()=>{if(C&&(P.current=C),E&&(A.current=E),C&&E){if(M.current)return M.current(C,E,S);S()}},[C,E,S,M,L]);const T=d.useMemo(()=>({reference:P,floating:A,setReference:w,setFloating:x}),[w,x]),I=d.useMemo(()=>({reference:C,floating:E}),[C,E]),R=d.useMemo(()=>{const O={position:r,left:0,top:0};if(!I.floating)return O;const F=Po(I.floating,u.x),$=Po(I.floating,u.y);return c?{...O,transform:"translate("+F+"px, "+$+"px)",...To(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:F,top:$}},[r,c,I.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:S,refs:T,elements:I,floatingStyles:R}),[u,S,T,I,R])}const ma=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:o,padding:n}=typeof e=="function"?e(r):e;return o&&t(o)?o.current!=null?Eo({element:o.current,padding:n}).fn(r):{}:o?Eo({element:o,padding:n}).fn(r):{}}}},ba=(e,t)=>({...ca(e),options:[e,t]}),va=(e,t)=>({...la(e),options:[e,t]}),ya=(e,t)=>({...pa(e),options:[e,t]}),wa=(e,t)=>({...da(e),options:[e,t]}),xa=(e,t)=>({...ua(e),options:[e,t]}),Ca=(e,t)=>({...fa(e),options:[e,t]}),Ea=(e,t)=>({...ma(e),options:[e,t]});var Ta="Arrow",So=d.forwardRef((e,t)=>{const{children:r,width:o=10,height:n=5,...s}=e;return p.jsx(z.svg,{...s,ref:t,width:o,height:n,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});So.displayName=Ta;var Pa=So,$t="Popper",[No,ko]=re($t),[Aa,Oo]=No($t),Ro=e=>{const{__scopePopper:t,children:r}=e,[o,n]=d.useState(null);return p.jsx(Aa,{scope:t,anchor:o,onAnchorChange:n,children:r})};Ro.displayName=$t;var Io="PopperAnchor",Mo=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:o,...n}=e,s=Oo(Io,r),i=d.useRef(null),c=j(t,i);return d.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||i.current)}),o?null:p.jsx(z.div,{...n,ref:c})});Mo.displayName=Io;var Wt="PopperContent",[Sa,Na]=No(Wt),_o=d.forwardRef((e,t)=>{var bn,vn,yn,wn,xn,Cn;const{__scopePopper:r,side:o="bottom",sideOffset:n=0,align:s="center",alignOffset:i=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:a=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:v=!1,updatePositionStrategy:h="optimized",onPlaced:m,...b}=e,g=Oo(Wt,r),[y,w]=d.useState(null),x=j(t,Le=>w(Le)),[C,E]=d.useState(null),P=We(C),A=(P==null?void 0:P.width)??0,N=(P==null?void 0:P.height)??0,L=o+(s!=="center"?"-"+s:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(a)?a:[a],S=D.length>0,V={padding:M,boundary:D.filter(Oa),altBoundary:S},{refs:T,floatingStyles:I,placement:R,isPositioned:O,middlewareData:F}=ga({strategy:"fixed",placement:L,whileElementsMounted:(...Le)=>aa(...Le,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[ba({mainAxis:n+N,alignmentAxis:i}),l&&va({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?ya():void 0,...V}),l&&wa({...V}),xa({...V,apply:({elements:Le,rects:En,availableWidth:Oc,availableHeight:Rc})=>{const{width:Ic,height:Mc}=En.reference,at=Le.floating.style;at.setProperty("--radix-popper-available-width",`${Oc}px`),at.setProperty("--radix-popper-available-height",`${Rc}px`),at.setProperty("--radix-popper-anchor-width",`${Ic}px`),at.setProperty("--radix-popper-anchor-height",`${Mc}px`)}}),C&&Ea({element:C,padding:c}),Ra({arrowWidth:A,arrowHeight:N}),v&&Ca({strategy:"referenceHidden",...V})]}),[$,fe]=Fo(R),q=Y(m);ce(()=>{O&&(q==null||q())},[O,q]);const ee=(bn=F.arrow)==null?void 0:bn.x,Pe=(vn=F.arrow)==null?void 0:vn.y,it=((yn=F.arrow)==null?void 0:yn.centerOffset)!==0,[Nc,kc]=d.useState();return ce(()=>{y&&kc(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{...I,transform:O?I.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Nc,"--radix-popper-transform-origin":[(wn=F.transformOrigin)==null?void 0:wn.x,(xn=F.transformOrigin)==null?void 0:xn.y].join(" "),...((Cn=F.hide)==null?void 0:Cn.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(Sa,{scope:r,placedSide:$,onArrowChange:E,arrowX:ee,arrowY:Pe,shouldHideArrow:it,children:p.jsx(z.div,{"data-side":$,"data-align":fe,...b,ref:x,style:{...b.style,animation:O?void 0:"none"}})})})});_o.displayName=Wt;var Lo="PopperArrow",ka={top:"bottom",right:"left",bottom:"top",left:"right"},Do=d.forwardRef(function(t,r){const{__scopePopper:o,...n}=t,s=Na(Lo,o),i=ka[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(Pa,{...n,ref:r,style:{...n.style,display:"block"}})})});Do.displayName=Lo;function Oa(e){return e!==null}var Ra=e=>({name:"transformOrigin",options:e,fn(t){var g,y,w;const{placement:r,rects:o,middlewareData:n}=t,i=((g=n.arrow)==null?void 0:g.centerOffset)!==0,c=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[a,u]=Fo(r),f={start:"0%",center:"50%",end:"100%"}[u],v=(((y=n.arrow)==null?void 0:y.x)??0)+c/2,h=(((w=n.arrow)==null?void 0:w.y)??0)+l/2;let m="",b="";return a==="bottom"?(m=i?f:`${v}px`,b=`${-l}px`):a==="top"?(m=i?f:`${v}px`,b=`${o.floating.height+l}px`):a==="right"?(m=`${-l}px`,b=i?f:`${h}px`):a==="left"&&(m=`${o.floating.width+l}px`,b=i?f:`${h}px`),{data:{x:m,y:b}}}});function Fo(e){const[t,r="center"]=e.split("-");return[t,r]}var Ia=Ro,Ma=Mo,_a=_o,La=Do,[tt,Bc]=re("Tooltip",[ko]),rt=ko(),$o="TooltipProvider",Da=700,zt="tooltip.open",[Fa,Vt]=tt($o),Wo=e=>{const{__scopeTooltip:t,delayDuration:r=Da,skipDelayDuration:o=300,disableHoverableContent:n=!1,children:s}=e,[i,c]=d.useState(!0),l=d.useRef(!1),a=d.useRef(0);return d.useEffect(()=>{const u=a.current;return()=>window.clearTimeout(u)},[]),p.jsx(Fa,{scope:t,isOpenDelayed:i,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(a.current),c(!1)},[]),onClose:d.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>c(!0),o)},[o]),isPointerInTransitRef:l,onPointerInTransitChange:d.useCallback(u=>{l.current=u},[]),disableHoverableContent:n,children:s})};Wo.displayName=$o;var ot="Tooltip",[$a,nt]=tt(ot),zo=e=>{const{__scopeTooltip:t,children:r,open:o,defaultOpen:n=!1,onOpenChange:s,disableHoverableContent:i,delayDuration:c}=e,l=Vt(ot,e.__scopeTooltip),a=rt(t),[u,f]=d.useState(null),v=ao(),h=d.useRef(0),m=i??l.disableHoverableContent,b=c??l.delayDuration,g=d.useRef(!1),[y=!1,w]=ye({prop:o,defaultProp:n,onChange:A=>{A?(l.onOpen(),document.dispatchEvent(new CustomEvent(zt))):l.onClose(),s==null||s(A)}}),x=d.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),C=d.useCallback(()=>{window.clearTimeout(h.current),g.current=!1,w(!0)},[w]),E=d.useCallback(()=>{window.clearTimeout(h.current),w(!1)},[w]),P=d.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,w(!0)},b)},[b,w]);return d.useEffect(()=>()=>window.clearTimeout(h.current),[]),p.jsx(Ia,{...a,children:p.jsx($a,{scope:t,contentId:v,open:y,stateAttribute:x,trigger:u,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayed?P():C()},[l.isOpenDelayed,P,C]),onTriggerLeave:d.useCallback(()=>{m?E():window.clearTimeout(h.current)},[E,m]),onOpen:C,onClose:E,disableHoverableContent:m,children:r})})};zo.displayName=ot;var Bt="TooltipTrigger",Vo=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=nt(Bt,r),s=Vt(Bt,r),i=rt(r),c=d.useRef(null),l=j(t,c,n.onTriggerChange),a=d.useRef(!1),u=d.useRef(!1),f=d.useCallback(()=>a.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(Ma,{asChild:!0,...i,children:p.jsx(z.button,{"aria-describedby":n.open?n.contentId:void 0,"data-state":n.stateAttribute,...o,ref:l,onPointerMove:_(e.onPointerMove,v=>{v.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(n.onTriggerEnter(),u.current=!0)}),onPointerLeave:_(e.onPointerLeave,()=>{n.onTriggerLeave(),u.current=!1}),onPointerDown:_(e.onPointerDown,()=>{a.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:_(e.onFocus,()=>{a.current||n.onOpen()}),onBlur:_(e.onBlur,n.onClose),onClick:_(e.onClick,n.onClose)})})});Vo.displayName=Bt;var Wa="TooltipPortal",[Gc,za]=tt(Wa,{forceMount:void 0}),Te="TooltipContent",Bo=d.forwardRef((e,t)=>{const r=za(Te,e.__scopeTooltip),{forceMount:o=r.forceMount,side:n="top",...s}=e,i=nt(Te,e.__scopeTooltip);return p.jsx(Oe,{present:o||i.open,children:i.disableHoverableContent?p.jsx(Go,{side:n,...s,ref:t}):p.jsx(Va,{side:n,...s,ref:t})})}),Va=d.forwardRef((e,t)=>{const r=nt(Te,e.__scopeTooltip),o=Vt(Te,e.__scopeTooltip),n=d.useRef(null),s=j(t,n),[i,c]=d.useState(null),{trigger:l,onClose:a}=r,u=n.current,{onPointerInTransitChange:f}=o,v=d.useCallback(()=>{c(null),f(!1)},[f]),h=d.useCallback((m,b)=>{const g=m.currentTarget,y={x:m.clientX,y:m.clientY},w=Ha(y,g.getBoundingClientRect()),x=ja(y,w),C=Ua(b.getBoundingClientRect()),E=qa([...x,...C]);c(E),f(!0)},[f]);return d.useEffect(()=>()=>v(),[v]),d.useEffect(()=>{if(l&&u){const m=g=>h(g,u),b=g=>h(g,l);return l.addEventListener("pointerleave",m),u.addEventListener("pointerleave",b),()=>{l.removeEventListener("pointerleave",m),u.removeEventListener("pointerleave",b)}}},[l,u,h,v]),d.useEffect(()=>{if(i){const m=b=>{const g=b.target,y={x:b.clientX,y:b.clientY},w=(l==null?void 0:l.contains(g))||(u==null?void 0:u.contains(g)),x=!Ka(y,i);w?v():x&&(v(),a())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[l,u,i,a,v]),p.jsx(Go,{...e,ref:s})}),[Ba,Ga]=tt(ot,{isInside:!1}),Go=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:o,"aria-label":n,onEscapeKeyDown:s,onPointerDownOutside:i,...c}=e,l=nt(Te,r),a=rt(r),{onClose:u}=l;return d.useEffect(()=>(document.addEventListener(zt,u),()=>document.removeEventListener(zt,u)),[u]),d.useEffect(()=>{if(l.trigger){const f=v=>{const h=v.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),p.jsx(wt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(_a,{"data-state":l.stateAttribute,...a,...c,ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(Xt,{children:o}),p.jsx(Ba,{scope:r,isInside:!0,children:p.jsx(Bs,{id:l.contentId,role:"tooltip",children:n||o})})]})})});Bo.displayName=Te;var Ho="TooltipArrow",jo=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...o}=e,n=rt(r);return Ga(Ho,r).isInside?null:p.jsx(La,{...n,...o,ref:t})});jo.displayName=Ho;function Ha(e,t){const r=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),n=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(r,o,n,s)){case s:return"left";case n:return"right";case r:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function ja(e,t,r=5){const o=[];switch(t){case"top":o.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":o.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":o.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":o.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return o}function Ua(e){const{top:t,right:r,bottom:o,left:n}=e;return[{x:n,y:t},{x:r,y:t},{x:r,y:o},{x:n,y:o}]}function Ka(e,t){const{x:r,y:o}=e;let n=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const c=t[s].x,l=t[s].y,a=t[i].x,u=t[i].y;l>o!=u>o&&r<(a-c)*(o-l)/(u-l)+c&&(n=!n)}return n}function qa(e){const t=e.slice();return t.sort((r,o)=>r.x<o.x?-1:r.x>o.x?1:r.y<o.y?-1:r.y>o.y?1:0),Ya(t)}function Ya(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const n=e[o];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))t.pop();else break}t.push(n)}t.pop();const r=[];for(let o=e.length-1;o>=0;o--){const n=e[o];for(;r.length>=2;){const s=r[r.length-1],i=r[r.length-2];if((s.x-i.x)*(n.y-i.y)>=(s.y-i.y)*(n.x-i.x))r.pop();else break}r.push(n)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var Xa=Wo,Za=zo,Ja=Vo,Uo=Bo,Qa=jo;const ec=Xa,tc=Za,rc=Ja,Ko=d.forwardRef(({className:e,sideOffset:t=4,...r},o)=>p.jsx(Uo,{ref:o,sideOffset:t,className:G("z-50 overflow-hidden rounded-md bg-tooltip text-white px-3 py-1.5 text-sm shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));Ko.displayName=Uo.displayName;const oc=e=>p.jsx(ec,{delayDuration:e.duration||200,children:p.jsxs(tc,{children:[p.jsx(rc,{asChild:!0,children:p.jsx("span",{children:e.children})}),p.jsxs(Ko,{side:e.position||"top",children:[e.content,p.jsx(Qa,{className:"fill-tooltip"})]})]})});var nc=d.createContext(void 0);function qo(e){const t=d.useContext(nc);return e||t||"ltr"}var Gt="rovingFocusGroup.onEntryFocus",sc={bubbles:!1,cancelable:!0},st="RovingFocusGroup",[Ht,Yo,ic]=xr(st),[ac,Xo]=re(st,[ic]),[cc,lc]=ac(st),Zo=d.forwardRef((e,t)=>p.jsx(Ht.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(Ht.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(dc,{...e,ref:t})})}));Zo.displayName=st;var dc=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:n=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:a,preventScrollOnEntryFocus:u=!1,...f}=e,v=d.useRef(null),h=j(t,v),m=qo(s),[b=null,g]=ye({prop:i,defaultProp:c,onChange:l}),[y,w]=d.useState(!1),x=Y(a),C=Yo(r),E=d.useRef(!1),[P,A]=d.useState(0);return d.useEffect(()=>{const N=v.current;if(N)return N.addEventListener(Gt,x),()=>N.removeEventListener(Gt,x)},[x]),p.jsx(cc,{scope:r,orientation:o,dir:m,loop:n,currentTabStopId:b,onItemFocus:d.useCallback(N=>g(N),[g]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>A(N=>N+1),[]),onFocusableItemRemove:d.useCallback(()=>A(N=>N-1),[]),children:p.jsx(z.div,{tabIndex:y||P===0?-1:0,"data-orientation":o,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:_(e.onMouseDown,()=>{E.current=!0}),onFocus:_(e.onFocus,N=>{const L=!E.current;if(N.target===N.currentTarget&&L&&!y){const M=new CustomEvent(Gt,sc);if(N.currentTarget.dispatchEvent(M),!M.defaultPrevented){const D=C().filter(R=>R.focusable),S=D.find(R=>R.active),V=D.find(R=>R.id===b),I=[S,V,...D].filter(Boolean).map(R=>R.ref.current);en(I,u)}}E.current=!1}),onBlur:_(e.onBlur,()=>w(!1))})})}),Jo="RovingFocusGroupItem",Qo=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:n=!1,tabStopId:s,...i}=e,c=ao(),l=s||c,a=lc(Jo,r),u=a.currentTabStopId===l,f=Yo(r),{onFocusableItemAdd:v,onFocusableItemRemove:h}=a;return d.useEffect(()=>{if(o)return v(),()=>h()},[o,v,h]),p.jsx(Ht.ItemSlot,{scope:r,id:l,focusable:o,active:n,children:p.jsx(z.span,{tabIndex:u?0:-1,"data-orientation":a.orientation,...i,ref:t,onMouseDown:_(e.onMouseDown,m=>{o?a.onItemFocus(l):m.preventDefault()}),onFocus:_(e.onFocus,()=>a.onItemFocus(l)),onKeyDown:_(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){a.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const b=pc(m,a.orientation,a.dir);if(b!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let y=f().filter(w=>w.focusable).map(w=>w.ref.current);if(b==="last")y.reverse();else if(b==="prev"||b==="next"){b==="prev"&&y.reverse();const w=y.indexOf(m.currentTarget);y=a.loop?hc(y,w+1):y.slice(w+1)}setTimeout(()=>en(y))}})})})});Qo.displayName=Jo;var uc={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function fc(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function pc(e,t,r){const o=fc(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return uc[o]}function en(e,t=!1){const r=document.activeElement;for(const o of e)if(o===r||(o.focus({preventScroll:t}),document.activeElement!==r))return}function hc(e,t){return e.map((r,o)=>e[(t+o)%e.length])}var gc=Zo,mc=Qo,jt="Radio",[bc,tn]=re(jt),[vc,yc]=bc(jt),rn=d.forwardRef((e,t)=>{const{__scopeRadio:r,name:o,checked:n=!1,required:s,disabled:i,value:c="on",onCheck:l,...a}=e,[u,f]=d.useState(null),v=j(t,b=>f(b)),h=d.useRef(!1),m=u?!!u.closest("form"):!0;return p.jsxs(vc,{scope:r,checked:n,disabled:i,children:[p.jsx(z.button,{type:"button",role:"radio","aria-checked":n,"data-state":sn(n),"data-disabled":i?"":void 0,disabled:i,value:c,...a,ref:v,onClick:_(e.onClick,b=>{n||l==null||l(),m&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})}),m&&p.jsx(wc,{control:u,bubbles:!h.current,name:o,value:c,checked:n,required:s,disabled:i,style:{transform:"translateX(-100%)"}})]})});rn.displayName=jt;var on="RadioIndicator",nn=d.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:o,...n}=e,s=yc(on,r);return p.jsx(Oe,{present:o||s.checked,children:p.jsx(z.span,{"data-state":sn(s.checked),"data-disabled":s.disabled?"":void 0,...n,ref:t})})});nn.displayName=on;var wc=e=>{const{control:t,checked:r,bubbles:o=!0,...n}=e,s=d.useRef(null),i=ht(r),c=We(t);return d.useEffect(()=>{const l=s.current,a=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(a,"checked").set;if(i!==r&&f){const v=new Event("click",{bubbles:o});f.call(l,r),l.dispatchEvent(v)}},[i,r,o]),p.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:r,...n,tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function sn(e){return e?"checked":"unchecked"}var xc=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Ut="RadioGroup",[Cc,Hc]=re(Ut,[Xo,tn]),an=Xo(),cn=tn(),[Ec,Tc]=Cc(Ut),ln=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:o,defaultValue:n,value:s,required:i=!1,disabled:c=!1,orientation:l,dir:a,loop:u=!0,onValueChange:f,...v}=e,h=an(r),m=qo(a),[b,g]=ye({prop:s,defaultProp:n,onChange:f});return p.jsx(Ec,{scope:r,name:o,required:i,disabled:c,value:b,onValueChange:g,children:p.jsx(gc,{asChild:!0,...h,orientation:l,dir:m,loop:u,children:p.jsx(z.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":c?"":void 0,dir:m,...v,ref:t})})})});ln.displayName=Ut;var dn="RadioGroupItem",un=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:o,...n}=e,s=Tc(dn,r),i=s.disabled||o,c=an(r),l=cn(r),a=d.useRef(null),u=j(t,a),f=s.value===n.value,v=d.useRef(!1);return d.useEffect(()=>{const h=b=>{xc.includes(b.key)&&(v.current=!0)},m=()=>v.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),p.jsx(mc,{asChild:!0,...c,focusable:!i,active:f,children:p.jsx(rn,{disabled:i,required:s.required,checked:f,...l,...n,name:s.name,ref:u,onCheck:()=>s.onValueChange(n.value),onKeyDown:_(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:_(n.onFocus,()=>{var h;v.current&&((h=a.current)==null||h.click())})})})});un.displayName=dn;var Pc="RadioGroupIndicator",fn=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...o}=e,n=cn(r);return p.jsx(nn,{...n,...o,ref:t})});fn.displayName=Pc;var pn=ln,hn=un,Ac=fn;const gn=d.forwardRef(({className:e,...t},r)=>p.jsx(pn,{className:G("grid gap-2",e),...t,ref:r}));gn.displayName=pn.displayName;const mn=d.forwardRef(({className:e,...t},r)=>p.jsx(hn,{ref:r,className:G("group aspect-square h-4 w-4 rounded-full border border-p-gray-500 text-p-blue-500 ring-offset-white disabled:cursor-not-allowed disabled:opacity-50 hover:border-p-blue-400 hover:bg-p-gray-200 data-[state=checked]:border-p-blue-400 hover:data-[state=checked]:border-q-blue-500 hover:data-[state=checked]:bg-inherit focus:outline-2 focus:outline-offset-4 focus:outline-p-blue-200 disabled:hover:border-p-gray-500",e),...t,children:p.jsx(Ac,{className:"flex items-center justify-center",children:p.jsx(di,{className:"w-2 h-2 stroke-p-blue-400 fill-p-blue-400 group-hover:group-data-[state=checked]:stroke-q-blue-500 group-hover:group-data-[state=checked]:fill-q-blue-500"})})}));mn.displayName=hn.displayName;const Sc=e=>{const{options:t,defaultValue:r,onValueChange:o,...n}=e;return p.jsx(gn,{defaultValue:r,required:n.required,disabled:n.disabled,onValueChange:o,children:t.map(s=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(mn,{value:s.value,id:s.value,disabled:s.disabled,required:s.required,"aria-label":s.value}),p.jsx(mt,{htmlFor:s.value,className:G(s.disabled&&"text-p-gray-500",s.required&&"after:content-['*'] after:ml-[2px] after:text-rose-500"),children:s.label})]},s.value))})};B.WuButton=ls,B.WuButtonColorEnum=ct,B.WuButtonIconPositionEnum=Fe,B.WuButtonSizeEnum=lt,B.WuButtonVariantEnum=dt,B.WuCheckbox=Es,B.WuRadio=Sc,B.WuSpinner=lr,B.WuSpinnerSizeEnum=ke,B.WuToast=bi,B.WuToggle=Ei,B.WuTooltip=oc,B.useWuShowToast=Os,Object.defineProperty(B,Symbol.toStringTag,{value:"Module"})});
|
|
32
|
+
//# sourceMappingURL=index.js.map
|