@xenon-device-management/xenon 1.26.2 → 1.28.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 (85) hide show
  1. package/lib/package.json +1 -1
  2. package/lib/public/assets/{ApiKeyGate-vELAdQLu.js → ApiKeyGate-CYrHWuf9.js} +1 -1
  3. package/lib/public/assets/{BugReportButton-ySiZDywe.js → BugReportButton-CRRZnSs2.js} +1 -1
  4. package/lib/public/assets/{DeviceMosaicView-Chtp0wAI.js → DeviceMosaicView-Dw7dK-Ri.js} +1 -1
  5. package/lib/public/assets/{EmptyState-CYQYScPo.js → EmptyState-BDSDbxbe.js} +1 -1
  6. package/lib/public/assets/{FieldGroup-Dea68RfI.js → FieldGroup-DTSy35Hp.js} +1 -1
  7. package/lib/public/assets/{Modal-BgzTzImP.js → Modal-BC9RPZeO.js} +1 -1
  8. package/lib/public/assets/{SegmentedControl-DyRq9blY.js → SegmentedControl-DUw7pxfw.js} +1 -1
  9. package/lib/public/assets/{SettingCard-CardwBu3.js → SettingCard-DwHb-9y7.js} +1 -1
  10. package/lib/public/assets/{Table-BczCxsDm.js → Table-C167c0iD.js} +1 -1
  11. package/lib/public/assets/{activity-CS-Op-T6.js → activity-C8ktgelv.js} +1 -1
  12. package/lib/public/assets/{ai-settings-CIvB7rNM.js → ai-settings-BtH8D-Vk.js} +3 -3
  13. package/lib/public/assets/{api-keys-peJzllzQ.js → api-keys-D0CPHe_-.js} +1 -1
  14. package/lib/public/assets/{apps-__WvcJaP.js → apps-f6Z9888a.js} +3 -3
  15. package/lib/public/assets/{arrow-left-Dx-cXFLT.js → arrow-left-CEnrTC1h.js} +1 -1
  16. package/lib/public/assets/{arrow-right-Ax_FfBMv.js → arrow-right-DJbja5Vo.js} +1 -1
  17. package/lib/public/assets/{arrow-up-right-B6uJmGeA.js → arrow-up-right-DvIZquNN.js} +1 -1
  18. package/lib/public/assets/{auth-shell-BQqcjjC9.js → auth-shell-5XCL86e9.js} +2 -2
  19. package/lib/public/assets/{builds-page-BA-_iEjx.js → builds-page-DQbsMgZp.js} +1 -1
  20. package/lib/public/assets/{button-DcbnByKB.js → button-CMj-iXRu.js} +1 -1
  21. package/lib/public/assets/{calendar-C3pYg1V7.js → calendar-BKb9JzMb.js} +1 -1
  22. package/lib/public/assets/{check-DKdLfzhJ.js → check-BioFa43z.js} +1 -1
  23. package/lib/public/assets/{chevron-left-Bb9PBLG5.js → chevron-left-BfiSwNHE.js} +1 -1
  24. package/lib/public/assets/{chevron-right-DJcpeY_o.js → chevron-right-BLqjv9Fz.js} +1 -1
  25. package/lib/public/assets/{circle-check-DY6ntqp3.js → circle-check-N7nCeFZH.js} +1 -1
  26. package/lib/public/assets/{circle-x-DgK9drRH.js → circle-x-DzRW2cW-.js} +1 -1
  27. package/lib/public/assets/{clock-I9zEVPan.js → clock-Q8bhs7zV.js} +1 -1
  28. package/lib/public/assets/{copy-Dy3oRuWT.js → copy-Dh1ppPe1.js} +1 -1
  29. package/lib/public/assets/device-explorer-Cbwojnbb.js +277 -0
  30. package/lib/public/assets/device-explorer-CcLOID3w.css +1 -0
  31. package/lib/public/assets/{download-BotTmDty.js → download-Dit5_Lob.js} +1 -1
  32. package/lib/public/assets/{forgot-password-BaWiD2U2.js → forgot-password-yhK1Eo6h.js} +1 -1
  33. package/lib/public/assets/{funnel-D2Qw4nTX.js → funnel-DQo9dvhT.js} +1 -1
  34. package/lib/public/assets/{index-CI9Nz3HY.js → index-kcl0icXA.js} +2 -2
  35. package/lib/public/assets/{input-cBBGau4X.js → input-DwXEwtQD.js} +1 -1
  36. package/lib/public/assets/{keycodes-CY4uwulo.js → keycodes-mlL7WkFd.js} +1 -1
  37. package/lib/public/assets/{layers-MHwJM2Ll.js → layers-DFEJsDA2.js} +1 -1
  38. package/lib/public/assets/{lock-Bpc8rJFu.js → lock-DVGX1wMR.js} +1 -1
  39. package/lib/public/assets/{login-BmcyszP5.js → login-BtczO6mT.js} +1 -1
  40. package/lib/public/assets/{maintenance-settings-DMFVuToe.js → maintenance-settings-BNkCNkdA.js} +2 -2
  41. package/lib/public/assets/{monitor-irjK6PRV.js → monitor-DXiFh_zm.js} +1 -1
  42. package/lib/public/assets/mouse-pointer-2-iiFLrBfo.js +6 -0
  43. package/lib/public/assets/{network-CVZ32MhH.js → network-D-64m0lI.js} +1 -1
  44. package/lib/public/assets/{overview-DRRSIpnD.js → overview-Bs8fij0f.js} +1 -1
  45. package/lib/public/assets/{page-header-Bl7uTiQF.js → page-header-2aP5HfMz.js} +1 -1
  46. package/lib/public/assets/{plus-C3lvaMcL.js → plus-l0nFcN3u.js} +1 -1
  47. package/lib/public/assets/{profile-page-B3wsnR1n.js → profile-page-DRQxEDPv.js} +1 -1
  48. package/lib/public/assets/{reset-password-BIGj_ULj.js → reset-password-TeZbTlY3.js} +1 -1
  49. package/lib/public/assets/{runbook-page-DEznNZhc.js → runbook-page-CfB3Sgqd.js} +1 -1
  50. package/lib/public/assets/{select-BpuZWZuE.js → select-CfLeV0bn.js} +1 -1
  51. package/lib/public/assets/{selector-detail-page-ZCvmtQ5Y.js → selector-detail-page-sjSLgf2y.js} +1 -1
  52. package/lib/public/assets/{selector-health-D-hvfY2E.js → selector-health-DobHOezq.js} +1 -1
  53. package/lib/public/assets/{selector-health-page-C0ZqZ_VT.js → selector-health-page-BeGTmjeJ.js} +1 -1
  54. package/lib/public/assets/{session-detail-page-Bv7IwFTQ.js → session-detail-page-B7Be2Uxw.js} +1 -1
  55. package/lib/public/assets/settings-DWlkn05y.js +6 -0
  56. package/lib/public/assets/{status-pill-outline-B5dWsaer.js → status-pill-outline-DqZaavRm.js} +1 -1
  57. package/lib/public/assets/{tablet-DxwkBlhd.js → tablet-D2ApmdVm.js} +1 -1
  58. package/lib/public/assets/{teams-D3s8GhkG.js → teams-DVm0mUGI.js} +1 -1
  59. package/lib/public/assets/{trash-2-Dyf4Jcyk.js → trash-2-BklI15pS.js} +1 -1
  60. package/lib/public/assets/{upload-B6ZJ1_f1.js → upload-BMYoLWMh.js} +1 -1
  61. package/lib/public/assets/{use-password-reset-mode-B-oOrt1d.js → use-password-reset-mode-Dx_zeU5K.js} +1 -1
  62. package/lib/public/assets/{users-QfiFclLn.js → users-CnVdUoqL.js} +1 -1
  63. package/lib/public/assets/{users-BfvPE2wX.js → users-DqVUPDed.js} +1 -1
  64. package/lib/public/assets/{video-off-C2quR4KF.js → video-off-DEmVhLd9.js} +1 -1
  65. package/lib/public/assets/{webhook-settings-BjbGi-Pi.js → webhook-settings-CHpCrpob.js} +1 -1
  66. package/lib/public/assets/{zap-C2lxP7TK.js → zap-ovWf2UbO.js} +1 -1
  67. package/lib/public/index.html +1 -1
  68. package/lib/src/app/routers/control.js +5 -0
  69. package/lib/src/device-managers/AndroidDeviceManager.js +31 -95
  70. package/lib/src/device-managers/HealthMonitorService.js +10 -6
  71. package/lib/src/device-managers/android/AndroidH264StreamService.js +6 -1
  72. package/lib/src/device-managers/android/AndroidStreamService.js +9 -18
  73. package/lib/src/device-managers/android/clipboardBroadcast.js +24 -0
  74. package/lib/src/device-managers/android/previewHold.js +72 -0
  75. package/lib/src/device-managers/clipboardErrors.js +15 -0
  76. package/lib/test/unit/android-clipboard.spec.js +147 -0
  77. package/lib/test/unit/android-preview-hold.spec.js +179 -0
  78. package/lib/test/unit/clipboard-route.spec.js +110 -0
  79. package/lib/test/unit/health-monitor-stream-lookup.spec.js +107 -0
  80. package/lib/tsconfig.tsbuildinfo +1 -1
  81. package/package.json +1 -1
  82. package/lib/public/assets/device-explorer-BPyGYs0c.js +0 -246
  83. package/lib/public/assets/device-explorer-C9qg30Jn.css +0 -1
  84. package/lib/public/assets/mouse-pointer-2-CYkC-Dyq.js +0 -11
  85. package/lib/public/assets/settings-DCR9vnQ5.js +0 -1
