@cartanova/qgrid-cli 2.15.5 → 2.17.0

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.
Files changed (38) hide show
  1. package/bundle/dist/application/qgrid/qgrid.frame.js +73 -15
  2. package/bundle/dist/application/qgrid/qgrid.types.js +17 -3
  3. package/bundle/dist/utils/providers/grok/grok-types.js +10 -3
  4. package/bundle/dist/utils/providers/grok/grok-voice-client.js +35 -2
  5. package/bundle/dist/utils/speech-alignment.js +129 -0
  6. package/bundle/src/application/qgrid/qgrid.frame.test.ts +76 -1
  7. package/bundle/src/application/qgrid/qgrid.frame.ts +92 -16
  8. package/bundle/src/application/qgrid/qgrid.types.ts +27 -0
  9. package/bundle/src/application/sonamu.generated.http +3 -1
  10. package/bundle/src/utils/providers/grok/grok-types.ts +19 -0
  11. package/bundle/src/utils/providers/grok/grok-voice-client.test.ts +30 -0
  12. package/bundle/src/utils/providers/grok/grok-voice-client.ts +54 -0
  13. package/bundle/src/utils/speech-alignment.test.ts +72 -0
  14. package/bundle/src/utils/speech-alignment.ts +178 -0
  15. package/bundle/web-dist/client/assets/TimedPlayer-cuEgYA3Q.js +1 -0
  16. package/bundle/web-dist/client/assets/{index-Wi8Wxte6.js → index-Cb14ZYfq.js} +3 -3
  17. package/bundle/web-dist/client/assets/index-Co8uAhSV.css +1 -0
  18. package/bundle/web-dist/client/assets/{logs-Bdg3wJV2.js → logs-CSL1j0RN.js} +1 -1
  19. package/bundle/web-dist/client/assets/{monit-DcwHRAKu.js → monit-J69xfniH.js} +1 -1
  20. package/bundle/web-dist/client/assets/{routes-lxVC1DDJ.js → routes-CdWdhivH.js} +1 -1
  21. package/bundle/web-dist/client/assets/{settings-C0VCdd1C.js → settings-BGa41_nL.js} +1 -1
  22. package/bundle/web-dist/client/assets/show-CSpPVL8-.js +2 -0
  23. package/bundle/web-dist/client/assets/{tokens-CNRSm9sc.js → tokens-B9FeVPJk.js} +1 -1
  24. package/bundle/web-dist/client/assets/{use-oauth-login-flow-eQnMzp8A.js → use-oauth-login-flow-Tmy4lKYv.js} +1 -1
  25. package/bundle/web-dist/client/assets/{use-update-token-mutation-KnwyYQjb.js → use-update-token-mutation-CGwI6TU8.js} +1 -1
  26. package/bundle/web-dist/client/assets/voice-BNcGUdUd.js +1 -0
  27. package/bundle/web-dist/client/index.html +2 -2
  28. package/bundle/web-dist/server/assets/TimedPlayer-DAwjkP4z.js +54 -0
  29. package/bundle/web-dist/server/assets/{show-D8r2sVK0.js → show-hBbPOUZD.js} +41 -6
  30. package/bundle/web-dist/server/assets/{voice-C2HfwkGp.js → voice-CHoPEIfo.js} +76 -68
  31. package/bundle/web-dist/server/entry-server.generated.js +3 -3
  32. package/package.json +1 -1
  33. package/skills/qgrid/references/ai-sdk-provider-contract.md +2 -0
  34. package/skills/qgrid/references/grok-runtime.md +6 -0
  35. package/skills/qgrid/references/sonamu-api-web-flow.md +2 -2
  36. package/bundle/web-dist/client/assets/index-DyrPRt6O.css +0 -1
  37. package/bundle/web-dist/client/assets/show-B7QRPxsY.js +0 -2
  38. package/bundle/web-dist/client/assets/voice-BydIuS0A.js +0 -1
