@tightrope-dev/link-component 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +40 -34
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),S=require("react");require("react-dom");function ze(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 k=ze(S);function le(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ae(...e){return t=>{let r=!1;const o=e.map(n=>{const s=le(n,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let n=0;n<o.length;n++){const s=o[n];typeof s=="function"?s():le(e[n],null)}}}}function he(e){const t=Re(e),r=k.forwardRef((o,n)=>{const{children:s,...l}=o,i=k.Children.toArray(s),u=i.find(Ie);if(u){const d=u.props.children,b=i.map(w=>w===u?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:w);return a.jsx(t,{...l,ref:n,children:k.isValidElement(d)?k.cloneElement(d,void 0,b):null})}return a.jsx(t,{...l,ref:n,children:s})});return r.displayName=`${e}.Slot`,r}var xe=he("Slot");function Re(e){const t=k.forwardRef((r,o)=>{const{children:n,...s}=r;if(k.isValidElement(n)){const l=Ee(n),i=Me(s,n.props);return n.type!==k.Fragment&&(i.ref=o?Ae(o,l):l),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pe=Symbol("radix.slottable");function Ie(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pe}function Me(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]=(...i)=>{const u=s(...i);return n(...i),u}:n&&(r[o]=n):o==="style"?r[o]={...n,...s}:o==="className"&&(r[o]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}function Ee(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 ve(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=ve(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function ye(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=ve(e))&&(o&&(o+=" "),o+=t);return o}const ce=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,de=ye,ne=(e,t)=>r=>{var o;if((t==null?void 0:t.variants)==null)return de(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:s}=t,l=Object.keys(n).map(d=>{const b=r==null?void 0:r[d],w=s==null?void 0:s[d];if(b===null)return null;const j=ce(b)||ce(w);return n[d][j]}),i=r&&Object.entries(r).reduce((d,b)=>{let[w,j]=b;return j===void 0||(d[w]=j),d},{}),u=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((d,b)=>{let{class:w,className:j,...z}=b;return Object.entries(z).every(_=>{let[f,m]=_;return Array.isArray(m)?m.includes({...s,...i}[f]):{...s,...i}[f]===m})?[...d,w,j]:d},[]);return de(e,l,u,r==null?void 0:r.class,r==null?void 0:r.className)},se="-",$e=e=>{const t=Ve(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const i=l.split(se);return i[0]===""&&i.length!==1&&i.shift(),we(i,t)||Le(l)},getConflictingClassGroupIds:(l,i)=>{const u=r[l]||[];return i&&o[l]?[...u,...o[l]]:u}}},we=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?we(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const s=e.join(se);return(l=t.validators.find(({validator:i})=>i(s)))==null?void 0:l.classGroupId},ue=/^\[(.+)\]$/,Le=e=>{if(ue.test(e)){const t=ue.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ve=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Oe(Object.entries(e.classGroups),r).forEach(([s,l])=>{oe(l,o,s,t)}),o},oe=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const s=n===""?t:pe(t,n);s.classGroupId=r;return}if(typeof n=="function"){if(Ge(n)){oe(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([s,l])=>{oe(l,pe(t,s),r,o)})})},pe=(e,t)=>{let r=e;return t.split(se).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ge=e=>e.isThemeGetter,Oe=(e,t)=>t?e.map(([r,o])=>{const n=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,i])=>[t+l,i])):s);return[r,n]}):e,Te=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(s,l)=>{r.set(s,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(s){let l=r.get(s);if(l!==void 0)return l;if((l=o.get(s))!==void 0)return n(s,l),l},set(s,l){r.has(s)?r.set(s,l):n(s,l)}}},je="!",We=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],s=t.length,l=i=>{const u=[];let d=0,b=0,w;for(let m=0;m<i.length;m++){let g=i[m];if(d===0){if(g===n&&(o||i.slice(m,m+s)===t)){u.push(i.slice(b,m)),b=m+s;continue}if(g==="/"){w=m;continue}}g==="["?d++:g==="]"&&d--}const j=u.length===0?i:i.substring(b),z=j.startsWith(je),_=z?j.substring(1):j,f=w&&w>b?w-b:void 0;return{modifiers:u,hasImportantModifier:z,baseClassName:_,maybePostfixModifierPosition:f}};return r?i=>r({className:i,parseClassName:l}):l},Fe=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},qe=e=>({cache:Te(e.cacheSize),parseClassName:We(e),...$e(e)}),Be=/\s+/,Ue=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,s=[],l=e.trim().split(Be);let i="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{modifiers:b,hasImportantModifier:w,baseClassName:j,maybePostfixModifierPosition:z}=r(d);let _=!!z,f=o(_?j.substring(0,z):j);if(!f){if(!_){i=d+(i.length>0?" "+i:i);continue}if(f=o(j),!f){i=d+(i.length>0?" "+i:i);continue}_=!1}const m=Fe(b).join(":"),g=w?m+je:m,C=g+f;if(s.includes(C))continue;s.push(C);const E=n(f,_);for(let R=0;R<E.length;++R){const G=E[R];s.push(g+G)}i=d+(i.length>0?" "+i:i)}return i};function De(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ce(t))&&(o&&(o+=" "),o+=r);return o}const Ce=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ce(e[o]))&&(r&&(r+=" "),r+=t);return r};function He(e,...t){let r,o,n,s=l;function l(u){const d=t.reduce((b,w)=>w(b),e());return r=qe(d),o=r.cache.get,n=r.cache.set,s=i,i(u)}function i(u){const d=o(u);if(d)return d;const b=Ue(u,r);return n(u,b),b}return function(){return s(De.apply(null,arguments))}}const v=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},ke=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ze=/^\d+\/\d+$/,Je=new Set(["px","full","screen"]),Ke=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xe=/\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$/,Qe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,et=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,M=e=>W(e)||Je.has(e)||Ze.test(e),L=e=>F(e,"length",lt),W=e=>!!e&&!Number.isNaN(Number(e)),X=e=>F(e,"number",W),D=e=>!!e&&Number.isInteger(Number(e)),tt=e=>e.endsWith("%")&&W(e.slice(0,-1)),c=e=>ke.test(e),V=e=>Ke.test(e),rt=new Set(["length","size","percentage"]),ot=e=>F(e,rt,Ne),nt=e=>F(e,"position",Ne),st=new Set(["image","url"]),at=e=>F(e,st,dt),it=e=>F(e,"",ct),H=()=>!0,F=(e,t,r)=>{const o=ke.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},lt=e=>Xe.test(e)&&!Qe.test(e),Ne=()=>!1,ct=e=>Ye.test(e),dt=e=>et.test(e),ut=()=>{const e=v("colors"),t=v("spacing"),r=v("blur"),o=v("brightness"),n=v("borderColor"),s=v("borderRadius"),l=v("borderSpacing"),i=v("borderWidth"),u=v("contrast"),d=v("grayscale"),b=v("hueRotate"),w=v("invert"),j=v("gap"),z=v("gradientColorStops"),_=v("gradientColorStopPositions"),f=v("inset"),m=v("margin"),g=v("opacity"),C=v("padding"),E=v("saturate"),R=v("scale"),G=v("sepia"),P=v("skew"),Z=v("space"),J=v("translate"),O=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",c,t],h=()=>[c,t],B=()=>["",M,L],p=()=>["auto",W,c],y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],x=()=>["solid","dashed","dotted","double","none"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",c],ie=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[W,c];return{cacheSize:500,separator:":",theme:{colors:[H],spacing:[M,L],blur:["none","",V,c],brightness:I(),borderColor:[e],borderRadius:["none","","full",V,c],borderSpacing:h(),borderWidth:B(),contrast:I(),grayscale:$(),hueRotate:I(),invert:$(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[tt,L],inset:q(),margin:q(),opacity:I(),padding:h(),saturate:I(),scale:I(),sepia:$(),skew:I(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[V]}],"break-after":[{"break-after":ie()}],"break-before":[{"break-before":ie()}],"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:[...y(),c]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",D,c]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",D,c]}],"grid-cols":[{"grid-cols":[H]}],"col-start-end":[{col:["auto",{span:["full",D,c]},c]}],"col-start":[{"col-start":p()}],"col-end":[{"col-end":p()}],"grid-rows":[{"grid-rows":[H]}],"row-start-end":[{row:["auto",{span:[D,c]},c]}],"row-start":[{"row-start":p()}],"row-end":[{"row-end":p()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[j]}],"gap-x":[{"gap-x":[j]}],"gap-y":[{"gap-y":[j]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[Z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,t]}],"min-w":[{"min-w":[c,t,"min","max","fit"]}],"max-w":[{"max-w":[c,t,"none","full","min","max","fit","prose",{screen:[V]},V]}],h:[{h:[c,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,t,"auto","min","max","fit"]}],"font-size":[{text:["base",V,L]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",X]}],"font-family":[{font:[H]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",c]}],"line-clamp":[{"line-clamp":["none",W,X]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",M,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...x(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",M,L]}],"underline-offset":[{"underline-offset":["auto",M,c]}],"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:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],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",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...y(),nt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ot]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},at]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[z]}],"gradient-via":[{via:[z]}],"gradient-to":[{to:[z]}],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:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...x(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:x()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[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:["",...x()]}],"outline-offset":[{"outline-offset":[M,c]}],"outline-w":[{outline:[M,L]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[M,L]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",V,it]}],"shadow-color":[{shadow:[H]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...N(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",V,c]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[w]}],saturate:[{saturate:[E]}],sepia:[{sepia:[G]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[D,c]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"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",c]}],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",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"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",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[M,L,X]}],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-s","border-color-e","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"]}}},pt=He(ut);function A(...e){return pt(ye(e))}const gt=ne("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ge({className:e,variant:t,size:r,asChild:o=!1,...n}){const s=o?xe:"button";return a.jsx(s,{"data-slot":"button",className:A(gt({variant:t,size:r,className:e})),...n})}const K=k.forwardRef(({className:e,type:t,...r},o)=>a.jsx("input",{type:t,className:A("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));K.displayName="Input";var ft=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mt=ft.reduce((e,t)=>{const r=he(`Primitive.${t}`),o=k.forwardRef((n,s)=>{const{asChild:l,...i}=n,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),bt="Label",_e=k.forwardRef((e,t)=>a.jsx(mt.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())}}));_e.displayName=bt;var ht=_e;function Q({className:e,...t}){return a.jsx(ht,{"data-slot":"label",className:A("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function xt({className:e,...t}){return a.jsx("div",{"data-slot":"card",className:A("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function vt({className:e,...t}){return a.jsx("div",{"data-slot":"card-header",className:A("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function yt({className:e,...t}){return a.jsx("div",{"data-slot":"card-title",className:A("leading-none font-semibold",e),...t})}function wt({className:e,...t}){return a.jsx("div",{"data-slot":"card-description",className:A("text-muted-foreground text-sm",e),...t})}function jt({className:e,...t}){return a.jsx("div",{"data-slot":"card-content",className:A("px-6",e),...t})}const Ct=ne("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function kt({className:e,variant:t,asChild:r=!1,...o}){const n=r?xe:"span";return a.jsx(n,{"data-slot":"badge",className:A(Ct({variant:t}),e),...o})}const Nt=ne("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Y({className:e,variant:t,...r}){return a.jsx("div",{"data-slot":"alert",role:"alert",className:A(Nt({variant:t}),e),...r})}function ee({className:e,...t}){return a.jsx("div",{"data-slot":"alert-description",className:A("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),S=require("react");require("react-dom");function ze(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 k=ze(S);function le(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ae(...e){return t=>{let r=!1;const o=e.map(n=>{const s=le(n,t);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let n=0;n<o.length;n++){const s=o[n];typeof s=="function"?s():le(e[n],null)}}}}function he(e){const t=Re(e),r=k.forwardRef((o,n)=>{const{children:s,...l}=o,i=k.Children.toArray(s),u=i.find(Ie);if(u){const d=u.props.children,b=i.map(w=>w===u?k.Children.count(d)>1?k.Children.only(null):k.isValidElement(d)?d.props.children:null:w);return a.jsx(t,{...l,ref:n,children:k.isValidElement(d)?k.cloneElement(d,void 0,b):null})}return a.jsx(t,{...l,ref:n,children:s})});return r.displayName=`${e}.Slot`,r}var xe=he("Slot");function Re(e){const t=k.forwardRef((r,o)=>{const{children:n,...s}=r;if(k.isValidElement(n)){const l=Ee(n),i=Me(s,n.props);return n.type!==k.Fragment&&(i.ref=o?Ae(o,l):l),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pe=Symbol("radix.slottable");function Ie(e){return k.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pe}function Me(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]=(...i)=>{const u=s(...i);return n(...i),u}:n&&(r[o]=n):o==="style"?r[o]={...n,...s}:o==="className"&&(r[o]=[n,s].filter(Boolean).join(" "))}return{...e,...r}}function Ee(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 ve(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=ve(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function ye(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=ve(e))&&(o&&(o+=" "),o+=t);return o}const ce=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,de=ye,ne=(e,t)=>r=>{var o;if((t==null?void 0:t.variants)==null)return de(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:n,defaultVariants:s}=t,l=Object.keys(n).map(d=>{const b=r==null?void 0:r[d],w=s==null?void 0:s[d];if(b===null)return null;const j=ce(b)||ce(w);return n[d][j]}),i=r&&Object.entries(r).reduce((d,b)=>{let[w,j]=b;return j===void 0||(d[w]=j),d},{}),u=t==null||(o=t.compoundVariants)===null||o===void 0?void 0:o.reduce((d,b)=>{let{class:w,className:j,...z}=b;return Object.entries(z).every(_=>{let[f,m]=_;return Array.isArray(m)?m.includes({...s,...i}[f]):{...s,...i}[f]===m})?[...d,w,j]:d},[]);return de(e,l,u,r==null?void 0:r.class,r==null?void 0:r.className)},se="-",$e=e=>{const t=Ve(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const i=l.split(se);return i[0]===""&&i.length!==1&&i.shift(),we(i,t)||Le(l)},getConflictingClassGroupIds:(l,i)=>{const u=r[l]||[];return i&&o[l]?[...u,...o[l]]:u}}},we=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const r=e[0],o=t.nextPart.get(r),n=o?we(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;const s=e.join(se);return(l=t.validators.find(({validator:i})=>i(s)))==null?void 0:l.classGroupId},ue=/^\[(.+)\]$/,Le=e=>{if(ue.test(e)){const t=ue.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Ve=e=>{const{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Oe(Object.entries(e.classGroups),r).forEach(([s,l])=>{oe(l,o,s,t)}),o},oe=(e,t,r,o)=>{e.forEach(n=>{if(typeof n=="string"){const s=n===""?t:pe(t,n);s.classGroupId=r;return}if(typeof n=="function"){if(Ge(n)){oe(n(o),t,r,o);return}t.validators.push({validator:n,classGroupId:r});return}Object.entries(n).forEach(([s,l])=>{oe(l,pe(t,s),r,o)})})},pe=(e,t)=>{let r=e;return t.split(se).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ge=e=>e.isThemeGetter,Oe=(e,t)=>t?e.map(([r,o])=>{const n=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,i])=>[t+l,i])):s);return[r,n]}):e,Te=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map;const n=(s,l)=>{r.set(s,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(s){let l=r.get(s);if(l!==void 0)return l;if((l=o.get(s))!==void 0)return n(s,l),l},set(s,l){r.has(s)?r.set(s,l):n(s,l)}}},je="!",We=e=>{const{separator:t,experimentalParseClassName:r}=e,o=t.length===1,n=t[0],s=t.length,l=i=>{const u=[];let d=0,b=0,w;for(let m=0;m<i.length;m++){let g=i[m];if(d===0){if(g===n&&(o||i.slice(m,m+s)===t)){u.push(i.slice(b,m)),b=m+s;continue}if(g==="/"){w=m;continue}}g==="["?d++:g==="]"&&d--}const j=u.length===0?i:i.substring(b),z=j.startsWith(je),_=z?j.substring(1):j,f=w&&w>b?w-b:void 0;return{modifiers:u,hasImportantModifier:z,baseClassName:_,maybePostfixModifierPosition:f}};return r?i=>r({className:i,parseClassName:l}):l},Fe=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},Ue=e=>({cache:Te(e.cacheSize),parseClassName:We(e),...$e(e)}),qe=/\s+/,Be=(e,t)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n}=t,s=[],l=e.trim().split(qe);let i="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{modifiers:b,hasImportantModifier:w,baseClassName:j,maybePostfixModifierPosition:z}=r(d);let _=!!z,f=o(_?j.substring(0,z):j);if(!f){if(!_){i=d+(i.length>0?" "+i:i);continue}if(f=o(j),!f){i=d+(i.length>0?" "+i:i);continue}_=!1}const m=Fe(b).join(":"),g=w?m+je:m,C=g+f;if(s.includes(C))continue;s.push(C);const E=n(f,_);for(let R=0;R<E.length;++R){const G=E[R];s.push(g+G)}i=d+(i.length>0?" "+i:i)}return i};function De(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Ce(t))&&(o&&(o+=" "),o+=r);return o}const Ce=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Ce(e[o]))&&(r&&(r+=" "),r+=t);return r};function He(e,...t){let r,o,n,s=l;function l(u){const d=t.reduce((b,w)=>w(b),e());return r=Ue(d),o=r.cache.get,n=r.cache.set,s=i,i(u)}function i(u){const d=o(u);if(d)return d;const b=Be(u,r);return n(u,b),b}return function(){return s(De.apply(null,arguments))}}const v=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},ke=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ze=/^\d+\/\d+$/,Je=new Set(["px","full","screen"]),Ke=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xe=/\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$/,Qe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ye=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,et=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,M=e=>W(e)||Je.has(e)||Ze.test(e),L=e=>F(e,"length",lt),W=e=>!!e&&!Number.isNaN(Number(e)),X=e=>F(e,"number",W),D=e=>!!e&&Number.isInteger(Number(e)),tt=e=>e.endsWith("%")&&W(e.slice(0,-1)),c=e=>ke.test(e),V=e=>Ke.test(e),rt=new Set(["length","size","percentage"]),ot=e=>F(e,rt,Ne),nt=e=>F(e,"position",Ne),st=new Set(["image","url"]),at=e=>F(e,st,dt),it=e=>F(e,"",ct),H=()=>!0,F=(e,t,r)=>{const o=ke.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},lt=e=>Xe.test(e)&&!Qe.test(e),Ne=()=>!1,ct=e=>Ye.test(e),dt=e=>et.test(e),ut=()=>{const e=v("colors"),t=v("spacing"),r=v("blur"),o=v("brightness"),n=v("borderColor"),s=v("borderRadius"),l=v("borderSpacing"),i=v("borderWidth"),u=v("contrast"),d=v("grayscale"),b=v("hueRotate"),w=v("invert"),j=v("gap"),z=v("gradientColorStops"),_=v("gradientColorStopPositions"),f=v("inset"),m=v("margin"),g=v("opacity"),C=v("padding"),E=v("saturate"),R=v("scale"),G=v("sepia"),P=v("skew"),Z=v("space"),J=v("translate"),O=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],U=()=>["auto",c,t],h=()=>[c,t],q=()=>["",M,L],p=()=>["auto",W,c],y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],x=()=>["solid","dashed","dotted","double","none"],N=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],B=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",c],ie=()=>["auto","avoid","all","avoid-page","page","left","right","column"],I=()=>[W,c];return{cacheSize:500,separator:":",theme:{colors:[H],spacing:[M,L],blur:["none","",V,c],brightness:I(),borderColor:[e],borderRadius:["none","","full",V,c],borderSpacing:h(),borderWidth:q(),contrast:I(),grayscale:$(),hueRotate:I(),invert:$(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[tt,L],inset:U(),margin:U(),opacity:I(),padding:h(),saturate:I(),scale:I(),sepia:$(),skew:I(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[V]}],"break-after":[{"break-after":ie()}],"break-before":[{"break-before":ie()}],"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:[...y(),c]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",D,c]}],basis:[{basis:U()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",D,c]}],"grid-cols":[{"grid-cols":[H]}],"col-start-end":[{col:["auto",{span:["full",D,c]},c]}],"col-start":[{"col-start":p()}],"col-end":[{"col-end":p()}],"grid-rows":[{"grid-rows":[H]}],"row-start-end":[{row:["auto",{span:[D,c]},c]}],"row-start":[{"row-start":p()}],"row-end":[{"row-end":p()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[j]}],"gap-x":[{"gap-x":[j]}],"gap-y":[{"gap-y":[j]}],"justify-content":[{justify:["normal",...B()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...B(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...B(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],pe:[{pe:[C]}],pt:[{pt:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[m]}],mx:[{mx:[m]}],my:[{my:[m]}],ms:[{ms:[m]}],me:[{me:[m]}],mt:[{mt:[m]}],mr:[{mr:[m]}],mb:[{mb:[m]}],ml:[{ml:[m]}],"space-x":[{"space-x":[Z]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Z]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,t]}],"min-w":[{"min-w":[c,t,"min","max","fit"]}],"max-w":[{"max-w":[c,t,"none","full","min","max","fit","prose",{screen:[V]},V]}],h:[{h:[c,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,t,"auto","min","max","fit"]}],"font-size":[{text:["base",V,L]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",X]}],"font-family":[{font:[H]}],"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-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",c]}],"line-clamp":[{"line-clamp":["none",W,X]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",M,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[g]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[g]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...x(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",M,L]}],"underline-offset":[{"underline-offset":["auto",M,c]}],"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:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],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",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[g]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...y(),nt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",ot]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},at]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[z]}],"gradient-via":[{via:[z]}],"gradient-to":[{to:[z]}],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:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[g]}],"border-style":[{border:[...x(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[g]}],"divide-style":[{divide:x()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[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:["",...x()]}],"outline-offset":[{"outline-offset":[M,c]}],"outline-w":[{outline:[M,L]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[g]}],"ring-offset-w":[{"ring-offset":[M,L]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",V,it]}],"shadow-color":[{shadow:[H]}],opacity:[{opacity:[g]}],"mix-blend":[{"mix-blend":[...N(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":N()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",V,c]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[b]}],invert:[{invert:[w]}],saturate:[{saturate:[E]}],sepia:[{sepia:[G]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[b]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[g]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[G]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[D,c]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"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",c]}],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",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"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",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[M,L,X]}],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-s","border-color-e","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"]}}},pt=He(ut);function A(...e){return pt(ye(e))}const gt=ne("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function ge({className:e,variant:t,size:r,asChild:o=!1,...n}){const s=o?xe:"button";return a.jsx(s,{"data-slot":"button",className:A(gt({variant:t,size:r,className:e})),...n})}const K=k.forwardRef(({className:e,type:t,...r},o)=>a.jsx("input",{type:t,className:A("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...r}));K.displayName="Input";var ft=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],mt=ft.reduce((e,t)=>{const r=he(`Primitive.${t}`),o=k.forwardRef((n,s)=>{const{asChild:l,...i}=n,u=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),bt="Label",_e=k.forwardRef((e,t)=>a.jsx(mt.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())}}));_e.displayName=bt;var ht=_e;function Q({className:e,...t}){return a.jsx(ht,{"data-slot":"label",className:A("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function xt({className:e,...t}){return a.jsx("div",{"data-slot":"card",className:A("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function vt({className:e,...t}){return a.jsx("div",{"data-slot":"card-header",className:A("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function yt({className:e,...t}){return a.jsx("div",{"data-slot":"card-title",className:A("leading-none font-semibold",e),...t})}function wt({className:e,...t}){return a.jsx("div",{"data-slot":"card-description",className:A("text-muted-foreground text-sm",e),...t})}function jt({className:e,...t}){return a.jsx("div",{"data-slot":"card-content",className:A("px-6",e),...t})}const Ct=ne("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function kt({className:e,variant:t,asChild:r=!1,...o}){const n=r?xe:"span";return a.jsx(n,{"data-slot":"badge",className:A(Ct({variant:t}),e),...o})}const Nt=ne("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function Y({className:e,variant:t,...r}){return a.jsx("div",{"data-slot":"alert",role:"alert",className:A(Nt({variant:t}),e),...r})}function ee({className:e,...t}){return a.jsx("div",{"data-slot":"alert-description",className:A("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}/**
|
|
2
2
|
* @license lucide-react v0.537.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const Mt=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],me=ae("loader-circle",Mt),Et="_linkContainer_1iste_4",$t="_dark_1iste_29",be={linkContainer:Et,dark:$t};function Lt({linkToken:e,apiBaseUrl:t="https://api.tightrope.dev",onSuccess:r,onError:o,theme:n="light",className:s="",showTokenBadge:l=!0,title:i="Tightrope Link",description:u}){var h,
|
|
36
|
+
*/const Mt=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],me=ae("loader-circle",Mt),Et="_linkContainer_1iste_4",$t="_dark_1iste_29",be={linkContainer:Et,dark:$t};function Lt({linkToken:e,apiBaseUrl:t="https://api.tightrope.dev",onSuccess:r,onError:o,theme:n="light",className:s="",showTokenBadge:l=!0,title:i="Tightrope Link",description:u}){var h,q;const[d,b]=S.useState([]),[w,j]=S.useState(!0),[z,_]=S.useState(null),[f,m]=S.useState(null),[g,C]=S.useState({username:"",password:"",auth_params:{}}),[E,R]=S.useState(!1),[G,P]=S.useState(null),[Z,J]=S.useState(!1);S.useEffect(()=>{if(!e){j(!1);return}j(!0),(async()=>{try{const y=new URL(`${t}/integration_methods`);y.searchParams.set("link_token",e);const x=await fetch(y.toString());if(!x.ok)throw new Error(`Failed to fetch integrations: ${x.status}`);const N=await x.json();N&&N.integration_methods&&Array.isArray(N.integration_methods)?b(N.integration_methods):_("Invalid data format received")}catch(y){console.error("Error fetching integrations:",y);const x="Failed to load integrations";_(x),o==null||o(x)}finally{j(!1)}})()},[t,e,o]);const O=p=>/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(p),T=()=>{if(!f)return null;for(const p of d){const y=p.auth_methods.find(x=>x.id===f);if(y)return y}return null},U=async p=>{if(p.preventDefault(),!f||!g.username||!g.password){P("Please fill in all fields");return}const y=T();if(y!=null&&y.auth_params){for(const x of y.auth_params)if(!g.auth_params[x]){const N=`Please fill in the required field: ${x}`;P(N);return}}try{R(!0),P(null);const x=`${t}/linked_account_credentials`,N=await fetch(x,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({integration_method_id:f,link_token:e,args:{username:g.username,password:g.password,auth_params:g.auth_params}})}),B=await N.json();if(!N.ok){const $=B.error||`HTTP error! status: ${N.status}`;P($),o==null||o($);return}J(!0),r==null||r({integration_method_id:f,username:g.username}),C({username:"",password:"",auth_params:{}}),m(null)}catch(x){const N=x instanceof Error?x.message:"An error occurred";P(N),o==null||o(N),console.error("Error submitting credentials:",x)}finally{R(!1)}};return a.jsx("div",{className:`${be.linkContainer} ${n==="dark"?be.dark:""} ${s}`,children:a.jsxs(xt,{className:"w-full mx-auto shadow-xl border-2 bg-card",children:[a.jsx(vt,{className:"pb-8",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(yt,{className:"text-2xl font-bold tracking-tight",children:i}),u&&a.jsx(wt,{className:"text-base",children:u})]}),l&&e&&a.jsxs(kt,{variant:O(e)?"secondary":"destructive",children:[O(e)?a.jsx(te,{className:"h-3 w-3 mr-1"}):a.jsx(re,{className:"h-3 w-3 mr-1"}),O(e)?"Valid Token":"Invalid Token"]})]})}),a.jsxs(jt,{className:"space-y-8 pb-8",children:[Z&&a.jsxs(Y,{className:"border-green-200 bg-green-50 dark:bg-green-950 dark:border-green-800",children:[a.jsx(te,{className:"h-5 w-5 text-green-600 dark:text-green-400"}),a.jsx(ee,{className:"text-green-800 dark:text-green-200 font-medium",children:"Credentials submitted successfully!"})]}),a.jsx("div",{children:w?a.jsxs("div",{className:"text-center py-12",children:[a.jsx(me,{className:"h-10 w-10 animate-spin mx-auto mb-4 text-primary"}),a.jsx("p",{className:"text-muted-foreground text-lg",children:"Loading integrations..."})]}):z?a.jsxs(Y,{variant:"destructive",children:[a.jsx(re,{className:"h-4 w-4"}),a.jsx(ee,{children:z})]}):Array.isArray(d)?d.length===0?a.jsx("div",{className:"text-center py-12",children:a.jsx("p",{className:"text-muted-foreground",children:"No integrations available"})}):a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Select an integration to connect"}),a.jsx("div",{className:"grid grid-cols-4 lg:grid-cols-4 md:grid-cols-2 sm:grid-cols-1 gap-3",children:d.map(p=>p.auth_methods.map(y=>a.jsx("button",{type:"button",onClick:()=>m(y.id),className:`p-4 rounded-lg border-2 transition-all duration-200 text-left ${f===y.id?"border-primary bg-primary/5 shadow-md":"border-border hover:border-primary/50 hover:bg-accent"}`,children:a.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[a.jsx("div",{className:"w-12 h-12 flex items-center justify-center flex-shrink-0",children:p.provider_logo_url?a.jsx("img",{src:p.provider_logo_url,alt:`${p.provider} logo`,className:"max-w-full max-h-full w-auto h-auto object-contain",style:{maxWidth:"48px",maxHeight:"48px"},onError:x=>{console.error("Failed to load logo for",p.provider,":",p.provider_logo_url),x.currentTarget.style.display="none"}}):a.jsx("div",{className:"w-full h-full bg-muted rounded-lg flex items-center justify-center text-muted-foreground font-semibold text-xl",children:p.provider.charAt(0).toUpperCase()})}),a.jsxs("div",{children:[a.jsx("div",{className:"font-semibold text-base",children:p.provider}),a.jsx("div",{className:"text-sm text-muted-foreground",children:y.display_name})]}),f===y.id&&a.jsx(te,{className:"h-5 w-5 text-primary"})]})},y.id)))})]}):a.jsx("div",{className:"text-center py-12",children:a.jsx("p",{className:"text-muted-foreground",children:"Invalid data format"})})}),f&&a.jsxs("div",{className:"space-y-8 pt-8 border-t-2 animate-in fade-in-50 slide-in-from-top-4 duration-300",children:[a.jsxs("div",{className:"flex items-center gap-3 py-2",children:[a.jsx("div",{className:"h-1 flex-1 bg-primary rounded-full"}),a.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Enter Credentials"}),a.jsx("div",{className:"h-1 flex-1 bg-primary rounded-full"})]}),a.jsxs("form",{onSubmit:U,className:"flex flex-col gap-4 ",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(Q,{htmlFor:"username",className:"text-base font-medium",children:"Username"}),a.jsx(K,{type:"text",id:"username",value:g.username,onChange:p=>C({...g,username:p.target.value}),placeholder:"Enter your username",className:"h-11 text-base",required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(Q,{htmlFor:"password",className:"text-base font-medium",children:"Password"}),a.jsx(K,{type:"password",id:"password",value:g.password,onChange:p=>C({...g,password:p.target.value}),placeholder:"Enter your password",className:"h-11 text-base",required:!0})]}),(q=(h=T())==null?void 0:h.auth_params)==null?void 0:q.map(p=>a.jsxs("div",{className:"space-y-2",children:[a.jsx(Q,{htmlFor:p,className:"text-base font-medium",children:p}),a.jsx(K,{type:"text",id:p,value:g.auth_params[p]||"",onChange:y=>C({...g,auth_params:{...g.auth_params,[p]:y.target.value}}),placeholder:`Enter ${p}`,className:"h-11 text-base",required:!0})]},p)),G&&a.jsxs(Y,{variant:"destructive",children:[a.jsx(re,{className:"h-4 w-4"}),a.jsx(ee,{children:G})]}),a.jsxs("div",{className:"flex gap-3 pt-6",children:[a.jsx(ge,{type:"submit",disabled:E,className:"flex-1 h-11 text-base font-semibold",size:"lg",children:E?a.jsxs(a.Fragment,{children:[a.jsx(me,{className:"mr-2 h-5 w-5 animate-spin"}),"Submitting..."]}):"Submit Credentials"}),a.jsx(ge,{type:"button",variant:"outline",className:"h-11",onClick:()=>{m(null),C({username:"",password:"",auth_params:{}}),P(null)},children:"Cancel"})]})]})]})]})]})})}exports.Link=Lt;
|
|
37
37
|
//# sourceMappingURL=index.cjs.map
|