@@ -1,9 +1,9 @@
1
- import{c as x,j as e,x as H,r,X as o,H as X,q as I,z as K,E as Z,y as J}from"./index-CI9Nz3HY.js";import{f as Q}from"./time-B8FIgwPE.js";import{c as ee,B as w}from"./button-DcbnByKB.js";import{c as se}from"./utils-CDN07tui.js";import{P as ae}from"./page-header-Bl7uTiQF.js";import{S as te}from"./select-BpuZWZuE.js";import{U as re,T as E}from"./upload-B6ZJ1_f1.js";import{C as ie}from"./check-DKdLfzhJ.js";import{C as ce}from"./copy-Dy3oRuWT.js";import{Z as ne}from"./zap-C2lxP7TK.js";import{D as le}from"./download-BotTmDty.js";import{T as oe}from"./trash-2-Dyf4Jcyk.js";/**
1
+ import{c as x,j as e,x as H,r,X as o,H as X,q as I,B as K,D as Z,y as J}from"./index-kcl0icXA.js";import{f as Q}from"./time-B8FIgwPE.js";import{c as ee,B as w}from"./button-CMj-iXRu.js";import{c as se}from"./utils-CDN07tui.js";import{P as ae}from"./page-header-2aP5HfMz.js";import{S as te}from"./select-CfLeV0bn.js";import{U as re,T as $}from"./upload-BMYoLWMh.js";import{C as ie}from"./check-BioFa43z.js";import{C as ce}from"./copy-Dh1ppPe1.js";import{Z as ne}from"./zap-ovWf2UbO.js";import{D as le}from"./download-Dit5_Lob.js";import{T as oe}from"./trash-2-BklI15pS.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const de=[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]],$=x("apple",de);/**
6
+ */const de=[["path",{d:"M12 6.528V3a1 1 0 0 1 1-1h0",key:"11qiee"}],["path",{d:"M18.237 21A15 15 0 0 0 22 11a6 6 0 0 0-10-4.472A6 6 0 0 0 2 11a15.1 15.1 0 0 0 3.763 10 3 3 0 0 0 3.648.648 5.5 5.5 0 0 1 5.178 0A3 3 0 0 0 18.237 21",key:"110c12"}]],E=x("apple",de);/**
7
7
  * @license lucide-react v0.555.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
@@ -18,4 +18,4 @@ import{c as x,j as e,x as H,r,X as o,H as X,q as I,z as K,E as Z,y as J}from"./i
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const ue=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],R=x("rocket",ue),ve=ee("badge-base",{variants:{variant:{default:"badge-variant-default",success:"badge-variant-success",warning:"badge-variant-warning",error:"badge-variant-error",outline:"badge-variant-outline",secondary:"badge-variant-secondary"}},defaultVariants:{variant:"default"}});function F({className:n,variant:u,...c}){return e.jsx("div",{className:se(ve({variant:u}),n),...c})}const De=()=>{const{toast:n,removeToast:u}=H(),[c,C]=r.useState([]),[_,L]=r.useState([]),[l,A]=r.useState(!1),[v,z]=r.useState(""),[f,S]=r.useState(!1),[U,D]=r.useState(null),[d,T]=r.useState({android:!0,ios:!0}),[y,B]=r.useState("desc"),[m,j]=r.useState(null),[g,N]=r.useState(""),b=r.useRef(null),p=r.useCallback(async()=>{A(!0);try{const s=await o.getApps();C(Array.isArray(s)?s:[])}catch(s){console.error("Failed to fetch apps",s)}finally{A(!1)}},[]),k=r.useCallback(async()=>{try{const s=await o.getDevices();L(Array.isArray(s)?s:[])}catch(s){console.error("Failed to fetch devices",s)}},[]);r.useEffect(()=>{p(),k();const s=setInterval(k,1e4);return()=>clearInterval(s)},[p,k]);const G=async s=>{var a;const t=(a=s.target.files)==null?void 0:a[0];if(t){S(!0);try{await o.uploadApp(t),await p()}catch(i){console.error("Upload failed",i)}finally{S(!1),s.target&&(s.target.value="")}}},O=async(s,t)=>{if(window.confirm(`Permanently remove artifact "${t}"?`))try{await o.deleteApp(s),C(a=>a.filter(i=>i.id!==s))}catch(a){console.error("Delete failed",a)}},P=(s,t)=>{navigator.clipboard.writeText(s),D(`${t}-${s}`),setTimeout(()=>D(null),2e3)},V=async(s,t)=>{const a=n(`Deploying app to ${t}...`,"loading",0);try{const i=await o.installRepositoryApp(t,s);i.success?(n("App deployed successfully","success"),j(null),N("")):n(`Deployment failed: ${i.error}`,"error")}catch(i){n(`Execution Error: ${i.message}`,"error")}finally{u(a)}},h=c.filter(s=>{const t=s.name.toLowerCase().includes(v.toLowerCase())||s.packageName&&s.packageName.toLowerCase().includes(v.toLowerCase()),a=d.android&&s.platform==="android"||d.ios&&s.platform==="ios";return t&&a}).sort((s,t)=>{const a=new Date(s.createdAt).getTime(),i=new Date(t.createdAt).getTime();return y==="desc"?i-a:a-i}),q=s=>{if(!s)return"0 B";const t=1024,a=Math.floor(Math.log(s)/Math.log(t));return parseFloat((s/Math.pow(t,a)).toFixed(1))+" "+["B","KB","MB","GB"][a]},W=s=>Q(s),M=s=>{T(t=>({...t,[s]:!t[s]}))},Y=s=>{const t=s.toLowerCase();return t.includes("wda-signed")||t.includes("wda-resign")||t.includes("webdriveragent")};return e.jsxs("div",{className:"apps-container device-explorer-container",children:[e.jsx("div",{className:"scanline",style:{position:"absolute",inset:0,pointerEvents:"none",opacity:.05,zIndex:1001}}),e.jsx(ae,{icon:X,title:"Apps",subtitle:"Signed builds available for installation across your device fleet."}),e.jsxs("div",{className:"device-explorer-header-container",children:[e.jsxs("div",{className:"device-explorer-header-left-container",children:[e.jsx("div",{className:"device-explorer-header-entry",children:e.jsxs("div",{className:"device-explorer-header-value",children:[e.jsxs("button",{className:`device-explorer-header__platform-btn ${d.android&&"selected"}`,onClick:()=>M("android"),children:[e.jsx(I,{size:18,color:"currentColor"})," Android"]}),e.jsxs("button",{className:`device-explorer-header__platform-btn ${d.ios&&"selected"}`,onClick:()=>M("ios"),children:[e.jsx($,{size:18,color:"currentColor"})," iOS"]})]})}),e.jsx("div",{className:"device-explorer-header-entry",children:e.jsx("div",{className:"device-explorer-header-value",children:e.jsxs("div",{className:"device-explorer-search-wrapper",children:[e.jsx(K,{size:16,color:"#94a3b8",className:"device-explorer-search-icon"}),e.jsx("input",{type:"text",className:"device-explorer-header-text-filter",placeholder:"Filter by bundle or name...",value:v,onChange:s=>z(s.target.value)})]})})}),e.jsx("div",{className:"device-explorer-header-filter-count",children:e.jsxs(F,{variant:"secondary",children:[e.jsx("span",{className:"font-bold",children:h.length})," of"," ",e.jsx("span",{className:"font-bold",children:c.length})," ",c.length===1?"artifact":"artifacts"]})})]}),e.jsxs("div",{className:"device-explorer-header-right-container",children:[e.jsx("button",{className:"icon-btn-secondary sort-btn",onClick:()=>B(s=>s==="desc"?"asc":"desc"),title:y==="desc"?"Newest First":"Oldest First",children:y==="desc"?e.jsx(pe,{size:18}):e.jsx(xe,{size:18})}),e.jsxs(w,{size:"sm",variant:"secondary",onClick:()=>p(),disabled:l,children:[e.jsx(Z,{size:14,className:`mr-1 ${l&&"animate-spin"}`}),"Refresh"]}),e.jsx("input",{ref:b,type:"file",accept:".apk,.ipa",onChange:G,hidden:!0}),e.jsxs(w,{size:"sm",variant:"primary",onClick:()=>{var s;return(s=b.current)==null?void 0:s.click()},disabled:f,children:[e.jsx(re,{size:14,className:"mr-1"}),"Upload app"]})]})]}),e.jsx("main",{className:"apps-registry-content",children:l&&c.length===0?e.jsxs("div",{className:"empty-data-vignette",children:[e.jsx("div",{className:"processing-loader"}),e.jsx("p",{className:"text-muted text-xs font-bold tracking-widest",children:"SYNCING REGISTRY..."})]}):e.jsxs(e.Fragment,{children:[h.length>0&&e.jsxs("div",{className:"registry-table-header",children:[e.jsx("div",{children:"Artifact bundle"}),e.jsx("div",{children:"Version"}),e.jsx("div",{children:"Size"}),e.jsx("div",{children:"Registry date"}),e.jsx("div",{style:{textAlign:"right"},children:"Management"})]}),e.jsx("div",{className:"registry-list",children:h.map(s=>{const t=_.filter(a=>a.platform===s.platform&&!a.busy&&!a.offline);return e.jsxs("div",{className:`artifact-row ${s.platform}`,children:[e.jsxs("div",{className:"col-app-info",children:[e.jsx("div",{className:"app-platform-badge",children:s.platform==="android"?e.jsx(I,{size:18}):e.jsx($,{size:18})}),e.jsxs("div",{className:"app-text-block",children:[e.jsxs("div",{className:"app-display-name",title:s.name,children:[s.name,Y(s.name)&&e.jsx(F,{variant:"outline",className:"ml-2 text-[10px] h-4 py-0 border-primary text-primary",children:"WDA"})]}),e.jsxs("div",{className:"app-package-id",children:[e.jsx("code",{children:s.packageName||"internal.bundle"}),s.packageName&&e.jsx("div",{className:"copy-hint",title:`Copy ${s.packageName}`,onClick:()=>P(s.packageName,"pkg"),children:U===`pkg-${s.packageName}`?e.jsx(ie,{size:10,className:"text-primary"}):e.jsx(ce,{size:10})})]})]})]}),e.jsx("div",{className:"col-version",children:s.version||"v1.0.0"}),e.jsx("div",{className:"col-size",children:q(s.size)}),e.jsx("div",{className:"col-timestamp",children:W(s.createdAt)}),e.jsxs("div",{className:"col-actions",children:[e.jsx("button",{className:`instant-deploy-trigger ${m===s.id&&"active"}`,onClick:()=>{m===s.id?(j(null),N("")):j(s.id)},children:m===s.id?e.jsxs(e.Fragment,{children:[e.jsx(J,{size:12})," CANCEL"]}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{size:12})," Deploy"]})}),m===s.id&&e.jsx("div",{className:"deployment-flyout",children:t.length>0?e.jsxs("div",{className:"deploy-actions-group",children:[e.jsxs(te,{selectSize:"sm",className:"min-w-[280px]",autoFocus:!0,value:g,onChange:a=>N(a.target.value),children:[e.jsx("option",{value:"",children:"SELECT TARGET..."}),t.map(a=>e.jsxs("option",{value:a.udid,children:[a.name," (",a.udid,")"]},a.udid))]}),e.jsx("button",{className:"confirm-deploy-btn",disabled:!g,onClick:()=>V(s.id,g),title:"Confirm deployment",children:e.jsx(R,{size:14})})]}):e.jsx("div",{className:"target-device-select empty",children:"NO TARGETS"})}),e.jsx("button",{className:"utility-icon-btn",onClick:()=>window.open(`/xenon/api/apps/${s.id}/download`,"_blank"),children:e.jsx(le,{size:14})}),e.jsx("button",{className:"utility-icon-btn danger",onClick:()=>O(s.id,s.name),children:e.jsx(oe,{size:14})})]})]},s.id)})}),h.length===0&&c.length>0&&!l&&e.jsxs("div",{className:"empty-registry-technical",children:[e.jsx("div",{className:"empty-icon-container",children:e.jsx(E,{size:48,className:"text-primary opacity-40"})}),e.jsx("h2",{className:"empty-title brand-font",children:"No matching artifacts"}),e.jsxs("p",{className:"empty-description",children:[c.length," ",c.length===1?"artifact is":"artifacts are"," registered, but none match the current filter."]}),e.jsx("div",{className:"empty-actions",children:e.jsx(w,{size:"sm",variant:"default",onClick:()=>{z(""),T({android:!0,ios:!0})},children:"Clear filters"})})]}),c.length===0&&!l&&e.jsxs("div",{className:"empty-registry-technical",children:[e.jsx("div",{className:"empty-icon-container",children:e.jsx(E,{size:48,className:"text-primary opacity-40 animate-pulse"})}),e.jsx("h2",{className:"empty-title brand-font",children:"No apps yet"}),e.jsxs("p",{className:"empty-description",children:["Upload ",e.jsx("code",{className:"text-primary",children:".apk"})," or"," ",e.jsx("code",{className:"text-primary",children:".ipa"})," artifacts to enable versioned installs across your device fleet."]}),e.jsx("div",{className:"empty-actions",children:e.jsx("button",{type:"button",className:"upload-trigger-massive",onClick:()=>{var s;return(s=b.current)==null?void 0:s.click()},disabled:f,children:e.jsxs("span",{className:"massive-upload-content",children:[e.jsx(R,{size:24,className:"mb-2"}),e.jsx("span",{children:"Upload your first app"})]})})})]})]})}),f&&e.jsx("div",{className:"upload-overlay-technical",children:e.jsxs("div",{className:"upload-card-technical",children:[e.jsx("div",{className:"processing-loader"}),e.jsx("h2",{className:"brand-font",style:{fontSize:"20px",marginBottom:"8px"},children:"Artifact ingestion"}),e.jsx("p",{className:"text-muted text-xs",children:"VERIFYING CHECKSUM & DEPLOYING TO REGISTRY..."})]})})]})};export{De as default};
21
+ */const ue=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],R=x("rocket",ue),ve=ee("badge-base",{variants:{variant:{default:"badge-variant-default",success:"badge-variant-success",warning:"badge-variant-warning",error:"badge-variant-error",outline:"badge-variant-outline",secondary:"badge-variant-secondary"}},defaultVariants:{variant:"default"}});function F({className:n,variant:u,...c}){return e.jsx("div",{className:se(ve({variant:u}),n),...c})}const De=()=>{const{toast:n,removeToast:u}=H(),[c,C]=r.useState([]),[_,L]=r.useState([]),[l,A]=r.useState(!1),[v,z]=r.useState(""),[f,S]=r.useState(!1),[U,D]=r.useState(null),[d,T]=r.useState({android:!0,ios:!0}),[y,B]=r.useState("desc"),[m,j]=r.useState(null),[g,N]=r.useState(""),b=r.useRef(null),p=r.useCallback(async()=>{A(!0);try{const s=await o.getApps();C(Array.isArray(s)?s:[])}catch(s){console.error("Failed to fetch apps",s)}finally{A(!1)}},[]),k=r.useCallback(async()=>{try{const s=await o.getDevices();L(Array.isArray(s)?s:[])}catch(s){console.error("Failed to fetch devices",s)}},[]);r.useEffect(()=>{p(),k();const s=setInterval(k,1e4);return()=>clearInterval(s)},[p,k]);const G=async s=>{var a;const t=(a=s.target.files)==null?void 0:a[0];if(t){S(!0);try{await o.uploadApp(t),await p()}catch(i){console.error("Upload failed",i)}finally{S(!1),s.target&&(s.target.value="")}}},O=async(s,t)=>{if(window.confirm(`Permanently remove artifact "${t}"?`))try{await o.deleteApp(s),C(a=>a.filter(i=>i.id!==s))}catch(a){console.error("Delete failed",a)}},P=(s,t)=>{navigator.clipboard.writeText(s),D(`${t}-${s}`),setTimeout(()=>D(null),2e3)},V=async(s,t)=>{const a=n(`Deploying app to ${t}...`,"loading",0);try{const i=await o.installRepositoryApp(t,s);i.success?(n("App deployed successfully","success"),j(null),N("")):n(`Deployment failed: ${i.error}`,"error")}catch(i){n(`Execution Error: ${i.message}`,"error")}finally{u(a)}},h=c.filter(s=>{const t=s.name.toLowerCase().includes(v.toLowerCase())||s.packageName&&s.packageName.toLowerCase().includes(v.toLowerCase()),a=d.android&&s.platform==="android"||d.ios&&s.platform==="ios";return t&&a}).sort((s,t)=>{const a=new Date(s.createdAt).getTime(),i=new Date(t.createdAt).getTime();return y==="desc"?i-a:a-i}),q=s=>{if(!s)return"0 B";const t=1024,a=Math.floor(Math.log(s)/Math.log(t));return parseFloat((s/Math.pow(t,a)).toFixed(1))+" "+["B","KB","MB","GB"][a]},W=s=>Q(s),M=s=>{T(t=>({...t,[s]:!t[s]}))},Y=s=>{const t=s.toLowerCase();return t.includes("wda-signed")||t.includes("wda-resign")||t.includes("webdriveragent")};return e.jsxs("div",{className:"apps-container device-explorer-container",children:[e.jsx("div",{className:"scanline",style:{position:"absolute",inset:0,pointerEvents:"none",opacity:.05,zIndex:1001}}),e.jsx(ae,{icon:X,title:"Apps",subtitle:"Signed builds available for installation across your device fleet."}),e.jsxs("div",{className:"device-explorer-header-container",children:[e.jsxs("div",{className:"device-explorer-header-left-container",children:[e.jsx("div",{className:"device-explorer-header-entry",children:e.jsxs("div",{className:"device-explorer-header-value",children:[e.jsxs("button",{className:`device-explorer-header__platform-btn ${d.android&&"selected"}`,onClick:()=>M("android"),children:[e.jsx(I,{size:18,color:"currentColor"})," Android"]}),e.jsxs("button",{className:`device-explorer-header__platform-btn ${d.ios&&"selected"}`,onClick:()=>M("ios"),children:[e.jsx(E,{size:18,color:"currentColor"})," iOS"]})]})}),e.jsx("div",{className:"device-explorer-header-entry",children:e.jsx("div",{className:"device-explorer-header-value",children:e.jsxs("div",{className:"device-explorer-search-wrapper",children:[e.jsx(K,{size:16,color:"#94a3b8",className:"device-explorer-search-icon"}),e.jsx("input",{type:"text",className:"device-explorer-header-text-filter",placeholder:"Filter by bundle or name...",value:v,onChange:s=>z(s.target.value)})]})})}),e.jsx("div",{className:"device-explorer-header-filter-count",children:e.jsxs(F,{variant:"secondary",children:[e.jsx("span",{className:"font-bold",children:h.length})," of"," ",e.jsx("span",{className:"font-bold",children:c.length})," ",c.length===1?"artifact":"artifacts"]})})]}),e.jsxs("div",{className:"device-explorer-header-right-container",children:[e.jsx("button",{className:"icon-btn-secondary sort-btn",onClick:()=>B(s=>s==="desc"?"asc":"desc"),title:y==="desc"?"Newest First":"Oldest First",children:y==="desc"?e.jsx(pe,{size:18}):e.jsx(xe,{size:18})}),e.jsxs(w,{size:"sm",variant:"secondary",onClick:()=>p(),disabled:l,children:[e.jsx(Z,{size:14,className:`mr-1 ${l&&"animate-spin"}`}),"Refresh"]}),e.jsx("input",{ref:b,type:"file",accept:".apk,.ipa",onChange:G,hidden:!0}),e.jsxs(w,{size:"sm",variant:"primary",onClick:()=>{var s;return(s=b.current)==null?void 0:s.click()},disabled:f,children:[e.jsx(re,{size:14,className:"mr-1"}),"Upload app"]})]})]}),e.jsx("main",{className:"apps-registry-content",children:l&&c.length===0?e.jsxs("div",{className:"empty-data-vignette",children:[e.jsx("div",{className:"processing-loader"}),e.jsx("p",{className:"text-muted text-xs font-bold tracking-widest",children:"SYNCING REGISTRY..."})]}):e.jsxs(e.Fragment,{children:[h.length>0&&e.jsxs("div",{className:"registry-table-header",children:[e.jsx("div",{children:"Artifact bundle"}),e.jsx("div",{children:"Version"}),e.jsx("div",{children:"Size"}),e.jsx("div",{children:"Registry date"}),e.jsx("div",{style:{textAlign:"right"},children:"Management"})]}),e.jsx("div",{className:"registry-list",children:h.map(s=>{const t=_.filter(a=>a.platform===s.platform&&!a.busy&&!a.offline);return e.jsxs("div",{className:`artifact-row ${s.platform}`,children:[e.jsxs("div",{className:"col-app-info",children:[e.jsx("div",{className:"app-platform-badge",children:s.platform==="android"?e.jsx(I,{size:18}):e.jsx(E,{size:18})}),e.jsxs("div",{className:"app-text-block",children:[e.jsxs("div",{className:"app-display-name",title:s.name,children:[s.name,Y(s.name)&&e.jsx(F,{variant:"outline",className:"ml-2 text-[10px] h-4 py-0 border-primary text-primary",children:"WDA"})]}),e.jsxs("div",{className:"app-package-id",children:[e.jsx("code",{children:s.packageName||"internal.bundle"}),s.packageName&&e.jsx("div",{className:"copy-hint",title:`Copy ${s.packageName}`,onClick:()=>P(s.packageName,"pkg"),children:U===`pkg-${s.packageName}`?e.jsx(ie,{size:10,className:"text-primary"}):e.jsx(ce,{size:10})})]})]})]}),e.jsx("div",{className:"col-version",children:s.version||"v1.0.0"}),e.jsx("div",{className:"col-size",children:q(s.size)}),e.jsx("div",{className:"col-timestamp",children:W(s.createdAt)}),e.jsxs("div",{className:"col-actions",children:[e.jsx("button",{className:`instant-deploy-trigger ${m===s.id&&"active"}`,onClick:()=>{m===s.id?(j(null),N("")):j(s.id)},children:m===s.id?e.jsxs(e.Fragment,{children:[e.jsx(J,{size:12})," CANCEL"]}):e.jsxs(e.Fragment,{children:[e.jsx(ne,{size:12})," Deploy"]})}),m===s.id&&e.jsx("div",{className:"deployment-flyout",children:t.length>0?e.jsxs("div",{className:"deploy-actions-group",children:[e.jsxs(te,{selectSize:"sm",className:"min-w-[280px]",autoFocus:!0,value:g,onChange:a=>N(a.target.value),children:[e.jsx("option",{value:"",children:"SELECT TARGET..."}),t.map(a=>e.jsxs("option",{value:a.udid,children:[a.name," (",a.udid,")"]},a.udid))]}),e.jsx("button",{className:"confirm-deploy-btn",disabled:!g,onClick:()=>V(s.id,g),title:"Confirm deployment",children:e.jsx(R,{size:14})})]}):e.jsx("div",{className:"target-device-select empty",children:"NO TARGETS"})}),e.jsx("button",{className:"utility-icon-btn",onClick:()=>window.open(`/xenon/api/apps/${s.id}/download`,"_blank"),children:e.jsx(le,{size:14})}),e.jsx("button",{className:"utility-icon-btn danger",onClick:()=>O(s.id,s.name),children:e.jsx(oe,{size:14})})]})]},s.id)})}),h.length===0&&c.length>0&&!l&&e.jsxs("div",{className:"empty-registry-technical",children:[e.jsx("div",{className:"empty-icon-container",children:e.jsx($,{size:48,className:"text-primary opacity-40"})}),e.jsx("h2",{className:"empty-title brand-font",children:"No matching artifacts"}),e.jsxs("p",{className:"empty-description",children:[c.length," ",c.length===1?"artifact is":"artifacts are"," registered, but none match the current filter."]}),e.jsx("div",{className:"empty-actions",children:e.jsx(w,{size:"sm",variant:"default",onClick:()=>{z(""),T({android:!0,ios:!0})},children:"Clear filters"})})]}),c.length===0&&!l&&e.jsxs("div",{className:"empty-registry-technical",children:[e.jsx("div",{className:"empty-icon-container",children:e.jsx($,{size:48,className:"text-primary opacity-40 animate-pulse"})}),e.jsx("h2",{className:"empty-title brand-font",children:"No apps yet"}),e.jsxs("p",{className:"empty-description",children:["Upload ",e.jsx("code",{className:"text-primary",children:".apk"})," or"," ",e.jsx("code",{className:"text-primary",children:".ipa"})," artifacts to enable versioned installs across your device fleet."]}),e.jsx("div",{className:"empty-actions",children:e.jsx("button",{type:"button",className:"upload-trigger-massive",onClick:()=>{var s;return(s=b.current)==null?void 0:s.click()},disabled:f,children:e.jsxs("span",{className:"massive-upload-content",children:[e.jsx(R,{size:24,className:"mb-2"}),e.jsx("span",{children:"Upload your first app"})]})})})]})]})}),f&&e.jsx("div",{className:"upload-overlay-technical",children:e.jsxs("div",{className:"upload-card-technical",children:[e.jsx("div",{className:"processing-loader"}),e.jsx("h2",{className:"brand-font",style:{fontSize:"20px",marginBottom:"8px"},children:"Artifact ingestion"}),e.jsx("p",{className:"text-muted text-xs",children:"VERIFYING CHECKSUM & DEPLOYING TO REGISTRY..."})]})})]})};export{De as default};
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-CI9Nz3HY.js";/**
1
+ import{c as o}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-CI9Nz3HY.js";/**
1
+ import{c as o}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-CI9Nz3HY.js";/**
1
+ import{c as o}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,6 +1,6 @@
1
- import{c as i,j as e,n,S as o}from"./index-CI9Nz3HY.js";import{N as l}from"./network-CVZ32MhH.js";/**
1
+ import{c as i,j as e,n,S as o}from"./index-kcl0icXA.js";import{N as l}from"./network-D-64m0lI.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const d=[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]],c=i("monitor-smartphone",d),x=[{icon:o,title:"Self-healing selectors",body:"Broken locators recover through six escalating tiers before a test fails."},{icon:c,title:"Live Android & iOS devices",body:"Watch, drive and record real devices from the browser."},{icon:l,title:"Hub–node scaling",body:"One hub orchestrates device labs across machines."}];function b({children:t}){return e.jsxs("div",{className:"grid min-h-screen w-full grid-cols-1 bg-[var(--bg)] text-[var(--text)] md:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]",children:[e.jsxs("aside",{className:"relative hidden overflow-hidden border-r border-[rgb(var(--rgb-fg)/0.06)] bg-[var(--surface-sunken)] md:flex md:flex-col",children:[e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_90%_60%_at_0%_0%,rgb(var(--rgb-accent)/0.14),transparent_60%)]"}),e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 bg-[linear-gradient(to_right,rgb(var(--rgb-white)/0.03)_1px,transparent_1px),linear-gradient(to_bottom,rgb(var(--rgb-white)/0.03)_1px,transparent_1px)] bg-[size:48px_48px] [mask-image:linear-gradient(to_bottom,black,transparent_85%)]"}),e.jsxs("div",{className:"relative flex flex-1 flex-col justify-between px-12 py-10",children:[e.jsx(n,{className:"h-8 w-auto self-start object-contain"}),e.jsxs("div",{className:"max-w-md",children:[e.jsxs("h2",{className:"text-4xl font-semibold leading-tight tracking-tight",children:["Your device lab,",e.jsx("br",{}),e.jsx("span",{className:"text-[var(--color-accent)]",children:"under control."})]}),e.jsx("p",{className:"mt-4 text-sm leading-relaxed text-[var(--text-muted)]",children:"Appium orchestration for the devices you own — with self-healing tests, live streaming and recordable proof of what ran."}),e.jsx("ul",{className:"mt-10 space-y-6",children:x.map(({icon:a,title:r,body:s})=>e.jsxs("li",{className:"flex gap-4",children:[e.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg border border-[var(--accent-border)] bg-[var(--accent-subtle)]",children:e.jsx(a,{className:"h-4 w-4 text-[var(--color-accent)]","aria-hidden":"true"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-[var(--text)]",children:r}),e.jsx("div",{className:"mt-0.5 text-sm text-[var(--text-muted)]",children:s})]})]},r))})]}),e.jsxs("footer",{className:"flex items-center justify-between border-t border-[rgb(var(--rgb-fg)/0.06)] pt-5 text-xs text-[var(--text-muted)]",children:[e.jsxs("span",{children:["Xenon v","1.26.2"," · Self-hosted device lab"]}),e.jsx("a",{href:"/xenon/api-docs",target:"_blank",rel:"noreferrer",className:"text-[var(--text-muted)] underline-offset-4 hover:text-[var(--text)] hover:underline",children:"API docs"})]})]})]}),e.jsx("main",{className:"flex items-center justify-center px-6 py-10",children:e.jsx("div",{className:"w-full max-w-[400px] rounded-xl border border-[var(--border)] bg-[var(--surface)] px-8 py-9 shadow-[var(--shadow-lg)]",children:t})})]})}export{b as A};
6
+ */const d=[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]],c=i("monitor-smartphone",d),x=[{icon:o,title:"Self-healing selectors",body:"Broken locators recover through six escalating tiers before a test fails."},{icon:c,title:"Live Android & iOS devices",body:"Watch, drive and record real devices from the browser."},{icon:l,title:"Hub–node scaling",body:"One hub orchestrates device labs across machines."}];function b({children:t}){return e.jsxs("div",{className:"grid min-h-screen w-full grid-cols-1 bg-[var(--bg)] text-[var(--text)] md:grid-cols-[minmax(0,5fr)_minmax(0,7fr)]",children:[e.jsxs("aside",{className:"relative hidden overflow-hidden border-r border-[rgb(var(--rgb-fg)/0.06)] bg-[var(--surface-sunken)] md:flex md:flex-col",children:[e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_90%_60%_at_0%_0%,rgb(var(--rgb-accent)/0.14),transparent_60%)]"}),e.jsx("div",{"aria-hidden":"true",className:"pointer-events-none absolute inset-0 bg-[linear-gradient(to_right,rgb(var(--rgb-white)/0.03)_1px,transparent_1px),linear-gradient(to_bottom,rgb(var(--rgb-white)/0.03)_1px,transparent_1px)] bg-[size:48px_48px] [mask-image:linear-gradient(to_bottom,black,transparent_85%)]"}),e.jsxs("div",{className:"relative flex flex-1 flex-col justify-between px-12 py-10",children:[e.jsx(n,{className:"h-8 w-auto self-start object-contain"}),e.jsxs("div",{className:"max-w-md",children:[e.jsxs("h2",{className:"text-4xl font-semibold leading-tight tracking-tight",children:["Your device lab,",e.jsx("br",{}),e.jsx("span",{className:"text-[var(--color-accent)]",children:"under control."})]}),e.jsx("p",{className:"mt-4 text-sm leading-relaxed text-[var(--text-muted)]",children:"Appium orchestration for the devices you own — with self-healing tests, live streaming and recordable proof of what ran."}),e.jsx("ul",{className:"mt-10 space-y-6",children:x.map(({icon:a,title:r,body:s})=>e.jsxs("li",{className:"flex gap-4",children:[e.jsx("span",{className:"grid h-9 w-9 shrink-0 place-items-center rounded-lg border border-[var(--accent-border)] bg-[var(--accent-subtle)]",children:e.jsx(a,{className:"h-4 w-4 text-[var(--color-accent)]","aria-hidden":"true"})}),e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium text-[var(--text)]",children:r}),e.jsx("div",{className:"mt-0.5 text-sm text-[var(--text-muted)]",children:s})]})]},r))})]}),e.jsxs("footer",{className:"flex items-center justify-between border-t border-[rgb(var(--rgb-fg)/0.06)] pt-5 text-xs text-[var(--text-muted)]",children:[e.jsxs("span",{children:["Xenon v","1.28.0"," · Self-hosted device lab"]}),e.jsx("a",{href:"/xenon/api-docs",target:"_blank",rel:"noreferrer",className:"text-[var(--text-muted)] underline-offset-4 hover:text-[var(--text)] hover:underline",children:"API docs"})]})]})]}),e.jsx("main",{className:"flex items-center justify-center px-6 py-10",children:e.jsx("div",{className:"w-full max-w-[400px] rounded-xl border border-[var(--border)] bg-[var(--surface)] px-8 py-9 shadow-[var(--shadow-lg)]",children:t})})]})}export{b as A};
@@ -1,4 +1,4 @@
1
- import{c as z,j as e,z as E,w as y,T as H,q as X,r as v,u as q,i as Q,x as V,M as G,X as J}from"./index-CI9Nz3HY.js";import{f as R,s as $,b as T,a as A,d as K,p as W,o as Y,S as Z,h as ee,c as te,e as D,u as se}from"./status-pill-outline-B5dWsaer.js";import{A as ae}from"./activity-CS-Op-T6.js";import{C as re}from"./circle-x-DgK9drRH.js";import{C as ne}from"./circle-check-DY6ntqp3.js";import{I as P}from"./input-cBBGau4X.js";import{S as le}from"./select-BpuZWZuE.js";import{C as oe}from"./clock-I9zEVPan.js";import{B as I}from"./button-DcbnByKB.js";import{D as ie}from"./download-BotTmDty.js";import{s as ce}from"./labels-C21SA4JG.js";import{C as de}from"./chevron-right-DJcpeY_o.js";import{T as xe}from"./tablet-DxwkBlhd.js";import{M as ue}from"./monitor-irjK6PRV.js";import{P as me}from"./page-header-Bl7uTiQF.js";import"./time-B8FIgwPE.js";import"./utils-CDN07tui.js";/**
1
+ import{c as z,j as e,B as E,w as y,T as H,q as X,r as v,u as q,i as Q,x as V,M as G,X as J}from"./index-kcl0icXA.js";import{f as R,s as $,b as T,a as A,d as K,p as W,o as Y,S as Z,h as ee,c as te,e as D,u as se}from"./status-pill-outline-DqZaavRm.js";import{A as ae}from"./activity-C8ktgelv.js";import{C as re}from"./circle-x-DzRW2cW-.js";import{C as ne}from"./circle-check-N7nCeFZH.js";import{I as P}from"./input-DwXEwtQD.js";import{S as le}from"./select-CfLeV0bn.js";import{C as oe}from"./clock-Q8bhs7zV.js";import{B as I}from"./button-CMj-iXRu.js";import{D as ie}from"./download-Dit5_Lob.js";import{s as ce}from"./labels-C21SA4JG.js";import{C as de}from"./chevron-right-BLqjv9Fz.js";import{T as xe}from"./tablet-D2ApmdVm.js";import{M as ue}from"./monitor-DXiFh_zm.js";import{P as me}from"./page-header-2aP5HfMz.js";import"./time-B8FIgwPE.js";import"./utils-CDN07tui.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as x,j as z}from"./index-CI9Nz3HY.js";import{a as j,c as g}from"./utils-CDN07tui.js";const v=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,b=j,k=(a,e)=>t=>{var l;if((e==null?void 0:e.variants)==null)return b(a,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:d,defaultVariants:r}=e,y=Object.keys(d).map(n=>{const s=t==null?void 0:t[n],o=r==null?void 0:r[n];if(s===null)return null;const i=v(s)||v(o);return d[n][i]}),c=t&&Object.entries(t).reduce((n,s)=>{let[o,i]=s;return i===void 0||(n[o]=i),n},{}),f=e==null||(l=e.compoundVariants)===null||l===void 0?void 0:l.reduce((n,s)=>{let{class:o,className:i,...V}=s;return Object.entries(V).every(N=>{let[m,u]=N;return Array.isArray(u)?u.includes({...r,...c}[m]):{...r,...c}[m]===u})?[...n,o,i]:n},[]);return b(a,y,f,t==null?void 0:t.class,t==null?void 0:t.className)},C=k("btn-base",{variants:{variant:{default:"btn-primary",primary:"btn-primary",secondary:"btn-secondary",outline:"btn-secondary",ghost:"btn-ghost",tonal:"btn-tonal",link:"btn-link",destructive:"btn-danger",danger:"btn-danger"},size:{default:"btn-size-md",md:"btn-size-md",sm:"btn-size-sm",lg:"btn-size-lg",icon:"btn-size-icon"}},defaultVariants:{variant:"primary",size:"md"}}),O=x.forwardRef(({className:a,variant:e,size:t,...l},d)=>z.jsx("button",{className:g(C({variant:e,size:t,className:a})),ref:d,...l}));O.displayName="Button";export{O as B,k as c};
1
+ import{r as x,j as z}from"./index-kcl0icXA.js";import{a as j,c as g}from"./utils-CDN07tui.js";const v=a=>typeof a=="boolean"?`${a}`:a===0?"0":a,b=j,k=(a,e)=>t=>{var l;if((e==null?void 0:e.variants)==null)return b(a,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:d,defaultVariants:r}=e,y=Object.keys(d).map(n=>{const s=t==null?void 0:t[n],o=r==null?void 0:r[n];if(s===null)return null;const i=v(s)||v(o);return d[n][i]}),c=t&&Object.entries(t).reduce((n,s)=>{let[o,i]=s;return i===void 0||(n[o]=i),n},{}),f=e==null||(l=e.compoundVariants)===null||l===void 0?void 0:l.reduce((n,s)=>{let{class:o,className:i,...V}=s;return Object.entries(V).every(N=>{let[m,u]=N;return Array.isArray(u)?u.includes({...r,...c}[m]):{...r,...c}[m]===u})?[...n,o,i]:n},[]);return b(a,y,f,t==null?void 0:t.class,t==null?void 0:t.className)},C=k("btn-base",{variants:{variant:{default:"btn-primary",primary:"btn-primary",secondary:"btn-secondary",outline:"btn-secondary",ghost:"btn-ghost",tonal:"btn-tonal",link:"btn-link",destructive:"btn-danger",danger:"btn-danger"},size:{default:"btn-size-md",md:"btn-size-md",sm:"btn-size-sm",lg:"btn-size-lg",icon:"btn-size-icon"}},defaultVariants:{variant:"primary",size:"md"}}),O=x.forwardRef(({className:a,variant:e,size:t,...l},d)=>z.jsx("button",{className:g(C({variant:e,size:t,className:a})),ref:d,...l}));O.displayName="Button";export{O as B,k as c};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-CI9Nz3HY.js";/**
1
+ import{c as e}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-CI9Nz3HY.js";/**
1
+ import{c}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-CI9Nz3HY.js";/**
1
+ import{c as e}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as o}from"./index-CI9Nz3HY.js";/**
1
+ import{c as o}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-CI9Nz3HY.js";/**
1
+ import{c}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-CI9Nz3HY.js";/**
1
+ import{c}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-CI9Nz3HY.js";/**
1
+ import{c}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c}from"./index-CI9Nz3HY.js";/**
1
+ import{c}from"./index-kcl0icXA.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.