@@ -0,0 +1,2 @@
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n}from"./vendor-react-8xo7RSum.js";import{g as r,u as i}from"./vendor-tanstack-6B86itGS.js";import{C as a,S as o,_ as s,c,d as l,f as u,g as d,h as f,m as p,p as m,s as h,t as g,v as _,y as v}from"./index-Cb14ZYfq.js";import{n as y,t as b}from"./cost-CZzlCFS2.js";import{n as x,t as S}from"./request-model-Dl31cZdf.js";import{t as C}from"./TimedPlayer-cuEgYA3Q.js";function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},w.apply(null,arguments)}function T(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var E=e(t()),D=n(),ee={},te=(0,E.createContext)(ee),ne=(e,t)=>w({},e,t),re=()=>(0,E.useContext)(te),O=(0,E.createContext)(()=>{});O.displayName=`JVR.DispatchShowTools`;function ie(){return(0,E.useReducer)(ne,ee)}function ae(){return(0,E.useContext)(O)}var oe=e=>{var{initial:t,dispatch:n,children:r}=e;return(0,D.jsx)(te.Provider,{value:t,children:(0,D.jsx)(O.Provider,{value:n,children:r})})};oe.displayName=`JVR.ShowTools`;var se={},ce=(0,E.createContext)(se),le=(e,t)=>w({},e,t),k=()=>(0,E.useContext)(ce),ue=(0,E.createContext)(()=>{});ue.displayName=`JVR.DispatchExpands`;function de(){return(0,E.useReducer)(le,se)}function fe(){return(0,E.useContext)(ue)}var pe=e=>{var{initial:t,dispatch:n,children:r}=e;return(0,D.jsx)(ce.Provider,{value:t,children:(0,D.jsx)(ue.Provider,{value:n,children:r})})};pe.displayName=`JVR.Expands`;var me={Str:{as:`span`,"data-type":`string`,style:{color:`var(--w-rjv-type-string-color, #cb4b16)`},className:`w-rjv-type`,children:`string`},Url:{as:`a`,style:{color:`var(--w-rjv-type-url-color, #0969da)`},"data-type":`url`,className:`w-rjv-type`,children:`url`},Undefined:{style:{color:`var(--w-rjv-type-undefined-color, #586e75)`},as:`span`,"data-type":`undefined`,className:`w-rjv-type`,children:`undefined`},Null:{style:{color:`var(--w-rjv-type-null-color, #d33682)`},as:`span`,"data-type":`null`,className:`w-rjv-type`,children:`null`},Map:{style:{color:`var(--w-rjv-type-map-color, #268bd2)`,marginRight:3},as:`span`,"data-type":`map`,className:`w-rjv-type`,children:`Map`},Nan:{style:{color:`var(--w-rjv-type-nan-color, #859900)`},as:`span`,"data-type":`nan`,className:`w-rjv-type`,children:`NaN`},Bigint:{style:{color:`var(--w-rjv-type-bigint-color, #268bd2)`},as:`span`,"data-type":`bigint`,className:`w-rjv-type`,children:`bigint`},Int:{style:{color:`var(--w-rjv-type-int-color, #268bd2)`},as:`span`,"data-type":`int`,className:`w-rjv-type`,children:`int`},Set:{style:{color:`var(--w-rjv-type-set-color, #268bd2)`,marginRight:3},as:`span`,"data-type":`set`,className:`w-rjv-type`,children:`Set`},Float:{style:{color:`var(--w-rjv-type-float-color, #859900)`},as:`span`,"data-type":`float`,className:`w-rjv-type`,children:`float`},True:{style:{color:`var(--w-rjv-type-boolean-color, #2aa198)`},as:`span`,"data-type":`bool`,className:`w-rjv-type`,children:`bool`},False:{style:{color:`var(--w-rjv-type-boolean-color, #2aa198)`},as:`span`,"data-type":`bool`,className:`w-rjv-type`,children:`bool`},Date:{style:{color:`var(--w-rjv-type-date-color, #268bd2)`},as:`span`,"data-type":`date`,className:`w-rjv-type`,children:`date`}},he=(0,E.createContext)(me),ge=(e,t)=>w({},e,t),A=()=>(0,E.useContext)(he),_e=(0,E.createContext)(()=>{});_e.displayName=`JVR.DispatchTypes`;function ve(){return(0,E.useReducer)(ge,me)}function ye(){return(0,E.useContext)(_e)}function be(e){var{initial:t,dispatch:n,children:r}=e;return(0,D.jsx)(he.Provider,{value:t,children:(0,D.jsx)(_e.Provider,{value:n,children:r})})}be.displayName=`JVR.Types`;var xe=[`style`];function Se(e){var{style:t}=e,n=T(e,xe),r=w({cursor:`pointer`,height:`1em`,width:`1em`,userSelect:`none`,display:`inline-flex`},t);return(0,D.jsx)(`svg`,w({viewBox:`0 0 24 24`,fill:`var(--w-rjv-arrow-color, currentColor)`,style:r},n,{children:(0,D.jsx)(`path`,{d:`M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z`})}))}Se.displayName=`JVR.TriangleArrow`;var Ce={Arrow:{as:`span`,className:`w-rjv-arrow`,style:{transform:`rotate(0deg)`,transition:`all 0.3s`},children:(0,D.jsx)(Se,{})},Colon:{as:`span`,style:{color:`var(--w-rjv-colon-color, var(--w-rjv-color))`,marginLeft:0,marginRight:2},className:`w-rjv-colon`,children:`:`},Quote:{as:`span`,style:{color:`var(--w-rjv-quotes-color, #236a7c)`},className:`w-rjv-quotes`,children:`"`},ValueQuote:{as:`span`,style:{color:`var(--w-rjv-quotes-string-color, #cb4b16)`},className:`w-rjv-quotes`,children:`"`},BracketsLeft:{as:`span`,style:{color:`var(--w-rjv-brackets-color, #236a7c)`},className:`w-rjv-brackets-start`,children:`[`},BracketsRight:{as:`span`,style:{color:`var(--w-rjv-brackets-color, #236a7c)`},className:`w-rjv-brackets-end`,children:`]`},BraceLeft:{as:`span`,style:{color:`var(--w-rjv-curlybraces-color, #236a7c)`},className:`w-rjv-curlybraces-start`,children:`{`},BraceRight:{as:`span`,style:{color:`var(--w-rjv-curlybraces-color, #236a7c)`},className:`w-rjv-curlybraces-end`,children:`}`}},we=(0,E.createContext)(Ce),Te=(e,t)=>w({},e,t),j=()=>(0,E.useContext)(we),Ee=(0,E.createContext)(()=>{});Ee.displayName=`JVR.DispatchSymbols`;function De(){return(0,E.useReducer)(Te,Ce)}function Oe(){return(0,E.useContext)(Ee)}var ke=e=>{var{initial:t,dispatch:n,children:r}=e;return(0,D.jsx)(we.Provider,{value:t,children:(0,D.jsx)(Ee.Provider,{value:n,children:r})})};ke.displayName=`JVR.Symbols`;var Ae={Copied:{className:`w-rjv-copied`,style:{height:`1em`,width:`1em`,cursor:`pointer`,verticalAlign:`middle`,marginLeft:5}},CountInfo:{as:`span`,className:`w-rjv-object-size`,style:{color:`var(--w-rjv-info-color, #0000004d)`,paddingLeft:8,fontStyle:`italic`}},CountInfoExtra:{as:`span`,className:`w-rjv-object-extra`,style:{paddingLeft:8}},Ellipsis:{as:`span`,style:{cursor:`pointer`,color:`var(--w-rjv-ellipsis-color, #cb4b16)`,userSelect:`none`},className:`w-rjv-ellipsis`,children:`...`},Row:{as:`div`,className:`w-rjv-line`},KeyName:{as:`span`,className:`w-rjv-object-key`}},je=(0,E.createContext)(Ae),Me=(e,t)=>w({},e,t),M=()=>(0,E.useContext)(je),N=(0,E.createContext)(()=>{});N.displayName=`JVR.DispatchSection`;function Ne(){return(0,E.useReducer)(Me,Ae)}function Pe(){return(0,E.useContext)(N)}var Fe=e=>{var{initial:t,dispatch:n,children:r}=e;return(0,D.jsx)(je.Provider,{value:t,children:(0,D.jsx)(N.Provider,{value:n,children:r})})};Fe.displayName=`JVR.Section`;var Ie={objectSortKeys:!1,indentWidth:15},P=(0,E.createContext)(Ie);P.displayName=`JVR.Context`;var Le=(0,E.createContext)(()=>{});Le.displayName=`JVR.DispatchContext`;function Re(e,t){return w({},e,t)}var F=()=>(0,E.useContext)(P),ze=e=>{var{children:t,initialState:n,initialTypes:r}=e,[i,a]=(0,E.useReducer)(Re,Object.assign({},Ie,n)),[o,s]=ie(),[c,l]=de(),[u,d]=ve(),[f,p]=De(),[m,h]=Ne();return(0,E.useEffect)(()=>a(w({},n)),[n]),(0,D.jsx)(P.Provider,{value:i,children:(0,D.jsx)(Le.Provider,{value:a,children:(0,D.jsx)(oe,{initial:o,dispatch:s,children:(0,D.jsx)(pe,{initial:c,dispatch:l,children:(0,D.jsx)(be,{initial:w({},u,r),dispatch:d,children:(0,D.jsx)(ke,{initial:f,dispatch:p,children:(0,D.jsx)(Fe,{initial:m,dispatch:h,children:t})})})})})})})};ze.displayName=`JVR.Provider`;function Be(e){if(e==null)throw TypeError(`Cannot destructure `+e)}var Ve=[`isNumber`,`value`,`parentValue`,`keyName`,`keys`],He=[`as`,`render`],Ue=[`as`,`render`],We=[`as`,`render`],Ge=[`as`,`style`,`render`],Ke=[`as`,`render`],qe=[`as`,`render`],Je=[`as`,`render`],Ye=[`as`,`render`],I=e=>{var{Quote:t={}}=j(),{isNumber:n,value:r,parentValue:i,keyName:a,keys:o}=e,s=T(e,Ve);if(n)return null;var{as:c,render:l}=t,u=T(t,He),d=c||`span`,f=w({},s,u);return typeof f.children==`string`&&(f.children=f.children.trim()||void 0),l&&typeof l==`function`&&l(f,{value:r,parentValue:i,keyName:a,keys:o||(a?[a]:[])})||(0,D.jsx)(d,w({},f))};I.displayName=`JVR.Quote`;var L=e=>{var{ValueQuote:t={}}=j(),n=w({},(Be(e),e)),{as:r,render:i}=t,a=T(t,Ue),o=r||`span`,s=w({},n,a);return i&&typeof i==`function`&&i(s,{})||(0,D.jsx)(o,w({},s))};L.displayName=`JVR.ValueQuote`;var Xe=e=>{var{value:t,parentValue:n,keyName:r,keys:i}=e,{Colon:a={}}=j(),{as:o,render:s}=a,c=T(a,We),l=o||`span`;return s&&typeof s==`function`&&s(c,{value:t,parentValue:n,keyName:r,keys:i||(r?[r]:[])})||(0,D.jsx)(l,w({},c))};Xe.displayName=`JVR.Colon`;var Ze=e=>{var{Arrow:t={}}=j(),n=k(),{expandKey:r,style:i,value:a,parentValue:o,keyName:s,keys:c}=e,l=!!n[r],{as:u,style:d,render:f}=t,p=T(t,Ge),m=u||`span`,h=f&&typeof f==`function`,g=w({},p,{"data-expanded":l,style:w({},d,i)});return h&&f(g,{value:a,parentValue:o,keyName:s,keys:c||(s?[s]:[])})||(0,D.jsx)(m,w({},p,{style:w({},d,i)}))};Ze.displayName=`JVR.Arrow`;var Qe=e=>{var{isBrackets:t,value:n,parentValue:r,keyName:i,keys:a}=e,{BracketsLeft:o={},BraceLeft:s={}}=j(),c={value:n,parentValue:r,keyName:i,keys:a||(i?[i]:[])};if(t){var{as:l,render:u}=o,d=T(o,Ke),f=l||`span`;return u&&typeof u==`function`&&u(d,c)||(0,D.jsx)(f,w({},d))}var{as:p,render:m}=s,h=T(s,qe),g=p||`span`;return m&&typeof m==`function`&&m(h,c)||(0,D.jsx)(g,w({},h))};Qe.displayName=`JVR.BracketsOpen`;var R=e=>{var{isBrackets:t,isVisiable:n,value:r,parentValue:i,keyName:a,keys:o}=e,s={value:r,parentValue:i,keyName:a,keys:o||(a?[a]:[])};if(!n)return null;var{BracketsRight:c={},BraceRight:l={}}=j();if(t){var{as:u,render:d}=c,f=T(c,Je),p=u||`span`;return d&&typeof d==`function`&&d(f,s)||(0,D.jsx)(p,w({},f))}var{as:m,render:h}=l,g=T(l,Ye),_=m||`span`;return h&&typeof h==`function`&&h(g,s)||(0,D.jsx)(_,w({},g))};R.displayName=`JVR.BracketsClose`;var $e=e=>{var{keyName:t,value:n,expandKey:r,parentValue:i,level:a,keys:o=[]}=e,s=k(),{collapsed:c,shouldExpandNodeInitially:l}=F(),u=typeof c==`boolean`?c:typeof c==`number`&&a>c,d=s[r]??(!l&&u),f=l&&l(!d,{value:n,keys:o,level:a,keyName:t,parentValue:i});if(l&&c===!1){if(s[r]===void 0&&!f)return null}else if(s[r]===void 0&&f)return null;var p=Object.keys(n).length;if(d||p===0)return null;var m={paddingLeft:4},h={keyName:t,value:n,keys:o,parentValue:i},g=Array.isArray(n),_=n instanceof Set;return(0,D.jsx)(`div`,{style:m,children:(0,D.jsx)(R,w({isBrackets:g||_},h,{isVisiable:!0}))})};$e.displayName=`JVR.NestedClose`;var et=[`as`,`render`],tt=[`as`,`render`],nt=[`as`,`render`],rt=[`as`,`render`],it=[`as`,`render`],at=[`as`,`render`],ot=[`as`,`render`],st=[`as`,`render`],ct=[`as`,`render`],lt=[`as`,`render`],ut=[`as`,`render`],dt=[`as`,`render`],ft=[`as`,`render`],z=e=>{if(e===void 0)return`0n`;if(typeof e==`string`)try{e=BigInt(e)}catch{return`0n`}return e?e.toString()+`n`:`0n`},pt=e=>{var{value:t,keyName:n}=e,{Set:r={},displayDataTypes:i}=A();if(!(t instanceof Set)||!i)return null;var{as:a,render:o}=r,s=T(r,et);return o&&typeof o==`function`&&o(s,{type:`type`,value:t,keyName:n})||(0,D.jsx)(a||`span`,w({},s))};pt.displayName=`JVR.SetComp`;var mt=e=>{var{value:t,keyName:n}=e,{Map:r={},displayDataTypes:i}=A();if(!(t instanceof Map)||!i)return null;var{as:a,render:o}=r,s=T(r,tt);return o&&typeof o==`function`&&o(s,{type:`type`,value:t,keyName:n})||(0,D.jsx)(a||`span`,w({},s))};mt.displayName=`JVR.MapComp`;var B={opacity:.75,paddingRight:4},ht=e=>{var{children:t=``,keyName:n,keys:r}=e,{Str:i={},displayDataTypes:a}=A(),{shortenTextAfterLength:o=30,stringEllipsis:s=`...`}=F(),{as:c,render:l}=i,u=T(i,nt),d=t,[f,p]=(0,E.useState)(o&&d.length>o);(0,E.useEffect)(()=>p(o&&d.length>o),[o]);var m=c||`span`,h=w({},B,i.style||{});o>0&&(u.style=w({},u.style,{cursor:d.length<=o?`initial`:`pointer`}),d.length>o&&(u.onClick=()=>{p(!f)}));var g=f?``+d.slice(0,o)+s:d,_=l&&typeof l==`function`,v=_&&l(w({},u,{style:h}),{type:`type`,value:t,keyName:n,keys:r}),y=f?`w-rjv-value w-rjv-value-short`:`w-rjv-value`,b=_&&l(w({},u,{children:g,className:y}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(v||(0,D.jsx)(m,w({},u,{style:h}))),b||(0,D.jsxs)(E.Fragment,{children:[(0,D.jsx)(L,{}),(0,D.jsx)(m,w({},u,{className:y,children:g})),(0,D.jsx)(L,{})]})]})};ht.displayName=`JVR.TypeString`;var gt=e=>{var{children:t,keyName:n,keys:r}=e,{True:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,rt),l=o||`span`,u=w({},B,i.style||{}),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=d&&s(w({},c,{children:t,className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),p||(0,D.jsx)(l,w({},c,{className:`w-rjv-value`,children:t?.toString()}))]})};gt.displayName=`JVR.TypeTrue`;var _t=e=>{var{children:t,keyName:n,keys:r}=e,{False:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,it),l=o||`span`,u=w({},B,i.style||{}),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=d&&s(w({},c,{children:t,className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),p||(0,D.jsx)(l,w({},c,{className:`w-rjv-value`,children:t?.toString()}))]})};_t.displayName=`JVR.TypeFalse`;var vt=e=>{var{children:t,keyName:n,keys:r}=e,{Float:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,at),l=o||`span`,u=w({},B,i.style||{}),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=d&&s(w({},c,{children:t,className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),p||(0,D.jsx)(l,w({},c,{className:`w-rjv-value`,children:t?.toString()}))]})};vt.displayName=`JVR.TypeFloat`;var yt=e=>{var{children:t,keyName:n,keys:r}=e,{Int:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,ot),l=o||`span`,u=w({},B,i.style||{}),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=d&&s(w({},c,{children:t,className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),p||(0,D.jsx)(l,w({},c,{className:`w-rjv-value`,children:t?.toString()}))]})};yt.displayName=`JVR.TypeInt`;var bt=e=>{var{children:t,keyName:n,keys:r}=e,{Bigint:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,st),l=o||`span`,u=w({},B,i.style||{}),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=d&&s(w({},c,{children:t,className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),p||(0,D.jsx)(l,w({},c,{className:`w-rjv-value`,children:z(t?.toString())}))]})};bt.displayName=`JVR.TypeFloat`;var xt=e=>{var{children:t,keyName:n,keys:r}=e,{Url:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,ct),l=o||`span`,u=w({},B,i.style),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=d&&s(w({},c,{children:t?.href,className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),p||(0,D.jsxs)(`a`,w({href:t?.href,target:`_blank`},c,{className:`w-rjv-value`,children:[(0,D.jsx)(L,{}),t?.href,(0,D.jsx)(L,{})]}))]})};xt.displayName=`JVR.TypeUrl`;var St=e=>{var{children:t,keyName:n,keys:r}=e,{Date:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,lt),l=o||`span`,u=w({},B,i.style||{}),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=t instanceof Date?t.toLocaleString():t,m=d&&s(w({},c,{children:p,className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),m||(0,D.jsx)(l,w({},c,{className:`w-rjv-value`,children:p}))]})};St.displayName=`JVR.TypeDate`;var Ct=e=>{var{children:t,keyName:n,keys:r}=e,{Undefined:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,ut),l=o||`span`,u=w({},B,i.style||{}),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=d&&s(w({},c,{children:t,className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),p]})};Ct.displayName=`JVR.TypeUndefined`;var wt=e=>{var{children:t,keyName:n,keys:r}=e,{Null:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,dt),l=o||`span`,u=w({},B,i.style||{}),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=d&&s(w({},c,{children:t,className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),p]})};wt.displayName=`JVR.TypeNull`;var Tt=e=>{var{children:t,keyName:n,keys:r}=e,{Nan:i={},displayDataTypes:a}=A(),{as:o,render:s}=i,c=T(i,ft),l=o||`span`,u=w({},B,i.style||{}),d=s&&typeof s==`function`,f=d&&s(w({},c,{style:u}),{type:`type`,value:t,keyName:n,keys:r}),p=d&&s(w({},c,{children:t?.toString(),className:`w-rjv-value`}),{type:`value`,value:t,keyName:n,keys:r});return(0,D.jsxs)(E.Fragment,{children:[a&&(f||(0,D.jsx)(l,w({},c,{style:u}))),p]})};Tt.displayName=`JVR.TypeNan`;var Et=e=>Number(e)===e&&e%1!=0||isNaN(e),Dt=e=>{var{value:t,keyName:n,keys:r}=e,i={keyName:n,keys:r};return t instanceof URL?(0,D.jsx)(xt,w({},i,{children:t})):typeof t==`string`?(0,D.jsx)(ht,w({},i,{children:t})):t===!0?(0,D.jsx)(gt,w({},i,{children:t})):t===!1?(0,D.jsx)(_t,w({},i,{children:t})):t===null?(0,D.jsx)(wt,w({},i,{children:t})):t===void 0?(0,D.jsx)(Ct,w({},i,{children:t})):t instanceof Date?(0,D.jsx)(St,w({},i,{children:t})):typeof t==`number`&&isNaN(t)?(0,D.jsx)(Tt,w({},i,{children:t})):typeof t==`number`&&Et(t)?(0,D.jsx)(vt,w({},i,{children:t})):typeof t==`bigint`?(0,D.jsx)(bt,w({},i,{children:t})):typeof t==`number`?(0,D.jsx)(yt,w({},i,{children:t})):null};Dt.displayName=`JVR.Value`;function V(e,t,n){var r=Oe(),i=[e.className,t.className].filter(Boolean).join(` `),a=w({},e,t,{className:i,style:w({},e.style,t.style),children:t.children||e.children});(0,E.useEffect)(()=>r({[n]:a}),[t])}function H(e,t,n){var r=ye(),i=[e.className,t.className].filter(Boolean).join(` `),a=w({},e,t,{className:i,style:w({},e.style,t.style),children:t.children||e.children});(0,E.useEffect)(()=>r({[n]:a}),[t])}function U(e,t,n){var r=Pe(),i=[e.className,t.className].filter(Boolean).join(` `),a=w({},e,t,{className:i,style:w({},e.style,t.style),children:t.children||e.children});(0,E.useEffect)(()=>r({[n]:a}),[t])}var Ot=[`as`,`render`],kt=e=>{var{KeyName:t={}}=M();return U(t,e,`KeyName`),null};kt.displayName=`JVR.KeyName`;var At=e=>{var{children:t,value:n,parentValue:r,keyName:i,keys:a}=e,o={color:typeof t==`number`?`var(--w-rjv-key-number, #268bd2)`:`var(--w-rjv-key-string, #002b36)`},{KeyName:s={}}=M(),{as:c,render:l}=s,u=T(s,Ot);u.style=w({},u.style,o);var d=c||`span`;return l&&typeof l==`function`&&l(w({},u,{children:t}),{value:n,parentValue:r,keyName:i,keys:a||(i?[i]:[])})||(0,D.jsx)(d,w({},u,{children:t}))};At.displayName=`JVR.KeyNameComp`;var jt=[`children`,`value`,`parentValue`,`keyName`,`keys`],Mt=[`as`,`render`,`children`],Nt=e=>{var{Row:t={}}=M();return U(t,e,`Row`),null};Nt.displayName=`JVR.Row`;var Pt=e=>{var{children:t,value:n,parentValue:r,keyName:i,keys:a}=e,o=T(e,jt),{Row:s={}}=M(),{as:c,render:l}=s,u=T(s,Mt),d=c||`div`;return l&&typeof l==`function`&&l(w({},o,u,{children:t}),{value:n,keyName:i,parentValue:r,keys:a})||(0,D.jsx)(d,w({},o,u,{children:t}))};Pt.displayName=`JVR.RowComp`;function Ft(e){var t=(0,E.useRef)();return(0,E.useEffect)(()=>{t.current=e}),t.current}function It(e){var{value:t,highlightUpdates:n,highlightContainer:r}=e,i=Ft(t),a=(0,E.useMemo)(()=>{if(!n||i===void 0)return!1;if(typeof t!=typeof i)return!0;if(typeof t==`number`)return isNaN(t)&&isNaN(i)?!1:t!==i;if(Array.isArray(t)!==Array.isArray(i))return!0;if(typeof t==`object`||typeof t==`function`)return!1;if(t!==i)return!0},[n,t]);(0,E.useEffect)(()=>{r&&r.current&&a&&`animate`in r.current&&r.current.animate([{backgroundColor:`var(--w-rjv-update-color, #ebcb8b)`},{backgroundColor:``}],{duration:1e3,easing:`ease-in`})},[a,t,r])}var Lt=[`keyName`,`value`,`parentValue`,`expandKey`,`keys`,`beforeCopy`],Rt=[`as`,`render`],zt=e=>{var{keyName:t,value:n,parentValue:r,expandKey:i,keys:a,beforeCopy:o}=e,s=T(e,Lt),{onCopied:c,enableClipboard:l,beforeCopy:u}=F(),d=re()[i],[f,p]=(0,E.useState)(!1),{Copied:m={}}=M(),h=m?.beforeCopy;if(l===!1||!d)return null;var g={style:{display:`inline-flex`},fill:f?`var(--w-rjv-copied-success-color, #28a745)`:`var(--w-rjv-copied-color, currentColor)`,onClick:e=>{e.stopPropagation();var s=``;s=typeof n==`number`&&n===1/0?`Infinity`:typeof n==`number`&&isNaN(n)?`NaN`:typeof n==`bigint`?z(n):n instanceof Date?n.toLocaleString():JSON.stringify(n,(e,t)=>typeof t==`bigint`?z(t):t,2);var l=o||h||u;l&&typeof l==`function`&&(s=l(s,t,n,r,i,a)),c&&c(s,n),p(!0),(navigator.clipboard||{writeText(e){return new Promise((t,n)=>{var r=document.createElement(`textarea`);r.style.position=`absolute`,r.style.opacity=`0`,r.style.left=`-99999999px`,r.value=e,document.body.appendChild(r),r.select(),document.execCommand(`copy`)?t():n(),r.remove()})}}).writeText(s).then(()=>{var e=setTimeout(()=>{p(!1),clearTimeout(e)},3e3)}).catch(e=>{})}},{render:_}=m,v=T(m,Rt),y=w({},v,s,g,{style:w({},v.style,s.style,g.style)});return _&&typeof _==`function`&&_(w({},y,{"data-copied":f}),{value:n,keyName:t,keys:a,parentValue:r})||(f?(0,D.jsx)(`svg`,w({viewBox:`0 0 32 36`},y,{children:(0,D.jsx)(`path`,{d:`M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z`})})):(0,D.jsx)(`svg`,w({viewBox:`0 0 32 36`},y,{children:(0,D.jsx)(`path`,{d:`M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z`})})))};zt.displayName=`JVR.Copied`;function Bt(){var e=(0,E.useRef)(null);return e.current===null&&(e.current=`custom-id-`+Math.random().toString(36).substr(2,9)),e.current}var Vt=e=>{var{keyName:t,value:n,expandKey:r=``,level:i,keys:a=[],parentValue:o}=e,s=k(),{objectSortKeys:c,indentWidth:l,collapsed:u,shouldExpandNodeInitially:d}=F(),f=typeof u==`boolean`?u:typeof u==`number`&&i>u,p=s[r]??(!d&&f),m=d&&d(!p,{value:n,keys:a,level:i,keyName:t,parentValue:o});if(d&&u===!1){if(s[r]===void 0&&!m)return null}else if(s[r]===void 0&&m)return null;if(p)return null;var h=Array.isArray(n)?Object.entries(n).map(e=>[Number(e[0]),e[1]]):Object.entries(n);return c&&(h=c===!0?h.sort((e,t)=>{var[n]=e,[r]=t;return typeof n==`string`&&typeof r==`string`?n.localeCompare(r):0}):h.sort((e,t)=>{var[n,r]=e,[i,a]=t;return typeof n==`string`&&typeof i==`string`?c(n,i,r,a):0})),(0,D.jsx)(`div`,{className:`w-rjv-wrap`,style:{borderLeft:`var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)`,paddingLeft:l,marginLeft:6},children:h.map((e,t)=>{var[r,o]=e;return(0,D.jsx)(Ut,{parentValue:n,keyName:r,keys:[...a,r],value:o,level:i},t)})})};Vt.displayName=`JVR.KeyValues`;var Ht=e=>{var{keyName:t,parentValue:n,keys:r,value:i}=e,{highlightUpdates:a}=F(),o=typeof t==`number`,s=(0,E.useRef)(null);It({value:i,highlightUpdates:a,highlightContainer:s});var c={keyName:t,value:i,keys:r,parentValue:n};return(0,D.jsxs)(E.Fragment,{children:[(0,D.jsxs)(`span`,{ref:s,children:[(0,D.jsx)(I,w({isNumber:o,"data-placement":`left`},c)),(0,D.jsx)(At,w({},c,{children:t})),(0,D.jsx)(I,w({isNumber:o,"data-placement":`right`},c))]}),(0,D.jsx)(Xe,w({},c))]})};Ht.displayName=`JVR.KayName`;var Ut=e=>{var{keyName:t,value:n,parentValue:r,level:i=0,keys:a=[]}=e,o=ae(),s=Bt(),c=Array.isArray(n),l=n instanceof Set,u=n instanceof Map,d=n instanceof Date,f=n instanceof URL;if(n&&typeof n==`object`&&!c&&!l&&!u&&!d&&!f||c||l||u){var p=l?Array.from(n):u?Object.fromEntries(n):n;return(0,D.jsx)(rn,{keyName:t,value:p,parentValue:r,initialValue:n,keys:a,level:i+1})}return(0,D.jsxs)(Pt,w({className:`w-rjv-line`,value:n,keyName:t,keys:a,parentValue:r},{onMouseEnter:()=>o({[s]:!0}),onMouseLeave:()=>o({[s]:!1})},{children:[(0,D.jsx)(Ht,{keyName:t,value:n,keys:a,parentValue:r}),(0,D.jsx)(Dt,{keyName:t,value:n,keys:a}),(0,D.jsx)(zt,{keyName:t,value:n,keys:a,parentValue:r,expandKey:s})]}))};Ut.displayName=`JVR.KeyValuesItem`;var Wt=[`value`,`keyName`],Gt=[`as`,`render`],Kt=e=>{var{CountInfoExtra:t={}}=M();return U(t,e,`CountInfoExtra`),null};Kt.displayName=`JVR.CountInfoExtra`;var qt=e=>{var{value:t={},keyName:n}=e,r=T(e,Wt),{CountInfoExtra:i={}}=M(),{as:a,render:o}=i,s=T(i,Gt);if(!o&&!s.children)return null;var c=a||`span`,l=o&&typeof o==`function`,u=w({},s,r);return l&&o(u,{value:t,keyName:n})||(0,D.jsx)(c,w({},u))};qt.displayName=`JVR.CountInfoExtraComps`;var Jt=[`value`,`keyName`],Yt=[`as`,`render`],Xt=e=>{var{CountInfo:t={}}=M();return U(t,e,`CountInfo`),null};Xt.displayName=`JVR.CountInfo`;var Zt=e=>{var{value:t={},keyName:n}=e,r=T(e,Jt),{displayObjectSize:i}=F(),{CountInfo:a={}}=M();if(!i)return null;var{as:o,render:s}=a,c=T(a,Yt),l=o||`span`;c.style=w({},c.style,e.style);var u=Object.keys(t).length;c.children||=u+` item`+(u===1?``:`s`);var d=w({},c,r);return s&&typeof s==`function`&&s(w({},d,{"data-length":u}),{value:t,keyName:n})||(0,D.jsx)(l,w({},d))};Zt.displayName=`JVR.CountInfoComp`;var Qt=[`as`,`render`],$t=e=>{var{Ellipsis:t={}}=M();return U(t,e,`Ellipsis`),null};$t.displayName=`JVR.Ellipsis`;var en=e=>{var{isExpanded:t,value:n,keyName:r}=e,{Ellipsis:i={}}=M(),{as:a,render:o}=i,s=T(i,Qt),c=a||`span`;return o&&typeof o==`function`&&o(w({},s,{"data-expanded":t}),{value:n,keyName:r})||(!t||typeof n==`object`&&Object.keys(n).length==0?null:(0,D.jsx)(c,w({},s)))};en.displayName=`JVR.EllipsisComp`;var tn=e=>{var{keyName:t,expandKey:n,keys:r=[],initialValue:i,value:a,parentValue:o,level:s}=e,c=k(),l=fe(),{onExpand:u,collapsed:d,shouldExpandNodeInitially:f}=F(),p=typeof d==`boolean`?d:typeof d==`number`&&s>d,m=c[n]??(!f&&p),h=f&&f(!m,{value:a,keys:r,level:s,keyName:t,parentValue:o});c[n]===void 0&&f&&(m=!h);var g=()=>{var e={expand:!m,value:a,keyid:n,keyName:t};u&&u(e),l({[n]:e.expand})},_={display:`inline-flex`,alignItems:`center`},v={transform:`rotate(`+(m?`-90`:`0`)+`deg)`,transition:`all 0.3s`},y=Object.keys(a).length,b=typeof a==`object`,x=Array.isArray(a),S=a instanceof Set,C=y!==0&&(x||S||b),T={style:_};C&&(T.onClick=g);var E={keyName:t,value:a,keys:r,parentValue:o};return(0,D.jsxs)(`span`,w({},T,{children:[C&&(0,D.jsx)(Ze,w({style:v,expandKey:n},E)),(t||typeof t==`number`)&&(0,D.jsx)(Ht,w({},E)),(0,D.jsx)(pt,{value:i,keyName:t}),(0,D.jsx)(mt,{value:i,keyName:t}),(0,D.jsx)(Qe,w({isBrackets:x||S},E)),(0,D.jsx)(en,{keyName:t,value:a,isExpanded:m}),(0,D.jsx)(R,w({isVisiable:m||!C,isBrackets:x||S},E)),(0,D.jsx)(Zt,{value:a,keyName:t}),(0,D.jsx)(qt,{value:a,keyName:t}),(0,D.jsx)(zt,{keyName:t,value:a,expandKey:n,parentValue:o,keys:r})]}))};tn.displayName=`JVR.NestedOpen`;var nn=[`className`,`children`,`parentValue`,`keyid`,`level`,`value`,`initialValue`,`keys`,`keyName`],rn=(0,E.forwardRef)((e,t)=>{var{className:n=``,parentValue:r,level:i=1,value:a,initialValue:o,keys:s,keyName:c}=e,l=T(e,nn),u=ae(),d=Bt(),f=[n,`w-rjv-inner`].filter(Boolean).join(` `);return(0,D.jsxs)(`div`,w({className:f,ref:t},l,{onMouseEnter:()=>u({[d]:!0}),onMouseLeave:()=>u({[d]:!1})},{children:[(0,D.jsx)(tn,{expandKey:d,value:a,level:i,keys:s,parentValue:r,keyName:c,initialValue:o}),(0,D.jsx)(Vt,{expandKey:d,value:a,level:i,keys:s,parentValue:r,keyName:c}),(0,D.jsx)($e,{expandKey:d,value:a,level:i,keys:s,parentValue:r,keyName:c})]}))});rn.displayName=`JVR.Container`;var an=e=>{var{BraceLeft:t={}}=j();return V(t,e,`BraceLeft`),null};an.displayName=`JVR.BraceLeft`;var on=e=>{var{BraceRight:t={}}=j();return V(t,e,`BraceRight`),null};on.displayName=`JVR.BraceRight`;var sn=e=>{var{BracketsLeft:t={}}=j();return V(t,e,`BracketsLeft`),null};sn.displayName=`JVR.BracketsLeft`;var cn=e=>{var{BracketsRight:t={}}=j();return V(t,e,`BracketsRight`),null};cn.displayName=`JVR.BracketsRight`;var ln=e=>{var{Arrow:t={}}=j();return V(t,e,`Arrow`),null};ln.displayName=`JVR.Arrow`;var un=e=>{var{Colon:t={}}=j();return V(t,e,`Colon`),null};un.displayName=`JVR.Colon`;var dn=e=>{var{Quote:t={}}=j();return V(t,e,`Quote`),null};dn.displayName=`JVR.Quote`;var fn=e=>{var{ValueQuote:t={}}=j();return V(t,e,`ValueQuote`),null};fn.displayName=`JVR.ValueQuote`;var pn=e=>{var{Bigint:t={}}=A();return H(t,e,`Bigint`),null};pn.displayName=`JVR.Bigint`;var mn=e=>{var{Date:t={}}=A();return H(t,e,`Date`),null};mn.displayName=`JVR.Date`;var hn=e=>{var{False:t={}}=A();return H(t,e,`False`),null};hn.displayName=`JVR.False`;var gn=e=>{var{Float:t={}}=A();return H(t,e,`Float`),null};gn.displayName=`JVR.Float`;var _n=e=>{var{Int:t={}}=A();return H(t,e,`Int`),null};_n.displayName=`JVR.Int`;var vn=e=>{var{Map:t={}}=A();return H(t,e,`Map`),null};vn.displayName=`JVR.Map`;var yn=e=>{var{Nan:t={}}=A();return H(t,e,`Nan`),null};yn.displayName=`JVR.Nan`;var bn=e=>{var{Null:t={}}=A();return H(t,e,`Null`),null};bn.displayName=`JVR.Null`;var xn=e=>{var{Set:t={}}=A();return H(t,e,`Set`),null};xn.displayName=`JVR.Set`;var Sn=e=>{var{Str:t={}}=A();return H(t,e,`Str`),null};Sn.displayName=`JVR.StringText`;var Cn=e=>{var{True:t={}}=A();return H(t,e,`True`),null};Cn.displayName=`JVR.True`;var wn=e=>{var{Undefined:t={}}=A();return H(t,e,`Undefined`),null};wn.displayName=`JVR.Undefined`;var Tn=e=>{var{Url:t={}}=A();return H(t,e,`Url`),null};Tn.displayName=`JVR.Url`;var En=e=>{var{Copied:t={}}=M();return U(t,e,`Copied`),null};En.displayName=`JVR.Copied`;var Dn=[`className`,`style`,`value`,`children`,`collapsed`,`shouldExpandNodeInitially`,`indentWidth`,`displayObjectSize`,`shortenTextAfterLength`,`stringEllipsis`,`highlightUpdates`,`enableClipboard`,`displayDataTypes`,`objectSortKeys`,`onExpand`,`onCopied`,`beforeCopy`],W=(0,E.forwardRef)((e,t)=>{var{className:n=``,style:r,value:i,children:a,collapsed:o=!1,shouldExpandNodeInitially:s,indentWidth:c=15,displayObjectSize:l=!0,shortenTextAfterLength:u=30,stringEllipsis:d,highlightUpdates:f=!0,enableClipboard:p=!0,displayDataTypes:m=!0,objectSortKeys:h=!1,onExpand:g,onCopied:_,beforeCopy:v}=e,y=T(e,Dn),b=w({lineHeight:1.4,fontFamily:`var(--w-rjv-font-family, Menlo, monospace)`,color:`var(--w-rjv-color, #002b36)`,backgroundColor:`var(--w-rjv-background-color, #00000000)`,fontSize:13},r),x=[`w-json-view-container`,`w-rjv`,n].filter(Boolean).join(` `);return(0,D.jsxs)(ze,{initialState:{value:i,objectSortKeys:h,indentWidth:c,shouldExpandNodeInitially:o===!1?s:void 0,displayObjectSize:l,collapsed:o,enableClipboard:p,shortenTextAfterLength:u,stringEllipsis:d,highlightUpdates:f,onCopied:_,onExpand:g,beforeCopy:v},initialTypes:{displayDataTypes:m},children:[(0,D.jsx)(rn,w({value:i},y,{ref:t,className:x,style:b})),a]})});W.Bigint=pn,W.Date=mn,W.False=hn,W.Float=gn,W.Int=_n,W.Map=vn,W.Nan=yn,W.Null=bn,W.Set=xn,W.String=Sn,W.True=Cn,W.Undefined=wn,W.Url=Tn,W.ValueQuote=fn,W.Arrow=ln,W.Colon=un,W.Quote=dn,W.Ellipsis=$t,W.BraceLeft=an,W.BraceRight=on,W.BracketsLeft=sn,W.BracketsRight=cn,W.Copied=En,W.CountInfo=Xt,W.CountInfoExtra=Kt,W.KeyName=kt,W.Row=Nt,W.displayName=`JVR.JsonView`;var On={"--w-rjv-font-family":`monospace`,"--w-rjv-color":`#002b36`,"--w-rjv-key-string":`#002b36`,"--w-rjv-background-color":`#ffffff`,"--w-rjv-line-color":`#ebebeb`,"--w-rjv-arrow-color":`var(--w-rjv-color)`,"--w-rjv-edit-color":`var(--w-rjv-color)`,"--w-rjv-info-color":`#0000004d`,"--w-rjv-update-color":`#ebcb8b`,"--w-rjv-copied-color":`#002b36`,"--w-rjv-copied-success-color":`#28a745`,"--w-rjv-curlybraces-color":`#236a7c`,"--w-rjv-colon-color":`#002b36`,"--w-rjv-brackets-color":`#236a7c`,"--w-rjv-quotes-color":`var(--w-rjv-key-string)`,"--w-rjv-quotes-string-color":`var(--w-rjv-type-string-color)`,"--w-rjv-type-string-color":`#cb4b16`,"--w-rjv-type-int-color":`#268bd2`,"--w-rjv-type-float-color":`#859900`,"--w-rjv-type-bigint-color":`#268bd2`,"--w-rjv-type-boolean-color":`#2aa198`,"--w-rjv-type-date-color":`#586e75`,"--w-rjv-type-url-color":`#0969da`,"--w-rjv-type-null-color":`#d33682`,"--w-rjv-type-nan-color":`#859900`,"--w-rjv-type-undefined-color":`#586e75`},kn=(0,E.forwardRef)(({title:e,titleId:t,...n},r)=>(0,D.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,D.jsx)(`title`,{id:t,children:e}):null,(0,D.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m12 19l-7-7l7-7m7 7H5`})]})),An=(0,E.forwardRef)(({title:e,titleId:t,...n},r)=>(0,D.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,D.jsx)(`title`,{id:t,children:e}):null,(0,D.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M20 6L9 17l-5-5`})]})),G=(0,E.forwardRef)(({title:e,titleId:t,...n},r)=>(0,D.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,D.jsx)(`title`,{id:t,children:e}):null,(0,D.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`m6 9l6 6l6-6`})]})),jn=(0,E.forwardRef)(({title:e,titleId:t,...n},r)=>(0,D.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,D.jsx)(`title`,{id:t,children:e}):null,(0,D.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,D.jsx)(`rect`,{width:14,height:14,x:8,y:8,rx:2,ry:2}),(0,D.jsx)(`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`})]})]}));function Mn(){let{id:e}=g.useSearch();return(0,D.jsx)(Er,{id:e})}function K(e){return e.toLocaleString()}var Nn=new Set,q=m();function Pn(e){try{return{ok:!0,value:q.parse(JSON.parse(e))}}catch{return{ok:!1}}}function J(e){if(!e)return{};try{return q.parse(JSON.parse(e))}catch{return e}}function Y({text:e,dark:t}){let[n,r]=(0,E.useState)(!1);return(0,E.useEffect)(()=>{if(!n)return;let e=setTimeout(()=>r(!1),1500);return()=>clearTimeout(e)},[n]),(0,D.jsx)(`button`,{type:`button`,className:`absolute top-2 right-2 p-1 rounded transition-colors ${t?`text-sand-500 hover:text-sand-300`:`text-sand-400 hover:text-sand-600`}`,onClick:()=>{navigator.clipboard.writeText(e),r(!0)},children:n?(0,D.jsx)(An,{className:`size-3.5 text-sage-500`}):(0,D.jsx)(jn,{className:`size-3.5`})})}var Fn=/<img\s+[^>]*src=["'](data:image\/[^"']+;base64,[^"']+)["'][^>]*(?:alt=["']([^"']*)["'][^>]*)?\/?>|<audio\s+[^>]*src=["'](data:audio\/[^"']+;base64,[^"']+)["'][^>]*>(?:<\/audio>)?/gi;function In(e){let t=[],n=0;for(let r of e.matchAll(Fn)){let i=r.index??0;i>n&&t.push({type:`text`,text:e.slice(n,i)}),t.push(r[3]?{type:`audio`,src:r[3]}:{type:`image`,src:r[1],alt:r[2]??`generated image`}),n=i+r[0].length}return n<e.length&&t.push({type:`text`,text:e.slice(n)}),t.filter(e=>e.type!==`text`||e.text.trim().length>0)}function Ln({text:e,markdown:t,audioWords:n}){let[r,i]=(0,E.useState)(null),s=In(e);return s.some(e=>e.type!==`text`)?(0,D.jsxs)(`div`,{className:`space-y-3`,children:[s.map((e,r)=>e.type===`text`?t?(0,D.jsx)(`div`,{className:`prose prose-sm prose-qgrid max-w-none`,children:(0,D.jsx)(a,{remarkPlugins:[o],children:e.text})},`text-${r}`):(0,D.jsx)(`pre`,{className:`text-sm text-sand-800 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed`,children:e.text},`text-${r}`):e.type===`audio`?n?(0,D.jsx)(`div`,{className:`flex max-w-xl flex-col gap-2`,children:(0,D.jsx)(C,{src:e.src,words:n,className:`w-full max-w-md`})},`audio-${r}`):(0,D.jsx)(`audio`,{controls:!0,src:e.src,className:`w-full max-w-md`},`audio-${r}`):(0,D.jsx)(`button`,{type:`button`,className:`block max-w-full rounded-md border border-sand-200 overflow-hidden bg-white hover:border-sienna-300 transition-colors`,onClick:()=>i(e.src),title:`Open image`,children:(0,D.jsx)(`img`,{src:e.src,alt:e.alt,className:`max-h-[520px] max-w-full object-contain`,loading:`lazy`})},`image-${r}`)),r&&(0,D.jsxs)(`div`,{className:`fixed inset-0 z-50 bg-black/70 p-4 flex items-center justify-center`,onClick:e=>{e.target===e.currentTarget&&i(null)},children:[(0,D.jsx)(`button`,{type:`button`,className:`absolute top-4 right-4 p-2 rounded-full bg-white/90 text-sand-700 hover:bg-white`,onClick:()=>i(null),title:`Close image`,children:(0,D.jsx)(v,{className:`size-5`})}),(0,D.jsx)(`img`,{src:r,alt:`generated preview`,className:`max-h-full max-w-full object-contain rounded-md bg-white`})]})]}):t?(0,D.jsx)(`div`,{className:`prose prose-sm prose-qgrid max-w-none`,children:(0,D.jsx)(a,{remarkPlugins:[o],children:e})}):(0,D.jsx)(`pre`,{className:`text-sm text-sand-800 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed`,children:e})}function X({text:e,markdown:t,audioWords:n}){let r=Pn(e),[i,a]=(0,E.useState)(`pretty`),o=r.ok&&r.value instanceof Object?r.value:null;return!r.ok||o===null?t?(0,D.jsx)(Ln,{text:e,markdown:!0,audioWords:n}):(0,D.jsx)(Ln,{text:r.ok?JSON.stringify(r.value,null,2):e}):(0,D.jsxs)(`div`,{children:[(0,D.jsxs)(`div`,{className:`flex gap-1 mb-2`,children:[(0,D.jsx)(`button`,{type:`button`,className:`px-2 py-0.5 text-[10px] rounded-md transition-colors ${i===`plain`?`bg-sand-200 text-sand-700`:`text-sand-400 hover:text-sand-600`}`,onClick:()=>a(`plain`),children:`Plain`}),(0,D.jsx)(`button`,{type:`button`,className:`px-2 py-0.5 text-[10px] rounded-md transition-colors ${i===`pretty`?`bg-sand-200 text-sand-700`:`text-sand-400 hover:text-sand-600`}`,onClick:()=>a(`pretty`),children:`Pretty`})]}),i===`pretty`?(0,D.jsx)(W,{value:o,style:On,displayDataTypes:!1,enableClipboard:!0,collapsed:!1}):(0,D.jsx)(`pre`,{className:`text-sm text-sand-800 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed`,children:JSON.stringify(r.value,null,2)})]})}function Z({title:e,defaultOpen:t=!0,headerMetadata:n,onOpenChange:r,children:i}){let[a,o]=(0,E.useState)(t);return(0,D.jsxs)(`details`,{open:a,className:`group panel overflow-hidden`,onToggle:e=>{let t=e.currentTarget.open;o(t),r?.(t)},children:[(0,D.jsxs)(`summary`,{className:`panel-header flex min-w-0 items-center gap-1.5 whitespace-nowrap cursor-pointer select-none list-none px-4 py-2.5`,children:[(0,D.jsx)(G,{className:`size-3.5 shrink-0 text-sand-400 transition-transform group-open:rotate-0 -rotate-90`}),(0,D.jsx)(`span`,{className:`shrink-0 text-[11px] uppercase tracking-wider text-sand-500 font-medium`,children:e}),n&&(0,D.jsx)(`span`,{className:`flex min-w-0 flex-1 items-center gap-1.5 overflow-hidden whitespace-nowrap text-[11px] normal-case text-sand-400`,children:n})]}),(0,D.jsx)(`div`,{className:`p-4`,children:i})]})}function Q({label:e,value:t}){return(0,D.jsxs)(`div`,{className:`min-w-0`,children:[(0,D.jsx)(`dt`,{className:`text-[10px] uppercase tracking-wider text-sand-400 font-medium truncate`,children:e}),(0,D.jsx)(`dd`,{className:`text-[15px] font-semibold text-sand-800 tabular-nums mt-0.5 truncate`,children:t})]})}var Rn=new Map([[`running`,`bg-blue-100 text-blue-600`],[`succeeded`,`bg-sage-100 text-sage-600`],[`error`,`bg-red-100 text-red-600`],[`aborted`,`bg-caution-400/15 text-caution-500`]]);function zn({message:e}){return(0,D.jsxs)(`div`,{className:`panel overflow-hidden border border-red-200 bg-red-50/60`,children:[(0,D.jsx)(`div`,{className:`px-4 py-2.5 border-b border-red-100 flex items-center gap-1.5`,children:(0,D.jsx)(`span`,{className:`text-[11px] uppercase tracking-wider text-red-600 font-medium`,children:`Error`})}),(0,D.jsx)(`div`,{className:`p-4`,children:(0,D.jsx)(`pre`,{className:`text-[12px] text-red-700 whitespace-pre-wrap break-words font-mono leading-relaxed max-h-80 overflow-auto`,children:e})})]})}function Bn({data:e}){let t=e.status===`running`,n=S({status:e.status,requestedModel:e.requested_model_name,servedModel:e.model_name,imageCostMethod:e.image_cost_method}),r=!t&&e.requested_model_name!==null&&e.model_name===null;return(0,D.jsxs)(`div`,{className:`panel overflow-hidden px-4 py-3 flex flex-wrap items-center gap-x-2 gap-y-1.5 sm:px-5`,children:[(0,D.jsx)(`span`,{className:`text-[15px] font-semibold text-sand-900 break-all`,children:n.label===`—`?`Unknown model`:n.label}),r&&(0,D.jsx)(`span`,{className:`text-[10px] text-sand-400`,children:`요청`}),e.service_tier===`fast`&&(0,D.jsx)(`span`,{title:`Fast 모드`,className:`inline-flex shrink-0`,children:(0,D.jsx)(x,{"aria-label":`Fast 모드`,className:`size-3.5 text-[#1877F2] [&_path]:fill-current`})}),!t&&(e.fallback_count??0)>0&&(0,D.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded-full bg-caution-400/15 text-caution-500 font-medium uppercase`,children:[`fallback ×`,e.fallback_count]}),e.status!==`succeeded`&&(0,D.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded-full font-medium uppercase ${Rn.get(e.status)??`bg-sand-100 text-sand-500`}`,children:e.status}),e.response_json_ok===!1&&(0,D.jsx)(`span`,{title:`structured 요청의 응답이 JSON 파싱에 실패했습니다`,className:`text-[10px] px-1.5 py-0.5 rounded-full bg-caution-400/15 text-caution-500 font-medium uppercase`,children:`broken json`}),e.effort&&(0,D.jsxs)(`span`,{className:`text-[11px] px-1.5 py-0.5 rounded-md bg-sand-100 text-sand-500 font-mono`,children:[`effort=`,e.effort]}),e.project_name&&(0,D.jsxs)(`span`,{className:`text-[12px] text-sand-400`,children:[`· project=`,e.project_name]}),(0,D.jsx)(`span`,{className:`ml-auto text-[11px] text-sand-400`,children:e.token_name})]})}function Vn({data:e,toolCallCount:t}){let n=Jn(e);return(0,D.jsxs)(`div`,{className:`panel overflow-hidden px-5 py-3 space-y-3`,children:[(0,D.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-x-6 gap-y-3`,children:[(0,D.jsx)(Q,{label:`Duration`,value:`${(e.duration_ms/1e3).toFixed(1)}s`}),(0,D.jsx)(Q,{label:`TTFT`,value:Kn(e.ttft_ms)}),(0,D.jsx)(Q,{label:`Tokens/sec`,value:Yn(e.output_tokens,e.duration_ms,e.ttft_ms,n)}),(0,D.jsx)(Q,{label:`Driver`,value:e.cost_usd===null?`—`:y(e.cost_usd)}),(0,D.jsx)(Q,{label:`Image`,value:e.image_cost_usd===null?`—`:y(e.image_cost_usd)}),(0,D.jsx)(Q,{label:`Tool Calls`,value:`${t}회`})]}),(0,D.jsxs)(`div`,{className:`border-t border-sand-100/60 pt-3 grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-x-6 gap-y-3`,children:[(0,D.jsx)(Q,{label:`Input`,value:K(e.input_tokens)}),(0,D.jsx)(Q,{label:`Output`,value:K(e.output_tokens)}),(0,D.jsx)(Q,{label:`Cache Read`,value:K(e.cache_read_tokens)}),(0,D.jsx)(Q,{label:`Cache Write`,value:K(e.cache_creation_tokens)}),(0,D.jsx)(Q,{label:`Cache Write (5m)`,value:e.cache_creation_5m_tokens===null?`—`:K(e.cache_creation_5m_tokens)}),(0,D.jsx)(Q,{label:`Cache Write (1h)`,value:e.cache_creation_1h_tokens===null?`—`:K(e.cache_creation_1h_tokens)}),(0,D.jsx)(Q,{label:`Cache Hit`,value:b(e)})]})]})}var Hn=d({mediaType:s().optional(),data:s().optional(),url:s().optional(),byteSize:f().optional()}),Un=p({inputImages:u(q)}),Wn=p({mediaType:q.optional(),byteSize:q.optional(),url:q.optional(),data:q.optional()});function Gn(e){return e==null?`—`:e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`}function Kn(e){return e==null||e<=0?`—`:Gn(e)}function qn(e){let t=e.model_name?.trim().toLowerCase();if(t){let e=t.includes(`/`)?t.split(`/`).pop():t;if(e.startsWith(`claude-`))return`anthropic`;if(/^(gpt-|codex-|o\d)/.test(e))return`openai`;if(e.startsWith(`grok-`))return`grok`}let n=e.token_name?.trim().toLowerCase();return n?.startsWith(`anthropic/`)?`anthropic`:n?.startsWith(`openai/`)?`openai`:n?.startsWith(`grok/`)?`grok`:null}function Jn(e){let t=qn(e);return t!==null&&Nn.has(t)}function Yn(e,t,n,r){if(!r||e==null||t==null||n==null||n<=0)return`—`;let i=t-n;return e<=0||i<=0?`—`:`${Math.round(e/(i/1e3)).toLocaleString()} tok/s`}function $({label:e,value:t}){return(0,D.jsxs)(`div`,{className:`min-w-0 self-end`,children:[e&&(0,D.jsx)(`div`,{className:`text-[10px] uppercase tracking-wider text-sand-400 font-medium truncate`,children:e}),(0,D.jsx)(`div`,{className:`mt-0.5 text-[13px] font-semibold text-sand-800 tabular-nums truncate`,children:t})]})}function Xn(e){let t=Un.safeParse(e);return t.success?t.data.inputImages.flatMap(e=>{let t=Hn.safeParse(e);return t.success&&(t.data.url||t.data.data)?[t.data]:[]}):[]}function Zn(e){let t=Wn.safeParse(e);if(!t.success)return e;let n=t.data,r={};n.mediaType!==void 0&&(r.mediaType=n.mediaType),n.byteSize!==void 0&&(r.byteSize=n.byteSize);let i=s().safeParse(n.url),a=i.success&&i.data.toLowerCase().startsWith(`data:`)?`[data-url ${i.data.length} chars]`:n.url;if(a&&(r.url=a),n.data){let e=s().safeParse(n.data);r.data=e.success?`[base64 ${e.data.length} chars]`:`[base64 data]`}return r}function Qn(e){let t=Un.safeParse(e);return!t.success||!(e instanceof Object)||Array.isArray(e)?e:{...e,inputImages:t.data.inputImages.map(Zn)}}function $n({images:e}){let t=e.map((e,t)=>{let n=e.url&&!e.url.startsWith(`[`)?e.url:void 0,r=e.data?`data:${e.mediaType??`image/png`};base64,${e.data}`:``,i=n??r;return i?{image:e,index:t,src:i}:null}).filter(e=>e!==null);return t.length===0?null:(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-sand-400 font-medium px-2`,children:`Input Images`}),(0,D.jsx)(`div`,{className:`mt-1 grid grid-cols-1 sm:grid-cols-2 gap-2`,children:t.map(({image:e,index:t,src:n})=>(0,D.jsxs)(`div`,{className:`rounded-md border border-sand-200 bg-white overflow-hidden`,children:[(0,D.jsx)(`img`,{src:n,alt:`reference ${t+1}`,className:`max-h-64 w-full object-contain bg-white`,loading:`lazy`}),(0,D.jsxs)(`div`,{className:`px-2 py-1 text-[10px] text-sand-500 font-mono border-t border-sand-100`,children:[e.mediaType??`image`,` ·`,` `,e.byteSize===void 0?`url`:`${e.byteSize.toLocaleString()} bytes`]})]},`${e.mediaType??`image`}-${t}`))})]})}var er=d({words:u(d({text:s(),start:f(),end:f()})).optional()});function tr({text:e,stepId:t}){let{data:n}=c.useRequestLogStep(`A`,t??0,{enabled:t!==null}),r=n?er.safeParse(J(n.tool_result)).data?.words:void 0;return(0,D.jsx)(X,{text:e,markdown:!0,audioWords:r})}function nr({images:e,stepId:t}){let{data:n}=c.useRequestLogStep(`I`,t??0,{enabled:e===null&&t!==null}),r=n?J(n.tool_args):null;return(0,D.jsx)($n,{images:e??Xn(r)})}function rr({entry:e}){let t=!!e.error,[n,r]=(0,E.useState)(!1),{data:i}=c.useRequestLogStep(`A`,e.id,{enabled:n}),a=Qn(i?J(i.tool_args):null),o=i?J(i.tool_result):null,l=s().safeParse(o),u=l.success?l.data:JSON.stringify(o),d=i?.error??e.error;return(0,D.jsxs)(`details`,{className:`group/tool`,onToggle:e=>r(e.currentTarget.open),children:[(0,D.jsxs)(`summary`,{className:`flex items-center gap-2 px-3 py-2 cursor-pointer select-none list-none hover:bg-sand-50 transition-colors rounded-md`,children:[(0,D.jsx)(G,{className:`size-3 text-sand-400 transition-transform group-open/tool:rotate-0 -rotate-90 shrink-0`}),(0,D.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-sand-100 text-sand-500 font-mono shrink-0`,children:[`call `,e.callIndex+1]}),(0,D.jsx)(`span`,{className:`text-[13px] font-medium text-sand-800 font-mono truncate`,children:e.toolName}),t&&(0,D.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded-full bg-red-100 text-red-600 font-medium uppercase shrink-0`,children:`error`}),(0,D.jsx)(`span`,{className:`ml-auto text-[11px] text-sand-400 tabular-nums shrink-0`,children:Gn(e.durationMs)})]}),n&&(0,D.jsxs)(`div`,{className:`mt-1 mx-1 mb-3 space-y-2`,children:[(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-sand-400 font-medium px-2`,children:`Request`}),(0,D.jsx)(`div`,{className:`mt-1 rounded-md bg-sand-50 p-3 overflow-auto`,children:(0,D.jsx)(X,{text:i?JSON.stringify(a):`Loading...`})})]}),d&&(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-red-500 font-medium px-2`,children:`Error`}),(0,D.jsx)(`div`,{className:`mt-1 rounded-md bg-red-50 border border-red-100 p-3 overflow-auto`,children:(0,D.jsx)(X,{text:d})})]}),(0,D.jsxs)(`div`,{children:[(0,D.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-sand-400 font-medium px-2`,children:`Response`}),(0,D.jsx)(`div`,{className:`mt-1 rounded-md bg-sand-50 p-3 overflow-auto`,children:(0,D.jsx)(X,{text:i?u:`Loading...`,markdown:!0})})]})]})]})}function ir({stepId:e}){let[t,n]=(0,E.useState)(!1),{data:r}=c.useRequestLogStep(`A`,e,{enabled:t}),i=r?.reasoning_text??null;return(0,D.jsxs)(`details`,{className:`group/reason mt-3`,onToggle:e=>n(e.currentTarget.open),children:[(0,D.jsxs)(`summary`,{className:`flex items-center gap-2 cursor-pointer select-none list-none`,children:[(0,D.jsx)(G,{className:`size-3 text-sand-400 transition-transform group-open/reason:rotate-0 -rotate-90 shrink-0`}),(0,D.jsx)(`span`,{className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Reasoning`})]}),t&&(0,D.jsx)(`div`,{className:`mt-2 rounded-md bg-white/70 border border-sand-100 p-3 overflow-auto`,children:i?(0,D.jsx)(X,{text:i,markdown:!0}):r?(0,D.jsx)(`p`,{className:`text-sm text-sand-400`,children:`No reasoning text captured.`}):(0,D.jsx)(`p`,{className:`text-sm text-sand-400`,children:`Loading...`})})]})}function ar({entry:e,tokensPerSecEnabled:t}){let n=e.generate,r=n!==null&&n.reasoningTokens!==null&&n.reasoningTokens!==void 0&&n.reasoningTokens>0,i=e.toolCalls.filter(e=>e.error).length;return(0,D.jsxs)(`details`,{open:!0,className:`group/step border-l border-sand-200 pl-3`,children:[(0,D.jsxs)(`summary`,{className:`flex items-center gap-2 py-2 cursor-pointer select-none list-none`,children:[(0,D.jsx)(G,{className:`size-3.5 text-sand-400 transition-transform group-open/step:rotate-0 -rotate-90 shrink-0`}),(0,D.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-sienna-100 text-sienna-700 font-mono shrink-0`,children:[`step `,e.stepIndex+1]}),(0,D.jsx)(`span`,{className:`text-[13px] font-semibold text-sand-900`,children:`LLM call`}),n?.finishReason&&(0,D.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-sand-100 text-sand-500 font-mono shrink-0`,children:n.finishReason}),n&&(n.fallbackCount??0)>0&&(0,D.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded-full bg-caution-400/15 text-caution-500 font-medium uppercase shrink-0`,children:[n.requestedModelName,` → `,n.modelName]}),r&&(0,D.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-blue-100 text-blue-600 font-medium shrink-0`,children:`reasoning`}),i>0&&(0,D.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded-full bg-red-100 text-red-600 font-medium uppercase shrink-0`,children:[i,` error`]}),(0,D.jsxs)(`span`,{className:`ml-auto text-[11px] text-sand-400 tabular-nums shrink-0`,children:[e.toolCalls.length,` tools`]})]}),(0,D.jsxs)(`div`,{className:`ml-4 mb-4 space-y-3`,children:[n&&(0,D.jsxs)(`div`,{className:`rounded-md border border-sand-100 bg-sand-50/70 p-3`,children:[(0,D.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 xl:grid-cols-8 gap-x-4 gap-y-3`,children:[(0,D.jsx)($,{label:`Duration`,value:Gn(n.durationMs)}),(0,D.jsx)($,{label:`TTFT`,value:Kn(n.ttftMs)}),(0,D.jsx)($,{label:`Tokens/sec`,value:Yn(n.outputTokens,n.durationMs,n.ttftMs,t)}),(0,D.jsx)($,{label:`Input`,value:K(n.inputTokens??0)}),(0,D.jsx)($,{label:`Output`,value:K(n.outputTokens??0)}),(0,D.jsx)($,{label:`Cache Read`,value:K(n.cacheReadTokens??0)}),(0,D.jsx)($,{label:`Cache Write`,value:K(n.cacheCreationTokens??0)}),(0,D.jsx)($,{label:`Cache 5m / 1h`,value:`${n.cacheCreation5mTokens===null?`—`:K(n.cacheCreation5mTokens)} / ${n.cacheCreation1hTokens===null?`—`:K(n.cacheCreation1hTokens)}`}),(0,D.jsx)($,{value:n.costUsd===null?`—`:y(n.costUsd)}),(0,D.jsx)($,{label:`Reasoning`,value:n.reasoningTokens!==null&&n.reasoningTokens!==void 0?K(n.reasoningTokens):`—`})]}),r&&(0,D.jsx)(ir,{stepId:n.id})]}),e.toolCalls.length>0&&(0,D.jsx)(`div`,{className:`space-y-0.5`,children:e.toolCalls.map(e=>(0,D.jsx)(rr,{entry:e},`${e.stepIndex}-${e.callIndex}-${e.toolCallId}`))})]})]})}function or({steps:e,tokensPerSecEnabled:t}){let n=e.reduce((e,t)=>e+t.toolCalls.length,0);return(0,D.jsx)(Z,{title:`Steps (${e.length} steps · ${n} tool calls)`,defaultOpen:!0,children:(0,D.jsx)(`div`,{className:`space-y-1`,children:e.map(e=>(0,D.jsx)(ar,{entry:e,tokensPerSecEnabled:t},e.stepIndex))})})}function sr(e){let t=new Map;function n(e){let n=t.get(e);if(n)return n;let r={stepIndex:e,generate:null,toolCalls:[]};return t.set(e,r),r}for(let t of e){let e=n(t.step_index);t.type===`generate`?e.generate={id:t.id,stepIndex:t.step_index,modelName:t.model_name,requestedModelName:t.requested_model_name,fallbackCount:t.fallback_count,inputTokens:t.input_tokens,outputTokens:t.output_tokens,cacheReadTokens:t.cache_read_tokens,cacheCreationTokens:t.cache_creation_tokens,cacheCreation5mTokens:t.cache_creation_5m_tokens,cacheCreation1hTokens:t.cache_creation_1h_tokens,costUsd:t.cost_usd,durationMs:t.duration_ms,ttftMs:t.ttft_ms,finishReason:t.finish_reason,reasoningTokens:t.reasoning_tokens}:t.type===`tool_call`&&e.toolCalls.push({id:t.id,stepIndex:t.step_index,callIndex:t.tool_call_index??e.toolCalls.length,toolCallId:t.tool_call_id??``,toolName:t.tool_name??``,durationMs:t.tool_duration_ms??0,error:t.error})}return[...t.values()].map(e=>({...e,toolCalls:e.toolCalls.toSorted((e,t)=>e.callIndex-t.callIndex)})).toSorted((e,t)=>e.stepIndex-t.stepIndex)}function cr(e){return e.type===`function_call`||e.type===`function_call_output`?`bg-caution-400/10`:e.role===`assistant`?`bg-sage-50`:`bg-sand-50`}function lr(e){return e.type===`function_call`?`fn: ${e.name??`unknown`}`:e.type===`function_call_output`?`fn result`:e.role??e.type}var ur=p({text:s()}),dr=_([s(),u(_([ur,q])),q]);function fr(e){let t=s().safeParse(e);if(t.success)return t.data;let n=u(_([ur,q])).safeParse(e);return n.success?n.data.map(e=>{let t=ur.safeParse(e);return t.success?t.data.text:JSON.stringify(e)}).join(`
2
+ `):JSON.stringify(e)}function pr({className:e,children:t}){return(0,D.jsx)(`pre`,{className:`text-[12px] text-sand-700 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed max-h-40 overflow-auto ${e??``}`,children:t})}function mr({history:e}){return(0,D.jsx)(Z,{title:`History`,defaultOpen:!1,children:(0,D.jsx)(`div`,{className:`space-y-1.5`,children:e.map((e,t)=>{let n=dr.safeParse(e.content);return(0,D.jsxs)(`div`,{className:`rounded-md px-3 py-2 ${cr(e)}`,children:[(0,D.jsx)(`div`,{className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium mb-1`,children:lr(e)}),e.content!==null&&e.content!==void 0&&(0,D.jsx)(pr,{children:n.success?fr(n.data):JSON.stringify(e.content)}),e.arguments&&(0,D.jsx)(pr,{children:e.arguments}),e.output&&(0,D.jsx)(pr,{children:e.output})]},`hist-${t}`)})})})}var hr=60,gr=30,_r=18;function vr(e,t=hr){let n=[];for(let r of e){if([...n,r.name].join(`, `).length>t)break;n.push(r.name)}return{names:n,omittedCount:e.length-n.length}}function yr({tools:e}){let t=vr(e),n=vr(e,gr),r=vr(e,_r);return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{className:`shrink-0`,children:`·`}),t.names.length>0&&(0,D.jsx)(`span`,{className:`hidden shrink-0 xl:inline`,children:t.names.join(`, `)}),t.omittedCount>0&&(0,D.jsxs)(`span`,{className:`hidden shrink-0 xl:inline`,children:[`+`,t.omittedCount]}),n.names.length>0&&(0,D.jsx)(`span`,{className:`hidden shrink-0 sm:inline xl:hidden`,children:n.names.join(`, `)}),n.omittedCount>0&&(0,D.jsxs)(`span`,{className:`hidden shrink-0 sm:inline xl:hidden`,children:[`+`,n.omittedCount]}),r.names.length>0&&(0,D.jsx)(`span`,{className:`shrink-0 sm:hidden`,children:r.names.join(`, `)}),r.omittedCount>0&&(0,D.jsxs)(`span`,{className:`shrink-0 sm:hidden`,children:[`+`,r.omittedCount]})]})}function br({code:e,fullCode:t}){let n=(0,E.useMemo)(()=>wr(e),[e]);return(0,D.jsx)(`pre`,{"data-zod-parameter-schema":!0,className:`max-h-64 overflow-auto rounded-md bg-sand-900 px-3 py-2.5 font-mono text-[11px] leading-relaxed whitespace-pre text-sand-200 ${t?`cursor-help outline-none focus-visible:ring-2 focus-visible:ring-sienna-300`:``}`,tabIndex:t?0:void 0,title:t,children:t?(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(`span`,{"aria-hidden":`true`,children:n}),(0,D.jsx)(`span`,{className:`sr-only`,children:t})]}):n})}function xr({tool:e}){return(0,D.jsxs)(`div`,{className:`min-w-0 rounded-md border border-sand-100 bg-sand-50/70 p-3`,children:[(0,D.jsx)(`div`,{className:`break-all font-mono text-[13px] font-semibold text-sand-900`,children:e.name}),e.description&&(0,D.jsx)(`p`,{className:`mt-2 text-[12px] leading-relaxed text-sand-700`,children:e.description}),(0,D.jsxs)(`div`,{className:`mt-3`,children:[(0,D.jsxs)(`div`,{className:`mb-1.5 text-[10px] font-medium uppercase tracking-wider text-sand-400`,children:[`Parameters (`,e.parameterCount,`)`]}),(0,D.jsx)(br,{code:e.inputZod,fullCode:e.fullInputZod})]})]})}function Sr({id:e,tools:t}){let[n,i]=(0,E.useState)(!1),a=r({...h.toolsViewQueryOptions(e),enabled:n,staleTime:e=>e.state.data&&e.state.data.length>0?1/0:0,refetchOnWindowFocus:!1,refetchOnReconnect:!1}),o=a.data!==void 0&&a.data.length>0;return(0,D.jsx)(Z,{title:`Tools (${t.length})`,defaultOpen:!1,headerMetadata:(0,D.jsx)(yr,{tools:t}),onOpenChange:i,children:a.isFetching&&!o?(0,D.jsx)(`p`,{className:`text-[12px] text-sand-400`,children:`Loading tool contracts…`}):a.isError||!o?(0,D.jsx)(`p`,{className:`text-[12px] text-sand-400`,children:`Tool contracts could not be loaded.`}):(0,D.jsx)(`div`,{className:`space-y-2`,children:a.data.map((e,t)=>(0,D.jsx)(xr,{tool:e},`${e.name}-${t}`))})})}var Cr=/("(?:[^"\\]|\\.)*")|(\b\d+(?:\.\d+)?\b)|(\btype\b|\bz\b(?=\.))|(\b(?:string|number|boolean|null|unknown|Record)\b)|([{}[\]()<>|?:,.=])|([A-Za-z_$][\w$]*)|(\s+|.)/g;function wr(e){let t=[],n=!1;for(let r of e.matchAll(Cr)){let[e,i,a,o,s,c,l]=r,u=`${r.index}-${e}`;i||a?t.push((0,D.jsx)(`span`,{className:`text-sage-400`,children:e},u)):o?(n=e===`type`,t.push((0,D.jsx)(`span`,{className:`text-sienna-400`,children:e},u))):s?t.push((0,D.jsx)(`span`,{className:`text-blue-300`,children:e},u)):c?t.push((0,D.jsx)(`span`,{className:`text-sand-500`,children:e},u)):l&&n?(n=!1,t.push((0,D.jsx)(`span`,{className:`font-semibold text-sand-50`,children:e},u))):t.push(e)}return t}function Tr({id:e}){let{data:t}=h.useResponseTypeTs(e),[n,r]=(0,E.useState)(`zod`),{zod:i=null,typescript:a=null}=t??{},o=n===`zod`?i??a:a??i,s=(0,E.useMemo)(()=>o===null?null:wr(o),[o]);return!t||o===null||s===null?null:(0,D.jsxs)(`div`,{className:`panel overflow-hidden`,children:[(0,D.jsxs)(`div`,{className:`panel-header flex items-center px-4 py-2`,children:[(0,D.jsx)(`span`,{className:`text-[11px] uppercase tracking-wider text-sand-500 font-medium`,children:`Response Type`}),(0,D.jsx)(`div`,{className:`ml-auto flex gap-1`,children:[{value:`zod`,label:`zod`,available:i!==null},{value:`ts`,label:`ts`,available:a!==null}].map(e=>(0,D.jsx)(`button`,{type:`button`,disabled:!e.available,className:`px-3 py-1 text-[12px] font-mono rounded-md transition-colors ${n===e.value?`bg-sand-200 text-sand-700`:`text-sand-400 hover:text-sand-600 disabled:text-sand-300 disabled:cursor-not-allowed`}`,onClick:()=>r(e.value),children:e.label},e.value))})]}),(0,D.jsxs)(`div`,{className:`relative`,children:[(0,D.jsx)(Y,{text:o,dark:!0}),(0,D.jsx)(`pre`,{className:`bg-sand-900 px-4 py-3 text-[12px] text-sand-200 whitespace-pre-wrap wrap-break-word font-mono leading-relaxed max-h-64 overflow-auto`,children:s})]})]})}function Er({id:e}){let{data:t,isLoading:n,error:r,isError:a,refresh:o}=h.useRequestLog(`A`,e),s=t?.status===`running`;(0,E.useEffect)(()=>{let e=s?setInterval(()=>void o(),3e3):void 0;return()=>clearInterval(e)},[s,o]);let{data:u,isLoading:d,isError:f}=c.useRequestLogSteps(`T`,{request_log_id:e,num:0,page:1,orderBy:`id-asc`}),p=sr(u?.rows??[]);if(n||d)return(0,D.jsxs)(`div`,{className:`max-w-6xl mx-auto space-y-4`,children:[(0,D.jsx)(`div`,{className:`h-4 w-32 bg-sand-200 rounded animate-pulse`}),(0,D.jsx)(`div`,{className:`h-40 panel animate-pulse`}),(0,D.jsx)(`div`,{className:`h-32 panel animate-pulse`})]});if(a||f||!t)return(0,D.jsxs)(`div`,{className:`max-w-6xl mx-auto`,children:[(0,D.jsxs)(i,{to:`/logs`,className:`flex items-center gap-1 text-[13px] text-sand-500 hover:text-sienna-500 mb-4`,children:[(0,D.jsx)(kn,{className:`size-3.5`}),`Back to Logs`]}),(0,D.jsx)(`p`,{role:`alert`,className:`text-danger-500 text-sm`,children:a?l(r)&&r.code===404?`Request not found.`:`Failed to load request.`:f?`Failed to load request steps.`:`Request not found.`})]});let m=p.flatMap(e=>e.toolCalls),g=m.find(e=>e.toolName===`image_generation`)?.id??null,_=m.find(e=>e.toolName===`speech`||e.toolName===`transcription`)?.id??null,v=p.length>0,y=Jn(t),b=t.history??null,x=b!==null&&b.length>0,S=t.tools??null,C=S!==null&&S.length>0,w=t.is_structured?(0,D.jsx)(Tr,{id:e}):null,T=(0,D.jsxs)(`div`,{className:`space-y-4`,children:[(0,D.jsx)(Z,{title:`System`,children:(0,D.jsxs)(`div`,{className:`relative`,children:[(0,D.jsx)(Y,{text:t.system_prompt??`null`}),(0,D.jsx)(X,{text:t.system_prompt??`null`,markdown:!0})]})}),(0,D.jsx)(Z,{title:`User`,children:(0,D.jsxs)(`div`,{className:`space-y-3`,children:[(0,D.jsxs)(`div`,{className:`relative`,children:[(0,D.jsx)(Y,{text:t.user_prompt??`null`}),t.media_kind===`stt`?(0,D.jsx)(tr,{text:t.user_prompt??`null`,stepId:_}):(0,D.jsx)(X,{text:t.user_prompt??`null`,markdown:!0})]}),(0,D.jsx)(nr,{images:t.input_images,stepId:g})]})})]});return(0,D.jsxs)(`div`,{className:`mx-auto space-y-4 ${v?`max-w-[120rem]`:`max-w-6xl`}`,children:[(0,D.jsxs)(i,{to:`/logs`,className:`inline-flex items-center gap-1 text-[13px] text-sand-500 hover:text-sienna-500 transition-colors`,children:[(0,D.jsx)(kn,{className:`size-3.5`}),`Back to Logs`]}),(0,D.jsx)(Bn,{data:t}),t.error_message&&(0,D.jsx)(zn,{message:t.error_message}),x&&(0,D.jsx)(mr,{history:b}),v?(0,D.jsxs)(`div`,{className:`flex flex-col lg:flex-row gap-4 items-stretch lg:items-start`,children:[(0,D.jsxs)(`div`,{className:`order-1 lg:order-2 flex-1 min-w-0 space-y-4`,children:[w,C&&(0,D.jsx)(Sr,{id:e,tools:S}),(0,D.jsx)(or,{steps:p,tokensPerSecEnabled:y})]}),(0,D.jsx)(`div`,{className:`order-2 lg:order-1 flex-1 min-w-0`,children:T})]}):(0,D.jsxs)(D.Fragment,{children:[w,C&&(0,D.jsx)(Sr,{id:e,tools:S}),T]}),(0,D.jsx)(Z,{title:`Response`,children:(0,D.jsxs)(`div`,{className:`relative`,children:[(0,D.jsx)(Y,{text:t.response}),t.media_kind===`tts`?(0,D.jsx)(tr,{text:t.response,stepId:_}):(0,D.jsx)(X,{text:t.response,markdown:!0})]})}),(0,D.jsx)(Vn,{data:t,toolCallCount:m.length}),(0,D.jsx)(`div`,{className:`pb-8`})]})}export{Mn as component};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n}from"./vendor-react-8xo7RSum.js";import{N as r}from"./vendor-tanstack-6B86itGS.js";import{i,n as a,r as o}from"./use-oauth-login-flow-eQnMzp8A.js";import{o as s,u as c,w as l}from"./index-Wi8Wxte6.js";import{t as u}from"./use-update-token-mutation-KnwyYQjb.js";import{t as d}from"./plus-Bab0ACnC.js";var f=e(t(),1),p=n();function m(e){let t=Math.max(Math.ceil(e/1e3),0),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,`0`)}`}function h({expiresAt:e}){let[t,n]=(0,f.useState)(()=>Date.now());return(0,f.useEffect)(()=>{let e=window.setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]),(0,p.jsx)(`span`,{className:`tabular-nums`,children:m(e-t)})}function g({flow:e,onRestart:t}){return(0,p.jsxs)(`div`,{className:`space-y-2`,children:[e.status===`starting`&&(0,p.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[12px] text-sand-600`,children:[(0,p.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-sand-400 border-t-transparent rounded-full animate-spin`}),`Requesting device code...`]}),e.status===`waiting`&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`p`,{className:`text-[12px] text-sand-600 leading-relaxed`,children:`아래 링크를 열어 xAI 계정으로 로그인한 뒤 이 코드를 입력하세요. 승인되면 토큰이 자동으로 추가됩니다.`}),(0,p.jsxs)(`div`,{className:`rounded-md border border-sand-200 bg-sand-50 px-3 py-3 text-center`,children:[(0,p.jsx)(`p`,{className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Device code`}),(0,p.jsx)(`p`,{className:`mt-1 font-mono text-lg tracking-widest text-sand-900 select-all`,children:e.userCode})]}),(0,p.jsx)(`a`,{href:e.verificationUriComplete??e.verificationUri,target:`_blank`,rel:`noopener noreferrer`,className:`block w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white text-center hover:bg-sand-800 transition-colors duration-150`,children:`Open xAI to approve`}),(0,p.jsxs)(`p`,{className:`flex items-center justify-between text-[11px] text-sand-500`,children:[(0,p.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,p.jsx)(`span`,{className:`w-2.5 h-2.5 border-2 border-sand-400 border-t-transparent rounded-full animate-spin`}),e.slowDown?`Waiting for approval (polling slowed down)...`:`Waiting for approval...`]}),(0,p.jsxs)(`span`,{children:[`expires in `,(0,p.jsx)(h,{expiresAt:e.expiresAt})]})]})]}),e.status===`added`&&(0,p.jsxs)(`p`,{className:`text-[12px] text-sage-600`,children:[`Token "`,e.name,`" added.`]}),e.status===`expired`&&(0,p.jsx)(`p`,{className:`text-[11px] text-red-500`,children:`Device code가 만료되었습니다 — 로그인을 다시 시작하세요.`}),e.status===`error`&&(0,p.jsx)(`p`,{className:`text-[11px] text-red-500`,children:e.message}),(0,p.jsx)(`button`,{type:`button`,className:`w-full py-1.5 text-[12px] text-sand-500 hover:text-sand-700 transition-colors duration-150`,onClick:t,children:`처음부터 다시 시작`})]})}function _({light:e}){return(0,p.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,p.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-t-transparent rounded-full animate-spin ${e?`border-white`:`border-sand-400`}`}),`Waiting for login...`]})}function v(){return(0,p.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,p.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`}),(0,p.jsx)(`span`,{className:`text-[10px] text-sand-400 uppercase`,children:`or`}),(0,p.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`})]})}function y({disabled:e,loadingProvider:t,onStart:n,onStartGrokDevice:r}){let i=`w-full py-2.5 text-sm font-medium rounded-md border border-sand-300 text-sand-700 hover:bg-sand-100 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2`;return(0,p.jsxs)(`div`,{className:`space-y-2`,children:[(0,p.jsx)(`button`,{type:`button`,className:`w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white hover:bg-sand-800 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2`,disabled:e,onClick:()=>n(`openai`),children:t===`openai`?(0,p.jsx)(_,{light:!0}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l,{className:`size-4`}),`Login with OpenAI`]})}),(0,p.jsx)(v,{}),(0,p.jsx)(`button`,{type:`button`,className:i,disabled:e,onClick:()=>n(`anthropic`),children:t===`anthropic`?(0,p.jsx)(_,{light:!1}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l,{className:`size-4`}),`Login with Claude`]})}),(0,p.jsx)(v,{}),(0,p.jsx)(`button`,{type:`button`,className:i,disabled:e,onClick:r,children:t===`grok`?(0,p.jsx)(_,{light:!1}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l,{className:`size-4`}),`Login with xAI`]})})]})}function b(){let[e,t]=(0,f.useState)(!1),[n,r]=(0,f.useState)(``),s=a(),c=()=>{t(!1),r(``),s.reset()},l=async e=>{await s.submitCode(e)&&c()};return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`button`,{type:`button`,className:`px-3.5 py-1.5 text-[12px] font-medium rounded-lg bg-sienna-500 text-white hover:bg-sienna-600 disabled:opacity-50 transition-all duration-150 active:scale-[0.97] flex items-center gap-1.5 shadow-sm`,onClick:()=>t(!0),children:[(0,p.jsx)(d,{className:`size-3.5`}),`Add Token`]}),e&&(0,p.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 bg-sand-900/8 backdrop-blur-sm`,onClick:c,onKeyDown:()=>{}}),(0,p.jsxs)(`div`,{className:`relative panel shadow-xl w-full max-w-md mx-4`,children:[(0,p.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100/50`,children:(0,p.jsx)(`h2`,{className:`text-base font-medium text-sand-900`,children:`Add Token`})}),(0,p.jsxs)(`div`,{className:`px-5 py-4 space-y-4`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name *`}),(0,p.jsx)(i,{value:n,onChange:e=>r(e.target.value),placeholder:`e.g. your-token-name`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`})]}),s.codeEntryProvider?(0,p.jsx)(o,{provider:s.codeEntryProvider,isPending:s.completeMutation.isPending,isError:s.completeMutation.isError,onSubmit:e=>void l(e),onRestart:s.reset}):s.deviceFlow?(0,p.jsx)(g,{flow:s.deviceFlow,onRestart:s.reset}):(0,p.jsx)(y,{disabled:!n.trim()||s.loadingProvider!==null,loadingProvider:s.loadingProvider,onStart:e=>void s.start(e,n),onStartGrokDevice:()=>void s.startDevice(n,c)})]}),(0,p.jsx)(`div`,{className:`px-5 py-3 border-t border-sand-100/50 flex items-center justify-end gap-2`,children:(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:c,children:`Cancel`})})]})]})]})}var x=(0,f.forwardRef)(({title:e,titleId:t,...n},r)=>(0,p.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,p.jsx)(`title`,{id:t,children:e}):null,(0,p.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4`})]})),S=(0,f.forwardRef)(({title:e,titleId:t,...n},r)=>(0,p.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,p.jsx)(`title`,{id:t,children:e}):null,(0,p.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})]}));function C(e){let t=e.accessToken;return t?t.length<=12?t:`${t.slice(0,8)}...${t.slice(-4)}`:`—`}function w(e){let t=e.credentials;if(`accessTokenExpiresAt`in t)return t.accessTokenExpiresAt;if(`authMode`in t){let e=Date.parse(t.expiresAt);return Number.isNaN(e)?null:e}return t.expiresAt}function T(e){if(!e)return{text:``,color:``};let t=e-Date.now();if(t<=0)return{text:`expired`,color:`text-red-500`};let n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4),i=n>0?`${n}h ${r}m`:`${r}m`;return t<36e5?{text:i,color:`text-amber-500`}:{text:i,color:`text-sand-400`}}function E({data:e,isLoading:t}){let[n,a]=(0,f.useState)(null),[o,c]=(0,f.useState)(null),[l,d]=(0,f.useState)(``),m=r(),h=s.useRemoveTokenMutation(),g=u(),_=s.useToggleTokenMutation(),v=()=>Promise.all([m.invalidateQueries({queryKey:[`Token`]}),m.invalidateQueries({queryKey:[`Qgrid`]})]),y=async e=>{await _.mutateAsync({id:e.id}),await v()},b=async()=>{n&&(await h.mutateAsync({id:n.id}),await v(),a(null))},E=e=>{c(e),d(e.name??``)},D=async()=>{o&&(await g.mutateAsync({id:o.id,name:l.trim()}),await v(),c(null))};if(t)return(0,p.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:3}).map((e,t)=>(0,p.jsx)(`div`,{className:`h-12 bg-sand-100 rounded-md animate-pulse`},`skeleton-${t}`))});let O=e??[];return O.length===0?(0,p.jsxs)(`div`,{className:`text-sand-400 text-center py-16 text-sm`,children:[`No tokens registered. Click `,(0,p.jsx)(`strong`,{className:`text-sand-600`,children:`Add Token`}),` to get started.`]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`div`,{className:`panel overflow-hidden`,children:(0,p.jsx)(`div`,{className:`overflow-x-auto`,children:(0,p.jsxs)(`table`,{className:`w-full min-w-[640px] text-[13px]`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`panel-header`,children:[(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Provider`}),(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Name`}),(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Token`}),(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Status`}),(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Expires`}),(0,p.jsx)(`th`,{className:`w-20 px-3 py-2.5`,children:(0,p.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,p.jsx)(`tbody`,{className:`divide-y divide-sand-100/80`,children:O.map(e=>{let t=T(w(e));return(0,p.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 ${e.active?``:`opacity-50`}`,children:[(0,p.jsx)(`td`,{className:`px-5 py-3`,children:(0,p.jsx)(`span`,{className:`text-xs font-medium text-sand-500 uppercase`,children:e.provider})}),(0,p.jsx)(`td`,{className:`px-5 py-3`,children:e.name?(0,p.jsx)(`span`,{className:`text-sm text-sand-700`,children:e.name}):(0,p.jsx)(`span`,{className:`text-[11px] text-sand-400`,children:`—`})}),(0,p.jsx)(`td`,{className:`px-5 py-3`,children:(0,p.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:C(e.credentials)})}),(0,p.jsx)(`td`,{className:`px-5 py-3`,children:(0,p.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e.active,"aria-label":`${e.name||e.provider} active`,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors duration-200 ${e.active?`bg-sage-400`:`bg-sand-300`}`,onClick:()=>y(e),disabled:_.isPending||!e.active&&e.reauth_required,title:!e.active&&e.reauth_required?`재로그인이 필요한 토큰입니다`:void 0,children:(0,p.jsx)(`span`,{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform duration-200 ${e.active?`translate-x-4.5`:`translate-x-0.5`}`})})}),(0,p.jsx)(`td`,{className:`px-5 py-3`,children:t.text&&(0,p.jsx)(`span`,{className:`text-xs ${t.color}`,children:t.text})}),(0,p.jsx)(`td`,{className:`px-3 py-3`,children:(0,p.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,p.jsx)(`button`,{type:`button`,"aria-label":`Edit token`,className:`p-1 rounded text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:()=>E(e),children:(0,p.jsx)(x,{className:`size-4`})}),(0,p.jsx)(`button`,{type:`button`,"aria-label":`Delete token`,className:`p-1 rounded text-sand-400 hover:text-red-500 transition-colors duration-150`,onClick:()=>a(e),children:(0,p.jsx)(S,{className:`size-4`})})]})})]},e.id)})})]})})}),o&&(0,p.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 bg-sand-900/8 backdrop-blur-sm`,onClick:()=>c(null),onKeyDown:()=>{}}),(0,p.jsxs)(`div`,{className:`relative panel shadow-xl w-full max-w-sm mx-4`,children:[(0,p.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100/60`,children:(0,p.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Edit Token`})}),(0,p.jsx)(`div`,{className:`px-5 py-4 space-y-3`,children:(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name`}),(0,p.jsx)(i,{value:l,onChange:e=>d(e.target.value),placeholder:`e.g. prod, dev, team-a`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`})]})}),(0,p.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100/60 flex items-center justify-end gap-2`,children:[(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:()=>c(null),children:`Cancel`}),(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150`,disabled:g.isPending,onClick:D,children:g.isPending?`Saving...`:`Save`})]})]})]}),n&&(0,p.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 bg-sand-900/8 backdrop-blur-sm`,onClick:()=>a(null),onKeyDown:()=>{}}),(0,p.jsxs)(`div`,{className:`relative panel shadow-xl w-full max-w-sm mx-4`,children:[(0,p.jsxs)(`div`,{className:`px-5 py-4`,children:[(0,p.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Remove Token`}),(0,p.jsxs)(`p`,{className:`text-sm text-sand-700 mt-2`,children:[`Are you sure you want to remove`,` `,(0,p.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:C(n.credentials)}),n.name&&(0,p.jsxs)(`span`,{className:`text-sand-500`,children:[` (`,n.name,`)`]}),`?`]})]}),(0,p.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100/60 flex items-center justify-end gap-2`,children:[(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:()=>a(null),children:`Cancel`}),(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 transition-colors duration-150`,disabled:h.isPending,onClick:b,children:h.isPending?`Removing...`:`Remove`})]})]})]})]})}function D(){let{data:e,isLoading:t}=c.useTokens(`A`);return(0,p.jsxs)(`div`,{className:`max-w-6xl mx-auto space-y-4`,children:[(0,p.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,p.jsx)(b,{})}),(0,p.jsx)(E,{data:e?.rows,isLoading:t})]})}export{D as component};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n}from"./vendor-react-8xo7RSum.js";import{N as r}from"./vendor-tanstack-6B86itGS.js";import{i,n as a,r as o}from"./use-oauth-login-flow-Tmy4lKYv.js";import{o as s,u as c,w as l}from"./index-Cb14ZYfq.js";import{t as u}from"./use-update-token-mutation-CGwI6TU8.js";import{t as d}from"./plus-Bab0ACnC.js";var f=e(t(),1),p=n();function m(e){let t=Math.max(Math.ceil(e/1e3),0),n=Math.floor(t/60),r=t%60;return`${n}:${String(r).padStart(2,`0`)}`}function h({expiresAt:e}){let[t,n]=(0,f.useState)(()=>Date.now());return(0,f.useEffect)(()=>{let e=window.setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]),(0,p.jsx)(`span`,{className:`tabular-nums`,children:m(e-t)})}function g({flow:e,onRestart:t}){return(0,p.jsxs)(`div`,{className:`space-y-2`,children:[e.status===`starting`&&(0,p.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[12px] text-sand-600`,children:[(0,p.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-sand-400 border-t-transparent rounded-full animate-spin`}),`Requesting device code...`]}),e.status===`waiting`&&(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`p`,{className:`text-[12px] text-sand-600 leading-relaxed`,children:`아래 링크를 열어 xAI 계정으로 로그인한 뒤 이 코드를 입력하세요. 승인되면 토큰이 자동으로 추가됩니다.`}),(0,p.jsxs)(`div`,{className:`rounded-md border border-sand-200 bg-sand-50 px-3 py-3 text-center`,children:[(0,p.jsx)(`p`,{className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Device code`}),(0,p.jsx)(`p`,{className:`mt-1 font-mono text-lg tracking-widest text-sand-900 select-all`,children:e.userCode})]}),(0,p.jsx)(`a`,{href:e.verificationUriComplete??e.verificationUri,target:`_blank`,rel:`noopener noreferrer`,className:`block w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white text-center hover:bg-sand-800 transition-colors duration-150`,children:`Open xAI to approve`}),(0,p.jsxs)(`p`,{className:`flex items-center justify-between text-[11px] text-sand-500`,children:[(0,p.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,p.jsx)(`span`,{className:`w-2.5 h-2.5 border-2 border-sand-400 border-t-transparent rounded-full animate-spin`}),e.slowDown?`Waiting for approval (polling slowed down)...`:`Waiting for approval...`]}),(0,p.jsxs)(`span`,{children:[`expires in `,(0,p.jsx)(h,{expiresAt:e.expiresAt})]})]})]}),e.status===`added`&&(0,p.jsxs)(`p`,{className:`text-[12px] text-sage-600`,children:[`Token "`,e.name,`" added.`]}),e.status===`expired`&&(0,p.jsx)(`p`,{className:`text-[11px] text-red-500`,children:`Device code가 만료되었습니다 — 로그인을 다시 시작하세요.`}),e.status===`error`&&(0,p.jsx)(`p`,{className:`text-[11px] text-red-500`,children:e.message}),(0,p.jsx)(`button`,{type:`button`,className:`w-full py-1.5 text-[12px] text-sand-500 hover:text-sand-700 transition-colors duration-150`,onClick:t,children:`처음부터 다시 시작`})]})}function _({light:e}){return(0,p.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,p.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-t-transparent rounded-full animate-spin ${e?`border-white`:`border-sand-400`}`}),`Waiting for login...`]})}function v(){return(0,p.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,p.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`}),(0,p.jsx)(`span`,{className:`text-[10px] text-sand-400 uppercase`,children:`or`}),(0,p.jsx)(`div`,{className:`flex-1 h-px bg-sand-200`})]})}function y({disabled:e,loadingProvider:t,onStart:n,onStartGrokDevice:r}){let i=`w-full py-2.5 text-sm font-medium rounded-md border border-sand-300 text-sand-700 hover:bg-sand-100 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2`;return(0,p.jsxs)(`div`,{className:`space-y-2`,children:[(0,p.jsx)(`button`,{type:`button`,className:`w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white hover:bg-sand-800 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2`,disabled:e,onClick:()=>n(`openai`),children:t===`openai`?(0,p.jsx)(_,{light:!0}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l,{className:`size-4`}),`Login with OpenAI`]})}),(0,p.jsx)(v,{}),(0,p.jsx)(`button`,{type:`button`,className:i,disabled:e,onClick:()=>n(`anthropic`),children:t===`anthropic`?(0,p.jsx)(_,{light:!1}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l,{className:`size-4`}),`Login with Claude`]})}),(0,p.jsx)(v,{}),(0,p.jsx)(`button`,{type:`button`,className:i,disabled:e,onClick:r,children:t===`grok`?(0,p.jsx)(_,{light:!1}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(l,{className:`size-4`}),`Login with xAI`]})})]})}function b(){let[e,t]=(0,f.useState)(!1),[n,r]=(0,f.useState)(``),s=a(),c=()=>{t(!1),r(``),s.reset()},l=async e=>{await s.submitCode(e)&&c()};return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(`button`,{type:`button`,className:`px-3.5 py-1.5 text-[12px] font-medium rounded-lg bg-sienna-500 text-white hover:bg-sienna-600 disabled:opacity-50 transition-all duration-150 active:scale-[0.97] flex items-center gap-1.5 shadow-sm`,onClick:()=>t(!0),children:[(0,p.jsx)(d,{className:`size-3.5`}),`Add Token`]}),e&&(0,p.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 bg-sand-900/8 backdrop-blur-sm`,onClick:c,onKeyDown:()=>{}}),(0,p.jsxs)(`div`,{className:`relative panel shadow-xl w-full max-w-md mx-4`,children:[(0,p.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100/50`,children:(0,p.jsx)(`h2`,{className:`text-base font-medium text-sand-900`,children:`Add Token`})}),(0,p.jsxs)(`div`,{className:`px-5 py-4 space-y-4`,children:[(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name *`}),(0,p.jsx)(i,{value:n,onChange:e=>r(e.target.value),placeholder:`e.g. your-token-name`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`})]}),s.codeEntryProvider?(0,p.jsx)(o,{provider:s.codeEntryProvider,isPending:s.completeMutation.isPending,isError:s.completeMutation.isError,onSubmit:e=>void l(e),onRestart:s.reset}):s.deviceFlow?(0,p.jsx)(g,{flow:s.deviceFlow,onRestart:s.reset}):(0,p.jsx)(y,{disabled:!n.trim()||s.loadingProvider!==null,loadingProvider:s.loadingProvider,onStart:e=>void s.start(e,n),onStartGrokDevice:()=>void s.startDevice(n,c)})]}),(0,p.jsx)(`div`,{className:`px-5 py-3 border-t border-sand-100/50 flex items-center justify-end gap-2`,children:(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:c,children:`Cancel`})})]})]})]})}var x=(0,f.forwardRef)(({title:e,titleId:t,...n},r)=>(0,p.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,p.jsx)(`title`,{id:t,children:e}):null,(0,p.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4`})]})),S=(0,f.forwardRef)(({title:e,titleId:t,...n},r)=>(0,p.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,p.jsx)(`title`,{id:t,children:e}):null,(0,p.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`})]}));function C(e){let t=e.accessToken;return t?t.length<=12?t:`${t.slice(0,8)}...${t.slice(-4)}`:`—`}function w(e){let t=e.credentials;if(`accessTokenExpiresAt`in t)return t.accessTokenExpiresAt;if(`authMode`in t){let e=Date.parse(t.expiresAt);return Number.isNaN(e)?null:e}return t.expiresAt}function T(e){if(!e)return{text:``,color:``};let t=e-Date.now();if(t<=0)return{text:`expired`,color:`text-red-500`};let n=Math.floor(t/36e5),r=Math.floor(t%36e5/6e4),i=n>0?`${n}h ${r}m`:`${r}m`;return t<36e5?{text:i,color:`text-amber-500`}:{text:i,color:`text-sand-400`}}function E({data:e,isLoading:t}){let[n,a]=(0,f.useState)(null),[o,c]=(0,f.useState)(null),[l,d]=(0,f.useState)(``),m=r(),h=s.useRemoveTokenMutation(),g=u(),_=s.useToggleTokenMutation(),v=()=>Promise.all([m.invalidateQueries({queryKey:[`Token`]}),m.invalidateQueries({queryKey:[`Qgrid`]})]),y=async e=>{await _.mutateAsync({id:e.id}),await v()},b=async()=>{n&&(await h.mutateAsync({id:n.id}),await v(),a(null))},E=e=>{c(e),d(e.name??``)},D=async()=>{o&&(await g.mutateAsync({id:o.id,name:l.trim()}),await v(),c(null))};if(t)return(0,p.jsx)(`div`,{className:`space-y-2`,children:Array.from({length:3}).map((e,t)=>(0,p.jsx)(`div`,{className:`h-12 bg-sand-100 rounded-md animate-pulse`},`skeleton-${t}`))});let O=e??[];return O.length===0?(0,p.jsxs)(`div`,{className:`text-sand-400 text-center py-16 text-sm`,children:[`No tokens registered. Click `,(0,p.jsx)(`strong`,{className:`text-sand-600`,children:`Add Token`}),` to get started.`]}):(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`div`,{className:`panel overflow-hidden`,children:(0,p.jsx)(`div`,{className:`overflow-x-auto`,children:(0,p.jsxs)(`table`,{className:`w-full min-w-[640px] text-[13px]`,children:[(0,p.jsx)(`thead`,{children:(0,p.jsxs)(`tr`,{className:`panel-header`,children:[(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Provider`}),(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Name`}),(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Token`}),(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Status`}),(0,p.jsx)(`th`,{className:`text-left px-5 py-2.5 text-[10px] uppercase tracking-wider text-sand-400 font-medium`,children:`Expires`}),(0,p.jsx)(`th`,{className:`w-20 px-3 py-2.5`,children:(0,p.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,p.jsx)(`tbody`,{className:`divide-y divide-sand-100/80`,children:O.map(e=>{let t=T(w(e));return(0,p.jsxs)(`tr`,{className:`transition-colors duration-150 hover:bg-sand-100/60 ${e.active?``:`opacity-50`}`,children:[(0,p.jsx)(`td`,{className:`px-5 py-3`,children:(0,p.jsx)(`span`,{className:`text-xs font-medium text-sand-500 uppercase`,children:e.provider})}),(0,p.jsx)(`td`,{className:`px-5 py-3`,children:e.name?(0,p.jsx)(`span`,{className:`text-sm text-sand-700`,children:e.name}):(0,p.jsx)(`span`,{className:`text-[11px] text-sand-400`,children:`—`})}),(0,p.jsx)(`td`,{className:`px-5 py-3`,children:(0,p.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:C(e.credentials)})}),(0,p.jsx)(`td`,{className:`px-5 py-3`,children:(0,p.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e.active,"aria-label":`${e.name||e.provider} active`,className:`relative inline-flex h-5 w-9 items-center rounded-full transition-colors duration-200 ${e.active?`bg-sage-400`:`bg-sand-300`}`,onClick:()=>y(e),disabled:_.isPending||!e.active&&e.reauth_required,title:!e.active&&e.reauth_required?`재로그인이 필요한 토큰입니다`:void 0,children:(0,p.jsx)(`span`,{className:`inline-block h-3.5 w-3.5 rounded-full bg-white transition-transform duration-200 ${e.active?`translate-x-4.5`:`translate-x-0.5`}`})})}),(0,p.jsx)(`td`,{className:`px-5 py-3`,children:t.text&&(0,p.jsx)(`span`,{className:`text-xs ${t.color}`,children:t.text})}),(0,p.jsx)(`td`,{className:`px-3 py-3`,children:(0,p.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,p.jsx)(`button`,{type:`button`,"aria-label":`Edit token`,className:`p-1 rounded text-sand-400 hover:text-sienna-500 transition-colors duration-150`,onClick:()=>E(e),children:(0,p.jsx)(x,{className:`size-4`})}),(0,p.jsx)(`button`,{type:`button`,"aria-label":`Delete token`,className:`p-1 rounded text-sand-400 hover:text-red-500 transition-colors duration-150`,onClick:()=>a(e),children:(0,p.jsx)(S,{className:`size-4`})})]})})]},e.id)})})]})})}),o&&(0,p.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 bg-sand-900/8 backdrop-blur-sm`,onClick:()=>c(null),onKeyDown:()=>{}}),(0,p.jsxs)(`div`,{className:`relative panel shadow-xl w-full max-w-sm mx-4`,children:[(0,p.jsx)(`div`,{className:`px-5 py-4 border-b border-sand-100/60`,children:(0,p.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Edit Token`})}),(0,p.jsx)(`div`,{className:`px-5 py-4 space-y-3`,children:(0,p.jsxs)(`div`,{children:[(0,p.jsx)(`label`,{htmlFor:`token-name`,className:`text-[10px] uppercase tracking-wider text-sand-500 font-medium`,children:`Name`}),(0,p.jsx)(i,{value:l,onChange:e=>d(e.target.value),placeholder:`e.g. prod, dev, team-a`,className:`mt-1 w-full border border-sand-200 rounded-md px-3 py-2 text-sm text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`})]})}),(0,p.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100/60 flex items-center justify-end gap-2`,children:[(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:()=>c(null),children:`Cancel`}),(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-sienna-400 text-white hover:bg-sienna-500 disabled:opacity-50 transition-colors duration-150`,disabled:g.isPending,onClick:D,children:g.isPending?`Saving...`:`Save`})]})]})]}),n&&(0,p.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-start justify-center pt-[15vh]`,children:[(0,p.jsx)(`div`,{className:`absolute inset-0 bg-sand-900/8 backdrop-blur-sm`,onClick:()=>a(null),onKeyDown:()=>{}}),(0,p.jsxs)(`div`,{className:`relative panel shadow-xl w-full max-w-sm mx-4`,children:[(0,p.jsxs)(`div`,{className:`px-5 py-4`,children:[(0,p.jsx)(`h3`,{className:`text-base font-medium text-sand-900`,children:`Remove Token`}),(0,p.jsxs)(`p`,{className:`text-sm text-sand-700 mt-2`,children:[`Are you sure you want to remove`,` `,(0,p.jsx)(`code`,{className:`text-[13px] font-mono text-sand-800`,children:C(n.credentials)}),n.name&&(0,p.jsxs)(`span`,{className:`text-sand-500`,children:[` (`,n.name,`)`]}),`?`]})]}),(0,p.jsxs)(`div`,{className:`px-5 py-3 border-t border-sand-100/60 flex items-center justify-end gap-2`,children:[(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md border border-sand-200 text-sand-600 hover:bg-sand-100 transition-colors duration-150`,onClick:()=>a(null),children:`Cancel`}),(0,p.jsx)(`button`,{type:`button`,className:`px-3 py-1 text-xs font-medium rounded-md bg-red-500 text-white hover:bg-red-600 disabled:opacity-50 transition-colors duration-150`,disabled:h.isPending,onClick:b,children:h.isPending?`Removing...`:`Remove`})]})]})]})]})}function D(){let{data:e,isLoading:t}=c.useTokens(`A`);return(0,p.jsxs)(`div`,{className:`max-w-6xl mx-auto space-y-4`,children:[(0,p.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,p.jsx)(b,{})}),(0,p.jsx)(E,{data:e?.rows,isLoading:t})]})}export{D as component};
@@ -1 +1 @@
1
- import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n}from"./vendor-react-8xo7RSum.js";import{N as r}from"./vendor-tanstack-6B86itGS.js";import{t as i}from"./clsx-DB0hHKMi.js";import{o as a,u as o}from"./index-Wi8Wxte6.js";var s=e(t(),1),c=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},l=(e,t)=>({classGroupId:e,validator:t}),u=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),d=`-`,f=[],p=`arbitrary..`,m=e=>{let t=_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return g(e);let n=e.split(d);return h(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?c(i,t):t:i||f}return n[e]||f}}},h=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=h(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(d):e.slice(t).join(d),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},g=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?p+r:void 0})(),_=e=>{let{theme:t,classGroups:n}=e;return v(n,t)},v=(e,t)=>{let n=u();for(let r in e){let i=e[r];y(i,n,r,t)}return n},y=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];b(i,t,n,r)}},b=(e,t,n,r)=>{typeof e==`string`?x(e,t,n):typeof e==`function`?S(e,t,n,r):C(e,t,n,r)},x=(e,t,n)=>{let r=e===``?t:w(t,e);r.classGroupId=n},S=(e,t,n,r)=>{T(e)?y(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(l(n,e)))},C=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];y(o,w(t,a),n,r)}},w=(e,t)=>{let n=e,r=t.split(d),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=u(),n.nextPart.set(t,i)),n=i}return n},T=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ee=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},E=`!`,D=`:`,te=[],O=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),k=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===D){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(E)?(c=s.slice(0,-1),l=!0):s.startsWith(E)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return O(t,l,c,u)};if(t){let e=t+D,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):O(te,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},A=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},j=e=>({cache:ee(e.cacheSize),parseClassName:k(e),sortModifiers:A(e),postfixLookupClassGroupIds:ne(e),...m(e)}),ne=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},re=/\s+/,M=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(re),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+E:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},ie=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ae(n))&&(i&&(i+=` `),i+=r);return i},ae=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ae(e[r]))&&(n&&(n+=` `),n+=t);return n},oe=(e,...t)=>{let n,r,i,a,o=o=>(n=j(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=M(e,n);return i(e,a),a};return a=o,(...e)=>a(ie(...e))},N=[],P=e=>{let t=t=>t[e]||N;return t.isThemeGetter=!0,t.themeKey=e,t},F=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,I=/^\((?:(\w[\w-]*):)?(.+)\)$/i,L=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,se=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,R=/\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$/,ce=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,z=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,V=e=>L.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),U=e=>!!e&&Number.isInteger(Number(e)),le=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),W=e=>se.test(e),ue=()=>!0,G=e=>R.test(e)&&!ce.test(e),K=()=>!1,de=e=>z.test(e),fe=e=>B.test(e),pe=e=>!q(e)&&!Y(e),me=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),he=e=>Z(e,Ae,K),q=e=>F.test(e),J=e=>Z(e,je,G),ge=e=>Z(e,Me,H),_e=e=>Z(e,Pe,ue),ve=e=>Z(e,Ne,K),ye=e=>Z(e,Oe,K),be=e=>Z(e,ke,fe),xe=e=>Z(e,Fe,de),Y=e=>I.test(e),X=e=>Q(e,je),Se=e=>Q(e,Ne),Ce=e=>Q(e,Oe),we=e=>Q(e,Ae),Te=e=>Q(e,ke),Ee=e=>Q(e,Fe,!0),De=e=>Q(e,Pe,!0),Z=(e,t,n)=>{let r=F.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Q=(e,t,n=!1)=>{let r=I.exec(e);return r?r[1]?t(r[1]):n:!1},Oe=e=>e===`position`||e===`percentage`,ke=e=>e===`image`||e===`url`,Ae=e=>e===`length`||e===`size`||e===`bg-size`,je=e=>e===`length`,Me=e=>e===`number`,Ne=e=>e===`family-name`,Pe=e=>e===`number`||e===`weight`,Fe=e=>e===`shadow`,Ie=oe(()=>{let e=P(`color`),t=P(`font`),n=P(`text`),r=P(`font-weight`),i=P(`tracking`),a=P(`leading`),o=P(`breakpoint`),s=P(`container`),c=P(`spacing`),l=P(`radius`),u=P(`shadow`),d=P(`inset-shadow`),f=P(`text-shadow`),p=P(`drop-shadow`),m=P(`blur`),h=P(`perspective`),g=P(`aspect`),_=P(`ease`),v=P(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,q,c],T=()=>[V,`full`,`auto`,...w()],ee=()=>[U,`none`,`subgrid`,Y,q],E=()=>[`auto`,{span:[`full`,U,Y,q]},U,Y,q],D=()=>[U,`auto`,Y,q],te=()=>[`auto`,`min`,`max`,`fr`,Y,q],O=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[V,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[s,V,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[V,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,Y,q],ie=()=>[...b(),Ce,ye,{position:[Y,q]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,we,he,{size:[Y,q]}],N=()=>[le,X,J],F=()=>[``,`none`,`full`,l,Y,q],I=()=>[``,H,X,J],L=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[H,le,Ce,ye],ce=()=>[``,`none`,m,Y,q],z=()=>[`none`,H,Y,q],B=()=>[`none`,H,Y,q],G=()=>[H,Y,q],K=()=>[V,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[W],breakpoint:[W],color:[ue],container:[W],"drop-shadow":[W],ease:[`in`,`out`,`in-out`],font:[pe],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[W],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[W],shadow:[W],spacing:[`px`,H],text:[W],"text-shadow":[W],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,V,q,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,q]}],"container-named":[me],columns:[{columns:[H,`auto`,q,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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`],sr:[`sr-only`,`not-sr-only`],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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[U,`auto`,Y,q]}],basis:[{basis:[V,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,V,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,H,Y,q]}],shrink:[{shrink:[``,H,Y,q]}],order:[{order:[U,`first`,`last`,`none`,Y,q]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...O(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...O()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...j()]}],"font-size":[{text:[`base`,n,X,J]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,De,_e]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,le,q]}],"font-family":[{font:[Se,ve,t]}],"font-features":[{"font-features":[q]}],"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:[i,Y,q]}],"line-clamp":[{"line-clamp":[H,`none`,Y,ge]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,Y,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,Y,J]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[H,`auto`,Y,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[U,Y,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},U,Y,q],radial:[``,Y,q],conic:[``,U,Y,q]},Te,be]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"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-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":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()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,Y,q]}],"outline-w":[{outline:[``,H,X,J]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`inner`,`none`,u,Ee,xe]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ee,xe]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[H,J]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,Ee,xe]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[H,Y,q]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Y,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,q]}],filter:[{filter:[``,`none`,Y,q]}],blur:[{blur:ce()}],brightness:[{brightness:[H,Y,q]}],contrast:[{contrast:[H,Y,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ee,xe]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,H,Y,q]}],"hue-rotate":[{"hue-rotate":[H,Y,q]}],invert:[{invert:[``,H,Y,q]}],saturate:[{saturate:[H,Y,q]}],sepia:[{sepia:[``,H,Y,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,q]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[H,Y,q]}],"backdrop-contrast":[{"backdrop-contrast":[H,Y,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,H,Y,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,Y,q]}],"backdrop-invert":[{"backdrop-invert":[``,H,Y,q]}],"backdrop-opacity":[{"backdrop-opacity":[H,Y,q]}],"backdrop-saturate":[{"backdrop-saturate":[H,Y,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,H,Y,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[H,`initial`,Y,q]}],ease:[{ease:[`linear`,`initial`,_,Y,q]}],delay:[{delay:[H,Y,q]}],animate:[{animate:[`none`,v,Y,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":[`scale-3d`],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[Y,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":[`translate-none`],zoom:[{zoom:[U,Y,q]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],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`,Y,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,Y,q]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[H,X,J,ge]}],stroke:[{stroke:[`none`,...M()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`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-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Le(...e){return Ie(i(e))}var $=n(),Re=(0,s.forwardRef)(({title:e,titleId:t,...n},r)=>(0,$.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,$.jsx)(`title`,{id:t,children:e}):null,(0,$.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M18 6L6 18M6 6l12 12`})]}));new Map(Object.entries({Æ:`Ae`,Ð:`D`,Ø:`O`,Þ:`Th`,ß:`ss`,æ:`ae`,ð:`d`,ø:`o`,þ:`th`,Đ:`D`,đ:`d`,Ħ:`H`,ħ:`h`,ı:`i`,IJ:`IJ`,ij:`ij`,ĸ:`k`,Ŀ:`L`,ŀ:`l`,Ł:`L`,ł:`l`,ʼn:`'n`,Ŋ:`N`,ŋ:`n`,Œ:`Oe`,œ:`oe`,Ŧ:`T`,ŧ:`t`,ſ:`s`}));function ze(e){return typeof e==`function`}var Be=s.forwardRef(({className:e,type:t,onValueChange:n,onChange:r,clearable:i=!1,...a},o)=>{let c=s.useRef(null),l=s.useCallback(e=>{c.current=e,ze(o)?o(e):o&&(o.current=e)},[o]),u=a.value!==void 0,[d,f]=s.useState(()=>String(a.defaultValue??``).length>0),p=u?String(a.value??``).length>0:d,m=e=>{u||f(e.target.value.length>0),n?.(e.target.value),r?.(e)},h=()=>{let e=c.current;e&&((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.focus()),u||f(!1)},g=i&&p&&!a.disabled&&!a.readOnly,_=(0,$.jsx)(`input`,{type:t,"data-slot":`input`,className:Le(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`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`,i&&`pr-8`,e),ref:l,...a,onChange:m});return i?(0,$.jsxs)(`div`,{className:`relative w-full`,children:[_,g&&(0,$.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":`Clear`,onMouseDown:e=>e.preventDefault(),onClick:h,className:`absolute right-2 top-1/2 -translate-y-1/2 flex items-center justify-center text-muted-foreground opacity-60 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,$.jsx)(Re,{className:`h-4 w-4`})})]}):_});Be.displayName=`Input`;var Ve={openai:`새 탭에서 OpenAI 로그인을 완료한 뒤 연결 실패 화면이 나타나면, 주소창의 전체 URL을 아래에 붙여넣으세요.`,anthropic:`새 탭에서 Claude 로그인을 완료하면 코드가 표시됩니다. 코드 전체를 아래에 붙여넣으세요.`,grok:`새 탭에서 xAI(auth.x.ai) 로그인을 완료하면 127.0.0.1 주소로 이동하며 페이지가 열리지 않습니다. 주소창의 전체 URL(또는 그 안의 code 값)을 아래에 붙여넣으세요.`},He={openai:`http://localhost:1455/auth/callback?code=...&state=...`,anthropic:`code#state`,grok:`http://127.0.0.1:.../callback?code=...&state=...`};function Ue({provider:e,isPending:t,isError:n,onSubmit:r,onRestart:i}){let[a,o]=(0,s.useState)(``);return(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`p`,{className:`text-[12px] text-sand-600 leading-relaxed`,children:Ve[e]}),(0,$.jsx)(Be,{value:a,onChange:e=>o(e.target.value),placeholder:He[e],className:`w-full border border-sand-200 rounded-md px-3 py-2 text-sm font-mono text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`}),n&&(0,$.jsx)(`p`,{className:`text-[11px] text-red-500`,children:`인증 결과 확인에 실패했습니다 — 전체 값을 다시 붙여넣거나 로그인을 다시 시작하세요.`}),(0,$.jsx)(`button`,{type:`button`,className:`w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white hover:bg-sand-800 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2`,disabled:!a.trim()||t,onClick:()=>r(a),children:t?(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin`}),`Verifying...`]}):`Complete login`}),(0,$.jsx)(`button`,{type:`button`,className:`w-full py-1.5 text-[12px] text-sand-500 hover:text-sand-700 transition-colors duration-150`,onClick:()=>{o(``),i()},children:`처음부터 다시 시작`})]})}var We=[`anthropic`,`openai`,`grok`];function Ge(e){return We.some(t=>t===e)}var Ke=3e3,qe=3e5,Je=5,Ye=3,Xe=`Grok login failed`;function Ze(e){if(e)try{return new URL(e).protocol===`https:`?e:void 0}catch{return}}async function Qe(e,t){let{rows:n}=await o.getTokens(`A`,{num:0,queryMode:`list`});return new Set(n.filter(n=>n.provider===e&&n.name===t).map(e=>e.id))}function $e(){let[e,t]=(0,s.useState)(null),[n,i]=(0,s.useState)(null),[o,c]=(0,s.useState)(null),l=r(),u=a.useOauthStartMutation(),d=a.useOauthStartOpenAIMutation(),f=a.useOauthStartGrokMutation(),p=a.useOauthCompleteMutation(),m=(0,s.useRef)({}),h=(0,s.useRef)(0),g=(0,s.useCallback)(()=>{h.current+=1,m.current.interval!==void 0&&clearInterval(m.current.interval),m.current.timeout!==void 0&&clearTimeout(m.current.timeout),m.current={}},[]);(0,s.useEffect)(()=>g,[g]);let _=()=>Promise.all([l.invalidateQueries({queryKey:[`Token`]}),l.invalidateQueries({queryKey:[`Qgrid`]})]);return{loadingProvider:e,codeEntryProvider:n,deviceFlow:o,start:async(e,n)=>{let r=n.trim();if(!r)return;g();let a=h.current;c(null);let o=window.open(`about:blank`,`_blank`);t(e);try{if(e===`grok`){let{authUrl:n}=await f.mutateAsync({name:r});if(a!==h.current){o?.close();return}let s=Ze(n);if(!s)throw Error(`Grok login URL is not https`);o?o.location.href=s:window.open(s,`_blank`),i(e),t(null);return}if(e===`openai`){let n=await Qe(e,r);if(a!==h.current){o?.close();return}let{authUrl:s,mode:c}=await d.mutateAsync({name:r});if(a!==h.current){o?.close();return}if(o?o.location.href=s:window.open(s,`_blank`),c===`code`){i(e),t(null);return}m.current.interval=window.setInterval(()=>{Qe(e,r).then(e=>{a===h.current&&[...e].some(e=>!n.has(e))&&(g(),t(null),_())}).catch(()=>{})},Ke),m.current.timeout=window.setTimeout(()=>{a===h.current&&(g(),t(null))},qe);return}let{authUrl:n,mode:s}=await u.mutateAsync({name:r});if(a!==h.current){o?.close();return}s===`code`?(o?o.location.href=n:window.open(n,`_blank`),i(e),t(null)):(o?.close(),window.location.href=n)}catch(e){if(o?.close(),a!==h.current)return;console.error(`OAuth start failed:`,e),t(null)}},startDevice:async(e,n)=>{let r=e.trim();if(!r)return;g();let o=h.current;i(null),t(null),c({status:`starting`});let s;try{s=await a.oauthStartGrokDevice(r)}catch(e){if(o!==h.current)return;console.error(`Grok device login start failed:`,e),c({status:`error`,message:e instanceof Error&&e.message?e.message:Xe});return}if(o!==h.current)return;let{deviceCode:l}=s,u=Ze(s.verificationUri);if(!u){c({status:`error`,message:`Grok verification URL is not https`});return}let d=Ze(s.verificationUriComplete),f=Date.now()+s.expiresIn*1e3,p=Math.max(s.interval,1),v=0,y={status:`waiting`,userCode:s.userCode,verificationUri:u,expiresAt:f,slowDown:!1};d&&(y.verificationUriComplete=d),c(y);let b=()=>{let e=Math.min(p*1e3,Math.max(f-Date.now(),0));m.current.timeout=window.setTimeout(()=>void x(),e)},x=async()=>{if(o!==h.current)return;if(Date.now()>=f){c({status:`expired`});return}let e;try{e=await a.oauthPollGrokDevice(l)}catch(e){if(o!==h.current)return;if(v+=1,v>=Ye){console.error(`Grok device login poll failed:`,e),c({status:`error`,message:e instanceof Error&&e.message?e.message:Xe});return}b();return}o===h.current&&(v=0,e.status===`added`?(c({status:`added`,name:e.name??r}),await _(),o===h.current&&n?.()):(e.status===`slow_down`?(p=e.intervalSec??p+Je,c(e=>e?.status===`waiting`?{...e,slowDown:!0}:e)):e.intervalSec!==void 0&&(p=e.intervalSec),p=Math.max(p,1),b()))};b()},submitCode:async e=>{let t=e.trim();if(!t)return!1;try{await p.mutateAsync({pastedCode:t})}catch(e){return console.error(`OAuth complete failed:`,e),!1}return await _(),!0},reset:()=>{g(),t(null),i(null),c(null),p.reset()},completeMutation:p}}export{Be as i,$e as n,Ue as r,Ge as t};
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n}from"./vendor-react-8xo7RSum.js";import{N as r}from"./vendor-tanstack-6B86itGS.js";import{t as i}from"./clsx-DB0hHKMi.js";import{o as a,u as o}from"./index-Cb14ZYfq.js";var s=e(t(),1),c=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},l=(e,t)=>({classGroupId:e,validator:t}),u=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),d=`-`,f=[],p=`arbitrary..`,m=e=>{let t=_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return g(e);let n=e.split(d);return h(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?c(i,t):t:i||f}return n[e]||f}}},h=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=h(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(d):e.slice(t).join(d),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},g=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?p+r:void 0})(),_=e=>{let{theme:t,classGroups:n}=e;return v(n,t)},v=(e,t)=>{let n=u();for(let r in e){let i=e[r];y(i,n,r,t)}return n},y=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];b(i,t,n,r)}},b=(e,t,n,r)=>{typeof e==`string`?x(e,t,n):typeof e==`function`?S(e,t,n,r):C(e,t,n,r)},x=(e,t,n)=>{let r=e===``?t:w(t,e);r.classGroupId=n},S=(e,t,n,r)=>{T(e)?y(e(r),t,n,r):(t.validators===null&&(t.validators=[]),t.validators.push(l(n,e)))},C=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];y(o,w(t,a),n,r)}},w=(e,t)=>{let n=e,r=t.split(d),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=u(),n.nextPart.set(t,i)),n=i}return n},T=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ee=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},E=`!`,D=`:`,te=[],O=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),k=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===D){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(E)?(c=s.slice(0,-1),l=!0):s.startsWith(E)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return O(t,l,c,u)};if(t){let e=t+D,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):O(te,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},A=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},j=e=>({cache:ee(e.cacheSize),parseClassName:k(e),sortModifiers:A(e),postfixLookupClassGroupIds:ne(e),...m(e)}),ne=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},re=/\s+/,M=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(re),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h||(g=r(p),!g)){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+E:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},ie=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=ae(n))&&(i&&(i+=` `),i+=r);return i},ae=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=ae(e[r]))&&(n&&(n+=` `),n+=t);return n},oe=(e,...t)=>{let n,r,i,a,o=o=>(n=j(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=M(e,n);return i(e,a),a};return a=o,(...e)=>a(ie(...e))},N=[],P=e=>{let t=t=>t[e]||N;return t.isThemeGetter=!0,t.themeKey=e,t},F=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,I=/^\((?:(\w[\w-]*):)?(.+)\)$/i,L=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,se=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,R=/\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$/,ce=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix|color|light-dark)\(.+\)$/,z=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,B=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,V=e=>L.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),U=e=>!!e&&Number.isInteger(Number(e)),le=e=>e.endsWith(`%`)&&H(e.slice(0,-1)),W=e=>se.test(e),ue=()=>!0,G=e=>R.test(e)&&!ce.test(e),K=()=>!1,de=e=>z.test(e),fe=e=>B.test(e),pe=e=>!q(e)&&!Y(e),me=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),he=e=>Z(e,Ae,K),q=e=>F.test(e),J=e=>Z(e,je,G),ge=e=>Z(e,Me,H),_e=e=>Z(e,Pe,ue),ve=e=>Z(e,Ne,K),ye=e=>Z(e,Oe,K),be=e=>Z(e,ke,fe),xe=e=>Z(e,Fe,de),Y=e=>I.test(e),X=e=>Q(e,je),Se=e=>Q(e,Ne),Ce=e=>Q(e,Oe),we=e=>Q(e,Ae),Te=e=>Q(e,ke),Ee=e=>Q(e,Fe,!0),De=e=>Q(e,Pe,!0),Z=(e,t,n)=>{let r=F.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Q=(e,t,n=!1)=>{let r=I.exec(e);return r?r[1]?t(r[1]):n:!1},Oe=e=>e===`position`||e===`percentage`,ke=e=>e===`image`||e===`url`,Ae=e=>e===`length`||e===`size`||e===`bg-size`,je=e=>e===`length`,Me=e=>e===`number`,Ne=e=>e===`family-name`,Pe=e=>e===`number`||e===`weight`,Fe=e=>e===`shadow`,Ie=oe(()=>{let e=P(`color`),t=P(`font`),n=P(`text`),r=P(`font-weight`),i=P(`tracking`),a=P(`leading`),o=P(`breakpoint`),s=P(`container`),c=P(`spacing`),l=P(`radius`),u=P(`shadow`),d=P(`inset-shadow`),f=P(`text-shadow`),p=P(`drop-shadow`),m=P(`blur`),h=P(`perspective`),g=P(`aspect`),_=P(`ease`),v=P(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Y,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Y,q,c],T=()=>[V,`full`,`auto`,...w()],ee=()=>[U,`none`,`subgrid`,Y,q],E=()=>[`auto`,{span:[`full`,U,Y,q]},U,Y,q],D=()=>[U,`auto`,Y,q],te=()=>[`auto`,`min`,`max`,`fr`,Y,q],O=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],k=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],A=()=>[`auto`,...w()],j=()=>[V,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ne=()=>[s,V,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],re=()=>[V,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,Y,q],ie=()=>[...b(),Ce,ye,{position:[Y,q]}],ae=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],oe=()=>[`auto`,`cover`,`contain`,we,he,{size:[Y,q]}],N=()=>[le,X,J],F=()=>[``,`none`,`full`,l,Y,q],I=()=>[``,H,X,J],L=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],R=()=>[H,le,Ce,ye],ce=()=>[``,`none`,m,Y,q],z=()=>[`none`,H,Y,q],B=()=>[`none`,H,Y,q],G=()=>[H,Y,q],K=()=>[V,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[W],breakpoint:[W],color:[ue],container:[W],"drop-shadow":[W],ease:[`in`,`out`,`in-out`],font:[pe],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[W],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[W],shadow:[W],spacing:[`px`,H],text:[W],"text-shadow":[W],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,V,q,Y,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Y,q]}],"container-named":[me],columns:[{columns:[H,`auto`,q,Y,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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`],sr:[`sr-only`,`not-sr-only`],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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[U,`auto`,Y,q]}],basis:[{basis:[V,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[H,V,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,H,Y,q]}],shrink:[{shrink:[``,H,Y,q]}],order:[{order:[U,`first`,`last`,`none`,Y,q]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:E()}],"col-start":[{"col-start":D()}],"col-end":[{"col-end":D()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:E()}],"row-start":[{"row-start":D()}],"row-end":[{"row-end":D()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":te()}],"auto-rows":[{"auto-rows":te()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...O(),`normal`]}],"justify-items":[{"justify-items":[...k(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...k()]}],"align-content":[{content:[`normal`,...O()]}],"align-items":[{items:[...k(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...k(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":O()}],"place-items":[{"place-items":[...k(),`baseline`]}],"place-self":[{"place-self":[`auto`,...k()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:j()}],"inline-size":[{inline:[`auto`,...ne()]}],"min-inline-size":[{"min-inline":[`auto`,...ne()]}],"max-inline-size":[{"max-inline":[`none`,...ne()]}],"block-size":[{block:[`auto`,...re()]}],"min-block-size":[{"min-block":[`auto`,...re()]}],"max-block-size":[{"max-block":[`none`,...re()]}],w:[{w:[s,`screen`,...j()]}],"min-w":[{"min-w":[s,`screen`,`none`,...j()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...j()]}],h:[{h:[`screen`,`lh`,...j()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...j()]}],"max-h":[{"max-h":[`screen`,`lh`,`none`,...j()]}],"font-size":[{text:[`base`,n,X,J]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,De,_e]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,le,q]}],"font-family":[{font:[Se,ve,t]}],"font-features":[{"font-features":[q]}],"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:[i,Y,q]}],"line-clamp":[{"line-clamp":[H,`none`,Y,ge]}],leading:[{leading:[`none`,a,...w()]}],"list-image":[{"list-image":[`none`,Y,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Y,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...L(),`wavy`]}],"text-decoration-thickness":[{decoration:[H,`from-font`,`auto`,Y,J]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[H,`auto`,Y,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[U,Y,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Y,q]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Y,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:ae()}],"bg-size":[{bg:oe()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},U,Y,q],radial:[``,Y,q],conic:[``,U,Y,q]},Te,be]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:N()}],"gradient-via-pos":[{via:N()}],"gradient-to-pos":[{to:N()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:F()}],"rounded-s":[{"rounded-s":F()}],"rounded-e":[{"rounded-e":F()}],"rounded-t":[{"rounded-t":F()}],"rounded-r":[{"rounded-r":F()}],"rounded-b":[{"rounded-b":F()}],"rounded-l":[{"rounded-l":F()}],"rounded-ss":[{"rounded-ss":F()}],"rounded-se":[{"rounded-se":F()}],"rounded-ee":[{"rounded-ee":F()}],"rounded-es":[{"rounded-es":F()}],"rounded-tl":[{"rounded-tl":F()}],"rounded-tr":[{"rounded-tr":F()}],"rounded-br":[{"rounded-br":F()}],"rounded-bl":[{"rounded-bl":F()}],"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-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":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()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...L(),`hidden`,`none`]}],"divide-style":[{divide:[...L(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...L(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[H,Y,q]}],"outline-w":[{outline:[``,H,X,J]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`inner`,`none`,u,Ee,xe]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ee,xe]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[H,J]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,Ee,xe]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[H,Y,q]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":R()}],"mask-image-linear-to-pos":[{"mask-linear-to":R()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":R()}],"mask-image-t-to-pos":[{"mask-t-to":R()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":R()}],"mask-image-r-to-pos":[{"mask-r-to":R()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":R()}],"mask-image-b-to-pos":[{"mask-b-to":R()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":R()}],"mask-image-l-to-pos":[{"mask-l-to":R()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":R()}],"mask-image-x-to-pos":[{"mask-x-to":R()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":R()}],"mask-image-y-to-pos":[{"mask-y-to":R()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[Y,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":R()}],"mask-image-radial-to-pos":[{"mask-radial-to":R()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":R()}],"mask-image-conic-to-pos":[{"mask-conic-to":R()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:ae()}],"mask-size":[{mask:oe()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Y,q]}],filter:[{filter:[``,`none`,Y,q]}],blur:[{blur:ce()}],brightness:[{brightness:[H,Y,q]}],contrast:[{contrast:[H,Y,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ee,xe]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,H,Y,q]}],"hue-rotate":[{"hue-rotate":[H,Y,q]}],invert:[{invert:[``,H,Y,q]}],saturate:[{saturate:[H,Y,q]}],sepia:[{sepia:[``,H,Y,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Y,q]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[H,Y,q]}],"backdrop-contrast":[{"backdrop-contrast":[H,Y,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,H,Y,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,Y,q]}],"backdrop-invert":[{"backdrop-invert":[``,H,Y,q]}],"backdrop-opacity":[{"backdrop-opacity":[H,Y,q]}],"backdrop-saturate":[{"backdrop-saturate":[H,Y,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,H,Y,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Y,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[H,`initial`,Y,q]}],ease:[{ease:[`linear`,`initial`,_,Y,q]}],delay:[{delay:[H,Y,q]}],animate:[{animate:[`none`,v,Y,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Y,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:z()}],"rotate-x":[{"rotate-x":z()}],"rotate-y":[{"rotate-y":z()}],"rotate-z":[{"rotate-z":z()}],scale:[{scale:B()}],"scale-x":[{"scale-x":B()}],"scale-y":[{"scale-y":B()}],"scale-z":[{"scale-z":B()}],"scale-3d":[`scale-3d`],skew:[{skew:G()}],"skew-x":[{"skew-x":G()}],"skew-y":[{"skew-y":G()}],transform:[{transform:[Y,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:K()}],"translate-x":[{"translate-x":K()}],"translate-y":[{"translate-y":K()}],"translate-z":[{"translate-z":K()}],"translate-none":[`translate-none`],zoom:[{zoom:[U,Y,q]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],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`,Y,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,Y,q]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[H,X,J,ge]}],stroke:[{stroke:[`none`,...M()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`start`,`end`,`right`,`left`],"inset-y":[`inset-bs`,`inset-be`,`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`ps`,`pe`,`pr`,`pl`],py:[`pbs`,`pbe`,`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`ms`,`me`,`mr`,`ml`],my:[`mbs`,`mbe`,`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-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-s`,`border-w-e`,`border-w-r`,`border-w-l`],"border-w-y":[`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-s`,`border-color-e`,`border-color-r`,`border-color-l`],"border-color-y":[`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-ms`,`scroll-me`,`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-ps`,`scroll-pe`,`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Le(...e){return Ie(i(e))}var $=n(),Re=(0,s.forwardRef)(({title:e,titleId:t,...n},r)=>(0,$.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,$.jsx)(`title`,{id:t,children:e}):null,(0,$.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M18 6L6 18M6 6l12 12`})]}));new Map(Object.entries({Æ:`Ae`,Ð:`D`,Ø:`O`,Þ:`Th`,ß:`ss`,æ:`ae`,ð:`d`,ø:`o`,þ:`th`,Đ:`D`,đ:`d`,Ħ:`H`,ħ:`h`,ı:`i`,IJ:`IJ`,ij:`ij`,ĸ:`k`,Ŀ:`L`,ŀ:`l`,Ł:`L`,ł:`l`,ʼn:`'n`,Ŋ:`N`,ŋ:`n`,Œ:`Oe`,œ:`oe`,Ŧ:`T`,ŧ:`t`,ſ:`s`}));function ze(e){return typeof e==`function`}var Be=s.forwardRef(({className:e,type:t,onValueChange:n,onChange:r,clearable:i=!1,...a},o)=>{let c=s.useRef(null),l=s.useCallback(e=>{c.current=e,ze(o)?o(e):o&&(o.current=e)},[o]),u=a.value!==void 0,[d,f]=s.useState(()=>String(a.defaultValue??``).length>0),p=u?String(a.value??``).length>0:d,m=e=>{u||f(e.target.value.length>0),n?.(e.target.value),r?.(e)},h=()=>{let e=c.current;e&&((Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0})),e.focus()),u||f(!1)},g=i&&p&&!a.disabled&&!a.readOnly,_=(0,$.jsx)(`input`,{type:t,"data-slot":`input`,className:Le(`file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border px-3 py-1 text-base bg-input-background transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,`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`,i&&`pr-8`,e),ref:l,...a,onChange:m});return i?(0,$.jsxs)(`div`,{className:`relative w-full`,children:[_,g&&(0,$.jsx)(`button`,{type:`button`,tabIndex:-1,"aria-label":`Clear`,onMouseDown:e=>e.preventDefault(),onClick:h,className:`absolute right-2 top-1/2 -translate-y-1/2 flex items-center justify-center text-muted-foreground opacity-60 hover:opacity-100 transition-opacity cursor-pointer`,children:(0,$.jsx)(Re,{className:`h-4 w-4`})})]}):_});Be.displayName=`Input`;var Ve={openai:`새 탭에서 OpenAI 로그인을 완료한 뒤 연결 실패 화면이 나타나면, 주소창의 전체 URL을 아래에 붙여넣으세요.`,anthropic:`새 탭에서 Claude 로그인을 완료하면 코드가 표시됩니다. 코드 전체를 아래에 붙여넣으세요.`,grok:`새 탭에서 xAI(auth.x.ai) 로그인을 완료하면 127.0.0.1 주소로 이동하며 페이지가 열리지 않습니다. 주소창의 전체 URL(또는 그 안의 code 값)을 아래에 붙여넣으세요.`},He={openai:`http://localhost:1455/auth/callback?code=...&state=...`,anthropic:`code#state`,grok:`http://127.0.0.1:.../callback?code=...&state=...`};function Ue({provider:e,isPending:t,isError:n,onSubmit:r,onRestart:i}){let[a,o]=(0,s.useState)(``);return(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsx)(`p`,{className:`text-[12px] text-sand-600 leading-relaxed`,children:Ve[e]}),(0,$.jsx)(Be,{value:a,onChange:e=>o(e.target.value),placeholder:He[e],className:`w-full border border-sand-200 rounded-md px-3 py-2 text-sm font-mono text-sand-900 bg-white placeholder:text-sand-300 focus:outline-none focus:border-sienna-300`}),n&&(0,$.jsx)(`p`,{className:`text-[11px] text-red-500`,children:`인증 결과 확인에 실패했습니다 — 전체 값을 다시 붙여넣거나 로그인을 다시 시작하세요.`}),(0,$.jsx)(`button`,{type:`button`,className:`w-full py-2.5 text-sm font-medium rounded-md bg-sand-900 text-white hover:bg-sand-800 disabled:opacity-50 transition-colors duration-150 flex items-center justify-center gap-2`,disabled:!a.trim()||t,onClick:()=>r(a),children:t?(0,$.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,$.jsx)(`span`,{className:`w-3.5 h-3.5 border-2 border-white border-t-transparent rounded-full animate-spin`}),`Verifying...`]}):`Complete login`}),(0,$.jsx)(`button`,{type:`button`,className:`w-full py-1.5 text-[12px] text-sand-500 hover:text-sand-700 transition-colors duration-150`,onClick:()=>{o(``),i()},children:`처음부터 다시 시작`})]})}var We=[`anthropic`,`openai`,`grok`];function Ge(e){return We.some(t=>t===e)}var Ke=3e3,qe=3e5,Je=5,Ye=3,Xe=`Grok login failed`;function Ze(e){if(e)try{return new URL(e).protocol===`https:`?e:void 0}catch{return}}async function Qe(e,t){let{rows:n}=await o.getTokens(`A`,{num:0,queryMode:`list`});return new Set(n.filter(n=>n.provider===e&&n.name===t).map(e=>e.id))}function $e(){let[e,t]=(0,s.useState)(null),[n,i]=(0,s.useState)(null),[o,c]=(0,s.useState)(null),l=r(),u=a.useOauthStartMutation(),d=a.useOauthStartOpenAIMutation(),f=a.useOauthStartGrokMutation(),p=a.useOauthCompleteMutation(),m=(0,s.useRef)({}),h=(0,s.useRef)(0),g=(0,s.useCallback)(()=>{h.current+=1,m.current.interval!==void 0&&clearInterval(m.current.interval),m.current.timeout!==void 0&&clearTimeout(m.current.timeout),m.current={}},[]);(0,s.useEffect)(()=>g,[g]);let _=()=>Promise.all([l.invalidateQueries({queryKey:[`Token`]}),l.invalidateQueries({queryKey:[`Qgrid`]})]);return{loadingProvider:e,codeEntryProvider:n,deviceFlow:o,start:async(e,n)=>{let r=n.trim();if(!r)return;g();let a=h.current;c(null);let o=window.open(`about:blank`,`_blank`);t(e);try{if(e===`grok`){let{authUrl:n}=await f.mutateAsync({name:r});if(a!==h.current){o?.close();return}let s=Ze(n);if(!s)throw Error(`Grok login URL is not https`);o?o.location.href=s:window.open(s,`_blank`),i(e),t(null);return}if(e===`openai`){let n=await Qe(e,r);if(a!==h.current){o?.close();return}let{authUrl:s,mode:c}=await d.mutateAsync({name:r});if(a!==h.current){o?.close();return}if(o?o.location.href=s:window.open(s,`_blank`),c===`code`){i(e),t(null);return}m.current.interval=window.setInterval(()=>{Qe(e,r).then(e=>{a===h.current&&[...e].some(e=>!n.has(e))&&(g(),t(null),_())}).catch(()=>{})},Ke),m.current.timeout=window.setTimeout(()=>{a===h.current&&(g(),t(null))},qe);return}let{authUrl:n,mode:s}=await u.mutateAsync({name:r});if(a!==h.current){o?.close();return}s===`code`?(o?o.location.href=n:window.open(n,`_blank`),i(e),t(null)):(o?.close(),window.location.href=n)}catch(e){if(o?.close(),a!==h.current)return;console.error(`OAuth start failed:`,e),t(null)}},startDevice:async(e,n)=>{let r=e.trim();if(!r)return;g();let o=h.current;i(null),t(null),c({status:`starting`});let s;try{s=await a.oauthStartGrokDevice(r)}catch(e){if(o!==h.current)return;console.error(`Grok device login start failed:`,e),c({status:`error`,message:e instanceof Error&&e.message?e.message:Xe});return}if(o!==h.current)return;let{deviceCode:l}=s,u=Ze(s.verificationUri);if(!u){c({status:`error`,message:`Grok verification URL is not https`});return}let d=Ze(s.verificationUriComplete),f=Date.now()+s.expiresIn*1e3,p=Math.max(s.interval,1),v=0,y={status:`waiting`,userCode:s.userCode,verificationUri:u,expiresAt:f,slowDown:!1};d&&(y.verificationUriComplete=d),c(y);let b=()=>{let e=Math.min(p*1e3,Math.max(f-Date.now(),0));m.current.timeout=window.setTimeout(()=>void x(),e)},x=async()=>{if(o!==h.current)return;if(Date.now()>=f){c({status:`expired`});return}let e;try{e=await a.oauthPollGrokDevice(l)}catch(e){if(o!==h.current)return;if(v+=1,v>=Ye){console.error(`Grok device login poll failed:`,e),c({status:`error`,message:e instanceof Error&&e.message?e.message:Xe});return}b();return}o===h.current&&(v=0,e.status===`added`?(c({status:`added`,name:e.name??r}),await _(),o===h.current&&n?.()):(e.status===`slow_down`?(p=e.intervalSec??p+Je,c(e=>e?.status===`waiting`?{...e,slowDown:!0}:e)):e.intervalSec!==void 0&&(p=e.intervalSec),p=Math.max(p,1),b()))};b()},submitCode:async e=>{let t=e.trim();if(!t)return!1;try{await p.mutateAsync({pastedCode:t})}catch(e){return console.error(`OAuth complete failed:`,e),!1}return await _(),!0},reset:()=>{g(),t(null),i(null),c(null),p.reset()},completeMutation:p}}export{Be as i,$e as n,Ue as r,Ge as t};
@@ -1 +1 @@
1
- import{p as e}from"./vendor-tanstack-6B86itGS.js";import{o as t}from"./index-Wi8Wxte6.js";function n(){return e({mutationFn:({id:e,name:n,quotaThreshold:r,weight:i,keepaliveEnabled:a})=>t.updateToken(e,n,r,i,a)})}export{n as t};
1
+ import{p as e}from"./vendor-tanstack-6B86itGS.js";import{o as t}from"./index-Cb14ZYfq.js";function n(){return e({mutationFn:({id:e,name:n,quotaThreshold:r,weight:i,keepaliveEnabled:a})=>t.updateToken(e,n,r,i,a)})}export{n as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,r as n}from"./vendor-react-8xo7RSum.js";import{u as r}from"./vendor-tanstack-6B86itGS.js";import{b as i,o as a,y as o}from"./index-Cb14ZYfq.js";import{t as s}from"./TimedPlayer-cuEgYA3Q.js";var c=e(t()),l=n(),u=(0,c.forwardRef)(({title:e,titleId:t,...n},r)=>(0,l.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`})]})),d=(0,c.forwardRef)(({title:e,titleId:t,...n},r)=>(0,l.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M21 12a9 9 0 1 1-6.219-8.56`})]})),f=(0,c.forwardRef)(({title:e,titleId:t,...n},r)=>(0,l.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsxs)(`g`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,children:[(0,l.jsx)(`path`,{d:`M12 19v3m7-12v2a7 7 0 0 1-14 0v-2`}),(0,l.jsx)(`rect`,{width:6,height:13,x:9,y:2,rx:3})]})]})),p=(0,c.forwardRef)(({title:e,titleId:t,...n},r)=>(0,l.jsxs)(`svg`,{viewBox:`0 0 24 24`,width:`1.2em`,height:`1.2em`,ref:r,"aria-labelledby":t,...n,children:[e?(0,l.jsx)(`title`,{id:t,children:e}):null,(0,l.jsx)(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`})]})),m=24e3;function h(e,t=m){let n=new Uint8Array(44+e.length*2),r=new DataView(n.buffer),i=(e,t)=>{for(let n=0;n<t.length;n++)r.setUint8(e+n,t.charCodeAt(n))};return i(0,`RIFF`),r.setUint32(4,36+e.length*2,!0),i(8,`WAVE`),i(12,`fmt `),r.setUint32(16,16,!0),r.setUint16(20,1,!0),r.setUint16(22,1,!0),r.setUint32(24,t,!0),r.setUint32(28,t*2,!0),r.setUint16(32,2,!0),r.setUint16(34,16,!0),i(36,`data`),r.setUint32(40,e.length*2,!0),e.forEach((e,t)=>{let n=Math.max(-1,Math.min(1,e));r.setInt16(44+t*2,n<0?n*32768:n*32767,!0)}),n}function g(e){let t=``;for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)}async function _(e){let t=new AudioContext({sampleRate:m});try{let n=await t.decodeAudioData(await e.arrayBuffer()),r=new Float32Array(n.length);for(let e=0;e<n.numberOfChannels;e++){let t=n.getChannelData(e);for(let e=0;e<t.length;e++)r[e]+=t[e]/n.numberOfChannels}return g(h(r))}finally{await t.close()}}var v=`qgrid_voice`,y=[`grok/grok-tts`,`openai/gpt-realtime-2.1-mini`,`openai/gpt-realtime-2.1`],b=[`openai/gpt-4o-transcribe`,`openai/gpt-4o-mini-transcribe`,`grok/grok-voice-transcribe-2.0`],x=`marin cedar alloy ash ballad coral echo sage shimmer verse`.split(` `),S=[{label:`Female`,voices:`ara aurora carina celeste eve iris liora luna ursa`.split(` `)},{label:`Male`,voices:`altair atlas castor cosmo helios helix kepler leo lumen lux naksh orion perseus rex rigel sal sirius zagan zenith`.split(` `)}],C=[{label:``,voices:x}],w={provider:`timing from Grok TTS`,aligned:`timing aligned via Grok STT`},T=e=>e.startsWith(`openai/`),E=`w-full rounded-lg border border-sand-200/80 bg-white px-2.5 py-1.5 text-[12px] text-sand-800 placeholder:text-sand-400 focus:outline-none focus:border-sienna-300 disabled:opacity-50`,D=`${E} h-8`,O=`px-3.5 py-1.5 text-[12px] font-medium rounded-lg bg-sienna-500 text-white hover:bg-sienna-600 disabled:opacity-50 transition-all duration-150 active:scale-[0.97] inline-flex items-center gap-1.5 shadow-sm`;function k({label:e,children:t}){return(0,l.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[(0,l.jsx)(`span`,{className:`text-[11px] font-medium text-sand-500`,children:e}),t]})}var A=e=>e.slice(e.indexOf(`/`)+1);function j({title:e,meta:t,requestLogId:n,onRemove:i,children:a}){return(0,l.jsxs)(`li`,{className:`flex flex-col gap-1.5 px-4 py-3`,children:[(0,l.jsxs)(`div`,{className:`flex items-center gap-2 text-[12px]`,children:[(0,l.jsx)(`span`,{className:`font-medium text-sand-800`,children:e}),(0,l.jsx)(`span`,{className:`tabular-nums text-sand-400`,children:t}),(0,l.jsxs)(`span`,{className:`ml-auto flex items-center gap-2`,children:[n!==void 0&&(0,l.jsxs)(r,{to:`/requests/show`,search:{id:n},target:`_blank`,className:`inline-flex items-center gap-1 tabular-nums text-sand-500 hover:text-sienna-500`,children:[`request log #`,n,(0,l.jsx)(u,{className:`size-3`})]}),(0,l.jsx)(`button`,{type:`button`,onClick:i,title:`Remove from history`,className:`text-sand-300 hover:text-sand-600`,children:(0,l.jsx)(o,{className:`size-3.5`})})]})]}),a]})}function M({empty:e,children:t}){return t.length===0?(0,l.jsx)(`p`,{className:`px-4 py-6 text-center text-[12px] text-sand-400`,children:e}):(0,l.jsx)(`ul`,{className:`divide-y divide-sand-100`,children:t})}function N(e){if(!e)return;let t=[],n;return e.graphChars.forEach((r,i)=>{let[a,o]=e.graphTimes[i];/\s/.test(r)?n=void 0:n?(n.text+=r,n.end=o):(n={text:r,start:a,end:o},t.push(n))}),t}function P(){let[e,t]=(0,c.useState)(y[0]),[n,r]=(0,c.useState)(`ara`),[o,u]=(0,c.useState)(``),[f,m]=(0,c.useState)(`Hi! What did you do this weekend?`),[h,g]=(0,c.useState)([]),[_,b]=(0,c.useState)(!0),P=(0,c.useRef)(0),F=a.useSpeakMutation(),I=T(e),L=e=>{T(e)!==I&&r(T(e)?x[0]:`ara`),t(e)},R=I&&o.trim()?o.trim():void 0,z=t=>{let n=performance.now(),r={model:e,text:f,voice:t,projectName:v};R&&(r.instructions=R),_&&(r.withTimestamps=!0),F.mutate({params:r},{onSuccess:i=>{let a={key:P.current++,src:`data:${i.mimeType};base64,${i.audio}`,model:e,voice:t,instructions:r.instructions,text:f,elapsedMs:performance.now()-n,requestLogId:i.requestLogId,words:N(i.audioTimestamps),timing:i.timestampsError?`timing failed: ${i.timestampsError}`:i.timestampsSource&&w[i.timestampsSource]};g(e=>[a,...e])}})},B=(0,c.useRef)(null),[V,H]=(0,c.useState)();(0,c.useEffect)(()=>()=>B.current?.pause(),[]);let U=e=>{if(r(e),B.current?.pause(),V===e){H(void 0);return}let t=new Audio(`/voice-samples/${I?`openai`:`grok`}/${e}.mp3`);t.addEventListener(`ended`,()=>H(t=>t===e?void 0:t),{once:!0}),B.current=t,H(e),t.play()};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,l.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,l.jsx)(k,{label:`Model`,children:(0,l.jsx)(`select`,{value:e,onChange:e=>L(e.target.value),className:D,children:y.map(e=>(0,l.jsx)(`option`,{value:e,children:e},e))})}),I&&(0,l.jsx)(k,{label:`Style instructions (OpenAI only)`,children:(0,l.jsx)(`input`,{value:o,onChange:e=>u(e.target.value),placeholder:`e.g. Speak with a gentle Irish accent.`,className:D})})]}),(0,l.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,l.jsx)(`span`,{className:`text-[11px] font-medium text-sand-500`,children:`Voice — ▶ plays a short self-introduction sample, a name selects it`}),(I?C:S).map(e=>(0,l.jsxs)(`div`,{className:`flex items-start gap-2`,children:[e.label&&(0,l.jsx)(`span`,{className:`w-12 shrink-0 pt-1 text-[11px] text-sand-400`,children:e.label}),(0,l.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.voices.map(e=>(0,l.jsxs)(`span`,{className:`inline-flex items-center overflow-hidden rounded-full border text-[12px] ${n===e?`border-sienna-400 bg-sienna-50 text-sienna-700`:`border-sand-200/80 bg-white text-sand-700`}`,children:[(0,l.jsx)(`button`,{type:`button`,onClick:()=>r(e),"aria-pressed":n===e,className:`py-0.5 pl-2.5 pr-1 hover:text-sienna-600`,children:e}),(0,l.jsx)(`button`,{type:`button`,onClick:()=>U(e),title:V===e?`Stop "${e}"`:`Play a "${e}" sample`,className:`py-1 pl-1 pr-2 hover:text-sienna-500 ${V===e?`text-sienna-500`:`text-sand-400`}`,children:V===e?(0,l.jsx)(i,{className:`size-3`}):(0,l.jsx)(p,{className:`size-3`})})]},e))})]},e.label))]}),(0,l.jsx)(k,{label:`Text`,children:(0,l.jsx)(`textarea`,{value:f,onChange:e=>m(e.target.value),rows:3,className:`${E} resize-y`})}),(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,l.jsxs)(`button`,{type:`button`,onClick:()=>z(n),disabled:F.isPending||!f.trim(),className:O,children:[F.isPending&&(0,l.jsx)(d,{className:`size-3.5 animate-spin`}),`Generate with `,n]}),(0,l.jsxs)(`label`,{className:`flex items-center gap-1.5 text-[12px] text-sand-600`,children:[(0,l.jsx)(`input`,{type:`checkbox`,checked:_,onChange:e=>b(e.target.checked),className:`accent-sienna-500`}),`Word timing`]}),F.isError&&(0,l.jsx)(`p`,{className:`text-[12px] text-danger-500 break-words`,children:F.error?.message})]})]}),(0,l.jsx)(`div`,{className:`border-t border-sand-100`,children:(0,l.jsx)(M,{empty:`Generated clips stack here, newest first, so voices can be compared side by side.`,children:h.map(e=>(0,l.jsxs)(j,{title:`${e.voice} · ${A(e.model)}`,meta:[`${(e.elapsedMs/1e3).toFixed(1)}s`,e.timing].filter(Boolean).join(` · `),requestLogId:e.requestLogId,onRemove:()=>g(t=>t.filter(t=>t.key!==e.key)),children:[(!e.words||e.instructions)&&(0,l.jsxs)(`p`,{className:`truncate text-[12px] text-sand-600`,title:e.text,children:[!e.words&&e.text,e.instructions&&(0,l.jsxs)(`span`,{className:`text-sand-400`,children:[` — `,e.instructions]})]}),(0,l.jsx)(s,{src:e.src,words:e.words,autoPlay:!0})]},e.key))})})]})}function F(){let[e,t]=(0,c.useState)(b[0]),[n,r]=(0,c.useState)(``),[o,u]=(0,c.useState)(),[p,m]=(0,c.useState)(!1),[h,g]=(0,c.useState)(),[y,x]=(0,c.useState)([]),S=(0,c.useRef)(null),C=(0,c.useRef)([]),w=(0,c.useRef)(0),E=a.useTranscribeMutation(),N=T(e);(0,c.useEffect)(()=>()=>{S.current?.stream.getTracks().forEach(e=>e.stop()),C.current.forEach(e=>URL.revokeObjectURL(e))},[]);let P=e=>{let t=URL.createObjectURL(e);C.current.push(t),u({blob:e,url:t,clip:C.current.length})};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(`div`,{className:`flex flex-col gap-3 p-4`,children:[(0,l.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,l.jsx)(k,{label:`Model`,children:(0,l.jsx)(`select`,{value:e,onChange:e=>t(e.target.value),className:D,children:b.map(e=>(0,l.jsx)(`option`,{value:e,children:e},e))})}),N&&(0,l.jsx)(k,{label:`Prompt (OpenAI only)`,children:(0,l.jsx)(`input`,{value:n,onChange:e=>r(e.target.value),placeholder:`domain words, e.g. qgrid, Kuma`,className:D})})]}),(0,l.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,l.jsxs)(`button`,{type:`button`,onClick:async()=>{if(p)S.current?.stop(),m(!1);else{g(void 0);try{let e=await navigator.mediaDevices.getUserMedia({audio:!0}),t=new MediaRecorder(e),n=[];t.ondataavailable=e=>n.push(e.data),t.onstop=()=>{e.getTracks().forEach(e=>e.stop()),P(new Blob(n,{type:t.mimeType}))},t.start(),S.current=t,m(!0)}catch(e){g(e instanceof Error?e.message:String(e))}}},className:`${O} ${p?`bg-danger-500 hover:bg-danger-500`:``}`,children:[p?(0,l.jsx)(i,{className:`size-3.5`}):(0,l.jsx)(f,{className:`size-3.5`}),p?`Stop`:`Record`]}),(0,l.jsxs)(`label`,{className:`text-[12px] text-sand-600 cursor-pointer hover:text-sienna-500`,children:[`or upload a file`,(0,l.jsx)(`input`,{type:`file`,accept:`audio/*`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&P(t)}})]}),h&&(0,l.jsx)(`p`,{className:`text-[12px] text-danger-500 break-words`,children:h})]}),o&&(0,l.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,l.jsxs)(`span`,{className:`shrink-0 text-[11px] font-medium text-sand-500`,children:[`clip `,o.clip]}),(0,l.jsx)(`audio`,{controls:!0,src:o.url,className:`h-8 w-full`})]}),(0,l.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,l.jsxs)(`button`,{type:`button`,onClick:async()=>{if(!o)return;g(void 0);let t;try{t=await _(o.blob)}catch(e){g(`could not decode audio: ${e instanceof Error?e.message:String(e)}`);return}let r={model:e,audio:t,mediaType:`audio/wav`,projectName:v};N&&n.trim()&&(r.prompt=n.trim());let i=performance.now();E.mutate({params:r},{onSuccess:t=>{let n={key:w.current++,clip:o.clip,clipUrl:o.url,model:e,prompt:r.prompt,text:t.text,elapsedMs:performance.now()-i,durationSec:t.durationSec,requestLogId:t.requestLogId,words:t.words};x(e=>[n,...e])}})},disabled:!o||p||E.isPending,className:O,children:[E.isPending&&(0,l.jsx)(d,{className:`size-3.5 animate-spin`}),`Transcribe`]}),E.isError&&(0,l.jsx)(`p`,{className:`text-[12px] text-danger-500 break-words`,children:E.error?.message})]})]}),(0,l.jsx)(`div`,{className:`border-t border-sand-100`,children:(0,l.jsx)(M,{empty:`Transcripts stack here, newest first; run one clip through several models to compare.`,children:y.map(e=>(0,l.jsx)(j,{title:`clip ${e.clip} · ${A(e.model)}`,meta:[`${(e.elapsedMs/1e3).toFixed(1)}s`,e.durationSec===void 0?``:`${e.durationSec.toFixed(1)}s audio`,e.prompt?`prompt: ${e.prompt}`:``].filter(Boolean).join(` · `),requestLogId:e.requestLogId,onRemove:()=>x(t=>t.filter(t=>t.key!==e.key)),children:e.words&&e.words.length>0?(0,l.jsx)(s,{src:e.clipUrl,words:e.words}):(0,l.jsx)(`p`,{className:`rounded-lg bg-sand-50 px-3 py-2 text-[13px] text-sand-800 whitespace-pre-wrap`,children:e.text||`(empty transcript)`})},e.key))})})]})}var I=[{id:`tts`,label:`Text to speech`},{id:`stt`,label:`Speech to text`}];function L(){let[e,t]=(0,c.useState)(`tts`);return(0,l.jsxs)(`section`,{className:`rounded-xl border border-sand-200/70 bg-white overflow-hidden`,children:[(0,l.jsx)(`div`,{role:`tablist`,className:`flex gap-1 border-b border-sand-100 px-3 pt-2`,children:I.map(n=>(0,l.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===n.id,onClick:()=>t(n.id),className:`-mb-px border-b-2 px-3 py-2 text-[13px] transition-colors duration-150 ${e===n.id?`border-sienna-500 font-medium text-sand-800`:`border-transparent text-sand-500 hover:text-sand-700`}`,children:n.label},n.id))}),(0,l.jsx)(`div`,{role:`tabpanel`,hidden:e!==`tts`,children:(0,l.jsx)(P,{})}),(0,l.jsx)(`div`,{role:`tabpanel`,hidden:e!==`stt`,children:(0,l.jsx)(F,{})})]})}function R(){return(0,l.jsx)(`div`,{className:`max-w-3xl mx-auto`,children:(0,l.jsx)(L,{})})}export{R as component};
@@ -5,11 +5,11 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/sonamu.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Qgrid</title>
8
- <script type="module" crossorigin src="/assets/index-Wi8Wxte6.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-Cb14ZYfq.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-XKyaHtl9.js">
10
10
  <link rel="modulepreload" crossorigin href="/assets/vendor-react-8xo7RSum.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/vendor-tanstack-6B86itGS.js">
12
- <link rel="stylesheet" crossorigin href="/assets/index-DyrPRt6O.css">
12
+ <link rel="stylesheet" crossorigin href="/assets/index-Co8uAhSV.css">
13
13
  </head>
14
14
  <body>
15
15
  <div id="root"></div>
@@ -0,0 +1,54 @@
1
+ import { J as require_react, Q as __toESM, q as require_jsx_runtime } from "./services.generated-B6QpnL_N.js";
2
+ //#region src/components/qgrid/TimedPlayer.tsx
3
+ var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
4
+ var import_jsx_runtime = require_jsx_runtime();
5
+ /**
6
+ * Audio player with the timed words under it; the word being spoken is highlighted. The current
7
+ * time is read every animation frame while playing, since timeupdate fires only about 4 times a
8
+ * second and short words would be skipped; timeupdate still feeds it when frames are throttled.
9
+ */
10
+ function TimedPlayer({ src, words, autoPlay, className = "h-8 w-full" }) {
11
+ const audioRef = (0, import_react.useRef)(null);
12
+ const frame = (0, import_react.useRef)(0);
13
+ const [time, setTime] = (0, import_react.useState)(-1);
14
+ const tick = () => {
15
+ setTime(audioRef.current?.currentTime ?? -1);
16
+ frame.current = requestAnimationFrame(tick);
17
+ };
18
+ const stop = () => cancelAnimationFrame(frame.current);
19
+ (0, import_react.useEffect)(() => () => cancelAnimationFrame(frame.current), []);
20
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)("audio", {
21
+ ref: audioRef,
22
+ controls: true,
23
+ autoPlay,
24
+ src,
25
+ className,
26
+ onPlay: () => {
27
+ stop();
28
+ tick();
29
+ },
30
+ onPause: stop,
31
+ onTimeUpdate: (e) => setTime(e.currentTarget.currentTime),
32
+ onEnded: () => {
33
+ stop();
34
+ setTime(-1);
35
+ }
36
+ }), words && words.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
37
+ className: "flex flex-wrap gap-x-0.5 gap-y-1 text-[13px] leading-relaxed",
38
+ children: words.map((word, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
39
+ type: "button",
40
+ onClick: () => {
41
+ const audio = audioRef.current;
42
+ if (!audio) return;
43
+ audio.currentTime = word.start;
44
+ setTime(word.start);
45
+ audio.play();
46
+ },
47
+ title: `${word.start.toFixed(2)}–${word.end.toFixed(2)}s · play from here`,
48
+ className: `rounded px-1 transition-colors duration-75 ${time >= word.start && time < word.end ? "bg-sienna-500 text-white" : "text-sand-700 hover:bg-sand-100"}`,
49
+ children: word.text
50
+ }, i))
51
+ })] });
52
+ }
53
+ //#endregion
54
+ export { TimedPlayer as t };